2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20200802.
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 --with-form-libname=XXX override form basename of library
690 --with-menu-libname=XXX override menu basename of library
691 --with-panel-libname=XXX override panel basename of library
692 --disable-panel disable checks for panel functions
693 --disable-menu disable checks for menu functions
694 --disable-form disable checks for form functions
695 Testing/development Options:
696 --enable-warnings test: turn on gcc compiler warnings
697 --with-dmalloc test: use Gray Watson's dmalloc library
698 --with-dbmalloc test: use Conor Cahill's dbmalloc library
699 --with-valgrind test: use valgrind
700 --disable-leaks test: free permanent memory, analyze leaks
701 --disable-rpath-hack don't add rpath options for additional libraries
703 Some influential environment variables:
704 CC C compiler command
705 CFLAGS C compiler flags
706 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
707 nonstandard directory <lib dir>
708 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
709 headers in a nonstandard directory <include dir>
712 Use these variables to override the choices made by `configure' or to help
713 it to find libraries and programs with nonstandard names/locations.
718 if test "$ac_init_help" = "recursive"; then
719 # If there are subdirs, report their specific --help.
721 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
723 # A "../" for each directory in /$ac_subdir.
724 ac_dots=`echo $ac_subdir |
725 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
728 .) # No --srcdir option. We are building in place.
729 ac_sub_srcdir=$srcdir ;;
730 [\\/]* | ?:[\\/]* ) # Absolute path.
731 ac_sub_srcdir=$srcdir/$ac_subdir ;;
733 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
736 # Check for guested configure; otherwise get Cygnus style configure.
737 if test -f $ac_sub_srcdir/configure.gnu; then
739 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
740 elif test -f $ac_sub_srcdir/configure; then
742 $SHELL $ac_sub_srcdir/configure --help=recursive
743 elif test -f $ac_sub_srcdir/configure.ac ||
744 test -f $ac_sub_srcdir/configure.in; then
748 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
754 test -n "$ac_init_help" && exit 0
755 if $ac_init_version; then
758 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
759 Free Software Foundation, Inc.
760 This configure script is free software; the Free Software Foundation
761 gives unlimited permission to copy, distribute and modify it.
767 This file contains any messages produced by compilers while
768 running configure, to aid debugging if configure makes a mistake.
770 It was created by $as_me, which was
771 generated by GNU Autoconf 2.52.20200802. Invocation command line was
782 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
783 uname -m = `(uname -m) 2>/dev/null || echo unknown`
784 uname -r = `(uname -r) 2>/dev/null || echo unknown`
785 uname -s = `(uname -s) 2>/dev/null || echo unknown`
786 uname -v = `(uname -v) 2>/dev/null || echo unknown`
788 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
789 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
791 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
792 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
793 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
794 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
795 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
796 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
797 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
811 # Keep a trace of the command line.
812 # Strip out --no-create and --no-recursion so they do not pile up.
813 # Also quote any args containing shell meta-characters.
819 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
820 | --no-cr | --no-c) ;;
821 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
822 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
823 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
824 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
825 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
827 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
830 # Get rid of the leading space.
833 # When interrupted or exit'd, cleanup temporary files, and complete
834 # config.log. We remove comments because anyway the quotes in there
835 # would cause problems or look ugly.
837 # Save into config.log some information that might help in debugging.
839 echo "## ----------------- ##" >&5
840 echo "## Cache variables. ##" >&5
841 echo "## ----------------- ##" >&5
843 # The following way of writing the cache mishandles newlines in values,
846 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
849 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
850 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
854 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
858 sed "/^$/d" confdefs.h >conftest.log
859 if test -s conftest.log; then
861 echo "## ------------ ##" >&5
862 echo "## confdefs.h. ##" >&5
863 echo "## ------------ ##" >&5
868 test "$ac_signal" != 0 &&
869 echo "$as_me: caught signal $ac_signal" >&5
870 echo "$as_me: exit $exit_status" >&5
871 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
874 for ac_signal in 1 2 13 15; do
875 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
879 # confdefs.h avoids OS command line length limits that DEFS can exceed.
880 rm -rf conftest* confdefs.h
881 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
884 # Let the site file select an alternate cache file if it wants to.
885 # Prefer explicitly selected file to automatically selected ones.
886 if test -z "$CONFIG_SITE"; then
887 if test "x$prefix" != xNONE; then
888 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
890 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
893 for ac_site_file in $CONFIG_SITE; do
894 if test -r "$ac_site_file"; then
895 { echo "$as_me:895: loading site script $ac_site_file" >&5
896 echo "$as_me: loading site script $ac_site_file" >&6;}
897 cat "$ac_site_file" >&5
902 if test -r "$cache_file"; then
903 # Some versions of bash will fail to source /dev/null (special
904 # files actually), so we avoid doing that.
905 if test -f "$cache_file"; then
906 { echo "$as_me:906: loading cache $cache_file" >&5
907 echo "$as_me: loading cache $cache_file" >&6;}
909 [\\/]* | ?:[\\/]* ) . $cache_file;;
914 { echo "$as_me:914: creating cache $cache_file" >&5
915 echo "$as_me: creating cache $cache_file" >&6;}
919 # Check that the precious variables saved in the cache have kept the same
921 ac_cache_corrupted=false
922 for ac_var in `(set) 2>&1 |
923 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
924 eval ac_old_set=\$ac_cv_env_${ac_var}_set
925 eval ac_new_set=\$ac_env_${ac_var}_set
926 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
927 eval ac_new_val="\$ac_env_${ac_var}_value"
928 case $ac_old_set,$ac_new_set in
930 { echo "$as_me:930: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
931 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
932 ac_cache_corrupted=: ;;
934 { echo "$as_me:934: error: \`$ac_var' was not set in the previous run" >&5
935 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
936 ac_cache_corrupted=: ;;
939 if test "x$ac_old_val" != "x$ac_new_val"; then
940 { echo "$as_me:940: error: \`$ac_var' has changed since the previous run:" >&5
941 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
942 { echo "$as_me:942: former value: $ac_old_val" >&5
943 echo "$as_me: former value: $ac_old_val" >&2;}
944 { echo "$as_me:944: current value: $ac_new_val" >&5
945 echo "$as_me: current value: $ac_new_val" >&2;}
949 # Pass precious variables to config.status. It doesn't matter if
950 # we pass some twice (in addition to the command line arguments).
951 if test "$ac_new_set" = set; then
953 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
954 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
955 ac_configure_args="$ac_configure_args '$ac_arg'"
957 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
962 if $ac_cache_corrupted; then
963 { echo "$as_me:963: error: changes in the environment can compromise the build" >&5
964 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
965 { { echo "$as_me:965: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
966 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
967 { (exit 1); exit 1; }; }
971 ac_cpp='$CPP $CPPFLAGS'
972 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
973 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
974 ac_compiler_gnu=$ac_cv_c_compiler_gnu
975 ac_main_return=return
977 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
978 *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
980 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
981 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
983 echo "#! $SHELL" >conftest.sh
984 echo "exit 0" >>conftest.sh
986 if { (echo "$as_me:986: PATH=\".;.\"; conftest.sh") >&5
987 (PATH=".;."; conftest.sh) 2>&5
989 echo "$as_me:989: \$? = $ac_status" >&5
990 (exit $ac_status); }; then
991 ac_path_separator=';'
995 PATH_SEPARATOR="$ac_path_separator"
998 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
1000 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
1002 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
1005 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1006 if test -f $ac_dir/install-sh; then
1008 ac_install_sh="$ac_aux_dir/install-sh -c"
1010 elif test -f $ac_dir/install.sh; then
1012 ac_install_sh="$ac_aux_dir/install.sh -c"
1014 elif test -f $ac_dir/shtool; then
1016 ac_install_sh="$ac_aux_dir/shtool install -c"
1020 if test -z "$ac_aux_dir"; then
1021 { { echo "$as_me:1021: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1022 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1023 { (exit 1); exit 1; }; }
1025 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1026 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1027 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1029 # Make sure we can run config.sub.
1030 $ac_config_sub sun4 >/dev/null 2>&1 ||
1031 { { echo "$as_me:1031: error: cannot run $ac_config_sub" >&5
1032 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1033 { (exit 1); exit 1; }; }
1035 echo "$as_me:1035: checking build system type" >&5
1036 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1037 if test "${ac_cv_build+set}" = set; then
1038 echo $ECHO_N "(cached) $ECHO_C" >&6
1040 ac_cv_build_alias=$build_alias
1041 test -z "$ac_cv_build_alias" &&
1042 ac_cv_build_alias=`$ac_config_guess`
1043 test -z "$ac_cv_build_alias" &&
1044 { { echo "$as_me:1044: error: cannot guess build type; you must specify one" >&5
1045 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1046 { (exit 1); exit 1; }; }
1047 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1048 { { echo "$as_me:1048: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1049 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1050 { (exit 1); exit 1; }; }
1053 echo "$as_me:1053: result: $ac_cv_build" >&5
1054 echo "${ECHO_T}$ac_cv_build" >&6
1056 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1057 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1058 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1060 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1061 echo "$as_me:1061: checking host system type" >&5
1062 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1063 if test "${ac_cv_host+set}" = set; then
1064 echo $ECHO_N "(cached) $ECHO_C" >&6
1066 ac_cv_host_alias=$host_alias
1067 test -z "$ac_cv_host_alias" &&
1068 ac_cv_host_alias=$ac_cv_build_alias
1069 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1070 { { echo "$as_me:1070: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1071 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1072 { (exit 1); exit 1; }; }
1075 echo "$as_me:1075: result: $ac_cv_host" >&5
1076 echo "${ECHO_T}$ac_cv_host" >&6
1078 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1079 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1080 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1082 system_name="$host_os"
1084 system_name="`(uname -s -r) 2>/dev/null`"
1085 if test -z "$system_name" ; then
1086 system_name="`(hostname) 2>/dev/null`"
1089 test -n "$system_name" &&
1090 cat >>confdefs.h <<EOF
1091 #define SYSTEM_NAME "$system_name"
1094 if test "${cf_cv_system_name+set}" = set; then
1095 echo $ECHO_N "(cached) $ECHO_C" >&6
1097 cf_cv_system_name="$system_name"
1100 test -z "$system_name" && system_name="$cf_cv_system_name"
1101 test -n "$cf_cv_system_name" && echo "$as_me:1101: result: Configuring for $cf_cv_system_name" >&5
1102 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1104 if test ".$system_name" != ".$cf_cv_system_name" ; then
1105 echo "$as_me:1105: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1106 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1107 { { echo "$as_me:1107: error: \"Please remove config.cache and try again.\"" >&5
1108 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1109 { (exit 1); exit 1; }; }
1112 test "$program_prefix" != NONE &&
1113 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1114 # Use a double $ so make ignores it.
1115 test "$program_suffix" != NONE &&
1116 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1117 # Double any \ or $. echo might interpret backslashes.
1118 # By default was `s,x,x', remove it if useless.
1119 cat <<\_ACEOF >conftest.sed
1120 s/[\\$]/&&/g;s/;s,x,x,$//
1122 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1125 echo "$as_me:1125: checking whether ${MAKE-make} sets \${MAKE}" >&5
1126 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1127 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1128 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1129 echo $ECHO_N "(cached) $ECHO_C" >&6
1131 cat >conftest.make <<\EOF
1133 @echo 'ac_maketemp="${MAKE}"'
1135 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1136 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1137 if test -n "$ac_maketemp"; then
1138 eval ac_cv_prog_make_${ac_make}_set=yes
1140 eval ac_cv_prog_make_${ac_make}_set=no
1144 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1145 echo "$as_me:1145: result: yes" >&5
1146 echo "${ECHO_T}yes" >&6
1149 echo "$as_me:1149: result: no" >&5
1150 echo "${ECHO_T}no" >&6
1151 SET_MAKE="MAKE=${MAKE-make}"
1155 ac_cpp='$CPP $CPPFLAGS'
1156 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1157 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1158 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1159 ac_main_return=return
1160 if test -n "$ac_tool_prefix"; then
1161 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1162 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1163 echo "$as_me:1163: checking for $ac_word" >&5
1164 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1165 if test "${ac_cv_prog_CC+set}" = set; then
1166 echo $ECHO_N "(cached) $ECHO_C" >&6
1168 if test -n "$CC"; then
1169 ac_cv_prog_CC="$CC" # Let the user override the test.
1171 ac_save_IFS=$IFS; IFS=$ac_path_separator
1173 for ac_dir in $ac_dummy; do
1175 test -z "$ac_dir" && ac_dir=.
1176 $as_executable_p "$ac_dir/$ac_word" || continue
1177 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1178 echo "$as_me:1178: found $ac_dir/$ac_word" >&5
1185 if test -n "$CC"; then
1186 echo "$as_me:1186: result: $CC" >&5
1187 echo "${ECHO_T}$CC" >&6
1189 echo "$as_me:1189: result: no" >&5
1190 echo "${ECHO_T}no" >&6
1194 if test -z "$ac_cv_prog_CC"; then
1196 # Extract the first word of "gcc", so it can be a program name with args.
1197 set dummy gcc; ac_word=$2
1198 echo "$as_me:1198: checking for $ac_word" >&5
1199 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1200 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1201 echo $ECHO_N "(cached) $ECHO_C" >&6
1203 if test -n "$ac_ct_CC"; then
1204 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1206 ac_save_IFS=$IFS; IFS=$ac_path_separator
1208 for ac_dir in $ac_dummy; do
1210 test -z "$ac_dir" && ac_dir=.
1211 $as_executable_p "$ac_dir/$ac_word" || continue
1212 ac_cv_prog_ac_ct_CC="gcc"
1213 echo "$as_me:1213: found $ac_dir/$ac_word" >&5
1219 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1220 if test -n "$ac_ct_CC"; then
1221 echo "$as_me:1221: result: $ac_ct_CC" >&5
1222 echo "${ECHO_T}$ac_ct_CC" >&6
1224 echo "$as_me:1224: result: no" >&5
1225 echo "${ECHO_T}no" >&6
1233 if test -z "$CC"; then
1234 if test -n "$ac_tool_prefix"; then
1235 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1236 set dummy ${ac_tool_prefix}cc; ac_word=$2
1237 echo "$as_me:1237: checking for $ac_word" >&5
1238 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1239 if test "${ac_cv_prog_CC+set}" = set; then
1240 echo $ECHO_N "(cached) $ECHO_C" >&6
1242 if test -n "$CC"; then
1243 ac_cv_prog_CC="$CC" # Let the user override the test.
1245 ac_save_IFS=$IFS; IFS=$ac_path_separator
1247 for ac_dir in $ac_dummy; do
1249 test -z "$ac_dir" && ac_dir=.
1250 $as_executable_p "$ac_dir/$ac_word" || continue
1251 ac_cv_prog_CC="${ac_tool_prefix}cc"
1252 echo "$as_me:1252: found $ac_dir/$ac_word" >&5
1259 if test -n "$CC"; then
1260 echo "$as_me:1260: result: $CC" >&5
1261 echo "${ECHO_T}$CC" >&6
1263 echo "$as_me:1263: result: no" >&5
1264 echo "${ECHO_T}no" >&6
1268 if test -z "$ac_cv_prog_CC"; then
1270 # Extract the first word of "cc", so it can be a program name with args.
1271 set dummy cc; ac_word=$2
1272 echo "$as_me:1272: checking for $ac_word" >&5
1273 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1274 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1275 echo $ECHO_N "(cached) $ECHO_C" >&6
1277 if test -n "$ac_ct_CC"; then
1278 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1280 ac_save_IFS=$IFS; IFS=$ac_path_separator
1282 for ac_dir in $ac_dummy; do
1284 test -z "$ac_dir" && ac_dir=.
1285 $as_executable_p "$ac_dir/$ac_word" || continue
1286 ac_cv_prog_ac_ct_CC="cc"
1287 echo "$as_me:1287: found $ac_dir/$ac_word" >&5
1293 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1294 if test -n "$ac_ct_CC"; then
1295 echo "$as_me:1295: result: $ac_ct_CC" >&5
1296 echo "${ECHO_T}$ac_ct_CC" >&6
1298 echo "$as_me:1298: result: no" >&5
1299 echo "${ECHO_T}no" >&6
1308 if test -z "$CC"; then
1309 # Extract the first word of "cc", so it can be a program name with args.
1310 set dummy cc; ac_word=$2
1311 echo "$as_me:1311: checking for $ac_word" >&5
1312 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1313 if test "${ac_cv_prog_CC+set}" = set; then
1314 echo $ECHO_N "(cached) $ECHO_C" >&6
1316 if test -n "$CC"; then
1317 ac_cv_prog_CC="$CC" # Let the user override the test.
1320 ac_save_IFS=$IFS; IFS=$ac_path_separator
1322 for ac_dir in $ac_dummy; do
1324 test -z "$ac_dir" && ac_dir=.
1325 $as_executable_p "$ac_dir/$ac_word" || continue
1326 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1327 ac_prog_rejected=yes
1331 echo "$as_me:1331: found $ac_dir/$ac_word" >&5
1335 if test $ac_prog_rejected = yes; then
1336 # We found a bogon in the path, so make sure we never use it.
1337 set dummy $ac_cv_prog_CC
1339 if test $# != 0; then
1340 # We chose a different compiler from the bogus one.
1341 # However, it has the same basename, so the bogon will be chosen
1342 # first if we set CC to just the basename; use the full file name.
1344 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1352 if test -n "$CC"; then
1353 echo "$as_me:1353: result: $CC" >&5
1354 echo "${ECHO_T}$CC" >&6
1356 echo "$as_me:1356: result: no" >&5
1357 echo "${ECHO_T}no" >&6
1361 if test -z "$CC"; then
1362 if test -n "$ac_tool_prefix"; then
1365 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1366 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1367 echo "$as_me:1367: checking for $ac_word" >&5
1368 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1369 if test "${ac_cv_prog_CC+set}" = set; then
1370 echo $ECHO_N "(cached) $ECHO_C" >&6
1372 if test -n "$CC"; then
1373 ac_cv_prog_CC="$CC" # Let the user override the test.
1375 ac_save_IFS=$IFS; IFS=$ac_path_separator
1377 for ac_dir in $ac_dummy; do
1379 test -z "$ac_dir" && ac_dir=.
1380 $as_executable_p "$ac_dir/$ac_word" || continue
1381 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1382 echo "$as_me:1382: found $ac_dir/$ac_word" >&5
1389 if test -n "$CC"; then
1390 echo "$as_me:1390: result: $CC" >&5
1391 echo "${ECHO_T}$CC" >&6
1393 echo "$as_me:1393: result: no" >&5
1394 echo "${ECHO_T}no" >&6
1397 test -n "$CC" && break
1400 if test -z "$CC"; then
1404 # Extract the first word of "$ac_prog", so it can be a program name with args.
1405 set dummy $ac_prog; ac_word=$2
1406 echo "$as_me:1406: checking for $ac_word" >&5
1407 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1408 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1409 echo $ECHO_N "(cached) $ECHO_C" >&6
1411 if test -n "$ac_ct_CC"; then
1412 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1414 ac_save_IFS=$IFS; IFS=$ac_path_separator
1416 for ac_dir in $ac_dummy; do
1418 test -z "$ac_dir" && ac_dir=.
1419 $as_executable_p "$ac_dir/$ac_word" || continue
1420 ac_cv_prog_ac_ct_CC="$ac_prog"
1421 echo "$as_me:1421: found $ac_dir/$ac_word" >&5
1427 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1428 if test -n "$ac_ct_CC"; then
1429 echo "$as_me:1429: result: $ac_ct_CC" >&5
1430 echo "${ECHO_T}$ac_ct_CC" >&6
1432 echo "$as_me:1432: result: no" >&5
1433 echo "${ECHO_T}no" >&6
1436 test -n "$ac_ct_CC" && break
1444 test -z "$CC" && { { echo "$as_me:1444: error: no acceptable cc found in \$PATH" >&5
1445 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1446 { (exit 1); exit 1; }; }
1448 # Provide some information about the compiler.
1449 echo "$as_me:1449:" \
1450 "checking for C compiler version" >&5
1451 ac_compiler=`set X $ac_compile; echo $2`
1452 { (eval echo "$as_me:1452: \"$ac_compiler --version </dev/null >&5\"") >&5
1453 (eval $ac_compiler --version </dev/null >&5) 2>&5
1455 echo "$as_me:1455: \$? = $ac_status" >&5
1456 (exit $ac_status); }
1457 { (eval echo "$as_me:1457: \"$ac_compiler -v </dev/null >&5\"") >&5
1458 (eval $ac_compiler -v </dev/null >&5) 2>&5
1460 echo "$as_me:1460: \$? = $ac_status" >&5
1461 (exit $ac_status); }
1462 { (eval echo "$as_me:1462: \"$ac_compiler -V </dev/null >&5\"") >&5
1463 (eval $ac_compiler -V </dev/null >&5) 2>&5
1465 echo "$as_me:1465: \$? = $ac_status" >&5
1466 (exit $ac_status); }
1468 cat >conftest.$ac_ext <<_ACEOF
1469 #line 1469 "configure"
1470 #include "confdefs.h"
1480 ac_clean_files_save=$ac_clean_files
1481 ac_clean_files="$ac_clean_files a.out a.exe"
1482 # Try to create an executable without -o first, disregard a.out.
1483 # It will help us diagnose broken compilers, and finding out an intuition
1485 echo "$as_me:1485: checking for C compiler default output" >&5
1486 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1487 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1488 if { (eval echo "$as_me:1488: \"$ac_link_default\"") >&5
1489 (eval $ac_link_default) 2>&5
1491 echo "$as_me:1491: \$? = $ac_status" >&5
1492 (exit $ac_status); }; then
1493 # Find the output, starting from the most likely. This scheme is
1494 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1496 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1497 ls a.out conftest 2>/dev/null;
1498 ls a.* conftest.* 2>/dev/null`; do
1500 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1501 a.out ) # We found the default executable, but exeext='' is most
1504 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1505 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1512 echo "$as_me: failed program was:" >&5
1513 cat conftest.$ac_ext >&5
1514 { { echo "$as_me:1514: error: C compiler cannot create executables" >&5
1515 echo "$as_me: error: C compiler cannot create executables" >&2;}
1516 { (exit 77); exit 77; }; }
1519 ac_exeext=$ac_cv_exeext
1520 echo "$as_me:1520: result: $ac_file" >&5
1521 echo "${ECHO_T}$ac_file" >&6
1523 # Check the compiler produces executables we can run. If not, either
1524 # the compiler is broken, or we cross compile.
1525 echo "$as_me:1525: checking whether the C compiler works" >&5
1526 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1527 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1528 # If not cross compiling, check that we can run a simple program.
1529 if test "$cross_compiling" != yes; then
1530 if { ac_try='./$ac_file'
1531 { (eval echo "$as_me:1531: \"$ac_try\"") >&5
1534 echo "$as_me:1534: \$? = $ac_status" >&5
1535 (exit $ac_status); }; }; then
1538 if test "$cross_compiling" = maybe; then
1541 { { echo "$as_me:1541: error: cannot run C compiled programs.
1542 If you meant to cross compile, use \`--host'." >&5
1543 echo "$as_me: error: cannot run C compiled programs.
1544 If you meant to cross compile, use \`--host'." >&2;}
1545 { (exit 1); exit 1; }; }
1549 echo "$as_me:1549: result: yes" >&5
1550 echo "${ECHO_T}yes" >&6
1552 rm -f a.out a.exe conftest$ac_cv_exeext
1553 ac_clean_files=$ac_clean_files_save
1554 # Check the compiler produces executables we can run. If not, either
1555 # the compiler is broken, or we cross compile.
1556 echo "$as_me:1556: checking whether we are cross compiling" >&5
1557 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1558 echo "$as_me:1558: result: $cross_compiling" >&5
1559 echo "${ECHO_T}$cross_compiling" >&6
1561 echo "$as_me:1561: checking for executable suffix" >&5
1562 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1563 if { (eval echo "$as_me:1563: \"$ac_link\"") >&5
1564 (eval $ac_link) 2>&5
1566 echo "$as_me:1566: \$? = $ac_status" >&5
1567 (exit $ac_status); }; then
1568 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1569 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1570 # work properly (i.e., refer to `conftest.exe'), while it won't with
1572 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1574 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1575 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1582 { { echo "$as_me:1582: error: cannot compute EXEEXT: cannot compile and link" >&5
1583 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1584 { (exit 1); exit 1; }; }
1587 rm -f conftest$ac_cv_exeext
1588 echo "$as_me:1588: result: $ac_cv_exeext" >&5
1589 echo "${ECHO_T}$ac_cv_exeext" >&6
1591 rm -f conftest.$ac_ext
1592 EXEEXT=$ac_cv_exeext
1594 echo "$as_me:1594: checking for object suffix" >&5
1595 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1596 if test "${ac_cv_objext+set}" = set; then
1597 echo $ECHO_N "(cached) $ECHO_C" >&6
1599 cat >conftest.$ac_ext <<_ACEOF
1600 #line 1600 "configure"
1601 #include "confdefs.h"
1611 rm -f conftest.o conftest.obj
1612 if { (eval echo "$as_me:1612: \"$ac_compile\"") >&5
1613 (eval $ac_compile) 2>&5
1615 echo "$as_me:1615: \$? = $ac_status" >&5
1616 (exit $ac_status); }; then
1617 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1619 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1620 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1625 echo "$as_me: failed program was:" >&5
1626 cat conftest.$ac_ext >&5
1627 { { echo "$as_me:1627: error: cannot compute OBJEXT: cannot compile" >&5
1628 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1629 { (exit 1); exit 1; }; }
1632 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1634 echo "$as_me:1634: result: $ac_cv_objext" >&5
1635 echo "${ECHO_T}$ac_cv_objext" >&6
1636 OBJEXT=$ac_cv_objext
1638 echo "$as_me:1638: checking whether we are using the GNU C compiler" >&5
1639 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1640 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1641 echo $ECHO_N "(cached) $ECHO_C" >&6
1643 cat >conftest.$ac_ext <<_ACEOF
1644 #line 1644 "configure"
1645 #include "confdefs.h"
1658 rm -f conftest.$ac_objext
1659 if { (eval echo "$as_me:1659: \"$ac_compile\"") >&5
1660 (eval $ac_compile) 2>&5
1662 echo "$as_me:1662: \$? = $ac_status" >&5
1663 (exit $ac_status); } &&
1664 { ac_try='test -s conftest.$ac_objext'
1665 { (eval echo "$as_me:1665: \"$ac_try\"") >&5
1668 echo "$as_me:1668: \$? = $ac_status" >&5
1669 (exit $ac_status); }; }; then
1672 echo "$as_me: failed program was:" >&5
1673 cat conftest.$ac_ext >&5
1676 rm -f conftest.$ac_objext conftest.$ac_ext
1677 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1680 echo "$as_me:1680: result: $ac_cv_c_compiler_gnu" >&5
1681 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1682 GCC=`test $ac_compiler_gnu = yes && echo yes`
1683 ac_test_CFLAGS=${CFLAGS+set}
1684 ac_save_CFLAGS=$CFLAGS
1686 echo "$as_me:1686: checking whether $CC accepts -g" >&5
1687 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1688 if test "${ac_cv_prog_cc_g+set}" = set; then
1689 echo $ECHO_N "(cached) $ECHO_C" >&6
1691 cat >conftest.$ac_ext <<_ACEOF
1692 #line 1692 "configure"
1693 #include "confdefs.h"
1703 rm -f conftest.$ac_objext
1704 if { (eval echo "$as_me:1704: \"$ac_compile\"") >&5
1705 (eval $ac_compile) 2>&5
1707 echo "$as_me:1707: \$? = $ac_status" >&5
1708 (exit $ac_status); } &&
1709 { ac_try='test -s conftest.$ac_objext'
1710 { (eval echo "$as_me:1710: \"$ac_try\"") >&5
1713 echo "$as_me:1713: \$? = $ac_status" >&5
1714 (exit $ac_status); }; }; then
1717 echo "$as_me: failed program was:" >&5
1718 cat conftest.$ac_ext >&5
1721 rm -f conftest.$ac_objext conftest.$ac_ext
1723 echo "$as_me:1723: result: $ac_cv_prog_cc_g" >&5
1724 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1725 if test "$ac_test_CFLAGS" = set; then
1726 CFLAGS=$ac_save_CFLAGS
1727 elif test $ac_cv_prog_cc_g = yes; then
1728 if test "$GCC" = yes; then
1734 if test "$GCC" = yes; then
1740 # Some people use a C++ compiler to compile C. Since we use `exit',
1741 # in C++ we need to declare it. In case someone uses the same compiler
1742 # for both compiling C and C++ we need to have the C++ compiler decide
1743 # the declaration of exit, since it's the most demanding environment.
1744 cat >conftest.$ac_ext <<_ACEOF
1749 rm -f conftest.$ac_objext
1750 if { (eval echo "$as_me:1750: \"$ac_compile\"") >&5
1751 (eval $ac_compile) 2>&5
1753 echo "$as_me:1753: \$? = $ac_status" >&5
1754 (exit $ac_status); } &&
1755 { ac_try='test -s conftest.$ac_objext'
1756 { (eval echo "$as_me:1756: \"$ac_try\"") >&5
1759 echo "$as_me:1759: \$? = $ac_status" >&5
1760 (exit $ac_status); }; }; then
1761 for ac_declaration in \
1763 '#include <stdlib.h>' \
1764 'extern "C" void std::exit (int) throw (); using std::exit;' \
1765 'extern "C" void std::exit (int); using std::exit;' \
1766 'extern "C" void exit (int) throw ();' \
1767 'extern "C" void exit (int);' \
1770 cat >conftest.$ac_ext <<_ACEOF
1771 #line 1771 "configure"
1772 #include "confdefs.h"
1783 rm -f conftest.$ac_objext
1784 if { (eval echo "$as_me:1784: \"$ac_compile\"") >&5
1785 (eval $ac_compile) 2>&5
1787 echo "$as_me:1787: \$? = $ac_status" >&5
1788 (exit $ac_status); } &&
1789 { ac_try='test -s conftest.$ac_objext'
1790 { (eval echo "$as_me:1790: \"$ac_try\"") >&5
1793 echo "$as_me:1793: \$? = $ac_status" >&5
1794 (exit $ac_status); }; }; then
1797 echo "$as_me: failed program was:" >&5
1798 cat conftest.$ac_ext >&5
1801 rm -f conftest.$ac_objext conftest.$ac_ext
1802 cat >conftest.$ac_ext <<_ACEOF
1803 #line 1803 "configure"
1804 #include "confdefs.h"
1814 rm -f conftest.$ac_objext
1815 if { (eval echo "$as_me:1815: \"$ac_compile\"") >&5
1816 (eval $ac_compile) 2>&5
1818 echo "$as_me:1818: \$? = $ac_status" >&5
1819 (exit $ac_status); } &&
1820 { ac_try='test -s conftest.$ac_objext'
1821 { (eval echo "$as_me:1821: \"$ac_try\"") >&5
1824 echo "$as_me:1824: \$? = $ac_status" >&5
1825 (exit $ac_status); }; }; then
1828 echo "$as_me: failed program was:" >&5
1829 cat conftest.$ac_ext >&5
1831 rm -f conftest.$ac_objext conftest.$ac_ext
1834 if test -n "$ac_declaration"; then
1835 echo '#ifdef __cplusplus' >>confdefs.h
1836 echo $ac_declaration >>confdefs.h
1837 echo '#endif' >>confdefs.h
1841 echo "$as_me: failed program was:" >&5
1842 cat conftest.$ac_ext >&5
1844 rm -f conftest.$ac_objext conftest.$ac_ext
1846 ac_cpp='$CPP $CPPFLAGS'
1847 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1848 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1849 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1850 ac_main_return=return
1853 if test "$GCC" = yes ; then
1854 echo "$as_me:1854: checking version of $CC" >&5
1855 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1856 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.].*//'`"
1857 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1858 echo "$as_me:1858: result: $GCC_VERSION" >&5
1859 echo "${ECHO_T}$GCC_VERSION" >&6
1864 if test "$GCC" = yes ; then
1867 echo "$as_me:1867: checking if this is really Intel C compiler" >&5
1868 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1869 cf_save_CFLAGS="$CFLAGS"
1870 CFLAGS="$CFLAGS -no-gcc"
1871 cat >conftest.$ac_ext <<_ACEOF
1872 #line 1872 "configure"
1873 #include "confdefs.h"
1879 #ifdef __INTEL_COMPILER
1888 rm -f conftest.$ac_objext
1889 if { (eval echo "$as_me:1889: \"$ac_compile\"") >&5
1890 (eval $ac_compile) 2>&5
1892 echo "$as_me:1892: \$? = $ac_status" >&5
1893 (exit $ac_status); } &&
1894 { ac_try='test -s conftest.$ac_objext'
1895 { (eval echo "$as_me:1895: \"$ac_try\"") >&5
1898 echo "$as_me:1898: \$? = $ac_status" >&5
1899 (exit $ac_status); }; }; then
1901 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1904 echo "$as_me: failed program was:" >&5
1905 cat conftest.$ac_ext >&5
1907 rm -f conftest.$ac_objext conftest.$ac_ext
1908 CFLAGS="$cf_save_CFLAGS"
1909 echo "$as_me:1909: result: $INTEL_COMPILER" >&5
1910 echo "${ECHO_T}$INTEL_COMPILER" >&6
1917 if test "$GCC" = yes ; then
1918 echo "$as_me:1918: checking if this is really Clang C compiler" >&5
1919 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1920 cf_save_CFLAGS="$CFLAGS"
1921 CFLAGS="$CFLAGS -Qunused-arguments"
1922 cat >conftest.$ac_ext <<_ACEOF
1923 #line 1923 "configure"
1924 #include "confdefs.h"
1939 rm -f conftest.$ac_objext
1940 if { (eval echo "$as_me:1940: \"$ac_compile\"") >&5
1941 (eval $ac_compile) 2>&5
1943 echo "$as_me:1943: \$? = $ac_status" >&5
1944 (exit $ac_status); } &&
1945 { ac_try='test -s conftest.$ac_objext'
1946 { (eval echo "$as_me:1946: \"$ac_try\"") >&5
1949 echo "$as_me:1949: \$? = $ac_status" >&5
1950 (exit $ac_status); }; }; then
1952 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
1955 echo "$as_me: failed program was:" >&5
1956 cat conftest.$ac_ext >&5
1958 rm -f conftest.$ac_objext conftest.$ac_ext
1959 CFLAGS="$cf_save_CFLAGS"
1960 echo "$as_me:1960: result: $CLANG_COMPILER" >&5
1961 echo "${ECHO_T}$CLANG_COMPILER" >&6
1964 if test "x$CLANG_COMPILER" = "xyes" ; then
1966 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
1967 CFLAGS="${CFLAGS}-Wno-error=implicit-function-declaration"
1971 echo "$as_me:1971: checking for $CC option to accept ANSI C" >&5
1972 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1973 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1974 echo $ECHO_N "(cached) $ECHO_C" >&6
1976 ac_cv_prog_cc_stdc=no
1978 cat >conftest.$ac_ext <<_ACEOF
1979 #line 1979 "configure"
1980 #include "confdefs.h"
1983 #include <sys/types.h>
1984 #include <sys/stat.h>
1985 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1986 struct buf { int x; };
1987 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1988 static char *e (p, i)
1994 static char *f (char * (*g) (char **, int), char **p, ...)
1999 s = g (p, va_arg (v,int));
2003 int test (int i, double x);
2004 struct s1 {int (*f) (int a);};
2005 struct s2 {int (*f) (double a);};
2006 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2012 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2017 # Don't try gcc -ansi; that turns off useful extensions and
2018 # breaks some systems' header files.
2019 # AIX -qlanglvl=ansi
2020 # Ultrix and OSF/1 -std1
2021 # HP-UX 10.20 and later -Ae
2022 # HP-UX older versions -Aa -D_HPUX_SOURCE
2023 # SVR4 -Xc -D__EXTENSIONS__
2024 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2026 CC="$ac_save_CC $ac_arg"
2027 rm -f conftest.$ac_objext
2028 if { (eval echo "$as_me:2028: \"$ac_compile\"") >&5
2029 (eval $ac_compile) 2>&5
2031 echo "$as_me:2031: \$? = $ac_status" >&5
2032 (exit $ac_status); } &&
2033 { ac_try='test -s conftest.$ac_objext'
2034 { (eval echo "$as_me:2034: \"$ac_try\"") >&5
2037 echo "$as_me:2037: \$? = $ac_status" >&5
2038 (exit $ac_status); }; }; then
2039 ac_cv_prog_cc_stdc=$ac_arg
2042 echo "$as_me: failed program was:" >&5
2043 cat conftest.$ac_ext >&5
2045 rm -f conftest.$ac_objext
2047 rm -f conftest.$ac_ext conftest.$ac_objext
2052 case "x$ac_cv_prog_cc_stdc" in
2054 echo "$as_me:2054: result: none needed" >&5
2055 echo "${ECHO_T}none needed" >&6 ;;
2057 echo "$as_me:2057: result: $ac_cv_prog_cc_stdc" >&5
2058 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2059 CC="$CC $ac_cv_prog_cc_stdc" ;;
2062 # This should have been defined by AC_PROG_CC
2065 echo "$as_me:2065: checking \$CFLAGS variable" >&5
2066 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2069 echo "$as_me:2069: result: broken" >&5
2070 echo "${ECHO_T}broken" >&6
2071 { echo "$as_me:2071: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2072 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2075 for cf_arg in $cf_flags
2081 cf_new_extra_cppflags=
2083 for cf_add_cflags in $cf_arg
2085 case $cf_fix_cppflags in
2087 case $cf_add_cflags in
2088 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2089 case $cf_add_cflags in
2091 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2093 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2094 && test -z "${cf_tst_cflags}" \
2095 && cf_fix_cppflags=yes
2097 if test $cf_fix_cppflags = yes ; then
2099 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2100 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2103 elif test "${cf_tst_cflags}" = "\"'" ; then
2105 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2106 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2116 case $cf_add_cflags in
2118 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2120 CPPFLAGS=`echo "$CPPFLAGS" | \
2121 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2122 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2127 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2128 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2135 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2136 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2143 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2144 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2146 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2148 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2149 && test -z "${cf_tst_cflags}" \
2150 && cf_fix_cppflags=no
2155 if test -n "$cf_new_cflags" ; then
2157 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2158 CFLAGS="${CFLAGS}$cf_new_cflags"
2162 if test -n "$cf_new_cppflags" ; then
2164 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2165 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2169 if test -n "$cf_new_extra_cppflags" ; then
2171 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2172 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2179 echo "$as_me:2179: result: ok" >&5
2180 echo "${ECHO_T}ok" >&6
2184 echo "$as_me:2184: checking \$CC variable" >&5
2185 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2188 echo "$as_me:2188: result: broken" >&5
2189 echo "${ECHO_T}broken" >&6
2190 { echo "$as_me:2190: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2191 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2193 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2194 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2196 for cf_arg in $cf_flags
2204 cf_new_extra_cppflags=
2206 for cf_add_cflags in $cf_arg
2208 case $cf_fix_cppflags in
2210 case $cf_add_cflags in
2211 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2212 case $cf_add_cflags in
2214 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2216 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2217 && test -z "${cf_tst_cflags}" \
2218 && cf_fix_cppflags=yes
2220 if test $cf_fix_cppflags = yes ; then
2222 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2223 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2226 elif test "${cf_tst_cflags}" = "\"'" ; then
2228 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2229 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2239 case $cf_add_cflags in
2241 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2243 CPPFLAGS=`echo "$CPPFLAGS" | \
2244 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2245 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2250 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2251 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2258 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2259 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2266 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2267 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2269 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2271 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2272 && test -z "${cf_tst_cflags}" \
2273 && cf_fix_cppflags=no
2278 if test -n "$cf_new_cflags" ; then
2280 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2281 CFLAGS="${CFLAGS}$cf_new_cflags"
2285 if test -n "$cf_new_cppflags" ; then
2287 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2288 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2292 if test -n "$cf_new_extra_cppflags" ; then
2294 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2295 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2305 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2307 echo "${as_me:-configure}:2307: testing resulting CC: '$CC' ..." 1>&5
2309 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2311 echo "${as_me:-configure}:2311: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2313 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2315 echo "${as_me:-configure}:2315: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2319 echo "$as_me:2319: result: ok" >&5
2320 echo "${ECHO_T}ok" >&6
2324 echo "$as_me:2324: checking for inline" >&5
2325 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2326 if test "${ac_cv_c_inline+set}" = set; then
2327 echo $ECHO_N "(cached) $ECHO_C" >&6
2330 for ac_kw in inline __inline__ __inline; do
2331 cat >conftest.$ac_ext <<_ACEOF
2332 #line 2332 "configure"
2333 #include "confdefs.h"
2335 static $ac_kw int static_foo () {return 0; }
2336 $ac_kw int foo () {return 0; }
2340 rm -f conftest.$ac_objext
2341 if { (eval echo "$as_me:2341: \"$ac_compile\"") >&5
2342 (eval $ac_compile) 2>&5
2344 echo "$as_me:2344: \$? = $ac_status" >&5
2345 (exit $ac_status); } &&
2346 { ac_try='test -s conftest.$ac_objext'
2347 { (eval echo "$as_me:2347: \"$ac_try\"") >&5
2350 echo "$as_me:2350: \$? = $ac_status" >&5
2351 (exit $ac_status); }; }; then
2352 ac_cv_c_inline=$ac_kw; break
2354 echo "$as_me: failed program was:" >&5
2355 cat conftest.$ac_ext >&5
2357 rm -f conftest.$ac_objext conftest.$ac_ext
2361 echo "$as_me:2361: result: $ac_cv_c_inline" >&5
2362 echo "${ECHO_T}$ac_cv_c_inline" >&6
2363 case $ac_cv_c_inline in
2366 cat >>confdefs.h <<\EOF
2370 *) cat >>confdefs.h <<EOF
2371 #define inline $ac_cv_c_inline
2377 ac_cpp='$CPP $CPPFLAGS'
2378 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2379 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2380 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2381 ac_main_return=return
2382 echo "$as_me:2382: checking how to run the C preprocessor" >&5
2383 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2384 # On Suns, sometimes $CPP names a directory.
2385 if test -n "$CPP" && test -d "$CPP"; then
2388 if test -z "$CPP"; then
2389 if test "${ac_cv_prog_CPP+set}" = set; then
2390 echo $ECHO_N "(cached) $ECHO_C" >&6
2392 # Double quotes because CPP needs to be expanded
2393 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2396 for ac_c_preproc_warn_flag in '' yes
2398 # Use a header file that comes with gcc, so configuring glibc
2399 # with a fresh cross-compiler works.
2400 # On the NeXT, cc -E runs the code through the compiler's parser,
2401 # not just through cpp. "Syntax error" is here to catch this case.
2402 cat >conftest.$ac_ext <<_ACEOF
2403 #line 2403 "configure"
2404 #include "confdefs.h"
2408 if { (eval echo "$as_me:2408: \"$ac_cpp conftest.$ac_ext\"") >&5
2409 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2411 egrep -v '^ *\+' conftest.er1 >conftest.err
2413 cat conftest.err >&5
2414 echo "$as_me:2414: \$? = $ac_status" >&5
2415 (exit $ac_status); } >/dev/null; then
2416 if test -s conftest.err; then
2417 ac_cpp_err=$ac_c_preproc_warn_flag
2424 if test -z "$ac_cpp_err"; then
2427 echo "$as_me: failed program was:" >&5
2428 cat conftest.$ac_ext >&5
2429 # Broken: fails on valid input.
2432 rm -f conftest.err conftest.$ac_ext
2434 # OK, works on sane cases. Now check whether non-existent headers
2435 # can be detected and how.
2436 cat >conftest.$ac_ext <<_ACEOF
2437 #line 2437 "configure"
2438 #include "confdefs.h"
2439 #include <ac_nonexistent.h>
2441 if { (eval echo "$as_me:2441: \"$ac_cpp conftest.$ac_ext\"") >&5
2442 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2444 egrep -v '^ *\+' conftest.er1 >conftest.err
2446 cat conftest.err >&5
2447 echo "$as_me:2447: \$? = $ac_status" >&5
2448 (exit $ac_status); } >/dev/null; then
2449 if test -s conftest.err; then
2450 ac_cpp_err=$ac_c_preproc_warn_flag
2457 if test -z "$ac_cpp_err"; then
2458 # Broken: success on invalid input.
2461 echo "$as_me: failed program was:" >&5
2462 cat conftest.$ac_ext >&5
2463 # Passes both tests.
2467 rm -f conftest.err conftest.$ac_ext
2470 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2471 rm -f conftest.err conftest.$ac_ext
2472 if $ac_preproc_ok; then
2484 echo "$as_me:2484: result: $CPP" >&5
2485 echo "${ECHO_T}$CPP" >&6
2487 for ac_c_preproc_warn_flag in '' yes
2489 # Use a header file that comes with gcc, so configuring glibc
2490 # with a fresh cross-compiler works.
2491 # On the NeXT, cc -E runs the code through the compiler's parser,
2492 # not just through cpp. "Syntax error" is here to catch this case.
2493 cat >conftest.$ac_ext <<_ACEOF
2494 #line 2494 "configure"
2495 #include "confdefs.h"
2499 if { (eval echo "$as_me:2499: \"$ac_cpp conftest.$ac_ext\"") >&5
2500 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2502 egrep -v '^ *\+' conftest.er1 >conftest.err
2504 cat conftest.err >&5
2505 echo "$as_me:2505: \$? = $ac_status" >&5
2506 (exit $ac_status); } >/dev/null; then
2507 if test -s conftest.err; then
2508 ac_cpp_err=$ac_c_preproc_warn_flag
2515 if test -z "$ac_cpp_err"; then
2518 echo "$as_me: failed program was:" >&5
2519 cat conftest.$ac_ext >&5
2520 # Broken: fails on valid input.
2523 rm -f conftest.err conftest.$ac_ext
2525 # OK, works on sane cases. Now check whether non-existent headers
2526 # can be detected and how.
2527 cat >conftest.$ac_ext <<_ACEOF
2528 #line 2528 "configure"
2529 #include "confdefs.h"
2530 #include <ac_nonexistent.h>
2532 if { (eval echo "$as_me:2532: \"$ac_cpp conftest.$ac_ext\"") >&5
2533 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2535 egrep -v '^ *\+' conftest.er1 >conftest.err
2537 cat conftest.err >&5
2538 echo "$as_me:2538: \$? = $ac_status" >&5
2539 (exit $ac_status); } >/dev/null; then
2540 if test -s conftest.err; then
2541 ac_cpp_err=$ac_c_preproc_warn_flag
2548 if test -z "$ac_cpp_err"; then
2549 # Broken: success on invalid input.
2552 echo "$as_me: failed program was:" >&5
2553 cat conftest.$ac_ext >&5
2554 # Passes both tests.
2558 rm -f conftest.err conftest.$ac_ext
2561 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2562 rm -f conftest.err conftest.$ac_ext
2563 if $ac_preproc_ok; then
2566 { { echo "$as_me:2566: error: C preprocessor \"$CPP\" fails sanity check" >&5
2567 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2568 { (exit 1); exit 1; }; }
2572 ac_cpp='$CPP $CPPFLAGS'
2573 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2574 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2575 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2576 ac_main_return=return
2578 for ac_prog in mawk gawk nawk awk
2580 # Extract the first word of "$ac_prog", so it can be a program name with args.
2581 set dummy $ac_prog; ac_word=$2
2582 echo "$as_me:2582: checking for $ac_word" >&5
2583 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2584 if test "${ac_cv_prog_AWK+set}" = set; then
2585 echo $ECHO_N "(cached) $ECHO_C" >&6
2587 if test -n "$AWK"; then
2588 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2590 ac_save_IFS=$IFS; IFS=$ac_path_separator
2592 for ac_dir in $ac_dummy; do
2594 test -z "$ac_dir" && ac_dir=.
2595 $as_executable_p "$ac_dir/$ac_word" || continue
2596 ac_cv_prog_AWK="$ac_prog"
2597 echo "$as_me:2597: found $ac_dir/$ac_word" >&5
2604 if test -n "$AWK"; then
2605 echo "$as_me:2605: result: $AWK" >&5
2606 echo "${ECHO_T}$AWK" >&6
2608 echo "$as_me:2608: result: no" >&5
2609 echo "${ECHO_T}no" >&6
2612 test -n "$AWK" && break
2615 # Find a good install program. We prefer a C program (faster),
2616 # so one script is as good as another. But avoid the broken or
2617 # incompatible versions:
2618 # SysV /etc/install, /usr/sbin/install
2619 # SunOS /usr/etc/install
2620 # IRIX /sbin/install
2622 # AmigaOS /C/install, which installs bootblocks on floppy discs
2623 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2624 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2625 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2626 # ./install, which can be erroneously created by make from ./install.sh.
2627 echo "$as_me:2627: checking for a BSD compatible install" >&5
2628 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2629 if test -z "$INSTALL"; then
2630 if test "${ac_cv_path_install+set}" = set; then
2631 echo $ECHO_N "(cached) $ECHO_C" >&6
2633 ac_save_IFS=$IFS; IFS=$ac_path_separator
2634 for ac_dir in $PATH; do
2636 # Account for people who put trailing slashes in PATH elements.
2638 / | ./ | .// | /cC/* \
2639 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2642 # OSF1 and SCO ODT 3.0 have their own names for install.
2643 # Don't use installbsd from OSF since it installs stuff as root
2645 for ac_prog in ginstall scoinst install; do
2646 if $as_executable_p "$ac_dir/$ac_prog"; then
2647 if test $ac_prog = install &&
2648 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2649 # AIX install. It has an incompatible calling convention.
2651 elif test $ac_prog = install &&
2652 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2653 # program-specific install script used by HP pwplus--don't use.
2656 ac_cv_path_install="$ac_dir/$ac_prog -c"
2666 if test "${ac_cv_path_install+set}" = set; then
2667 INSTALL=$ac_cv_path_install
2669 # As a last resort, use the slow shell script. We don't cache a
2670 # path for INSTALL within a source directory, because that will
2671 # break other packages using the cache if that directory is
2672 # removed, or if the path is relative.
2673 INSTALL=$ac_install_sh
2676 echo "$as_me:2676: result: $INSTALL" >&5
2677 echo "${ECHO_T}$INSTALL" >&6
2679 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2680 # It thinks the first close brace ends the variable substitution.
2681 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2683 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2685 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2691 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2692 test -z "$cf_dir" && cf_dir=.
2693 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2697 echo "$as_me:2697: checking if you want to install stripped executables" >&5
2698 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2700 # Check whether --enable-stripping or --disable-stripping was given.
2701 if test "${enable_stripping+set}" = set; then
2702 enableval="$enable_stripping"
2703 test "$enableval" != no && enableval=yes
2704 if test "$enableval" != "yes" ; then
2714 echo "$as_me:2714: result: $with_stripping" >&5
2715 echo "${ECHO_T}$with_stripping" >&6
2717 if test "$with_stripping" = yes
2724 : ${INSTALL:=install}
2725 echo "$as_me:2725: checking if install accepts -p option" >&5
2726 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
2727 if test "${cf_cv_install_p+set}" = set; then
2728 echo $ECHO_N "(cached) $ECHO_C" >&6
2735 if $INSTALL -p conftest.in conftest.out 2>/dev/null
2737 if test -f conftest.out/conftest.in
2739 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
2740 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
2741 if test -s conftest.err
2756 echo "$as_me:2756: result: $cf_cv_install_p" >&5
2757 echo "${ECHO_T}$cf_cv_install_p" >&6
2759 echo "$as_me:2759: checking if install needs to be told about ownership" >&5
2760 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
2761 case `$ac_config_guess` in
2770 echo "$as_me:2770: result: $with_install_o" >&5
2771 echo "${ECHO_T}$with_install_o" >&6
2772 if test "x$with_install_o" = xyes
2774 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'`
2779 for ac_prog in lint cppcheck splint
2781 # Extract the first word of "$ac_prog", so it can be a program name with args.
2782 set dummy $ac_prog; ac_word=$2
2783 echo "$as_me:2783: checking for $ac_word" >&5
2784 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2785 if test "${ac_cv_prog_LINT+set}" = set; then
2786 echo $ECHO_N "(cached) $ECHO_C" >&6
2788 if test -n "$LINT"; then
2789 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2791 ac_save_IFS=$IFS; IFS=$ac_path_separator
2793 for ac_dir in $ac_dummy; do
2795 test -z "$ac_dir" && ac_dir=.
2796 $as_executable_p "$ac_dir/$ac_word" || continue
2797 ac_cv_prog_LINT="$ac_prog"
2798 echo "$as_me:2798: found $ac_dir/$ac_word" >&5
2804 LINT=$ac_cv_prog_LINT
2805 if test -n "$LINT"; then
2806 echo "$as_me:2806: result: $LINT" >&5
2807 echo "${ECHO_T}$LINT" >&6
2809 echo "$as_me:2809: result: no" >&5
2810 echo "${ECHO_T}no" >&6
2813 test -n "$LINT" && break
2817 (xcppcheck|x*/cppcheck)
2818 test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
2822 echo "$as_me:2822: checking if filesystem supports mixed-case filenames" >&5
2823 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2824 if test "${cf_cv_mixedcase+set}" = set; then
2825 echo $ECHO_N "(cached) $ECHO_C" >&6
2828 if test "$cross_compiling" = yes ; then
2829 case $target_alias in
2830 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2838 rm -f conftest CONFTEST
2840 if test -f CONFTEST ; then
2845 rm -f conftest CONFTEST
2849 echo "$as_me:2849: result: $cf_cv_mixedcase" >&5
2850 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2851 test "$cf_cv_mixedcase" = yes &&
2852 cat >>confdefs.h <<\EOF
2853 #define MIXEDCASE_FILENAMES 1
2856 for ac_prog in exctags ctags
2858 # Extract the first word of "$ac_prog", so it can be a program name with args.
2859 set dummy $ac_prog; ac_word=$2
2860 echo "$as_me:2860: checking for $ac_word" >&5
2861 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2862 if test "${ac_cv_prog_CTAGS+set}" = set; then
2863 echo $ECHO_N "(cached) $ECHO_C" >&6
2865 if test -n "$CTAGS"; then
2866 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2868 ac_save_IFS=$IFS; IFS=$ac_path_separator
2870 for ac_dir in $ac_dummy; do
2872 test -z "$ac_dir" && ac_dir=.
2873 $as_executable_p "$ac_dir/$ac_word" || continue
2874 ac_cv_prog_CTAGS="$ac_prog"
2875 echo "$as_me:2875: found $ac_dir/$ac_word" >&5
2881 CTAGS=$ac_cv_prog_CTAGS
2882 if test -n "$CTAGS"; then
2883 echo "$as_me:2883: result: $CTAGS" >&5
2884 echo "${ECHO_T}$CTAGS" >&6
2886 echo "$as_me:2886: result: no" >&5
2887 echo "${ECHO_T}no" >&6
2890 test -n "$CTAGS" && break
2893 for ac_prog in exetags etags
2895 # Extract the first word of "$ac_prog", so it can be a program name with args.
2896 set dummy $ac_prog; ac_word=$2
2897 echo "$as_me:2897: checking for $ac_word" >&5
2898 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2899 if test "${ac_cv_prog_ETAGS+set}" = set; then
2900 echo $ECHO_N "(cached) $ECHO_C" >&6
2902 if test -n "$ETAGS"; then
2903 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2905 ac_save_IFS=$IFS; IFS=$ac_path_separator
2907 for ac_dir in $ac_dummy; do
2909 test -z "$ac_dir" && ac_dir=.
2910 $as_executable_p "$ac_dir/$ac_word" || continue
2911 ac_cv_prog_ETAGS="$ac_prog"
2912 echo "$as_me:2912: found $ac_dir/$ac_word" >&5
2918 ETAGS=$ac_cv_prog_ETAGS
2919 if test -n "$ETAGS"; then
2920 echo "$as_me:2920: result: $ETAGS" >&5
2921 echo "${ECHO_T}$ETAGS" >&6
2923 echo "$as_me:2923: result: no" >&5
2924 echo "${ECHO_T}no" >&6
2927 test -n "$ETAGS" && break
2930 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2931 set dummy ${CTAGS:-ctags}; ac_word=$2
2932 echo "$as_me:2932: checking for $ac_word" >&5
2933 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2934 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2935 echo $ECHO_N "(cached) $ECHO_C" >&6
2937 if test -n "$MAKE_LOWER_TAGS"; then
2938 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2940 ac_save_IFS=$IFS; IFS=$ac_path_separator
2942 for ac_dir in $ac_dummy; do
2944 test -z "$ac_dir" && ac_dir=.
2945 $as_executable_p "$ac_dir/$ac_word" || continue
2946 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2947 echo "$as_me:2947: found $ac_dir/$ac_word" >&5
2951 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2954 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2955 if test -n "$MAKE_LOWER_TAGS"; then
2956 echo "$as_me:2956: result: $MAKE_LOWER_TAGS" >&5
2957 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2959 echo "$as_me:2959: result: no" >&5
2960 echo "${ECHO_T}no" >&6
2963 if test "$cf_cv_mixedcase" = yes ; then
2964 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2965 set dummy ${ETAGS:-etags}; ac_word=$2
2966 echo "$as_me:2966: checking for $ac_word" >&5
2967 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2968 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2969 echo $ECHO_N "(cached) $ECHO_C" >&6
2971 if test -n "$MAKE_UPPER_TAGS"; then
2972 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2974 ac_save_IFS=$IFS; IFS=$ac_path_separator
2976 for ac_dir in $ac_dummy; do
2978 test -z "$ac_dir" && ac_dir=.
2979 $as_executable_p "$ac_dir/$ac_word" || continue
2980 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2981 echo "$as_me:2981: found $ac_dir/$ac_word" >&5
2985 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2988 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2989 if test -n "$MAKE_UPPER_TAGS"; then
2990 echo "$as_me:2990: result: $MAKE_UPPER_TAGS" >&5
2991 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2993 echo "$as_me:2993: result: no" >&5
2994 echo "${ECHO_T}no" >&6
3001 if test "$MAKE_UPPER_TAGS" = yes ; then
3007 if test "$MAKE_LOWER_TAGS" = yes ; then
3013 echo "$as_me:3013: checking if -lm needed for math functions" >&5
3014 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
3015 if test "${cf_cv_need_libm+set}" = set; then
3016 echo $ECHO_N "(cached) $ECHO_C" >&6
3019 cat >conftest.$ac_ext <<_ACEOF
3020 #line 3020 "configure"
3021 #include "confdefs.h"
3030 double x = rand(); printf("result = %g\n", pow(sin(x),x))
3035 rm -f conftest.$ac_objext conftest$ac_exeext
3036 if { (eval echo "$as_me:3036: \"$ac_link\"") >&5
3037 (eval $ac_link) 2>&5
3039 echo "$as_me:3039: \$? = $ac_status" >&5
3040 (exit $ac_status); } &&
3041 { ac_try='test -s conftest$ac_exeext'
3042 { (eval echo "$as_me:3042: \"$ac_try\"") >&5
3045 echo "$as_me:3045: \$? = $ac_status" >&5
3046 (exit $ac_status); }; }; then
3049 echo "$as_me: failed program was:" >&5
3050 cat conftest.$ac_ext >&5
3053 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3055 echo "$as_me:3055: result: $cf_cv_need_libm" >&5
3056 echo "${ECHO_T}$cf_cv_need_libm" >&6
3057 if test "$cf_cv_need_libm" = yes
3065 CC_SHARED_OPTS=unknown
3066 CPPFLAGS="$CPPFLAGS"
3068 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
3069 DFT_UPR_MODEL="NORMAL"
3082 PACKAGE="ncurses-examples"
3088 TINFO_LIBS='$(LIBS_CURSES)'
3089 cf_cv_abi_version=""
3090 cf_cv_rel_version=""
3096 if test "$GCC" = yes
3098 cat > conftest.i <<EOF
3100 #define GCC_PRINTF 0
3105 #ifndef GCC_NORETURN
3106 #define GCC_NORETURN /* nothing */
3109 #define GCC_UNUSED /* nothing */
3112 if test "$GCC" = yes
3114 { echo "$as_me:3114: checking for $CC __attribute__ directives..." >&5
3115 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
3116 cat > conftest.$ac_ext <<EOF
3117 #line 3117 "${as_me:-configure}"
3118 #include "confdefs.h"
3119 #include "conftest.h"
3120 #include "conftest.i"
3122 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3124 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
3127 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
3129 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
3131 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
3132 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
3133 extern void foo(void) GCC_NORETURN;
3134 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
3136 cf_printf_attribute=no
3137 cf_scanf_attribute=no
3138 for cf_attribute in scanf printf unused noreturn
3141 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3143 cf_directive="__attribute__(($cf_attribute))"
3144 echo "checking for $CC $cf_directive" 1>&5
3146 case $cf_attribute in
3148 cf_printf_attribute=yes
3149 cat >conftest.h <<EOF
3150 #define GCC_$cf_ATTRIBUTE 1
3154 cf_scanf_attribute=yes
3155 cat >conftest.h <<EOF
3156 #define GCC_$cf_ATTRIBUTE 1
3160 cat >conftest.h <<EOF
3161 #define GCC_$cf_ATTRIBUTE $cf_directive
3166 if { (eval echo "$as_me:3166: \"$ac_compile\"") >&5
3167 (eval $ac_compile) 2>&5
3169 echo "$as_me:3169: \$? = $ac_status" >&5
3170 (exit $ac_status); }; then
3171 test -n "$verbose" && echo "$as_me:3171: result: ... $cf_attribute" >&5
3172 echo "${ECHO_T}... $cf_attribute" >&6
3173 cat conftest.h >>confdefs.h
3174 case $cf_attribute in
3177 cat >>confdefs.h <<EOF
3178 #define GCC_NORETURN $cf_directive
3183 cf_value='/* nothing */'
3184 if test "$cf_printf_attribute" != no ; then
3185 cf_value='__attribute__((format(printf,fmt,var)))'
3187 cat >>confdefs.h <<\EOF
3188 #define GCC_PRINTF 1
3193 cat >>confdefs.h <<EOF
3194 #define GCC_PRINTFLIKE(fmt,var) $cf_value
3199 cf_value='/* nothing */'
3200 if test "$cf_scanf_attribute" != no ; then
3201 cf_value='__attribute__((format(scanf,fmt,var)))'
3203 cat >>confdefs.h <<\EOF
3209 cat >>confdefs.h <<EOF
3210 #define GCC_SCANFLIKE(fmt,var) $cf_value
3216 cat >>confdefs.h <<EOF
3217 #define GCC_UNUSED $cf_directive
3225 fgrep define conftest.i >>confdefs.h
3230 echo "$as_me:3230: checking if you want to work around bogus compiler/loader warnings" >&5
3231 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
3233 # Check whether --enable-string-hacks or --disable-string-hacks was given.
3234 if test "${enable_string_hacks+set}" = set; then
3235 enableval="$enable_string_hacks"
3236 with_string_hacks=$enableval
3238 with_string_hacks=no
3240 echo "$as_me:3240: result: $with_string_hacks" >&5
3241 echo "${ECHO_T}$with_string_hacks" >&6
3243 if test "x$with_string_hacks" = "xyes"; then
3245 cat >>confdefs.h <<\EOF
3246 #define USE_STRING_HACKS 1
3249 { echo "$as_me:3249: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
3250 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
3251 echo "$as_me:3251: checking for strlcat" >&5
3252 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
3253 if test "${ac_cv_func_strlcat+set}" = set; then
3254 echo $ECHO_N "(cached) $ECHO_C" >&6
3256 cat >conftest.$ac_ext <<_ACEOF
3257 #line 3257 "configure"
3258 #include "confdefs.h"
3259 #define strlcat autoconf_temporary
3260 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3267 /* We use char because int might match the return type of a gcc2
3268 builtin and then its argument prototype would still apply. */
3269 char strlcat (void);
3275 /* The GNU C library defines stubs for functions which it implements
3276 to always fail with ENOSYS. Some functions are actually named
3277 something starting with __ and the normal name is an alias. */
3278 #if defined (__stub_strlcat) || defined (__stub___strlcat)
3279 #error found stub for strlcat
3287 rm -f conftest.$ac_objext conftest$ac_exeext
3288 if { (eval echo "$as_me:3288: \"$ac_link\"") >&5
3289 (eval $ac_link) 2>&5
3291 echo "$as_me:3291: \$? = $ac_status" >&5
3292 (exit $ac_status); } &&
3293 { ac_try='test -s conftest$ac_exeext'
3294 { (eval echo "$as_me:3294: \"$ac_try\"") >&5
3297 echo "$as_me:3297: \$? = $ac_status" >&5
3298 (exit $ac_status); }; }; then
3299 ac_cv_func_strlcat=yes
3301 echo "$as_me: failed program was:" >&5
3302 cat conftest.$ac_ext >&5
3303 ac_cv_func_strlcat=no
3305 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3307 echo "$as_me:3307: result: $ac_cv_func_strlcat" >&5
3308 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
3309 if test $ac_cv_func_strlcat = yes; then
3311 cat >>confdefs.h <<\EOF
3312 #define HAVE_STRLCAT 1
3317 echo "$as_me:3317: checking for strlcat in -lbsd" >&5
3318 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
3319 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
3320 echo $ECHO_N "(cached) $ECHO_C" >&6
3322 ac_check_lib_save_LIBS=$LIBS
3324 cat >conftest.$ac_ext <<_ACEOF
3325 #line 3325 "configure"
3326 #include "confdefs.h"
3328 /* Override any gcc2 internal prototype to avoid an error. */
3332 /* We use char because int might match the return type of a gcc2
3333 builtin and then its argument prototype would still apply. */
3343 rm -f conftest.$ac_objext conftest$ac_exeext
3344 if { (eval echo "$as_me:3344: \"$ac_link\"") >&5
3345 (eval $ac_link) 2>&5
3347 echo "$as_me:3347: \$? = $ac_status" >&5
3348 (exit $ac_status); } &&
3349 { ac_try='test -s conftest$ac_exeext'
3350 { (eval echo "$as_me:3350: \"$ac_try\"") >&5
3353 echo "$as_me:3353: \$? = $ac_status" >&5
3354 (exit $ac_status); }; }; then
3355 ac_cv_lib_bsd_strlcat=yes
3357 echo "$as_me: failed program was:" >&5
3358 cat conftest.$ac_ext >&5
3359 ac_cv_lib_bsd_strlcat=no
3361 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3362 LIBS=$ac_check_lib_save_LIBS
3364 echo "$as_me:3364: result: $ac_cv_lib_bsd_strlcat" >&5
3365 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
3366 if test $ac_cv_lib_bsd_strlcat = yes; then
3371 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
3373 for cf_add_1lib in $cf_add_0lib; do
3374 for cf_add_2lib in $cf_add_libs; do
3375 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
3380 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
3384 for ac_header in bsd/string.h
3386 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3387 echo "$as_me:3387: checking for $ac_header" >&5
3388 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3389 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3390 echo $ECHO_N "(cached) $ECHO_C" >&6
3392 cat >conftest.$ac_ext <<_ACEOF
3393 #line 3393 "configure"
3394 #include "confdefs.h"
3395 #include <$ac_header>
3397 if { (eval echo "$as_me:3397: \"$ac_cpp conftest.$ac_ext\"") >&5
3398 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3400 egrep -v '^ *\+' conftest.er1 >conftest.err
3402 cat conftest.err >&5
3403 echo "$as_me:3403: \$? = $ac_status" >&5
3404 (exit $ac_status); } >/dev/null; then
3405 if test -s conftest.err; then
3406 ac_cpp_err=$ac_c_preproc_warn_flag
3413 if test -z "$ac_cpp_err"; then
3414 eval "$as_ac_Header=yes"
3416 echo "$as_me: failed program was:" >&5
3417 cat conftest.$ac_ext >&5
3418 eval "$as_ac_Header=no"
3420 rm -f conftest.err conftest.$ac_ext
3422 echo "$as_me:3422: result: `eval echo '${'$as_ac_Header'}'`" >&5
3423 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3424 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3425 cat >>confdefs.h <<EOF
3426 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3432 cat >>confdefs.h <<\EOF
3433 #define HAVE_STRLCAT 1
3440 for ac_func in strlcpy snprintf
3442 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3443 echo "$as_me:3443: checking for $ac_func" >&5
3444 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3445 if eval "test \"\${$as_ac_var+set}\" = set"; then
3446 echo $ECHO_N "(cached) $ECHO_C" >&6
3448 cat >conftest.$ac_ext <<_ACEOF
3449 #line 3449 "configure"
3450 #include "confdefs.h"
3451 #define $ac_func autoconf_temporary
3452 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3459 /* We use char because int might match the return type of a gcc2
3460 builtin and then its argument prototype would still apply. */
3461 char $ac_func (void);
3467 /* The GNU C library defines stubs for functions which it implements
3468 to always fail with ENOSYS. Some functions are actually named
3469 something starting with __ and the normal name is an alias. */
3470 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3471 #error found stub for $ac_func
3479 rm -f conftest.$ac_objext conftest$ac_exeext
3480 if { (eval echo "$as_me:3480: \"$ac_link\"") >&5
3481 (eval $ac_link) 2>&5
3483 echo "$as_me:3483: \$? = $ac_status" >&5
3484 (exit $ac_status); } &&
3485 { ac_try='test -s conftest$ac_exeext'
3486 { (eval echo "$as_me:3486: \"$ac_try\"") >&5
3489 echo "$as_me:3489: \$? = $ac_status" >&5
3490 (exit $ac_status); }; }; then
3491 eval "$as_ac_var=yes"
3493 echo "$as_me: failed program was:" >&5
3494 cat conftest.$ac_ext >&5
3495 eval "$as_ac_var=no"
3497 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3499 echo "$as_me:3499: result: `eval echo '${'$as_ac_var'}'`" >&5
3500 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
3501 if test `eval echo '${'$as_ac_var'}'` = yes; then
3502 cat >>confdefs.h <<EOF
3503 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3511 echo "$as_me:3511: checking if the POSIX test-macros are already defined" >&5
3512 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
3513 if test "${cf_cv_posix_visible+set}" = set; then
3514 echo $ECHO_N "(cached) $ECHO_C" >&6
3517 cat >conftest.$ac_ext <<_ACEOF
3518 #line 3518 "configure"
3519 #include "confdefs.h"
3525 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
3526 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
3527 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
3528 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
3529 #error conflicting symbols found
3536 rm -f conftest.$ac_objext
3537 if { (eval echo "$as_me:3537: \"$ac_compile\"") >&5
3538 (eval $ac_compile) 2>&5
3540 echo "$as_me:3540: \$? = $ac_status" >&5
3541 (exit $ac_status); } &&
3542 { ac_try='test -s conftest.$ac_objext'
3543 { (eval echo "$as_me:3543: \"$ac_try\"") >&5
3546 echo "$as_me:3546: \$? = $ac_status" >&5
3547 (exit $ac_status); }; }; then
3548 cf_cv_posix_visible=no
3550 echo "$as_me: failed program was:" >&5
3551 cat conftest.$ac_ext >&5
3552 cf_cv_posix_visible=yes
3554 rm -f conftest.$ac_objext conftest.$ac_ext
3557 echo "$as_me:3557: result: $cf_cv_posix_visible" >&5
3558 echo "${ECHO_T}$cf_cv_posix_visible" >&6
3560 if test "$cf_cv_posix_visible" = no; then
3563 cf_POSIX_C_SOURCE=199506L
3568 cf_xopen_source="-D_ALL_SOURCE"
3574 cf_xopen_source="-D_APPLE_C_SOURCE"
3577 cf_xopen_source="-D_DARWIN_C_SOURCE"
3580 (freebsd*|dragonfly*|midnightbsd*)
3581 # 5.x headers associate
3582 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3583 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3584 cf_POSIX_C_SOURCE=200112L
3586 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3589 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3592 cf_xopen_source="-D_HPUX_SOURCE"
3595 cf_xopen_source="-D_SGI_SOURCE"
3598 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3600 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3602 echo "$as_me:3602: checking if this is the GNU C library" >&5
3603 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3604 if test "${cf_cv_gnu_library+set}" = set; then
3605 echo $ECHO_N "(cached) $ECHO_C" >&6
3608 cat >conftest.$ac_ext <<_ACEOF
3609 #line 3609 "configure"
3610 #include "confdefs.h"
3611 #include <sys/types.h>
3616 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3618 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
3621 # error not GNU C library
3627 rm -f conftest.$ac_objext
3628 if { (eval echo "$as_me:3628: \"$ac_compile\"") >&5
3629 (eval $ac_compile) 2>&5
3631 echo "$as_me:3631: \$? = $ac_status" >&5
3632 (exit $ac_status); } &&
3633 { ac_try='test -s conftest.$ac_objext'
3634 { (eval echo "$as_me:3634: \"$ac_try\"") >&5
3637 echo "$as_me:3637: \$? = $ac_status" >&5
3638 (exit $ac_status); }; }; then
3639 cf_cv_gnu_library=yes
3641 echo "$as_me: failed program was:" >&5
3642 cat conftest.$ac_ext >&5
3643 cf_cv_gnu_library=no
3645 rm -f conftest.$ac_objext conftest.$ac_ext
3648 echo "$as_me:3648: result: $cf_cv_gnu_library" >&5
3649 echo "${ECHO_T}$cf_cv_gnu_library" >&6
3651 if test x$cf_cv_gnu_library = xyes; then
3653 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3654 # was changed to help a little. newlib incorporated the change about 4
3656 echo "$as_me:3656: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3657 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3658 if test "${cf_cv_gnu_library_219+set}" = set; then
3659 echo $ECHO_N "(cached) $ECHO_C" >&6
3664 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3665 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3667 cat >conftest.$ac_ext <<_ACEOF
3668 #line 3668 "configure"
3669 #include "confdefs.h"
3670 #include <sys/types.h>
3675 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
3677 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
3680 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
3686 rm -f conftest.$ac_objext
3687 if { (eval echo "$as_me:3687: \"$ac_compile\"") >&5
3688 (eval $ac_compile) 2>&5
3690 echo "$as_me:3690: \$? = $ac_status" >&5
3691 (exit $ac_status); } &&
3692 { ac_try='test -s conftest.$ac_objext'
3693 { (eval echo "$as_me:3693: \"$ac_try\"") >&5
3696 echo "$as_me:3696: \$? = $ac_status" >&5
3697 (exit $ac_status); }; }; then
3698 cf_cv_gnu_library_219=yes
3700 echo "$as_me: failed program was:" >&5
3701 cat conftest.$ac_ext >&5
3702 cf_cv_gnu_library_219=no
3704 rm -f conftest.$ac_objext conftest.$ac_ext
3708 echo "$as_me:3708: result: $cf_cv_gnu_library_219" >&5
3709 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
3711 if test "x$cf_cv_gnu_library_219" = xyes; then
3713 echo "$as_me:3713: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
3714 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
3715 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
3716 echo $ECHO_N "(cached) $ECHO_C" >&6
3722 cf_new_extra_cppflags=
3724 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
3726 case $cf_fix_cppflags in
3728 case $cf_add_cflags in
3729 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3730 case $cf_add_cflags in
3732 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3734 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3735 && test -z "${cf_tst_cflags}" \
3736 && cf_fix_cppflags=yes
3738 if test $cf_fix_cppflags = yes ; then
3740 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3741 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3744 elif test "${cf_tst_cflags}" = "\"'" ; then
3746 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3747 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3757 case $cf_add_cflags in
3759 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3761 CPPFLAGS=`echo "$CPPFLAGS" | \
3762 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3763 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3768 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3769 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3776 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3777 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3784 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3785 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3787 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3789 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3790 && test -z "${cf_tst_cflags}" \
3791 && cf_fix_cppflags=no
3796 if test -n "$cf_new_cflags" ; then
3798 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3799 CFLAGS="${CFLAGS}$cf_new_cflags"
3803 if test -n "$cf_new_cppflags" ; then
3805 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3806 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3810 if test -n "$cf_new_extra_cppflags" ; then
3812 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3813 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3817 cat >conftest.$ac_ext <<_ACEOF
3818 #line 3818 "configure"
3819 #include "confdefs.h"
3822 #include <sys/types.h>
3828 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
3831 # error GNU C library is too old
3837 rm -f conftest.$ac_objext
3838 if { (eval echo "$as_me:3838: \"$ac_compile\"") >&5
3839 (eval $ac_compile) 2>&5
3841 echo "$as_me:3841: \$? = $ac_status" >&5
3842 (exit $ac_status); } &&
3843 { ac_try='test -s conftest.$ac_objext'
3844 { (eval echo "$as_me:3844: \"$ac_try\"") >&5
3847 echo "$as_me:3847: \$? = $ac_status" >&5
3848 (exit $ac_status); }; }; then
3849 cf_cv_gnu_dftsrc_219=yes
3851 echo "$as_me: failed program was:" >&5
3852 cat conftest.$ac_ext >&5
3853 cf_cv_gnu_dftsrc_219=no
3855 rm -f conftest.$ac_objext conftest.$ac_ext
3858 echo "$as_me:3858: result: $cf_cv_gnu_dftsrc_219" >&5
3859 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
3860 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
3862 cf_cv_gnu_dftsrc_219=maybe
3865 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
3867 echo "$as_me:3867: checking if we must define _GNU_SOURCE" >&5
3868 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3869 if test "${cf_cv_gnu_source+set}" = set; then
3870 echo $ECHO_N "(cached) $ECHO_C" >&6
3873 cat >conftest.$ac_ext <<_ACEOF
3874 #line 3874 "configure"
3875 #include "confdefs.h"
3876 #include <sys/types.h>
3881 #ifndef _XOPEN_SOURCE
3882 #error expected _XOPEN_SOURCE to be defined
3888 rm -f conftest.$ac_objext
3889 if { (eval echo "$as_me:3889: \"$ac_compile\"") >&5
3890 (eval $ac_compile) 2>&5
3892 echo "$as_me:3892: \$? = $ac_status" >&5
3893 (exit $ac_status); } &&
3894 { ac_try='test -s conftest.$ac_objext'
3895 { (eval echo "$as_me:3895: \"$ac_try\"") >&5
3898 echo "$as_me:3898: \$? = $ac_status" >&5
3899 (exit $ac_status); }; }; then
3902 echo "$as_me: failed program was:" >&5
3903 cat conftest.$ac_ext >&5
3909 cf_new_extra_cppflags=
3911 for cf_add_cflags in -D_GNU_SOURCE
3913 case $cf_fix_cppflags in
3915 case $cf_add_cflags in
3916 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3917 case $cf_add_cflags in
3919 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3921 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3922 && test -z "${cf_tst_cflags}" \
3923 && cf_fix_cppflags=yes
3925 if test $cf_fix_cppflags = yes ; then
3927 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3928 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3931 elif test "${cf_tst_cflags}" = "\"'" ; then
3933 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3934 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3944 case $cf_add_cflags in
3946 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3948 CPPFLAGS=`echo "$CPPFLAGS" | \
3949 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3950 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3955 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3956 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3963 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3964 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3971 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3972 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3974 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3976 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3977 && test -z "${cf_tst_cflags}" \
3978 && cf_fix_cppflags=no
3983 if test -n "$cf_new_cflags" ; then
3985 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3986 CFLAGS="${CFLAGS}$cf_new_cflags"
3990 if test -n "$cf_new_cppflags" ; then
3992 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3993 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3997 if test -n "$cf_new_extra_cppflags" ; then
3999 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4000 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4004 cat >conftest.$ac_ext <<_ACEOF
4005 #line 4005 "configure"
4006 #include "confdefs.h"
4007 #include <sys/types.h>
4012 #ifdef _XOPEN_SOURCE
4013 #error expected _XOPEN_SOURCE to be undefined
4019 rm -f conftest.$ac_objext
4020 if { (eval echo "$as_me:4020: \"$ac_compile\"") >&5
4021 (eval $ac_compile) 2>&5
4023 echo "$as_me:4023: \$? = $ac_status" >&5
4024 (exit $ac_status); } &&
4025 { ac_try='test -s conftest.$ac_objext'
4026 { (eval echo "$as_me:4026: \"$ac_try\"") >&5
4029 echo "$as_me:4029: \$? = $ac_status" >&5
4030 (exit $ac_status); }; }; then
4033 echo "$as_me: failed program was:" >&5
4034 cat conftest.$ac_ext >&5
4035 cf_cv_gnu_source=yes
4037 rm -f conftest.$ac_objext conftest.$ac_ext
4041 rm -f conftest.$ac_objext conftest.$ac_ext
4044 echo "$as_me:4044: result: $cf_cv_gnu_source" >&5
4045 echo "${ECHO_T}$cf_cv_gnu_source" >&6
4047 if test "$cf_cv_gnu_source" = yes
4049 echo "$as_me:4049: checking if we should also define _DEFAULT_SOURCE" >&5
4050 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
4051 if test "${cf_cv_default_source+set}" = set; then
4052 echo $ECHO_N "(cached) $ECHO_C" >&6
4055 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4056 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
4058 cat >conftest.$ac_ext <<_ACEOF
4059 #line 4059 "configure"
4060 #include "confdefs.h"
4061 #include <sys/types.h>
4066 #ifdef _DEFAULT_SOURCE
4067 #error expected _DEFAULT_SOURCE to be undefined
4073 rm -f conftest.$ac_objext
4074 if { (eval echo "$as_me:4074: \"$ac_compile\"") >&5
4075 (eval $ac_compile) 2>&5
4077 echo "$as_me:4077: \$? = $ac_status" >&5
4078 (exit $ac_status); } &&
4079 { ac_try='test -s conftest.$ac_objext'
4080 { (eval echo "$as_me:4080: \"$ac_try\"") >&5
4083 echo "$as_me:4083: \$? = $ac_status" >&5
4084 (exit $ac_status); }; }; then
4085 cf_cv_default_source=no
4087 echo "$as_me: failed program was:" >&5
4088 cat conftest.$ac_ext >&5
4089 cf_cv_default_source=yes
4091 rm -f conftest.$ac_objext conftest.$ac_ext
4094 echo "$as_me:4094: result: $cf_cv_default_source" >&5
4095 echo "${ECHO_T}$cf_cv_default_source" >&6
4096 if test "$cf_cv_default_source" = yes
4099 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4100 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
4110 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
4113 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
4116 if test "$cf_cv_posix_visible" = no; then
4118 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4120 cf_save_CFLAGS="$CFLAGS"
4121 cf_save_CPPFLAGS="$CPPFLAGS"
4123 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4124 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4125 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4127 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4128 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4129 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4131 echo "$as_me:4131: checking if we should define _POSIX_C_SOURCE" >&5
4132 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4133 if test "${cf_cv_posix_c_source+set}" = set; then
4134 echo $ECHO_N "(cached) $ECHO_C" >&6
4137 echo "${as_me:-configure}:4137: testing if the symbol is already defined go no further ..." 1>&5
4139 cat >conftest.$ac_ext <<_ACEOF
4140 #line 4140 "configure"
4141 #include "confdefs.h"
4142 #include <sys/types.h>
4147 #ifndef _POSIX_C_SOURCE
4154 rm -f conftest.$ac_objext
4155 if { (eval echo "$as_me:4155: \"$ac_compile\"") >&5
4156 (eval $ac_compile) 2>&5
4158 echo "$as_me:4158: \$? = $ac_status" >&5
4159 (exit $ac_status); } &&
4160 { ac_try='test -s conftest.$ac_objext'
4161 { (eval echo "$as_me:4161: \"$ac_try\"") >&5
4164 echo "$as_me:4164: \$? = $ac_status" >&5
4165 (exit $ac_status); }; }; then
4166 cf_cv_posix_c_source=no
4168 echo "$as_me: failed program was:" >&5
4169 cat conftest.$ac_ext >&5
4170 cf_want_posix_source=no
4171 case .$cf_POSIX_C_SOURCE in
4173 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4176 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4177 cf_want_posix_source=yes
4180 cf_want_posix_source=yes
4183 if test "$cf_want_posix_source" = yes ; then
4184 cat >conftest.$ac_ext <<_ACEOF
4185 #line 4185 "configure"
4186 #include "confdefs.h"
4187 #include <sys/types.h>
4192 #ifdef _POSIX_SOURCE
4199 rm -f conftest.$ac_objext
4200 if { (eval echo "$as_me:4200: \"$ac_compile\"") >&5
4201 (eval $ac_compile) 2>&5
4203 echo "$as_me:4203: \$? = $ac_status" >&5
4204 (exit $ac_status); } &&
4205 { ac_try='test -s conftest.$ac_objext'
4206 { (eval echo "$as_me:4206: \"$ac_try\"") >&5
4209 echo "$as_me:4209: \$? = $ac_status" >&5
4210 (exit $ac_status); }; }; then
4213 echo "$as_me: failed program was:" >&5
4214 cat conftest.$ac_ext >&5
4215 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4217 rm -f conftest.$ac_objext conftest.$ac_ext
4220 echo "${as_me:-configure}:4220: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4222 CFLAGS="$cf_trim_CFLAGS"
4223 CPPFLAGS="$cf_trim_CPPFLAGS"
4225 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4226 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4228 echo "${as_me:-configure}:4228: testing if the second compile does not leave our definition intact error ..." 1>&5
4230 cat >conftest.$ac_ext <<_ACEOF
4231 #line 4231 "configure"
4232 #include "confdefs.h"
4233 #include <sys/types.h>
4238 #ifndef _POSIX_C_SOURCE
4245 rm -f conftest.$ac_objext
4246 if { (eval echo "$as_me:4246: \"$ac_compile\"") >&5
4247 (eval $ac_compile) 2>&5
4249 echo "$as_me:4249: \$? = $ac_status" >&5
4250 (exit $ac_status); } &&
4251 { ac_try='test -s conftest.$ac_objext'
4252 { (eval echo "$as_me:4252: \"$ac_try\"") >&5
4255 echo "$as_me:4255: \$? = $ac_status" >&5
4256 (exit $ac_status); }; }; then
4259 echo "$as_me: failed program was:" >&5
4260 cat conftest.$ac_ext >&5
4261 cf_cv_posix_c_source=no
4263 rm -f conftest.$ac_objext conftest.$ac_ext
4264 CFLAGS="$cf_save_CFLAGS"
4265 CPPFLAGS="$cf_save_CPPFLAGS"
4268 rm -f conftest.$ac_objext conftest.$ac_ext
4271 echo "$as_me:4271: result: $cf_cv_posix_c_source" >&5
4272 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4274 if test "$cf_cv_posix_c_source" != no ; then
4275 CFLAGS="$cf_trim_CFLAGS"
4276 CPPFLAGS="$cf_trim_CPPFLAGS"
4281 cf_new_extra_cppflags=
4283 for cf_add_cflags in $cf_cv_posix_c_source
4285 case $cf_fix_cppflags in
4287 case $cf_add_cflags in
4288 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4289 case $cf_add_cflags in
4291 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4293 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4294 && test -z "${cf_tst_cflags}" \
4295 && cf_fix_cppflags=yes
4297 if test $cf_fix_cppflags = yes ; then
4299 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4300 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4303 elif test "${cf_tst_cflags}" = "\"'" ; then
4305 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4306 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4316 case $cf_add_cflags in
4318 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4320 CPPFLAGS=`echo "$CPPFLAGS" | \
4321 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4322 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4327 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4328 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4335 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4336 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4343 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4344 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4346 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4348 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4349 && test -z "${cf_tst_cflags}" \
4350 && cf_fix_cppflags=no
4355 if test -n "$cf_new_cflags" ; then
4357 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4358 CFLAGS="${CFLAGS}$cf_new_cflags"
4362 if test -n "$cf_new_cppflags" ; then
4364 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4365 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4369 if test -n "$cf_new_extra_cppflags" ; then
4371 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4372 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4378 fi # cf_cv_posix_visible
4382 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4385 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
4386 cf_xopen_source="-D_BSD_SOURCE"
4390 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
4393 cf_xopen_source="-D_OSF_SOURCE"
4396 cf_xopen_source="-D_QNX_SOURCE"
4399 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
4402 cf_xopen_source="-D__EXTENSIONS__"
4403 cf_cv_xopen_source=broken
4405 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
4411 echo "$as_me:4411: checking if we should define _XOPEN_SOURCE" >&5
4412 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4413 if test "${cf_cv_xopen_source+set}" = set; then
4414 echo $ECHO_N "(cached) $ECHO_C" >&6
4417 cat >conftest.$ac_ext <<_ACEOF
4418 #line 4418 "configure"
4419 #include "confdefs.h"
4423 #include <sys/types.h>
4429 #ifndef _XOPEN_SOURCE
4436 rm -f conftest.$ac_objext
4437 if { (eval echo "$as_me:4437: \"$ac_compile\"") >&5
4438 (eval $ac_compile) 2>&5
4440 echo "$as_me:4440: \$? = $ac_status" >&5
4441 (exit $ac_status); } &&
4442 { ac_try='test -s conftest.$ac_objext'
4443 { (eval echo "$as_me:4443: \"$ac_try\"") >&5
4446 echo "$as_me:4446: \$? = $ac_status" >&5
4447 (exit $ac_status); }; }; then
4448 cf_cv_xopen_source=no
4450 echo "$as_me: failed program was:" >&5
4451 cat conftest.$ac_ext >&5
4454 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4455 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4457 cat >conftest.$ac_ext <<_ACEOF
4458 #line 4458 "configure"
4459 #include "confdefs.h"
4463 #include <sys/types.h>
4469 #ifdef _XOPEN_SOURCE
4476 rm -f conftest.$ac_objext
4477 if { (eval echo "$as_me:4477: \"$ac_compile\"") >&5
4478 (eval $ac_compile) 2>&5
4480 echo "$as_me:4480: \$? = $ac_status" >&5
4481 (exit $ac_status); } &&
4482 { ac_try='test -s conftest.$ac_objext'
4483 { (eval echo "$as_me:4483: \"$ac_try\"") >&5
4486 echo "$as_me:4486: \$? = $ac_status" >&5
4487 (exit $ac_status); }; }; then
4488 cf_cv_xopen_source=no
4490 echo "$as_me: failed program was:" >&5
4491 cat conftest.$ac_ext >&5
4492 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4494 rm -f conftest.$ac_objext conftest.$ac_ext
4498 rm -f conftest.$ac_objext conftest.$ac_ext
4501 echo "$as_me:4501: result: $cf_cv_xopen_source" >&5
4502 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4504 if test "$cf_cv_xopen_source" != no ; then
4506 CFLAGS=`echo "$CFLAGS" | \
4507 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4508 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4510 CPPFLAGS=`echo "$CPPFLAGS" | \
4511 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4512 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4514 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4519 cf_new_extra_cppflags=
4521 for cf_add_cflags in $cf_temp_xopen_source
4523 case $cf_fix_cppflags in
4525 case $cf_add_cflags in
4526 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4527 case $cf_add_cflags in
4529 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4531 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4532 && test -z "${cf_tst_cflags}" \
4533 && cf_fix_cppflags=yes
4535 if test $cf_fix_cppflags = yes ; then
4537 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4538 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4541 elif test "${cf_tst_cflags}" = "\"'" ; then
4543 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4544 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4554 case $cf_add_cflags in
4556 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4558 CPPFLAGS=`echo "$CPPFLAGS" | \
4559 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4560 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4565 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4566 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4573 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4574 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4581 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4582 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4584 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4586 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4587 && test -z "${cf_tst_cflags}" \
4588 && cf_fix_cppflags=no
4593 if test -n "$cf_new_cflags" ; then
4595 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4596 CFLAGS="${CFLAGS}$cf_new_cflags"
4600 if test -n "$cf_new_cppflags" ; then
4602 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4603 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4607 if test -n "$cf_new_extra_cppflags" ; then
4609 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4610 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4616 if test "$cf_cv_posix_visible" = no; then
4618 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4620 cf_save_CFLAGS="$CFLAGS"
4621 cf_save_CPPFLAGS="$CPPFLAGS"
4623 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4624 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4625 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4627 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4628 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4629 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4631 echo "$as_me:4631: checking if we should define _POSIX_C_SOURCE" >&5
4632 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4633 if test "${cf_cv_posix_c_source+set}" = set; then
4634 echo $ECHO_N "(cached) $ECHO_C" >&6
4637 echo "${as_me:-configure}:4637: testing if the symbol is already defined go no further ..." 1>&5
4639 cat >conftest.$ac_ext <<_ACEOF
4640 #line 4640 "configure"
4641 #include "confdefs.h"
4642 #include <sys/types.h>
4647 #ifndef _POSIX_C_SOURCE
4654 rm -f conftest.$ac_objext
4655 if { (eval echo "$as_me:4655: \"$ac_compile\"") >&5
4656 (eval $ac_compile) 2>&5
4658 echo "$as_me:4658: \$? = $ac_status" >&5
4659 (exit $ac_status); } &&
4660 { ac_try='test -s conftest.$ac_objext'
4661 { (eval echo "$as_me:4661: \"$ac_try\"") >&5
4664 echo "$as_me:4664: \$? = $ac_status" >&5
4665 (exit $ac_status); }; }; then
4666 cf_cv_posix_c_source=no
4668 echo "$as_me: failed program was:" >&5
4669 cat conftest.$ac_ext >&5
4670 cf_want_posix_source=no
4671 case .$cf_POSIX_C_SOURCE in
4673 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4676 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4677 cf_want_posix_source=yes
4680 cf_want_posix_source=yes
4683 if test "$cf_want_posix_source" = yes ; then
4684 cat >conftest.$ac_ext <<_ACEOF
4685 #line 4685 "configure"
4686 #include "confdefs.h"
4687 #include <sys/types.h>
4692 #ifdef _POSIX_SOURCE
4699 rm -f conftest.$ac_objext
4700 if { (eval echo "$as_me:4700: \"$ac_compile\"") >&5
4701 (eval $ac_compile) 2>&5
4703 echo "$as_me:4703: \$? = $ac_status" >&5
4704 (exit $ac_status); } &&
4705 { ac_try='test -s conftest.$ac_objext'
4706 { (eval echo "$as_me:4706: \"$ac_try\"") >&5
4709 echo "$as_me:4709: \$? = $ac_status" >&5
4710 (exit $ac_status); }; }; then
4713 echo "$as_me: failed program was:" >&5
4714 cat conftest.$ac_ext >&5
4715 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4717 rm -f conftest.$ac_objext conftest.$ac_ext
4720 echo "${as_me:-configure}:4720: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4722 CFLAGS="$cf_trim_CFLAGS"
4723 CPPFLAGS="$cf_trim_CPPFLAGS"
4725 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4726 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4728 echo "${as_me:-configure}:4728: testing if the second compile does not leave our definition intact error ..." 1>&5
4730 cat >conftest.$ac_ext <<_ACEOF
4731 #line 4731 "configure"
4732 #include "confdefs.h"
4733 #include <sys/types.h>
4738 #ifndef _POSIX_C_SOURCE
4745 rm -f conftest.$ac_objext
4746 if { (eval echo "$as_me:4746: \"$ac_compile\"") >&5
4747 (eval $ac_compile) 2>&5
4749 echo "$as_me:4749: \$? = $ac_status" >&5
4750 (exit $ac_status); } &&
4751 { ac_try='test -s conftest.$ac_objext'
4752 { (eval echo "$as_me:4752: \"$ac_try\"") >&5
4755 echo "$as_me:4755: \$? = $ac_status" >&5
4756 (exit $ac_status); }; }; then
4759 echo "$as_me: failed program was:" >&5
4760 cat conftest.$ac_ext >&5
4761 cf_cv_posix_c_source=no
4763 rm -f conftest.$ac_objext conftest.$ac_ext
4764 CFLAGS="$cf_save_CFLAGS"
4765 CPPFLAGS="$cf_save_CPPFLAGS"
4768 rm -f conftest.$ac_objext conftest.$ac_ext
4771 echo "$as_me:4771: result: $cf_cv_posix_c_source" >&5
4772 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4774 if test "$cf_cv_posix_c_source" != no ; then
4775 CFLAGS="$cf_trim_CFLAGS"
4776 CPPFLAGS="$cf_trim_CPPFLAGS"
4781 cf_new_extra_cppflags=
4783 for cf_add_cflags in $cf_cv_posix_c_source
4785 case $cf_fix_cppflags in
4787 case $cf_add_cflags in
4788 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4789 case $cf_add_cflags in
4791 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4793 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4794 && test -z "${cf_tst_cflags}" \
4795 && cf_fix_cppflags=yes
4797 if test $cf_fix_cppflags = yes ; then
4799 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4800 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4803 elif test "${cf_tst_cflags}" = "\"'" ; then
4805 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4806 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4816 case $cf_add_cflags in
4818 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4820 CPPFLAGS=`echo "$CPPFLAGS" | \
4821 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4822 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4827 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4828 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4835 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4836 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4843 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4844 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4846 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4848 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4849 && test -z "${cf_tst_cflags}" \
4850 && cf_fix_cppflags=no
4855 if test -n "$cf_new_cflags" ; then
4857 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4858 CFLAGS="${CFLAGS}$cf_new_cflags"
4862 if test -n "$cf_new_cppflags" ; then
4864 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4865 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4869 if test -n "$cf_new_extra_cppflags" ; then
4871 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4872 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4878 fi # cf_cv_posix_visible
4883 if test -n "$cf_xopen_source" ; then
4888 cf_new_extra_cppflags=
4890 for cf_add_cflags in $cf_xopen_source
4892 case $cf_fix_cppflags in
4894 case $cf_add_cflags in
4895 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4896 case $cf_add_cflags in
4898 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4900 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4901 && test -z "${cf_tst_cflags}" \
4902 && cf_fix_cppflags=yes
4904 if test $cf_fix_cppflags = yes ; then
4906 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4907 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4910 elif test "${cf_tst_cflags}" = "\"'" ; then
4912 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4913 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4923 case $cf_add_cflags in
4925 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4927 CPPFLAGS=`echo "$CPPFLAGS" | \
4928 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4929 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4934 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4935 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4942 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4943 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4950 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4951 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4953 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4955 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4956 && test -z "${cf_tst_cflags}" \
4957 && cf_fix_cppflags=no
4962 if test -n "$cf_new_cflags" ; then
4963 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
4965 echo "${as_me:-configure}:4965: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
4967 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4968 CFLAGS="${CFLAGS}$cf_new_cflags"
4972 if test -n "$cf_new_cppflags" ; then
4973 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
4975 echo "${as_me:-configure}:4975: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
4977 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4978 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4982 if test -n "$cf_new_extra_cppflags" ; then
4983 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
4985 echo "${as_me:-configure}:4985: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
4987 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4988 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4994 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
4995 echo "$as_me:4995: checking if _XOPEN_SOURCE really is set" >&5
4996 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
4997 cat >conftest.$ac_ext <<_ACEOF
4998 #line 4998 "configure"
4999 #include "confdefs.h"
5005 #ifndef _XOPEN_SOURCE
5012 rm -f conftest.$ac_objext
5013 if { (eval echo "$as_me:5013: \"$ac_compile\"") >&5
5014 (eval $ac_compile) 2>&5
5016 echo "$as_me:5016: \$? = $ac_status" >&5
5017 (exit $ac_status); } &&
5018 { ac_try='test -s conftest.$ac_objext'
5019 { (eval echo "$as_me:5019: \"$ac_try\"") >&5
5022 echo "$as_me:5022: \$? = $ac_status" >&5
5023 (exit $ac_status); }; }; then
5024 cf_XOPEN_SOURCE_set=yes
5026 echo "$as_me: failed program was:" >&5
5027 cat conftest.$ac_ext >&5
5028 cf_XOPEN_SOURCE_set=no
5030 rm -f conftest.$ac_objext conftest.$ac_ext
5031 echo "$as_me:5031: result: $cf_XOPEN_SOURCE_set" >&5
5032 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
5033 if test $cf_XOPEN_SOURCE_set = yes
5035 cat >conftest.$ac_ext <<_ACEOF
5036 #line 5036 "configure"
5037 #include "confdefs.h"
5043 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
5050 rm -f conftest.$ac_objext
5051 if { (eval echo "$as_me:5051: \"$ac_compile\"") >&5
5052 (eval $ac_compile) 2>&5
5054 echo "$as_me:5054: \$? = $ac_status" >&5
5055 (exit $ac_status); } &&
5056 { ac_try='test -s conftest.$ac_objext'
5057 { (eval echo "$as_me:5057: \"$ac_try\"") >&5
5060 echo "$as_me:5060: \$? = $ac_status" >&5
5061 (exit $ac_status); }; }; then
5062 cf_XOPEN_SOURCE_set_ok=yes
5064 echo "$as_me: failed program was:" >&5
5065 cat conftest.$ac_ext >&5
5066 cf_XOPEN_SOURCE_set_ok=no
5068 rm -f conftest.$ac_objext conftest.$ac_ext
5069 if test $cf_XOPEN_SOURCE_set_ok = no
5071 { echo "$as_me:5071: WARNING: _XOPEN_SOURCE is lower than requested" >&5
5072 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
5076 echo "$as_me:5076: checking if we should define _XOPEN_SOURCE" >&5
5077 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
5078 if test "${cf_cv_xopen_source+set}" = set; then
5079 echo $ECHO_N "(cached) $ECHO_C" >&6
5082 cat >conftest.$ac_ext <<_ACEOF
5083 #line 5083 "configure"
5084 #include "confdefs.h"
5088 #include <sys/types.h>
5094 #ifndef _XOPEN_SOURCE
5101 rm -f conftest.$ac_objext
5102 if { (eval echo "$as_me:5102: \"$ac_compile\"") >&5
5103 (eval $ac_compile) 2>&5
5105 echo "$as_me:5105: \$? = $ac_status" >&5
5106 (exit $ac_status); } &&
5107 { ac_try='test -s conftest.$ac_objext'
5108 { (eval echo "$as_me:5108: \"$ac_try\"") >&5
5111 echo "$as_me:5111: \$? = $ac_status" >&5
5112 (exit $ac_status); }; }; then
5113 cf_cv_xopen_source=no
5115 echo "$as_me: failed program was:" >&5
5116 cat conftest.$ac_ext >&5
5119 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5120 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
5122 cat >conftest.$ac_ext <<_ACEOF
5123 #line 5123 "configure"
5124 #include "confdefs.h"
5128 #include <sys/types.h>
5134 #ifdef _XOPEN_SOURCE
5141 rm -f conftest.$ac_objext
5142 if { (eval echo "$as_me:5142: \"$ac_compile\"") >&5
5143 (eval $ac_compile) 2>&5
5145 echo "$as_me:5145: \$? = $ac_status" >&5
5146 (exit $ac_status); } &&
5147 { ac_try='test -s conftest.$ac_objext'
5148 { (eval echo "$as_me:5148: \"$ac_try\"") >&5
5151 echo "$as_me:5151: \$? = $ac_status" >&5
5152 (exit $ac_status); }; }; then
5153 cf_cv_xopen_source=no
5155 echo "$as_me: failed program was:" >&5
5156 cat conftest.$ac_ext >&5
5157 cf_cv_xopen_source=$cf_XOPEN_SOURCE
5159 rm -f conftest.$ac_objext conftest.$ac_ext
5163 rm -f conftest.$ac_objext conftest.$ac_ext
5166 echo "$as_me:5166: result: $cf_cv_xopen_source" >&5
5167 echo "${ECHO_T}$cf_cv_xopen_source" >&6
5169 if test "$cf_cv_xopen_source" != no ; then
5171 CFLAGS=`echo "$CFLAGS" | \
5172 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5173 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5175 CPPFLAGS=`echo "$CPPFLAGS" | \
5176 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5177 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5179 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
5184 cf_new_extra_cppflags=
5186 for cf_add_cflags in $cf_temp_xopen_source
5188 case $cf_fix_cppflags in
5190 case $cf_add_cflags in
5191 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5192 case $cf_add_cflags in
5194 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5196 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5197 && test -z "${cf_tst_cflags}" \
5198 && cf_fix_cppflags=yes
5200 if test $cf_fix_cppflags = yes ; then
5202 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5203 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5206 elif test "${cf_tst_cflags}" = "\"'" ; then
5208 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5209 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5219 case $cf_add_cflags in
5221 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5223 CPPFLAGS=`echo "$CPPFLAGS" | \
5224 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5225 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5230 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5231 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5238 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5239 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5246 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5247 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5249 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
5251 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5252 && test -z "${cf_tst_cflags}" \
5253 && cf_fix_cppflags=no
5258 if test -n "$cf_new_cflags" ; then
5260 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5261 CFLAGS="${CFLAGS}$cf_new_cflags"
5265 if test -n "$cf_new_cppflags" ; then
5267 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5268 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5272 if test -n "$cf_new_extra_cppflags" ; then
5274 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5275 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5283 fi # cf_cv_posix_visible
5285 echo "$as_me:5285: checking for signal global datatype" >&5
5286 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
5287 if test "${cf_cv_sig_atomic_t+set}" = set; then
5288 echo $ECHO_N "(cached) $ECHO_C" >&6
5292 "volatile sig_atomic_t" \
5296 cat >conftest.$ac_ext <<_ACEOF
5297 #line 5297 "configure"
5298 #include "confdefs.h"
5300 #include <sys/types.h>
5306 static void handler(int sig)
5314 signal(SIGINT, handler);
5320 rm -f conftest.$ac_objext
5321 if { (eval echo "$as_me:5321: \"$ac_compile\"") >&5
5322 (eval $ac_compile) 2>&5
5324 echo "$as_me:5324: \$? = $ac_status" >&5
5325 (exit $ac_status); } &&
5326 { ac_try='test -s conftest.$ac_objext'
5327 { (eval echo "$as_me:5327: \"$ac_try\"") >&5
5330 echo "$as_me:5330: \$? = $ac_status" >&5
5331 (exit $ac_status); }; }; then
5332 cf_cv_sig_atomic_t=$cf_type
5334 echo "$as_me: failed program was:" >&5
5335 cat conftest.$ac_ext >&5
5336 cf_cv_sig_atomic_t=no
5338 rm -f conftest.$ac_objext conftest.$ac_ext
5339 test "$cf_cv_sig_atomic_t" != no && break
5344 echo "$as_me:5344: result: $cf_cv_sig_atomic_t" >&5
5345 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
5346 test "$cf_cv_sig_atomic_t" != no &&
5347 cat >>confdefs.h <<EOF
5348 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
5351 # Work around breakage on OS X
5353 echo "$as_me:5353: checking if SIGWINCH is defined" >&5
5354 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
5355 if test "${cf_cv_define_sigwinch+set}" = set; then
5356 echo $ECHO_N "(cached) $ECHO_C" >&6
5359 cat >conftest.$ac_ext <<_ACEOF
5360 #line 5360 "configure"
5361 #include "confdefs.h"
5363 #include <sys/types.h>
5364 #include <sys/signal.h>
5369 int x = SIGWINCH; (void)x
5374 rm -f conftest.$ac_objext
5375 if { (eval echo "$as_me:5375: \"$ac_compile\"") >&5
5376 (eval $ac_compile) 2>&5
5378 echo "$as_me:5378: \$? = $ac_status" >&5
5379 (exit $ac_status); } &&
5380 { ac_try='test -s conftest.$ac_objext'
5381 { (eval echo "$as_me:5381: \"$ac_try\"") >&5
5384 echo "$as_me:5384: \$? = $ac_status" >&5
5385 (exit $ac_status); }; }; then
5386 cf_cv_define_sigwinch=yes
5388 echo "$as_me: failed program was:" >&5
5389 cat conftest.$ac_ext >&5
5390 cat >conftest.$ac_ext <<_ACEOF
5391 #line 5391 "configure"
5392 #include "confdefs.h"
5394 #undef _XOPEN_SOURCE
5395 #undef _POSIX_SOURCE
5396 #undef _POSIX_C_SOURCE
5397 #include <sys/types.h>
5398 #include <sys/signal.h>
5403 int x = SIGWINCH; (void)x
5408 rm -f conftest.$ac_objext
5409 if { (eval echo "$as_me:5409: \"$ac_compile\"") >&5
5410 (eval $ac_compile) 2>&5
5412 echo "$as_me:5412: \$? = $ac_status" >&5
5413 (exit $ac_status); } &&
5414 { ac_try='test -s conftest.$ac_objext'
5415 { (eval echo "$as_me:5415: \"$ac_try\"") >&5
5418 echo "$as_me:5418: \$? = $ac_status" >&5
5419 (exit $ac_status); }; }; then
5420 cf_cv_define_sigwinch=maybe
5422 echo "$as_me: failed program was:" >&5
5423 cat conftest.$ac_ext >&5
5424 cf_cv_define_sigwinch=no
5426 rm -f conftest.$ac_objext conftest.$ac_ext
5429 rm -f conftest.$ac_objext conftest.$ac_ext
5432 echo "$as_me:5432: result: $cf_cv_define_sigwinch" >&5
5433 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
5435 if test "$cf_cv_define_sigwinch" = maybe ; then
5436 echo "$as_me:5436: checking for actual SIGWINCH definition" >&5
5437 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
5438 if test "${cf_cv_fixup_sigwinch+set}" = set; then
5439 echo $ECHO_N "(cached) $ECHO_C" >&6
5442 cf_cv_fixup_sigwinch=unknown
5444 while test $cf_sigwinch != 1
5446 cat >conftest.$ac_ext <<_ACEOF
5447 #line 5447 "configure"
5448 #include "confdefs.h"
5450 #undef _XOPEN_SOURCE
5451 #undef _POSIX_SOURCE
5452 #undef _POSIX_C_SOURCE
5453 #include <sys/types.h>
5454 #include <sys/signal.h>
5460 #if SIGWINCH != $cf_sigwinch
5463 int x = SIGWINCH; (void)x
5468 rm -f conftest.$ac_objext
5469 if { (eval echo "$as_me:5469: \"$ac_compile\"") >&5
5470 (eval $ac_compile) 2>&5
5472 echo "$as_me:5472: \$? = $ac_status" >&5
5473 (exit $ac_status); } &&
5474 { ac_try='test -s conftest.$ac_objext'
5475 { (eval echo "$as_me:5475: \"$ac_try\"") >&5
5478 echo "$as_me:5478: \$? = $ac_status" >&5
5479 (exit $ac_status); }; }; then
5480 cf_cv_fixup_sigwinch=$cf_sigwinch
5483 echo "$as_me: failed program was:" >&5
5484 cat conftest.$ac_ext >&5
5486 rm -f conftest.$ac_objext conftest.$ac_ext
5488 cf_sigwinch=`expr $cf_sigwinch - 1`
5492 echo "$as_me:5492: result: $cf_cv_fixup_sigwinch" >&5
5493 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
5495 if test "$cf_cv_fixup_sigwinch" != unknown ; then
5496 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
5500 # Checks for CODESET support.
5502 echo "$as_me:5502: checking for nl_langinfo and CODESET" >&5
5503 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
5504 if test "${am_cv_langinfo_codeset+set}" = set; then
5505 echo $ECHO_N "(cached) $ECHO_C" >&6
5507 cat >conftest.$ac_ext <<_ACEOF
5508 #line 5508 "configure"
5509 #include "confdefs.h"
5510 #include <langinfo.h>
5514 char* cs = nl_langinfo(CODESET); (void)cs
5519 rm -f conftest.$ac_objext conftest$ac_exeext
5520 if { (eval echo "$as_me:5520: \"$ac_link\"") >&5
5521 (eval $ac_link) 2>&5
5523 echo "$as_me:5523: \$? = $ac_status" >&5
5524 (exit $ac_status); } &&
5525 { ac_try='test -s conftest$ac_exeext'
5526 { (eval echo "$as_me:5526: \"$ac_try\"") >&5
5529 echo "$as_me:5529: \$? = $ac_status" >&5
5530 (exit $ac_status); }; }; then
5531 am_cv_langinfo_codeset=yes
5533 echo "$as_me: failed program was:" >&5
5534 cat conftest.$ac_ext >&5
5535 am_cv_langinfo_codeset=no
5537 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5540 echo "$as_me:5540: result: $am_cv_langinfo_codeset" >&5
5541 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
5542 if test $am_cv_langinfo_codeset = yes; then
5544 cat >>confdefs.h <<\EOF
5545 #define HAVE_LANGINFO_CODESET 1
5550 echo "$as_me:5550: checking if you want to use pkg-config" >&5
5551 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
5553 # Check whether --with-pkg-config or --without-pkg-config was given.
5554 if test "${with_pkg_config+set}" = set; then
5555 withval="$with_pkg_config"
5556 cf_pkg_config=$withval
5560 echo "$as_me:5560: result: $cf_pkg_config" >&5
5561 echo "${ECHO_T}$cf_pkg_config" >&6
5563 case $cf_pkg_config in
5569 if test -n "$ac_tool_prefix"; then
5570 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5571 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5572 echo "$as_me:5572: checking for $ac_word" >&5
5573 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5574 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
5575 echo $ECHO_N "(cached) $ECHO_C" >&6
5579 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5582 ac_save_IFS=$IFS; IFS=$ac_path_separator
5584 for ac_dir in $ac_dummy; do
5586 test -z "$ac_dir" && ac_dir=.
5587 if $as_executable_p "$ac_dir/$ac_word"; then
5588 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
5589 echo "$as_me:5589: found $ac_dir/$ac_word" >&5
5597 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5599 if test -n "$PKG_CONFIG"; then
5600 echo "$as_me:5600: result: $PKG_CONFIG" >&5
5601 echo "${ECHO_T}$PKG_CONFIG" >&6
5603 echo "$as_me:5603: result: no" >&5
5604 echo "${ECHO_T}no" >&6
5608 if test -z "$ac_cv_path_PKG_CONFIG"; then
5609 ac_pt_PKG_CONFIG=$PKG_CONFIG
5610 # Extract the first word of "pkg-config", so it can be a program name with args.
5611 set dummy pkg-config; ac_word=$2
5612 echo "$as_me:5612: checking for $ac_word" >&5
5613 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5614 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
5615 echo $ECHO_N "(cached) $ECHO_C" >&6
5617 case $ac_pt_PKG_CONFIG in
5619 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5622 ac_save_IFS=$IFS; IFS=$ac_path_separator
5624 for ac_dir in $ac_dummy; do
5626 test -z "$ac_dir" && ac_dir=.
5627 if $as_executable_p "$ac_dir/$ac_word"; then
5628 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
5629 echo "$as_me:5629: found $ac_dir/$ac_word" >&5
5634 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
5638 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5640 if test -n "$ac_pt_PKG_CONFIG"; then
5641 echo "$as_me:5641: result: $ac_pt_PKG_CONFIG" >&5
5642 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
5644 echo "$as_me:5644: result: no" >&5
5645 echo "${ECHO_T}no" >&6
5648 PKG_CONFIG=$ac_pt_PKG_CONFIG
5650 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5659 test -z "$PKG_CONFIG" && PKG_CONFIG=none
5660 if test "$PKG_CONFIG" != none ; then
5662 if test "x$prefix" != xNONE; then
5663 cf_path_syntax="$prefix"
5665 cf_path_syntax="$ac_default_prefix"
5668 case ".$PKG_CONFIG" in
5673 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5675 (.\${*prefix}*|.\${*dir}*)
5676 eval PKG_CONFIG="$PKG_CONFIG"
5677 case ".$PKG_CONFIG" in
5679 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5684 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5687 { { echo "$as_me:5687: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
5688 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
5689 { (exit 1); exit 1; }; }
5693 elif test "x$cf_pkg_config" != xno ; then
5694 { echo "$as_me:5694: WARNING: pkg-config is not installed" >&5
5695 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
5698 echo "$as_me:5698: checking if you want to see long compiling messages" >&5
5699 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
5701 # Check whether --enable-echo or --disable-echo was given.
5702 if test "${enable_echo+set}" = set; then
5703 enableval="$enable_echo"
5704 test "$enableval" != no && enableval=yes
5705 if test "$enableval" != "yes" ; then
5708 ECHO_LD='@echo linking $@;'
5709 RULE_CC='@echo compiling $<'
5710 SHOW_CC='@echo compiling $@'
5732 echo "$as_me:5732: result: $enableval" >&5
5733 echo "${ECHO_T}$enableval" >&6
5735 echo "$as_me:5735: checking for ncurses wrap-prefix" >&5
5736 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
5738 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
5739 if test "${with_ncurses_wrap_prefix+set}" = set; then
5740 withval="$with_ncurses_wrap_prefix"
5741 NCURSES_WRAP_PREFIX=$withval
5743 NCURSES_WRAP_PREFIX=_nc_
5745 echo "$as_me:5745: result: $NCURSES_WRAP_PREFIX" >&5
5746 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
5748 echo "$as_me:5748: checking if you want to check for wide-character functions" >&5
5749 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
5751 # Check whether --enable-widec or --disable-widec was given.
5752 if test "${enable_widec+set}" = set; then
5753 enableval="$enable_widec"
5754 test "$enableval" != no && enableval=yes
5755 if test "$enableval" != "yes" ; then
5765 echo "$as_me:5765: result: $cf_enable_widec" >&5
5766 echo "${ECHO_T}$cf_enable_widec" >&6
5768 echo "$as_me:5768: checking for specific curses-directory" >&5
5769 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
5771 # Check whether --with-curses-dir or --without-curses-dir was given.
5772 if test "${with_curses_dir+set}" = set; then
5773 withval="$with_curses_dir"
5774 cf_cv_curses_dir=$withval
5778 echo "$as_me:5778: result: $cf_cv_curses_dir" >&5
5779 echo "${ECHO_T}$cf_cv_curses_dir" >&6
5781 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5784 if test "x$prefix" != xNONE; then
5785 cf_path_syntax="$prefix"
5787 cf_path_syntax="$ac_default_prefix"
5795 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5797 (.\${*prefix}*|.\${*dir}*)
5798 eval withval="$withval"
5801 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5806 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5809 { { echo "$as_me:5809: error: expected a pathname, not \"$withval\"" >&5
5810 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5811 { (exit 1); exit 1; }; }
5815 if test -d "$cf_cv_curses_dir"
5818 if test -n "$cf_cv_curses_dir/include" ; then
5819 for cf_add_incdir in $cf_cv_curses_dir/include
5821 while test $cf_add_incdir != /usr/include
5823 if test -d $cf_add_incdir
5826 if test -n "$CFLAGS$CPPFLAGS" ; then
5827 # a loop is needed to ensure we can add subdirs of existing dirs
5828 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5829 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5830 cf_have_incdir=yes; break
5835 if test "$cf_have_incdir" = no ; then
5836 if test "$cf_add_incdir" = /usr/local/include ; then
5837 if test "$GCC" = yes
5839 cf_save_CPPFLAGS=$CPPFLAGS
5841 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5842 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5844 cat >conftest.$ac_ext <<_ACEOF
5845 #line 5845 "configure"
5846 #include "confdefs.h"
5856 rm -f conftest.$ac_objext
5857 if { (eval echo "$as_me:5857: \"$ac_compile\"") >&5
5858 (eval $ac_compile) 2>&5
5860 echo "$as_me:5860: \$? = $ac_status" >&5
5861 (exit $ac_status); } &&
5862 { ac_try='test -s conftest.$ac_objext'
5863 { (eval echo "$as_me:5863: \"$ac_try\"") >&5
5866 echo "$as_me:5866: \$? = $ac_status" >&5
5867 (exit $ac_status); }; }; then
5870 echo "$as_me: failed program was:" >&5
5871 cat conftest.$ac_ext >&5
5874 rm -f conftest.$ac_objext conftest.$ac_ext
5875 CPPFLAGS=$cf_save_CPPFLAGS
5880 if test "$cf_have_incdir" = no ; then
5881 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5883 echo "${as_me:-configure}:5883: testing adding $cf_add_incdir to include-path ..." 1>&5
5885 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5887 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5888 test "$cf_top_incdir" = "$cf_add_incdir" && break
5889 cf_add_incdir="$cf_top_incdir"
5900 if test -n "$cf_cv_curses_dir/lib" ; then
5901 for cf_add_libdir in $cf_cv_curses_dir/lib
5903 if test $cf_add_libdir = /usr/lib ; then
5905 elif test -d $cf_add_libdir
5908 if test -n "$LDFLAGS$LIBS" ; then
5909 # a loop is needed to ensure we can add subdirs of existing dirs
5910 for cf_test_libdir in $LDFLAGS $LIBS ; do
5911 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5912 cf_have_libdir=yes; break
5916 if test "$cf_have_libdir" = no ; then
5917 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5919 echo "${as_me:-configure}:5919: testing adding $cf_add_libdir to library-path ..." 1>&5
5921 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5932 echo "$as_me:5932: checking for specified curses library type" >&5
5933 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
5935 # Check whether --with-screen or --without-screen was given.
5936 if test "${with_screen+set}" = set; then
5937 withval="$with_screen"
5938 cf_cv_screen=$withval
5941 # Check whether --with-ncursesw or --without-ncursesw was given.
5942 if test "${with_ncursesw+set}" = set; then
5943 withval="$with_ncursesw"
5944 cf_cv_screen=ncursesw
5947 # Check whether --with-ncurses or --without-ncurses was given.
5948 if test "${with_ncurses+set}" = set; then
5949 withval="$with_ncurses"
5950 cf_cv_screen=ncurses
5953 # Check whether --with-pdcurses or --without-pdcurses was given.
5954 if test "${with_pdcurses+set}" = set; then
5955 withval="$with_pdcurses"
5956 cf_cv_screen=pdcurses
5959 # Check whether --with-curses-colr or --without-curses-colr was given.
5960 if test "${with_curses_colr+set}" = set; then
5961 withval="$with_curses_colr"
5962 cf_cv_screen=curses_colr
5965 # Check whether --with-curses-5lib or --without-curses-5lib was given.
5966 if test "${with_curses_5lib+set}" = set; then
5967 withval="$with_curses_5lib"
5968 cf_cv_screen=curses_5lib
5976 echo "$as_me:5976: result: $cf_cv_screen" >&5
5977 echo "${ECHO_T}$cf_cv_screen" >&6
5979 case $cf_cv_screen in
5982 echo "$as_me:5982: checking for extra include directories" >&5
5983 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
5984 if test "${cf_cv_curses_incdir+set}" = set; then
5985 echo $ECHO_N "(cached) $ECHO_C" >&6
5988 cf_cv_curses_incdir=no
5991 if test "x$cf_cv_screen" = "xcurses_colr"
5993 test -d /usr/include/curses_colr && \
5994 cf_cv_curses_incdir="-I/usr/include/curses_colr"
5998 if test "x$cf_cv_screen" = "xcurses_5lib"
6000 test -d /usr/5lib && \
6001 test -d /usr/5include && \
6002 cf_cv_curses_incdir="-I/usr/5include"
6008 echo "$as_me:6008: result: $cf_cv_curses_incdir" >&5
6009 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
6010 if test "$cf_cv_curses_incdir" != no
6013 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6014 CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
6018 echo "$as_me:6018: checking if we have identified curses headers" >&5
6019 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6020 if test "${cf_cv_ncurses_header+set}" = set; then
6021 echo $ECHO_N "(cached) $ECHO_C" >&6
6024 cf_cv_ncurses_header=none
6027 curses.h ncurses/ncurses.h ncurses/curses.h
6029 cat >conftest.$ac_ext <<_ACEOF
6030 #line 6030 "configure"
6031 #include "confdefs.h"
6032 #include <${cf_header}>
6036 initscr(); tgoto("?", 0,0)
6041 rm -f conftest.$ac_objext
6042 if { (eval echo "$as_me:6042: \"$ac_compile\"") >&5
6043 (eval $ac_compile) 2>&5
6045 echo "$as_me:6045: \$? = $ac_status" >&5
6046 (exit $ac_status); } &&
6047 { ac_try='test -s conftest.$ac_objext'
6048 { (eval echo "$as_me:6048: \"$ac_try\"") >&5
6051 echo "$as_me:6051: \$? = $ac_status" >&5
6052 (exit $ac_status); }; }; then
6053 cf_cv_ncurses_header=$cf_header; break
6055 echo "$as_me: failed program was:" >&5
6056 cat conftest.$ac_ext >&5
6058 rm -f conftest.$ac_objext conftest.$ac_ext
6062 echo "$as_me:6062: result: $cf_cv_ncurses_header" >&5
6063 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6065 if test "$cf_cv_ncurses_header" = none ; then
6066 { { echo "$as_me:6066: error: No curses header-files found" >&5
6067 echo "$as_me: error: No curses header-files found" >&2;}
6068 { (exit 1); exit 1; }; }
6071 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6073 for ac_header in $cf_cv_ncurses_header
6075 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6076 echo "$as_me:6076: checking for $ac_header" >&5
6077 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6078 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6079 echo $ECHO_N "(cached) $ECHO_C" >&6
6081 cat >conftest.$ac_ext <<_ACEOF
6082 #line 6082 "configure"
6083 #include "confdefs.h"
6084 #include <$ac_header>
6086 if { (eval echo "$as_me:6086: \"$ac_cpp conftest.$ac_ext\"") >&5
6087 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6089 egrep -v '^ *\+' conftest.er1 >conftest.err
6091 cat conftest.err >&5
6092 echo "$as_me:6092: \$? = $ac_status" >&5
6093 (exit $ac_status); } >/dev/null; then
6094 if test -s conftest.err; then
6095 ac_cpp_err=$ac_c_preproc_warn_flag
6102 if test -z "$ac_cpp_err"; then
6103 eval "$as_ac_Header=yes"
6105 echo "$as_me: failed program was:" >&5
6106 cat conftest.$ac_ext >&5
6107 eval "$as_ac_Header=no"
6109 rm -f conftest.err conftest.$ac_ext
6111 echo "$as_me:6111: result: `eval echo '${'$as_ac_Header'}'`" >&5
6112 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6113 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6114 cat >>confdefs.h <<EOF
6115 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6121 echo "$as_me:6121: checking for terminfo header" >&5
6122 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6123 if test "${cf_cv_term_header+set}" = set; then
6124 echo $ECHO_N "(cached) $ECHO_C" >&6
6127 case ${cf_cv_ncurses_header} in
6128 (*/ncurses.h|*/ncursesw.h)
6129 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6132 cf_term_header=term.h
6136 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6138 cat >conftest.$ac_ext <<_ACEOF
6139 #line 6139 "configure"
6140 #include "confdefs.h"
6142 #include <${cf_cv_ncurses_header:-curses.h}>
6148 int x = auto_left_margin; (void)x
6153 rm -f conftest.$ac_objext
6154 if { (eval echo "$as_me:6154: \"$ac_compile\"") >&5
6155 (eval $ac_compile) 2>&5
6157 echo "$as_me:6157: \$? = $ac_status" >&5
6158 (exit $ac_status); } &&
6159 { ac_try='test -s conftest.$ac_objext'
6160 { (eval echo "$as_me:6160: \"$ac_try\"") >&5
6163 echo "$as_me:6163: \$? = $ac_status" >&5
6164 (exit $ac_status); }; }; then
6166 cf_cv_term_header="$cf_test"
6168 echo "$as_me: failed program was:" >&5
6169 cat conftest.$ac_ext >&5
6171 cf_cv_term_header=unknown
6174 rm -f conftest.$ac_objext conftest.$ac_ext
6175 test "$cf_cv_term_header" != unknown && break
6179 echo "$as_me:6179: result: $cf_cv_term_header" >&5
6180 echo "${ECHO_T}$cf_cv_term_header" >&6
6182 # Set definitions to allow ifdef'ing to accommodate subdirectories
6184 case $cf_cv_term_header in
6187 cat >>confdefs.h <<\EOF
6188 #define HAVE_TERM_H 1
6194 case $cf_cv_term_header in
6197 cat >>confdefs.h <<\EOF
6198 #define HAVE_NCURSES_TERM_H 1
6204 cat >>confdefs.h <<\EOF
6205 #define HAVE_NCURSESW_TERM_H 1
6211 echo "$as_me:6211: checking for ncurses version" >&5
6212 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6213 if test "${cf_cv_ncurses_version+set}" = set; then
6214 echo $ECHO_N "(cached) $ECHO_C" >&6
6217 cf_cv_ncurses_version=no
6220 if test "$cross_compiling" = yes; then
6222 # This will not work if the preprocessor splits the line after the
6223 # Autoconf token. The 'unproto' program does that.
6224 cat > conftest.$ac_ext <<EOF
6225 #include <${cf_cv_ncurses_header:-curses.h}>
6227 #ifdef NCURSES_VERSION
6228 Autoconf NCURSES_VERSION
6236 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6237 { (eval echo "$as_me:6237: \"$cf_try\"") >&5
6240 echo "$as_me:6240: \$? = $ac_status" >&5
6241 (exit $ac_status); }
6242 if test -f conftest.out ; then
6243 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6244 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6249 cat >conftest.$ac_ext <<_ACEOF
6250 #line 6250 "configure"
6251 #include "confdefs.h"
6253 #include <${cf_cv_ncurses_header:-curses.h}>
6257 FILE *fp = fopen("$cf_tempfile", "w");
6258 #ifdef NCURSES_VERSION
6259 # ifdef NCURSES_VERSION_PATCH
6260 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6262 fprintf(fp, "%s\n", NCURSES_VERSION);
6266 fprintf(fp, "old\n");
6271 ${cf_cv_main_return:-return}(0);
6274 rm -f conftest$ac_exeext
6275 if { (eval echo "$as_me:6275: \"$ac_link\"") >&5
6276 (eval $ac_link) 2>&5
6278 echo "$as_me:6278: \$? = $ac_status" >&5
6279 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6280 { (eval echo "$as_me:6280: \"$ac_try\"") >&5
6283 echo "$as_me:6283: \$? = $ac_status" >&5
6284 (exit $ac_status); }; }; then
6286 cf_cv_ncurses_version=`cat $cf_tempfile`
6288 echo "$as_me: program exited with status $ac_status" >&5
6289 echo "$as_me: failed program was:" >&5
6290 cat conftest.$ac_ext >&5
6292 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6297 echo "$as_me:6297: result: $cf_cv_ncurses_version" >&5
6298 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6299 test "$cf_cv_ncurses_version" = no ||
6300 cat >>confdefs.h <<\EOF
6304 echo "$as_me:6304: checking if we have identified curses libraries" >&5
6305 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
6306 cat >conftest.$ac_ext <<_ACEOF
6307 #line 6307 "configure"
6308 #include "confdefs.h"
6309 #include <${cf_cv_ncurses_header:-curses.h}>
6313 initscr(); tgoto("?", 0,0)
6318 rm -f conftest.$ac_objext conftest$ac_exeext
6319 if { (eval echo "$as_me:6319: \"$ac_link\"") >&5
6320 (eval $ac_link) 2>&5
6322 echo "$as_me:6322: \$? = $ac_status" >&5
6323 (exit $ac_status); } &&
6324 { ac_try='test -s conftest$ac_exeext'
6325 { (eval echo "$as_me:6325: \"$ac_try\"") >&5
6328 echo "$as_me:6328: \$? = $ac_status" >&5
6329 (exit $ac_status); }; }; then
6332 echo "$as_me: failed program was:" >&5
6333 cat conftest.$ac_ext >&5
6336 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6337 echo "$as_me:6337: result: $cf_result" >&5
6338 echo "${ECHO_T}$cf_result" >&6
6340 if test "$cf_result" = no ; then
6343 echo "$as_me:6343: checking for tgoto in -lmytinfo" >&5
6344 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6345 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6346 echo $ECHO_N "(cached) $ECHO_C" >&6
6348 ac_check_lib_save_LIBS=$LIBS
6349 LIBS="-lmytinfo $LIBS"
6350 cat >conftest.$ac_ext <<_ACEOF
6351 #line 6351 "configure"
6352 #include "confdefs.h"
6354 /* Override any gcc2 internal prototype to avoid an error. */
6358 /* We use char because int might match the return type of a gcc2
6359 builtin and then its argument prototype would still apply. */
6369 rm -f conftest.$ac_objext conftest$ac_exeext
6370 if { (eval echo "$as_me:6370: \"$ac_link\"") >&5
6371 (eval $ac_link) 2>&5
6373 echo "$as_me:6373: \$? = $ac_status" >&5
6374 (exit $ac_status); } &&
6375 { ac_try='test -s conftest$ac_exeext'
6376 { (eval echo "$as_me:6376: \"$ac_try\"") >&5
6379 echo "$as_me:6379: \$? = $ac_status" >&5
6380 (exit $ac_status); }; }; then
6381 ac_cv_lib_mytinfo_tgoto=yes
6383 echo "$as_me: failed program was:" >&5
6384 cat conftest.$ac_ext >&5
6385 ac_cv_lib_mytinfo_tgoto=no
6387 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6388 LIBS=$ac_check_lib_save_LIBS
6390 echo "$as_me:6390: result: $ac_cv_lib_mytinfo_tgoto" >&5
6391 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6392 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6397 for cf_add_1lib in -lmytinfo; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6399 for cf_add_1lib in $cf_add_0lib; do
6400 for cf_add_2lib in $cf_add_libs; do
6401 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6406 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6414 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
6415 # next (1998), and xcurses "newer" (2000). There is no header file for
6416 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
6417 # term.h) for cur_colr
6418 if test "x$cf_cv_screen" = "xcurses_colr"
6420 echo "$as_me:6420: checking for initscr in -lcur_colr" >&5
6421 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
6422 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
6423 echo $ECHO_N "(cached) $ECHO_C" >&6
6425 ac_check_lib_save_LIBS=$LIBS
6426 LIBS="-lcur_colr $LIBS"
6427 cat >conftest.$ac_ext <<_ACEOF
6428 #line 6428 "configure"
6429 #include "confdefs.h"
6431 /* Override any gcc2 internal prototype to avoid an error. */
6435 /* We use char because int might match the return type of a gcc2
6436 builtin and then its argument prototype would still apply. */
6446 rm -f conftest.$ac_objext conftest$ac_exeext
6447 if { (eval echo "$as_me:6447: \"$ac_link\"") >&5
6448 (eval $ac_link) 2>&5
6450 echo "$as_me:6450: \$? = $ac_status" >&5
6451 (exit $ac_status); } &&
6452 { ac_try='test -s conftest$ac_exeext'
6453 { (eval echo "$as_me:6453: \"$ac_try\"") >&5
6456 echo "$as_me:6456: \$? = $ac_status" >&5
6457 (exit $ac_status); }; }; then
6458 ac_cv_lib_cur_colr_initscr=yes
6460 echo "$as_me: failed program was:" >&5
6461 cat conftest.$ac_ext >&5
6462 ac_cv_lib_cur_colr_initscr=no
6464 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6465 LIBS=$ac_check_lib_save_LIBS
6467 echo "$as_me:6467: result: $ac_cv_lib_cur_colr_initscr" >&5
6468 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
6469 if test $ac_cv_lib_cur_colr_initscr = yes; then
6474 for cf_add_1lib in -lcur_colr; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6476 for cf_add_1lib in $cf_add_0lib; do
6477 for cf_add_2lib in $cf_add_libs; do
6478 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6483 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6487 ac_cv_func_initscr=yes
6491 echo "$as_me:6491: checking for initscr in -lHcurses" >&5
6492 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
6493 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
6494 echo $ECHO_N "(cached) $ECHO_C" >&6
6496 ac_check_lib_save_LIBS=$LIBS
6497 LIBS="-lHcurses $LIBS"
6498 cat >conftest.$ac_ext <<_ACEOF
6499 #line 6499 "configure"
6500 #include "confdefs.h"
6502 /* Override any gcc2 internal prototype to avoid an error. */
6506 /* We use char because int might match the return type of a gcc2
6507 builtin and then its argument prototype would still apply. */
6517 rm -f conftest.$ac_objext conftest$ac_exeext
6518 if { (eval echo "$as_me:6518: \"$ac_link\"") >&5
6519 (eval $ac_link) 2>&5
6521 echo "$as_me:6521: \$? = $ac_status" >&5
6522 (exit $ac_status); } &&
6523 { ac_try='test -s conftest$ac_exeext'
6524 { (eval echo "$as_me:6524: \"$ac_try\"") >&5
6527 echo "$as_me:6527: \$? = $ac_status" >&5
6528 (exit $ac_status); }; }; then
6529 ac_cv_lib_Hcurses_initscr=yes
6531 echo "$as_me: failed program was:" >&5
6532 cat conftest.$ac_ext >&5
6533 ac_cv_lib_Hcurses_initscr=no
6535 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6536 LIBS=$ac_check_lib_save_LIBS
6538 echo "$as_me:6538: result: $ac_cv_lib_Hcurses_initscr" >&5
6539 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
6540 if test $ac_cv_lib_Hcurses_initscr = yes; then
6542 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
6547 for cf_add_1lib in -lHcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6549 for cf_add_1lib in $cf_add_0lib; do
6550 for cf_add_2lib in $cf_add_libs; do
6551 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6556 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6560 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6561 CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
6563 ac_cv_func_initscr=yes
6572 case `arch 2>/dev/null` in
6577 if test -n "/lib64" ; then
6578 for cf_add_libdir in /lib64
6580 if test $cf_add_libdir = /usr/lib ; then
6582 elif test -d $cf_add_libdir
6585 if test -n "$LDFLAGS$LIBS" ; then
6586 # a loop is needed to ensure we can add subdirs of existing dirs
6587 for cf_test_libdir in $LDFLAGS $LIBS ; do
6588 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6589 cf_have_libdir=yes; break
6593 if test "$cf_have_libdir" = no ; then
6594 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6596 echo "${as_me:-configure}:6596: testing adding $cf_add_libdir to library-path ..." 1>&5
6598 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6606 if test -n "/lib" ; then
6607 for cf_add_libdir in /lib
6609 if test $cf_add_libdir = /usr/lib ; then
6611 elif test -d $cf_add_libdir
6614 if test -n "$LDFLAGS$LIBS" ; then
6615 # a loop is needed to ensure we can add subdirs of existing dirs
6616 for cf_test_libdir in $LDFLAGS $LIBS ; do
6617 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6618 cf_have_libdir=yes; break
6622 if test "$cf_have_libdir" = no ; then
6623 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6625 echo "${as_me:-configure}:6625: testing adding $cf_add_libdir to library-path ..." 1>&5
6627 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6637 if test -n "/lib" ; then
6638 for cf_add_libdir in /lib
6640 if test $cf_add_libdir = /usr/lib ; then
6642 elif test -d $cf_add_libdir
6645 if test -n "$LDFLAGS$LIBS" ; then
6646 # a loop is needed to ensure we can add subdirs of existing dirs
6647 for cf_test_libdir in $LDFLAGS $LIBS ; do
6648 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6649 cf_have_libdir=yes; break
6653 if test "$cf_have_libdir" = no ; then
6654 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6656 echo "${as_me:-configure}:6656: testing adding $cf_add_libdir to library-path ..." 1>&5
6658 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6668 if test "x$cf_cv_screen" = "xcurses_5lib"
6670 if test -d /usr/5lib ; then
6672 if test -n "/usr/5lib" ; then
6673 for cf_add_libdir in /usr/5lib
6675 if test $cf_add_libdir = /usr/lib ; then
6677 elif test -d $cf_add_libdir
6680 if test -n "$LDFLAGS$LIBS" ; then
6681 # a loop is needed to ensure we can add subdirs of existing dirs
6682 for cf_test_libdir in $LDFLAGS $LIBS ; do
6683 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6684 cf_have_libdir=yes; break
6688 if test "$cf_have_libdir" = no ; then
6689 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6691 echo "${as_me:-configure}:6691: testing adding $cf_add_libdir to library-path ..." 1>&5
6693 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6702 for cf_add_1lib in -lcurses -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6704 for cf_add_1lib in $cf_add_0lib; do
6705 for cf_add_2lib in $cf_add_libs; do
6706 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6711 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6717 ac_cv_func_initscr=yes
6721 if test ".$ac_cv_func_initscr" != .yes ; then
6722 cf_save_LIBS="$LIBS"
6724 if test ".${cf_cv_ncurses_version:-no}" != .no
6726 cf_check_list="ncurses curses cursesX"
6728 cf_check_list="cursesX curses ncurses"
6731 # Check for library containing tgoto. Do this before curses library
6732 # because it may be needed to link the test-case for initscr.
6733 if test "x$cf_term_lib" = x
6735 echo "$as_me:6735: checking for tgoto" >&5
6736 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
6737 if test "${ac_cv_func_tgoto+set}" = set; then
6738 echo $ECHO_N "(cached) $ECHO_C" >&6
6740 cat >conftest.$ac_ext <<_ACEOF
6741 #line 6741 "configure"
6742 #include "confdefs.h"
6743 #define tgoto autoconf_temporary
6744 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6751 /* We use char because int might match the return type of a gcc2
6752 builtin and then its argument prototype would still apply. */
6759 /* The GNU C library defines stubs for functions which it implements
6760 to always fail with ENOSYS. Some functions are actually named
6761 something starting with __ and the normal name is an alias. */
6762 #if defined (__stub_tgoto) || defined (__stub___tgoto)
6763 #error found stub for tgoto
6771 rm -f conftest.$ac_objext conftest$ac_exeext
6772 if { (eval echo "$as_me:6772: \"$ac_link\"") >&5
6773 (eval $ac_link) 2>&5
6775 echo "$as_me:6775: \$? = $ac_status" >&5
6776 (exit $ac_status); } &&
6777 { ac_try='test -s conftest$ac_exeext'
6778 { (eval echo "$as_me:6778: \"$ac_try\"") >&5
6781 echo "$as_me:6781: \$? = $ac_status" >&5
6782 (exit $ac_status); }; }; then
6783 ac_cv_func_tgoto=yes
6785 echo "$as_me: failed program was:" >&5
6786 cat conftest.$ac_ext >&5
6789 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6791 echo "$as_me:6791: result: $ac_cv_func_tgoto" >&5
6792 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
6793 if test $ac_cv_func_tgoto = yes; then
6794 cf_term_lib=predefined
6797 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
6799 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
6800 echo "$as_me:6800: checking for tgoto in -l$cf_term_lib" >&5
6801 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
6802 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
6803 echo $ECHO_N "(cached) $ECHO_C" >&6
6805 ac_check_lib_save_LIBS=$LIBS
6806 LIBS="-l$cf_term_lib $LIBS"
6807 cat >conftest.$ac_ext <<_ACEOF
6808 #line 6808 "configure"
6809 #include "confdefs.h"
6811 /* Override any gcc2 internal prototype to avoid an error. */
6815 /* We use char because int might match the return type of a gcc2
6816 builtin and then its argument prototype would still apply. */
6826 rm -f conftest.$ac_objext conftest$ac_exeext
6827 if { (eval echo "$as_me:6827: \"$ac_link\"") >&5
6828 (eval $ac_link) 2>&5
6830 echo "$as_me:6830: \$? = $ac_status" >&5
6831 (exit $ac_status); } &&
6832 { ac_try='test -s conftest$ac_exeext'
6833 { (eval echo "$as_me:6833: \"$ac_try\"") >&5
6836 echo "$as_me:6836: \$? = $ac_status" >&5
6837 (exit $ac_status); }; }; then
6838 eval "$as_ac_Lib=yes"
6840 echo "$as_me: failed program was:" >&5
6841 cat conftest.$ac_ext >&5
6842 eval "$as_ac_Lib=no"
6844 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6845 LIBS=$ac_check_lib_save_LIBS
6847 echo "$as_me:6847: result: `eval echo '${'$as_ac_Lib'}'`" >&5
6848 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
6849 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
6851 : ${cf_nculib_root:=$cf_term_lib}
6862 # Check for library containing initscr
6863 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
6864 if test "x$cf_curs_lib" = x
6866 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
6868 LIBS="-l$cf_curs_lib $cf_save_LIBS"
6869 if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
6870 echo "$as_me:6870: checking if we can link with $cf_curs_lib library" >&5
6871 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
6872 cat >conftest.$ac_ext <<_ACEOF
6873 #line 6873 "configure"
6874 #include "confdefs.h"
6875 #include <${cf_cv_ncurses_header:-curses.h}>
6884 rm -f conftest.$ac_objext conftest$ac_exeext
6885 if { (eval echo "$as_me:6885: \"$ac_link\"") >&5
6886 (eval $ac_link) 2>&5
6888 echo "$as_me:6888: \$? = $ac_status" >&5
6889 (exit $ac_status); } &&
6890 { ac_try='test -s conftest$ac_exeext'
6891 { (eval echo "$as_me:6891: \"$ac_try\"") >&5
6894 echo "$as_me:6894: \$? = $ac_status" >&5
6895 (exit $ac_status); }; }; then
6898 echo "$as_me: failed program was:" >&5
6899 cat conftest.$ac_ext >&5
6902 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6903 echo "$as_me:6903: result: $cf_result" >&5
6904 echo "${ECHO_T}$cf_result" >&6
6905 test $cf_result = yes && break
6906 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
6908 elif test "$cf_term_lib" != predefined ; then
6909 echo "$as_me:6909: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
6910 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
6911 cat >conftest.$ac_ext <<_ACEOF
6912 #line 6912 "configure"
6913 #include "confdefs.h"
6914 #include <${cf_cv_ncurses_header:-curses.h}>
6918 initscr(); tgoto((char *)0, 0, 0);
6923 rm -f conftest.$ac_objext conftest$ac_exeext
6924 if { (eval echo "$as_me:6924: \"$ac_link\"") >&5
6925 (eval $ac_link) 2>&5
6927 echo "$as_me:6927: \$? = $ac_status" >&5
6928 (exit $ac_status); } &&
6929 { ac_try='test -s conftest$ac_exeext'
6930 { (eval echo "$as_me:6930: \"$ac_try\"") >&5
6933 echo "$as_me:6933: \$? = $ac_status" >&5
6934 (exit $ac_status); }; }; then
6937 echo "$as_me: failed program was:" >&5
6938 cat conftest.$ac_ext >&5
6940 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
6941 cat >conftest.$ac_ext <<_ACEOF
6942 #line 6942 "configure"
6943 #include "confdefs.h"
6944 #include <${cf_cv_ncurses_header:-curses.h}>
6953 rm -f conftest.$ac_objext conftest$ac_exeext
6954 if { (eval echo "$as_me:6954: \"$ac_link\"") >&5
6955 (eval $ac_link) 2>&5
6957 echo "$as_me:6957: \$? = $ac_status" >&5
6958 (exit $ac_status); } &&
6959 { ac_try='test -s conftest$ac_exeext'
6960 { (eval echo "$as_me:6960: \"$ac_try\"") >&5
6963 echo "$as_me:6963: \$? = $ac_status" >&5
6964 (exit $ac_status); }; }; then
6967 echo "$as_me: failed program was:" >&5
6968 cat conftest.$ac_ext >&5
6971 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6974 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6975 echo "$as_me:6975: result: $cf_result" >&5
6976 echo "${ECHO_T}$cf_result" >&6
6977 test $cf_result != error && break
6981 test $cf_curs_lib = unknown && { { echo "$as_me:6981: error: no curses library found" >&5
6982 echo "$as_me: error: no curses library found" >&2;}
6983 { (exit 1); exit 1; }; }
6990 echo "$as_me:6990: checking for multibyte character support" >&5
6991 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6992 if test "${cf_cv_utf8_lib+set}" = set; then
6993 echo $ECHO_N "(cached) $ECHO_C" >&6
6996 cf_save_LIBS="$LIBS"
6997 cat >conftest.$ac_ext <<_ACEOF
6998 #line 6998 "configure"
6999 #include "confdefs.h"
7010 rm -f conftest.$ac_objext conftest$ac_exeext
7011 if { (eval echo "$as_me:7011: \"$ac_link\"") >&5
7012 (eval $ac_link) 2>&5
7014 echo "$as_me:7014: \$? = $ac_status" >&5
7015 (exit $ac_status); } &&
7016 { ac_try='test -s conftest$ac_exeext'
7017 { (eval echo "$as_me:7017: \"$ac_try\"") >&5
7020 echo "$as_me:7020: \$? = $ac_status" >&5
7021 (exit $ac_status); }; }; then
7024 echo "$as_me: failed program was:" >&5
7025 cat conftest.$ac_ext >&5
7027 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7028 # will be set on completion of the AC_TRY_LINK below.
7029 cf_cv_header_path_utf8=
7030 cf_cv_library_path_utf8=
7032 echo "${as_me:-configure}:7032: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7034 cf_save_LIBS="$LIBS"
7036 cat >conftest.$ac_ext <<_ACEOF
7037 #line 7037 "configure"
7038 #include "confdefs.h"
7040 #include <libutf8.h>
7049 rm -f conftest.$ac_objext conftest$ac_exeext
7050 if { (eval echo "$as_me:7050: \"$ac_link\"") >&5
7051 (eval $ac_link) 2>&5
7053 echo "$as_me:7053: \$? = $ac_status" >&5
7054 (exit $ac_status); } &&
7055 { ac_try='test -s conftest$ac_exeext'
7056 { (eval echo "$as_me:7056: \"$ac_try\"") >&5
7059 echo "$as_me:7059: \$? = $ac_status" >&5
7060 (exit $ac_status); }; }; then
7062 cf_cv_find_linkage_utf8=yes
7063 cf_cv_header_path_utf8=/usr/include
7064 cf_cv_library_path_utf8=/usr/lib
7067 echo "$as_me: failed program was:" >&5
7068 cat conftest.$ac_ext >&5
7070 LIBS="-lutf8 $cf_save_LIBS"
7072 cat >conftest.$ac_ext <<_ACEOF
7073 #line 7073 "configure"
7074 #include "confdefs.h"
7076 #include <libutf8.h>
7085 rm -f conftest.$ac_objext conftest$ac_exeext
7086 if { (eval echo "$as_me:7086: \"$ac_link\"") >&5
7087 (eval $ac_link) 2>&5
7089 echo "$as_me:7089: \$? = $ac_status" >&5
7090 (exit $ac_status); } &&
7091 { ac_try='test -s conftest$ac_exeext'
7092 { (eval echo "$as_me:7092: \"$ac_try\"") >&5
7095 echo "$as_me:7095: \$? = $ac_status" >&5
7096 (exit $ac_status); }; }; then
7098 cf_cv_find_linkage_utf8=yes
7099 cf_cv_header_path_utf8=/usr/include
7100 cf_cv_library_path_utf8=/usr/lib
7101 cf_cv_library_file_utf8="-lutf8"
7104 echo "$as_me: failed program was:" >&5
7105 cat conftest.$ac_ext >&5
7107 cf_cv_find_linkage_utf8=no
7108 LIBS="$cf_save_LIBS"
7110 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
7112 echo "${as_me:-configure}:7112: testing find linkage for utf8 library ..." 1>&5
7114 echo "${as_me:-configure}:7114: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7116 cf_save_CPPFLAGS="$CPPFLAGS"
7117 cf_test_CPPFLAGS="$CPPFLAGS"
7121 # collect the current set of include-directories from compiler flags
7122 cf_header_path_list=""
7123 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7124 for cf_header_path in $CPPFLAGS $CFLAGS
7126 case $cf_header_path in
7128 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7130 test "x$cf_header_path" != "xNONE" && \
7131 test -d "$cf_header_path" && \
7133 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7134 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7135 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
7136 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
7137 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
7138 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7141 cf_header_path_list="$cf_header_path_list $cf_search"
7147 # add the variations for the package we are looking for
7151 test "x$prefix" != "xNONE" && \
7152 test -d "$prefix" && \
7154 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7155 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7156 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
7157 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
7158 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
7159 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
7162 for cf_subdir_prefix in \
7171 test "x$cf_subdir_prefix" != "x$prefix" && \
7172 test -d "$cf_subdir_prefix" && \
7173 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7174 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7175 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
7176 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
7177 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
7178 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
7179 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
7184 test "$includedir" != NONE && \
7185 test "$includedir" != "/usr/include" && \
7186 test -d "$includedir" && {
7187 test -d $includedir && cf_search="$cf_search $includedir"
7188 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7191 test "$oldincludedir" != NONE && \
7192 test "$oldincludedir" != "/usr/include" && \
7193 test -d "$oldincludedir" && {
7194 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7195 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7198 cf_search="$cf_search $cf_header_path_list"
7200 for cf_cv_header_path_utf8 in $cf_search
7202 if test -d $cf_cv_header_path_utf8 ; then
7203 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
7205 echo "${as_me:-configure}:7205: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7207 CPPFLAGS="$cf_save_CPPFLAGS"
7209 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7210 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
7212 cat >conftest.$ac_ext <<_ACEOF
7213 #line 7213 "configure"
7214 #include "confdefs.h"
7216 #include <libutf8.h>
7225 rm -f conftest.$ac_objext
7226 if { (eval echo "$as_me:7226: \"$ac_compile\"") >&5
7227 (eval $ac_compile) 2>&5
7229 echo "$as_me:7229: \$? = $ac_status" >&5
7230 (exit $ac_status); } &&
7231 { ac_try='test -s conftest.$ac_objext'
7232 { (eval echo "$as_me:7232: \"$ac_try\"") >&5
7235 echo "$as_me:7235: \$? = $ac_status" >&5
7236 (exit $ac_status); }; }; then
7238 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7240 echo "${as_me:-configure}:7240: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7242 cf_cv_find_linkage_utf8=maybe
7243 cf_test_CPPFLAGS="$CPPFLAGS"
7246 echo "$as_me: failed program was:" >&5
7247 cat conftest.$ac_ext >&5
7249 CPPFLAGS="$cf_save_CPPFLAGS"
7252 rm -f conftest.$ac_objext conftest.$ac_ext
7256 if test "$cf_cv_find_linkage_utf8" = maybe ; then
7258 echo "${as_me:-configure}:7258: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7260 cf_save_LIBS="$LIBS"
7261 cf_save_LDFLAGS="$LDFLAGS"
7263 if test "$cf_cv_find_linkage_utf8" != yes ; then
7266 cf_library_path_list=""
7267 if test -n "${LDFLAGS}${LIBS}" ; then
7268 for cf_library_path in $LDFLAGS $LIBS
7270 case $cf_library_path in
7272 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7274 test "x$cf_library_path" != "xNONE" && \
7275 test -d "$cf_library_path" && \
7277 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7278 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7279 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
7280 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7281 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
7282 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7285 cf_library_path_list="$cf_library_path_list $cf_search"
7293 test "x$prefix" != "xNONE" && \
7294 test -d "$prefix" && \
7296 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7297 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7298 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
7299 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
7300 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
7301 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
7304 for cf_subdir_prefix in \
7313 test "x$cf_subdir_prefix" != "x$prefix" && \
7314 test -d "$cf_subdir_prefix" && \
7315 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7316 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7317 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
7318 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
7319 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
7320 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
7321 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
7326 cf_search="$cf_library_path_list $cf_search"
7328 for cf_cv_library_path_utf8 in $cf_search
7330 if test -d $cf_cv_library_path_utf8 ; then
7331 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7333 echo "${as_me:-configure}:7333: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7335 CPPFLAGS="$cf_test_CPPFLAGS"
7336 LIBS="-lutf8 $cf_save_LIBS"
7337 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7338 cat >conftest.$ac_ext <<_ACEOF
7339 #line 7339 "configure"
7340 #include "confdefs.h"
7342 #include <libutf8.h>
7351 rm -f conftest.$ac_objext conftest$ac_exeext
7352 if { (eval echo "$as_me:7352: \"$ac_link\"") >&5
7353 (eval $ac_link) 2>&5
7355 echo "$as_me:7355: \$? = $ac_status" >&5
7356 (exit $ac_status); } &&
7357 { ac_try='test -s conftest$ac_exeext'
7358 { (eval echo "$as_me:7358: \"$ac_try\"") >&5
7361 echo "$as_me:7361: \$? = $ac_status" >&5
7362 (exit $ac_status); }; }; then
7364 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7366 echo "${as_me:-configure}:7366: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7368 cf_cv_find_linkage_utf8=yes
7369 cf_cv_library_file_utf8="-lutf8"
7372 echo "$as_me: failed program was:" >&5
7373 cat conftest.$ac_ext >&5
7375 CPPFLAGS="$cf_save_CPPFLAGS"
7376 LIBS="$cf_save_LIBS"
7377 LDFLAGS="$cf_save_LDFLAGS"
7380 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7383 CPPFLAGS="$cf_save_CPPFLAGS"
7384 LDFLAGS="$cf_save_LDFLAGS"
7388 cf_cv_find_linkage_utf8=no
7392 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7395 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7397 LIBS="$cf_save_LIBS"
7399 if test "$cf_cv_find_linkage_utf8" = yes ; then
7400 cf_cv_utf8_lib=add-on
7406 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7408 echo "$as_me:7408: result: $cf_cv_utf8_lib" >&5
7409 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7411 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7413 if test "$cf_cv_utf8_lib" = "add-on" ; then
7415 cat >>confdefs.h <<\EOF
7416 #define HAVE_LIBUTF8_H 1
7419 if test -n "$cf_cv_header_path_utf8" ; then
7420 for cf_add_incdir in $cf_cv_header_path_utf8
7422 while test $cf_add_incdir != /usr/include
7424 if test -d $cf_add_incdir
7427 if test -n "$CFLAGS$CPPFLAGS" ; then
7428 # a loop is needed to ensure we can add subdirs of existing dirs
7429 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7430 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7431 cf_have_incdir=yes; break
7436 if test "$cf_have_incdir" = no ; then
7437 if test "$cf_add_incdir" = /usr/local/include ; then
7438 if test "$GCC" = yes
7440 cf_save_CPPFLAGS=$CPPFLAGS
7442 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7443 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7445 cat >conftest.$ac_ext <<_ACEOF
7446 #line 7446 "configure"
7447 #include "confdefs.h"
7457 rm -f conftest.$ac_objext
7458 if { (eval echo "$as_me:7458: \"$ac_compile\"") >&5
7459 (eval $ac_compile) 2>&5
7461 echo "$as_me:7461: \$? = $ac_status" >&5
7462 (exit $ac_status); } &&
7463 { ac_try='test -s conftest.$ac_objext'
7464 { (eval echo "$as_me:7464: \"$ac_try\"") >&5
7467 echo "$as_me:7467: \$? = $ac_status" >&5
7468 (exit $ac_status); }; }; then
7471 echo "$as_me: failed program was:" >&5
7472 cat conftest.$ac_ext >&5
7475 rm -f conftest.$ac_objext conftest.$ac_ext
7476 CPPFLAGS=$cf_save_CPPFLAGS
7481 if test "$cf_have_incdir" = no ; then
7482 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7484 echo "${as_me:-configure}:7484: testing adding $cf_add_incdir to include-path ..." 1>&5
7486 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7488 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7489 test "$cf_top_incdir" = "$cf_add_incdir" && break
7490 cf_add_incdir="$cf_top_incdir"
7501 if test -n "$cf_cv_library_path_utf8" ; then
7502 for cf_add_libdir in $cf_cv_library_path_utf8
7504 if test $cf_add_libdir = /usr/lib ; then
7506 elif test -d $cf_add_libdir
7509 if test -n "$LDFLAGS$LIBS" ; then
7510 # a loop is needed to ensure we can add subdirs of existing dirs
7511 for cf_test_libdir in $LDFLAGS $LIBS ; do
7512 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7513 cf_have_libdir=yes; break
7517 if test "$cf_have_libdir" = no ; then
7518 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7520 echo "${as_me:-configure}:7520: testing adding $cf_add_libdir to library-path ..." 1>&5
7522 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7531 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7533 for cf_add_1lib in $cf_add_0lib; do
7534 for cf_add_2lib in $cf_add_libs; do
7535 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7540 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7546 cf_ncuconfig_root=$cf_cv_screen
7547 cf_have_ncuconfig=no
7549 if test "x${PKG_CONFIG:=none}" != xnone; then
7550 echo "$as_me:7550: checking pkg-config for $cf_ncuconfig_root" >&5
7551 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7552 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7553 echo "$as_me:7553: result: yes" >&5
7554 echo "${ECHO_T}yes" >&6
7556 echo "$as_me:7556: checking if the $cf_ncuconfig_root package files work" >&5
7557 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7558 cf_have_ncuconfig=unknown
7560 cf_save_CFLAGS="$CFLAGS"
7561 cf_save_CPPFLAGS="$CPPFLAGS"
7562 cf_save_LIBS="$LIBS"
7564 cf_pkg_cflags=`$PKG_CONFIG --cflags $cf_ncuconfig_root`
7565 cf_pkg_libs=`$PKG_CONFIG --libs $cf_ncuconfig_root`
7567 # while -W for passing linker flags is prevalent, it is not "standard".
7568 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7569 # incompatible _and_ non-standard -W option which gives an error. Work
7570 # around that pitfall.
7571 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7577 cf_new_extra_cppflags=
7579 for cf_add_cflags in $cf_pkg_cflags
7581 case $cf_fix_cppflags in
7583 case $cf_add_cflags in
7584 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7585 case $cf_add_cflags in
7587 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7589 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7590 && test -z "${cf_tst_cflags}" \
7591 && cf_fix_cppflags=yes
7593 if test $cf_fix_cppflags = yes ; then
7595 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7596 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7599 elif test "${cf_tst_cflags}" = "\"'" ; then
7601 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7602 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7612 case $cf_add_cflags in
7614 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7616 CPPFLAGS=`echo "$CPPFLAGS" | \
7617 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7618 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7623 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7624 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7631 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7632 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7639 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7640 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7642 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7644 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7645 && test -z "${cf_tst_cflags}" \
7646 && cf_fix_cppflags=no
7651 if test -n "$cf_new_cflags" ; then
7653 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7654 CFLAGS="${CFLAGS}$cf_new_cflags"
7658 if test -n "$cf_new_cppflags" ; then
7660 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7661 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7665 if test -n "$cf_new_extra_cppflags" ; then
7667 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7668 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7675 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7677 for cf_add_1lib in $cf_add_0lib; do
7678 for cf_add_2lib in $cf_add_libs; do
7679 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7684 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7688 cat >conftest.$ac_ext <<_ACEOF
7689 #line 7689 "configure"
7690 #include "confdefs.h"
7691 #include <${cf_cv_ncurses_header:-curses.h}>
7695 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7700 rm -f conftest.$ac_objext 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); } &&
7706 { ac_try='test -s conftest$ac_exeext'
7707 { (eval echo "$as_me:7707: \"$ac_try\"") >&5
7710 echo "$as_me:7710: \$? = $ac_status" >&5
7711 (exit $ac_status); }; }; then
7712 if test "$cross_compiling" = yes; then
7713 cf_test_ncuconfig=maybe
7715 cat >conftest.$ac_ext <<_ACEOF
7716 #line 7716 "configure"
7717 #include "confdefs.h"
7718 #include <${cf_cv_ncurses_header:-curses.h}>
7720 { char *xx = curses_version(); return (xx == 0); }
7722 rm -f conftest$ac_exeext
7723 if { (eval echo "$as_me:7723: \"$ac_link\"") >&5
7724 (eval $ac_link) 2>&5
7726 echo "$as_me:7726: \$? = $ac_status" >&5
7727 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7728 { (eval echo "$as_me:7728: \"$ac_try\"") >&5
7731 echo "$as_me:7731: \$? = $ac_status" >&5
7732 (exit $ac_status); }; }; then
7733 cf_test_ncuconfig=yes
7735 echo "$as_me: program exited with status $ac_status" >&5
7736 echo "$as_me: failed program was:" >&5
7737 cat conftest.$ac_ext >&5
7738 cf_test_ncuconfig=no
7740 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7743 echo "$as_me: failed program was:" >&5
7744 cat conftest.$ac_ext >&5
7745 cf_test_ncuconfig=no
7747 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7749 CFLAGS="$cf_save_CFLAGS"
7750 CPPFLAGS="$cf_save_CPPFLAGS"
7751 LIBS="$cf_save_LIBS"
7753 if test "x$cf_test_ncuconfig" != xyes; then
7754 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7755 cf_pkg_cflags="$cf_temp"
7756 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7757 cf_pkg_libs="$cf_temp"
7765 cf_new_extra_cppflags=
7767 for cf_add_cflags in $cf_pkg_cflags
7769 case $cf_fix_cppflags in
7771 case $cf_add_cflags in
7772 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7773 case $cf_add_cflags in
7775 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7777 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7778 && test -z "${cf_tst_cflags}" \
7779 && cf_fix_cppflags=yes
7781 if test $cf_fix_cppflags = yes ; then
7783 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7784 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7787 elif test "${cf_tst_cflags}" = "\"'" ; then
7789 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7790 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7800 case $cf_add_cflags in
7802 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7804 CPPFLAGS=`echo "$CPPFLAGS" | \
7805 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7806 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7811 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7812 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7819 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7820 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7827 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7828 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7830 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7832 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7833 && test -z "${cf_tst_cflags}" \
7834 && cf_fix_cppflags=no
7839 if test -n "$cf_new_cflags" ; then
7841 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7842 CFLAGS="${CFLAGS}$cf_new_cflags"
7846 if test -n "$cf_new_cppflags" ; then
7848 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7849 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7853 if test -n "$cf_new_extra_cppflags" ; then
7855 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7856 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7863 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7865 for cf_add_1lib in $cf_add_0lib; do
7866 for cf_add_2lib in $cf_add_libs; do
7867 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7872 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7876 cat >conftest.$ac_ext <<_ACEOF
7877 #line 7877 "configure"
7878 #include "confdefs.h"
7879 #include <${cf_cv_ncurses_header:-curses.h}>
7883 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7888 rm -f conftest.$ac_objext conftest$ac_exeext
7889 if { (eval echo "$as_me:7889: \"$ac_link\"") >&5
7890 (eval $ac_link) 2>&5
7892 echo "$as_me:7892: \$? = $ac_status" >&5
7893 (exit $ac_status); } &&
7894 { ac_try='test -s conftest$ac_exeext'
7895 { (eval echo "$as_me:7895: \"$ac_try\"") >&5
7898 echo "$as_me:7898: \$? = $ac_status" >&5
7899 (exit $ac_status); }; }; then
7900 if test "$cross_compiling" = yes; then
7901 cf_have_ncuconfig=maybe
7903 cat >conftest.$ac_ext <<_ACEOF
7904 #line 7904 "configure"
7905 #include "confdefs.h"
7906 #include <${cf_cv_ncurses_header:-curses.h}>
7908 { char *xx = curses_version(); return (xx == 0); }
7910 rm -f conftest$ac_exeext
7911 if { (eval echo "$as_me:7911: \"$ac_link\"") >&5
7912 (eval $ac_link) 2>&5
7914 echo "$as_me:7914: \$? = $ac_status" >&5
7915 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7916 { (eval echo "$as_me:7916: \"$ac_try\"") >&5
7919 echo "$as_me:7919: \$? = $ac_status" >&5
7920 (exit $ac_status); }; }; then
7921 cf_have_ncuconfig=yes
7923 echo "$as_me: program exited with status $ac_status" >&5
7924 echo "$as_me: failed program was:" >&5
7925 cat conftest.$ac_ext >&5
7926 cf_have_ncuconfig=no
7928 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7931 echo "$as_me: failed program was:" >&5
7932 cat conftest.$ac_ext >&5
7933 cf_have_ncuconfig=no
7935 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7936 echo "$as_me:7936: result: $cf_have_ncuconfig" >&5
7937 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7938 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7939 if test "$cf_have_ncuconfig" != "yes"
7941 CPPFLAGS="$cf_save_CPPFLAGS"
7942 LIBS="$cf_save_LIBS"
7943 NCURSES_CONFIG_PKG=none
7946 cat >>confdefs.h <<\EOF
7950 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7952 echo "$as_me:7952: checking for terminfo header" >&5
7953 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7954 if test "${cf_cv_term_header+set}" = set; then
7955 echo $ECHO_N "(cached) $ECHO_C" >&6
7958 case ${cf_cv_ncurses_header} in
7959 (*/ncurses.h|*/ncursesw.h)
7960 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7963 cf_term_header=term.h
7967 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7969 cat >conftest.$ac_ext <<_ACEOF
7970 #line 7970 "configure"
7971 #include "confdefs.h"
7973 #include <${cf_cv_ncurses_header:-curses.h}>
7979 int x = auto_left_margin; (void)x
7984 rm -f conftest.$ac_objext
7985 if { (eval echo "$as_me:7985: \"$ac_compile\"") >&5
7986 (eval $ac_compile) 2>&5
7988 echo "$as_me:7988: \$? = $ac_status" >&5
7989 (exit $ac_status); } &&
7990 { ac_try='test -s conftest.$ac_objext'
7991 { (eval echo "$as_me:7991: \"$ac_try\"") >&5
7994 echo "$as_me:7994: \$? = $ac_status" >&5
7995 (exit $ac_status); }; }; then
7997 cf_cv_term_header="$cf_test"
7999 echo "$as_me: failed program was:" >&5
8000 cat conftest.$ac_ext >&5
8002 cf_cv_term_header=unknown
8005 rm -f conftest.$ac_objext conftest.$ac_ext
8006 test "$cf_cv_term_header" != unknown && break
8010 echo "$as_me:8010: result: $cf_cv_term_header" >&5
8011 echo "${ECHO_T}$cf_cv_term_header" >&6
8013 # Set definitions to allow ifdef'ing to accommodate subdirectories
8015 case $cf_cv_term_header in
8018 cat >>confdefs.h <<\EOF
8019 #define HAVE_TERM_H 1
8025 case $cf_cv_term_header in
8028 cat >>confdefs.h <<\EOF
8029 #define HAVE_NCURSES_TERM_H 1
8035 cat >>confdefs.h <<\EOF
8036 #define HAVE_NCURSESW_TERM_H 1
8045 echo "$as_me:8045: result: no" >&5
8046 echo "${ECHO_T}no" >&6
8047 NCURSES_CONFIG_PKG=none
8050 NCURSES_CONFIG_PKG=none
8053 if test "x$cf_have_ncuconfig" = "xno"; then
8054 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
8056 if test -n "$ac_tool_prefix"; then
8057 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8059 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8060 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8061 echo "$as_me:8061: checking for $ac_word" >&5
8062 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8063 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8064 echo $ECHO_N "(cached) $ECHO_C" >&6
8066 if test -n "$NCURSES_CONFIG"; then
8067 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8069 ac_save_IFS=$IFS; IFS=$ac_path_separator
8071 for ac_dir in $ac_dummy; do
8073 test -z "$ac_dir" && ac_dir=.
8074 $as_executable_p "$ac_dir/$ac_word" || continue
8075 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8076 echo "$as_me:8076: found $ac_dir/$ac_word" >&5
8082 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8083 if test -n "$NCURSES_CONFIG"; then
8084 echo "$as_me:8084: result: $NCURSES_CONFIG" >&5
8085 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8087 echo "$as_me:8087: result: no" >&5
8088 echo "${ECHO_T}no" >&6
8091 test -n "$NCURSES_CONFIG" && break
8094 if test -z "$NCURSES_CONFIG"; then
8095 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8096 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8098 # Extract the first word of "$ac_prog", so it can be a program name with args.
8099 set dummy $ac_prog; ac_word=$2
8100 echo "$as_me:8100: checking for $ac_word" >&5
8101 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8102 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8103 echo $ECHO_N "(cached) $ECHO_C" >&6
8105 if test -n "$ac_ct_NCURSES_CONFIG"; then
8106 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8108 ac_save_IFS=$IFS; IFS=$ac_path_separator
8110 for ac_dir in $ac_dummy; do
8112 test -z "$ac_dir" && ac_dir=.
8113 $as_executable_p "$ac_dir/$ac_word" || continue
8114 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8115 echo "$as_me:8115: found $ac_dir/$ac_word" >&5
8121 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8122 if test -n "$ac_ct_NCURSES_CONFIG"; then
8123 echo "$as_me:8123: result: $ac_ct_NCURSES_CONFIG" >&5
8124 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8126 echo "$as_me:8126: result: no" >&5
8127 echo "${ECHO_T}no" >&6
8130 test -n "$ac_ct_NCURSES_CONFIG" && break
8132 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8134 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8137 if test "$NCURSES_CONFIG" != none ; then
8142 cf_new_extra_cppflags=
8144 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
8146 case $cf_fix_cppflags in
8148 case $cf_add_cflags in
8149 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8150 case $cf_add_cflags in
8152 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8154 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8155 && test -z "${cf_tst_cflags}" \
8156 && cf_fix_cppflags=yes
8158 if test $cf_fix_cppflags = yes ; then
8160 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8161 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8164 elif test "${cf_tst_cflags}" = "\"'" ; then
8166 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8167 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8177 case $cf_add_cflags in
8179 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8181 CPPFLAGS=`echo "$CPPFLAGS" | \
8182 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8183 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8188 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8189 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8196 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8197 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8204 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8205 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8207 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8209 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8210 && test -z "${cf_tst_cflags}" \
8211 && cf_fix_cppflags=no
8216 if test -n "$cf_new_cflags" ; then
8218 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8219 CFLAGS="${CFLAGS}$cf_new_cflags"
8223 if test -n "$cf_new_cppflags" ; then
8225 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8226 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8230 if test -n "$cf_new_extra_cppflags" ; then
8232 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8233 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8240 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8242 for cf_add_1lib in $cf_add_0lib; do
8243 for cf_add_2lib in $cf_add_libs; do
8244 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8249 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8253 # even with config script, some packages use no-override for curses.h
8255 echo "$as_me:8255: checking if we have identified curses headers" >&5
8256 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8257 if test "${cf_cv_ncurses_header+set}" = set; then
8258 echo $ECHO_N "(cached) $ECHO_C" >&6
8261 cf_cv_ncurses_header=none
8263 ncurses.h $cf_cv_screen/ncurses.h \
8264 curses.h $cf_cv_screen/curses.h
8266 cat >conftest.$ac_ext <<_ACEOF
8267 #line 8267 "configure"
8268 #include "confdefs.h"
8269 #include <${cf_header}>
8273 initscr(); tgoto("?", 0,0)
8278 rm -f conftest.$ac_objext
8279 if { (eval echo "$as_me:8279: \"$ac_compile\"") >&5
8280 (eval $ac_compile) 2>&5
8282 echo "$as_me:8282: \$? = $ac_status" >&5
8283 (exit $ac_status); } &&
8284 { ac_try='test -s conftest.$ac_objext'
8285 { (eval echo "$as_me:8285: \"$ac_try\"") >&5
8288 echo "$as_me:8288: \$? = $ac_status" >&5
8289 (exit $ac_status); }; }; then
8290 cf_cv_ncurses_header=$cf_header; break
8292 echo "$as_me: failed program was:" >&5
8293 cat conftest.$ac_ext >&5
8295 rm -f conftest.$ac_objext conftest.$ac_ext
8299 echo "$as_me:8299: result: $cf_cv_ncurses_header" >&5
8300 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8302 if test "$cf_cv_ncurses_header" = none ; then
8303 { { echo "$as_me:8303: error: No curses header-files found" >&5
8304 echo "$as_me: error: No curses header-files found" >&2;}
8305 { (exit 1); exit 1; }; }
8308 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8310 for ac_header in $cf_cv_ncurses_header
8312 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8313 echo "$as_me:8313: checking for $ac_header" >&5
8314 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8315 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8316 echo $ECHO_N "(cached) $ECHO_C" >&6
8318 cat >conftest.$ac_ext <<_ACEOF
8319 #line 8319 "configure"
8320 #include "confdefs.h"
8321 #include <$ac_header>
8323 if { (eval echo "$as_me:8323: \"$ac_cpp conftest.$ac_ext\"") >&5
8324 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8326 egrep -v '^ *\+' conftest.er1 >conftest.err
8328 cat conftest.err >&5
8329 echo "$as_me:8329: \$? = $ac_status" >&5
8330 (exit $ac_status); } >/dev/null; then
8331 if test -s conftest.err; then
8332 ac_cpp_err=$ac_c_preproc_warn_flag
8339 if test -z "$ac_cpp_err"; then
8340 eval "$as_ac_Header=yes"
8342 echo "$as_me: failed program was:" >&5
8343 cat conftest.$ac_ext >&5
8344 eval "$as_ac_Header=no"
8346 rm -f conftest.err conftest.$ac_ext
8348 echo "$as_me:8348: result: `eval echo '${'$as_ac_Header'}'`" >&5
8349 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8350 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8351 cat >>confdefs.h <<EOF
8352 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8358 cat >>confdefs.h <<\EOF
8362 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8364 cat >>confdefs.h <<EOF
8365 #define $cf_nculib_ROOT 1
8368 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8372 cf_ncuhdr_root=$cf_cv_screen
8374 test -n "$cf_cv_curses_dir" && \
8375 test "$cf_cv_curses_dir" != "no" && { \
8377 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8378 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8380 while test $cf_add_incdir != /usr/include
8382 if test -d $cf_add_incdir
8385 if test -n "$CFLAGS$CPPFLAGS" ; then
8386 # a loop is needed to ensure we can add subdirs of existing dirs
8387 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8388 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8389 cf_have_incdir=yes; break
8394 if test "$cf_have_incdir" = no ; then
8395 if test "$cf_add_incdir" = /usr/local/include ; then
8396 if test "$GCC" = yes
8398 cf_save_CPPFLAGS=$CPPFLAGS
8400 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8401 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8403 cat >conftest.$ac_ext <<_ACEOF
8404 #line 8404 "configure"
8405 #include "confdefs.h"
8415 rm -f conftest.$ac_objext
8416 if { (eval echo "$as_me:8416: \"$ac_compile\"") >&5
8417 (eval $ac_compile) 2>&5
8419 echo "$as_me:8419: \$? = $ac_status" >&5
8420 (exit $ac_status); } &&
8421 { ac_try='test -s conftest.$ac_objext'
8422 { (eval echo "$as_me:8422: \"$ac_try\"") >&5
8425 echo "$as_me:8425: \$? = $ac_status" >&5
8426 (exit $ac_status); }; }; then
8429 echo "$as_me: failed program was:" >&5
8430 cat conftest.$ac_ext >&5
8433 rm -f conftest.$ac_objext conftest.$ac_ext
8434 CPPFLAGS=$cf_save_CPPFLAGS
8439 if test "$cf_have_incdir" = no ; then
8440 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8442 echo "${as_me:-configure}:8442: testing adding $cf_add_incdir to include-path ..." 1>&5
8444 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8446 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8447 test "$cf_top_incdir" = "$cf_add_incdir" && break
8448 cf_add_incdir="$cf_top_incdir"
8461 echo "$as_me:8461: checking for $cf_ncuhdr_root header in include-path" >&5
8462 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8463 if test "${cf_cv_ncurses_h+set}" = set; then
8464 echo $ECHO_N "(cached) $ECHO_C" >&6
8467 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8468 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8469 for cf_header in $cf_header_list
8472 cat >conftest.$ac_ext <<_ACEOF
8473 #line 8473 "configure"
8474 #include "confdefs.h"
8476 #include <$cf_header>
8481 #ifdef NCURSES_VERSION
8483 printf("%s\n", NCURSES_VERSION);
8496 rm -f conftest.$ac_objext
8497 if { (eval echo "$as_me:8497: \"$ac_compile\"") >&5
8498 (eval $ac_compile) 2>&5
8500 echo "$as_me:8500: \$? = $ac_status" >&5
8501 (exit $ac_status); } &&
8502 { ac_try='test -s conftest.$ac_objext'
8503 { (eval echo "$as_me:8503: \"$ac_try\"") >&5
8506 echo "$as_me:8506: \$? = $ac_status" >&5
8507 (exit $ac_status); }; }; then
8508 cf_cv_ncurses_h=$cf_header
8511 echo "$as_me: failed program was:" >&5
8512 cat conftest.$ac_ext >&5
8515 rm -f conftest.$ac_objext conftest.$ac_ext
8517 test "$cf_cv_ncurses_h" != no && break
8521 echo "$as_me:8521: result: $cf_cv_ncurses_h" >&5
8522 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8524 if test "$cf_cv_ncurses_h" != no ; then
8525 cf_cv_ncurses_header=$cf_cv_ncurses_h
8528 echo "$as_me:8528: checking for $cf_ncuhdr_root include-path" >&5
8529 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8530 if test "${cf_cv_ncurses_h2+set}" = set; then
8531 echo $ECHO_N "(cached) $ECHO_C" >&6
8534 test -n "$verbose" && echo
8538 # collect the current set of include-directories from compiler flags
8539 cf_header_path_list=""
8540 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8541 for cf_header_path in $CPPFLAGS $CFLAGS
8543 case $cf_header_path in
8545 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8547 test "x$cf_header_path" != "xNONE" && \
8548 test -d "$cf_header_path" && \
8550 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8551 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
8552 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8553 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8554 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8555 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"
8558 cf_header_path_list="$cf_header_path_list $cf_search"
8564 # add the variations for the package we are looking for
8568 test "x$prefix" != "xNONE" && \
8569 test -d "$prefix" && \
8571 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8572 test -d $prefix/include && cf_search="$cf_search $prefix/include"
8573 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8574 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8575 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8576 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8579 for cf_subdir_prefix in \
8588 test "x$cf_subdir_prefix" != "x$prefix" && \
8589 test -d "$cf_subdir_prefix" && \
8590 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8591 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8592 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
8593 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8594 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8595 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8596 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"
8601 test "$includedir" != NONE && \
8602 test "$includedir" != "/usr/include" && \
8603 test -d "$includedir" && {
8604 test -d $includedir && cf_search="$cf_search $includedir"
8605 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8608 test "$oldincludedir" != NONE && \
8609 test "$oldincludedir" != "/usr/include" && \
8610 test -d "$oldincludedir" && {
8611 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8612 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8615 cf_search="$cf_search $cf_header_path_list"
8617 test -n "$verbose" && echo search path $cf_search
8618 cf_save2_CPPFLAGS="$CPPFLAGS"
8619 for cf_incdir in $cf_search
8622 if test -n "$cf_incdir" ; then
8623 for cf_add_incdir in $cf_incdir
8625 while test $cf_add_incdir != /usr/include
8627 if test -d $cf_add_incdir
8630 if test -n "$CFLAGS$CPPFLAGS" ; then
8631 # a loop is needed to ensure we can add subdirs of existing dirs
8632 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8633 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8634 cf_have_incdir=yes; break
8639 if test "$cf_have_incdir" = no ; then
8640 if test "$cf_add_incdir" = /usr/local/include ; then
8641 if test "$GCC" = yes
8643 cf_save_CPPFLAGS=$CPPFLAGS
8645 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8646 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8648 cat >conftest.$ac_ext <<_ACEOF
8649 #line 8649 "configure"
8650 #include "confdefs.h"
8660 rm -f conftest.$ac_objext
8661 if { (eval echo "$as_me:8661: \"$ac_compile\"") >&5
8662 (eval $ac_compile) 2>&5
8664 echo "$as_me:8664: \$? = $ac_status" >&5
8665 (exit $ac_status); } &&
8666 { ac_try='test -s conftest.$ac_objext'
8667 { (eval echo "$as_me:8667: \"$ac_try\"") >&5
8670 echo "$as_me:8670: \$? = $ac_status" >&5
8671 (exit $ac_status); }; }; then
8674 echo "$as_me: failed program was:" >&5
8675 cat conftest.$ac_ext >&5
8678 rm -f conftest.$ac_objext conftest.$ac_ext
8679 CPPFLAGS=$cf_save_CPPFLAGS
8684 if test "$cf_have_incdir" = no ; then
8685 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8687 echo "${as_me:-configure}:8687: testing adding $cf_add_incdir to include-path ..." 1>&5
8689 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8691 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8692 test "$cf_top_incdir" = "$cf_add_incdir" && break
8693 cf_add_incdir="$cf_top_incdir"
8709 cat >conftest.$ac_ext <<_ACEOF
8710 #line 8710 "configure"
8711 #include "confdefs.h"
8713 #include <$cf_header>
8718 #ifdef NCURSES_VERSION
8720 printf("%s\n", NCURSES_VERSION);
8733 rm -f conftest.$ac_objext
8734 if { (eval echo "$as_me:8734: \"$ac_compile\"") >&5
8735 (eval $ac_compile) 2>&5
8737 echo "$as_me:8737: \$? = $ac_status" >&5
8738 (exit $ac_status); } &&
8739 { ac_try='test -s conftest.$ac_objext'
8740 { (eval echo "$as_me:8740: \"$ac_try\"") >&5
8743 echo "$as_me:8743: \$? = $ac_status" >&5
8744 (exit $ac_status); }; }; then
8745 cf_cv_ncurses_h2=$cf_header
8748 echo "$as_me: failed program was:" >&5
8749 cat conftest.$ac_ext >&5
8752 rm -f conftest.$ac_objext conftest.$ac_ext
8754 if test "$cf_cv_ncurses_h2" != no ; then
8755 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8756 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8759 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8761 CPPFLAGS="$cf_save2_CPPFLAGS"
8762 test "$cf_cv_ncurses_h2" != no && break
8764 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8764: error: not found" >&5
8765 echo "$as_me: error: not found" >&2;}
8766 { (exit 1); exit 1; }; }
8769 echo "$as_me:8769: result: $cf_cv_ncurses_h2" >&5
8770 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8772 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8773 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8774 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8775 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8778 if test -n "$cf_1st_incdir" ; then
8779 for cf_add_incdir in $cf_1st_incdir
8781 while test $cf_add_incdir != /usr/include
8783 if test -d $cf_add_incdir
8786 if test -n "$CFLAGS$CPPFLAGS" ; then
8787 # a loop is needed to ensure we can add subdirs of existing dirs
8788 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8789 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8790 cf_have_incdir=yes; break
8795 if test "$cf_have_incdir" = no ; then
8796 if test "$cf_add_incdir" = /usr/local/include ; then
8797 if test "$GCC" = yes
8799 cf_save_CPPFLAGS=$CPPFLAGS
8801 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8802 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8804 cat >conftest.$ac_ext <<_ACEOF
8805 #line 8805 "configure"
8806 #include "confdefs.h"
8816 rm -f conftest.$ac_objext
8817 if { (eval echo "$as_me:8817: \"$ac_compile\"") >&5
8818 (eval $ac_compile) 2>&5
8820 echo "$as_me:8820: \$? = $ac_status" >&5
8821 (exit $ac_status); } &&
8822 { ac_try='test -s conftest.$ac_objext'
8823 { (eval echo "$as_me:8823: \"$ac_try\"") >&5
8826 echo "$as_me:8826: \$? = $ac_status" >&5
8827 (exit $ac_status); }; }; then
8830 echo "$as_me: failed program was:" >&5
8831 cat conftest.$ac_ext >&5
8834 rm -f conftest.$ac_objext conftest.$ac_ext
8835 CPPFLAGS=$cf_save_CPPFLAGS
8840 if test "$cf_have_incdir" = no ; then
8841 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8843 echo "${as_me:-configure}:8843: testing adding $cf_add_incdir to include-path ..." 1>&5
8845 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8847 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8848 test "$cf_top_incdir" = "$cf_add_incdir" && break
8849 cf_add_incdir="$cf_top_incdir"
8862 # Set definitions to allow ifdef'ing for ncurses.h
8864 case $cf_cv_ncurses_header in
8867 cat >>confdefs.h <<\EOF
8868 #define HAVE_NCURSES_H 1
8874 case $cf_cv_ncurses_header in
8875 (ncurses/curses.h|ncurses/ncurses.h)
8877 cat >>confdefs.h <<\EOF
8878 #define HAVE_NCURSES_NCURSES_H 1
8882 (ncursesw/curses.h|ncursesw/ncurses.h)
8884 cat >>confdefs.h <<\EOF
8885 #define HAVE_NCURSESW_NCURSES_H 1
8891 echo "$as_me:8891: checking for terminfo header" >&5
8892 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8893 if test "${cf_cv_term_header+set}" = set; then
8894 echo $ECHO_N "(cached) $ECHO_C" >&6
8897 case ${cf_cv_ncurses_header} in
8898 (*/ncurses.h|*/ncursesw.h)
8899 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8902 cf_term_header=term.h
8906 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8908 cat >conftest.$ac_ext <<_ACEOF
8909 #line 8909 "configure"
8910 #include "confdefs.h"
8912 #include <${cf_cv_ncurses_header:-curses.h}>
8918 int x = auto_left_margin; (void)x
8923 rm -f conftest.$ac_objext
8924 if { (eval echo "$as_me:8924: \"$ac_compile\"") >&5
8925 (eval $ac_compile) 2>&5
8927 echo "$as_me:8927: \$? = $ac_status" >&5
8928 (exit $ac_status); } &&
8929 { ac_try='test -s conftest.$ac_objext'
8930 { (eval echo "$as_me:8930: \"$ac_try\"") >&5
8933 echo "$as_me:8933: \$? = $ac_status" >&5
8934 (exit $ac_status); }; }; then
8936 cf_cv_term_header="$cf_test"
8938 echo "$as_me: failed program was:" >&5
8939 cat conftest.$ac_ext >&5
8941 cf_cv_term_header=unknown
8944 rm -f conftest.$ac_objext conftest.$ac_ext
8945 test "$cf_cv_term_header" != unknown && break
8949 echo "$as_me:8949: result: $cf_cv_term_header" >&5
8950 echo "${ECHO_T}$cf_cv_term_header" >&6
8952 # Set definitions to allow ifdef'ing to accommodate subdirectories
8954 case $cf_cv_term_header in
8957 cat >>confdefs.h <<\EOF
8958 #define HAVE_TERM_H 1
8964 case $cf_cv_term_header in
8967 cat >>confdefs.h <<\EOF
8968 #define HAVE_NCURSES_TERM_H 1
8974 cat >>confdefs.h <<\EOF
8975 #define HAVE_NCURSESW_TERM_H 1
8981 # some applications need this, but should check for NCURSES_VERSION
8983 cat >>confdefs.h <<\EOF
8987 echo "$as_me:8987: checking for ncurses version" >&5
8988 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8989 if test "${cf_cv_ncurses_version+set}" = set; then
8990 echo $ECHO_N "(cached) $ECHO_C" >&6
8993 cf_cv_ncurses_version=no
8996 if test "$cross_compiling" = yes; then
8998 # This will not work if the preprocessor splits the line after the
8999 # Autoconf token. The 'unproto' program does that.
9000 cat > conftest.$ac_ext <<EOF
9001 #include <${cf_cv_ncurses_header:-curses.h}>
9003 #ifdef NCURSES_VERSION
9004 Autoconf NCURSES_VERSION
9012 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9013 { (eval echo "$as_me:9013: \"$cf_try\"") >&5
9016 echo "$as_me:9016: \$? = $ac_status" >&5
9017 (exit $ac_status); }
9018 if test -f conftest.out ; then
9019 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
9020 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9025 cat >conftest.$ac_ext <<_ACEOF
9026 #line 9026 "configure"
9027 #include "confdefs.h"
9029 #include <${cf_cv_ncurses_header:-curses.h}>
9033 FILE *fp = fopen("$cf_tempfile", "w");
9034 #ifdef NCURSES_VERSION
9035 # ifdef NCURSES_VERSION_PATCH
9036 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9038 fprintf(fp, "%s\n", NCURSES_VERSION);
9042 fprintf(fp, "old\n");
9047 ${cf_cv_main_return:-return}(0);
9050 rm -f conftest$ac_exeext
9051 if { (eval echo "$as_me:9051: \"$ac_link\"") >&5
9052 (eval $ac_link) 2>&5
9054 echo "$as_me:9054: \$? = $ac_status" >&5
9055 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9056 { (eval echo "$as_me:9056: \"$ac_try\"") >&5
9059 echo "$as_me:9059: \$? = $ac_status" >&5
9060 (exit $ac_status); }; }; then
9062 cf_cv_ncurses_version=`cat $cf_tempfile`
9064 echo "$as_me: program exited with status $ac_status" >&5
9065 echo "$as_me: failed program was:" >&5
9066 cat conftest.$ac_ext >&5
9068 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9073 echo "$as_me:9073: result: $cf_cv_ncurses_version" >&5
9074 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9075 test "$cf_cv_ncurses_version" = no ||
9076 cat >>confdefs.h <<\EOF
9080 cf_nculib_root=$cf_cv_screen
9081 # This works, except for the special case where we find gpm, but
9082 # ncurses is in a nonstandard location via $LIBS, and we really want
9085 cf_ncurses_SAVE="$LIBS"
9086 echo "$as_me:9086: checking for Gpm_Open in -lgpm" >&5
9087 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9088 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9089 echo $ECHO_N "(cached) $ECHO_C" >&6
9091 ac_check_lib_save_LIBS=$LIBS
9093 cat >conftest.$ac_ext <<_ACEOF
9094 #line 9094 "configure"
9095 #include "confdefs.h"
9097 /* Override any gcc2 internal prototype to avoid an error. */
9101 /* We use char because int might match the return type of a gcc2
9102 builtin and then its argument prototype would still apply. */
9112 rm -f conftest.$ac_objext conftest$ac_exeext
9113 if { (eval echo "$as_me:9113: \"$ac_link\"") >&5
9114 (eval $ac_link) 2>&5
9116 echo "$as_me:9116: \$? = $ac_status" >&5
9117 (exit $ac_status); } &&
9118 { ac_try='test -s conftest$ac_exeext'
9119 { (eval echo "$as_me:9119: \"$ac_try\"") >&5
9122 echo "$as_me:9122: \$? = $ac_status" >&5
9123 (exit $ac_status); }; }; then
9124 ac_cv_lib_gpm_Gpm_Open=yes
9126 echo "$as_me: failed program was:" >&5
9127 cat conftest.$ac_ext >&5
9128 ac_cv_lib_gpm_Gpm_Open=no
9130 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9131 LIBS=$ac_check_lib_save_LIBS
9133 echo "$as_me:9133: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9134 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9135 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
9136 echo "$as_me:9136: checking for initscr in -lgpm" >&5
9137 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9138 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9139 echo $ECHO_N "(cached) $ECHO_C" >&6
9141 ac_check_lib_save_LIBS=$LIBS
9143 cat >conftest.$ac_ext <<_ACEOF
9144 #line 9144 "configure"
9145 #include "confdefs.h"
9147 /* Override any gcc2 internal prototype to avoid an error. */
9151 /* We use char because int might match the return type of a gcc2
9152 builtin and then its argument prototype would still apply. */
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 ac_cv_lib_gpm_initscr=yes
9176 echo "$as_me: failed program was:" >&5
9177 cat conftest.$ac_ext >&5
9178 ac_cv_lib_gpm_initscr=no
9180 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9181 LIBS=$ac_check_lib_save_LIBS
9183 echo "$as_me:9183: result: $ac_cv_lib_gpm_initscr" >&5
9184 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9185 if test $ac_cv_lib_gpm_initscr = yes; then
9186 LIBS="$cf_ncurses_SAVE"
9188 cf_ncurses_LIBS="-lgpm"
9195 # This is only necessary if you are linking against an obsolete
9196 # version of ncurses (but it should do no harm, since it's static).
9197 if test "$cf_nculib_root" = ncurses ; then
9198 echo "$as_me:9198: checking for tgoto in -lmytinfo" >&5
9199 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9200 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9201 echo $ECHO_N "(cached) $ECHO_C" >&6
9203 ac_check_lib_save_LIBS=$LIBS
9204 LIBS="-lmytinfo $LIBS"
9205 cat >conftest.$ac_ext <<_ACEOF
9206 #line 9206 "configure"
9207 #include "confdefs.h"
9209 /* Override any gcc2 internal prototype to avoid an error. */
9213 /* We use char because int might match the return type of a gcc2
9214 builtin and then its argument prototype would still apply. */
9224 rm -f conftest.$ac_objext conftest$ac_exeext
9225 if { (eval echo "$as_me:9225: \"$ac_link\"") >&5
9226 (eval $ac_link) 2>&5
9228 echo "$as_me:9228: \$? = $ac_status" >&5
9229 (exit $ac_status); } &&
9230 { ac_try='test -s conftest$ac_exeext'
9231 { (eval echo "$as_me:9231: \"$ac_try\"") >&5
9234 echo "$as_me:9234: \$? = $ac_status" >&5
9235 (exit $ac_status); }; }; then
9236 ac_cv_lib_mytinfo_tgoto=yes
9238 echo "$as_me: failed program was:" >&5
9239 cat conftest.$ac_ext >&5
9240 ac_cv_lib_mytinfo_tgoto=no
9242 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9243 LIBS=$ac_check_lib_save_LIBS
9245 echo "$as_me:9245: result: $ac_cv_lib_mytinfo_tgoto" >&5
9246 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9247 if test $ac_cv_lib_mytinfo_tgoto = yes; then
9248 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9258 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9260 for cf_add_1lib in $cf_add_0lib; do
9261 for cf_add_2lib in $cf_add_libs; do
9262 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9267 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9271 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
9277 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9279 for cf_add_1lib in $cf_add_0lib; do
9280 for cf_add_2lib in $cf_add_libs; do
9281 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9286 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9292 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9294 echo "$as_me:9294: checking for initscr" >&5
9295 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9296 if test "${ac_cv_func_initscr+set}" = set; then
9297 echo $ECHO_N "(cached) $ECHO_C" >&6
9299 cat >conftest.$ac_ext <<_ACEOF
9300 #line 9300 "configure"
9301 #include "confdefs.h"
9302 #define initscr autoconf_temporary
9303 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9310 /* We use char because int might match the return type of a gcc2
9311 builtin and then its argument prototype would still apply. */
9312 char initscr (void);
9318 /* The GNU C library defines stubs for functions which it implements
9319 to always fail with ENOSYS. Some functions are actually named
9320 something starting with __ and the normal name is an alias. */
9321 #if defined (__stub_initscr) || defined (__stub___initscr)
9322 #error found stub for initscr
9330 rm -f conftest.$ac_objext conftest$ac_exeext
9331 if { (eval echo "$as_me:9331: \"$ac_link\"") >&5
9332 (eval $ac_link) 2>&5
9334 echo "$as_me:9334: \$? = $ac_status" >&5
9335 (exit $ac_status); } &&
9336 { ac_try='test -s conftest$ac_exeext'
9337 { (eval echo "$as_me:9337: \"$ac_try\"") >&5
9340 echo "$as_me:9340: \$? = $ac_status" >&5
9341 (exit $ac_status); }; }; then
9342 ac_cv_func_initscr=yes
9344 echo "$as_me: failed program was:" >&5
9345 cat conftest.$ac_ext >&5
9346 ac_cv_func_initscr=no
9348 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9350 echo "$as_me:9350: result: $ac_cv_func_initscr" >&5
9351 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9352 if test $ac_cv_func_initscr = yes; then
9353 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9356 cf_save_LIBS="$LIBS"
9357 echo "$as_me:9357: checking for initscr in -l$cf_nculib_root" >&5
9358 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9359 LIBS="-l$cf_nculib_root $LIBS"
9360 cat >conftest.$ac_ext <<_ACEOF
9361 #line 9361 "configure"
9362 #include "confdefs.h"
9363 #include <${cf_cv_ncurses_header:-curses.h}>
9372 rm -f conftest.$ac_objext conftest$ac_exeext
9373 if { (eval echo "$as_me:9373: \"$ac_link\"") >&5
9374 (eval $ac_link) 2>&5
9376 echo "$as_me:9376: \$? = $ac_status" >&5
9377 (exit $ac_status); } &&
9378 { ac_try='test -s conftest$ac_exeext'
9379 { (eval echo "$as_me:9379: \"$ac_try\"") >&5
9382 echo "$as_me:9382: \$? = $ac_status" >&5
9383 (exit $ac_status); }; }; then
9384 echo "$as_me:9384: result: yes" >&5
9385 echo "${ECHO_T}yes" >&6
9386 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9389 echo "$as_me: failed program was:" >&5
9390 cat conftest.$ac_ext >&5
9391 echo "$as_me:9391: result: no" >&5
9392 echo "${ECHO_T}no" >&6
9395 cf_library_path_list=""
9396 if test -n "${LDFLAGS}${LIBS}" ; then
9397 for cf_library_path in $LDFLAGS $LIBS
9399 case $cf_library_path in
9401 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9403 test "x$cf_library_path" != "xNONE" && \
9404 test -d "$cf_library_path" && \
9406 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9407 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9408 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9409 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9410 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9411 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"
9414 cf_library_path_list="$cf_library_path_list $cf_search"
9422 test "x$prefix" != "xNONE" && \
9423 test -d "$prefix" && \
9425 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9426 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9427 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9428 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9429 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9430 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9433 for cf_subdir_prefix in \
9442 test "x$cf_subdir_prefix" != "x$prefix" && \
9443 test -d "$cf_subdir_prefix" && \
9444 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9445 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9446 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
9447 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9448 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9449 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9450 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"
9455 cf_search="$cf_library_path_list $cf_search"
9457 for cf_libdir in $cf_search
9459 echo "$as_me:9459: checking for -l$cf_nculib_root in $cf_libdir" >&5
9460 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9461 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9462 cat >conftest.$ac_ext <<_ACEOF
9463 #line 9463 "configure"
9464 #include "confdefs.h"
9465 #include <${cf_cv_ncurses_header:-curses.h}>
9474 rm -f conftest.$ac_objext conftest$ac_exeext
9475 if { (eval echo "$as_me:9475: \"$ac_link\"") >&5
9476 (eval $ac_link) 2>&5
9478 echo "$as_me:9478: \$? = $ac_status" >&5
9479 (exit $ac_status); } &&
9480 { ac_try='test -s conftest$ac_exeext'
9481 { (eval echo "$as_me:9481: \"$ac_try\"") >&5
9484 echo "$as_me:9484: \$? = $ac_status" >&5
9485 (exit $ac_status); }; }; then
9486 echo "$as_me:9486: result: yes" >&5
9487 echo "${ECHO_T}yes" >&6
9488 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9491 echo "$as_me: failed program was:" >&5
9492 cat conftest.$ac_ext >&5
9493 echo "$as_me:9493: result: no" >&5
9494 echo "${ECHO_T}no" >&6
9495 LIBS="$cf_save_LIBS"
9497 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9501 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9505 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9507 if test $cf_found_library = no ; then
9508 { { echo "$as_me:9508: error: Cannot link $cf_nculib_root library" >&5
9509 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9510 { (exit 1); exit 1; }; }
9515 if test -n "$cf_ncurses_LIBS" ; then
9516 echo "$as_me:9516: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9517 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9518 cf_ncurses_SAVE="$LIBS"
9519 for p in $cf_ncurses_LIBS ; do
9520 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9521 if test "$q" != "$LIBS" ; then
9525 cat >conftest.$ac_ext <<_ACEOF
9526 #line 9526 "configure"
9527 #include "confdefs.h"
9528 #include <${cf_cv_ncurses_header:-curses.h}>
9532 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9537 rm -f conftest.$ac_objext conftest$ac_exeext
9538 if { (eval echo "$as_me:9538: \"$ac_link\"") >&5
9539 (eval $ac_link) 2>&5
9541 echo "$as_me:9541: \$? = $ac_status" >&5
9542 (exit $ac_status); } &&
9543 { ac_try='test -s conftest$ac_exeext'
9544 { (eval echo "$as_me:9544: \"$ac_try\"") >&5
9547 echo "$as_me:9547: \$? = $ac_status" >&5
9548 (exit $ac_status); }; }; then
9549 echo "$as_me:9549: result: yes" >&5
9550 echo "${ECHO_T}yes" >&6
9552 echo "$as_me: failed program was:" >&5
9553 cat conftest.$ac_ext >&5
9554 echo "$as_me:9554: result: no" >&5
9555 echo "${ECHO_T}no" >&6
9556 LIBS="$cf_ncurses_SAVE"
9558 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9561 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9563 cat >>confdefs.h <<EOF
9564 #define $cf_nculib_ROOT 1
9575 cf_ncuconfig_root=$cf_cv_screen
9576 cf_have_ncuconfig=no
9578 if test "x${PKG_CONFIG:=none}" != xnone; then
9579 echo "$as_me:9579: checking pkg-config for $cf_ncuconfig_root" >&5
9580 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9581 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9582 echo "$as_me:9582: result: yes" >&5
9583 echo "${ECHO_T}yes" >&6
9585 echo "$as_me:9585: checking if the $cf_ncuconfig_root package files work" >&5
9586 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9587 cf_have_ncuconfig=unknown
9589 cf_save_CFLAGS="$CFLAGS"
9590 cf_save_CPPFLAGS="$CPPFLAGS"
9591 cf_save_LIBS="$LIBS"
9593 cf_pkg_cflags=`$PKG_CONFIG --cflags $cf_ncuconfig_root`
9594 cf_pkg_libs=`$PKG_CONFIG --libs $cf_ncuconfig_root`
9596 # while -W for passing linker flags is prevalent, it is not "standard".
9597 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9598 # incompatible _and_ non-standard -W option which gives an error. Work
9599 # around that pitfall.
9600 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9606 cf_new_extra_cppflags=
9608 for cf_add_cflags in $cf_pkg_cflags
9610 case $cf_fix_cppflags in
9612 case $cf_add_cflags in
9613 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9614 case $cf_add_cflags in
9616 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9618 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9619 && test -z "${cf_tst_cflags}" \
9620 && cf_fix_cppflags=yes
9622 if test $cf_fix_cppflags = yes ; then
9624 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9625 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9628 elif test "${cf_tst_cflags}" = "\"'" ; then
9630 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9631 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9641 case $cf_add_cflags in
9643 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9645 CPPFLAGS=`echo "$CPPFLAGS" | \
9646 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9647 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9652 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9653 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9660 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9661 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9668 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9669 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9671 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9673 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9674 && test -z "${cf_tst_cflags}" \
9675 && cf_fix_cppflags=no
9680 if test -n "$cf_new_cflags" ; then
9682 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9683 CFLAGS="${CFLAGS}$cf_new_cflags"
9687 if test -n "$cf_new_cppflags" ; then
9689 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9690 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9694 if test -n "$cf_new_extra_cppflags" ; then
9696 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9697 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9704 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9706 for cf_add_1lib in $cf_add_0lib; do
9707 for cf_add_2lib in $cf_add_libs; do
9708 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9713 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9717 cat >conftest.$ac_ext <<_ACEOF
9718 #line 9718 "configure"
9719 #include "confdefs.h"
9720 #include <${cf_cv_ncurses_header:-curses.h}>
9724 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9729 rm -f conftest.$ac_objext conftest$ac_exeext
9730 if { (eval echo "$as_me:9730: \"$ac_link\"") >&5
9731 (eval $ac_link) 2>&5
9733 echo "$as_me:9733: \$? = $ac_status" >&5
9734 (exit $ac_status); } &&
9735 { ac_try='test -s conftest$ac_exeext'
9736 { (eval echo "$as_me:9736: \"$ac_try\"") >&5
9739 echo "$as_me:9739: \$? = $ac_status" >&5
9740 (exit $ac_status); }; }; then
9741 if test "$cross_compiling" = yes; then
9742 cf_test_ncuconfig=maybe
9744 cat >conftest.$ac_ext <<_ACEOF
9745 #line 9745 "configure"
9746 #include "confdefs.h"
9747 #include <${cf_cv_ncurses_header:-curses.h}>
9749 { char *xx = curses_version(); return (xx == 0); }
9751 rm -f conftest$ac_exeext
9752 if { (eval echo "$as_me:9752: \"$ac_link\"") >&5
9753 (eval $ac_link) 2>&5
9755 echo "$as_me:9755: \$? = $ac_status" >&5
9756 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9757 { (eval echo "$as_me:9757: \"$ac_try\"") >&5
9760 echo "$as_me:9760: \$? = $ac_status" >&5
9761 (exit $ac_status); }; }; then
9762 cf_test_ncuconfig=yes
9764 echo "$as_me: program exited with status $ac_status" >&5
9765 echo "$as_me: failed program was:" >&5
9766 cat conftest.$ac_ext >&5
9767 cf_test_ncuconfig=no
9769 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9772 echo "$as_me: failed program was:" >&5
9773 cat conftest.$ac_ext >&5
9774 cf_test_ncuconfig=no
9776 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9778 CFLAGS="$cf_save_CFLAGS"
9779 CPPFLAGS="$cf_save_CPPFLAGS"
9780 LIBS="$cf_save_LIBS"
9782 if test "x$cf_test_ncuconfig" != xyes; then
9783 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9784 cf_pkg_cflags="$cf_temp"
9785 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9786 cf_pkg_libs="$cf_temp"
9794 cf_new_extra_cppflags=
9796 for cf_add_cflags in $cf_pkg_cflags
9798 case $cf_fix_cppflags in
9800 case $cf_add_cflags in
9801 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9802 case $cf_add_cflags in
9804 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9806 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9807 && test -z "${cf_tst_cflags}" \
9808 && cf_fix_cppflags=yes
9810 if test $cf_fix_cppflags = yes ; then
9812 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9813 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9816 elif test "${cf_tst_cflags}" = "\"'" ; then
9818 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9819 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9829 case $cf_add_cflags in
9831 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9833 CPPFLAGS=`echo "$CPPFLAGS" | \
9834 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9835 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9840 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9841 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9848 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9849 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9856 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9857 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9859 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9861 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9862 && test -z "${cf_tst_cflags}" \
9863 && cf_fix_cppflags=no
9868 if test -n "$cf_new_cflags" ; then
9870 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9871 CFLAGS="${CFLAGS}$cf_new_cflags"
9875 if test -n "$cf_new_cppflags" ; then
9877 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9878 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9882 if test -n "$cf_new_extra_cppflags" ; then
9884 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9885 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9892 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9894 for cf_add_1lib in $cf_add_0lib; do
9895 for cf_add_2lib in $cf_add_libs; do
9896 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9901 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9905 cat >conftest.$ac_ext <<_ACEOF
9906 #line 9906 "configure"
9907 #include "confdefs.h"
9908 #include <${cf_cv_ncurses_header:-curses.h}>
9912 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9917 rm -f conftest.$ac_objext conftest$ac_exeext
9918 if { (eval echo "$as_me:9918: \"$ac_link\"") >&5
9919 (eval $ac_link) 2>&5
9921 echo "$as_me:9921: \$? = $ac_status" >&5
9922 (exit $ac_status); } &&
9923 { ac_try='test -s conftest$ac_exeext'
9924 { (eval echo "$as_me:9924: \"$ac_try\"") >&5
9927 echo "$as_me:9927: \$? = $ac_status" >&5
9928 (exit $ac_status); }; }; then
9929 if test "$cross_compiling" = yes; then
9930 cf_have_ncuconfig=maybe
9932 cat >conftest.$ac_ext <<_ACEOF
9933 #line 9933 "configure"
9934 #include "confdefs.h"
9935 #include <${cf_cv_ncurses_header:-curses.h}>
9937 { char *xx = curses_version(); return (xx == 0); }
9939 rm -f conftest$ac_exeext
9940 if { (eval echo "$as_me:9940: \"$ac_link\"") >&5
9941 (eval $ac_link) 2>&5
9943 echo "$as_me:9943: \$? = $ac_status" >&5
9944 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9945 { (eval echo "$as_me:9945: \"$ac_try\"") >&5
9948 echo "$as_me:9948: \$? = $ac_status" >&5
9949 (exit $ac_status); }; }; then
9950 cf_have_ncuconfig=yes
9952 echo "$as_me: program exited with status $ac_status" >&5
9953 echo "$as_me: failed program was:" >&5
9954 cat conftest.$ac_ext >&5
9955 cf_have_ncuconfig=no
9957 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9960 echo "$as_me: failed program was:" >&5
9961 cat conftest.$ac_ext >&5
9962 cf_have_ncuconfig=no
9964 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9965 echo "$as_me:9965: result: $cf_have_ncuconfig" >&5
9966 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9967 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9968 if test "$cf_have_ncuconfig" != "yes"
9970 CPPFLAGS="$cf_save_CPPFLAGS"
9971 LIBS="$cf_save_LIBS"
9972 NCURSES_CONFIG_PKG=none
9975 cat >>confdefs.h <<\EOF
9979 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9981 echo "$as_me:9981: checking for terminfo header" >&5
9982 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9983 if test "${cf_cv_term_header+set}" = set; then
9984 echo $ECHO_N "(cached) $ECHO_C" >&6
9987 case ${cf_cv_ncurses_header} in
9988 (*/ncurses.h|*/ncursesw.h)
9989 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9992 cf_term_header=term.h
9996 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9998 cat >conftest.$ac_ext <<_ACEOF
9999 #line 9999 "configure"
10000 #include "confdefs.h"
10002 #include <${cf_cv_ncurses_header:-curses.h}>
10003 #include <$cf_test>
10008 int x = auto_left_margin; (void)x
10013 rm -f conftest.$ac_objext
10014 if { (eval echo "$as_me:10014: \"$ac_compile\"") >&5
10015 (eval $ac_compile) 2>&5
10017 echo "$as_me:10017: \$? = $ac_status" >&5
10018 (exit $ac_status); } &&
10019 { ac_try='test -s conftest.$ac_objext'
10020 { (eval echo "$as_me:10020: \"$ac_try\"") >&5
10021 (eval $ac_try) 2>&5
10023 echo "$as_me:10023: \$? = $ac_status" >&5
10024 (exit $ac_status); }; }; then
10026 cf_cv_term_header="$cf_test"
10028 echo "$as_me: failed program was:" >&5
10029 cat conftest.$ac_ext >&5
10031 cf_cv_term_header=unknown
10034 rm -f conftest.$ac_objext conftest.$ac_ext
10035 test "$cf_cv_term_header" != unknown && break
10039 echo "$as_me:10039: result: $cf_cv_term_header" >&5
10040 echo "${ECHO_T}$cf_cv_term_header" >&6
10042 # Set definitions to allow ifdef'ing to accommodate subdirectories
10044 case $cf_cv_term_header in
10047 cat >>confdefs.h <<\EOF
10048 #define HAVE_TERM_H 1
10054 case $cf_cv_term_header in
10057 cat >>confdefs.h <<\EOF
10058 #define HAVE_NCURSES_TERM_H 1
10064 cat >>confdefs.h <<\EOF
10065 #define HAVE_NCURSESW_TERM_H 1
10074 echo "$as_me:10074: result: no" >&5
10075 echo "${ECHO_T}no" >&6
10076 NCURSES_CONFIG_PKG=none
10079 NCURSES_CONFIG_PKG=none
10082 if test "x$cf_have_ncuconfig" = "xno"; then
10083 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
10085 if test -n "$ac_tool_prefix"; then
10086 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10088 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
10089 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
10090 echo "$as_me:10090: checking for $ac_word" >&5
10091 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10092 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
10093 echo $ECHO_N "(cached) $ECHO_C" >&6
10095 if test -n "$NCURSES_CONFIG"; then
10096 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
10098 ac_save_IFS=$IFS; IFS=$ac_path_separator
10100 for ac_dir in $ac_dummy; do
10102 test -z "$ac_dir" && ac_dir=.
10103 $as_executable_p "$ac_dir/$ac_word" || continue
10104 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
10105 echo "$as_me:10105: found $ac_dir/$ac_word" >&5
10111 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
10112 if test -n "$NCURSES_CONFIG"; then
10113 echo "$as_me:10113: result: $NCURSES_CONFIG" >&5
10114 echo "${ECHO_T}$NCURSES_CONFIG" >&6
10116 echo "$as_me:10116: result: no" >&5
10117 echo "${ECHO_T}no" >&6
10120 test -n "$NCURSES_CONFIG" && break
10123 if test -z "$NCURSES_CONFIG"; then
10124 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
10125 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10127 # Extract the first word of "$ac_prog", so it can be a program name with args.
10128 set dummy $ac_prog; ac_word=$2
10129 echo "$as_me:10129: checking for $ac_word" >&5
10130 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10131 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
10132 echo $ECHO_N "(cached) $ECHO_C" >&6
10134 if test -n "$ac_ct_NCURSES_CONFIG"; then
10135 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
10137 ac_save_IFS=$IFS; IFS=$ac_path_separator
10139 for ac_dir in $ac_dummy; do
10141 test -z "$ac_dir" && ac_dir=.
10142 $as_executable_p "$ac_dir/$ac_word" || continue
10143 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
10144 echo "$as_me:10144: found $ac_dir/$ac_word" >&5
10150 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
10151 if test -n "$ac_ct_NCURSES_CONFIG"; then
10152 echo "$as_me:10152: result: $ac_ct_NCURSES_CONFIG" >&5
10153 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
10155 echo "$as_me:10155: result: no" >&5
10156 echo "${ECHO_T}no" >&6
10159 test -n "$ac_ct_NCURSES_CONFIG" && break
10161 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
10163 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
10166 if test "$NCURSES_CONFIG" != none ; then
10171 cf_new_extra_cppflags=
10173 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
10175 case $cf_fix_cppflags in
10177 case $cf_add_cflags in
10178 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10179 case $cf_add_cflags in
10181 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10183 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10184 && test -z "${cf_tst_cflags}" \
10185 && cf_fix_cppflags=yes
10187 if test $cf_fix_cppflags = yes ; then
10189 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10190 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10193 elif test "${cf_tst_cflags}" = "\"'" ; then
10195 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10196 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10202 case "$CPPFLAGS" in
10206 case $cf_add_cflags in
10208 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10210 CPPFLAGS=`echo "$CPPFLAGS" | \
10211 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10212 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10217 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10218 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10225 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10226 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10233 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10234 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10236 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10238 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10239 && test -z "${cf_tst_cflags}" \
10240 && cf_fix_cppflags=no
10245 if test -n "$cf_new_cflags" ; then
10247 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10248 CFLAGS="${CFLAGS}$cf_new_cflags"
10252 if test -n "$cf_new_cppflags" ; then
10254 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10255 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10259 if test -n "$cf_new_extra_cppflags" ; then
10261 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10262 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10266 cf_add_libs="$LIBS"
10269 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10270 # filter duplicates
10271 for cf_add_1lib in $cf_add_0lib; do
10272 for cf_add_2lib in $cf_add_libs; do
10273 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10278 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10280 LIBS="$cf_add_libs"
10282 # even with config script, some packages use no-override for curses.h
10284 echo "$as_me:10284: checking if we have identified curses headers" >&5
10285 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10286 if test "${cf_cv_ncurses_header+set}" = set; then
10287 echo $ECHO_N "(cached) $ECHO_C" >&6
10290 cf_cv_ncurses_header=none
10292 ncurses.h $cf_cv_screen/ncurses.h \
10293 curses.h $cf_cv_screen/curses.h
10295 cat >conftest.$ac_ext <<_ACEOF
10296 #line 10296 "configure"
10297 #include "confdefs.h"
10298 #include <${cf_header}>
10302 initscr(); tgoto("?", 0,0)
10307 rm -f conftest.$ac_objext
10308 if { (eval echo "$as_me:10308: \"$ac_compile\"") >&5
10309 (eval $ac_compile) 2>&5
10311 echo "$as_me:10311: \$? = $ac_status" >&5
10312 (exit $ac_status); } &&
10313 { ac_try='test -s conftest.$ac_objext'
10314 { (eval echo "$as_me:10314: \"$ac_try\"") >&5
10315 (eval $ac_try) 2>&5
10317 echo "$as_me:10317: \$? = $ac_status" >&5
10318 (exit $ac_status); }; }; then
10319 cf_cv_ncurses_header=$cf_header; break
10321 echo "$as_me: failed program was:" >&5
10322 cat conftest.$ac_ext >&5
10324 rm -f conftest.$ac_objext conftest.$ac_ext
10328 echo "$as_me:10328: result: $cf_cv_ncurses_header" >&5
10329 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10331 if test "$cf_cv_ncurses_header" = none ; then
10332 { { echo "$as_me:10332: error: No curses header-files found" >&5
10333 echo "$as_me: error: No curses header-files found" >&2;}
10334 { (exit 1); exit 1; }; }
10337 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10339 for ac_header in $cf_cv_ncurses_header
10341 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10342 echo "$as_me:10342: checking for $ac_header" >&5
10343 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10344 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10345 echo $ECHO_N "(cached) $ECHO_C" >&6
10347 cat >conftest.$ac_ext <<_ACEOF
10348 #line 10348 "configure"
10349 #include "confdefs.h"
10350 #include <$ac_header>
10352 if { (eval echo "$as_me:10352: \"$ac_cpp conftest.$ac_ext\"") >&5
10353 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10355 egrep -v '^ *\+' conftest.er1 >conftest.err
10357 cat conftest.err >&5
10358 echo "$as_me:10358: \$? = $ac_status" >&5
10359 (exit $ac_status); } >/dev/null; then
10360 if test -s conftest.err; then
10361 ac_cpp_err=$ac_c_preproc_warn_flag
10368 if test -z "$ac_cpp_err"; then
10369 eval "$as_ac_Header=yes"
10371 echo "$as_me: failed program was:" >&5
10372 cat conftest.$ac_ext >&5
10373 eval "$as_ac_Header=no"
10375 rm -f conftest.err conftest.$ac_ext
10377 echo "$as_me:10377: result: `eval echo '${'$as_ac_Header'}'`" >&5
10378 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10379 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10380 cat >>confdefs.h <<EOF
10381 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10387 cat >>confdefs.h <<\EOF
10391 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10393 cat >>confdefs.h <<EOF
10394 #define $cf_nculib_ROOT 1
10397 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
10401 cf_ncuhdr_root=$cf_cv_screen
10403 test -n "$cf_cv_curses_dir" && \
10404 test "$cf_cv_curses_dir" != "no" && { \
10406 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
10407 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
10409 while test $cf_add_incdir != /usr/include
10411 if test -d $cf_add_incdir
10414 if test -n "$CFLAGS$CPPFLAGS" ; then
10415 # a loop is needed to ensure we can add subdirs of existing dirs
10416 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10417 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10418 cf_have_incdir=yes; break
10423 if test "$cf_have_incdir" = no ; then
10424 if test "$cf_add_incdir" = /usr/local/include ; then
10425 if test "$GCC" = yes
10427 cf_save_CPPFLAGS=$CPPFLAGS
10429 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10430 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10432 cat >conftest.$ac_ext <<_ACEOF
10433 #line 10433 "configure"
10434 #include "confdefs.h"
10444 rm -f conftest.$ac_objext
10445 if { (eval echo "$as_me:10445: \"$ac_compile\"") >&5
10446 (eval $ac_compile) 2>&5
10448 echo "$as_me:10448: \$? = $ac_status" >&5
10449 (exit $ac_status); } &&
10450 { ac_try='test -s conftest.$ac_objext'
10451 { (eval echo "$as_me:10451: \"$ac_try\"") >&5
10452 (eval $ac_try) 2>&5
10454 echo "$as_me:10454: \$? = $ac_status" >&5
10455 (exit $ac_status); }; }; then
10458 echo "$as_me: failed program was:" >&5
10459 cat conftest.$ac_ext >&5
10462 rm -f conftest.$ac_objext conftest.$ac_ext
10463 CPPFLAGS=$cf_save_CPPFLAGS
10468 if test "$cf_have_incdir" = no ; then
10469 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10471 echo "${as_me:-configure}:10471: testing adding $cf_add_incdir to include-path ..." 1>&5
10473 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10475 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10476 test "$cf_top_incdir" = "$cf_add_incdir" && break
10477 cf_add_incdir="$cf_top_incdir"
10490 echo "$as_me:10490: checking for $cf_ncuhdr_root header in include-path" >&5
10491 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10492 if test "${cf_cv_ncurses_h+set}" = set; then
10493 echo $ECHO_N "(cached) $ECHO_C" >&6
10496 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10497 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
10498 for cf_header in $cf_header_list
10501 cat >conftest.$ac_ext <<_ACEOF
10502 #line 10502 "configure"
10503 #include "confdefs.h"
10505 #include <$cf_header>
10510 #ifdef NCURSES_VERSION
10512 printf("%s\n", NCURSES_VERSION);
10525 rm -f conftest.$ac_objext
10526 if { (eval echo "$as_me:10526: \"$ac_compile\"") >&5
10527 (eval $ac_compile) 2>&5
10529 echo "$as_me:10529: \$? = $ac_status" >&5
10530 (exit $ac_status); } &&
10531 { ac_try='test -s conftest.$ac_objext'
10532 { (eval echo "$as_me:10532: \"$ac_try\"") >&5
10533 (eval $ac_try) 2>&5
10535 echo "$as_me:10535: \$? = $ac_status" >&5
10536 (exit $ac_status); }; }; then
10537 cf_cv_ncurses_h=$cf_header
10540 echo "$as_me: failed program was:" >&5
10541 cat conftest.$ac_ext >&5
10544 rm -f conftest.$ac_objext conftest.$ac_ext
10546 test "$cf_cv_ncurses_h" != no && break
10550 echo "$as_me:10550: result: $cf_cv_ncurses_h" >&5
10551 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10553 if test "$cf_cv_ncurses_h" != no ; then
10554 cf_cv_ncurses_header=$cf_cv_ncurses_h
10557 echo "$as_me:10557: checking for $cf_ncuhdr_root include-path" >&5
10558 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10559 if test "${cf_cv_ncurses_h2+set}" = set; then
10560 echo $ECHO_N "(cached) $ECHO_C" >&6
10563 test -n "$verbose" && echo
10567 # collect the current set of include-directories from compiler flags
10568 cf_header_path_list=""
10569 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10570 for cf_header_path in $CPPFLAGS $CFLAGS
10572 case $cf_header_path in
10574 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10576 test "x$cf_header_path" != "xNONE" && \
10577 test -d "$cf_header_path" && \
10579 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10580 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
10581 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10582 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10583 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10584 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"
10587 cf_header_path_list="$cf_header_path_list $cf_search"
10593 # add the variations for the package we are looking for
10597 test "x$prefix" != "xNONE" && \
10598 test -d "$prefix" && \
10600 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10601 test -d $prefix/include && cf_search="$cf_search $prefix/include"
10602 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10603 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10604 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10605 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10608 for cf_subdir_prefix in \
10617 test "x$cf_subdir_prefix" != "x$prefix" && \
10618 test -d "$cf_subdir_prefix" && \
10619 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10620 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10621 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
10622 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10623 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10624 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10625 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"
10630 test "$includedir" != NONE && \
10631 test "$includedir" != "/usr/include" && \
10632 test -d "$includedir" && {
10633 test -d $includedir && cf_search="$cf_search $includedir"
10634 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10637 test "$oldincludedir" != NONE && \
10638 test "$oldincludedir" != "/usr/include" && \
10639 test -d "$oldincludedir" && {
10640 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
10641 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10644 cf_search="$cf_search $cf_header_path_list"
10646 test -n "$verbose" && echo search path $cf_search
10647 cf_save2_CPPFLAGS="$CPPFLAGS"
10648 for cf_incdir in $cf_search
10651 if test -n "$cf_incdir" ; then
10652 for cf_add_incdir in $cf_incdir
10654 while test $cf_add_incdir != /usr/include
10656 if test -d $cf_add_incdir
10659 if test -n "$CFLAGS$CPPFLAGS" ; then
10660 # a loop is needed to ensure we can add subdirs of existing dirs
10661 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10662 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10663 cf_have_incdir=yes; break
10668 if test "$cf_have_incdir" = no ; then
10669 if test "$cf_add_incdir" = /usr/local/include ; then
10670 if test "$GCC" = yes
10672 cf_save_CPPFLAGS=$CPPFLAGS
10674 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10675 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10677 cat >conftest.$ac_ext <<_ACEOF
10678 #line 10678 "configure"
10679 #include "confdefs.h"
10689 rm -f conftest.$ac_objext
10690 if { (eval echo "$as_me:10690: \"$ac_compile\"") >&5
10691 (eval $ac_compile) 2>&5
10693 echo "$as_me:10693: \$? = $ac_status" >&5
10694 (exit $ac_status); } &&
10695 { ac_try='test -s conftest.$ac_objext'
10696 { (eval echo "$as_me:10696: \"$ac_try\"") >&5
10697 (eval $ac_try) 2>&5
10699 echo "$as_me:10699: \$? = $ac_status" >&5
10700 (exit $ac_status); }; }; then
10703 echo "$as_me: failed program was:" >&5
10704 cat conftest.$ac_ext >&5
10707 rm -f conftest.$ac_objext conftest.$ac_ext
10708 CPPFLAGS=$cf_save_CPPFLAGS
10713 if test "$cf_have_incdir" = no ; then
10714 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10716 echo "${as_me:-configure}:10716: testing adding $cf_add_incdir to include-path ..." 1>&5
10718 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10720 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10721 test "$cf_top_incdir" = "$cf_add_incdir" && break
10722 cf_add_incdir="$cf_top_incdir"
10738 cat >conftest.$ac_ext <<_ACEOF
10739 #line 10739 "configure"
10740 #include "confdefs.h"
10742 #include <$cf_header>
10747 #ifdef NCURSES_VERSION
10749 printf("%s\n", NCURSES_VERSION);
10762 rm -f conftest.$ac_objext
10763 if { (eval echo "$as_me:10763: \"$ac_compile\"") >&5
10764 (eval $ac_compile) 2>&5
10766 echo "$as_me:10766: \$? = $ac_status" >&5
10767 (exit $ac_status); } &&
10768 { ac_try='test -s conftest.$ac_objext'
10769 { (eval echo "$as_me:10769: \"$ac_try\"") >&5
10770 (eval $ac_try) 2>&5
10772 echo "$as_me:10772: \$? = $ac_status" >&5
10773 (exit $ac_status); }; }; then
10774 cf_cv_ncurses_h2=$cf_header
10777 echo "$as_me: failed program was:" >&5
10778 cat conftest.$ac_ext >&5
10779 cf_cv_ncurses_h2=no
10781 rm -f conftest.$ac_objext conftest.$ac_ext
10783 if test "$cf_cv_ncurses_h2" != no ; then
10784 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10785 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
10788 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10790 CPPFLAGS="$cf_save2_CPPFLAGS"
10791 test "$cf_cv_ncurses_h2" != no && break
10793 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10793: error: not found" >&5
10794 echo "$as_me: error: not found" >&2;}
10795 { (exit 1); exit 1; }; }
10798 echo "$as_me:10798: result: $cf_cv_ncurses_h2" >&5
10799 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10801 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
10802 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
10803 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
10804 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
10807 if test -n "$cf_1st_incdir" ; then
10808 for cf_add_incdir in $cf_1st_incdir
10810 while test $cf_add_incdir != /usr/include
10812 if test -d $cf_add_incdir
10815 if test -n "$CFLAGS$CPPFLAGS" ; then
10816 # a loop is needed to ensure we can add subdirs of existing dirs
10817 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10818 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10819 cf_have_incdir=yes; break
10824 if test "$cf_have_incdir" = no ; then
10825 if test "$cf_add_incdir" = /usr/local/include ; then
10826 if test "$GCC" = yes
10828 cf_save_CPPFLAGS=$CPPFLAGS
10830 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10831 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10833 cat >conftest.$ac_ext <<_ACEOF
10834 #line 10834 "configure"
10835 #include "confdefs.h"
10845 rm -f conftest.$ac_objext
10846 if { (eval echo "$as_me:10846: \"$ac_compile\"") >&5
10847 (eval $ac_compile) 2>&5
10849 echo "$as_me:10849: \$? = $ac_status" >&5
10850 (exit $ac_status); } &&
10851 { ac_try='test -s conftest.$ac_objext'
10852 { (eval echo "$as_me:10852: \"$ac_try\"") >&5
10853 (eval $ac_try) 2>&5
10855 echo "$as_me:10855: \$? = $ac_status" >&5
10856 (exit $ac_status); }; }; then
10859 echo "$as_me: failed program was:" >&5
10860 cat conftest.$ac_ext >&5
10863 rm -f conftest.$ac_objext conftest.$ac_ext
10864 CPPFLAGS=$cf_save_CPPFLAGS
10869 if test "$cf_have_incdir" = no ; then
10870 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10872 echo "${as_me:-configure}:10872: testing adding $cf_add_incdir to include-path ..." 1>&5
10874 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10876 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10877 test "$cf_top_incdir" = "$cf_add_incdir" && break
10878 cf_add_incdir="$cf_top_incdir"
10891 # Set definitions to allow ifdef'ing for ncurses.h
10893 case $cf_cv_ncurses_header in
10896 cat >>confdefs.h <<\EOF
10897 #define HAVE_NCURSES_H 1
10903 case $cf_cv_ncurses_header in
10904 (ncurses/curses.h|ncurses/ncurses.h)
10906 cat >>confdefs.h <<\EOF
10907 #define HAVE_NCURSES_NCURSES_H 1
10911 (ncursesw/curses.h|ncursesw/ncurses.h)
10913 cat >>confdefs.h <<\EOF
10914 #define HAVE_NCURSESW_NCURSES_H 1
10920 echo "$as_me:10920: checking for terminfo header" >&5
10921 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10922 if test "${cf_cv_term_header+set}" = set; then
10923 echo $ECHO_N "(cached) $ECHO_C" >&6
10926 case ${cf_cv_ncurses_header} in
10927 (*/ncurses.h|*/ncursesw.h)
10928 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10931 cf_term_header=term.h
10935 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10937 cat >conftest.$ac_ext <<_ACEOF
10938 #line 10938 "configure"
10939 #include "confdefs.h"
10941 #include <${cf_cv_ncurses_header:-curses.h}>
10942 #include <$cf_test>
10947 int x = auto_left_margin; (void)x
10952 rm -f conftest.$ac_objext
10953 if { (eval echo "$as_me:10953: \"$ac_compile\"") >&5
10954 (eval $ac_compile) 2>&5
10956 echo "$as_me:10956: \$? = $ac_status" >&5
10957 (exit $ac_status); } &&
10958 { ac_try='test -s conftest.$ac_objext'
10959 { (eval echo "$as_me:10959: \"$ac_try\"") >&5
10960 (eval $ac_try) 2>&5
10962 echo "$as_me:10962: \$? = $ac_status" >&5
10963 (exit $ac_status); }; }; then
10965 cf_cv_term_header="$cf_test"
10967 echo "$as_me: failed program was:" >&5
10968 cat conftest.$ac_ext >&5
10970 cf_cv_term_header=unknown
10973 rm -f conftest.$ac_objext conftest.$ac_ext
10974 test "$cf_cv_term_header" != unknown && break
10978 echo "$as_me:10978: result: $cf_cv_term_header" >&5
10979 echo "${ECHO_T}$cf_cv_term_header" >&6
10981 # Set definitions to allow ifdef'ing to accommodate subdirectories
10983 case $cf_cv_term_header in
10986 cat >>confdefs.h <<\EOF
10987 #define HAVE_TERM_H 1
10993 case $cf_cv_term_header in
10996 cat >>confdefs.h <<\EOF
10997 #define HAVE_NCURSES_TERM_H 1
11003 cat >>confdefs.h <<\EOF
11004 #define HAVE_NCURSESW_TERM_H 1
11010 # some applications need this, but should check for NCURSES_VERSION
11012 cat >>confdefs.h <<\EOF
11016 echo "$as_me:11016: checking for ncurses version" >&5
11017 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
11018 if test "${cf_cv_ncurses_version+set}" = set; then
11019 echo $ECHO_N "(cached) $ECHO_C" >&6
11022 cf_cv_ncurses_version=no
11025 if test "$cross_compiling" = yes; then
11027 # This will not work if the preprocessor splits the line after the
11028 # Autoconf token. The 'unproto' program does that.
11029 cat > conftest.$ac_ext <<EOF
11030 #include <${cf_cv_ncurses_header:-curses.h}>
11032 #ifdef NCURSES_VERSION
11033 Autoconf NCURSES_VERSION
11041 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
11042 { (eval echo "$as_me:11042: \"$cf_try\"") >&5
11043 (eval $cf_try) 2>&5
11045 echo "$as_me:11045: \$? = $ac_status" >&5
11046 (exit $ac_status); }
11047 if test -f conftest.out ; then
11048 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
11049 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
11054 cat >conftest.$ac_ext <<_ACEOF
11055 #line 11055 "configure"
11056 #include "confdefs.h"
11058 #include <${cf_cv_ncurses_header:-curses.h}>
11062 FILE *fp = fopen("$cf_tempfile", "w");
11063 #ifdef NCURSES_VERSION
11064 # ifdef NCURSES_VERSION_PATCH
11065 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
11067 fprintf(fp, "%s\n", NCURSES_VERSION);
11070 # ifdef __NCURSES_H
11071 fprintf(fp, "old\n");
11076 ${cf_cv_main_return:-return}(0);
11079 rm -f conftest$ac_exeext
11080 if { (eval echo "$as_me:11080: \"$ac_link\"") >&5
11081 (eval $ac_link) 2>&5
11083 echo "$as_me:11083: \$? = $ac_status" >&5
11084 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11085 { (eval echo "$as_me:11085: \"$ac_try\"") >&5
11086 (eval $ac_try) 2>&5
11088 echo "$as_me:11088: \$? = $ac_status" >&5
11089 (exit $ac_status); }; }; then
11091 cf_cv_ncurses_version=`cat $cf_tempfile`
11093 echo "$as_me: program exited with status $ac_status" >&5
11094 echo "$as_me: failed program was:" >&5
11095 cat conftest.$ac_ext >&5
11097 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11102 echo "$as_me:11102: result: $cf_cv_ncurses_version" >&5
11103 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
11104 test "$cf_cv_ncurses_version" = no ||
11105 cat >>confdefs.h <<\EOF
11109 cf_nculib_root=$cf_cv_screen
11110 # This works, except for the special case where we find gpm, but
11111 # ncurses is in a nonstandard location via $LIBS, and we really want
11114 cf_ncurses_SAVE="$LIBS"
11115 echo "$as_me:11115: checking for Gpm_Open in -lgpm" >&5
11116 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
11117 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
11118 echo $ECHO_N "(cached) $ECHO_C" >&6
11120 ac_check_lib_save_LIBS=$LIBS
11122 cat >conftest.$ac_ext <<_ACEOF
11123 #line 11123 "configure"
11124 #include "confdefs.h"
11126 /* Override any gcc2 internal prototype to avoid an error. */
11130 /* We use char because int might match the return type of a gcc2
11131 builtin and then its argument prototype would still apply. */
11141 rm -f conftest.$ac_objext conftest$ac_exeext
11142 if { (eval echo "$as_me:11142: \"$ac_link\"") >&5
11143 (eval $ac_link) 2>&5
11145 echo "$as_me:11145: \$? = $ac_status" >&5
11146 (exit $ac_status); } &&
11147 { ac_try='test -s conftest$ac_exeext'
11148 { (eval echo "$as_me:11148: \"$ac_try\"") >&5
11149 (eval $ac_try) 2>&5
11151 echo "$as_me:11151: \$? = $ac_status" >&5
11152 (exit $ac_status); }; }; then
11153 ac_cv_lib_gpm_Gpm_Open=yes
11155 echo "$as_me: failed program was:" >&5
11156 cat conftest.$ac_ext >&5
11157 ac_cv_lib_gpm_Gpm_Open=no
11159 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11160 LIBS=$ac_check_lib_save_LIBS
11162 echo "$as_me:11162: result: $ac_cv_lib_gpm_Gpm_Open" >&5
11163 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
11164 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
11165 echo "$as_me:11165: checking for initscr in -lgpm" >&5
11166 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
11167 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
11168 echo $ECHO_N "(cached) $ECHO_C" >&6
11170 ac_check_lib_save_LIBS=$LIBS
11172 cat >conftest.$ac_ext <<_ACEOF
11173 #line 11173 "configure"
11174 #include "confdefs.h"
11176 /* Override any gcc2 internal prototype to avoid an error. */
11180 /* We use char because int might match the return type of a gcc2
11181 builtin and then its argument prototype would still apply. */
11191 rm -f conftest.$ac_objext conftest$ac_exeext
11192 if { (eval echo "$as_me:11192: \"$ac_link\"") >&5
11193 (eval $ac_link) 2>&5
11195 echo "$as_me:11195: \$? = $ac_status" >&5
11196 (exit $ac_status); } &&
11197 { ac_try='test -s conftest$ac_exeext'
11198 { (eval echo "$as_me:11198: \"$ac_try\"") >&5
11199 (eval $ac_try) 2>&5
11201 echo "$as_me:11201: \$? = $ac_status" >&5
11202 (exit $ac_status); }; }; then
11203 ac_cv_lib_gpm_initscr=yes
11205 echo "$as_me: failed program was:" >&5
11206 cat conftest.$ac_ext >&5
11207 ac_cv_lib_gpm_initscr=no
11209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11210 LIBS=$ac_check_lib_save_LIBS
11212 echo "$as_me:11212: result: $ac_cv_lib_gpm_initscr" >&5
11213 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
11214 if test $ac_cv_lib_gpm_initscr = yes; then
11215 LIBS="$cf_ncurses_SAVE"
11217 cf_ncurses_LIBS="-lgpm"
11224 # This is only necessary if you are linking against an obsolete
11225 # version of ncurses (but it should do no harm, since it's static).
11226 if test "$cf_nculib_root" = ncurses ; then
11227 echo "$as_me:11227: checking for tgoto in -lmytinfo" >&5
11228 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
11229 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
11230 echo $ECHO_N "(cached) $ECHO_C" >&6
11232 ac_check_lib_save_LIBS=$LIBS
11233 LIBS="-lmytinfo $LIBS"
11234 cat >conftest.$ac_ext <<_ACEOF
11235 #line 11235 "configure"
11236 #include "confdefs.h"
11238 /* Override any gcc2 internal prototype to avoid an error. */
11242 /* We use char because int might match the return type of a gcc2
11243 builtin and then its argument prototype would still apply. */
11253 rm -f conftest.$ac_objext conftest$ac_exeext
11254 if { (eval echo "$as_me:11254: \"$ac_link\"") >&5
11255 (eval $ac_link) 2>&5
11257 echo "$as_me:11257: \$? = $ac_status" >&5
11258 (exit $ac_status); } &&
11259 { ac_try='test -s conftest$ac_exeext'
11260 { (eval echo "$as_me:11260: \"$ac_try\"") >&5
11261 (eval $ac_try) 2>&5
11263 echo "$as_me:11263: \$? = $ac_status" >&5
11264 (exit $ac_status); }; }; then
11265 ac_cv_lib_mytinfo_tgoto=yes
11267 echo "$as_me: failed program was:" >&5
11268 cat conftest.$ac_ext >&5
11269 ac_cv_lib_mytinfo_tgoto=no
11271 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11272 LIBS=$ac_check_lib_save_LIBS
11274 echo "$as_me:11274: result: $ac_cv_lib_mytinfo_tgoto" >&5
11275 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11276 if test $ac_cv_lib_mytinfo_tgoto = yes; then
11277 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
11284 cf_add_libs="$LIBS"
11287 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11288 # filter duplicates
11289 for cf_add_1lib in $cf_add_0lib; do
11290 for cf_add_2lib in $cf_add_libs; do
11291 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11296 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11298 LIBS="$cf_add_libs"
11300 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
11303 cf_add_libs="$LIBS"
11306 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11307 # filter duplicates
11308 for cf_add_1lib in $cf_add_0lib; do
11309 for cf_add_2lib in $cf_add_libs; do
11310 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11315 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11317 LIBS="$cf_add_libs"
11321 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
11323 echo "$as_me:11323: checking for initscr" >&5
11324 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
11325 if test "${ac_cv_func_initscr+set}" = set; then
11326 echo $ECHO_N "(cached) $ECHO_C" >&6
11328 cat >conftest.$ac_ext <<_ACEOF
11329 #line 11329 "configure"
11330 #include "confdefs.h"
11331 #define initscr autoconf_temporary
11332 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11339 /* We use char because int might match the return type of a gcc2
11340 builtin and then its argument prototype would still apply. */
11341 char initscr (void);
11347 /* The GNU C library defines stubs for functions which it implements
11348 to always fail with ENOSYS. Some functions are actually named
11349 something starting with __ and the normal name is an alias. */
11350 #if defined (__stub_initscr) || defined (__stub___initscr)
11351 #error found stub for initscr
11359 rm -f conftest.$ac_objext conftest$ac_exeext
11360 if { (eval echo "$as_me:11360: \"$ac_link\"") >&5
11361 (eval $ac_link) 2>&5
11363 echo "$as_me:11363: \$? = $ac_status" >&5
11364 (exit $ac_status); } &&
11365 { ac_try='test -s conftest$ac_exeext'
11366 { (eval echo "$as_me:11366: \"$ac_try\"") >&5
11367 (eval $ac_try) 2>&5
11369 echo "$as_me:11369: \$? = $ac_status" >&5
11370 (exit $ac_status); }; }; then
11371 ac_cv_func_initscr=yes
11373 echo "$as_me: failed program was:" >&5
11374 cat conftest.$ac_ext >&5
11375 ac_cv_func_initscr=no
11377 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11379 echo "$as_me:11379: result: $ac_cv_func_initscr" >&5
11380 echo "${ECHO_T}$ac_cv_func_initscr" >&6
11381 if test $ac_cv_func_initscr = yes; then
11382 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
11385 cf_save_LIBS="$LIBS"
11386 echo "$as_me:11386: checking for initscr in -l$cf_nculib_root" >&5
11387 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
11388 LIBS="-l$cf_nculib_root $LIBS"
11389 cat >conftest.$ac_ext <<_ACEOF
11390 #line 11390 "configure"
11391 #include "confdefs.h"
11392 #include <${cf_cv_ncurses_header:-curses.h}>
11401 rm -f conftest.$ac_objext conftest$ac_exeext
11402 if { (eval echo "$as_me:11402: \"$ac_link\"") >&5
11403 (eval $ac_link) 2>&5
11405 echo "$as_me:11405: \$? = $ac_status" >&5
11406 (exit $ac_status); } &&
11407 { ac_try='test -s conftest$ac_exeext'
11408 { (eval echo "$as_me:11408: \"$ac_try\"") >&5
11409 (eval $ac_try) 2>&5
11411 echo "$as_me:11411: \$? = $ac_status" >&5
11412 (exit $ac_status); }; }; then
11413 echo "$as_me:11413: result: yes" >&5
11414 echo "${ECHO_T}yes" >&6
11415 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
11418 echo "$as_me: failed program was:" >&5
11419 cat conftest.$ac_ext >&5
11420 echo "$as_me:11420: result: no" >&5
11421 echo "${ECHO_T}no" >&6
11424 cf_library_path_list=""
11425 if test -n "${LDFLAGS}${LIBS}" ; then
11426 for cf_library_path in $LDFLAGS $LIBS
11428 case $cf_library_path in
11430 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11432 test "x$cf_library_path" != "xNONE" && \
11433 test -d "$cf_library_path" && \
11435 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11436 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
11437 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11438 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11439 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11440 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"
11443 cf_library_path_list="$cf_library_path_list $cf_search"
11451 test "x$prefix" != "xNONE" && \
11452 test -d "$prefix" && \
11454 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11455 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
11456 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11457 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11458 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11459 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11462 for cf_subdir_prefix in \
11471 test "x$cf_subdir_prefix" != "x$prefix" && \
11472 test -d "$cf_subdir_prefix" && \
11473 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11474 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11475 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
11476 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11477 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11478 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11479 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"
11484 cf_search="$cf_library_path_list $cf_search"
11486 for cf_libdir in $cf_search
11488 echo "$as_me:11488: checking for -l$cf_nculib_root in $cf_libdir" >&5
11489 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11490 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11491 cat >conftest.$ac_ext <<_ACEOF
11492 #line 11492 "configure"
11493 #include "confdefs.h"
11494 #include <${cf_cv_ncurses_header:-curses.h}>
11503 rm -f conftest.$ac_objext conftest$ac_exeext
11504 if { (eval echo "$as_me:11504: \"$ac_link\"") >&5
11505 (eval $ac_link) 2>&5
11507 echo "$as_me:11507: \$? = $ac_status" >&5
11508 (exit $ac_status); } &&
11509 { ac_try='test -s conftest$ac_exeext'
11510 { (eval echo "$as_me:11510: \"$ac_try\"") >&5
11511 (eval $ac_try) 2>&5
11513 echo "$as_me:11513: \$? = $ac_status" >&5
11514 (exit $ac_status); }; }; then
11515 echo "$as_me:11515: result: yes" >&5
11516 echo "${ECHO_T}yes" >&6
11517 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
11520 echo "$as_me: failed program was:" >&5
11521 cat conftest.$ac_ext >&5
11522 echo "$as_me:11522: result: no" >&5
11523 echo "${ECHO_T}no" >&6
11524 LIBS="$cf_save_LIBS"
11526 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11530 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11534 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
11536 if test $cf_found_library = no ; then
11537 { { echo "$as_me:11537: error: Cannot link $cf_nculib_root library" >&5
11538 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11539 { (exit 1); exit 1; }; }
11544 if test -n "$cf_ncurses_LIBS" ; then
11545 echo "$as_me:11545: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11546 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11547 cf_ncurses_SAVE="$LIBS"
11548 for p in $cf_ncurses_LIBS ; do
11549 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
11550 if test "$q" != "$LIBS" ; then
11554 cat >conftest.$ac_ext <<_ACEOF
11555 #line 11555 "configure"
11556 #include "confdefs.h"
11557 #include <${cf_cv_ncurses_header:-curses.h}>
11561 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
11566 rm -f conftest.$ac_objext conftest$ac_exeext
11567 if { (eval echo "$as_me:11567: \"$ac_link\"") >&5
11568 (eval $ac_link) 2>&5
11570 echo "$as_me:11570: \$? = $ac_status" >&5
11571 (exit $ac_status); } &&
11572 { ac_try='test -s conftest$ac_exeext'
11573 { (eval echo "$as_me:11573: \"$ac_try\"") >&5
11574 (eval $ac_try) 2>&5
11576 echo "$as_me:11576: \$? = $ac_status" >&5
11577 (exit $ac_status); }; }; then
11578 echo "$as_me:11578: result: yes" >&5
11579 echo "${ECHO_T}yes" >&6
11581 echo "$as_me: failed program was:" >&5
11582 cat conftest.$ac_ext >&5
11583 echo "$as_me:11583: result: no" >&5
11584 echo "${ECHO_T}no" >&6
11585 LIBS="$cf_ncurses_SAVE"
11587 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11590 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11592 cat >>confdefs.h <<EOF
11593 #define $cf_nculib_ROOT 1
11598 NCURSES_CONFIG=none
11603 echo "$as_me:11603: checking for X" >&5
11604 echo $ECHO_N "checking for X... $ECHO_C" >&6
11606 # Check whether --with-x or --without-x was given.
11607 if test "${with_x+set}" = set; then
11611 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
11612 if test "x$with_x" = xno; then
11613 # The user explicitly disabled X.
11616 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
11617 # Both variables are already set.
11620 if test "${ac_cv_have_x+set}" = set; then
11621 echo $ECHO_N "(cached) $ECHO_C" >&6
11623 # One or both of the vars are not set, and there is no cached value.
11624 ac_x_includes=no ac_x_libraries=no
11625 rm -fr conftest.dir
11626 if mkdir conftest.dir; then
11628 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
11629 cat >Imakefile <<'EOF'
11631 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
11633 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
11634 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
11635 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
11636 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
11637 for ac_extension in a so sl dylib dll; do
11638 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
11639 test -f $ac_im_libdir/libX11.$ac_extension; then
11640 ac_im_usrlibdir=$ac_im_libdir; break
11643 # Screen out bogus values from the imake configuration. They are
11644 # bogus both because they are the default anyway, and because
11645 # using them would break gcc on systems where it needs fixed includes.
11646 case $ac_im_incroot in
11648 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
11650 case $ac_im_usrlibdir in
11651 /usr/lib | /lib) ;;
11652 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
11656 rm -fr conftest.dir
11659 # Standard set of common directories for X headers.
11660 # Check X11 before X11Rn because it is often a symlink to the current release.
11677 /usr/local/X11/include
11678 /usr/local/X11R7/include
11679 /usr/local/X11R6/include
11680 /usr/local/X11R5/include
11681 /usr/local/X11R4/include
11683 /usr/local/include/X11
11684 /usr/local/include/X11R7
11685 /usr/local/include/X11R6
11686 /usr/local/include/X11R5
11687 /usr/local/include/X11R4
11691 /usr/XFree86/include/X11
11695 /usr/unsupported/include
11696 /usr/athena/include
11697 /usr/local/x11r5/include
11698 /usr/lpp/Xamples/include
11700 /usr/openwin/include
11701 /usr/openwin/share/include'
11703 if test "$ac_x_includes" = no; then
11704 # Guess where to find include files, by looking for Intrinsic.h.
11705 # First, try using that file with no special directory specified.
11706 cat >conftest.$ac_ext <<_ACEOF
11707 #line 11707 "configure"
11708 #include "confdefs.h"
11709 #include <X11/Intrinsic.h>
11711 if { (eval echo "$as_me:11711: \"$ac_cpp conftest.$ac_ext\"") >&5
11712 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11714 egrep -v '^ *\+' conftest.er1 >conftest.err
11716 cat conftest.err >&5
11717 echo "$as_me:11717: \$? = $ac_status" >&5
11718 (exit $ac_status); } >/dev/null; then
11719 if test -s conftest.err; then
11720 ac_cpp_err=$ac_c_preproc_warn_flag
11727 if test -z "$ac_cpp_err"; then
11728 # We can compile using X headers with no special include directory.
11731 echo "$as_me: failed program was:" >&5
11732 cat conftest.$ac_ext >&5
11733 for ac_dir in $ac_x_header_dirs; do
11734 if test -r "$ac_dir/X11/Intrinsic.h"; then
11735 ac_x_includes=$ac_dir
11740 rm -f conftest.err conftest.$ac_ext
11741 fi # $ac_x_includes = no
11743 if test "$ac_x_libraries" = no; then
11744 # Check for the libraries.
11745 # See if we find them without any special options.
11746 # Don't add to $LIBS permanently.
11749 cat >conftest.$ac_ext <<_ACEOF
11750 #line 11750 "configure"
11751 #include "confdefs.h"
11752 #include <X11/Intrinsic.h>
11761 rm -f conftest.$ac_objext conftest$ac_exeext
11762 if { (eval echo "$as_me:11762: \"$ac_link\"") >&5
11763 (eval $ac_link) 2>&5
11765 echo "$as_me:11765: \$? = $ac_status" >&5
11766 (exit $ac_status); } &&
11767 { ac_try='test -s conftest$ac_exeext'
11768 { (eval echo "$as_me:11768: \"$ac_try\"") >&5
11769 (eval $ac_try) 2>&5
11771 echo "$as_me:11771: \$? = $ac_status" >&5
11772 (exit $ac_status); }; }; then
11774 # We can link X programs with no special library path.
11777 echo "$as_me: failed program was:" >&5
11778 cat conftest.$ac_ext >&5
11780 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
11782 # Don't even attempt the hair of trying to link an X program!
11783 for ac_extension in a so sl dylib dll; do
11784 if test -r $ac_dir/libXt.$ac_extension; then
11785 ac_x_libraries=$ac_dir
11791 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11792 fi # $ac_x_libraries = no
11794 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
11795 # Didn't find X anywhere. Cache the known absence of X.
11796 ac_cv_have_x="have_x=no"
11798 # Record where we found X for the cache.
11799 ac_cv_have_x="have_x=yes \
11800 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
11805 eval "$ac_cv_have_x"
11808 if test "$have_x" != yes; then
11809 echo "$as_me:11809: result: $have_x" >&5
11810 echo "${ECHO_T}$have_x" >&6
11813 # If each of the values was on the command line, it overrides each guess.
11814 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
11815 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
11816 # Update the cache value to reflect the command line values.
11817 ac_cv_have_x="have_x=yes \
11818 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
11819 echo "$as_me:11819: result: libraries $x_libraries, headers $x_includes" >&5
11820 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
11823 if test "$no_x" = yes; then
11824 # Not all programs may use this symbol, but it does not hurt to define it.
11826 cat >>confdefs.h <<\EOF
11827 #define X_DISPLAY_MISSING 1
11830 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
11832 if test -n "$x_includes"; then
11833 X_CFLAGS="$X_CFLAGS -I$x_includes"
11836 # It would also be nice to do this for all -L options, not just this one.
11837 if test -n "$x_libraries"; then
11838 X_LIBS="$X_LIBS -L$x_libraries"
11839 # For Solaris; some versions of Sun CC require a space after -R and
11840 # others require no space. Words are not sufficient . . . .
11841 case `(uname -sr) 2>/dev/null` in
11843 echo "$as_me:11843: checking whether -R must be followed by a space" >&5
11844 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
11845 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
11846 cat >conftest.$ac_ext <<_ACEOF
11847 #line 11847 "configure"
11848 #include "confdefs.h"
11858 rm -f conftest.$ac_objext conftest$ac_exeext
11859 if { (eval echo "$as_me:11859: \"$ac_link\"") >&5
11860 (eval $ac_link) 2>&5
11862 echo "$as_me:11862: \$? = $ac_status" >&5
11863 (exit $ac_status); } &&
11864 { ac_try='test -s conftest$ac_exeext'
11865 { (eval echo "$as_me:11865: \"$ac_try\"") >&5
11866 (eval $ac_try) 2>&5
11868 echo "$as_me:11868: \$? = $ac_status" >&5
11869 (exit $ac_status); }; }; then
11872 echo "$as_me: failed program was:" >&5
11873 cat conftest.$ac_ext >&5
11876 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11877 if test $ac_R_nospace = yes; then
11878 echo "$as_me:11878: result: no" >&5
11879 echo "${ECHO_T}no" >&6
11880 X_LIBS="$X_LIBS -R$x_libraries"
11882 LIBS="$ac_xsave_LIBS -R $x_libraries"
11883 cat >conftest.$ac_ext <<_ACEOF
11884 #line 11884 "configure"
11885 #include "confdefs.h"
11895 rm -f conftest.$ac_objext conftest$ac_exeext
11896 if { (eval echo "$as_me:11896: \"$ac_link\"") >&5
11897 (eval $ac_link) 2>&5
11899 echo "$as_me:11899: \$? = $ac_status" >&5
11900 (exit $ac_status); } &&
11901 { ac_try='test -s conftest$ac_exeext'
11902 { (eval echo "$as_me:11902: \"$ac_try\"") >&5
11903 (eval $ac_try) 2>&5
11905 echo "$as_me:11905: \$? = $ac_status" >&5
11906 (exit $ac_status); }; }; then
11909 echo "$as_me: failed program was:" >&5
11910 cat conftest.$ac_ext >&5
11913 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11914 if test $ac_R_space = yes; then
11915 echo "$as_me:11915: result: yes" >&5
11916 echo "${ECHO_T}yes" >&6
11917 X_LIBS="$X_LIBS -R $x_libraries"
11919 echo "$as_me:11919: result: neither works" >&5
11920 echo "${ECHO_T}neither works" >&6
11923 LIBS=$ac_xsave_LIBS
11927 # Check for system-dependent libraries X programs must link with.
11928 # Do this before checking for the system-independent R6 libraries
11929 # (-lICE), since we may need -lsocket or whatever for X linking.
11931 if test "$ISC" = yes; then
11932 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
11934 # Martyn Johnson says this is needed for Ultrix, if the X
11935 # libraries were built with DECnet support. And Karl Berry says
11936 # the Alpha needs dnet_stub (dnet does not exist).
11937 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
11938 cat >conftest.$ac_ext <<_ACEOF
11939 #line 11939 "configure"
11940 #include "confdefs.h"
11942 /* Override any gcc2 internal prototype to avoid an error. */
11946 /* We use char because int might match the return type of a gcc2
11947 builtin and then its argument prototype would still apply. */
11948 char XOpenDisplay ();
11957 rm -f conftest.$ac_objext conftest$ac_exeext
11958 if { (eval echo "$as_me:11958: \"$ac_link\"") >&5
11959 (eval $ac_link) 2>&5
11961 echo "$as_me:11961: \$? = $ac_status" >&5
11962 (exit $ac_status); } &&
11963 { ac_try='test -s conftest$ac_exeext'
11964 { (eval echo "$as_me:11964: \"$ac_try\"") >&5
11965 (eval $ac_try) 2>&5
11967 echo "$as_me:11967: \$? = $ac_status" >&5
11968 (exit $ac_status); }; }; then
11971 echo "$as_me: failed program was:" >&5
11972 cat conftest.$ac_ext >&5
11973 echo "$as_me:11973: checking for dnet_ntoa in -ldnet" >&5
11974 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
11975 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
11976 echo $ECHO_N "(cached) $ECHO_C" >&6
11978 ac_check_lib_save_LIBS=$LIBS
11979 LIBS="-ldnet $LIBS"
11980 cat >conftest.$ac_ext <<_ACEOF
11981 #line 11981 "configure"
11982 #include "confdefs.h"
11984 /* Override any gcc2 internal prototype to avoid an error. */
11988 /* We use char because int might match the return type of a gcc2
11989 builtin and then its argument prototype would still apply. */
11999 rm -f conftest.$ac_objext conftest$ac_exeext
12000 if { (eval echo "$as_me:12000: \"$ac_link\"") >&5
12001 (eval $ac_link) 2>&5
12003 echo "$as_me:12003: \$? = $ac_status" >&5
12004 (exit $ac_status); } &&
12005 { ac_try='test -s conftest$ac_exeext'
12006 { (eval echo "$as_me:12006: \"$ac_try\"") >&5
12007 (eval $ac_try) 2>&5
12009 echo "$as_me:12009: \$? = $ac_status" >&5
12010 (exit $ac_status); }; }; then
12011 ac_cv_lib_dnet_dnet_ntoa=yes
12013 echo "$as_me: failed program was:" >&5
12014 cat conftest.$ac_ext >&5
12015 ac_cv_lib_dnet_dnet_ntoa=no
12017 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12018 LIBS=$ac_check_lib_save_LIBS
12020 echo "$as_me:12020: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
12021 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
12022 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
12023 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
12026 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
12027 echo "$as_me:12027: checking for dnet_ntoa in -ldnet_stub" >&5
12028 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
12029 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
12030 echo $ECHO_N "(cached) $ECHO_C" >&6
12032 ac_check_lib_save_LIBS=$LIBS
12033 LIBS="-ldnet_stub $LIBS"
12034 cat >conftest.$ac_ext <<_ACEOF
12035 #line 12035 "configure"
12036 #include "confdefs.h"
12038 /* Override any gcc2 internal prototype to avoid an error. */
12042 /* We use char because int might match the return type of a gcc2
12043 builtin and then its argument prototype would still apply. */
12053 rm -f conftest.$ac_objext conftest$ac_exeext
12054 if { (eval echo "$as_me:12054: \"$ac_link\"") >&5
12055 (eval $ac_link) 2>&5
12057 echo "$as_me:12057: \$? = $ac_status" >&5
12058 (exit $ac_status); } &&
12059 { ac_try='test -s conftest$ac_exeext'
12060 { (eval echo "$as_me:12060: \"$ac_try\"") >&5
12061 (eval $ac_try) 2>&5
12063 echo "$as_me:12063: \$? = $ac_status" >&5
12064 (exit $ac_status); }; }; then
12065 ac_cv_lib_dnet_stub_dnet_ntoa=yes
12067 echo "$as_me: failed program was:" >&5
12068 cat conftest.$ac_ext >&5
12069 ac_cv_lib_dnet_stub_dnet_ntoa=no
12071 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12072 LIBS=$ac_check_lib_save_LIBS
12074 echo "$as_me:12074: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
12075 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
12076 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
12077 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
12082 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12083 LIBS="$ac_xsave_LIBS"
12085 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
12086 # to get the SysV transport functions.
12087 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
12089 # The nsl library prevents programs from opening the X display
12090 # on Irix 5.2, according to T.E. Dickey.
12091 # The functions gethostbyname, getservbyname, and inet_addr are
12092 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
12093 echo "$as_me:12093: checking for gethostbyname" >&5
12094 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
12095 if test "${ac_cv_func_gethostbyname+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 gethostbyname autoconf_temporary
12102 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12103 #undef gethostbyname
12109 /* We use char because int might match the return type of a gcc2
12110 builtin and then its argument prototype would still apply. */
12111 char gethostbyname (void);
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_gethostbyname) || defined (__stub___gethostbyname)
12121 #error found stub for gethostbyname
12124 return gethostbyname ();
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_gethostbyname=yes
12143 echo "$as_me: failed program was:" >&5
12144 cat conftest.$ac_ext >&5
12145 ac_cv_func_gethostbyname=no
12147 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12149 echo "$as_me:12149: result: $ac_cv_func_gethostbyname" >&5
12150 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
12152 if test $ac_cv_func_gethostbyname = no; then
12153 echo "$as_me:12153: checking for gethostbyname in -lnsl" >&5
12154 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
12155 if test "${ac_cv_lib_nsl_gethostbyname+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. */
12170 char gethostbyname ();
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_nsl_gethostbyname=yes
12193 echo "$as_me: failed program was:" >&5
12194 cat conftest.$ac_ext >&5
12195 ac_cv_lib_nsl_gethostbyname=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_nsl_gethostbyname" >&5
12201 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
12202 if test $ac_cv_lib_nsl_gethostbyname = yes; then
12203 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
12206 if test $ac_cv_lib_nsl_gethostbyname = no; then
12207 echo "$as_me:12207: checking for gethostbyname in -lbsd" >&5
12208 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
12209 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
12210 echo $ECHO_N "(cached) $ECHO_C" >&6
12212 ac_check_lib_save_LIBS=$LIBS
12214 cat >conftest.$ac_ext <<_ACEOF
12215 #line 12215 "configure"
12216 #include "confdefs.h"
12218 /* Override any gcc2 internal prototype to avoid an error. */
12222 /* We use char because int might match the return type of a gcc2
12223 builtin and then its argument prototype would still apply. */
12224 char gethostbyname ();
12233 rm -f conftest.$ac_objext conftest$ac_exeext
12234 if { (eval echo "$as_me:12234: \"$ac_link\"") >&5
12235 (eval $ac_link) 2>&5
12237 echo "$as_me:12237: \$? = $ac_status" >&5
12238 (exit $ac_status); } &&
12239 { ac_try='test -s conftest$ac_exeext'
12240 { (eval echo "$as_me:12240: \"$ac_try\"") >&5
12241 (eval $ac_try) 2>&5
12243 echo "$as_me:12243: \$? = $ac_status" >&5
12244 (exit $ac_status); }; }; then
12245 ac_cv_lib_bsd_gethostbyname=yes
12247 echo "$as_me: failed program was:" >&5
12248 cat conftest.$ac_ext >&5
12249 ac_cv_lib_bsd_gethostbyname=no
12251 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12252 LIBS=$ac_check_lib_save_LIBS
12254 echo "$as_me:12254: result: $ac_cv_lib_bsd_gethostbyname" >&5
12255 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
12256 if test $ac_cv_lib_bsd_gethostbyname = yes; then
12257 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
12263 # lieder@skyler.mavd.honeywell.com says without -lsocket,
12264 # socket/setsockopt and other routines are undefined under SCO ODT
12265 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
12266 # on later versions), says Simon Leinen: it contains gethostby*
12267 # variants that don't use the nameserver (or something). -lsocket
12268 # must be given before -lnsl if both are needed. We assume that
12269 # if connect needs -lnsl, so does gethostbyname.
12270 echo "$as_me:12270: checking for connect" >&5
12271 echo $ECHO_N "checking for connect... $ECHO_C" >&6
12272 if test "${ac_cv_func_connect+set}" = set; then
12273 echo $ECHO_N "(cached) $ECHO_C" >&6
12275 cat >conftest.$ac_ext <<_ACEOF
12276 #line 12276 "configure"
12277 #include "confdefs.h"
12278 #define connect autoconf_temporary
12279 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12286 /* We use char because int might match the return type of a gcc2
12287 builtin and then its argument prototype would still apply. */
12288 char connect (void);
12294 /* The GNU C library defines stubs for functions which it implements
12295 to always fail with ENOSYS. Some functions are actually named
12296 something starting with __ and the normal name is an alias. */
12297 #if defined (__stub_connect) || defined (__stub___connect)
12298 #error found stub for connect
12306 rm -f conftest.$ac_objext conftest$ac_exeext
12307 if { (eval echo "$as_me:12307: \"$ac_link\"") >&5
12308 (eval $ac_link) 2>&5
12310 echo "$as_me:12310: \$? = $ac_status" >&5
12311 (exit $ac_status); } &&
12312 { ac_try='test -s conftest$ac_exeext'
12313 { (eval echo "$as_me:12313: \"$ac_try\"") >&5
12314 (eval $ac_try) 2>&5
12316 echo "$as_me:12316: \$? = $ac_status" >&5
12317 (exit $ac_status); }; }; then
12318 ac_cv_func_connect=yes
12320 echo "$as_me: failed program was:" >&5
12321 cat conftest.$ac_ext >&5
12322 ac_cv_func_connect=no
12324 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12326 echo "$as_me:12326: result: $ac_cv_func_connect" >&5
12327 echo "${ECHO_T}$ac_cv_func_connect" >&6
12329 if test $ac_cv_func_connect = no; then
12330 echo "$as_me:12330: checking for connect in -lsocket" >&5
12331 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
12332 if test "${ac_cv_lib_socket_connect+set}" = set; then
12333 echo $ECHO_N "(cached) $ECHO_C" >&6
12335 ac_check_lib_save_LIBS=$LIBS
12336 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
12337 cat >conftest.$ac_ext <<_ACEOF
12338 #line 12338 "configure"
12339 #include "confdefs.h"
12341 /* Override any gcc2 internal prototype to avoid an error. */
12345 /* We use char because int might match the return type of a gcc2
12346 builtin and then its argument prototype would still apply. */
12356 rm -f conftest.$ac_objext conftest$ac_exeext
12357 if { (eval echo "$as_me:12357: \"$ac_link\"") >&5
12358 (eval $ac_link) 2>&5
12360 echo "$as_me:12360: \$? = $ac_status" >&5
12361 (exit $ac_status); } &&
12362 { ac_try='test -s conftest$ac_exeext'
12363 { (eval echo "$as_me:12363: \"$ac_try\"") >&5
12364 (eval $ac_try) 2>&5
12366 echo "$as_me:12366: \$? = $ac_status" >&5
12367 (exit $ac_status); }; }; then
12368 ac_cv_lib_socket_connect=yes
12370 echo "$as_me: failed program was:" >&5
12371 cat conftest.$ac_ext >&5
12372 ac_cv_lib_socket_connect=no
12374 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12375 LIBS=$ac_check_lib_save_LIBS
12377 echo "$as_me:12377: result: $ac_cv_lib_socket_connect" >&5
12378 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
12379 if test $ac_cv_lib_socket_connect = yes; then
12380 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
12385 # Guillermo Gomez says -lposix is necessary on A/UX.
12386 echo "$as_me:12386: checking for remove" >&5
12387 echo $ECHO_N "checking for remove... $ECHO_C" >&6
12388 if test "${ac_cv_func_remove+set}" = set; then
12389 echo $ECHO_N "(cached) $ECHO_C" >&6
12391 cat >conftest.$ac_ext <<_ACEOF
12392 #line 12392 "configure"
12393 #include "confdefs.h"
12394 #define remove autoconf_temporary
12395 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12402 /* We use char because int might match the return type of a gcc2
12403 builtin and then its argument prototype would still apply. */
12404 char remove (void);
12410 /* The GNU C library defines stubs for functions which it implements
12411 to always fail with ENOSYS. Some functions are actually named
12412 something starting with __ and the normal name is an alias. */
12413 #if defined (__stub_remove) || defined (__stub___remove)
12414 #error found stub for remove
12422 rm -f conftest.$ac_objext conftest$ac_exeext
12423 if { (eval echo "$as_me:12423: \"$ac_link\"") >&5
12424 (eval $ac_link) 2>&5
12426 echo "$as_me:12426: \$? = $ac_status" >&5
12427 (exit $ac_status); } &&
12428 { ac_try='test -s conftest$ac_exeext'
12429 { (eval echo "$as_me:12429: \"$ac_try\"") >&5
12430 (eval $ac_try) 2>&5
12432 echo "$as_me:12432: \$? = $ac_status" >&5
12433 (exit $ac_status); }; }; then
12434 ac_cv_func_remove=yes
12436 echo "$as_me: failed program was:" >&5
12437 cat conftest.$ac_ext >&5
12438 ac_cv_func_remove=no
12440 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12442 echo "$as_me:12442: result: $ac_cv_func_remove" >&5
12443 echo "${ECHO_T}$ac_cv_func_remove" >&6
12445 if test $ac_cv_func_remove = no; then
12446 echo "$as_me:12446: checking for remove in -lposix" >&5
12447 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
12448 if test "${ac_cv_lib_posix_remove+set}" = set; then
12449 echo $ECHO_N "(cached) $ECHO_C" >&6
12451 ac_check_lib_save_LIBS=$LIBS
12452 LIBS="-lposix $LIBS"
12453 cat >conftest.$ac_ext <<_ACEOF
12454 #line 12454 "configure"
12455 #include "confdefs.h"
12457 /* Override any gcc2 internal prototype to avoid an error. */
12461 /* We use char because int might match the return type of a gcc2
12462 builtin and then its argument prototype would still apply. */
12472 rm -f conftest.$ac_objext conftest$ac_exeext
12473 if { (eval echo "$as_me:12473: \"$ac_link\"") >&5
12474 (eval $ac_link) 2>&5
12476 echo "$as_me:12476: \$? = $ac_status" >&5
12477 (exit $ac_status); } &&
12478 { ac_try='test -s conftest$ac_exeext'
12479 { (eval echo "$as_me:12479: \"$ac_try\"") >&5
12480 (eval $ac_try) 2>&5
12482 echo "$as_me:12482: \$? = $ac_status" >&5
12483 (exit $ac_status); }; }; then
12484 ac_cv_lib_posix_remove=yes
12486 echo "$as_me: failed program was:" >&5
12487 cat conftest.$ac_ext >&5
12488 ac_cv_lib_posix_remove=no
12490 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12491 LIBS=$ac_check_lib_save_LIBS
12493 echo "$as_me:12493: result: $ac_cv_lib_posix_remove" >&5
12494 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
12495 if test $ac_cv_lib_posix_remove = yes; then
12496 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
12501 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
12502 echo "$as_me:12502: checking for shmat" >&5
12503 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
12504 if test "${ac_cv_func_shmat+set}" = set; then
12505 echo $ECHO_N "(cached) $ECHO_C" >&6
12507 cat >conftest.$ac_ext <<_ACEOF
12508 #line 12508 "configure"
12509 #include "confdefs.h"
12510 #define shmat autoconf_temporary
12511 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12518 /* We use char because int might match the return type of a gcc2
12519 builtin and then its argument prototype would still apply. */
12526 /* The GNU C library defines stubs for functions which it implements
12527 to always fail with ENOSYS. Some functions are actually named
12528 something starting with __ and the normal name is an alias. */
12529 #if defined (__stub_shmat) || defined (__stub___shmat)
12530 #error found stub for shmat
12538 rm -f conftest.$ac_objext conftest$ac_exeext
12539 if { (eval echo "$as_me:12539: \"$ac_link\"") >&5
12540 (eval $ac_link) 2>&5
12542 echo "$as_me:12542: \$? = $ac_status" >&5
12543 (exit $ac_status); } &&
12544 { ac_try='test -s conftest$ac_exeext'
12545 { (eval echo "$as_me:12545: \"$ac_try\"") >&5
12546 (eval $ac_try) 2>&5
12548 echo "$as_me:12548: \$? = $ac_status" >&5
12549 (exit $ac_status); }; }; then
12550 ac_cv_func_shmat=yes
12552 echo "$as_me: failed program was:" >&5
12553 cat conftest.$ac_ext >&5
12554 ac_cv_func_shmat=no
12556 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12558 echo "$as_me:12558: result: $ac_cv_func_shmat" >&5
12559 echo "${ECHO_T}$ac_cv_func_shmat" >&6
12561 if test $ac_cv_func_shmat = no; then
12562 echo "$as_me:12562: checking for shmat in -lipc" >&5
12563 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
12564 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
12565 echo $ECHO_N "(cached) $ECHO_C" >&6
12567 ac_check_lib_save_LIBS=$LIBS
12569 cat >conftest.$ac_ext <<_ACEOF
12570 #line 12570 "configure"
12571 #include "confdefs.h"
12573 /* Override any gcc2 internal prototype to avoid an error. */
12577 /* We use char because int might match the return type of a gcc2
12578 builtin and then its argument prototype would still apply. */
12588 rm -f conftest.$ac_objext conftest$ac_exeext
12589 if { (eval echo "$as_me:12589: \"$ac_link\"") >&5
12590 (eval $ac_link) 2>&5
12592 echo "$as_me:12592: \$? = $ac_status" >&5
12593 (exit $ac_status); } &&
12594 { ac_try='test -s conftest$ac_exeext'
12595 { (eval echo "$as_me:12595: \"$ac_try\"") >&5
12596 (eval $ac_try) 2>&5
12598 echo "$as_me:12598: \$? = $ac_status" >&5
12599 (exit $ac_status); }; }; then
12600 ac_cv_lib_ipc_shmat=yes
12602 echo "$as_me: failed program was:" >&5
12603 cat conftest.$ac_ext >&5
12604 ac_cv_lib_ipc_shmat=no
12606 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12607 LIBS=$ac_check_lib_save_LIBS
12609 echo "$as_me:12609: result: $ac_cv_lib_ipc_shmat" >&5
12610 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
12611 if test $ac_cv_lib_ipc_shmat = yes; then
12612 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
12618 # Check for libraries that X11R6 Xt/Xaw programs need.
12619 ac_save_LDFLAGS=$LDFLAGS
12620 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
12621 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
12622 # check for ICE first), but we must link in the order -lSM -lICE or
12623 # we get undefined symbols. So assume we have SM if we have ICE.
12624 # These have to be linked with before -lX11, unlike the other
12625 # libraries we check for below, so use a different variable.
12626 # John Interrante, Karl Berry
12627 echo "$as_me:12627: checking for IceConnectionNumber in -lICE" >&5
12628 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
12629 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
12630 echo $ECHO_N "(cached) $ECHO_C" >&6
12632 ac_check_lib_save_LIBS=$LIBS
12633 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
12634 cat >conftest.$ac_ext <<_ACEOF
12635 #line 12635 "configure"
12636 #include "confdefs.h"
12638 /* Override any gcc2 internal prototype to avoid an error. */
12642 /* We use char because int might match the return type of a gcc2
12643 builtin and then its argument prototype would still apply. */
12644 char IceConnectionNumber ();
12648 IceConnectionNumber ();
12653 rm -f conftest.$ac_objext conftest$ac_exeext
12654 if { (eval echo "$as_me:12654: \"$ac_link\"") >&5
12655 (eval $ac_link) 2>&5
12657 echo "$as_me:12657: \$? = $ac_status" >&5
12658 (exit $ac_status); } &&
12659 { ac_try='test -s conftest$ac_exeext'
12660 { (eval echo "$as_me:12660: \"$ac_try\"") >&5
12661 (eval $ac_try) 2>&5
12663 echo "$as_me:12663: \$? = $ac_status" >&5
12664 (exit $ac_status); }; }; then
12665 ac_cv_lib_ICE_IceConnectionNumber=yes
12667 echo "$as_me: failed program was:" >&5
12668 cat conftest.$ac_ext >&5
12669 ac_cv_lib_ICE_IceConnectionNumber=no
12671 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12672 LIBS=$ac_check_lib_save_LIBS
12674 echo "$as_me:12674: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
12675 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
12676 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
12677 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
12680 LDFLAGS=$ac_save_LDFLAGS
12684 cf_x_athena=${cf_x_athena:-Xaw}
12686 echo "$as_me:12686: checking if you want to link with Xaw 3d library" >&5
12687 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
12690 # Check whether --with-Xaw3d or --without-Xaw3d was given.
12691 if test "${with_Xaw3d+set}" = set; then
12692 withval="$with_Xaw3d"
12695 if test "$withval" = yes ; then
12697 echo "$as_me:12697: result: yes" >&5
12698 echo "${ECHO_T}yes" >&6
12700 echo "$as_me:12700: result: no" >&5
12701 echo "${ECHO_T}no" >&6
12704 echo "$as_me:12704: checking if you want to link with Xaw 3d xft library" >&5
12705 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
12708 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
12709 if test "${with_Xaw3dxft+set}" = set; then
12710 withval="$with_Xaw3dxft"
12713 if test "$withval" = yes ; then
12714 cf_x_athena=Xaw3dxft
12715 echo "$as_me:12715: result: yes" >&5
12716 echo "${ECHO_T}yes" >&6
12718 echo "$as_me:12718: result: no" >&5
12719 echo "${ECHO_T}no" >&6
12722 echo "$as_me:12722: checking if you want to link with neXT Athena library" >&5
12723 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
12726 # Check whether --with-neXtaw or --without-neXtaw was given.
12727 if test "${with_neXtaw+set}" = set; then
12728 withval="$with_neXtaw"
12731 if test "$withval" = yes ; then
12733 echo "$as_me:12733: result: yes" >&5
12734 echo "${ECHO_T}yes" >&6
12736 echo "$as_me:12736: result: no" >&5
12737 echo "${ECHO_T}no" >&6
12740 echo "$as_me:12740: checking if you want to link with Athena-Plus library" >&5
12741 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
12744 # Check whether --with-XawPlus or --without-XawPlus was given.
12745 if test "${with_XawPlus+set}" = set; then
12746 withval="$with_XawPlus"
12749 if test "$withval" = yes ; then
12750 cf_x_athena=XawPlus
12751 echo "$as_me:12751: result: yes" >&5
12752 echo "${ECHO_T}yes" >&6
12754 echo "$as_me:12754: result: no" >&5
12755 echo "${ECHO_T}no" >&6
12760 if test "$PKG_CONFIG" != none ; then
12762 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
12763 for cf_athena_pkg in \
12766 ${cf_x_athena}-devel \
12767 lib${cf_x_athena} \
12768 lib${cf_x_athena}-devel
12771 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
12772 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
12774 echo "${as_me:-configure}:12774: testing found package $cf_athena_pkg ..." 1>&5
12776 cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
12777 cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
12778 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
12780 echo "${as_me:-configure}:12780: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12782 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
12784 echo "${as_me:-configure}:12784: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
12789 cf_new_extra_cppflags=
12791 for cf_add_cflags in $cf_pkgconfig_incs
12793 case $cf_fix_cppflags in
12795 case $cf_add_cflags in
12796 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12797 case $cf_add_cflags in
12799 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12801 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12802 && test -z "${cf_tst_cflags}" \
12803 && cf_fix_cppflags=yes
12805 if test $cf_fix_cppflags = yes ; then
12807 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12808 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12811 elif test "${cf_tst_cflags}" = "\"'" ; then
12813 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12814 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12820 case "$CPPFLAGS" in
12824 case $cf_add_cflags in
12826 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12828 CPPFLAGS=`echo "$CPPFLAGS" | \
12829 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12830 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12835 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12836 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12843 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12844 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12851 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12852 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12854 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12856 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12857 && test -z "${cf_tst_cflags}" \
12858 && cf_fix_cppflags=no
12863 if test -n "$cf_new_cflags" ; then
12865 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12866 CFLAGS="${CFLAGS}$cf_new_cflags"
12870 if test -n "$cf_new_cppflags" ; then
12872 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12873 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12877 if test -n "$cf_new_extra_cppflags" ; then
12879 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12880 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12884 cf_add_libs="$LIBS"
12887 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12888 # filter duplicates
12889 for cf_add_1lib in $cf_add_0lib; do
12890 for cf_add_2lib in $cf_add_libs; do
12891 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12896 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12898 LIBS="$cf_add_libs"
12900 cf_x_athena_lib="$cf_pkgconfig_libs"
12902 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12904 cat >>confdefs.h <<EOF
12905 #define $cf_x_athena_LIBS 1
12908 for cf_trim_lib in Xmu Xt X11
12911 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
12912 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
12913 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
12915 echo "${as_me:-configure}:12915: testing ..trimmed $LIBS ..." 1>&5
12921 echo "$as_me:12921: checking for usable $cf_x_athena/Xmu package" >&5
12922 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
12923 if test "${cf_cv_xaw_compat+set}" = set; then
12924 echo $ECHO_N "(cached) $ECHO_C" >&6
12927 cat >conftest.$ac_ext <<_ACEOF
12928 #line 12928 "configure"
12929 #include "confdefs.h"
12931 #include <X11/Xmu/CharSet.h>
12937 int check = XmuCompareISOLatin1("big", "small");
12944 rm -f conftest.$ac_objext conftest$ac_exeext
12945 if { (eval echo "$as_me:12945: \"$ac_link\"") >&5
12946 (eval $ac_link) 2>&5
12948 echo "$as_me:12948: \$? = $ac_status" >&5
12949 (exit $ac_status); } &&
12950 { ac_try='test -s conftest$ac_exeext'
12951 { (eval echo "$as_me:12951: \"$ac_try\"") >&5
12952 (eval $ac_try) 2>&5
12954 echo "$as_me:12954: \$? = $ac_status" >&5
12955 (exit $ac_status); }; }; then
12956 cf_cv_xaw_compat=yes
12958 echo "$as_me: failed program was:" >&5
12959 cat conftest.$ac_ext >&5
12960 cf_cv_xaw_compat=no
12962 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12964 echo "$as_me:12964: result: $cf_cv_xaw_compat" >&5
12965 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
12967 if test "$cf_cv_xaw_compat" = no
12969 # workaround for broken ".pc" files...
12970 case "$cf_x_athena_lib" in
12974 test -n "$verbose" && echo " work around broken package" 1>&6
12976 echo "${as_me:-configure}:12976: testing work around broken package ..." 1>&5
12978 cf_save_xmu="$LIBS"
12979 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
12981 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
12982 test -n "$verbose" && echo " found package xmu" 1>&6
12984 echo "${as_me:-configure}:12984: testing found package xmu ..." 1>&5
12986 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
12987 cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`"
12988 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
12990 echo "${as_me:-configure}:12990: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12992 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
12994 echo "${as_me:-configure}:12994: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
12999 cf_new_extra_cppflags=
13001 for cf_add_cflags in $cf_pkgconfig_incs
13003 case $cf_fix_cppflags in
13005 case $cf_add_cflags in
13006 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13007 case $cf_add_cflags in
13009 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13011 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13012 && test -z "${cf_tst_cflags}" \
13013 && cf_fix_cppflags=yes
13015 if test $cf_fix_cppflags = yes ; then
13017 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13018 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13021 elif test "${cf_tst_cflags}" = "\"'" ; then
13023 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13024 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13030 case "$CPPFLAGS" in
13034 case $cf_add_cflags in
13036 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13038 CPPFLAGS=`echo "$CPPFLAGS" | \
13039 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13040 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13045 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13046 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13053 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13054 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13061 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13062 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13064 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13066 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13067 && test -z "${cf_tst_cflags}" \
13068 && cf_fix_cppflags=no
13073 if test -n "$cf_new_cflags" ; then
13075 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13076 CFLAGS="${CFLAGS}$cf_new_cflags"
13080 if test -n "$cf_new_cppflags" ; then
13082 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13083 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13087 if test -n "$cf_new_extra_cppflags" ; then
13089 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13090 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13094 cf_add_libs="$LIBS"
13097 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13098 # filter duplicates
13099 for cf_add_1lib in $cf_add_0lib; do
13100 for cf_add_2lib in $cf_add_libs; do
13101 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13106 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13108 LIBS="$cf_add_libs"
13110 LIBS="$cf_save_xmu"
13112 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13114 echo "${as_me:-configure}:13114: testing ...before $LIBS ..." 1>&5
13116 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
13117 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13119 echo "${as_me:-configure}:13119: testing ...after $LIBS ..." 1>&5
13125 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13127 echo "${as_me:-configure}:13127: testing ...before $LIBS ..." 1>&5
13129 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
13130 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13132 echo "${as_me:-configure}:13132: testing ...after $LIBS ..." 1>&5
13136 for cf_trim_lib in Xmu Xt X11
13139 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13140 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13141 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13143 echo "${as_me:-configure}:13143: testing ..trimmed $LIBS ..." 1>&5
13163 if test -z "$cf_x_athena_lib" ; then
13165 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
13166 test -n "$verbose" && echo " found package Xext" 1>&6
13168 echo "${as_me:-configure}:13168: testing found package Xext ..." 1>&5
13170 cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
13171 cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
13172 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
13174 echo "${as_me:-configure}:13174: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13176 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
13178 echo "${as_me:-configure}:13178: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
13183 cf_new_extra_cppflags=
13185 for cf_add_cflags in $cf_pkgconfig_incs
13187 case $cf_fix_cppflags in
13189 case $cf_add_cflags in
13190 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13191 case $cf_add_cflags in
13193 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13195 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13196 && test -z "${cf_tst_cflags}" \
13197 && cf_fix_cppflags=yes
13199 if test $cf_fix_cppflags = yes ; then
13201 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13202 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13205 elif test "${cf_tst_cflags}" = "\"'" ; then
13207 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13208 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13214 case "$CPPFLAGS" in
13218 case $cf_add_cflags in
13220 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13222 CPPFLAGS=`echo "$CPPFLAGS" | \
13223 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13224 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13229 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13230 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13237 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13238 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13245 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13246 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13248 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13250 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13251 && test -z "${cf_tst_cflags}" \
13252 && cf_fix_cppflags=no
13257 if test -n "$cf_new_cflags" ; then
13259 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13260 CFLAGS="${CFLAGS}$cf_new_cflags"
13264 if test -n "$cf_new_cppflags" ; then
13266 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13267 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13271 if test -n "$cf_new_extra_cppflags" ; then
13273 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13274 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13278 cf_add_libs="$LIBS"
13281 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13282 # filter duplicates
13283 for cf_add_1lib in $cf_add_0lib; do
13284 for cf_add_2lib in $cf_add_libs; do
13285 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13290 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13292 LIBS="$cf_add_libs"
13299 echo "$as_me:13299: checking for XextCreateExtension in -lXext" >&5
13300 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
13301 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
13302 echo $ECHO_N "(cached) $ECHO_C" >&6
13304 ac_check_lib_save_LIBS=$LIBS
13305 LIBS="-lXext $LIBS"
13306 cat >conftest.$ac_ext <<_ACEOF
13307 #line 13307 "configure"
13308 #include "confdefs.h"
13310 /* Override any gcc2 internal prototype to avoid an error. */
13314 /* We use char because int might match the return type of a gcc2
13315 builtin and then its argument prototype would still apply. */
13316 char XextCreateExtension ();
13320 XextCreateExtension ();
13325 rm -f conftest.$ac_objext conftest$ac_exeext
13326 if { (eval echo "$as_me:13326: \"$ac_link\"") >&5
13327 (eval $ac_link) 2>&5
13329 echo "$as_me:13329: \$? = $ac_status" >&5
13330 (exit $ac_status); } &&
13331 { ac_try='test -s conftest$ac_exeext'
13332 { (eval echo "$as_me:13332: \"$ac_try\"") >&5
13333 (eval $ac_try) 2>&5
13335 echo "$as_me:13335: \$? = $ac_status" >&5
13336 (exit $ac_status); }; }; then
13337 ac_cv_lib_Xext_XextCreateExtension=yes
13339 echo "$as_me: failed program was:" >&5
13340 cat conftest.$ac_ext >&5
13341 ac_cv_lib_Xext_XextCreateExtension=no
13343 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13344 LIBS=$ac_check_lib_save_LIBS
13346 echo "$as_me:13346: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
13347 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
13348 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
13350 cf_add_libs="$LIBS"
13353 for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13354 # filter duplicates
13355 for cf_add_1lib in $cf_add_0lib; do
13356 for cf_add_2lib in $cf_add_libs; do
13357 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13362 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13364 LIBS="$cf_add_libs"
13370 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
13371 # in some cases has installed dummy files in the former, other cases replaced
13372 # it with a link to the new location). This complicates the configure script.
13373 # Check for that pitfall, and recover using pkg-config
13375 # If none of these are set, the configuration is almost certainly broken.
13376 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
13379 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
13380 test -n "$verbose" && echo " found package x11" 1>&6
13382 echo "${as_me:-configure}:13382: testing found package x11 ..." 1>&5
13384 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
13385 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
13386 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
13388 echo "${as_me:-configure}:13388: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13390 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
13392 echo "${as_me:-configure}:13392: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
13397 cf_new_extra_cppflags=
13399 for cf_add_cflags in $cf_pkgconfig_incs
13401 case $cf_fix_cppflags in
13403 case $cf_add_cflags in
13404 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13405 case $cf_add_cflags in
13407 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13409 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13410 && test -z "${cf_tst_cflags}" \
13411 && cf_fix_cppflags=yes
13413 if test $cf_fix_cppflags = yes ; then
13415 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13416 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13419 elif test "${cf_tst_cflags}" = "\"'" ; then
13421 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13422 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13428 case "$CPPFLAGS" in
13432 case $cf_add_cflags in
13434 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13436 CPPFLAGS=`echo "$CPPFLAGS" | \
13437 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13438 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13443 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13444 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13451 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13452 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13459 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13460 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13462 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13464 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13465 && test -z "${cf_tst_cflags}" \
13466 && cf_fix_cppflags=no
13471 if test -n "$cf_new_cflags" ; then
13473 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13474 CFLAGS="${CFLAGS}$cf_new_cflags"
13478 if test -n "$cf_new_cppflags" ; then
13480 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13481 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13485 if test -n "$cf_new_extra_cppflags" ; then
13487 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13488 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13492 cf_add_libs="$LIBS"
13495 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13496 # filter duplicates
13497 for cf_add_1lib in $cf_add_0lib; do
13498 for cf_add_2lib in $cf_add_libs; do
13499 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13504 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13506 LIBS="$cf_add_libs"
13512 { echo "$as_me:13512: WARNING: unable to find X11 library" >&5
13513 echo "$as_me: WARNING: unable to find X11 library" >&2;}
13516 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
13517 test -n "$verbose" && echo " found package ice" 1>&6
13519 echo "${as_me:-configure}:13519: testing found package ice ..." 1>&5
13521 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
13522 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
13523 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
13525 echo "${as_me:-configure}:13525: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13527 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
13529 echo "${as_me:-configure}:13529: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
13534 cf_new_extra_cppflags=
13536 for cf_add_cflags in $cf_pkgconfig_incs
13538 case $cf_fix_cppflags in
13540 case $cf_add_cflags in
13541 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13542 case $cf_add_cflags in
13544 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13546 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13547 && test -z "${cf_tst_cflags}" \
13548 && cf_fix_cppflags=yes
13550 if test $cf_fix_cppflags = yes ; then
13552 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13553 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13556 elif test "${cf_tst_cflags}" = "\"'" ; then
13558 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13559 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13565 case "$CPPFLAGS" in
13569 case $cf_add_cflags in
13571 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13573 CPPFLAGS=`echo "$CPPFLAGS" | \
13574 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13575 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13580 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13581 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13588 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13589 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13596 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13597 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13599 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13601 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13602 && test -z "${cf_tst_cflags}" \
13603 && cf_fix_cppflags=no
13608 if test -n "$cf_new_cflags" ; then
13610 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13611 CFLAGS="${CFLAGS}$cf_new_cflags"
13615 if test -n "$cf_new_cppflags" ; then
13617 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13618 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13622 if test -n "$cf_new_extra_cppflags" ; then
13624 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13625 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13629 cf_add_libs="$LIBS"
13632 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13633 # filter duplicates
13634 for cf_add_1lib in $cf_add_0lib; do
13635 for cf_add_2lib in $cf_add_libs; do
13636 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13641 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13643 LIBS="$cf_add_libs"
13649 { echo "$as_me:13649: WARNING: unable to find ICE library" >&5
13650 echo "$as_me: WARNING: unable to find ICE library" >&2;}
13653 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
13654 test -n "$verbose" && echo " found package sm" 1>&6
13656 echo "${as_me:-configure}:13656: testing found package sm ..." 1>&5
13658 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
13659 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
13660 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
13662 echo "${as_me:-configure}:13662: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13664 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
13666 echo "${as_me:-configure}:13666: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
13671 cf_new_extra_cppflags=
13673 for cf_add_cflags in $cf_pkgconfig_incs
13675 case $cf_fix_cppflags in
13677 case $cf_add_cflags in
13678 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13679 case $cf_add_cflags in
13681 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13683 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13684 && test -z "${cf_tst_cflags}" \
13685 && cf_fix_cppflags=yes
13687 if test $cf_fix_cppflags = yes ; then
13689 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13690 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13693 elif test "${cf_tst_cflags}" = "\"'" ; then
13695 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13696 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13702 case "$CPPFLAGS" in
13706 case $cf_add_cflags in
13708 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13710 CPPFLAGS=`echo "$CPPFLAGS" | \
13711 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13712 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13717 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13718 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13725 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13726 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13733 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13734 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13736 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13738 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13739 && test -z "${cf_tst_cflags}" \
13740 && cf_fix_cppflags=no
13745 if test -n "$cf_new_cflags" ; then
13747 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13748 CFLAGS="${CFLAGS}$cf_new_cflags"
13752 if test -n "$cf_new_cppflags" ; then
13754 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13755 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13759 if test -n "$cf_new_extra_cppflags" ; then
13761 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13762 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13766 cf_add_libs="$LIBS"
13769 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13770 # filter duplicates
13771 for cf_add_1lib in $cf_add_0lib; do
13772 for cf_add_2lib in $cf_add_libs; do
13773 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13778 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13780 LIBS="$cf_add_libs"
13786 { echo "$as_me:13786: WARNING: unable to find SM library" >&5
13787 echo "$as_me: WARNING: unable to find SM library" >&2;}
13790 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
13791 test -n "$verbose" && echo " found package xt" 1>&6
13793 echo "${as_me:-configure}:13793: testing found package xt ..." 1>&5
13795 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
13796 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
13797 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13799 echo "${as_me:-configure}:13799: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13801 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
13803 echo "${as_me:-configure}:13803: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13808 cf_new_extra_cppflags=
13810 for cf_add_cflags in $cf_pkgconfig_incs
13812 case $cf_fix_cppflags in
13814 case $cf_add_cflags in
13815 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13816 case $cf_add_cflags in
13818 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13820 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13821 && test -z "${cf_tst_cflags}" \
13822 && cf_fix_cppflags=yes
13824 if test $cf_fix_cppflags = yes ; then
13826 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13827 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13830 elif test "${cf_tst_cflags}" = "\"'" ; then
13832 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13833 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13839 case "$CPPFLAGS" in
13843 case $cf_add_cflags in
13845 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13847 CPPFLAGS=`echo "$CPPFLAGS" | \
13848 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13849 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13854 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13855 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13862 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13863 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13870 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13871 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13873 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13875 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13876 && test -z "${cf_tst_cflags}" \
13877 && cf_fix_cppflags=no
13882 if test -n "$cf_new_cflags" ; then
13884 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13885 CFLAGS="${CFLAGS}$cf_new_cflags"
13889 if test -n "$cf_new_cppflags" ; then
13891 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13892 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13896 if test -n "$cf_new_extra_cppflags" ; then
13898 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13899 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13903 cf_add_libs="$LIBS"
13906 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13907 # filter duplicates
13908 for cf_add_1lib in $cf_add_0lib; do
13909 for cf_add_2lib in $cf_add_libs; do
13910 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13915 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13917 LIBS="$cf_add_libs"
13923 { echo "$as_me:13923: WARNING: unable to find Xt library" >&5
13924 echo "$as_me: WARNING: unable to find Xt library" >&2;}
13928 LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
13933 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
13934 test -n "$verbose" && echo " found package xt" 1>&6
13936 echo "${as_me:-configure}:13936: testing found package xt ..." 1>&5
13938 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
13939 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
13940 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13942 echo "${as_me:-configure}:13942: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13944 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
13946 echo "${as_me:-configure}:13946: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13951 cf_new_extra_cppflags=
13953 for cf_add_cflags in $cf_pkgconfig_incs
13955 case $cf_fix_cppflags in
13957 case $cf_add_cflags in
13958 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13959 case $cf_add_cflags in
13961 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13963 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13964 && test -z "${cf_tst_cflags}" \
13965 && cf_fix_cppflags=yes
13967 if test $cf_fix_cppflags = yes ; then
13969 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13970 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13973 elif test "${cf_tst_cflags}" = "\"'" ; then
13975 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13976 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13982 case "$CPPFLAGS" in
13986 case $cf_add_cflags in
13988 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13990 CPPFLAGS=`echo "$CPPFLAGS" | \
13991 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13992 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13997 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13998 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14005 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14006 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14013 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14014 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14016 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14018 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14019 && test -z "${cf_tst_cflags}" \
14020 && cf_fix_cppflags=no
14025 if test -n "$cf_new_cflags" ; then
14027 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14028 CFLAGS="${CFLAGS}$cf_new_cflags"
14032 if test -n "$cf_new_cppflags" ; then
14034 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14035 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14039 if test -n "$cf_new_extra_cppflags" ; then
14041 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14042 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14046 cf_add_libs="$LIBS"
14049 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14050 # filter duplicates
14051 for cf_add_1lib in $cf_add_0lib; do
14052 for cf_add_2lib in $cf_add_libs; do
14053 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14058 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14060 LIBS="$cf_add_libs"
14066 # we have an "xt" package, but it may omit Xt's dependency on X11
14067 echo "$as_me:14067: checking for usable X dependency" >&5
14068 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
14069 if test "${cf_cv_xt_x11_compat+set}" = set; then
14070 echo $ECHO_N "(cached) $ECHO_C" >&6
14073 cat >conftest.$ac_ext <<_ACEOF
14074 #line 14074 "configure"
14075 #include "confdefs.h"
14077 #include <X11/Xlib.h>
14083 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
14084 int rc2 = XClearWindow((Display*) 0, (Window) 0);
14085 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
14086 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
14092 rm -f conftest.$ac_objext conftest$ac_exeext
14093 if { (eval echo "$as_me:14093: \"$ac_link\"") >&5
14094 (eval $ac_link) 2>&5
14096 echo "$as_me:14096: \$? = $ac_status" >&5
14097 (exit $ac_status); } &&
14098 { ac_try='test -s conftest$ac_exeext'
14099 { (eval echo "$as_me:14099: \"$ac_try\"") >&5
14100 (eval $ac_try) 2>&5
14102 echo "$as_me:14102: \$? = $ac_status" >&5
14103 (exit $ac_status); }; }; then
14104 cf_cv_xt_x11_compat=yes
14106 echo "$as_me: failed program was:" >&5
14107 cat conftest.$ac_ext >&5
14108 cf_cv_xt_x11_compat=no
14110 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14112 echo "$as_me:14112: result: $cf_cv_xt_x11_compat" >&5
14113 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
14114 if test "$cf_cv_xt_x11_compat" = no
14116 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
14118 echo "${as_me:-configure}:14118: testing work around broken X11 dependency ..." 1>&5
14120 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
14122 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
14123 test -n "$verbose" && echo " found package x11" 1>&6
14125 echo "${as_me:-configure}:14125: testing found package x11 ..." 1>&5
14127 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
14128 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
14129 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
14131 echo "${as_me:-configure}:14131: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14133 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
14135 echo "${as_me:-configure}:14135: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
14140 cf_new_extra_cppflags=
14142 for cf_add_cflags in $cf_pkgconfig_incs
14144 case $cf_fix_cppflags in
14146 case $cf_add_cflags in
14147 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14148 case $cf_add_cflags in
14150 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14152 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14153 && test -z "${cf_tst_cflags}" \
14154 && cf_fix_cppflags=yes
14156 if test $cf_fix_cppflags = yes ; then
14158 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14159 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14162 elif test "${cf_tst_cflags}" = "\"'" ; then
14164 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14165 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14171 case "$CPPFLAGS" in
14175 case $cf_add_cflags in
14177 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14179 CPPFLAGS=`echo "$CPPFLAGS" | \
14180 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14181 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14186 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14187 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14194 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14195 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14202 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14203 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14205 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14207 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14208 && test -z "${cf_tst_cflags}" \
14209 && cf_fix_cppflags=no
14214 if test -n "$cf_new_cflags" ; then
14216 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14217 CFLAGS="${CFLAGS}$cf_new_cflags"
14221 if test -n "$cf_new_cppflags" ; then
14223 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14224 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14228 if test -n "$cf_new_extra_cppflags" ; then
14230 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14231 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14235 cf_add_libs="$LIBS"
14238 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14239 # filter duplicates
14240 for cf_add_1lib in $cf_add_0lib; do
14241 for cf_add_2lib in $cf_add_libs; do
14242 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14247 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14249 LIBS="$cf_add_libs"
14256 test -n "$verbose" && echo " ...before $LIBS" 1>&6
14258 echo "${as_me:-configure}:14258: testing ...before $LIBS ..." 1>&5
14260 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
14261 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14263 echo "${as_me:-configure}:14263: testing ...after $LIBS ..." 1>&5
14271 echo "$as_me:14271: checking for usable X Toolkit package" >&5
14272 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
14273 if test "${cf_cv_xt_ice_compat+set}" = set; then
14274 echo $ECHO_N "(cached) $ECHO_C" >&6
14277 cat >conftest.$ac_ext <<_ACEOF
14278 #line 14278 "configure"
14279 #include "confdefs.h"
14281 #include <X11/Shell.h>
14286 int num = IceConnectionNumber(0); (void) num
14292 rm -f conftest.$ac_objext conftest$ac_exeext
14293 if { (eval echo "$as_me:14293: \"$ac_link\"") >&5
14294 (eval $ac_link) 2>&5
14296 echo "$as_me:14296: \$? = $ac_status" >&5
14297 (exit $ac_status); } &&
14298 { ac_try='test -s conftest$ac_exeext'
14299 { (eval echo "$as_me:14299: \"$ac_try\"") >&5
14300 (eval $ac_try) 2>&5
14302 echo "$as_me:14302: \$? = $ac_status" >&5
14303 (exit $ac_status); }; }; then
14304 cf_cv_xt_ice_compat=yes
14306 echo "$as_me: failed program was:" >&5
14307 cat conftest.$ac_ext >&5
14308 cf_cv_xt_ice_compat=no
14310 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14312 echo "$as_me:14312: result: $cf_cv_xt_ice_compat" >&5
14313 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
14315 if test "$cf_cv_xt_ice_compat" = no
14317 # workaround for broken ".pc" files used for X Toolkit.
14318 case "x$X_PRE_LIBS" in
14324 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
14326 echo "${as_me:-configure}:14326: testing work around broken ICE dependency ..." 1>&5
14328 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
14329 test -n "$verbose" && echo " found package ice" 1>&6
14331 echo "${as_me:-configure}:14331: testing found package ice ..." 1>&5
14333 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
14334 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
14335 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
14337 echo "${as_me:-configure}:14337: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14339 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
14341 echo "${as_me:-configure}:14341: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
14346 cf_new_extra_cppflags=
14348 for cf_add_cflags in $cf_pkgconfig_incs
14350 case $cf_fix_cppflags in
14352 case $cf_add_cflags in
14353 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14354 case $cf_add_cflags in
14356 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14358 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14359 && test -z "${cf_tst_cflags}" \
14360 && cf_fix_cppflags=yes
14362 if test $cf_fix_cppflags = yes ; then
14364 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14365 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14368 elif test "${cf_tst_cflags}" = "\"'" ; then
14370 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14371 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14377 case "$CPPFLAGS" in
14381 case $cf_add_cflags in
14383 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14385 CPPFLAGS=`echo "$CPPFLAGS" | \
14386 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14387 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14392 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14393 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14400 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14401 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14408 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14409 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14411 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14413 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14414 && test -z "${cf_tst_cflags}" \
14415 && cf_fix_cppflags=no
14420 if test -n "$cf_new_cflags" ; then
14422 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14423 CFLAGS="${CFLAGS}$cf_new_cflags"
14427 if test -n "$cf_new_cppflags" ; then
14429 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14430 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14434 if test -n "$cf_new_extra_cppflags" ; then
14436 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14437 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14441 cf_add_libs="$LIBS"
14444 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14445 # filter duplicates
14446 for cf_add_1lib in $cf_add_0lib; do
14447 for cf_add_2lib in $cf_add_libs; do
14448 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14453 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14455 LIBS="$cf_add_libs"
14457 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
14458 test -n "$verbose" && echo " found package sm" 1>&6
14460 echo "${as_me:-configure}:14460: testing found package sm ..." 1>&5
14462 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
14463 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
14464 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
14466 echo "${as_me:-configure}:14466: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14468 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
14470 echo "${as_me:-configure}:14470: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
14475 cf_new_extra_cppflags=
14477 for cf_add_cflags in $cf_pkgconfig_incs
14479 case $cf_fix_cppflags in
14481 case $cf_add_cflags in
14482 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14483 case $cf_add_cflags in
14485 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14487 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14488 && test -z "${cf_tst_cflags}" \
14489 && cf_fix_cppflags=yes
14491 if test $cf_fix_cppflags = yes ; then
14493 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14494 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14497 elif test "${cf_tst_cflags}" = "\"'" ; then
14499 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14500 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14506 case "$CPPFLAGS" in
14510 case $cf_add_cflags in
14512 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14514 CPPFLAGS=`echo "$CPPFLAGS" | \
14515 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14516 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14521 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14522 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14529 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14530 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14537 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14538 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14540 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14542 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14543 && test -z "${cf_tst_cflags}" \
14544 && cf_fix_cppflags=no
14549 if test -n "$cf_new_cflags" ; then
14551 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14552 CFLAGS="${CFLAGS}$cf_new_cflags"
14556 if test -n "$cf_new_cppflags" ; then
14558 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14559 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14563 if test -n "$cf_new_extra_cppflags" ; then
14565 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14566 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14570 cf_add_libs="$LIBS"
14573 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14574 # filter duplicates
14575 for cf_add_1lib in $cf_add_0lib; do
14576 for cf_add_2lib in $cf_add_libs; do
14577 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14582 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14584 LIBS="$cf_add_libs"
14597 test -n "$verbose" && echo " ...before $LIBS" 1>&6
14599 echo "${as_me:-configure}:14599: testing ...before $LIBS ..." 1>&5
14601 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
14602 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14604 echo "${as_me:-configure}:14604: testing ...after $LIBS ..." 1>&5
14620 LDFLAGS="$X_LIBS $LDFLAGS"
14622 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
14624 echo "${as_me:-configure}:14624: testing checking additions to CFLAGS ..." 1>&5
14626 cf_check_cflags="$CFLAGS"
14627 cf_check_cppflags="$CPPFLAGS"
14632 cf_new_extra_cppflags=
14634 for cf_add_cflags in $X_CFLAGS
14636 case $cf_fix_cppflags in
14638 case $cf_add_cflags in
14639 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14640 case $cf_add_cflags in
14642 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14644 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14645 && test -z "${cf_tst_cflags}" \
14646 && cf_fix_cppflags=yes
14648 if test $cf_fix_cppflags = yes ; then
14650 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14651 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14654 elif test "${cf_tst_cflags}" = "\"'" ; then
14656 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14657 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14663 case "$CPPFLAGS" in
14667 case $cf_add_cflags in
14669 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14671 CPPFLAGS=`echo "$CPPFLAGS" | \
14672 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14673 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14678 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14679 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14686 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14687 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14694 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14695 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14697 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14699 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14700 && test -z "${cf_tst_cflags}" \
14701 && cf_fix_cppflags=no
14706 if test -n "$cf_new_cflags" ; then
14707 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
14709 echo "${as_me:-configure}:14709: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
14711 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14712 CFLAGS="${CFLAGS}$cf_new_cflags"
14716 if test -n "$cf_new_cppflags" ; then
14717 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
14719 echo "${as_me:-configure}:14719: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
14721 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14722 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14726 if test -n "$cf_new_extra_cppflags" ; then
14727 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
14729 echo "${as_me:-configure}:14729: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
14731 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14732 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14736 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
14737 cat >conftest.$ac_ext <<_ACEOF
14738 #line 14738 "configure"
14739 #include "confdefs.h"
14744 printf("Hello world");
14749 rm -f conftest.$ac_objext conftest$ac_exeext
14750 if { (eval echo "$as_me:14750: \"$ac_link\"") >&5
14751 (eval $ac_link) 2>&5
14753 echo "$as_me:14753: \$? = $ac_status" >&5
14754 (exit $ac_status); } &&
14755 { ac_try='test -s conftest$ac_exeext'
14756 { (eval echo "$as_me:14756: \"$ac_try\"") >&5
14757 (eval $ac_try) 2>&5
14759 echo "$as_me:14759: \$? = $ac_status" >&5
14760 (exit $ac_status); }; }; then
14763 echo "$as_me: failed program was:" >&5
14764 cat conftest.$ac_ext >&5
14765 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
14767 echo "${as_me:-configure}:14767: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
14769 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
14770 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
14772 echo "${as_me:-configure}:14772: testing but keeping change to \$CPPFLAGS ..." 1>&5
14775 CFLAGS="$cf_check_flags"
14777 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14780 echo "$as_me:14780: checking for XOpenDisplay" >&5
14781 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
14782 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
14783 echo $ECHO_N "(cached) $ECHO_C" >&6
14785 cat >conftest.$ac_ext <<_ACEOF
14786 #line 14786 "configure"
14787 #include "confdefs.h"
14788 #define XOpenDisplay autoconf_temporary
14789 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14790 #undef XOpenDisplay
14796 /* We use char because int might match the return type of a gcc2
14797 builtin and then its argument prototype would still apply. */
14798 char XOpenDisplay (void);
14804 /* The GNU C library defines stubs for functions which it implements
14805 to always fail with ENOSYS. Some functions are actually named
14806 something starting with __ and the normal name is an alias. */
14807 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
14808 #error found stub for XOpenDisplay
14811 return XOpenDisplay ();
14816 rm -f conftest.$ac_objext conftest$ac_exeext
14817 if { (eval echo "$as_me:14817: \"$ac_link\"") >&5
14818 (eval $ac_link) 2>&5
14820 echo "$as_me:14820: \$? = $ac_status" >&5
14821 (exit $ac_status); } &&
14822 { ac_try='test -s conftest$ac_exeext'
14823 { (eval echo "$as_me:14823: \"$ac_try\"") >&5
14824 (eval $ac_try) 2>&5
14826 echo "$as_me:14826: \$? = $ac_status" >&5
14827 (exit $ac_status); }; }; then
14828 ac_cv_func_XOpenDisplay=yes
14830 echo "$as_me: failed program was:" >&5
14831 cat conftest.$ac_ext >&5
14832 ac_cv_func_XOpenDisplay=no
14834 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14836 echo "$as_me:14836: result: $ac_cv_func_XOpenDisplay" >&5
14837 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
14838 if test $ac_cv_func_XOpenDisplay = yes; then
14842 echo "$as_me:14842: checking for XOpenDisplay in -lX11" >&5
14843 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
14844 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
14845 echo $ECHO_N "(cached) $ECHO_C" >&6
14847 ac_check_lib_save_LIBS=$LIBS
14849 cat >conftest.$ac_ext <<_ACEOF
14850 #line 14850 "configure"
14851 #include "confdefs.h"
14853 /* Override any gcc2 internal prototype to avoid an error. */
14857 /* We use char because int might match the return type of a gcc2
14858 builtin and then its argument prototype would still apply. */
14859 char XOpenDisplay ();
14868 rm -f conftest.$ac_objext conftest$ac_exeext
14869 if { (eval echo "$as_me:14869: \"$ac_link\"") >&5
14870 (eval $ac_link) 2>&5
14872 echo "$as_me:14872: \$? = $ac_status" >&5
14873 (exit $ac_status); } &&
14874 { ac_try='test -s conftest$ac_exeext'
14875 { (eval echo "$as_me:14875: \"$ac_try\"") >&5
14876 (eval $ac_try) 2>&5
14878 echo "$as_me:14878: \$? = $ac_status" >&5
14879 (exit $ac_status); }; }; then
14880 ac_cv_lib_X11_XOpenDisplay=yes
14882 echo "$as_me: failed program was:" >&5
14883 cat conftest.$ac_ext >&5
14884 ac_cv_lib_X11_XOpenDisplay=no
14886 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14887 LIBS=$ac_check_lib_save_LIBS
14889 echo "$as_me:14889: result: $ac_cv_lib_X11_XOpenDisplay" >&5
14890 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
14891 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
14893 cf_add_libs="$LIBS"
14896 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14897 # filter duplicates
14898 for cf_add_1lib in $cf_add_0lib; do
14899 for cf_add_2lib in $cf_add_libs; do
14900 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14905 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14907 LIBS="$cf_add_libs"
14913 echo "$as_me:14913: checking for XtAppInitialize" >&5
14914 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
14915 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
14916 echo $ECHO_N "(cached) $ECHO_C" >&6
14918 cat >conftest.$ac_ext <<_ACEOF
14919 #line 14919 "configure"
14920 #include "confdefs.h"
14921 #define XtAppInitialize autoconf_temporary
14922 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14923 #undef XtAppInitialize
14929 /* We use char because int might match the return type of a gcc2
14930 builtin and then its argument prototype would still apply. */
14931 char XtAppInitialize (void);
14937 /* The GNU C library defines stubs for functions which it implements
14938 to always fail with ENOSYS. Some functions are actually named
14939 something starting with __ and the normal name is an alias. */
14940 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
14941 #error found stub for XtAppInitialize
14944 return XtAppInitialize ();
14949 rm -f conftest.$ac_objext conftest$ac_exeext
14950 if { (eval echo "$as_me:14950: \"$ac_link\"") >&5
14951 (eval $ac_link) 2>&5
14953 echo "$as_me:14953: \$? = $ac_status" >&5
14954 (exit $ac_status); } &&
14955 { ac_try='test -s conftest$ac_exeext'
14956 { (eval echo "$as_me:14956: \"$ac_try\"") >&5
14957 (eval $ac_try) 2>&5
14959 echo "$as_me:14959: \$? = $ac_status" >&5
14960 (exit $ac_status); }; }; then
14961 ac_cv_func_XtAppInitialize=yes
14963 echo "$as_me: failed program was:" >&5
14964 cat conftest.$ac_ext >&5
14965 ac_cv_func_XtAppInitialize=no
14967 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14969 echo "$as_me:14969: result: $ac_cv_func_XtAppInitialize" >&5
14970 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
14971 if test $ac_cv_func_XtAppInitialize = yes; then
14975 echo "$as_me:14975: checking for XtAppInitialize in -lXt" >&5
14976 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
14977 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
14978 echo $ECHO_N "(cached) $ECHO_C" >&6
14980 ac_check_lib_save_LIBS=$LIBS
14982 cat >conftest.$ac_ext <<_ACEOF
14983 #line 14983 "configure"
14984 #include "confdefs.h"
14986 /* Override any gcc2 internal prototype to avoid an error. */
14990 /* We use char because int might match the return type of a gcc2
14991 builtin and then its argument prototype would still apply. */
14992 char XtAppInitialize ();
14996 XtAppInitialize ();
15001 rm -f conftest.$ac_objext conftest$ac_exeext
15002 if { (eval echo "$as_me:15002: \"$ac_link\"") >&5
15003 (eval $ac_link) 2>&5
15005 echo "$as_me:15005: \$? = $ac_status" >&5
15006 (exit $ac_status); } &&
15007 { ac_try='test -s conftest$ac_exeext'
15008 { (eval echo "$as_me:15008: \"$ac_try\"") >&5
15009 (eval $ac_try) 2>&5
15011 echo "$as_me:15011: \$? = $ac_status" >&5
15012 (exit $ac_status); }; }; then
15013 ac_cv_lib_Xt_XtAppInitialize=yes
15015 echo "$as_me: failed program was:" >&5
15016 cat conftest.$ac_ext >&5
15017 ac_cv_lib_Xt_XtAppInitialize=no
15019 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15020 LIBS=$ac_check_lib_save_LIBS
15022 echo "$as_me:15022: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
15023 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
15024 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
15026 cat >>confdefs.h <<\EOF
15027 #define HAVE_LIBXT 1
15038 if test $cf_have_X_LIBS = no ; then
15039 { echo "$as_me:15039: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15040 test program. You will have to check and add the proper libraries by hand
15042 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15043 test program. You will have to check and add the proper libraries by hand
15044 to makefile." >&2;}
15047 cf_x_athena_root=$cf_x_athena
15050 for cf_path in default \
15051 /usr/contrib/X11R6 \
15052 /usr/contrib/X11R5 \
15056 if test -z "$cf_x_athena_inc" ; then
15058 cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
15059 cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
15060 cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
15061 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15062 for cf_X_CFLAGS in $X_CFLAGS
15064 case "x$cf_X_CFLAGS" in
15066 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15069 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15074 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
15075 if test $cf_path != default ; then
15077 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15078 CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
15080 echo "$as_me:15080: checking for $cf_test in $cf_path" >&5
15081 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
15083 echo "$as_me:15083: checking for $cf_test" >&5
15084 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
15086 cat >conftest.$ac_ext <<_ACEOF
15087 #line 15087 "configure"
15088 #include "confdefs.h"
15090 #include <X11/Intrinsic.h>
15091 #include <$cf_test>
15100 rm -f conftest.$ac_objext
15101 if { (eval echo "$as_me:15101: \"$ac_compile\"") >&5
15102 (eval $ac_compile) 2>&5
15104 echo "$as_me:15104: \$? = $ac_status" >&5
15105 (exit $ac_status); } &&
15106 { ac_try='test -s conftest.$ac_objext'
15107 { (eval echo "$as_me:15107: \"$ac_try\"") >&5
15108 (eval $ac_try) 2>&5
15110 echo "$as_me:15110: \$? = $ac_status" >&5
15111 (exit $ac_status); }; }; then
15114 echo "$as_me: failed program was:" >&5
15115 cat conftest.$ac_ext >&5
15118 rm -f conftest.$ac_objext conftest.$ac_ext
15119 echo "$as_me:15119: result: $cf_result" >&5
15120 echo "${ECHO_T}$cf_result" >&6
15122 LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
15123 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
15124 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
15126 if test "$cf_result" = yes ; then
15127 test "$cf_path" = default && cf_x_athena_inc=default
15128 test "$cf_path" != default && cf_x_athena_inc=$cf_path/include
15134 if test -z "$cf_x_athena_inc" ; then
15135 { echo "$as_me:15135: WARNING: Unable to find Athena header files" >&5
15136 echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
15137 elif test "$cf_x_athena_inc" != default ; then
15139 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15140 CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
15144 cf_x_athena_root=$cf_x_athena
15147 for cf_path in default \
15148 /usr/contrib/X11R6 \
15149 /usr/contrib/X11R5 \
15154 ${cf_x_athena_root} \
15155 ${cf_x_athena_root}7 \
15156 ${cf_x_athena_root}6
15159 "-l$cf_lib -lXmu" \
15160 "-l$cf_lib -lXpm -lXmu" \
15161 "-l${cf_lib}_s -lXmu_s"
15163 test -n "$cf_x_athena_lib" && break
15165 cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
15166 cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
15167 cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
15168 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15169 for cf_X_CFLAGS in $X_CFLAGS
15171 case "x$cf_X_CFLAGS" in
15173 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15176 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15181 cf_test=XawSimpleMenuAddGlobalActions
15182 test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
15184 cf_add_libs="$LIBS"
15187 for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15188 # filter duplicates
15189 for cf_add_1lib in $cf_add_0lib; do
15190 for cf_add_2lib in $cf_add_libs; do
15191 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15196 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15198 LIBS="$cf_add_libs"
15200 echo "$as_me:15200: checking for $cf_test in $cf_libs" >&5
15201 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
15202 cat >conftest.$ac_ext <<_ACEOF
15203 #line 15203 "configure"
15204 #include "confdefs.h"
15206 #include <X11/Intrinsic.h>
15207 #include <X11/$cf_x_athena_root/SimpleMenu.h>
15213 $cf_test((XtAppContext) 0)
15218 rm -f conftest.$ac_objext conftest$ac_exeext
15219 if { (eval echo "$as_me:15219: \"$ac_link\"") >&5
15220 (eval $ac_link) 2>&5
15222 echo "$as_me:15222: \$? = $ac_status" >&5
15223 (exit $ac_status); } &&
15224 { ac_try='test -s conftest$ac_exeext'
15225 { (eval echo "$as_me:15225: \"$ac_try\"") >&5
15226 (eval $ac_try) 2>&5
15228 echo "$as_me:15228: \$? = $ac_status" >&5
15229 (exit $ac_status); }; }; then
15232 echo "$as_me: failed program was:" >&5
15233 cat conftest.$ac_ext >&5
15236 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15237 echo "$as_me:15237: result: $cf_result" >&5
15238 echo "${ECHO_T}$cf_result" >&6
15240 LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
15241 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
15242 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
15244 if test "$cf_result" = yes ; then
15245 cf_x_athena_lib="$cf_libs"
15249 test -n "$cf_x_athena_lib" && break
15253 if test -z "$cf_x_athena_lib" ; then
15254 { { echo "$as_me:15254: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
15255 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
15256 { (exit 1); exit 1; }; }
15259 cf_add_libs="$LIBS"
15262 for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15263 # filter duplicates
15264 for cf_add_1lib in $cf_add_0lib; do
15265 for cf_add_2lib in $cf_add_libs; do
15266 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15271 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15273 LIBS="$cf_add_libs"
15275 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15277 cat >>confdefs.h <<EOF
15278 #define $cf_x_athena_LIBS 1
15283 if test -n "$ac_tool_prefix"; then
15284 for ac_prog in xcurses-config
15286 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
15287 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
15288 echo "$as_me:15288: checking for $ac_word" >&5
15289 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15290 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
15291 echo $ECHO_N "(cached) $ECHO_C" >&6
15293 if test -n "$XCURSES_CONFIG"; then
15294 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
15296 ac_save_IFS=$IFS; IFS=$ac_path_separator
15298 for ac_dir in $ac_dummy; do
15300 test -z "$ac_dir" && ac_dir=.
15301 $as_executable_p "$ac_dir/$ac_word" || continue
15302 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
15303 echo "$as_me:15303: found $ac_dir/$ac_word" >&5
15309 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
15310 if test -n "$XCURSES_CONFIG"; then
15311 echo "$as_me:15311: result: $XCURSES_CONFIG" >&5
15312 echo "${ECHO_T}$XCURSES_CONFIG" >&6
15314 echo "$as_me:15314: result: no" >&5
15315 echo "${ECHO_T}no" >&6
15318 test -n "$XCURSES_CONFIG" && break
15321 if test -z "$XCURSES_CONFIG"; then
15322 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
15323 for ac_prog in xcurses-config
15325 # Extract the first word of "$ac_prog", so it can be a program name with args.
15326 set dummy $ac_prog; ac_word=$2
15327 echo "$as_me:15327: checking for $ac_word" >&5
15328 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15329 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
15330 echo $ECHO_N "(cached) $ECHO_C" >&6
15332 if test -n "$ac_ct_XCURSES_CONFIG"; then
15333 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
15335 ac_save_IFS=$IFS; IFS=$ac_path_separator
15337 for ac_dir in $ac_dummy; do
15339 test -z "$ac_dir" && ac_dir=.
15340 $as_executable_p "$ac_dir/$ac_word" || continue
15341 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
15342 echo "$as_me:15342: found $ac_dir/$ac_word" >&5
15348 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
15349 if test -n "$ac_ct_XCURSES_CONFIG"; then
15350 echo "$as_me:15350: result: $ac_ct_XCURSES_CONFIG" >&5
15351 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
15353 echo "$as_me:15353: result: no" >&5
15354 echo "${ECHO_T}no" >&6
15357 test -n "$ac_ct_XCURSES_CONFIG" && break
15359 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
15361 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
15364 if test "$XCURSES_CONFIG" != none ; then
15369 cf_new_extra_cppflags=
15371 for cf_add_cflags in `$XCURSES_CONFIG --cflags`
15373 case $cf_fix_cppflags in
15375 case $cf_add_cflags in
15376 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15377 case $cf_add_cflags in
15379 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15381 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15382 && test -z "${cf_tst_cflags}" \
15383 && cf_fix_cppflags=yes
15385 if test $cf_fix_cppflags = yes ; then
15387 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15388 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15391 elif test "${cf_tst_cflags}" = "\"'" ; then
15393 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15394 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15400 case "$CPPFLAGS" in
15404 case $cf_add_cflags in
15406 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15408 CPPFLAGS=`echo "$CPPFLAGS" | \
15409 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15410 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15415 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15416 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15423 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15424 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15431 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15432 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15434 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15436 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15437 && test -z "${cf_tst_cflags}" \
15438 && cf_fix_cppflags=no
15443 if test -n "$cf_new_cflags" ; then
15445 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15446 CFLAGS="${CFLAGS}$cf_new_cflags"
15450 if test -n "$cf_new_cppflags" ; then
15452 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15453 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15457 if test -n "$cf_new_extra_cppflags" ; then
15459 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15460 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15464 cf_add_libs="$LIBS"
15467 for cf_add_1lib in `$XCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15468 # filter duplicates
15469 for cf_add_1lib in $cf_add_0lib; do
15470 for cf_add_2lib in $cf_add_libs; do
15471 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15476 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15478 LIBS="$cf_add_libs"
15480 cf_cv_lib_XCurses=yes
15484 LDFLAGS="$LDFLAGS $X_LIBS"
15486 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
15488 echo "${as_me:-configure}:15488: testing checking additions to CFLAGS ..." 1>&5
15490 cf_check_cflags="$CFLAGS"
15491 cf_check_cppflags="$CPPFLAGS"
15496 cf_new_extra_cppflags=
15498 for cf_add_cflags in $X_CFLAGS
15500 case $cf_fix_cppflags in
15502 case $cf_add_cflags in
15503 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15504 case $cf_add_cflags in
15506 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15508 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15509 && test -z "${cf_tst_cflags}" \
15510 && cf_fix_cppflags=yes
15512 if test $cf_fix_cppflags = yes ; then
15514 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15515 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15518 elif test "${cf_tst_cflags}" = "\"'" ; then
15520 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15521 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15527 case "$CPPFLAGS" in
15531 case $cf_add_cflags in
15533 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15535 CPPFLAGS=`echo "$CPPFLAGS" | \
15536 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15537 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15542 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15543 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15550 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15551 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15558 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15559 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15561 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15563 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15564 && test -z "${cf_tst_cflags}" \
15565 && cf_fix_cppflags=no
15570 if test -n "$cf_new_cflags" ; then
15571 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
15573 echo "${as_me:-configure}:15573: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
15575 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15576 CFLAGS="${CFLAGS}$cf_new_cflags"
15580 if test -n "$cf_new_cppflags" ; then
15581 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
15583 echo "${as_me:-configure}:15583: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
15585 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15586 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15590 if test -n "$cf_new_extra_cppflags" ; then
15591 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
15593 echo "${as_me:-configure}:15593: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
15595 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15596 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15600 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
15601 cat >conftest.$ac_ext <<_ACEOF
15602 #line 15602 "configure"
15603 #include "confdefs.h"
15608 printf("Hello world");
15613 rm -f conftest.$ac_objext conftest$ac_exeext
15614 if { (eval echo "$as_me:15614: \"$ac_link\"") >&5
15615 (eval $ac_link) 2>&5
15617 echo "$as_me:15617: \$? = $ac_status" >&5
15618 (exit $ac_status); } &&
15619 { ac_try='test -s conftest$ac_exeext'
15620 { (eval echo "$as_me:15620: \"$ac_try\"") >&5
15621 (eval $ac_try) 2>&5
15623 echo "$as_me:15623: \$? = $ac_status" >&5
15624 (exit $ac_status); }; }; then
15627 echo "$as_me: failed program was:" >&5
15628 cat conftest.$ac_ext >&5
15629 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
15631 echo "${as_me:-configure}:15631: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
15633 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
15634 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
15636 echo "${as_me:-configure}:15636: testing but keeping change to \$CPPFLAGS ..." 1>&5
15639 CFLAGS="$cf_check_flags"
15641 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15644 echo "$as_me:15644: checking for XOpenDisplay in -lX11" >&5
15645 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
15646 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
15647 echo $ECHO_N "(cached) $ECHO_C" >&6
15649 ac_check_lib_save_LIBS=$LIBS
15650 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
15651 cat >conftest.$ac_ext <<_ACEOF
15652 #line 15652 "configure"
15653 #include "confdefs.h"
15655 /* Override any gcc2 internal prototype to avoid an error. */
15659 /* We use char because int might match the return type of a gcc2
15660 builtin and then its argument prototype would still apply. */
15661 char XOpenDisplay ();
15670 rm -f conftest.$ac_objext conftest$ac_exeext
15671 if { (eval echo "$as_me:15671: \"$ac_link\"") >&5
15672 (eval $ac_link) 2>&5
15674 echo "$as_me:15674: \$? = $ac_status" >&5
15675 (exit $ac_status); } &&
15676 { ac_try='test -s conftest$ac_exeext'
15677 { (eval echo "$as_me:15677: \"$ac_try\"") >&5
15678 (eval $ac_try) 2>&5
15680 echo "$as_me:15680: \$? = $ac_status" >&5
15681 (exit $ac_status); }; }; then
15682 ac_cv_lib_X11_XOpenDisplay=yes
15684 echo "$as_me: failed program was:" >&5
15685 cat conftest.$ac_ext >&5
15686 ac_cv_lib_X11_XOpenDisplay=no
15688 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15689 LIBS=$ac_check_lib_save_LIBS
15691 echo "$as_me:15691: result: $ac_cv_lib_X11_XOpenDisplay" >&5
15692 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
15693 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
15695 cf_add_libs="$LIBS"
15698 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15699 # filter duplicates
15700 for cf_add_1lib in $cf_add_0lib; do
15701 for cf_add_2lib in $cf_add_libs; do
15702 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15707 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15709 LIBS="$cf_add_libs"
15713 echo "$as_me:15713: checking for XCurses library" >&5
15714 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
15715 if test "${cf_cv_lib_XCurses+set}" = set; then
15716 echo $ECHO_N "(cached) $ECHO_C" >&6
15719 cf_add_libs="$LIBS"
15722 for cf_add_1lib in -lXCurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15723 # filter duplicates
15724 for cf_add_1lib in $cf_add_0lib; do
15725 for cf_add_2lib in $cf_add_libs; do
15726 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15731 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15733 LIBS="$cf_add_libs"
15735 cat >conftest.$ac_ext <<_ACEOF
15736 #line 15736 "configure"
15737 #include "confdefs.h"
15739 #include <xcurses.h>
15740 char *XCursesProgramName = "test";
15750 rm -f conftest.$ac_objext conftest$ac_exeext
15751 if { (eval echo "$as_me:15751: \"$ac_link\"") >&5
15752 (eval $ac_link) 2>&5
15754 echo "$as_me:15754: \$? = $ac_status" >&5
15755 (exit $ac_status); } &&
15756 { ac_try='test -s conftest$ac_exeext'
15757 { (eval echo "$as_me:15757: \"$ac_try\"") >&5
15758 (eval $ac_try) 2>&5
15760 echo "$as_me:15760: \$? = $ac_status" >&5
15761 (exit $ac_status); }; }; then
15762 cf_cv_lib_XCurses=yes
15764 echo "$as_me: failed program was:" >&5
15765 cat conftest.$ac_ext >&5
15766 cf_cv_lib_XCurses=no
15768 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15771 echo "$as_me:15771: result: $cf_cv_lib_XCurses" >&5
15772 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
15776 if test $cf_cv_lib_XCurses = yes ; then
15778 cat >>confdefs.h <<\EOF
15782 cat >>confdefs.h <<\EOF
15786 echo "$as_me:15786: checking for xcurses.h" >&5
15787 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
15788 if test "${ac_cv_header_xcurses_h+set}" = set; then
15789 echo $ECHO_N "(cached) $ECHO_C" >&6
15791 cat >conftest.$ac_ext <<_ACEOF
15792 #line 15792 "configure"
15793 #include "confdefs.h"
15794 #include <xcurses.h>
15796 if { (eval echo "$as_me:15796: \"$ac_cpp conftest.$ac_ext\"") >&5
15797 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15799 egrep -v '^ *\+' conftest.er1 >conftest.err
15801 cat conftest.err >&5
15802 echo "$as_me:15802: \$? = $ac_status" >&5
15803 (exit $ac_status); } >/dev/null; then
15804 if test -s conftest.err; then
15805 ac_cpp_err=$ac_c_preproc_warn_flag
15812 if test -z "$ac_cpp_err"; then
15813 ac_cv_header_xcurses_h=yes
15815 echo "$as_me: failed program was:" >&5
15816 cat conftest.$ac_ext >&5
15817 ac_cv_header_xcurses_h=no
15819 rm -f conftest.err conftest.$ac_ext
15821 echo "$as_me:15821: result: $ac_cv_header_xcurses_h" >&5
15822 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
15823 if test $ac_cv_header_xcurses_h = yes; then
15825 cat >>confdefs.h <<\EOF
15826 #define HAVE_XCURSES 1
15832 { { echo "$as_me:15832: error: Cannot link with XCurses" >&5
15833 echo "$as_me: error: Cannot link with XCurses" >&2;}
15834 { (exit 1); exit 1; }; }
15839 { { echo "$as_me:15839: error: unexpected screen-value: $cf_cv_screen" >&5
15840 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
15841 { (exit 1); exit 1; }; }
15845 : ${cf_nculib_root:=$cf_cv_screen}
15846 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
15847 echo "$as_me:15847: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
15848 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
15849 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15850 echo $ECHO_N "(cached) $ECHO_C" >&6
15852 ac_check_lib_save_LIBS=$LIBS
15853 LIBS="-l$cf_nculib_root $LIBS"
15854 cat >conftest.$ac_ext <<_ACEOF
15855 #line 15855 "configure"
15856 #include "confdefs.h"
15858 /* Override any gcc2 internal prototype to avoid an error. */
15862 /* We use char because int might match the return type of a gcc2
15863 builtin and then its argument prototype would still apply. */
15864 char _nc_init_pthreads ();
15868 _nc_init_pthreads ();
15873 rm -f conftest.$ac_objext conftest$ac_exeext
15874 if { (eval echo "$as_me:15874: \"$ac_link\"") >&5
15875 (eval $ac_link) 2>&5
15877 echo "$as_me:15877: \$? = $ac_status" >&5
15878 (exit $ac_status); } &&
15879 { ac_try='test -s conftest$ac_exeext'
15880 { (eval echo "$as_me:15880: \"$ac_try\"") >&5
15881 (eval $ac_try) 2>&5
15883 echo "$as_me:15883: \$? = $ac_status" >&5
15884 (exit $ac_status); }; }; then
15885 eval "$as_ac_Lib=yes"
15887 echo "$as_me: failed program was:" >&5
15888 cat conftest.$ac_ext >&5
15889 eval "$as_ac_Lib=no"
15891 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15892 LIBS=$ac_check_lib_save_LIBS
15894 echo "$as_me:15894: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15895 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15896 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15897 cf_cv_ncurses_pthreads=yes
15899 cf_cv_ncurses_pthreads=no
15902 if test "$cf_cv_ncurses_pthreads" = yes
15905 cf_add_libs="$LIBS"
15908 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15909 # filter duplicates
15910 for cf_add_1lib in $cf_add_0lib; do
15911 for cf_add_2lib in $cf_add_libs; do
15912 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15917 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15919 LIBS="$cf_add_libs"
15923 case $cf_cv_screen in
15925 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
15929 echo "$as_me:15929: checking for X11 rgb file" >&5
15930 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
15932 # Check whether --with-x11-rgb or --without-x11-rgb was given.
15933 if test "${with_x11_rgb+set}" = set; then
15934 withval="$with_x11_rgb"
15940 if test "x$RGB_PATH" = xauto
15942 RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
15944 /opt/local/share/X11/rgb.txt \
15945 /opt/X11/share/X11/rgb.txt \
15946 /usr/share/X11/rgb.txt \
15947 /usr/X11/share/X11/rgb.txt \
15948 /usr/X11/lib/X11/rgb.txt \
15949 /usr/lib/X11/rgb.txt \
15951 /usr/pkg/lib/X11/rgb.txt \
15952 /usr/X11R7/lib/X11/rgb.txt \
15953 /usr/X11R6/lib/X11/rgb.txt \
15954 /usr/X11R5/lib/X11/rgb.txt \
15955 /usr/X11R4/lib/X11/rgb.txt \
15956 /usr/local/lib/X11/rgb.txt \
15957 /usr/local/share/X11/rgb.txt \
15958 /usr/lib64/X11/rgb.txt
15960 if test -f "$cf_path" ; then
15961 RGB_PATH="$cf_path"
15968 if test "x$prefix" != xNONE; then
15969 cf_path_syntax="$prefix"
15971 cf_path_syntax="$ac_default_prefix"
15974 case ".$cf_path" in
15975 (.\$\(*\)*|.\'*\'*)
15979 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
15981 (.\${*prefix}*|.\${*dir}*)
15982 eval cf_path="$cf_path"
15983 case ".$cf_path" in
15985 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
15990 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
15993 { { echo "$as_me:15993: error: expected a pathname, not \"$cf_path\"" >&5
15994 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
15995 { (exit 1); exit 1; }; }
16001 echo "$as_me:16001: result: $RGB_PATH" >&5
16002 echo "${ECHO_T}$RGB_PATH" >&6
16004 cat >>confdefs.h <<EOF
16005 #define RGB_PATH "$cf_path"
16009 if test "$RGB_PATH" = no
16016 case $cf_cv_screen in
16018 cf_default_panel=no
16021 cf_default_tinfo=no
16023 (xcurses|bsdcurses)
16024 cf_default_panel=no
16027 cf_default_tinfo=yes
16030 cf_default_panel=yes
16031 cf_default_form=yes
16032 cf_default_menu=yes
16033 cf_default_tinfo=yes
16034 case $cf_cv_screen in
16036 cf_curses_headers="nc_alloc.h nomacros.h term_entry.h"
16042 echo "$as_me:16042: checking for desired basename for form library" >&5
16043 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
16045 # Check whether --with-form-libname or --without-form-libname was given.
16046 if test "${with_form_libname+set}" = set; then
16047 withval="$with_form_libname"
16048 with_lib_basename=$withval
16050 with_lib_basename=form
16052 FORM_NAME="$with_lib_basename"
16054 case "x$FORM_NAME" in
16062 echo "$as_me:16062: result: $FORM_NAME" >&5
16063 echo "${ECHO_T}$FORM_NAME" >&6
16065 echo "$as_me:16065: checking for desired basename for menu library" >&5
16066 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
16068 # Check whether --with-menu-libname or --without-menu-libname was given.
16069 if test "${with_menu_libname+set}" = set; then
16070 withval="$with_menu_libname"
16071 with_lib_basename=$withval
16073 with_lib_basename=menu
16075 MENU_NAME="$with_lib_basename"
16077 case "x$MENU_NAME" in
16085 echo "$as_me:16085: result: $MENU_NAME" >&5
16086 echo "${ECHO_T}$MENU_NAME" >&6
16088 echo "$as_me:16088: checking for desired basename for panel library" >&5
16089 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
16091 # Check whether --with-panel-libname or --without-panel-libname was given.
16092 if test "${with_panel_libname+set}" = set; then
16093 withval="$with_panel_libname"
16094 with_lib_basename=$withval
16096 with_lib_basename=panel
16098 PANEL_NAME="$with_lib_basename"
16100 case "x$PANEL_NAME" in
16108 echo "$as_me:16108: result: $PANEL_NAME" >&5
16109 echo "${ECHO_T}$PANEL_NAME" >&6
16111 echo "$as_me:16111: checking if you want to check for panel functions" >&5
16112 echo $ECHO_N "checking if you want to check for panel functions... $ECHO_C" >&6
16114 # Check whether --enable-panel or --disable-panel was given.
16115 if test "${enable_panel+set}" = set; then
16116 enableval="$enable_panel"
16117 test "$enableval" != no && enableval=yes
16118 if test "$enableval" != "yes" ; then
16121 cf_enable_panel=$cf_default_panel
16125 cf_enable_panel=$cf_default_panel
16128 echo "$as_me:16128: result: $cf_enable_panel" >&5
16129 echo "${ECHO_T}$cf_enable_panel" >&6
16130 if test $cf_enable_panel = yes
16133 cf_have_curses_lib=no
16135 : ${NCURSES_CONFIG_PKG:=none}
16136 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16138 elif test "x${PKG_CONFIG:=none}" != xnone; then
16139 echo "$as_me:16139: checking pkg-config for $PANEL_NAME$cf_cv_libtype" >&5
16140 echo $ECHO_N "checking pkg-config for $PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
16141 if "$PKG_CONFIG" --exists $PANEL_NAME$cf_cv_libtype ; then
16142 echo "$as_me:16142: result: yes" >&5
16143 echo "${ECHO_T}yes" >&6
16145 echo "$as_me:16145: checking if the $PANEL_NAME$cf_cv_libtype package files work" >&5
16146 echo $ECHO_N "checking if the $PANEL_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
16148 cf_save_CPPFLAGS="$CPPFLAGS"
16149 cf_save_LIBS="$LIBS"
16154 cf_new_extra_cppflags=
16156 for cf_add_cflags in `$PKG_CONFIG --cflags $PANEL_NAME$cf_cv_libtype`
16158 case $cf_fix_cppflags in
16160 case $cf_add_cflags in
16161 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16162 case $cf_add_cflags in
16164 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16166 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16167 && test -z "${cf_tst_cflags}" \
16168 && cf_fix_cppflags=yes
16170 if test $cf_fix_cppflags = yes ; then
16172 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16173 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16176 elif test "${cf_tst_cflags}" = "\"'" ; then
16178 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16179 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16185 case "$CPPFLAGS" in
16189 case $cf_add_cflags in
16191 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16193 CPPFLAGS=`echo "$CPPFLAGS" | \
16194 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16195 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16200 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16201 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16208 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16209 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16216 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16217 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16219 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16221 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16222 && test -z "${cf_tst_cflags}" \
16223 && cf_fix_cppflags=no
16228 if test -n "$cf_new_cflags" ; then
16230 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16231 CFLAGS="${CFLAGS}$cf_new_cflags"
16235 if test -n "$cf_new_cppflags" ; then
16237 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16238 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16242 if test -n "$cf_new_extra_cppflags" ; then
16244 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16245 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16249 cf_add_libs="$LIBS"
16252 for cf_add_1lib in `$PKG_CONFIG --libs $PANEL_NAME$cf_cv_libtype`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16253 # filter duplicates
16254 for cf_add_1lib in $cf_add_0lib; do
16255 for cf_add_2lib in $cf_add_libs; do
16256 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16261 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16263 LIBS="$cf_add_libs"
16265 cat >conftest.$ac_ext <<_ACEOF
16266 #line 16266 "configure"
16267 #include "confdefs.h"
16268 #include <$PANEL_NAME.h>
16272 (void) new_panel ( 0 );
16277 rm -f conftest.$ac_objext conftest$ac_exeext
16278 if { (eval echo "$as_me:16278: \"$ac_link\"") >&5
16279 (eval $ac_link) 2>&5
16281 echo "$as_me:16281: \$? = $ac_status" >&5
16282 (exit $ac_status); } &&
16283 { ac_try='test -s conftest$ac_exeext'
16284 { (eval echo "$as_me:16284: \"$ac_try\"") >&5
16285 (eval $ac_try) 2>&5
16287 echo "$as_me:16287: \$? = $ac_status" >&5
16288 (exit $ac_status); }; }; then
16289 if test "$cross_compiling" = yes; then
16290 cf_have_curses_lib=maybe
16292 cat >conftest.$ac_ext <<_ACEOF
16293 #line 16293 "configure"
16294 #include "confdefs.h"
16295 #include <$PANEL_NAME.h>
16297 { (void) new_panel ( 0 ); return 0; }
16299 rm -f conftest$ac_exeext
16300 if { (eval echo "$as_me:16300: \"$ac_link\"") >&5
16301 (eval $ac_link) 2>&5
16303 echo "$as_me:16303: \$? = $ac_status" >&5
16304 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16305 { (eval echo "$as_me:16305: \"$ac_try\"") >&5
16306 (eval $ac_try) 2>&5
16308 echo "$as_me:16308: \$? = $ac_status" >&5
16309 (exit $ac_status); }; }; then
16310 cf_have_curses_lib=yes
16312 echo "$as_me: program exited with status $ac_status" >&5
16313 echo "$as_me: failed program was:" >&5
16314 cat conftest.$ac_ext >&5
16315 cf_have_curses_lib=no
16317 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16320 echo "$as_me: failed program was:" >&5
16321 cat conftest.$ac_ext >&5
16322 cf_have_curses_lib=no
16324 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16325 echo "$as_me:16325: result: $cf_have_curses_lib" >&5
16326 echo "${ECHO_T}$cf_have_curses_lib" >&6
16327 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
16328 if test "$cf_have_curses_lib" != "yes"
16330 CPPFLAGS="$cf_save_CPPFLAGS"
16331 LIBS="$cf_save_LIBS"
16334 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16336 cat >>confdefs.h <<EOF
16337 #define $cf_upper 1
16343 if test "$cf_have_curses_lib" = no; then
16344 as_ac_Lib=`echo "ac_cv_lib_$PANEL_NAME$cf_cv_libtype''_new_panel" | $as_tr_sh`
16345 echo "$as_me:16345: checking for new_panel in -l$PANEL_NAME$cf_cv_libtype" >&5
16346 echo $ECHO_N "checking for new_panel in -l$PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
16347 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16348 echo $ECHO_N "(cached) $ECHO_C" >&6
16350 ac_check_lib_save_LIBS=$LIBS
16351 LIBS="-l$PANEL_NAME$cf_cv_libtype $LIBS"
16352 cat >conftest.$ac_ext <<_ACEOF
16353 #line 16353 "configure"
16354 #include "confdefs.h"
16356 /* Override any gcc2 internal prototype to avoid an error. */
16360 /* We use char because int might match the return type of a gcc2
16361 builtin and then its argument prototype would still apply. */
16371 rm -f conftest.$ac_objext conftest$ac_exeext
16372 if { (eval echo "$as_me:16372: \"$ac_link\"") >&5
16373 (eval $ac_link) 2>&5
16375 echo "$as_me:16375: \$? = $ac_status" >&5
16376 (exit $ac_status); } &&
16377 { ac_try='test -s conftest$ac_exeext'
16378 { (eval echo "$as_me:16378: \"$ac_try\"") >&5
16379 (eval $ac_try) 2>&5
16381 echo "$as_me:16381: \$? = $ac_status" >&5
16382 (exit $ac_status); }; }; then
16383 eval "$as_ac_Lib=yes"
16385 echo "$as_me: failed program was:" >&5
16386 cat conftest.$ac_ext >&5
16387 eval "$as_ac_Lib=no"
16389 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16390 LIBS=$ac_check_lib_save_LIBS
16392 echo "$as_me:16392: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16393 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16394 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16396 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16398 cf_add_libs="$LIBS"
16401 for cf_add_1lib in -l$PANEL_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16402 # filter duplicates
16403 for cf_add_1lib in $cf_add_0lib; do
16404 for cf_add_2lib in $cf_add_libs; do
16405 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16410 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16412 LIBS="$cf_add_libs"
16414 cat >>confdefs.h <<EOF
16415 #define $cf_upper 1
16422 cf_curses_headers="$cf_curses_headers panel.h"
16425 echo "$as_me:16425: checking if you want to check for menu functions" >&5
16426 echo $ECHO_N "checking if you want to check for menu functions... $ECHO_C" >&6
16428 # Check whether --enable-menu or --disable-menu was given.
16429 if test "${enable_menu+set}" = set; then
16430 enableval="$enable_menu"
16431 test "$enableval" != no && enableval=yes
16432 if test "$enableval" != "yes" ; then
16435 cf_enable_menu=$cf_default_menu
16439 cf_enable_menu=$cf_default_menu
16442 echo "$as_me:16442: result: $cf_enable_menu" >&5
16443 echo "${ECHO_T}$cf_enable_menu" >&6
16444 if test $cf_enable_menu = yes
16446 case $cf_cv_screen in
16451 echo "$as_me:16451: checking for NetBSD menu.h" >&5
16452 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
16453 if test "${cf_cv_netbsd_menu_h+set}" = set; then
16454 echo $ECHO_N "(cached) $ECHO_C" >&6
16457 cat >conftest.$ac_ext <<_ACEOF
16458 #line 16458 "configure"
16459 #include "confdefs.h"
16461 #include <${cf_cv_ncurses_header:-curses.h}>
16469 int y = menu->max_item_width;
16475 rm -f conftest.$ac_objext
16476 if { (eval echo "$as_me:16476: \"$ac_compile\"") >&5
16477 (eval $ac_compile) 2>&5
16479 echo "$as_me:16479: \$? = $ac_status" >&5
16480 (exit $ac_status); } &&
16481 { ac_try='test -s conftest.$ac_objext'
16482 { (eval echo "$as_me:16482: \"$ac_try\"") >&5
16483 (eval $ac_try) 2>&5
16485 echo "$as_me:16485: \$? = $ac_status" >&5
16486 (exit $ac_status); }; }; then
16487 cf_cv_netbsd_menu_h=yes
16490 echo "$as_me: failed program was:" >&5
16491 cat conftest.$ac_ext >&5
16492 cf_cv_netbsd_menu_h=no
16494 rm -f conftest.$ac_objext conftest.$ac_ext
16497 echo "$as_me:16497: result: $cf_cv_netbsd_menu_h" >&5
16498 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
16500 test "$cf_cv_netbsd_menu_h" = yes &&
16501 cat >>confdefs.h <<\EOF
16502 #define HAVE_NETBSD_MENU_H 1
16508 cf_have_curses_lib=no
16510 : ${NCURSES_CONFIG_PKG:=none}
16511 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16513 elif test "x${PKG_CONFIG:=none}" != xnone; then
16514 echo "$as_me:16514: checking pkg-config for $MENU_NAME$cf_cv_libtype" >&5
16515 echo $ECHO_N "checking pkg-config for $MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
16516 if "$PKG_CONFIG" --exists $MENU_NAME$cf_cv_libtype ; then
16517 echo "$as_me:16517: result: yes" >&5
16518 echo "${ECHO_T}yes" >&6
16520 echo "$as_me:16520: checking if the $MENU_NAME$cf_cv_libtype package files work" >&5
16521 echo $ECHO_N "checking if the $MENU_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
16523 cf_save_CPPFLAGS="$CPPFLAGS"
16524 cf_save_LIBS="$LIBS"
16529 cf_new_extra_cppflags=
16531 for cf_add_cflags in `$PKG_CONFIG --cflags $MENU_NAME$cf_cv_libtype`
16533 case $cf_fix_cppflags in
16535 case $cf_add_cflags in
16536 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16537 case $cf_add_cflags in
16539 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16541 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16542 && test -z "${cf_tst_cflags}" \
16543 && cf_fix_cppflags=yes
16545 if test $cf_fix_cppflags = yes ; then
16547 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16548 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16551 elif test "${cf_tst_cflags}" = "\"'" ; then
16553 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16554 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16560 case "$CPPFLAGS" in
16564 case $cf_add_cflags in
16566 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16568 CPPFLAGS=`echo "$CPPFLAGS" | \
16569 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16570 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16575 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16576 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16583 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16584 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16591 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16592 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16594 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16596 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16597 && test -z "${cf_tst_cflags}" \
16598 && cf_fix_cppflags=no
16603 if test -n "$cf_new_cflags" ; then
16605 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16606 CFLAGS="${CFLAGS}$cf_new_cflags"
16610 if test -n "$cf_new_cppflags" ; then
16612 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16613 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16617 if test -n "$cf_new_extra_cppflags" ; then
16619 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16620 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16624 cf_add_libs="$LIBS"
16627 for cf_add_1lib in `$PKG_CONFIG --libs $MENU_NAME$cf_cv_libtype`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16628 # filter duplicates
16629 for cf_add_1lib in $cf_add_0lib; do
16630 for cf_add_2lib in $cf_add_libs; do
16631 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16636 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16638 LIBS="$cf_add_libs"
16640 cat >conftest.$ac_ext <<_ACEOF
16641 #line 16641 "configure"
16642 #include "confdefs.h"
16643 #include <$MENU_NAME.h>
16647 (void) menu_driver ( 0,0 );
16652 rm -f conftest.$ac_objext conftest$ac_exeext
16653 if { (eval echo "$as_me:16653: \"$ac_link\"") >&5
16654 (eval $ac_link) 2>&5
16656 echo "$as_me:16656: \$? = $ac_status" >&5
16657 (exit $ac_status); } &&
16658 { ac_try='test -s conftest$ac_exeext'
16659 { (eval echo "$as_me:16659: \"$ac_try\"") >&5
16660 (eval $ac_try) 2>&5
16662 echo "$as_me:16662: \$? = $ac_status" >&5
16663 (exit $ac_status); }; }; then
16664 if test "$cross_compiling" = yes; then
16665 cf_have_curses_lib=maybe
16667 cat >conftest.$ac_ext <<_ACEOF
16668 #line 16668 "configure"
16669 #include "confdefs.h"
16670 #include <$MENU_NAME.h>
16672 { (void) menu_driver ( 0,0 ); return 0; }
16674 rm -f conftest$ac_exeext
16675 if { (eval echo "$as_me:16675: \"$ac_link\"") >&5
16676 (eval $ac_link) 2>&5
16678 echo "$as_me:16678: \$? = $ac_status" >&5
16679 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16680 { (eval echo "$as_me:16680: \"$ac_try\"") >&5
16681 (eval $ac_try) 2>&5
16683 echo "$as_me:16683: \$? = $ac_status" >&5
16684 (exit $ac_status); }; }; then
16685 cf_have_curses_lib=yes
16687 echo "$as_me: program exited with status $ac_status" >&5
16688 echo "$as_me: failed program was:" >&5
16689 cat conftest.$ac_ext >&5
16690 cf_have_curses_lib=no
16692 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16695 echo "$as_me: failed program was:" >&5
16696 cat conftest.$ac_ext >&5
16697 cf_have_curses_lib=no
16699 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16700 echo "$as_me:16700: result: $cf_have_curses_lib" >&5
16701 echo "${ECHO_T}$cf_have_curses_lib" >&6
16702 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
16703 if test "$cf_have_curses_lib" != "yes"
16705 CPPFLAGS="$cf_save_CPPFLAGS"
16706 LIBS="$cf_save_LIBS"
16709 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16711 cat >>confdefs.h <<EOF
16712 #define $cf_upper 1
16718 if test "$cf_have_curses_lib" = no; then
16719 as_ac_Lib=`echo "ac_cv_lib_$MENU_NAME$cf_cv_libtype''_menu_driver" | $as_tr_sh`
16720 echo "$as_me:16720: checking for menu_driver in -l$MENU_NAME$cf_cv_libtype" >&5
16721 echo $ECHO_N "checking for menu_driver in -l$MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
16722 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16723 echo $ECHO_N "(cached) $ECHO_C" >&6
16725 ac_check_lib_save_LIBS=$LIBS
16726 LIBS="-l$MENU_NAME$cf_cv_libtype $LIBS"
16727 cat >conftest.$ac_ext <<_ACEOF
16728 #line 16728 "configure"
16729 #include "confdefs.h"
16731 /* Override any gcc2 internal prototype to avoid an error. */
16735 /* We use char because int might match the return type of a gcc2
16736 builtin and then its argument prototype would still apply. */
16737 char menu_driver ();
16746 rm -f conftest.$ac_objext conftest$ac_exeext
16747 if { (eval echo "$as_me:16747: \"$ac_link\"") >&5
16748 (eval $ac_link) 2>&5
16750 echo "$as_me:16750: \$? = $ac_status" >&5
16751 (exit $ac_status); } &&
16752 { ac_try='test -s conftest$ac_exeext'
16753 { (eval echo "$as_me:16753: \"$ac_try\"") >&5
16754 (eval $ac_try) 2>&5
16756 echo "$as_me:16756: \$? = $ac_status" >&5
16757 (exit $ac_status); }; }; then
16758 eval "$as_ac_Lib=yes"
16760 echo "$as_me: failed program was:" >&5
16761 cat conftest.$ac_ext >&5
16762 eval "$as_ac_Lib=no"
16764 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16765 LIBS=$ac_check_lib_save_LIBS
16767 echo "$as_me:16767: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16768 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16769 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16771 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16773 cf_add_libs="$LIBS"
16776 for cf_add_1lib in -l$MENU_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16777 # filter duplicates
16778 for cf_add_1lib in $cf_add_0lib; do
16779 for cf_add_2lib in $cf_add_libs; do
16780 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16785 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16787 LIBS="$cf_add_libs"
16789 cat >>confdefs.h <<EOF
16790 #define $cf_upper 1
16797 cf_curses_headers="$cf_curses_headers menu.h"
16800 echo "$as_me:16800: checking if you want to check for form functions" >&5
16801 echo $ECHO_N "checking if you want to check for form functions... $ECHO_C" >&6
16803 # Check whether --enable-form or --disable-form was given.
16804 if test "${enable_form+set}" = set; then
16805 enableval="$enable_form"
16806 test "$enableval" != no && enableval=yes
16807 if test "$enableval" != "yes" ; then
16810 cf_enable_form=$cf_default_form
16814 cf_enable_form=$cf_default_form
16817 echo "$as_me:16817: result: $cf_enable_form" >&5
16818 echo "${ECHO_T}$cf_enable_form" >&6
16819 if test $cf_enable_form = yes
16821 case $cf_cv_screen in
16826 echo "$as_me:16826: checking for NetBSD form.h" >&5
16827 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
16828 if test "${cf_cv_netbsd_form_h+set}" = set; then
16829 echo $ECHO_N "(cached) $ECHO_C" >&6
16832 cat >conftest.$ac_ext <<_ACEOF
16833 #line 16833 "configure"
16834 #include "confdefs.h"
16836 #include <${cf_cv_ncurses_header:-curses.h}>
16844 int y = current_field(form)->cursor_ypos;
16845 int x = current_field(form)->cursor_xpos;
16851 rm -f conftest.$ac_objext
16852 if { (eval echo "$as_me:16852: \"$ac_compile\"") >&5
16853 (eval $ac_compile) 2>&5
16855 echo "$as_me:16855: \$? = $ac_status" >&5
16856 (exit $ac_status); } &&
16857 { ac_try='test -s conftest.$ac_objext'
16858 { (eval echo "$as_me:16858: \"$ac_try\"") >&5
16859 (eval $ac_try) 2>&5
16861 echo "$as_me:16861: \$? = $ac_status" >&5
16862 (exit $ac_status); }; }; then
16863 cf_cv_netbsd_form_h=yes
16866 echo "$as_me: failed program was:" >&5
16867 cat conftest.$ac_ext >&5
16868 cf_cv_netbsd_form_h=no
16870 rm -f conftest.$ac_objext conftest.$ac_ext
16873 echo "$as_me:16873: result: $cf_cv_netbsd_form_h" >&5
16874 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
16876 test "$cf_cv_netbsd_form_h" = yes &&
16877 cat >>confdefs.h <<\EOF
16878 #define HAVE_NETBSD_FORM_H 1
16884 cf_have_curses_lib=no
16886 : ${NCURSES_CONFIG_PKG:=none}
16887 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16889 elif test "x${PKG_CONFIG:=none}" != xnone; then
16890 echo "$as_me:16890: checking pkg-config for $FORM_NAME$cf_cv_libtype" >&5
16891 echo $ECHO_N "checking pkg-config for $FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
16892 if "$PKG_CONFIG" --exists $FORM_NAME$cf_cv_libtype ; then
16893 echo "$as_me:16893: result: yes" >&5
16894 echo "${ECHO_T}yes" >&6
16896 echo "$as_me:16896: checking if the $FORM_NAME$cf_cv_libtype package files work" >&5
16897 echo $ECHO_N "checking if the $FORM_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
16899 cf_save_CPPFLAGS="$CPPFLAGS"
16900 cf_save_LIBS="$LIBS"
16905 cf_new_extra_cppflags=
16907 for cf_add_cflags in `$PKG_CONFIG --cflags $FORM_NAME$cf_cv_libtype`
16909 case $cf_fix_cppflags in
16911 case $cf_add_cflags in
16912 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16913 case $cf_add_cflags in
16915 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16917 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16918 && test -z "${cf_tst_cflags}" \
16919 && cf_fix_cppflags=yes
16921 if test $cf_fix_cppflags = yes ; then
16923 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16924 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16927 elif test "${cf_tst_cflags}" = "\"'" ; then
16929 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16930 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16936 case "$CPPFLAGS" in
16940 case $cf_add_cflags in
16942 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16944 CPPFLAGS=`echo "$CPPFLAGS" | \
16945 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16946 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16951 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16952 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16959 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16960 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16967 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16968 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16970 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16972 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16973 && test -z "${cf_tst_cflags}" \
16974 && cf_fix_cppflags=no
16979 if test -n "$cf_new_cflags" ; then
16981 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16982 CFLAGS="${CFLAGS}$cf_new_cflags"
16986 if test -n "$cf_new_cppflags" ; then
16988 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16989 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16993 if test -n "$cf_new_extra_cppflags" ; then
16995 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16996 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17000 cf_add_libs="$LIBS"
17003 for cf_add_1lib in `$PKG_CONFIG --libs $FORM_NAME$cf_cv_libtype`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17004 # filter duplicates
17005 for cf_add_1lib in $cf_add_0lib; do
17006 for cf_add_2lib in $cf_add_libs; do
17007 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17012 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17014 LIBS="$cf_add_libs"
17016 cat >conftest.$ac_ext <<_ACEOF
17017 #line 17017 "configure"
17018 #include "confdefs.h"
17019 #include <$FORM_NAME.h>
17023 (void) form_driver ( 0,0 );
17028 rm -f conftest.$ac_objext conftest$ac_exeext
17029 if { (eval echo "$as_me:17029: \"$ac_link\"") >&5
17030 (eval $ac_link) 2>&5
17032 echo "$as_me:17032: \$? = $ac_status" >&5
17033 (exit $ac_status); } &&
17034 { ac_try='test -s conftest$ac_exeext'
17035 { (eval echo "$as_me:17035: \"$ac_try\"") >&5
17036 (eval $ac_try) 2>&5
17038 echo "$as_me:17038: \$? = $ac_status" >&5
17039 (exit $ac_status); }; }; then
17040 if test "$cross_compiling" = yes; then
17041 cf_have_curses_lib=maybe
17043 cat >conftest.$ac_ext <<_ACEOF
17044 #line 17044 "configure"
17045 #include "confdefs.h"
17046 #include <$FORM_NAME.h>
17048 { (void) form_driver ( 0,0 ); return 0; }
17050 rm -f conftest$ac_exeext
17051 if { (eval echo "$as_me:17051: \"$ac_link\"") >&5
17052 (eval $ac_link) 2>&5
17054 echo "$as_me:17054: \$? = $ac_status" >&5
17055 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17056 { (eval echo "$as_me:17056: \"$ac_try\"") >&5
17057 (eval $ac_try) 2>&5
17059 echo "$as_me:17059: \$? = $ac_status" >&5
17060 (exit $ac_status); }; }; then
17061 cf_have_curses_lib=yes
17063 echo "$as_me: program exited with status $ac_status" >&5
17064 echo "$as_me: failed program was:" >&5
17065 cat conftest.$ac_ext >&5
17066 cf_have_curses_lib=no
17068 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17071 echo "$as_me: failed program was:" >&5
17072 cat conftest.$ac_ext >&5
17073 cf_have_curses_lib=no
17075 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17076 echo "$as_me:17076: result: $cf_have_curses_lib" >&5
17077 echo "${ECHO_T}$cf_have_curses_lib" >&6
17078 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17079 if test "$cf_have_curses_lib" != "yes"
17081 CPPFLAGS="$cf_save_CPPFLAGS"
17082 LIBS="$cf_save_LIBS"
17085 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17087 cat >>confdefs.h <<EOF
17088 #define $cf_upper 1
17094 if test "$cf_have_curses_lib" = no; then
17095 as_ac_Lib=`echo "ac_cv_lib_$FORM_NAME$cf_cv_libtype''_form_driver" | $as_tr_sh`
17096 echo "$as_me:17096: checking for form_driver in -l$FORM_NAME$cf_cv_libtype" >&5
17097 echo $ECHO_N "checking for form_driver in -l$FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
17098 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17099 echo $ECHO_N "(cached) $ECHO_C" >&6
17101 ac_check_lib_save_LIBS=$LIBS
17102 LIBS="-l$FORM_NAME$cf_cv_libtype $LIBS"
17103 cat >conftest.$ac_ext <<_ACEOF
17104 #line 17104 "configure"
17105 #include "confdefs.h"
17107 /* Override any gcc2 internal prototype to avoid an error. */
17111 /* We use char because int might match the return type of a gcc2
17112 builtin and then its argument prototype would still apply. */
17113 char form_driver ();
17122 rm -f conftest.$ac_objext conftest$ac_exeext
17123 if { (eval echo "$as_me:17123: \"$ac_link\"") >&5
17124 (eval $ac_link) 2>&5
17126 echo "$as_me:17126: \$? = $ac_status" >&5
17127 (exit $ac_status); } &&
17128 { ac_try='test -s conftest$ac_exeext'
17129 { (eval echo "$as_me:17129: \"$ac_try\"") >&5
17130 (eval $ac_try) 2>&5
17132 echo "$as_me:17132: \$? = $ac_status" >&5
17133 (exit $ac_status); }; }; then
17134 eval "$as_ac_Lib=yes"
17136 echo "$as_me: failed program was:" >&5
17137 cat conftest.$ac_ext >&5
17138 eval "$as_ac_Lib=no"
17140 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17141 LIBS=$ac_check_lib_save_LIBS
17143 echo "$as_me:17143: result: `eval echo '${'$as_ac_Lib'}'`" >&5
17144 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
17145 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
17147 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17149 cf_add_libs="$LIBS"
17152 for cf_add_1lib in -l$FORM_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17153 # filter duplicates
17154 for cf_add_1lib in $cf_add_0lib; do
17155 for cf_add_2lib in $cf_add_libs; do
17156 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17161 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17163 LIBS="$cf_add_libs"
17165 cat >>confdefs.h <<EOF
17166 #define $cf_upper 1
17173 cf_curses_headers="$cf_curses_headers form.h"
17176 # look for curses-related headers
17178 for ac_header in $cf_curses_headers
17180 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17181 echo "$as_me:17181: checking for $ac_header" >&5
17182 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17183 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17184 echo $ECHO_N "(cached) $ECHO_C" >&6
17186 cat >conftest.$ac_ext <<_ACEOF
17187 #line 17187 "configure"
17188 #include "confdefs.h"
17189 #include <$ac_header>
17191 if { (eval echo "$as_me:17191: \"$ac_cpp conftest.$ac_ext\"") >&5
17192 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17194 egrep -v '^ *\+' conftest.er1 >conftest.err
17196 cat conftest.err >&5
17197 echo "$as_me:17197: \$? = $ac_status" >&5
17198 (exit $ac_status); } >/dev/null; then
17199 if test -s conftest.err; then
17200 ac_cpp_err=$ac_c_preproc_warn_flag
17207 if test -z "$ac_cpp_err"; then
17208 eval "$as_ac_Header=yes"
17210 echo "$as_me: failed program was:" >&5
17211 cat conftest.$ac_ext >&5
17212 eval "$as_ac_Header=no"
17214 rm -f conftest.err conftest.$ac_ext
17216 echo "$as_me:17216: result: `eval echo '${'$as_ac_Header'}'`" >&5
17217 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17218 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17219 cat >>confdefs.h <<EOF
17220 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17226 echo "$as_me:17226: checking for ANSI C header files" >&5
17227 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
17228 if test "${ac_cv_header_stdc+set}" = set; then
17229 echo $ECHO_N "(cached) $ECHO_C" >&6
17231 cat >conftest.$ac_ext <<_ACEOF
17232 #line 17232 "configure"
17233 #include "confdefs.h"
17234 #include <stdlib.h>
17235 #include <stdarg.h>
17236 #include <string.h>
17240 if { (eval echo "$as_me:17240: \"$ac_cpp conftest.$ac_ext\"") >&5
17241 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17243 egrep -v '^ *\+' conftest.er1 >conftest.err
17245 cat conftest.err >&5
17246 echo "$as_me:17246: \$? = $ac_status" >&5
17247 (exit $ac_status); } >/dev/null; then
17248 if test -s conftest.err; then
17249 ac_cpp_err=$ac_c_preproc_warn_flag
17256 if test -z "$ac_cpp_err"; then
17257 ac_cv_header_stdc=yes
17259 echo "$as_me: failed program was:" >&5
17260 cat conftest.$ac_ext >&5
17261 ac_cv_header_stdc=no
17263 rm -f conftest.err conftest.$ac_ext
17265 if test $ac_cv_header_stdc = yes; then
17266 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
17267 cat >conftest.$ac_ext <<_ACEOF
17268 #line 17268 "configure"
17269 #include "confdefs.h"
17270 #include <string.h>
17273 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17274 egrep "memchr" >/dev/null 2>&1; then
17277 ac_cv_header_stdc=no
17283 if test $ac_cv_header_stdc = yes; then
17284 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
17285 cat >conftest.$ac_ext <<_ACEOF
17286 #line 17286 "configure"
17287 #include "confdefs.h"
17288 #include <stdlib.h>
17291 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17292 egrep "free" >/dev/null 2>&1; then
17295 ac_cv_header_stdc=no
17301 if test $ac_cv_header_stdc = yes; then
17302 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
17303 if test "$cross_compiling" = yes; then
17306 cat >conftest.$ac_ext <<_ACEOF
17307 #line 17307 "configure"
17308 #include "confdefs.h"
17310 #if ((' ' & 0x0FF) == 0x020)
17311 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
17312 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
17314 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
17315 || ('j' <= (c) && (c) <= 'r') \
17316 || ('s' <= (c) && (c) <= 'z'))
17317 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
17320 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
17325 for (i = 0; i < 256; i++)
17326 if (XOR (islower (i), ISLOWER (i))
17327 || toupper (i) != TOUPPER (i))
17328 $ac_main_return(2);
17329 $ac_main_return (0);
17332 rm -f conftest$ac_exeext
17333 if { (eval echo "$as_me:17333: \"$ac_link\"") >&5
17334 (eval $ac_link) 2>&5
17336 echo "$as_me:17336: \$? = $ac_status" >&5
17337 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17338 { (eval echo "$as_me:17338: \"$ac_try\"") >&5
17339 (eval $ac_try) 2>&5
17341 echo "$as_me:17341: \$? = $ac_status" >&5
17342 (exit $ac_status); }; }; then
17345 echo "$as_me: program exited with status $ac_status" >&5
17346 echo "$as_me: failed program was:" >&5
17347 cat conftest.$ac_ext >&5
17348 ac_cv_header_stdc=no
17350 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17354 echo "$as_me:17354: result: $ac_cv_header_stdc" >&5
17355 echo "${ECHO_T}$ac_cv_header_stdc" >&6
17356 if test $ac_cv_header_stdc = yes; then
17358 cat >>confdefs.h <<\EOF
17359 #define STDC_HEADERS 1
17364 echo "$as_me:17364: checking whether time.h and sys/time.h may both be included" >&5
17365 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17366 if test "${ac_cv_header_time+set}" = set; then
17367 echo $ECHO_N "(cached) $ECHO_C" >&6
17369 cat >conftest.$ac_ext <<_ACEOF
17370 #line 17370 "configure"
17371 #include "confdefs.h"
17372 #include <sys/types.h>
17373 #include <sys/time.h>
17379 if ((struct tm *) 0)
17385 rm -f conftest.$ac_objext
17386 if { (eval echo "$as_me:17386: \"$ac_compile\"") >&5
17387 (eval $ac_compile) 2>&5
17389 echo "$as_me:17389: \$? = $ac_status" >&5
17390 (exit $ac_status); } &&
17391 { ac_try='test -s conftest.$ac_objext'
17392 { (eval echo "$as_me:17392: \"$ac_try\"") >&5
17393 (eval $ac_try) 2>&5
17395 echo "$as_me:17395: \$? = $ac_status" >&5
17396 (exit $ac_status); }; }; then
17397 ac_cv_header_time=yes
17399 echo "$as_me: failed program was:" >&5
17400 cat conftest.$ac_ext >&5
17401 ac_cv_header_time=no
17403 rm -f conftest.$ac_objext conftest.$ac_ext
17405 echo "$as_me:17405: result: $ac_cv_header_time" >&5
17406 echo "${ECHO_T}$ac_cv_header_time" >&6
17407 if test $ac_cv_header_time = yes; then
17409 cat >>confdefs.h <<\EOF
17410 #define TIME_WITH_SYS_TIME 1
17428 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17429 echo "$as_me:17429: checking for $ac_header" >&5
17430 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17431 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17432 echo $ECHO_N "(cached) $ECHO_C" >&6
17434 cat >conftest.$ac_ext <<_ACEOF
17435 #line 17435 "configure"
17436 #include "confdefs.h"
17437 #include <$ac_header>
17439 if { (eval echo "$as_me:17439: \"$ac_cpp conftest.$ac_ext\"") >&5
17440 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17442 egrep -v '^ *\+' conftest.er1 >conftest.err
17444 cat conftest.err >&5
17445 echo "$as_me:17445: \$? = $ac_status" >&5
17446 (exit $ac_status); } >/dev/null; then
17447 if test -s conftest.err; then
17448 ac_cpp_err=$ac_c_preproc_warn_flag
17455 if test -z "$ac_cpp_err"; then
17456 eval "$as_ac_Header=yes"
17458 echo "$as_me: failed program was:" >&5
17459 cat conftest.$ac_ext >&5
17460 eval "$as_ac_Header=no"
17462 rm -f conftest.err conftest.$ac_ext
17464 echo "$as_me:17464: result: `eval echo '${'$as_ac_Header'}'`" >&5
17465 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17466 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17467 cat >>confdefs.h <<EOF
17468 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17474 for ac_header in unistd.h getopt.h
17476 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17477 echo "$as_me:17477: checking for $ac_header" >&5
17478 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17479 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17480 echo $ECHO_N "(cached) $ECHO_C" >&6
17482 cat >conftest.$ac_ext <<_ACEOF
17483 #line 17483 "configure"
17484 #include "confdefs.h"
17485 #include <$ac_header>
17487 if { (eval echo "$as_me:17487: \"$ac_cpp conftest.$ac_ext\"") >&5
17488 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17490 egrep -v '^ *\+' conftest.er1 >conftest.err
17492 cat conftest.err >&5
17493 echo "$as_me:17493: \$? = $ac_status" >&5
17494 (exit $ac_status); } >/dev/null; then
17495 if test -s conftest.err; then
17496 ac_cpp_err=$ac_c_preproc_warn_flag
17503 if test -z "$ac_cpp_err"; then
17504 eval "$as_ac_Header=yes"
17506 echo "$as_me: failed program was:" >&5
17507 cat conftest.$ac_ext >&5
17508 eval "$as_ac_Header=no"
17510 rm -f conftest.err conftest.$ac_ext
17512 echo "$as_me:17512: result: `eval echo '${'$as_ac_Header'}'`" >&5
17513 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17514 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17515 cat >>confdefs.h <<EOF
17516 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17522 echo "$as_me:17522: checking for header declaring getopt variables" >&5
17523 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
17524 if test "${cf_cv_getopt_header+set}" = set; then
17525 echo $ECHO_N "(cached) $ECHO_C" >&6
17528 cf_cv_getopt_header=none
17529 for cf_header in stdio.h stdlib.h unistd.h getopt.h
17531 cat >conftest.$ac_ext <<_ACEOF
17532 #line 17532 "configure"
17533 #include "confdefs.h"
17535 #include <$cf_header>
17539 int x = optind; char *y = optarg
17544 rm -f conftest.$ac_objext
17545 if { (eval echo "$as_me:17545: \"$ac_compile\"") >&5
17546 (eval $ac_compile) 2>&5
17548 echo "$as_me:17548: \$? = $ac_status" >&5
17549 (exit $ac_status); } &&
17550 { ac_try='test -s conftest.$ac_objext'
17551 { (eval echo "$as_me:17551: \"$ac_try\"") >&5
17552 (eval $ac_try) 2>&5
17554 echo "$as_me:17554: \$? = $ac_status" >&5
17555 (exit $ac_status); }; }; then
17556 cf_cv_getopt_header=$cf_header
17559 echo "$as_me: failed program was:" >&5
17560 cat conftest.$ac_ext >&5
17562 rm -f conftest.$ac_objext conftest.$ac_ext
17566 echo "$as_me:17566: result: $cf_cv_getopt_header" >&5
17567 echo "${ECHO_T}$cf_cv_getopt_header" >&6
17568 if test $cf_cv_getopt_header != none ; then
17570 cat >>confdefs.h <<\EOF
17571 #define HAVE_GETOPT_HEADER 1
17575 if test $cf_cv_getopt_header = getopt.h ; then
17577 cat >>confdefs.h <<\EOF
17578 #define NEED_GETOPT_H 1
17592 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17593 echo "$as_me:17593: checking for $ac_func" >&5
17594 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17595 if eval "test \"\${$as_ac_var+set}\" = set"; then
17596 echo $ECHO_N "(cached) $ECHO_C" >&6
17598 cat >conftest.$ac_ext <<_ACEOF
17599 #line 17599 "configure"
17600 #include "confdefs.h"
17601 #define $ac_func autoconf_temporary
17602 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17609 /* We use char because int might match the return type of a gcc2
17610 builtin and then its argument prototype would still apply. */
17611 char $ac_func (void);
17617 /* The GNU C library defines stubs for functions which it implements
17618 to always fail with ENOSYS. Some functions are actually named
17619 something starting with __ and the normal name is an alias. */
17620 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17621 #error found stub for $ac_func
17624 return $ac_func ();
17629 rm -f conftest.$ac_objext conftest$ac_exeext
17630 if { (eval echo "$as_me:17630: \"$ac_link\"") >&5
17631 (eval $ac_link) 2>&5
17633 echo "$as_me:17633: \$? = $ac_status" >&5
17634 (exit $ac_status); } &&
17635 { ac_try='test -s conftest$ac_exeext'
17636 { (eval echo "$as_me:17636: \"$ac_try\"") >&5
17637 (eval $ac_try) 2>&5
17639 echo "$as_me:17639: \$? = $ac_status" >&5
17640 (exit $ac_status); }; }; then
17641 eval "$as_ac_var=yes"
17643 echo "$as_me: failed program was:" >&5
17644 cat conftest.$ac_ext >&5
17645 eval "$as_ac_var=no"
17647 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17649 echo "$as_me:17649: result: `eval echo '${'$as_ac_var'}'`" >&5
17650 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17651 if test `eval echo '${'$as_ac_var'}'` = yes; then
17652 cat >>confdefs.h <<EOF
17653 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17659 # use a compile-check to work with ncurses*-config and subdirectory includes
17660 echo "$as_me:17660: checking if we can use termcap.h" >&5
17661 echo $ECHO_N "checking if we can use termcap.h... $ECHO_C" >&6
17662 if test "${cf_cv_have_termcap_h+set}" = set; then
17663 echo $ECHO_N "(cached) $ECHO_C" >&6
17666 cat >conftest.$ac_ext <<_ACEOF
17667 #line 17667 "configure"
17668 #include "confdefs.h"
17670 #include <curses.h>
17671 #ifdef NCURSES_VERSION
17672 #undef NCURSES_VERSION
17674 #include <termcap.h>
17675 #ifndef NCURSES_VERSION
17676 #error wrong header
17687 rm -f conftest.$ac_objext
17688 if { (eval echo "$as_me:17688: \"$ac_compile\"") >&5
17689 (eval $ac_compile) 2>&5
17691 echo "$as_me:17691: \$? = $ac_status" >&5
17692 (exit $ac_status); } &&
17693 { ac_try='test -s conftest.$ac_objext'
17694 { (eval echo "$as_me:17694: \"$ac_try\"") >&5
17695 (eval $ac_try) 2>&5
17697 echo "$as_me:17697: \$? = $ac_status" >&5
17698 (exit $ac_status); }; }; then
17699 cf_cv_have_termcap_h=yes
17701 echo "$as_me: failed program was:" >&5
17702 cat conftest.$ac_ext >&5
17703 cf_cv_have_termcap_h=no
17705 rm -f conftest.$ac_objext conftest.$ac_ext
17707 echo "$as_me:17707: result: $cf_cv_have_termcap_h" >&5
17708 echo "${ECHO_T}$cf_cv_have_termcap_h" >&6
17709 if test "x$cf_cv_have_termcap_h" = xyes
17712 cat >>confdefs.h <<\EOF
17713 #define HAVE_TERMCAP_H 1
17717 echo "$as_me:17717: checking if we can use ncurses/termcap.h" >&5
17718 echo $ECHO_N "checking if we can use ncurses/termcap.h... $ECHO_C" >&6
17719 if test "${cf_cv_have_ncurses_termcap_h+set}" = set; then
17720 echo $ECHO_N "(cached) $ECHO_C" >&6
17723 cat >conftest.$ac_ext <<_ACEOF
17724 #line 17724 "configure"
17725 #include "confdefs.h"
17727 #include <ncurses/curses.h>
17728 #ifdef NCURSES_VERSION
17729 #undef NCURSES_VERSION
17731 #include <ncurses/termcap.h>
17732 #ifndef NCURSES_VERSION
17733 #error wrong header
17744 rm -f conftest.$ac_objext
17745 if { (eval echo "$as_me:17745: \"$ac_compile\"") >&5
17746 (eval $ac_compile) 2>&5
17748 echo "$as_me:17748: \$? = $ac_status" >&5
17749 (exit $ac_status); } &&
17750 { ac_try='test -s conftest.$ac_objext'
17751 { (eval echo "$as_me:17751: \"$ac_try\"") >&5
17752 (eval $ac_try) 2>&5
17754 echo "$as_me:17754: \$? = $ac_status" >&5
17755 (exit $ac_status); }; }; then
17756 cf_cv_have_ncurses_termcap_h=yes
17758 echo "$as_me: failed program was:" >&5
17759 cat conftest.$ac_ext >&5
17760 cf_cv_have_ncurses_termcap_h=no
17762 rm -f conftest.$ac_objext conftest.$ac_ext
17764 echo "$as_me:17764: result: $cf_cv_have_ncurses_termcap_h" >&5
17765 echo "${ECHO_T}$cf_cv_have_ncurses_termcap_h" >&6
17766 test "x$cf_cv_have_ncurses_termcap_h" = xyes &&
17767 cat >>confdefs.h <<\EOF
17768 #define HAVE_NCURSES_TERMCAP_H 1
17773 if test "x$ac_cv_func_getopt" = xno; then
17774 { { echo "$as_me:17774: error: getopt is required for building programs" >&5
17775 echo "$as_me: error: getopt is required for building programs" >&2;}
17776 { (exit 1); exit 1; }; }
17779 if test "$cf_enable_widec" = yes; then
17792 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17793 echo "$as_me:17793: checking for $ac_func" >&5
17794 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17795 if eval "test \"\${$as_ac_var+set}\" = set"; then
17796 echo $ECHO_N "(cached) $ECHO_C" >&6
17798 cat >conftest.$ac_ext <<_ACEOF
17799 #line 17799 "configure"
17800 #include "confdefs.h"
17801 #define $ac_func autoconf_temporary
17802 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17809 /* We use char because int might match the return type of a gcc2
17810 builtin and then its argument prototype would still apply. */
17811 char $ac_func (void);
17817 /* The GNU C library defines stubs for functions which it implements
17818 to always fail with ENOSYS. Some functions are actually named
17819 something starting with __ and the normal name is an alias. */
17820 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17821 #error found stub for $ac_func
17824 return $ac_func ();
17829 rm -f conftest.$ac_objext conftest$ac_exeext
17830 if { (eval echo "$as_me:17830: \"$ac_link\"") >&5
17831 (eval $ac_link) 2>&5
17833 echo "$as_me:17833: \$? = $ac_status" >&5
17834 (exit $ac_status); } &&
17835 { ac_try='test -s conftest$ac_exeext'
17836 { (eval echo "$as_me:17836: \"$ac_try\"") >&5
17837 (eval $ac_try) 2>&5
17839 echo "$as_me:17839: \$? = $ac_status" >&5
17840 (exit $ac_status); }; }; then
17841 eval "$as_ac_var=yes"
17843 echo "$as_me: failed program was:" >&5
17844 cat conftest.$ac_ext >&5
17845 eval "$as_ac_var=no"
17847 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17849 echo "$as_me:17849: result: `eval echo '${'$as_ac_var'}'`" >&5
17850 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17851 if test `eval echo '${'$as_ac_var'}'` = yes; then
17852 cat >>confdefs.h <<EOF
17853 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17861 echo "$as_me:17861: checking definition to turn on extended curses functions" >&5
17862 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
17863 if test "${cf_cv_need_xopen_extension+set}" = set; then
17864 echo $ECHO_N "(cached) $ECHO_C" >&6
17867 cf_cv_need_xopen_extension=unknown
17868 cat >conftest.$ac_ext <<_ACEOF
17869 #line 17869 "configure"
17870 #include "confdefs.h"
17872 #include <stdlib.h>
17873 #include <${cf_cv_ncurses_header:-curses.h}>
17878 #if defined(NCURSES_VERSION_PATCH)
17879 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
17883 #ifdef NCURSES_VERSION
17885 int check2 = curs_set((int)sizeof(check));
17887 long x = winnstr(stdscr, "", 0);
17889 #ifdef NCURSES_VERSION
17892 getbegyx(stdscr, y1, x1);
17901 rm -f conftest.$ac_objext conftest$ac_exeext
17902 if { (eval echo "$as_me:17902: \"$ac_link\"") >&5
17903 (eval $ac_link) 2>&5
17905 echo "$as_me:17905: \$? = $ac_status" >&5
17906 (exit $ac_status); } &&
17907 { ac_try='test -s conftest$ac_exeext'
17908 { (eval echo "$as_me:17908: \"$ac_try\"") >&5
17909 (eval $ac_try) 2>&5
17911 echo "$as_me:17911: \$? = $ac_status" >&5
17912 (exit $ac_status); }; }; then
17913 cf_cv_need_xopen_extension=none
17915 echo "$as_me: failed program was:" >&5
17916 cat conftest.$ac_ext >&5
17918 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
17920 cat >conftest.$ac_ext <<_ACEOF
17921 #line 17921 "configure"
17922 #include "confdefs.h"
17924 #define $cf_try_xopen_extension 1
17925 #include <stdlib.h>
17926 #include <${cf_cv_ncurses_header:-curses.h}>
17931 #ifdef NCURSES_VERSION
17933 int check2 = curs_set((int)sizeof(check));
17935 long x = winnstr(stdscr, "", 0);
17937 getbegyx(stdscr, y1, x1);
17938 #ifdef NCURSES_VERSION
17949 rm -f conftest.$ac_objext conftest$ac_exeext
17950 if { (eval echo "$as_me:17950: \"$ac_link\"") >&5
17951 (eval $ac_link) 2>&5
17953 echo "$as_me:17953: \$? = $ac_status" >&5
17954 (exit $ac_status); } &&
17955 { ac_try='test -s conftest$ac_exeext'
17956 { (eval echo "$as_me:17956: \"$ac_try\"") >&5
17957 (eval $ac_try) 2>&5
17959 echo "$as_me:17959: \$? = $ac_status" >&5
17960 (exit $ac_status); }; }; then
17961 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
17963 echo "$as_me: failed program was:" >&5
17964 cat conftest.$ac_ext >&5
17966 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17970 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17973 echo "$as_me:17973: result: $cf_cv_need_xopen_extension" >&5
17974 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
17976 case $cf_cv_need_xopen_extension in
17979 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17980 CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
17985 echo "$as_me:17985: checking for term.h" >&5
17986 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
17987 if test "${cf_cv_term_header+set}" = set; then
17988 echo $ECHO_N "(cached) $ECHO_C" >&6
17991 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
17992 # for <term.h> if we do not find the variant.
17994 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
17996 case ${cf_cv_ncurses_header:-curses.h} in
17998 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
17999 cf_header_list="$cf_header_item $cf_header_list"
18003 for cf_header in $cf_header_list
18005 cat >conftest.$ac_ext <<_ACEOF
18006 #line 18006 "configure"
18007 #include "confdefs.h"
18009 #include <${cf_cv_ncurses_header:-curses.h}>
18010 #include <${cf_header}>
18019 rm -f conftest.$ac_objext
18020 if { (eval echo "$as_me:18020: \"$ac_compile\"") >&5
18021 (eval $ac_compile) 2>&5
18023 echo "$as_me:18023: \$? = $ac_status" >&5
18024 (exit $ac_status); } &&
18025 { ac_try='test -s conftest.$ac_objext'
18026 { (eval echo "$as_me:18026: \"$ac_try\"") >&5
18027 (eval $ac_try) 2>&5
18029 echo "$as_me:18029: \$? = $ac_status" >&5
18030 (exit $ac_status); }; }; then
18031 cf_cv_term_header=$cf_header
18034 echo "$as_me: failed program was:" >&5
18035 cat conftest.$ac_ext >&5
18036 cf_cv_term_header=no
18038 rm -f conftest.$ac_objext conftest.$ac_ext
18041 case $cf_cv_term_header in
18043 # If curses is ncurses, some packagers still mess it up by trying to make
18044 # us use GNU termcap. This handles the most common case.
18045 for cf_header in ncurses/term.h ncursesw/term.h
18047 cat >conftest.$ac_ext <<_ACEOF
18048 #line 18048 "configure"
18049 #include "confdefs.h"
18051 #include <${cf_cv_ncurses_header:-curses.h}>
18052 #ifdef NCURSES_VERSION
18053 #include <${cf_header}>
18065 rm -f conftest.$ac_objext
18066 if { (eval echo "$as_me:18066: \"$ac_compile\"") >&5
18067 (eval $ac_compile) 2>&5
18069 echo "$as_me:18069: \$? = $ac_status" >&5
18070 (exit $ac_status); } &&
18071 { ac_try='test -s conftest.$ac_objext'
18072 { (eval echo "$as_me:18072: \"$ac_try\"") >&5
18073 (eval $ac_try) 2>&5
18075 echo "$as_me:18075: \$? = $ac_status" >&5
18076 (exit $ac_status); }; }; then
18077 cf_cv_term_header=$cf_header
18080 echo "$as_me: failed program was:" >&5
18081 cat conftest.$ac_ext >&5
18082 cf_cv_term_header=no
18084 rm -f conftest.$ac_objext conftest.$ac_ext
18090 echo "$as_me:18090: result: $cf_cv_term_header" >&5
18091 echo "${ECHO_T}$cf_cv_term_header" >&6
18093 case $cf_cv_term_header in
18096 cat >>confdefs.h <<\EOF
18097 #define HAVE_TERM_H 1
18103 cat >>confdefs.h <<\EOF
18104 #define HAVE_NCURSES_TERM_H 1
18110 cat >>confdefs.h <<\EOF
18111 #define HAVE_NCURSESW_TERM_H 1
18117 echo "$as_me:18117: checking for unctrl.h" >&5
18118 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
18119 if test "${cf_cv_unctrl_header+set}" = set; then
18120 echo $ECHO_N "(cached) $ECHO_C" >&6
18123 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
18124 # for <unctrl.h> if we do not find the variant.
18126 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
18128 case ${cf_cv_ncurses_header:-curses.h} in
18130 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
18131 cf_header_list="$cf_header_item $cf_header_list"
18135 for cf_header in $cf_header_list
18137 cat >conftest.$ac_ext <<_ACEOF
18138 #line 18138 "configure"
18139 #include "confdefs.h"
18141 #include <${cf_cv_ncurses_header:-curses.h}>
18142 #include <${cf_header}>
18151 rm -f conftest.$ac_objext
18152 if { (eval echo "$as_me:18152: \"$ac_compile\"") >&5
18153 (eval $ac_compile) 2>&5
18155 echo "$as_me:18155: \$? = $ac_status" >&5
18156 (exit $ac_status); } &&
18157 { ac_try='test -s conftest.$ac_objext'
18158 { (eval echo "$as_me:18158: \"$ac_try\"") >&5
18159 (eval $ac_try) 2>&5
18161 echo "$as_me:18161: \$? = $ac_status" >&5
18162 (exit $ac_status); }; }; then
18163 cf_cv_unctrl_header=$cf_header
18166 echo "$as_me: failed program was:" >&5
18167 cat conftest.$ac_ext >&5
18168 cf_cv_unctrl_header=no
18170 rm -f conftest.$ac_objext conftest.$ac_ext
18174 echo "$as_me:18174: result: $cf_cv_unctrl_header" >&5
18175 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
18177 case $cf_cv_unctrl_header in
18179 { echo "$as_me:18179: WARNING: unctrl.h header not found" >&5
18180 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
18184 case $cf_cv_unctrl_header in
18187 cat >>confdefs.h <<\EOF
18188 #define HAVE_UNCTRL_H 1
18194 cat >>confdefs.h <<\EOF
18195 #define HAVE_NCURSES_UNCTRL_H 1
18199 (ncursesw/unctrl.h)
18201 cat >>confdefs.h <<\EOF
18202 #define HAVE_NCURSESW_UNCTRL_H 1
18210 assume_default_colors \
18227 init_extended_color \
18235 reset_color_pairs \
18251 use_default_colors \
18253 use_extended_names \
18269 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18271 echo "$as_me:18271: checking for ${cf_func}" >&5
18272 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
18274 echo "${as_me:-configure}:18274: testing ${cf_func} ..." 1>&5
18276 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
18277 echo $ECHO_N "(cached) $ECHO_C" >&6
18280 eval cf_result='$ac_cv_func_'$cf_func
18281 if test ".$cf_result" != ".no"; then
18282 cat >conftest.$ac_ext <<_ACEOF
18283 #line 18283 "configure"
18284 #include "confdefs.h"
18286 #ifdef HAVE_XCURSES
18287 #include <xcurses.h>
18288 char * XCursesProgramName = "test";
18290 #include <${cf_cv_ncurses_header:-curses.h}>
18291 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
18292 #include <ncursesw/term.h>
18293 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
18294 #include <ncurses/term.h>
18295 #elif defined(HAVE_TERM_H)
18305 long foo = (long)(&${cf_func});
18306 fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
18307 if (foo + 1234L > 5678L)
18308 ${cf_cv_main_return:-return}(foo != 0);
18315 rm -f conftest.$ac_objext conftest$ac_exeext
18316 if { (eval echo "$as_me:18316: \"$ac_link\"") >&5
18317 (eval $ac_link) 2>&5
18319 echo "$as_me:18319: \$? = $ac_status" >&5
18320 (exit $ac_status); } &&
18321 { ac_try='test -s conftest$ac_exeext'
18322 { (eval echo "$as_me:18322: \"$ac_try\"") >&5
18323 (eval $ac_try) 2>&5
18325 echo "$as_me:18325: \$? = $ac_status" >&5
18326 (exit $ac_status); }; }; then
18329 echo "$as_me: failed program was:" >&5
18330 cat conftest.$ac_ext >&5
18333 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18335 eval 'cf_cv_func_'$cf_func'=$cf_result'
18339 # use the computed/retrieved cache-value:
18340 eval 'cf_result=$cf_cv_func_'$cf_func
18341 echo "$as_me:18341: result: $cf_result" >&5
18342 echo "${ECHO_T}$cf_result" >&6
18343 if test $cf_result != no; then
18344 cat >>confdefs.h <<EOF
18345 #define HAVE_${cf_tr_func} 1
18351 for cf_func in tputs
18354 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18356 echo "$as_me:18356: checking for ${cf_func}" >&5
18357 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
18359 echo "${as_me:-configure}:18359: testing ${cf_func} ..." 1>&5
18361 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
18362 echo $ECHO_N "(cached) $ECHO_C" >&6
18365 eval cf_result='$ac_cv_func_'$cf_func
18366 if test ".$cf_result" != ".no"; then
18367 cat >conftest.$ac_ext <<_ACEOF
18368 #line 18368 "configure"
18369 #include "confdefs.h"
18371 #ifdef HAVE_XCURSES
18372 #include <xcurses.h>
18373 char * XCursesProgramName = "test";
18375 #include <${cf_cv_ncurses_header:-curses.h}>
18376 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
18377 #include <ncursesw/term.h>
18378 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
18379 #include <ncurses/term.h>
18380 #elif defined(HAVE_TERM_H)
18390 long foo = (long)(&${cf_func});
18391 fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
18392 if (foo + 1234L > 5678L)
18393 ${cf_cv_main_return:-return}(foo != 0);
18400 rm -f conftest.$ac_objext conftest$ac_exeext
18401 if { (eval echo "$as_me:18401: \"$ac_link\"") >&5
18402 (eval $ac_link) 2>&5
18404 echo "$as_me:18404: \$? = $ac_status" >&5
18405 (exit $ac_status); } &&
18406 { ac_try='test -s conftest$ac_exeext'
18407 { (eval echo "$as_me:18407: \"$ac_try\"") >&5
18408 (eval $ac_try) 2>&5
18410 echo "$as_me:18410: \$? = $ac_status" >&5
18411 (exit $ac_status); }; }; then
18414 echo "$as_me: failed program was:" >&5
18415 cat conftest.$ac_ext >&5
18418 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18420 eval 'cf_cv_func_'$cf_func'=$cf_result'
18424 # use the computed/retrieved cache-value:
18425 eval 'cf_result=$cf_cv_func_'$cf_func
18426 echo "$as_me:18426: result: $cf_result" >&5
18427 echo "${ECHO_T}$cf_result" >&6
18428 if test $cf_result != no; then
18429 cat >>confdefs.h <<EOF
18430 #define HAVE_${cf_tr_func} 1
18436 if test x$cf_cv_func_tputs = xyes
18439 for cf_arg in int char
18441 for cf_ret in int void
18443 if test $cf_ret = void
18445 cf_return="/* nothing */"
18447 cf_return="return value"
18449 cat >conftest.$ac_ext <<_ACEOF
18450 #line 18450 "configure"
18451 #include "confdefs.h"
18453 #include <${cf_cv_ncurses_header:-curses.h}>
18454 #include <$cf_cv_term_header>
18456 static $cf_ret outc($cf_arg value) { $cf_return; }
18462 tputs("hello", 0, outc);
18463 ${cf_cv_main_return:-return}(0);
18469 rm -f conftest.$ac_objext
18470 if { (eval echo "$as_me:18470: \"$ac_compile\"") >&5
18471 (eval $ac_compile) 2>&5
18473 echo "$as_me:18473: \$? = $ac_status" >&5
18474 (exit $ac_status); } &&
18475 { ac_try='test -s conftest.$ac_objext'
18476 { (eval echo "$as_me:18476: \"$ac_try\"") >&5
18477 (eval $ac_try) 2>&5
18479 echo "$as_me:18479: \$? = $ac_status" >&5
18480 (exit $ac_status); }; }; then
18482 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
18484 echo "${as_me:-configure}:18484: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
18486 cat >>confdefs.h <<EOF
18487 #define TPUTS_ARG $cf_arg
18488 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
18489 #define TPUTS_RETURN(value) $cf_return
18495 echo "$as_me: failed program was:" >&5
18496 cat conftest.$ac_ext >&5
18498 rm -f conftest.$ac_objext conftest.$ac_ext
18500 test $cf_done = yes && break
18504 echo "$as_me:18504: checking for ncurses extended functions" >&5
18505 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
18506 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
18507 echo $ECHO_N "(cached) $ECHO_C" >&6
18510 cat >conftest.$ac_ext <<_ACEOF
18511 #line 18511 "configure"
18512 #include "confdefs.h"
18514 #include <${cf_cv_ncurses_header:-curses.h}>
18519 int x = NCURSES_EXT_FUNCS
18525 rm -f conftest.$ac_objext
18526 if { (eval echo "$as_me:18526: \"$ac_compile\"") >&5
18527 (eval $ac_compile) 2>&5
18529 echo "$as_me:18529: \$? = $ac_status" >&5
18530 (exit $ac_status); } &&
18531 { ac_try='test -s conftest.$ac_objext'
18532 { (eval echo "$as_me:18532: \"$ac_try\"") >&5
18533 (eval $ac_try) 2>&5
18535 echo "$as_me:18535: \$? = $ac_status" >&5
18536 (exit $ac_status); }; }; then
18537 cf_cv_ncurses_ext_funcs=defined
18539 echo "$as_me: failed program was:" >&5
18540 cat conftest.$ac_ext >&5
18542 cat >conftest.$ac_ext <<_ACEOF
18543 #line 18543 "configure"
18544 #include "confdefs.h"
18546 #include <${cf_cv_ncurses_header:-curses.h}>
18551 (void) assume_default_colors (0, 0);
18552 (void) curses_version ();
18553 (void) define_key (0, 0);
18554 (void) is_term_resized (0, 0);
18555 (void) key_defined (0);
18556 (void) keybound (0, 0);
18557 (void) keyok (0, 0);
18558 (void) resize_term (0, 0);
18559 (void) resizeterm (0, 0);
18560 (void) use_default_colors ();
18561 (void) use_extended_names (0);
18562 (void) wresize (0, 0, 0);
18567 rm -f conftest.$ac_objext conftest$ac_exeext
18568 if { (eval echo "$as_me:18568: \"$ac_link\"") >&5
18569 (eval $ac_link) 2>&5
18571 echo "$as_me:18571: \$? = $ac_status" >&5
18572 (exit $ac_status); } &&
18573 { ac_try='test -s conftest$ac_exeext'
18574 { (eval echo "$as_me:18574: \"$ac_try\"") >&5
18575 (eval $ac_try) 2>&5
18577 echo "$as_me:18577: \$? = $ac_status" >&5
18578 (exit $ac_status); }; }; then
18579 cf_cv_ncurses_ext_funcs=yes
18581 echo "$as_me: failed program was:" >&5
18582 cat conftest.$ac_ext >&5
18583 cf_cv_ncurses_ext_funcs=no
18585 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18588 rm -f conftest.$ac_objext conftest.$ac_ext
18591 echo "$as_me:18591: result: $cf_cv_ncurses_ext_funcs" >&5
18592 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
18593 test "$cf_cv_ncurses_ext_funcs" = yes &&
18594 cat >>confdefs.h <<\EOF
18595 #define NCURSES_EXT_FUNCS 1
18598 if test "$cf_enable_widec" = yes
18600 # workaround for systems with ncurses before 20111029, due to change of
18601 # feature test macro from _XPG5 to _XOPEN_SOURCE
18602 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
18605 echo "$as_me:18605: checking if _XPG5 should be defined to enable wide-characters" >&5
18606 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
18608 cat >conftest.$ac_ext <<_ACEOF
18609 #line 18609 "configure"
18610 #include "confdefs.h"
18612 #include <${cf_cv_ncurses_header:-curses.h}>
18621 rm -f conftest.$ac_objext
18622 if { (eval echo "$as_me:18622: \"$ac_compile\"") >&5
18623 (eval $ac_compile) 2>&5
18625 echo "$as_me:18625: \$? = $ac_status" >&5
18626 (exit $ac_status); } &&
18627 { ac_try='test -s conftest.$ac_objext'
18628 { (eval echo "$as_me:18628: \"$ac_try\"") >&5
18629 (eval $ac_try) 2>&5
18631 echo "$as_me:18631: \$? = $ac_status" >&5
18632 (exit $ac_status); }; }; then
18635 echo "$as_me: failed program was:" >&5
18636 cat conftest.$ac_ext >&5
18637 cf_save_cppflags="$CPPFLAGS"
18638 CPPFLAGS="$CPPFLAGS -D_XPG5"
18639 cat >conftest.$ac_ext <<_ACEOF
18640 #line 18640 "configure"
18641 #include "confdefs.h"
18643 #include <${cf_cv_ncurses_header:-curses.h}>
18652 rm -f conftest.$ac_objext
18653 if { (eval echo "$as_me:18653: \"$ac_compile\"") >&5
18654 (eval $ac_compile) 2>&5
18656 echo "$as_me:18656: \$? = $ac_status" >&5
18657 (exit $ac_status); } &&
18658 { ac_try='test -s conftest.$ac_objext'
18659 { (eval echo "$as_me:18659: \"$ac_try\"") >&5
18660 (eval $ac_try) 2>&5
18662 echo "$as_me:18662: \$? = $ac_status" >&5
18663 (exit $ac_status); }; }; then
18666 echo "$as_me: failed program was:" >&5
18667 cat conftest.$ac_ext >&5
18669 rm -f conftest.$ac_objext conftest.$ac_ext
18670 CPPFLAGS="$cf_save_cppflags"
18672 rm -f conftest.$ac_objext conftest.$ac_ext
18673 echo "$as_me:18673: result: $cf_define_xpg5" >&5
18674 echo "${ECHO_T}$cf_define_xpg5" >&6
18676 if test "$cf_define_xpg5" = yes
18678 CPPFLAGS="$CPPFLAGS -D_XPG5"
18682 echo "$as_me:18682: checking for wide-character functions" >&5
18683 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
18684 if test "${cf_cv_widechar_funcs+set}" = set; then
18685 echo $ECHO_N "(cached) $ECHO_C" >&6
18688 cat >conftest.$ac_ext <<_ACEOF
18689 #line 18689 "configure"
18690 #include "confdefs.h"
18692 #include <${cf_cv_ncurses_header:-curses.h}>
18697 static wchar_t src_wchar[2];
18698 static cchar_t dst_cchar;
18699 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
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_widechar_funcs=yes
18719 echo "$as_me: failed program was:" >&5
18720 cat conftest.$ac_ext >&5
18721 cf_cv_widechar_funcs=no
18723 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18726 echo "$as_me:18726: result: $cf_cv_widechar_funcs" >&5
18727 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
18728 if test "$cf_cv_widechar_funcs" != no ; then
18730 cat >>confdefs.h <<\EOF
18731 #define USE_WIDEC_SUPPORT 1
18735 cat >>confdefs.h <<\EOF
18736 #define USE_WIDEC_SUPPORT 0
18741 cat >>confdefs.h <<\EOF
18742 #define USE_WIDEC_SUPPORT 0
18747 echo "$as_me:18747: checking if $cf_cv_screen library uses pthreads" >&5
18748 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
18749 if test "${cf_cv_use_pthreads+set}" = set; then
18750 echo $ECHO_N "(cached) $ECHO_C" >&6
18753 cat >conftest.$ac_ext <<_ACEOF
18754 #line 18754 "configure"
18755 #include "confdefs.h"
18757 #include <${cf_cv_ncurses_header:-curses.h}>
18758 extern void _nc_init_pthreads(void);
18765 _nc_init_pthreads();
18771 rm -f conftest.$ac_objext conftest$ac_exeext
18772 if { (eval echo "$as_me:18772: \"$ac_link\"") >&5
18773 (eval $ac_link) 2>&5
18775 echo "$as_me:18775: \$? = $ac_status" >&5
18776 (exit $ac_status); } &&
18777 { ac_try='test -s conftest$ac_exeext'
18778 { (eval echo "$as_me:18778: \"$ac_try\"") >&5
18779 (eval $ac_try) 2>&5
18781 echo "$as_me:18781: \$? = $ac_status" >&5
18782 (exit $ac_status); }; }; then
18783 cf_cv_use_pthreads=yes
18785 echo "$as_me: failed program was:" >&5
18786 cat conftest.$ac_ext >&5
18787 cf_cv_use_pthreads=no
18789 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18792 echo "$as_me:18792: result: $cf_cv_use_pthreads" >&5
18793 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
18794 test $cf_cv_use_pthreads = yes &&
18795 cat >>confdefs.h <<\EOF
18796 #define USE_PTHREADS 1
18799 echo "$as_me:18799: checking if sys/time.h works with sys/select.h" >&5
18800 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
18801 if test "${cf_cv_sys_time_select+set}" = set; then
18802 echo $ECHO_N "(cached) $ECHO_C" >&6
18805 cat >conftest.$ac_ext <<_ACEOF
18806 #line 18806 "configure"
18807 #include "confdefs.h"
18809 #include <sys/types.h>
18810 #ifdef HAVE_SYS_TIME_H
18811 #include <sys/time.h>
18813 #ifdef HAVE_SYS_SELECT_H
18814 #include <sys/select.h>
18825 rm -f conftest.$ac_objext
18826 if { (eval echo "$as_me:18826: \"$ac_compile\"") >&5
18827 (eval $ac_compile) 2>&5
18829 echo "$as_me:18829: \$? = $ac_status" >&5
18830 (exit $ac_status); } &&
18831 { ac_try='test -s conftest.$ac_objext'
18832 { (eval echo "$as_me:18832: \"$ac_try\"") >&5
18833 (eval $ac_try) 2>&5
18835 echo "$as_me:18835: \$? = $ac_status" >&5
18836 (exit $ac_status); }; }; then
18837 cf_cv_sys_time_select=yes
18839 echo "$as_me: failed program was:" >&5
18840 cat conftest.$ac_ext >&5
18841 cf_cv_sys_time_select=no
18843 rm -f conftest.$ac_objext conftest.$ac_ext
18847 echo "$as_me:18847: result: $cf_cv_sys_time_select" >&5
18848 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
18849 test "$cf_cv_sys_time_select" = yes &&
18850 cat >>confdefs.h <<\EOF
18851 #define HAVE_SYS_TIME_SELECT 1
18854 # special check for test/ditto.c
18856 echo "$as_me:18856: checking for openpty in -lutil" >&5
18857 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18858 if test "${ac_cv_lib_util_openpty+set}" = set; then
18859 echo $ECHO_N "(cached) $ECHO_C" >&6
18861 ac_check_lib_save_LIBS=$LIBS
18862 LIBS="-lutil $LIBS"
18863 cat >conftest.$ac_ext <<_ACEOF
18864 #line 18864 "configure"
18865 #include "confdefs.h"
18867 /* Override any gcc2 internal prototype to avoid an error. */
18871 /* We use char because int might match the return type of a gcc2
18872 builtin and then its argument prototype would still apply. */
18882 rm -f conftest.$ac_objext conftest$ac_exeext
18883 if { (eval echo "$as_me:18883: \"$ac_link\"") >&5
18884 (eval $ac_link) 2>&5
18886 echo "$as_me:18886: \$? = $ac_status" >&5
18887 (exit $ac_status); } &&
18888 { ac_try='test -s conftest$ac_exeext'
18889 { (eval echo "$as_me:18889: \"$ac_try\"") >&5
18890 (eval $ac_try) 2>&5
18892 echo "$as_me:18892: \$? = $ac_status" >&5
18893 (exit $ac_status); }; }; then
18894 ac_cv_lib_util_openpty=yes
18896 echo "$as_me: failed program was:" >&5
18897 cat conftest.$ac_ext >&5
18898 ac_cv_lib_util_openpty=no
18900 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18901 LIBS=$ac_check_lib_save_LIBS
18903 echo "$as_me:18903: result: $ac_cv_lib_util_openpty" >&5
18904 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18905 if test $ac_cv_lib_util_openpty = yes; then
18911 echo "$as_me:18911: checking for openpty header" >&5
18912 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18913 if test "${cf_cv_func_openpty+set}" = set; then
18914 echo $ECHO_N "(cached) $ECHO_C" >&6
18917 cf_save_LIBS="$LIBS"
18918 test $cf_cv_lib_util = yes && {
18919 cf_add_libs="$LIBS"
18922 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18923 # filter duplicates
18924 for cf_add_1lib in $cf_add_0lib; do
18925 for cf_add_2lib in $cf_add_libs; do
18926 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18931 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18933 LIBS="$cf_add_libs"
18935 for cf_header in pty.h libutil.h util.h
18937 cat >conftest.$ac_ext <<_ACEOF
18938 #line 18938 "configure"
18939 #include "confdefs.h"
18941 #include <$cf_header>
18947 int x = openpty((int *)0, (int *)0, (char *)0,
18948 (struct termios *)0, (struct winsize *)0);
18954 rm -f conftest.$ac_objext conftest$ac_exeext
18955 if { (eval echo "$as_me:18955: \"$ac_link\"") >&5
18956 (eval $ac_link) 2>&5
18958 echo "$as_me:18958: \$? = $ac_status" >&5
18959 (exit $ac_status); } &&
18960 { ac_try='test -s conftest$ac_exeext'
18961 { (eval echo "$as_me:18961: \"$ac_try\"") >&5
18962 (eval $ac_try) 2>&5
18964 echo "$as_me:18964: \$? = $ac_status" >&5
18965 (exit $ac_status); }; }; then
18967 cf_cv_func_openpty=$cf_header
18971 echo "$as_me: failed program was:" >&5
18972 cat conftest.$ac_ext >&5
18974 cf_cv_func_openpty=no
18977 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18979 LIBS="$cf_save_LIBS"
18982 echo "$as_me:18982: result: $cf_cv_func_openpty" >&5
18983 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18985 if test "$cf_cv_func_openpty" != no ; then
18987 cat >>confdefs.h <<EOF
18988 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18991 cat >>confdefs.h <<\EOF
18992 #define USE_XTERM_PTY 1
18995 if test "x$cf_cv_lib_util" = xyes ; then
18997 cf_add_libs="$TEST_LIBS"
19000 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19001 # filter duplicates
19002 for cf_add_1lib in $cf_add_0lib; do
19003 for cf_add_2lib in $cf_add_libs; do
19004 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19009 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19011 TEST_LIBS="$cf_add_libs"
19016 echo "$as_me:19016: checking for function curses_version" >&5
19017 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
19018 if test "${cf_cv_func_curses_version+set}" = set; then
19019 echo $ECHO_N "(cached) $ECHO_C" >&6
19022 if test "$cross_compiling" = yes; then
19023 cf_cv_func_curses_version=unknown
19025 cat >conftest.$ac_ext <<_ACEOF
19026 #line 19026 "configure"
19027 #include "confdefs.h"
19029 #include <${cf_cv_ncurses_header:-curses.h}>
19033 sprintf(temp, "%s\n", curses_version());
19034 ${cf_cv_main_return:-return}(0);
19038 rm -f conftest$ac_exeext
19039 if { (eval echo "$as_me:19039: \"$ac_link\"") >&5
19040 (eval $ac_link) 2>&5
19042 echo "$as_me:19042: \$? = $ac_status" >&5
19043 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19044 { (eval echo "$as_me:19044: \"$ac_try\"") >&5
19045 (eval $ac_try) 2>&5
19047 echo "$as_me:19047: \$? = $ac_status" >&5
19048 (exit $ac_status); }; }; then
19049 cf_cv_func_curses_version=yes
19052 echo "$as_me: program exited with status $ac_status" >&5
19053 echo "$as_me: failed program was:" >&5
19054 cat conftest.$ac_ext >&5
19055 cf_cv_func_curses_version=no
19058 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19062 echo "$as_me:19062: result: $cf_cv_func_curses_version" >&5
19063 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
19064 test "$cf_cv_func_curses_version" = yes &&
19065 cat >>confdefs.h <<\EOF
19066 #define HAVE_CURSES_VERSION 1
19069 echo "$as_me:19069: checking for alternate character set array" >&5
19070 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
19071 if test "${cf_cv_curses_acs_map+set}" = set; then
19072 echo $ECHO_N "(cached) $ECHO_C" >&6
19075 cf_cv_curses_acs_map=unknown
19076 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
19078 cat >conftest.$ac_ext <<_ACEOF
19079 #line 19079 "configure"
19080 #include "confdefs.h"
19082 #include <${cf_cv_ncurses_header:-curses.h}>
19088 $name['k'] = ACS_PLUS
19094 rm -f conftest.$ac_objext conftest$ac_exeext
19095 if { (eval echo "$as_me:19095: \"$ac_link\"") >&5
19096 (eval $ac_link) 2>&5
19098 echo "$as_me:19098: \$? = $ac_status" >&5
19099 (exit $ac_status); } &&
19100 { ac_try='test -s conftest$ac_exeext'
19101 { (eval echo "$as_me:19101: \"$ac_try\"") >&5
19102 (eval $ac_try) 2>&5
19104 echo "$as_me:19104: \$? = $ac_status" >&5
19105 (exit $ac_status); }; }; then
19106 cf_cv_curses_acs_map=$name; break
19108 echo "$as_me: failed program was:" >&5
19109 cat conftest.$ac_ext >&5
19111 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19115 echo "$as_me:19115: result: $cf_cv_curses_acs_map" >&5
19116 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
19118 test "$cf_cv_curses_acs_map" != unknown &&
19119 cat >>confdefs.h <<EOF
19120 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
19123 if test "$cf_enable_widec" = yes; then
19125 echo "$as_me:19125: checking for wide alternate character set array" >&5
19126 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
19127 if test "${cf_cv_curses_wacs_map+set}" = set; then
19128 echo $ECHO_N "(cached) $ECHO_C" >&6
19131 cf_cv_curses_wacs_map=unknown
19132 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
19134 cat >conftest.$ac_ext <<_ACEOF
19135 #line 19135 "configure"
19136 #include "confdefs.h"
19138 #ifndef _XOPEN_SOURCE_EXTENDED
19139 #define _XOPEN_SOURCE_EXTENDED
19141 #include <${cf_cv_ncurses_header:-curses.h}>
19145 void *foo = &($name['k']); (void)foo
19150 rm -f conftest.$ac_objext conftest$ac_exeext
19151 if { (eval echo "$as_me:19151: \"$ac_link\"") >&5
19152 (eval $ac_link) 2>&5
19154 echo "$as_me:19154: \$? = $ac_status" >&5
19155 (exit $ac_status); } &&
19156 { ac_try='test -s conftest$ac_exeext'
19157 { (eval echo "$as_me:19157: \"$ac_try\"") >&5
19158 (eval $ac_try) 2>&5
19160 echo "$as_me:19160: \$? = $ac_status" >&5
19161 (exit $ac_status); }; }; then
19162 cf_cv_curses_wacs_map=$name
19165 echo "$as_me: failed program was:" >&5
19166 cat conftest.$ac_ext >&5
19168 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19171 echo "$as_me:19171: result: $cf_cv_curses_wacs_map" >&5
19172 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
19174 test "$cf_cv_curses_wacs_map" != unknown &&
19175 cat >>confdefs.h <<EOF
19176 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
19179 echo "$as_me:19179: checking for wide alternate character constants" >&5
19180 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
19181 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
19182 echo $ECHO_N "(cached) $ECHO_C" >&6
19185 cf_cv_curses_wacs_symbols=no
19186 if test "$cf_cv_curses_wacs_map" != unknown
19188 cat >conftest.$ac_ext <<_ACEOF
19189 #line 19189 "configure"
19190 #include "confdefs.h"
19192 #ifndef _XOPEN_SOURCE_EXTENDED
19193 #define _XOPEN_SOURCE_EXTENDED
19195 #include <${cf_cv_ncurses_header:-curses.h}>
19199 cchar_t *foo = WACS_PLUS;
19200 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS; (void)foo
19205 rm -f conftest.$ac_objext conftest$ac_exeext
19206 if { (eval echo "$as_me:19206: \"$ac_link\"") >&5
19207 (eval $ac_link) 2>&5
19209 echo "$as_me:19209: \$? = $ac_status" >&5
19210 (exit $ac_status); } &&
19211 { ac_try='test -s conftest$ac_exeext'
19212 { (eval echo "$as_me:19212: \"$ac_try\"") >&5
19213 (eval $ac_try) 2>&5
19215 echo "$as_me:19215: \$? = $ac_status" >&5
19216 (exit $ac_status); }; }; then
19217 cf_cv_curses_wacs_symbols=yes
19219 echo "$as_me: failed program was:" >&5
19220 cat conftest.$ac_ext >&5
19222 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19224 cat >conftest.$ac_ext <<_ACEOF
19225 #line 19225 "configure"
19226 #include "confdefs.h"
19228 #ifndef _XOPEN_SOURCE_EXTENDED
19229 #define _XOPEN_SOURCE_EXTENDED
19231 #include <${cf_cv_ncurses_header:-curses.h}>
19235 cchar_t *foo = WACS_PLUS; (void)foo
19240 rm -f conftest.$ac_objext conftest$ac_exeext
19241 if { (eval echo "$as_me:19241: \"$ac_link\"") >&5
19242 (eval $ac_link) 2>&5
19244 echo "$as_me:19244: \$? = $ac_status" >&5
19245 (exit $ac_status); } &&
19246 { ac_try='test -s conftest$ac_exeext'
19247 { (eval echo "$as_me:19247: \"$ac_try\"") >&5
19248 (eval $ac_try) 2>&5
19250 echo "$as_me:19250: \$? = $ac_status" >&5
19251 (exit $ac_status); }; }; then
19252 cf_cv_curses_wacs_symbols=yes
19254 echo "$as_me: failed program was:" >&5
19255 cat conftest.$ac_ext >&5
19257 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19261 echo "$as_me:19261: result: $cf_cv_curses_wacs_symbols" >&5
19262 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
19264 test "$cf_cv_curses_wacs_symbols" != no &&
19265 cat >>confdefs.h <<\EOF
19266 #define CURSES_WACS_SYMBOLS 1
19271 echo "$as_me:19271: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19272 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19273 cat >conftest.$ac_ext <<_ACEOF
19274 #line 19274 "configure"
19275 #include "confdefs.h"
19277 #ifndef _XOPEN_SOURCE_EXTENDED
19278 #define _XOPEN_SOURCE_EXTENDED
19280 #include <${cf_cv_ncurses_header:-curses.h}>
19291 rm -f conftest.$ac_objext
19292 if { (eval echo "$as_me:19292: \"$ac_compile\"") >&5
19293 (eval $ac_compile) 2>&5
19295 echo "$as_me:19295: \$? = $ac_status" >&5
19296 (exit $ac_status); } &&
19297 { ac_try='test -s conftest.$ac_objext'
19298 { (eval echo "$as_me:19298: \"$ac_try\"") >&5
19299 (eval $ac_try) 2>&5
19301 echo "$as_me:19301: \$? = $ac_status" >&5
19302 (exit $ac_status); }; }; then
19305 echo "$as_me: failed program was:" >&5
19306 cat conftest.$ac_ext >&5
19309 rm -f conftest.$ac_objext conftest.$ac_ext
19310 echo "$as_me:19310: result: $cf_result" >&5
19311 echo "${ECHO_T}$cf_result" >&6
19312 if test $cf_result = yes ; then
19314 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19316 cat >>confdefs.h <<EOF
19317 #define $cf_result 1
19322 cat >>confdefs.h <<EOF
19323 #define attr_t long
19328 if test "$cf_enable_widec" = yes; then
19330 # This is needed on Tru64 5.0 to declare mbstate_t
19331 echo "$as_me:19331: checking if we must include wchar.h to declare mbstate_t" >&5
19332 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
19333 if test "${cf_cv_mbstate_t+set}" = set; then
19334 echo $ECHO_N "(cached) $ECHO_C" >&6
19337 cat >conftest.$ac_ext <<_ACEOF
19338 #line 19338 "configure"
19339 #include "confdefs.h"
19341 #include <stdlib.h>
19342 #include <stdarg.h>
19344 #ifdef HAVE_LIBUTF8_H
19345 #include <libutf8.h>
19355 rm -f conftest.$ac_objext
19356 if { (eval echo "$as_me:19356: \"$ac_compile\"") >&5
19357 (eval $ac_compile) 2>&5
19359 echo "$as_me:19359: \$? = $ac_status" >&5
19360 (exit $ac_status); } &&
19361 { ac_try='test -s conftest.$ac_objext'
19362 { (eval echo "$as_me:19362: \"$ac_try\"") >&5
19363 (eval $ac_try) 2>&5
19365 echo "$as_me:19365: \$? = $ac_status" >&5
19366 (exit $ac_status); }; }; then
19369 echo "$as_me: failed program was:" >&5
19370 cat conftest.$ac_ext >&5
19371 cat >conftest.$ac_ext <<_ACEOF
19372 #line 19372 "configure"
19373 #include "confdefs.h"
19375 #include <stdlib.h>
19376 #include <stdarg.h>
19379 #ifdef HAVE_LIBUTF8_H
19380 #include <libutf8.h>
19390 rm -f conftest.$ac_objext
19391 if { (eval echo "$as_me:19391: \"$ac_compile\"") >&5
19392 (eval $ac_compile) 2>&5
19394 echo "$as_me:19394: \$? = $ac_status" >&5
19395 (exit $ac_status); } &&
19396 { ac_try='test -s conftest.$ac_objext'
19397 { (eval echo "$as_me:19397: \"$ac_try\"") >&5
19398 (eval $ac_try) 2>&5
19400 echo "$as_me:19400: \$? = $ac_status" >&5
19401 (exit $ac_status); }; }; then
19402 cf_cv_mbstate_t=yes
19404 echo "$as_me: failed program was:" >&5
19405 cat conftest.$ac_ext >&5
19406 cf_cv_mbstate_t=unknown
19408 rm -f conftest.$ac_objext conftest.$ac_ext
19410 rm -f conftest.$ac_objext conftest.$ac_ext
19412 echo "$as_me:19412: result: $cf_cv_mbstate_t" >&5
19413 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
19415 if test "$cf_cv_mbstate_t" = yes ; then
19417 cat >>confdefs.h <<\EOF
19418 #define NEED_WCHAR_H 1
19424 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
19425 if test "$cf_cv_mbstate_t" = unknown ; then
19426 NCURSES_MBSTATE_T=1
19429 # if we find mbstate_t in either place, use substitution to provide a fallback.
19430 if test "$cf_cv_mbstate_t" != unknown ; then
19431 NCURSES_OK_MBSTATE_T=1
19434 # This is needed on Tru64 5.0 to declare wchar_t
19435 echo "$as_me:19435: checking if we must include wchar.h to declare wchar_t" >&5
19436 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
19437 if test "${cf_cv_wchar_t+set}" = set; then
19438 echo $ECHO_N "(cached) $ECHO_C" >&6
19441 cat >conftest.$ac_ext <<_ACEOF
19442 #line 19442 "configure"
19443 #include "confdefs.h"
19445 #include <stdlib.h>
19446 #include <stdarg.h>
19448 #ifdef HAVE_LIBUTF8_H
19449 #include <libutf8.h>
19459 rm -f conftest.$ac_objext
19460 if { (eval echo "$as_me:19460: \"$ac_compile\"") >&5
19461 (eval $ac_compile) 2>&5
19463 echo "$as_me:19463: \$? = $ac_status" >&5
19464 (exit $ac_status); } &&
19465 { ac_try='test -s conftest.$ac_objext'
19466 { (eval echo "$as_me:19466: \"$ac_try\"") >&5
19467 (eval $ac_try) 2>&5
19469 echo "$as_me:19469: \$? = $ac_status" >&5
19470 (exit $ac_status); }; }; then
19473 echo "$as_me: failed program was:" >&5
19474 cat conftest.$ac_ext >&5
19475 cat >conftest.$ac_ext <<_ACEOF
19476 #line 19476 "configure"
19477 #include "confdefs.h"
19479 #include <stdlib.h>
19480 #include <stdarg.h>
19483 #ifdef HAVE_LIBUTF8_H
19484 #include <libutf8.h>
19494 rm -f conftest.$ac_objext
19495 if { (eval echo "$as_me:19495: \"$ac_compile\"") >&5
19496 (eval $ac_compile) 2>&5
19498 echo "$as_me:19498: \$? = $ac_status" >&5
19499 (exit $ac_status); } &&
19500 { ac_try='test -s conftest.$ac_objext'
19501 { (eval echo "$as_me:19501: \"$ac_try\"") >&5
19502 (eval $ac_try) 2>&5
19504 echo "$as_me:19504: \$? = $ac_status" >&5
19505 (exit $ac_status); }; }; then
19508 echo "$as_me: failed program was:" >&5
19509 cat conftest.$ac_ext >&5
19510 cf_cv_wchar_t=unknown
19512 rm -f conftest.$ac_objext conftest.$ac_ext
19514 rm -f conftest.$ac_objext conftest.$ac_ext
19516 echo "$as_me:19516: result: $cf_cv_wchar_t" >&5
19517 echo "${ECHO_T}$cf_cv_wchar_t" >&6
19519 if test "$cf_cv_wchar_t" = yes ; then
19521 cat >>confdefs.h <<\EOF
19522 #define NEED_WCHAR_H 1
19528 # if we do not find wchar_t in either place, use substitution to provide a fallback.
19529 if test "$cf_cv_wchar_t" = unknown ; then
19533 # if we find wchar_t in either place, use substitution to provide a fallback.
19534 if test "$cf_cv_wchar_t" != unknown ; then
19535 NCURSES_OK_WCHAR_T=1
19538 # This is needed on Tru64 5.0 to declare wint_t
19539 echo "$as_me:19539: checking if we must include wchar.h to declare wint_t" >&5
19540 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
19541 if test "${cf_cv_wint_t+set}" = set; then
19542 echo $ECHO_N "(cached) $ECHO_C" >&6
19545 cat >conftest.$ac_ext <<_ACEOF
19546 #line 19546 "configure"
19547 #include "confdefs.h"
19549 #include <stdlib.h>
19550 #include <stdarg.h>
19552 #ifdef HAVE_LIBUTF8_H
19553 #include <libutf8.h>
19563 rm -f conftest.$ac_objext
19564 if { (eval echo "$as_me:19564: \"$ac_compile\"") >&5
19565 (eval $ac_compile) 2>&5
19567 echo "$as_me:19567: \$? = $ac_status" >&5
19568 (exit $ac_status); } &&
19569 { ac_try='test -s conftest.$ac_objext'
19570 { (eval echo "$as_me:19570: \"$ac_try\"") >&5
19571 (eval $ac_try) 2>&5
19573 echo "$as_me:19573: \$? = $ac_status" >&5
19574 (exit $ac_status); }; }; then
19577 echo "$as_me: failed program was:" >&5
19578 cat conftest.$ac_ext >&5
19579 cat >conftest.$ac_ext <<_ACEOF
19580 #line 19580 "configure"
19581 #include "confdefs.h"
19583 #include <stdlib.h>
19584 #include <stdarg.h>
19587 #ifdef HAVE_LIBUTF8_H
19588 #include <libutf8.h>
19598 rm -f conftest.$ac_objext
19599 if { (eval echo "$as_me:19599: \"$ac_compile\"") >&5
19600 (eval $ac_compile) 2>&5
19602 echo "$as_me:19602: \$? = $ac_status" >&5
19603 (exit $ac_status); } &&
19604 { ac_try='test -s conftest.$ac_objext'
19605 { (eval echo "$as_me:19605: \"$ac_try\"") >&5
19606 (eval $ac_try) 2>&5
19608 echo "$as_me:19608: \$? = $ac_status" >&5
19609 (exit $ac_status); }; }; then
19612 echo "$as_me: failed program was:" >&5
19613 cat conftest.$ac_ext >&5
19614 cf_cv_wint_t=unknown
19616 rm -f conftest.$ac_objext conftest.$ac_ext
19618 rm -f conftest.$ac_objext conftest.$ac_ext
19620 echo "$as_me:19620: result: $cf_cv_wint_t" >&5
19621 echo "${ECHO_T}$cf_cv_wint_t" >&6
19623 if test "$cf_cv_wint_t" = yes ; then
19625 cat >>confdefs.h <<\EOF
19626 #define NEED_WCHAR_H 1
19632 # if we do not find wint_t in either place, use substitution to provide a fallback.
19633 if test "$cf_cv_wint_t" = unknown ; then
19637 # if we find wint_t in either place, use substitution to provide a fallback.
19638 if test "$cf_cv_wint_t" != unknown ; then
19639 NCURSES_OK_WINT_T=1
19642 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
19644 echo "$as_me:19644: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19645 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19646 cat >conftest.$ac_ext <<_ACEOF
19647 #line 19647 "configure"
19648 #include "confdefs.h"
19650 #ifndef _XOPEN_SOURCE_EXTENDED
19651 #define _XOPEN_SOURCE_EXTENDED
19653 #include <${cf_cv_ncurses_header:-curses.h}>
19664 rm -f conftest.$ac_objext
19665 if { (eval echo "$as_me:19665: \"$ac_compile\"") >&5
19666 (eval $ac_compile) 2>&5
19668 echo "$as_me:19668: \$? = $ac_status" >&5
19669 (exit $ac_status); } &&
19670 { ac_try='test -s conftest.$ac_objext'
19671 { (eval echo "$as_me:19671: \"$ac_try\"") >&5
19672 (eval $ac_try) 2>&5
19674 echo "$as_me:19674: \$? = $ac_status" >&5
19675 (exit $ac_status); }; }; then
19678 echo "$as_me: failed program was:" >&5
19679 cat conftest.$ac_ext >&5
19682 rm -f conftest.$ac_objext conftest.$ac_ext
19683 echo "$as_me:19683: result: $cf_result" >&5
19684 echo "${ECHO_T}$cf_result" >&6
19685 if test $cf_result = yes ; then
19687 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19689 cat >>confdefs.h <<EOF
19690 #define $cf_result 1
19695 cat >>confdefs.h <<EOF
19696 #define mbstate_t long
19703 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
19705 echo "$as_me:19705: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19706 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19707 cat >conftest.$ac_ext <<_ACEOF
19708 #line 19708 "configure"
19709 #include "confdefs.h"
19711 #ifndef _XOPEN_SOURCE_EXTENDED
19712 #define _XOPEN_SOURCE_EXTENDED
19714 #include <${cf_cv_ncurses_header:-curses.h}>
19725 rm -f conftest.$ac_objext
19726 if { (eval echo "$as_me:19726: \"$ac_compile\"") >&5
19727 (eval $ac_compile) 2>&5
19729 echo "$as_me:19729: \$? = $ac_status" >&5
19730 (exit $ac_status); } &&
19731 { ac_try='test -s conftest.$ac_objext'
19732 { (eval echo "$as_me:19732: \"$ac_try\"") >&5
19733 (eval $ac_try) 2>&5
19735 echo "$as_me:19735: \$? = $ac_status" >&5
19736 (exit $ac_status); }; }; then
19739 echo "$as_me: failed program was:" >&5
19740 cat conftest.$ac_ext >&5
19743 rm -f conftest.$ac_objext conftest.$ac_ext
19744 echo "$as_me:19744: result: $cf_result" >&5
19745 echo "${ECHO_T}$cf_result" >&6
19746 if test $cf_result = yes ; then
19748 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19750 cat >>confdefs.h <<EOF
19751 #define $cf_result 1
19756 cat >>confdefs.h <<EOF
19757 #define wchar_t long
19764 if test "$NCURSES_OK_WINT_T" = 0 ; then
19766 echo "$as_me:19766: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19767 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19768 cat >conftest.$ac_ext <<_ACEOF
19769 #line 19769 "configure"
19770 #include "confdefs.h"
19772 #ifndef _XOPEN_SOURCE_EXTENDED
19773 #define _XOPEN_SOURCE_EXTENDED
19775 #include <${cf_cv_ncurses_header:-curses.h}>
19786 rm -f conftest.$ac_objext
19787 if { (eval echo "$as_me:19787: \"$ac_compile\"") >&5
19788 (eval $ac_compile) 2>&5
19790 echo "$as_me:19790: \$? = $ac_status" >&5
19791 (exit $ac_status); } &&
19792 { ac_try='test -s conftest.$ac_objext'
19793 { (eval echo "$as_me:19793: \"$ac_try\"") >&5
19794 (eval $ac_try) 2>&5
19796 echo "$as_me:19796: \$? = $ac_status" >&5
19797 (exit $ac_status); }; }; then
19800 echo "$as_me: failed program was:" >&5
19801 cat conftest.$ac_ext >&5
19804 rm -f conftest.$ac_objext conftest.$ac_ext
19805 echo "$as_me:19805: result: $cf_result" >&5
19806 echo "${ECHO_T}$cf_result" >&6
19807 if test $cf_result = yes ; then
19809 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19811 cat >>confdefs.h <<EOF
19812 #define $cf_result 1
19817 cat >>confdefs.h <<EOF
19818 #define wint_t long
19834 echo "$as_me:19834: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
19835 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19837 cat >conftest.$ac_ext <<_ACEOF
19838 #line 19838 "configure"
19839 #include "confdefs.h"
19841 #ifdef HAVE_XCURSES
19842 #include <xcurses.h>
19843 char * XCursesProgramName = "test";
19845 #include <${cf_cv_ncurses_header:-curses.h}>
19846 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19847 #include <ncursesw/term.h>
19848 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19849 #include <ncurses/term.h>
19850 #elif defined(HAVE_TERM_H)
19859 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
19860 const void *foo = (const void *)($cf_data);
19862 const void *foo = &($cf_data);
19864 fprintf(stderr, "testing linkage of $cf_data:%p\n", (const void *)foo);
19870 rm -f conftest.$ac_objext
19871 if { (eval echo "$as_me:19871: \"$ac_compile\"") >&5
19872 (eval $ac_compile) 2>&5
19874 echo "$as_me:19874: \$? = $ac_status" >&5
19875 (exit $ac_status); } &&
19876 { ac_try='test -s conftest.$ac_objext'
19877 { (eval echo "$as_me:19877: \"$ac_try\"") >&5
19878 (eval $ac_try) 2>&5
19880 echo "$as_me:19880: \$? = $ac_status" >&5
19881 (exit $ac_status); }; }; then
19885 echo "$as_me: failed program was:" >&5
19886 cat conftest.$ac_ext >&5
19889 rm -f conftest.$ac_objext conftest.$ac_ext
19890 echo "$as_me:19890: result: $cf_result" >&5
19891 echo "${ECHO_T}$cf_result" >&6
19893 if test $cf_result = yes ; then
19895 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19897 cat >>confdefs.h <<EOF
19898 #define $cf_result 1
19902 echo "$as_me:19902: checking for data $cf_data in library" >&5
19903 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
19904 # BSD linkers insist on making weak linkage, but resolve at runtime.
19905 if test "$cross_compiling" = yes; then
19908 cat >conftest.$ac_ext <<_ACEOF
19909 #line 19909 "configure"
19910 #include "confdefs.h"
19912 #ifdef HAVE_XCURSES
19913 #include <xcurses.h>
19914 char * XCursesProgramName = "test";
19916 #include <${cf_cv_ncurses_header:-curses.h}>
19917 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19918 #include <ncursesw/term.h>
19919 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19920 #include <ncurses/term.h>
19921 #elif defined(HAVE_TERM_H)
19926 extern char $cf_data;
19933 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
19934 const void *foo = (const void *)($cf_data);
19936 const void *foo = &($cf_data);
19938 fprintf(stderr, "testing linkage of $cf_data:%p\n", (const void *)foo);
19940 ${cf_cv_main_return:-return}(foo == 0);
19947 rm -f conftest.$ac_objext conftest$ac_exeext
19948 if { (eval echo "$as_me:19948: \"$ac_link\"") >&5
19949 (eval $ac_link) 2>&5
19951 echo "$as_me:19951: \$? = $ac_status" >&5
19952 (exit $ac_status); } &&
19953 { ac_try='test -s conftest$ac_exeext'
19954 { (eval echo "$as_me:19954: \"$ac_try\"") >&5
19955 (eval $ac_try) 2>&5
19957 echo "$as_me:19957: \$? = $ac_status" >&5
19958 (exit $ac_status); }; }; then
19961 echo "$as_me: failed program was:" >&5
19962 cat conftest.$ac_ext >&5
19965 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19968 cat >conftest.$ac_ext <<_ACEOF
19969 #line 19969 "configure"
19970 #include "confdefs.h"
19972 #ifdef HAVE_XCURSES
19973 #include <xcurses.h>
19974 char * XCursesProgramName = "test";
19976 #include <${cf_cv_ncurses_header:-curses.h}>
19977 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19978 #include <ncursesw/term.h>
19979 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19980 #include <ncurses/term.h>
19981 #elif defined(HAVE_TERM_H)
19986 extern char $cf_data;
19990 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
19991 const void *foo = (const void *)($cf_data);
19993 const void *foo = &($cf_data);
19995 fprintf(stderr, "testing linkage of $cf_data:%p\n", (const void *)foo);
19997 ${cf_cv_main_return:-return}(foo == 0);
20000 rm -f conftest$ac_exeext
20001 if { (eval echo "$as_me:20001: \"$ac_link\"") >&5
20002 (eval $ac_link) 2>&5
20004 echo "$as_me:20004: \$? = $ac_status" >&5
20005 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20006 { (eval echo "$as_me:20006: \"$ac_try\"") >&5
20007 (eval $ac_try) 2>&5
20009 echo "$as_me:20009: \$? = $ac_status" >&5
20010 (exit $ac_status); }; }; then
20014 echo "$as_me: program exited with status $ac_status" >&5
20015 echo "$as_me: failed program was:" >&5
20016 cat conftest.$ac_ext >&5
20019 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20021 echo "$as_me:20021: result: $cf_result" >&5
20022 echo "${ECHO_T}$cf_result" >&6
20023 if test $cf_result = yes ; then
20025 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20027 cat >>confdefs.h <<EOF
20028 #define $cf_result 1
20031 # do not exit loop here, since we prefer system's declarations
20036 if test -n "$with_screen" && test "x$with_screen" = "xpdcurses"
20038 echo "$as_me:20038: checking for X" >&5
20039 echo $ECHO_N "checking for X... $ECHO_C" >&6
20041 # Check whether --with-x or --without-x was given.
20042 if test "${with_x+set}" = set; then
20046 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
20047 if test "x$with_x" = xno; then
20048 # The user explicitly disabled X.
20051 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
20052 # Both variables are already set.
20055 if test "${ac_cv_have_x+set}" = set; then
20056 echo $ECHO_N "(cached) $ECHO_C" >&6
20058 # One or both of the vars are not set, and there is no cached value.
20059 ac_x_includes=no ac_x_libraries=no
20060 rm -fr conftest.dir
20061 if mkdir conftest.dir; then
20063 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
20064 cat >Imakefile <<'EOF'
20066 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
20068 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
20069 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
20070 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
20071 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
20072 for ac_extension in a so sl dylib dll; do
20073 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
20074 test -f $ac_im_libdir/libX11.$ac_extension; then
20075 ac_im_usrlibdir=$ac_im_libdir; break
20078 # Screen out bogus values from the imake configuration. They are
20079 # bogus both because they are the default anyway, and because
20080 # using them would break gcc on systems where it needs fixed includes.
20081 case $ac_im_incroot in
20083 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
20085 case $ac_im_usrlibdir in
20086 /usr/lib | /lib) ;;
20087 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
20091 rm -fr conftest.dir
20094 # Standard set of common directories for X headers.
20095 # Check X11 before X11Rn because it is often a symlink to the current release.
20112 /usr/local/X11/include
20113 /usr/local/X11R7/include
20114 /usr/local/X11R6/include
20115 /usr/local/X11R5/include
20116 /usr/local/X11R4/include
20118 /usr/local/include/X11
20119 /usr/local/include/X11R7
20120 /usr/local/include/X11R6
20121 /usr/local/include/X11R5
20122 /usr/local/include/X11R4
20126 /usr/XFree86/include/X11
20130 /usr/unsupported/include
20131 /usr/athena/include
20132 /usr/local/x11r5/include
20133 /usr/lpp/Xamples/include
20135 /usr/openwin/include
20136 /usr/openwin/share/include'
20138 if test "$ac_x_includes" = no; then
20139 # Guess where to find include files, by looking for Intrinsic.h.
20140 # First, try using that file with no special directory specified.
20141 cat >conftest.$ac_ext <<_ACEOF
20142 #line 20142 "configure"
20143 #include "confdefs.h"
20144 #include <X11/Intrinsic.h>
20146 if { (eval echo "$as_me:20146: \"$ac_cpp conftest.$ac_ext\"") >&5
20147 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20149 egrep -v '^ *\+' conftest.er1 >conftest.err
20151 cat conftest.err >&5
20152 echo "$as_me:20152: \$? = $ac_status" >&5
20153 (exit $ac_status); } >/dev/null; then
20154 if test -s conftest.err; then
20155 ac_cpp_err=$ac_c_preproc_warn_flag
20162 if test -z "$ac_cpp_err"; then
20163 # We can compile using X headers with no special include directory.
20166 echo "$as_me: failed program was:" >&5
20167 cat conftest.$ac_ext >&5
20168 for ac_dir in $ac_x_header_dirs; do
20169 if test -r "$ac_dir/X11/Intrinsic.h"; then
20170 ac_x_includes=$ac_dir
20175 rm -f conftest.err conftest.$ac_ext
20176 fi # $ac_x_includes = no
20178 if test "$ac_x_libraries" = no; then
20179 # Check for the libraries.
20180 # See if we find them without any special options.
20181 # Don't add to $LIBS permanently.
20184 cat >conftest.$ac_ext <<_ACEOF
20185 #line 20185 "configure"
20186 #include "confdefs.h"
20187 #include <X11/Intrinsic.h>
20196 rm -f conftest.$ac_objext conftest$ac_exeext
20197 if { (eval echo "$as_me:20197: \"$ac_link\"") >&5
20198 (eval $ac_link) 2>&5
20200 echo "$as_me:20200: \$? = $ac_status" >&5
20201 (exit $ac_status); } &&
20202 { ac_try='test -s conftest$ac_exeext'
20203 { (eval echo "$as_me:20203: \"$ac_try\"") >&5
20204 (eval $ac_try) 2>&5
20206 echo "$as_me:20206: \$? = $ac_status" >&5
20207 (exit $ac_status); }; }; then
20209 # We can link X programs with no special library path.
20212 echo "$as_me: failed program was:" >&5
20213 cat conftest.$ac_ext >&5
20215 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
20217 # Don't even attempt the hair of trying to link an X program!
20218 for ac_extension in a so sl dylib dll; do
20219 if test -r $ac_dir/libXt.$ac_extension; then
20220 ac_x_libraries=$ac_dir
20226 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20227 fi # $ac_x_libraries = no
20229 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
20230 # Didn't find X anywhere. Cache the known absence of X.
20231 ac_cv_have_x="have_x=no"
20233 # Record where we found X for the cache.
20234 ac_cv_have_x="have_x=yes \
20235 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
20240 eval "$ac_cv_have_x"
20243 if test "$have_x" != yes; then
20244 echo "$as_me:20244: result: $have_x" >&5
20245 echo "${ECHO_T}$have_x" >&6
20248 # If each of the values was on the command line, it overrides each guess.
20249 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
20250 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
20251 # Update the cache value to reflect the command line values.
20252 ac_cv_have_x="have_x=yes \
20253 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
20254 echo "$as_me:20254: result: libraries $x_libraries, headers $x_includes" >&5
20255 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
20258 if test "$no_x" = yes; then
20259 # Not all programs may use this symbol, but it does not hurt to define it.
20261 cat >>confdefs.h <<\EOF
20262 #define X_DISPLAY_MISSING 1
20265 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
20267 if test -n "$x_includes"; then
20268 X_CFLAGS="$X_CFLAGS -I$x_includes"
20271 # It would also be nice to do this for all -L options, not just this one.
20272 if test -n "$x_libraries"; then
20273 X_LIBS="$X_LIBS -L$x_libraries"
20274 # For Solaris; some versions of Sun CC require a space after -R and
20275 # others require no space. Words are not sufficient . . . .
20276 case `(uname -sr) 2>/dev/null` in
20278 echo "$as_me:20278: checking whether -R must be followed by a space" >&5
20279 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
20280 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
20281 cat >conftest.$ac_ext <<_ACEOF
20282 #line 20282 "configure"
20283 #include "confdefs.h"
20293 rm -f conftest.$ac_objext conftest$ac_exeext
20294 if { (eval echo "$as_me:20294: \"$ac_link\"") >&5
20295 (eval $ac_link) 2>&5
20297 echo "$as_me:20297: \$? = $ac_status" >&5
20298 (exit $ac_status); } &&
20299 { ac_try='test -s conftest$ac_exeext'
20300 { (eval echo "$as_me:20300: \"$ac_try\"") >&5
20301 (eval $ac_try) 2>&5
20303 echo "$as_me:20303: \$? = $ac_status" >&5
20304 (exit $ac_status); }; }; then
20307 echo "$as_me: failed program was:" >&5
20308 cat conftest.$ac_ext >&5
20311 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20312 if test $ac_R_nospace = yes; then
20313 echo "$as_me:20313: result: no" >&5
20314 echo "${ECHO_T}no" >&6
20315 X_LIBS="$X_LIBS -R$x_libraries"
20317 LIBS="$ac_xsave_LIBS -R $x_libraries"
20318 cat >conftest.$ac_ext <<_ACEOF
20319 #line 20319 "configure"
20320 #include "confdefs.h"
20330 rm -f conftest.$ac_objext conftest$ac_exeext
20331 if { (eval echo "$as_me:20331: \"$ac_link\"") >&5
20332 (eval $ac_link) 2>&5
20334 echo "$as_me:20334: \$? = $ac_status" >&5
20335 (exit $ac_status); } &&
20336 { ac_try='test -s conftest$ac_exeext'
20337 { (eval echo "$as_me:20337: \"$ac_try\"") >&5
20338 (eval $ac_try) 2>&5
20340 echo "$as_me:20340: \$? = $ac_status" >&5
20341 (exit $ac_status); }; }; then
20344 echo "$as_me: failed program was:" >&5
20345 cat conftest.$ac_ext >&5
20348 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20349 if test $ac_R_space = yes; then
20350 echo "$as_me:20350: result: yes" >&5
20351 echo "${ECHO_T}yes" >&6
20352 X_LIBS="$X_LIBS -R $x_libraries"
20354 echo "$as_me:20354: result: neither works" >&5
20355 echo "${ECHO_T}neither works" >&6
20358 LIBS=$ac_xsave_LIBS
20362 # Check for system-dependent libraries X programs must link with.
20363 # Do this before checking for the system-independent R6 libraries
20364 # (-lICE), since we may need -lsocket or whatever for X linking.
20366 if test "$ISC" = yes; then
20367 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
20369 # Martyn Johnson says this is needed for Ultrix, if the X
20370 # libraries were built with DECnet support. And Karl Berry says
20371 # the Alpha needs dnet_stub (dnet does not exist).
20372 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
20373 cat >conftest.$ac_ext <<_ACEOF
20374 #line 20374 "configure"
20375 #include "confdefs.h"
20377 /* Override any gcc2 internal prototype to avoid an error. */
20381 /* We use char because int might match the return type of a gcc2
20382 builtin and then its argument prototype would still apply. */
20383 char XOpenDisplay ();
20392 rm -f conftest.$ac_objext conftest$ac_exeext
20393 if { (eval echo "$as_me:20393: \"$ac_link\"") >&5
20394 (eval $ac_link) 2>&5
20396 echo "$as_me:20396: \$? = $ac_status" >&5
20397 (exit $ac_status); } &&
20398 { ac_try='test -s conftest$ac_exeext'
20399 { (eval echo "$as_me:20399: \"$ac_try\"") >&5
20400 (eval $ac_try) 2>&5
20402 echo "$as_me:20402: \$? = $ac_status" >&5
20403 (exit $ac_status); }; }; then
20406 echo "$as_me: failed program was:" >&5
20407 cat conftest.$ac_ext >&5
20408 echo "$as_me:20408: checking for dnet_ntoa in -ldnet" >&5
20409 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
20410 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
20411 echo $ECHO_N "(cached) $ECHO_C" >&6
20413 ac_check_lib_save_LIBS=$LIBS
20414 LIBS="-ldnet $LIBS"
20415 cat >conftest.$ac_ext <<_ACEOF
20416 #line 20416 "configure"
20417 #include "confdefs.h"
20419 /* Override any gcc2 internal prototype to avoid an error. */
20423 /* We use char because int might match the return type of a gcc2
20424 builtin and then its argument prototype would still apply. */
20434 rm -f conftest.$ac_objext conftest$ac_exeext
20435 if { (eval echo "$as_me:20435: \"$ac_link\"") >&5
20436 (eval $ac_link) 2>&5
20438 echo "$as_me:20438: \$? = $ac_status" >&5
20439 (exit $ac_status); } &&
20440 { ac_try='test -s conftest$ac_exeext'
20441 { (eval echo "$as_me:20441: \"$ac_try\"") >&5
20442 (eval $ac_try) 2>&5
20444 echo "$as_me:20444: \$? = $ac_status" >&5
20445 (exit $ac_status); }; }; then
20446 ac_cv_lib_dnet_dnet_ntoa=yes
20448 echo "$as_me: failed program was:" >&5
20449 cat conftest.$ac_ext >&5
20450 ac_cv_lib_dnet_dnet_ntoa=no
20452 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20453 LIBS=$ac_check_lib_save_LIBS
20455 echo "$as_me:20455: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
20456 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
20457 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
20458 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
20461 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
20462 echo "$as_me:20462: checking for dnet_ntoa in -ldnet_stub" >&5
20463 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
20464 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
20465 echo $ECHO_N "(cached) $ECHO_C" >&6
20467 ac_check_lib_save_LIBS=$LIBS
20468 LIBS="-ldnet_stub $LIBS"
20469 cat >conftest.$ac_ext <<_ACEOF
20470 #line 20470 "configure"
20471 #include "confdefs.h"
20473 /* Override any gcc2 internal prototype to avoid an error. */
20477 /* We use char because int might match the return type of a gcc2
20478 builtin and then its argument prototype would still apply. */
20488 rm -f conftest.$ac_objext conftest$ac_exeext
20489 if { (eval echo "$as_me:20489: \"$ac_link\"") >&5
20490 (eval $ac_link) 2>&5
20492 echo "$as_me:20492: \$? = $ac_status" >&5
20493 (exit $ac_status); } &&
20494 { ac_try='test -s conftest$ac_exeext'
20495 { (eval echo "$as_me:20495: \"$ac_try\"") >&5
20496 (eval $ac_try) 2>&5
20498 echo "$as_me:20498: \$? = $ac_status" >&5
20499 (exit $ac_status); }; }; then
20500 ac_cv_lib_dnet_stub_dnet_ntoa=yes
20502 echo "$as_me: failed program was:" >&5
20503 cat conftest.$ac_ext >&5
20504 ac_cv_lib_dnet_stub_dnet_ntoa=no
20506 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20507 LIBS=$ac_check_lib_save_LIBS
20509 echo "$as_me:20509: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
20510 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
20511 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
20512 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
20517 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20518 LIBS="$ac_xsave_LIBS"
20520 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
20521 # to get the SysV transport functions.
20522 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
20524 # The nsl library prevents programs from opening the X display
20525 # on Irix 5.2, according to T.E. Dickey.
20526 # The functions gethostbyname, getservbyname, and inet_addr are
20527 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
20528 echo "$as_me:20528: checking for gethostbyname" >&5
20529 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
20530 if test "${ac_cv_func_gethostbyname+set}" = set; then
20531 echo $ECHO_N "(cached) $ECHO_C" >&6
20533 cat >conftest.$ac_ext <<_ACEOF
20534 #line 20534 "configure"
20535 #include "confdefs.h"
20536 #define gethostbyname autoconf_temporary
20537 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
20538 #undef gethostbyname
20544 /* We use char because int might match the return type of a gcc2
20545 builtin and then its argument prototype would still apply. */
20546 char gethostbyname (void);
20552 /* The GNU C library defines stubs for functions which it implements
20553 to always fail with ENOSYS. Some functions are actually named
20554 something starting with __ and the normal name is an alias. */
20555 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
20556 #error found stub for gethostbyname
20559 return gethostbyname ();
20564 rm -f conftest.$ac_objext conftest$ac_exeext
20565 if { (eval echo "$as_me:20565: \"$ac_link\"") >&5
20566 (eval $ac_link) 2>&5
20568 echo "$as_me:20568: \$? = $ac_status" >&5
20569 (exit $ac_status); } &&
20570 { ac_try='test -s conftest$ac_exeext'
20571 { (eval echo "$as_me:20571: \"$ac_try\"") >&5
20572 (eval $ac_try) 2>&5
20574 echo "$as_me:20574: \$? = $ac_status" >&5
20575 (exit $ac_status); }; }; then
20576 ac_cv_func_gethostbyname=yes
20578 echo "$as_me: failed program was:" >&5
20579 cat conftest.$ac_ext >&5
20580 ac_cv_func_gethostbyname=no
20582 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20584 echo "$as_me:20584: result: $ac_cv_func_gethostbyname" >&5
20585 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
20587 if test $ac_cv_func_gethostbyname = no; then
20588 echo "$as_me:20588: checking for gethostbyname in -lnsl" >&5
20589 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
20590 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
20591 echo $ECHO_N "(cached) $ECHO_C" >&6
20593 ac_check_lib_save_LIBS=$LIBS
20595 cat >conftest.$ac_ext <<_ACEOF
20596 #line 20596 "configure"
20597 #include "confdefs.h"
20599 /* Override any gcc2 internal prototype to avoid an error. */
20603 /* We use char because int might match the return type of a gcc2
20604 builtin and then its argument prototype would still apply. */
20605 char gethostbyname ();
20614 rm -f conftest.$ac_objext conftest$ac_exeext
20615 if { (eval echo "$as_me:20615: \"$ac_link\"") >&5
20616 (eval $ac_link) 2>&5
20618 echo "$as_me:20618: \$? = $ac_status" >&5
20619 (exit $ac_status); } &&
20620 { ac_try='test -s conftest$ac_exeext'
20621 { (eval echo "$as_me:20621: \"$ac_try\"") >&5
20622 (eval $ac_try) 2>&5
20624 echo "$as_me:20624: \$? = $ac_status" >&5
20625 (exit $ac_status); }; }; then
20626 ac_cv_lib_nsl_gethostbyname=yes
20628 echo "$as_me: failed program was:" >&5
20629 cat conftest.$ac_ext >&5
20630 ac_cv_lib_nsl_gethostbyname=no
20632 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20633 LIBS=$ac_check_lib_save_LIBS
20635 echo "$as_me:20635: result: $ac_cv_lib_nsl_gethostbyname" >&5
20636 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
20637 if test $ac_cv_lib_nsl_gethostbyname = yes; then
20638 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
20641 if test $ac_cv_lib_nsl_gethostbyname = no; then
20642 echo "$as_me:20642: checking for gethostbyname in -lbsd" >&5
20643 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
20644 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
20645 echo $ECHO_N "(cached) $ECHO_C" >&6
20647 ac_check_lib_save_LIBS=$LIBS
20649 cat >conftest.$ac_ext <<_ACEOF
20650 #line 20650 "configure"
20651 #include "confdefs.h"
20653 /* Override any gcc2 internal prototype to avoid an error. */
20657 /* We use char because int might match the return type of a gcc2
20658 builtin and then its argument prototype would still apply. */
20659 char gethostbyname ();
20668 rm -f conftest.$ac_objext conftest$ac_exeext
20669 if { (eval echo "$as_me:20669: \"$ac_link\"") >&5
20670 (eval $ac_link) 2>&5
20672 echo "$as_me:20672: \$? = $ac_status" >&5
20673 (exit $ac_status); } &&
20674 { ac_try='test -s conftest$ac_exeext'
20675 { (eval echo "$as_me:20675: \"$ac_try\"") >&5
20676 (eval $ac_try) 2>&5
20678 echo "$as_me:20678: \$? = $ac_status" >&5
20679 (exit $ac_status); }; }; then
20680 ac_cv_lib_bsd_gethostbyname=yes
20682 echo "$as_me: failed program was:" >&5
20683 cat conftest.$ac_ext >&5
20684 ac_cv_lib_bsd_gethostbyname=no
20686 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20687 LIBS=$ac_check_lib_save_LIBS
20689 echo "$as_me:20689: result: $ac_cv_lib_bsd_gethostbyname" >&5
20690 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
20691 if test $ac_cv_lib_bsd_gethostbyname = yes; then
20692 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
20698 # lieder@skyler.mavd.honeywell.com says without -lsocket,
20699 # socket/setsockopt and other routines are undefined under SCO ODT
20700 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
20701 # on later versions), says Simon Leinen: it contains gethostby*
20702 # variants that don't use the nameserver (or something). -lsocket
20703 # must be given before -lnsl if both are needed. We assume that
20704 # if connect needs -lnsl, so does gethostbyname.
20705 echo "$as_me:20705: checking for connect" >&5
20706 echo $ECHO_N "checking for connect... $ECHO_C" >&6
20707 if test "${ac_cv_func_connect+set}" = set; then
20708 echo $ECHO_N "(cached) $ECHO_C" >&6
20710 cat >conftest.$ac_ext <<_ACEOF
20711 #line 20711 "configure"
20712 #include "confdefs.h"
20713 #define connect autoconf_temporary
20714 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
20721 /* We use char because int might match the return type of a gcc2
20722 builtin and then its argument prototype would still apply. */
20723 char connect (void);
20729 /* The GNU C library defines stubs for functions which it implements
20730 to always fail with ENOSYS. Some functions are actually named
20731 something starting with __ and the normal name is an alias. */
20732 #if defined (__stub_connect) || defined (__stub___connect)
20733 #error found stub for connect
20741 rm -f conftest.$ac_objext conftest$ac_exeext
20742 if { (eval echo "$as_me:20742: \"$ac_link\"") >&5
20743 (eval $ac_link) 2>&5
20745 echo "$as_me:20745: \$? = $ac_status" >&5
20746 (exit $ac_status); } &&
20747 { ac_try='test -s conftest$ac_exeext'
20748 { (eval echo "$as_me:20748: \"$ac_try\"") >&5
20749 (eval $ac_try) 2>&5
20751 echo "$as_me:20751: \$? = $ac_status" >&5
20752 (exit $ac_status); }; }; then
20753 ac_cv_func_connect=yes
20755 echo "$as_me: failed program was:" >&5
20756 cat conftest.$ac_ext >&5
20757 ac_cv_func_connect=no
20759 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20761 echo "$as_me:20761: result: $ac_cv_func_connect" >&5
20762 echo "${ECHO_T}$ac_cv_func_connect" >&6
20764 if test $ac_cv_func_connect = no; then
20765 echo "$as_me:20765: checking for connect in -lsocket" >&5
20766 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
20767 if test "${ac_cv_lib_socket_connect+set}" = set; then
20768 echo $ECHO_N "(cached) $ECHO_C" >&6
20770 ac_check_lib_save_LIBS=$LIBS
20771 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
20772 cat >conftest.$ac_ext <<_ACEOF
20773 #line 20773 "configure"
20774 #include "confdefs.h"
20776 /* Override any gcc2 internal prototype to avoid an error. */
20780 /* We use char because int might match the return type of a gcc2
20781 builtin and then its argument prototype would still apply. */
20791 rm -f conftest.$ac_objext conftest$ac_exeext
20792 if { (eval echo "$as_me:20792: \"$ac_link\"") >&5
20793 (eval $ac_link) 2>&5
20795 echo "$as_me:20795: \$? = $ac_status" >&5
20796 (exit $ac_status); } &&
20797 { ac_try='test -s conftest$ac_exeext'
20798 { (eval echo "$as_me:20798: \"$ac_try\"") >&5
20799 (eval $ac_try) 2>&5
20801 echo "$as_me:20801: \$? = $ac_status" >&5
20802 (exit $ac_status); }; }; then
20803 ac_cv_lib_socket_connect=yes
20805 echo "$as_me: failed program was:" >&5
20806 cat conftest.$ac_ext >&5
20807 ac_cv_lib_socket_connect=no
20809 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20810 LIBS=$ac_check_lib_save_LIBS
20812 echo "$as_me:20812: result: $ac_cv_lib_socket_connect" >&5
20813 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
20814 if test $ac_cv_lib_socket_connect = yes; then
20815 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
20820 # Guillermo Gomez says -lposix is necessary on A/UX.
20821 echo "$as_me:20821: checking for remove" >&5
20822 echo $ECHO_N "checking for remove... $ECHO_C" >&6
20823 if test "${ac_cv_func_remove+set}" = set; then
20824 echo $ECHO_N "(cached) $ECHO_C" >&6
20826 cat >conftest.$ac_ext <<_ACEOF
20827 #line 20827 "configure"
20828 #include "confdefs.h"
20829 #define remove autoconf_temporary
20830 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
20837 /* We use char because int might match the return type of a gcc2
20838 builtin and then its argument prototype would still apply. */
20839 char remove (void);
20845 /* The GNU C library defines stubs for functions which it implements
20846 to always fail with ENOSYS. Some functions are actually named
20847 something starting with __ and the normal name is an alias. */
20848 #if defined (__stub_remove) || defined (__stub___remove)
20849 #error found stub for remove
20857 rm -f conftest.$ac_objext conftest$ac_exeext
20858 if { (eval echo "$as_me:20858: \"$ac_link\"") >&5
20859 (eval $ac_link) 2>&5
20861 echo "$as_me:20861: \$? = $ac_status" >&5
20862 (exit $ac_status); } &&
20863 { ac_try='test -s conftest$ac_exeext'
20864 { (eval echo "$as_me:20864: \"$ac_try\"") >&5
20865 (eval $ac_try) 2>&5
20867 echo "$as_me:20867: \$? = $ac_status" >&5
20868 (exit $ac_status); }; }; then
20869 ac_cv_func_remove=yes
20871 echo "$as_me: failed program was:" >&5
20872 cat conftest.$ac_ext >&5
20873 ac_cv_func_remove=no
20875 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20877 echo "$as_me:20877: result: $ac_cv_func_remove" >&5
20878 echo "${ECHO_T}$ac_cv_func_remove" >&6
20880 if test $ac_cv_func_remove = no; then
20881 echo "$as_me:20881: checking for remove in -lposix" >&5
20882 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
20883 if test "${ac_cv_lib_posix_remove+set}" = set; then
20884 echo $ECHO_N "(cached) $ECHO_C" >&6
20886 ac_check_lib_save_LIBS=$LIBS
20887 LIBS="-lposix $LIBS"
20888 cat >conftest.$ac_ext <<_ACEOF
20889 #line 20889 "configure"
20890 #include "confdefs.h"
20892 /* Override any gcc2 internal prototype to avoid an error. */
20896 /* We use char because int might match the return type of a gcc2
20897 builtin and then its argument prototype would still apply. */
20907 rm -f conftest.$ac_objext conftest$ac_exeext
20908 if { (eval echo "$as_me:20908: \"$ac_link\"") >&5
20909 (eval $ac_link) 2>&5
20911 echo "$as_me:20911: \$? = $ac_status" >&5
20912 (exit $ac_status); } &&
20913 { ac_try='test -s conftest$ac_exeext'
20914 { (eval echo "$as_me:20914: \"$ac_try\"") >&5
20915 (eval $ac_try) 2>&5
20917 echo "$as_me:20917: \$? = $ac_status" >&5
20918 (exit $ac_status); }; }; then
20919 ac_cv_lib_posix_remove=yes
20921 echo "$as_me: failed program was:" >&5
20922 cat conftest.$ac_ext >&5
20923 ac_cv_lib_posix_remove=no
20925 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20926 LIBS=$ac_check_lib_save_LIBS
20928 echo "$as_me:20928: result: $ac_cv_lib_posix_remove" >&5
20929 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
20930 if test $ac_cv_lib_posix_remove = yes; then
20931 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
20936 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
20937 echo "$as_me:20937: checking for shmat" >&5
20938 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
20939 if test "${ac_cv_func_shmat+set}" = set; then
20940 echo $ECHO_N "(cached) $ECHO_C" >&6
20942 cat >conftest.$ac_ext <<_ACEOF
20943 #line 20943 "configure"
20944 #include "confdefs.h"
20945 #define shmat autoconf_temporary
20946 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
20953 /* We use char because int might match the return type of a gcc2
20954 builtin and then its argument prototype would still apply. */
20961 /* The GNU C library defines stubs for functions which it implements
20962 to always fail with ENOSYS. Some functions are actually named
20963 something starting with __ and the normal name is an alias. */
20964 #if defined (__stub_shmat) || defined (__stub___shmat)
20965 #error found stub for shmat
20973 rm -f conftest.$ac_objext conftest$ac_exeext
20974 if { (eval echo "$as_me:20974: \"$ac_link\"") >&5
20975 (eval $ac_link) 2>&5
20977 echo "$as_me:20977: \$? = $ac_status" >&5
20978 (exit $ac_status); } &&
20979 { ac_try='test -s conftest$ac_exeext'
20980 { (eval echo "$as_me:20980: \"$ac_try\"") >&5
20981 (eval $ac_try) 2>&5
20983 echo "$as_me:20983: \$? = $ac_status" >&5
20984 (exit $ac_status); }; }; then
20985 ac_cv_func_shmat=yes
20987 echo "$as_me: failed program was:" >&5
20988 cat conftest.$ac_ext >&5
20989 ac_cv_func_shmat=no
20991 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20993 echo "$as_me:20993: result: $ac_cv_func_shmat" >&5
20994 echo "${ECHO_T}$ac_cv_func_shmat" >&6
20996 if test $ac_cv_func_shmat = no; then
20997 echo "$as_me:20997: checking for shmat in -lipc" >&5
20998 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
20999 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
21000 echo $ECHO_N "(cached) $ECHO_C" >&6
21002 ac_check_lib_save_LIBS=$LIBS
21004 cat >conftest.$ac_ext <<_ACEOF
21005 #line 21005 "configure"
21006 #include "confdefs.h"
21008 /* Override any gcc2 internal prototype to avoid an error. */
21012 /* We use char because int might match the return type of a gcc2
21013 builtin and then its argument prototype would still apply. */
21023 rm -f conftest.$ac_objext conftest$ac_exeext
21024 if { (eval echo "$as_me:21024: \"$ac_link\"") >&5
21025 (eval $ac_link) 2>&5
21027 echo "$as_me:21027: \$? = $ac_status" >&5
21028 (exit $ac_status); } &&
21029 { ac_try='test -s conftest$ac_exeext'
21030 { (eval echo "$as_me:21030: \"$ac_try\"") >&5
21031 (eval $ac_try) 2>&5
21033 echo "$as_me:21033: \$? = $ac_status" >&5
21034 (exit $ac_status); }; }; then
21035 ac_cv_lib_ipc_shmat=yes
21037 echo "$as_me: failed program was:" >&5
21038 cat conftest.$ac_ext >&5
21039 ac_cv_lib_ipc_shmat=no
21041 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21042 LIBS=$ac_check_lib_save_LIBS
21044 echo "$as_me:21044: result: $ac_cv_lib_ipc_shmat" >&5
21045 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
21046 if test $ac_cv_lib_ipc_shmat = yes; then
21047 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
21053 # Check for libraries that X11R6 Xt/Xaw programs need.
21054 ac_save_LDFLAGS=$LDFLAGS
21055 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
21056 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
21057 # check for ICE first), but we must link in the order -lSM -lICE or
21058 # we get undefined symbols. So assume we have SM if we have ICE.
21059 # These have to be linked with before -lX11, unlike the other
21060 # libraries we check for below, so use a different variable.
21061 # John Interrante, Karl Berry
21062 echo "$as_me:21062: checking for IceConnectionNumber in -lICE" >&5
21063 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
21064 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
21065 echo $ECHO_N "(cached) $ECHO_C" >&6
21067 ac_check_lib_save_LIBS=$LIBS
21068 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
21069 cat >conftest.$ac_ext <<_ACEOF
21070 #line 21070 "configure"
21071 #include "confdefs.h"
21073 /* Override any gcc2 internal prototype to avoid an error. */
21077 /* We use char because int might match the return type of a gcc2
21078 builtin and then its argument prototype would still apply. */
21079 char IceConnectionNumber ();
21083 IceConnectionNumber ();
21088 rm -f conftest.$ac_objext conftest$ac_exeext
21089 if { (eval echo "$as_me:21089: \"$ac_link\"") >&5
21090 (eval $ac_link) 2>&5
21092 echo "$as_me:21092: \$? = $ac_status" >&5
21093 (exit $ac_status); } &&
21094 { ac_try='test -s conftest$ac_exeext'
21095 { (eval echo "$as_me:21095: \"$ac_try\"") >&5
21096 (eval $ac_try) 2>&5
21098 echo "$as_me:21098: \$? = $ac_status" >&5
21099 (exit $ac_status); }; }; then
21100 ac_cv_lib_ICE_IceConnectionNumber=yes
21102 echo "$as_me: failed program was:" >&5
21103 cat conftest.$ac_ext >&5
21104 ac_cv_lib_ICE_IceConnectionNumber=no
21106 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21107 LIBS=$ac_check_lib_save_LIBS
21109 echo "$as_me:21109: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
21110 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
21111 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
21112 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
21115 LDFLAGS=$ac_save_LDFLAGS
21121 if ( test "$GCC" = yes || test "$GXX" = yes )
21124 if ( test "$GCC" = yes || test "$GXX" = yes )
21128 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
21130 echo "${as_me:-configure}:21130: testing repairing CFLAGS: $CFLAGS ..." 1>&5
21133 for cf_temp_scan in $CFLAGS
21135 case "x$cf_temp_scan" in
21138 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
21139 EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
21144 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
21145 cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
21150 CFLAGS="$cf_temp_flags"
21151 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
21153 echo "${as_me:-configure}:21153: testing ... fixed $CFLAGS ..." 1>&5
21155 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
21157 echo "${as_me:-configure}:21157: testing ... extra $EXTRA_CFLAGS ..." 1>&5
21163 if ( test "$GCC" = yes || test "$GXX" = yes )
21167 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
21169 echo "${as_me:-configure}:21169: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
21172 for cf_temp_scan in $CPPFLAGS
21174 case "x$cf_temp_scan" in
21177 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
21178 EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
21183 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
21184 cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
21189 CPPFLAGS="$cf_temp_flags"
21190 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
21192 echo "${as_me:-configure}:21192: testing ... fixed $CPPFLAGS ..." 1>&5
21194 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
21196 echo "${as_me:-configure}:21196: testing ... extra $EXTRA_CFLAGS ..." 1>&5
21202 if ( test "$GCC" = yes || test "$GXX" = yes )
21206 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
21208 echo "${as_me:-configure}:21208: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
21211 for cf_temp_scan in $LDFLAGS
21213 case "x$cf_temp_scan" in
21216 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
21217 EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
21222 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
21223 cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
21228 LDFLAGS="$cf_temp_flags"
21229 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
21231 echo "${as_me:-configure}:21231: testing ... fixed $LDFLAGS ..." 1>&5
21233 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
21235 echo "${as_me:-configure}:21235: testing ... extra $EXTRA_CFLAGS ..." 1>&5
21241 echo "$as_me:21241: checking if you want to turn on gcc warnings" >&5
21242 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
21244 # Check whether --enable-warnings or --disable-warnings was given.
21245 if test "${enable_warnings+set}" = set; then
21246 enableval="$enable_warnings"
21247 test "$enableval" != yes && enableval=no
21248 if test "$enableval" != "no" ; then
21258 echo "$as_me:21258: result: $with_warnings" >&5
21259 echo "${ECHO_T}$with_warnings" >&6
21260 if test "$with_warnings" = "yes"
21263 if test "$GCC" = yes
21265 cat > conftest.i <<EOF
21267 #define GCC_PRINTF 0
21270 #define GCC_SCANF 0
21272 #ifndef GCC_NORETURN
21273 #define GCC_NORETURN /* nothing */
21276 #define GCC_UNUSED /* nothing */
21279 if test "$GCC" = yes
21281 { echo "$as_me:21281: checking for $CC __attribute__ directives..." >&5
21282 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
21283 cat > conftest.$ac_ext <<EOF
21284 #line 21284 "${as_me:-configure}"
21285 #include "confdefs.h"
21286 #include "conftest.h"
21287 #include "conftest.i"
21289 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
21291 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
21294 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
21296 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
21298 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
21299 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
21300 extern void foo(void) GCC_NORETURN;
21301 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
21303 cf_printf_attribute=no
21304 cf_scanf_attribute=no
21305 for cf_attribute in scanf printf unused noreturn
21308 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21310 cf_directive="__attribute__(($cf_attribute))"
21311 echo "checking for $CC $cf_directive" 1>&5
21313 case $cf_attribute in
21315 cf_printf_attribute=yes
21316 cat >conftest.h <<EOF
21317 #define GCC_$cf_ATTRIBUTE 1
21321 cf_scanf_attribute=yes
21322 cat >conftest.h <<EOF
21323 #define GCC_$cf_ATTRIBUTE 1
21327 cat >conftest.h <<EOF
21328 #define GCC_$cf_ATTRIBUTE $cf_directive
21333 if { (eval echo "$as_me:21333: \"$ac_compile\"") >&5
21334 (eval $ac_compile) 2>&5
21336 echo "$as_me:21336: \$? = $ac_status" >&5
21337 (exit $ac_status); }; then
21338 test -n "$verbose" && echo "$as_me:21338: result: ... $cf_attribute" >&5
21339 echo "${ECHO_T}... $cf_attribute" >&6
21340 cat conftest.h >>confdefs.h
21341 case $cf_attribute in
21344 cat >>confdefs.h <<EOF
21345 #define GCC_NORETURN $cf_directive
21350 cf_value='/* nothing */'
21351 if test "$cf_printf_attribute" != no ; then
21352 cf_value='__attribute__((format(printf,fmt,var)))'
21354 cat >>confdefs.h <<\EOF
21355 #define GCC_PRINTF 1
21360 cat >>confdefs.h <<EOF
21361 #define GCC_PRINTFLIKE(fmt,var) $cf_value
21366 cf_value='/* nothing */'
21367 if test "$cf_scanf_attribute" != no ; then
21368 cf_value='__attribute__((format(scanf,fmt,var)))'
21370 cat >>confdefs.h <<\EOF
21371 #define GCC_SCANF 1
21376 cat >>confdefs.h <<EOF
21377 #define GCC_SCANFLIKE(fmt,var) $cf_value
21383 cat >>confdefs.h <<EOF
21384 #define GCC_UNUSED $cf_directive
21392 fgrep define conftest.i >>confdefs.h
21397 if test "x$have_x" = xyes; then
21399 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
21400 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
21401 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
21402 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
21403 for cf_X_CFLAGS in $X_CFLAGS
21405 case "x$cf_X_CFLAGS" in
21407 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
21410 CFLAGS="$CFLAGS $cf_X_CFLAGS"
21415 cat >conftest.$ac_ext <<_ACEOF
21416 #line 21416 "configure"
21417 #include "confdefs.h"
21419 #include <stdlib.h>
21420 #include <X11/Intrinsic.h>
21425 String foo = malloc(1); (void)foo
21430 rm -f conftest.$ac_objext
21431 if { (eval echo "$as_me:21431: \"$ac_compile\"") >&5
21432 (eval $ac_compile) 2>&5
21434 echo "$as_me:21434: \$? = $ac_status" >&5
21435 (exit $ac_status); } &&
21436 { ac_try='test -s conftest.$ac_objext'
21437 { (eval echo "$as_me:21437: \"$ac_try\"") >&5
21438 (eval $ac_try) 2>&5
21440 echo "$as_me:21440: \$? = $ac_status" >&5
21441 (exit $ac_status); }; }; then
21443 echo "$as_me:21443: checking for X11/Xt const-feature" >&5
21444 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
21445 if test "${cf_cv_const_x_string+set}" = set; then
21446 echo $ECHO_N "(cached) $ECHO_C" >&6
21449 cat >conftest.$ac_ext <<_ACEOF
21450 #line 21450 "configure"
21451 #include "confdefs.h"
21453 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
21454 #undef XTSTRINGDEFINES /* X11R5 and later */
21455 #include <stdlib.h>
21456 #include <X11/Intrinsic.h>
21461 String foo = malloc(1); *foo = 0
21466 rm -f conftest.$ac_objext
21467 if { (eval echo "$as_me:21467: \"$ac_compile\"") >&5
21468 (eval $ac_compile) 2>&5
21470 echo "$as_me:21470: \$? = $ac_status" >&5
21471 (exit $ac_status); } &&
21472 { ac_try='test -s conftest.$ac_objext'
21473 { (eval echo "$as_me:21473: \"$ac_try\"") >&5
21474 (eval $ac_try) 2>&5
21476 echo "$as_me:21476: \$? = $ac_status" >&5
21477 (exit $ac_status); }; }; then
21479 cf_cv_const_x_string=no
21482 echo "$as_me: failed program was:" >&5
21483 cat conftest.$ac_ext >&5
21485 cf_cv_const_x_string=yes
21488 rm -f conftest.$ac_objext conftest.$ac_ext
21491 echo "$as_me:21491: result: $cf_cv_const_x_string" >&5
21492 echo "${ECHO_T}$cf_cv_const_x_string" >&6
21494 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
21495 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
21496 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
21498 case $cf_cv_const_x_string in
21501 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21502 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
21507 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21508 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
21514 echo "$as_me: failed program was:" >&5
21515 cat conftest.$ac_ext >&5
21517 rm -f conftest.$ac_objext conftest.$ac_ext
21519 cat > conftest.$ac_ext <<EOF
21520 #line 21520 "${as_me:-configure}"
21521 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
21523 if test "$INTEL_COMPILER" = yes
21525 # The "-wdXXX" options suppress warnings:
21526 # remark #1419: external declaration in primary source file
21527 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
21528 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
21529 # remark #193: zero used for undefined preprocessing identifier
21530 # remark #593: variable "curs_sb_left_arrow" was set but never used
21531 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
21532 # remark #869: parameter "tw" was never referenced
21533 # remark #981: operands are evaluated in unspecified order
21534 # warning #279: controlling expression is constant
21536 { echo "$as_me:21536: checking for $CC warning options..." >&5
21537 echo "$as_me: checking for $CC warning options..." >&6;}
21538 cf_save_CFLAGS="$CFLAGS"
21539 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
21551 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
21552 if { (eval echo "$as_me:21552: \"$ac_compile\"") >&5
21553 (eval $ac_compile) 2>&5
21555 echo "$as_me:21555: \$? = $ac_status" >&5
21556 (exit $ac_status); }; then
21557 test -n "$verbose" && echo "$as_me:21557: result: ... -$cf_opt" >&5
21558 echo "${ECHO_T}... -$cf_opt" >&6
21559 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
21562 CFLAGS="$cf_save_CFLAGS"
21563 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
21565 { echo "$as_me:21565: checking for $CC warning options..." >&5
21566 echo "$as_me: checking for $CC warning options..." >&6;}
21567 cf_save_CFLAGS="$CFLAGS"
21569 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
21570 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
21571 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
21572 for cf_opt in W Wall \
21573 Wbad-function-cast \
21576 Wdeclaration-after-statement \
21579 Wmissing-declarations \
21580 Wmissing-prototypes \
21584 Wstrict-prototypes \
21585 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
21587 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
21588 if { (eval echo "$as_me:21588: \"$ac_compile\"") >&5
21589 (eval $ac_compile) 2>&5
21591 echo "$as_me:21591: \$? = $ac_status" >&5
21592 (exit $ac_status); }; then
21593 test -n "$verbose" && echo "$as_me:21593: result: ... -$cf_opt" >&5
21594 echo "${ECHO_T}... -$cf_opt" >&6
21597 case $GCC_VERSION in
21599 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
21601 echo "${as_me:-configure}:21601: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
21607 case $GCC_VERSION in
21609 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
21611 echo "${as_me:-configure}:21611: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
21617 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
21620 CFLAGS="$cf_save_CFLAGS"
21627 echo "$as_me:21627: checking if you want to use dmalloc for testing" >&5
21628 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
21630 # Check whether --with-dmalloc or --without-dmalloc was given.
21631 if test "${with_dmalloc+set}" = set; then
21632 withval="$with_dmalloc"
21634 cat >>confdefs.h <<EOF
21635 #define USE_DMALLOC 1
21638 : ${with_cflags:=-g}
21639 : ${with_no_leaks:=yes}
21644 echo "$as_me:21644: result: ${with_dmalloc:-no}" >&5
21645 echo "${ECHO_T}${with_dmalloc:-no}" >&6
21647 case .$with_cflags in
21657 cf_new_extra_cppflags=
21659 for cf_add_cflags in -g
21661 case $cf_fix_cppflags in
21663 case $cf_add_cflags in
21664 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21665 case $cf_add_cflags in
21667 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21669 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21670 && test -z "${cf_tst_cflags}" \
21671 && cf_fix_cppflags=yes
21673 if test $cf_fix_cppflags = yes ; then
21675 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21676 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21679 elif test "${cf_tst_cflags}" = "\"'" ; then
21681 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21682 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21688 case "$CPPFLAGS" in
21692 case $cf_add_cflags in
21694 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21696 CPPFLAGS=`echo "$CPPFLAGS" | \
21697 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
21698 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
21703 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21704 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21711 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21712 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21719 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21720 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21722 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
21724 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21725 && test -z "${cf_tst_cflags}" \
21726 && cf_fix_cppflags=no
21731 if test -n "$cf_new_cflags" ; then
21733 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21734 CFLAGS="${CFLAGS}$cf_new_cflags"
21738 if test -n "$cf_new_cppflags" ; then
21740 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21741 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21745 if test -n "$cf_new_extra_cppflags" ; then
21747 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21748 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21757 if test "$with_dmalloc" = yes ; then
21758 echo "$as_me:21758: checking for dmalloc.h" >&5
21759 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
21760 if test "${ac_cv_header_dmalloc_h+set}" = set; then
21761 echo $ECHO_N "(cached) $ECHO_C" >&6
21763 cat >conftest.$ac_ext <<_ACEOF
21764 #line 21764 "configure"
21765 #include "confdefs.h"
21766 #include <dmalloc.h>
21768 if { (eval echo "$as_me:21768: \"$ac_cpp conftest.$ac_ext\"") >&5
21769 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21771 egrep -v '^ *\+' conftest.er1 >conftest.err
21773 cat conftest.err >&5
21774 echo "$as_me:21774: \$? = $ac_status" >&5
21775 (exit $ac_status); } >/dev/null; then
21776 if test -s conftest.err; then
21777 ac_cpp_err=$ac_c_preproc_warn_flag
21784 if test -z "$ac_cpp_err"; then
21785 ac_cv_header_dmalloc_h=yes
21787 echo "$as_me: failed program was:" >&5
21788 cat conftest.$ac_ext >&5
21789 ac_cv_header_dmalloc_h=no
21791 rm -f conftest.err conftest.$ac_ext
21793 echo "$as_me:21793: result: $ac_cv_header_dmalloc_h" >&5
21794 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
21795 if test $ac_cv_header_dmalloc_h = yes; then
21797 echo "$as_me:21797: checking for dmalloc_debug in -ldmalloc" >&5
21798 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
21799 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
21800 echo $ECHO_N "(cached) $ECHO_C" >&6
21802 ac_check_lib_save_LIBS=$LIBS
21803 LIBS="-ldmalloc $LIBS"
21804 cat >conftest.$ac_ext <<_ACEOF
21805 #line 21805 "configure"
21806 #include "confdefs.h"
21808 /* Override any gcc2 internal prototype to avoid an error. */
21812 /* We use char because int might match the return type of a gcc2
21813 builtin and then its argument prototype would still apply. */
21814 char dmalloc_debug ();
21823 rm -f conftest.$ac_objext conftest$ac_exeext
21824 if { (eval echo "$as_me:21824: \"$ac_link\"") >&5
21825 (eval $ac_link) 2>&5
21827 echo "$as_me:21827: \$? = $ac_status" >&5
21828 (exit $ac_status); } &&
21829 { ac_try='test -s conftest$ac_exeext'
21830 { (eval echo "$as_me:21830: \"$ac_try\"") >&5
21831 (eval $ac_try) 2>&5
21833 echo "$as_me:21833: \$? = $ac_status" >&5
21834 (exit $ac_status); }; }; then
21835 ac_cv_lib_dmalloc_dmalloc_debug=yes
21837 echo "$as_me: failed program was:" >&5
21838 cat conftest.$ac_ext >&5
21839 ac_cv_lib_dmalloc_dmalloc_debug=no
21841 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21842 LIBS=$ac_check_lib_save_LIBS
21844 echo "$as_me:21844: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
21845 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
21846 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
21847 cat >>confdefs.h <<EOF
21848 #define HAVE_LIBDMALLOC 1
21851 LIBS="-ldmalloc $LIBS"
21859 echo "$as_me:21859: checking if you want to use dbmalloc for testing" >&5
21860 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
21862 # Check whether --with-dbmalloc or --without-dbmalloc was given.
21863 if test "${with_dbmalloc+set}" = set; then
21864 withval="$with_dbmalloc"
21866 cat >>confdefs.h <<EOF
21867 #define USE_DBMALLOC 1
21870 : ${with_cflags:=-g}
21871 : ${with_no_leaks:=yes}
21876 echo "$as_me:21876: result: ${with_dbmalloc:-no}" >&5
21877 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
21879 case .$with_cflags in
21889 cf_new_extra_cppflags=
21891 for cf_add_cflags in -g
21893 case $cf_fix_cppflags in
21895 case $cf_add_cflags in
21896 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21897 case $cf_add_cflags in
21899 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21901 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21902 && test -z "${cf_tst_cflags}" \
21903 && cf_fix_cppflags=yes
21905 if test $cf_fix_cppflags = yes ; then
21907 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21908 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21911 elif test "${cf_tst_cflags}" = "\"'" ; then
21913 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21914 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21920 case "$CPPFLAGS" in
21924 case $cf_add_cflags in
21926 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21928 CPPFLAGS=`echo "$CPPFLAGS" | \
21929 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
21930 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
21935 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21936 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21943 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21944 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21951 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21952 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21954 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
21956 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21957 && test -z "${cf_tst_cflags}" \
21958 && cf_fix_cppflags=no
21963 if test -n "$cf_new_cflags" ; then
21965 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21966 CFLAGS="${CFLAGS}$cf_new_cflags"
21970 if test -n "$cf_new_cppflags" ; then
21972 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21973 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21977 if test -n "$cf_new_extra_cppflags" ; then
21979 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21980 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21989 if test "$with_dbmalloc" = yes ; then
21990 echo "$as_me:21990: checking for dbmalloc.h" >&5
21991 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
21992 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
21993 echo $ECHO_N "(cached) $ECHO_C" >&6
21995 cat >conftest.$ac_ext <<_ACEOF
21996 #line 21996 "configure"
21997 #include "confdefs.h"
21998 #include <dbmalloc.h>
22000 if { (eval echo "$as_me:22000: \"$ac_cpp conftest.$ac_ext\"") >&5
22001 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22003 egrep -v '^ *\+' conftest.er1 >conftest.err
22005 cat conftest.err >&5
22006 echo "$as_me:22006: \$? = $ac_status" >&5
22007 (exit $ac_status); } >/dev/null; then
22008 if test -s conftest.err; then
22009 ac_cpp_err=$ac_c_preproc_warn_flag
22016 if test -z "$ac_cpp_err"; then
22017 ac_cv_header_dbmalloc_h=yes
22019 echo "$as_me: failed program was:" >&5
22020 cat conftest.$ac_ext >&5
22021 ac_cv_header_dbmalloc_h=no
22023 rm -f conftest.err conftest.$ac_ext
22025 echo "$as_me:22025: result: $ac_cv_header_dbmalloc_h" >&5
22026 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
22027 if test $ac_cv_header_dbmalloc_h = yes; then
22029 echo "$as_me:22029: checking for debug_malloc in -ldbmalloc" >&5
22030 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
22031 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
22032 echo $ECHO_N "(cached) $ECHO_C" >&6
22034 ac_check_lib_save_LIBS=$LIBS
22035 LIBS="-ldbmalloc $LIBS"
22036 cat >conftest.$ac_ext <<_ACEOF
22037 #line 22037 "configure"
22038 #include "confdefs.h"
22040 /* Override any gcc2 internal prototype to avoid an error. */
22044 /* We use char because int might match the return type of a gcc2
22045 builtin and then its argument prototype would still apply. */
22046 char debug_malloc ();
22055 rm -f conftest.$ac_objext conftest$ac_exeext
22056 if { (eval echo "$as_me:22056: \"$ac_link\"") >&5
22057 (eval $ac_link) 2>&5
22059 echo "$as_me:22059: \$? = $ac_status" >&5
22060 (exit $ac_status); } &&
22061 { ac_try='test -s conftest$ac_exeext'
22062 { (eval echo "$as_me:22062: \"$ac_try\"") >&5
22063 (eval $ac_try) 2>&5
22065 echo "$as_me:22065: \$? = $ac_status" >&5
22066 (exit $ac_status); }; }; then
22067 ac_cv_lib_dbmalloc_debug_malloc=yes
22069 echo "$as_me: failed program was:" >&5
22070 cat conftest.$ac_ext >&5
22071 ac_cv_lib_dbmalloc_debug_malloc=no
22073 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22074 LIBS=$ac_check_lib_save_LIBS
22076 echo "$as_me:22076: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
22077 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
22078 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
22079 cat >>confdefs.h <<EOF
22080 #define HAVE_LIBDBMALLOC 1
22083 LIBS="-ldbmalloc $LIBS"
22091 echo "$as_me:22091: checking if you want to use valgrind for testing" >&5
22092 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
22094 # Check whether --with-valgrind or --without-valgrind was given.
22095 if test "${with_valgrind+set}" = set; then
22096 withval="$with_valgrind"
22098 cat >>confdefs.h <<EOF
22099 #define USE_VALGRIND 1
22102 : ${with_cflags:=-g}
22103 : ${with_no_leaks:=yes}
22108 echo "$as_me:22108: result: ${with_valgrind:-no}" >&5
22109 echo "${ECHO_T}${with_valgrind:-no}" >&6
22111 case .$with_cflags in
22121 cf_new_extra_cppflags=
22123 for cf_add_cflags in -g
22125 case $cf_fix_cppflags in
22127 case $cf_add_cflags in
22128 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22129 case $cf_add_cflags in
22131 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22133 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22134 && test -z "${cf_tst_cflags}" \
22135 && cf_fix_cppflags=yes
22137 if test $cf_fix_cppflags = yes ; then
22139 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22140 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22143 elif test "${cf_tst_cflags}" = "\"'" ; then
22145 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22146 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22152 case "$CPPFLAGS" in
22156 case $cf_add_cflags in
22158 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22160 CPPFLAGS=`echo "$CPPFLAGS" | \
22161 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22162 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22167 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22168 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22175 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22176 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22183 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22184 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22186 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
22188 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22189 && test -z "${cf_tst_cflags}" \
22190 && cf_fix_cppflags=no
22195 if test -n "$cf_new_cflags" ; then
22197 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22198 CFLAGS="${CFLAGS}$cf_new_cflags"
22202 if test -n "$cf_new_cppflags" ; then
22204 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22205 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22209 if test -n "$cf_new_extra_cppflags" ; then
22211 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22212 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22221 echo "$as_me:22221: checking if you want to perform memory-leak testing" >&5
22222 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
22224 # Check whether --enable-leaks or --disable-leaks was given.
22225 if test "${enable_leaks+set}" = set; then
22226 enableval="$enable_leaks"
22227 if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
22229 : ${with_no_leaks:=no}
22231 echo "$as_me:22231: result: $with_no_leaks" >&5
22232 echo "${ECHO_T}$with_no_leaks" >&6
22234 if test "$with_no_leaks" = yes ; then
22236 cat >>confdefs.h <<\EOF
22240 cat >>confdefs.h <<\EOF
22241 #define YY_NO_LEAKS 1
22247 if test "x$cf_cv_enable_rpath" != xno
22249 echo "$as_me:22249: checking for an rpath option" >&5
22250 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
22251 case $cf_cv_system_name in
22253 if test "$GCC" = yes; then
22254 LD_RPATH_OPT="-Wl,-rpath,"
22256 LD_RPATH_OPT="-rpath "
22259 (linux*|gnu*|k*bsd*-gnu|freebsd*)
22260 LD_RPATH_OPT="-Wl,-rpath,"
22262 (openbsd[2-9].*|mirbsd*)
22263 LD_RPATH_OPT="-Wl,-rpath,"
22266 LD_RPATH_OPT="-rpath "
22269 LD_RPATH_OPT="-Wl,-rpath,"
22272 LD_RPATH_OPT="-rpath "
22280 echo "$as_me:22280: result: $LD_RPATH_OPT" >&5
22281 echo "${ECHO_T}$LD_RPATH_OPT" >&6
22283 case "x$LD_RPATH_OPT" in
22285 echo "$as_me:22285: checking if we need a space after rpath option" >&5
22286 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
22287 cf_save_LIBS="$LIBS"
22289 cf_add_libs="$LIBS"
22292 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22293 # filter duplicates
22294 for cf_add_1lib in $cf_add_0lib; do
22295 for cf_add_2lib in $cf_add_libs; do
22296 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22301 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22303 LIBS="$cf_add_libs"
22305 cat >conftest.$ac_ext <<_ACEOF
22306 #line 22306 "configure"
22307 #include "confdefs.h"
22317 rm -f conftest.$ac_objext conftest$ac_exeext
22318 if { (eval echo "$as_me:22318: \"$ac_link\"") >&5
22319 (eval $ac_link) 2>&5
22321 echo "$as_me:22321: \$? = $ac_status" >&5
22322 (exit $ac_status); } &&
22323 { ac_try='test -s conftest$ac_exeext'
22324 { (eval echo "$as_me:22324: \"$ac_try\"") >&5
22325 (eval $ac_try) 2>&5
22327 echo "$as_me:22327: \$? = $ac_status" >&5
22328 (exit $ac_status); }; }; then
22331 echo "$as_me: failed program was:" >&5
22332 cat conftest.$ac_ext >&5
22335 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22336 LIBS="$cf_save_LIBS"
22337 echo "$as_me:22337: result: $cf_rpath_space" >&5
22338 echo "${ECHO_T}$cf_rpath_space" >&6
22339 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
22344 echo "$as_me:22344: checking if rpath-hack should be disabled" >&5
22345 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
22347 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
22348 if test "${enable_rpath_hack+set}" = set; then
22349 enableval="$enable_rpath_hack"
22350 test "$enableval" != no && enableval=yes
22351 if test "$enableval" != "yes" ; then
22352 cf_disable_rpath_hack=yes
22354 cf_disable_rpath_hack=no
22358 cf_disable_rpath_hack=no
22361 echo "$as_me:22361: result: $cf_disable_rpath_hack" >&5
22362 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
22363 if test "$cf_disable_rpath_hack" = no ; then
22365 echo "$as_me:22365: checking for updated LDFLAGS" >&5
22366 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
22367 if test -n "$LD_RPATH_OPT" ; then
22368 echo "$as_me:22368: result: maybe" >&5
22369 echo "${ECHO_T}maybe" >&6
22373 # Extract the first word of "$ac_prog", so it can be a program name with args.
22374 set dummy $ac_prog; ac_word=$2
22375 echo "$as_me:22375: checking for $ac_word" >&5
22376 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22377 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
22378 echo $ECHO_N "(cached) $ECHO_C" >&6
22380 if test -n "$cf_ldd_prog"; then
22381 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
22383 ac_save_IFS=$IFS; IFS=$ac_path_separator
22385 for ac_dir in $ac_dummy; do
22387 test -z "$ac_dir" && ac_dir=.
22388 $as_executable_p "$ac_dir/$ac_word" || continue
22389 ac_cv_prog_cf_ldd_prog="$ac_prog"
22390 echo "$as_me:22390: found $ac_dir/$ac_word" >&5
22396 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
22397 if test -n "$cf_ldd_prog"; then
22398 echo "$as_me:22398: result: $cf_ldd_prog" >&5
22399 echo "${ECHO_T}$cf_ldd_prog" >&6
22401 echo "$as_me:22401: result: no" >&5
22402 echo "${ECHO_T}no" >&6
22405 test -n "$cf_ldd_prog" && break
22407 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
22409 cf_rpath_list="/usr/lib /lib"
22410 if test "$cf_ldd_prog" != no
22414 cat >conftest.$ac_ext <<_ACEOF
22415 #line 22415 "configure"
22416 #include "confdefs.h"
22426 rm -f conftest.$ac_objext conftest$ac_exeext
22427 if { (eval echo "$as_me:22427: \"$ac_link\"") >&5
22428 (eval $ac_link) 2>&5
22430 echo "$as_me:22430: \$? = $ac_status" >&5
22431 (exit $ac_status); } &&
22432 { ac_try='test -s conftest$ac_exeext'
22433 { (eval echo "$as_me:22433: \"$ac_try\"") >&5
22434 (eval $ac_try) 2>&5
22436 echo "$as_me:22436: \$? = $ac_status" >&5
22437 (exit $ac_status); }; }; then
22438 cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
22439 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
22441 echo "$as_me: failed program was:" >&5
22442 cat conftest.$ac_ext >&5
22444 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22446 # If we passed the link-test, but get a "not found" on a given library,
22447 # this could be due to inept reconfiguration of gcc to make it only
22448 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
22449 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
22450 # /usr/local libraries.
22451 if test -n "$cf_rpath_oops"
22453 for cf_rpath_src in $cf_rpath_oops
22455 for cf_rpath_dir in \
22460 if test -f $cf_rpath_dir/lib/$cf_rpath_src
22462 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
22464 echo "${as_me:-configure}:22464: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
22466 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
22474 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
22476 echo "${as_me:-configure}:22476: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
22478 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
22480 echo "${as_me:-configure}:22480: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
22483 for cf_rpath_src in $LDFLAGS
22485 case $cf_rpath_src in
22488 # check if this refers to a directory which we will ignore
22490 if test -n "$cf_rpath_list"
22492 for cf_rpath_item in $cf_rpath_list
22494 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
22502 if test "$cf_rpath_skip" = no
22504 # transform the option
22505 if test "$LD_RPATH_OPT" = "-R " ; then
22506 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
22508 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
22511 # if we have not already added this, add it now
22512 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
22513 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
22515 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
22517 echo "${as_me:-configure}:22517: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
22519 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
22524 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
22526 LDFLAGS=$cf_rpath_dst
22528 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
22530 echo "${as_me:-configure}:22530: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
22532 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
22534 echo "${as_me:-configure}:22534: testing ...checking LIBS $LIBS ..." 1>&5
22537 for cf_rpath_src in $LIBS
22539 case $cf_rpath_src in
22542 # check if this refers to a directory which we will ignore
22544 if test -n "$cf_rpath_list"
22546 for cf_rpath_item in $cf_rpath_list
22548 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
22556 if test "$cf_rpath_skip" = no
22558 # transform the option
22559 if test "$LD_RPATH_OPT" = "-R " ; then
22560 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
22562 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
22565 # if we have not already added this, add it now
22566 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
22567 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
22569 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
22571 echo "${as_me:-configure}:22571: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
22573 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
22578 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
22582 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
22584 echo "${as_me:-configure}:22584: testing ...checked LIBS $LIBS ..." 1>&5
22586 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
22588 echo "${as_me:-configure}:22588: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
22591 echo "$as_me:22591: result: no" >&5
22592 echo "${ECHO_T}no" >&6
22600 ac_config_files="$ac_config_files Makefile"
22601 ac_config_commands="$ac_config_commands default"
22602 cat >confcache <<\_ACEOF
22603 # This file is a shell script that caches the results of configure
22604 # tests run on this system so they can be shared between configure
22605 # scripts and configure runs, see configure's option --config-cache.
22606 # It is not useful on other systems. If it contains results you don't
22607 # want to keep, you may remove or edit it.
22609 # config.status only pays attention to the cache file if you give it
22610 # the --recheck option to rerun configure.
22612 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22613 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22614 # following values.
22618 # The following way of writing the cache mishandles newlines in values,
22619 # but we know of no workaround that is simple, portable, and efficient.
22620 # So, don't put newlines in cache variables' values.
22621 # Ultrix sh set writes to stderr and can't be redirected directly,
22622 # and sets the high bit in the cache file unless we assign to the vars.
22625 case `(ac_space=' '; set | grep ac_space) 2>&1` in
22627 # `set' does not quote correctly, so add quotes (double-quote
22628 # substitution turns \\\\ into \\, and sed turns \\ into \).
22631 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22634 # `set' quotes correctly as required by POSIX, so do not add quotes.
22636 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22643 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22645 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22647 if cmp -s $cache_file confcache; then :; else
22648 if test -w $cache_file; then
22649 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22650 cat confcache >$cache_file
22652 echo "not updating unwritable cache $cache_file"
22657 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22658 # Let make expand exec_prefix.
22659 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22661 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22662 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22663 # trailing colons and then remove the whole line if VPATH becomes empty
22664 # (actually we leave an empty line to preserve line numbers).
22665 if test "x$srcdir" = x.; then
22666 ac_vpsub='/^[ ]*VPATH[ ]*=/{
22667 s/:*\$(srcdir):*/:/;
22668 s/:*\${srcdir}:*/:/;
22670 s/^\([^=]*=[ ]*\):*/\1/;
22676 DEFS=-DHAVE_CONFIG_H
22678 : ${CONFIG_STATUS=./config.status}
22679 ac_clean_files_save=$ac_clean_files
22680 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22681 { echo "$as_me:22681: creating $CONFIG_STATUS" >&5
22682 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22683 cat >$CONFIG_STATUS <<_ACEOF
22685 # Generated automatically by configure.
22686 # Run this file to recreate the current configuration.
22687 # Compiler output produced by configure, useful for debugging
22688 # configure, is in config.log if it exists.
22691 SHELL=\${CONFIG_SHELL-$SHELL}
22692 ac_cs_invocation="\$0 \$@"
22694 CLICOLOR_FORCE= GREP_OPTIONS=
22695 unset CLICOLOR_FORCE GREP_OPTIONS
22698 cat >>$CONFIG_STATUS <<\_ACEOF
22699 # Be Bourne compatible
22700 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22703 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22707 # Name of the executable.
22708 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22710 if expr a : '\(a\)' >/dev/null 2>&1; then
22716 rm -f conf$$ conf$$.exe conf$$.file
22718 if ln -s conf$$.file conf$$ 2>/dev/null; then
22719 # We could just check for DJGPP; but this test a) works b) is more generic
22720 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22721 if test -f conf$$.exe; then
22722 # Don't use ln at all; we don't have any links
22727 elif ln conf$$.file conf$$ 2>/dev/null; then
22732 rm -f conf$$ conf$$.exe conf$$.file
22734 as_executable_p="test -f"
22736 # Support unset when possible.
22737 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22744 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22745 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22746 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22747 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22748 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22749 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22750 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22751 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22754 # We need space, tab and new line, in precisely that order.
22760 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22766 # Files that config.status was made for.
22767 if test -n "$ac_config_files"; then
22768 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22771 if test -n "$ac_config_headers"; then
22772 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22775 if test -n "$ac_config_links"; then
22776 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22779 if test -n "$ac_config_commands"; then
22780 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22783 cat >>$CONFIG_STATUS <<\EOF
22786 \`$as_me' instantiates files from templates according to the
22787 current configuration.
22789 Usage: $0 [OPTIONS] [FILE]...
22791 -h, --help print this help, then exit
22792 -V, --version print version number, then exit
22793 -d, --debug don't remove temporary files
22794 --recheck update $as_me by reconfiguring in the same conditions
22795 --file=FILE[:TEMPLATE]
22796 instantiate the configuration file FILE
22797 --header=FILE[:TEMPLATE]
22798 instantiate the configuration header FILE
22800 Configuration files:
22803 Configuration headers:
22806 Configuration commands:
22809 Report bugs to <dickey@invisible-island.net>."
22812 cat >>$CONFIG_STATUS <<EOF
22815 configured by $0, generated by GNU Autoconf 2.52.20200802,
22816 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22818 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22819 Free Software Foundation, Inc.
22820 This config.status script is free software; the Free Software Foundation
22821 gives unlimited permission to copy, distribute and modify it."
22826 cat >>$CONFIG_STATUS <<\EOF
22827 # If no file are specified by the user, then we need to provide default
22828 # value. By we need to know if files were specified by the user.
22834 ac_option=`expr "x$1" : 'x\([^=]*\)='`
22835 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22837 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22841 *) # This is not an option, so the user has probably given explicit
22843 ac_need_defaults=false;;
22847 # Handling of the options.
22849 cat >>$CONFIG_STATUS <<EOF
22850 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22851 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22852 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22854 cat >>$CONFIG_STATUS <<\EOF
22855 --version | --vers* | -V )
22856 echo "$ac_cs_version"; exit 0 ;;
22858 # Conflict between --help and --header
22859 { { echo "$as_me:22859: error: ambiguous option: $1
22860 Try \`$0 --help' for more information." >&5
22861 echo "$as_me: error: ambiguous option: $1
22862 Try \`$0 --help' for more information." >&2;}
22863 { (exit 1); exit 1; }; };;
22864 --help | --hel | -h )
22865 echo "$ac_cs_usage"; exit 0 ;;
22866 --debug | --d* | -d )
22868 --file | --fil | --fi | --f )
22870 CONFIG_FILES="$CONFIG_FILES $1"
22871 ac_need_defaults=false;;
22872 --header | --heade | --head | --hea )
22874 CONFIG_HEADERS="$CONFIG_HEADERS $1"
22875 ac_need_defaults=false;;
22877 # This is an error.
22878 -*) { { echo "$as_me:22878: error: unrecognized option: $1
22879 Try \`$0 --help' for more information." >&5
22880 echo "$as_me: error: unrecognized option: $1
22881 Try \`$0 --help' for more information." >&2;}
22882 { (exit 1); exit 1; }; } ;;
22884 *) ac_config_targets="$ac_config_targets $1" ;;
22893 ## ----------------------- ##
22894 ## Running config.status. ##
22895 ## ----------------------- ##
22897 This file was extended by $as_me 2.52.20200802, executed with
22898 CONFIG_FILES = $CONFIG_FILES
22899 CONFIG_HEADERS = $CONFIG_HEADERS
22900 CONFIG_LINKS = $CONFIG_LINKS
22901 CONFIG_COMMANDS = $CONFIG_COMMANDS
22902 > $ac_cs_invocation
22903 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22908 cat >>$CONFIG_STATUS <<EOF
22910 # INIT-COMMANDS section.
22920 cat >>$CONFIG_STATUS <<\EOF
22921 for ac_config_target in $ac_config_targets
22923 case "$ac_config_target" in
22924 # Handling of arguments.
22925 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22926 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22927 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
22928 *) { { echo "$as_me:22928: error: invalid argument: $ac_config_target" >&5
22929 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22930 { (exit 1); exit 1; }; };;
22934 # If the user did not use the arguments to specify the items to instantiate,
22935 # then the envvar interface is used. Set only those that are not.
22936 # We use the long form for the default assignment because of an extremely
22937 # bizarre bug on SunOS 4.1.3.
22938 if $ac_need_defaults; then
22939 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22940 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22941 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22944 # Create a temporary directory, and hook for its removal unless debugging.
22947 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22948 trap '{ (exit 1); exit 1; }' 1 2 13 15
22951 # Create a (secure) tmp directory for tmp files.
22954 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
22955 test -n "$tmp" && test -d "$tmp"
22958 tmp=$TMPDIR/cs$$-$RANDOM
22959 (umask 077 && mkdir $tmp)
22962 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
22963 { (exit 1); exit 1; }
22968 cat >>$CONFIG_STATUS <<EOF
22971 # CONFIG_FILES section.
22974 # No need to generate the scripts if there are no CONFIG_FILES.
22975 # This happens for instance when ./config.status config.h
22976 if test -n "\$CONFIG_FILES"; then
22977 # Protect against being on the right side of a sed subst in config.status.
22978 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22979 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22980 s,@SHELL@,$SHELL,;t t
22981 s,@exec_prefix@,$exec_prefix,;t t
22982 s,@prefix@,$prefix,;t t
22983 s,@program_transform_name@,$program_transform_name,;t t
22984 s,@bindir@,$bindir,;t t
22985 s,@sbindir@,$sbindir,;t t
22986 s,@libexecdir@,$libexecdir,;t t
22987 s,@datarootdir@,$datarootdir,;t t
22988 s,@datadir@,$datadir,;t t
22989 s,@sysconfdir@,$sysconfdir,;t t
22990 s,@sharedstatedir@,$sharedstatedir,;t t
22991 s,@localstatedir@,$localstatedir,;t t
22992 s,@runstatedir@,$runstatedir,;t t
22993 s,@libdir@,$libdir,;t t
22994 s,@includedir@,$includedir,;t t
22995 s,@oldincludedir@,$oldincludedir,;t t
22996 s,@infodir@,$infodir,;t t
22997 s,@mandir@,$mandir,;t t
22998 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22999 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23000 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23001 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23002 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23003 s,@build_alias@,$build_alias,;t t
23004 s,@host_alias@,$host_alias,;t t
23005 s,@target_alias@,$target_alias,;t t
23006 s,@ECHO_C@,$ECHO_C,;t t
23007 s,@ECHO_N@,$ECHO_N,;t t
23008 s,@ECHO_T@,$ECHO_T,;t t
23009 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23010 s,@DEFS@,$DEFS,;t t
23011 s,@LIBS@,$LIBS,;t t
23012 s,@build@,$build,;t t
23013 s,@build_cpu@,$build_cpu,;t t
23014 s,@build_vendor@,$build_vendor,;t t
23015 s,@build_os@,$build_os,;t t
23016 s,@host@,$host,;t t
23017 s,@host_cpu@,$host_cpu,;t t
23018 s,@host_vendor@,$host_vendor,;t t
23019 s,@host_os@,$host_os,;t t
23020 s,@SET_MAKE@,$SET_MAKE,;t t
23022 s,@CFLAGS@,$CFLAGS,;t t
23023 s,@LDFLAGS@,$LDFLAGS,;t t
23024 s,@CPPFLAGS@,$CPPFLAGS,;t t
23025 s,@ac_ct_CC@,$ac_ct_CC,;t t
23026 s,@EXEEXT@,$EXEEXT,;t t
23027 s,@OBJEXT@,$OBJEXT,;t t
23028 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
23031 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23032 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23033 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
23034 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
23035 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
23036 s,@LINT@,$LINT,;t t
23037 s,@LINT_OPTS@,$LINT_OPTS,;t t
23038 s,@CTAGS@,$CTAGS,;t t
23039 s,@ETAGS@,$ETAGS,;t t
23040 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
23041 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
23042 s,@MATH_LIB@,$MATH_LIB,;t t
23043 s,@top_builddir@,$top_builddir,;t t
23044 s,@CC_G_OPT@,$CC_G_OPT,;t t
23045 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
23046 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
23047 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
23048 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
23050 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23051 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23052 s,@LD_MODEL@,$LD_MODEL,;t t
23053 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
23054 s,@LIBTOOL@,$LIBTOOL,;t t
23055 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
23056 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
23057 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
23058 s,@LIB_LINK@,$LIB_LINK,;t t
23059 s,@LINK_TESTS@,$LINK_TESTS,;t t
23060 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
23061 s,@PACKAGE@,$PACKAGE,;t t
23062 s,@PTHREAD@,$PTHREAD,;t t
23063 s,@TEST_ARGS@,$TEST_ARGS,;t t
23064 s,@TEST_DEPS@,$TEST_DEPS,;t t
23065 s,@TEST_LIBS@,$TEST_LIBS,;t t
23066 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23067 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23068 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
23069 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
23070 s,@includesubdir@,$includesubdir,;t t
23071 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
23072 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
23073 s,@ECHO_LT@,$ECHO_LT,;t t
23074 s,@ECHO_LD@,$ECHO_LD,;t t
23075 s,@RULE_CC@,$RULE_CC,;t t
23076 s,@SHOW_CC@,$SHOW_CC,;t t
23077 s,@ECHO_CC@,$ECHO_CC,;t t
23078 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
23079 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
23080 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
23081 s,@X_CFLAGS@,$X_CFLAGS,;t t
23082 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
23083 s,@X_LIBS@,$X_LIBS,;t t
23084 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
23085 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
23086 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
23087 s,@RGB_PATH@,$RGB_PATH,;t t
23088 s,@no_x11_rgb@,$no_x11_rgb,;t t
23089 s,@FORM_NAME@,$FORM_NAME,;t t
23090 s,@MENU_NAME@,$MENU_NAME,;t t
23091 s,@PANEL_NAME@,$PANEL_NAME,;t t
23092 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
23093 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
23094 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
23099 cat >>$CONFIG_STATUS <<\EOF
23100 # Split the substitutions into bite-sized pieces for seds with
23101 # small command number limits, like on Digital OSF/1 and HP-UX.
23102 ac_max_sed_lines=48
23103 ac_sed_frag=1 # Number of current file.
23104 ac_beg=1 # First line for current file.
23105 ac_end=$ac_max_sed_lines # Line after last line for current file.
23108 while $ac_more_lines; do
23109 if test $ac_beg -gt 1; then
23110 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23112 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23114 if test ! -s $tmp/subs.frag; then
23115 ac_more_lines=false
23117 # The purpose of the label and of the branching condition is to
23118 # speed up the sed processing (if there are no `@' at all, there
23119 # is no need to browse any of the substitutions).
23120 # These are the two extra sed commands mentioned above.
23122 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23123 # It is possible to make a multiline substitution using escaped newlines.
23124 # Ensure that we do not split the substitution between script fragments.
23126 ac_END=`expr $ac_end + $ac_max_sed_lines`
23127 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
23128 if test -s $tmp/subs.next; then
23129 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
23130 if test ! -s $tmp/subs.edit; then
23131 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
23132 if test ! -s $tmp/subs.edit; then
23133 if test $ac_beg -gt 1; then
23134 ac_end=`expr $ac_end - 1`
23141 if test -z "$ac_sed_cmds"; then
23142 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23144 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23146 ac_sed_frag=`expr $ac_sed_frag + 1`
23148 ac_end=`expr $ac_end + $ac_max_sed_lines`
23151 if test -z "$ac_sed_cmds"; then
23154 fi # test -n "$CONFIG_FILES"
23157 cat >>$CONFIG_STATUS <<\EOF
23158 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23159 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23161 - | *:- | *:-:* ) # input from stdin
23163 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23164 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23165 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23166 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23167 * ) ac_file_in=$ac_file.in ;;
23170 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23171 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23172 X"$ac_file" : 'X\(//\)[^/]' \| \
23173 X"$ac_file" : 'X\(//\)$' \| \
23174 X"$ac_file" : 'X\(/\)' \| \
23175 . : '\(.\)' 2>/dev/null ||
23177 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23178 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23179 /^X\(\/\/\)$/{ s//\1/; q; }
23180 /^X\(\/\).*/{ s//\1/; q; }
23182 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23183 { case "$ac_dir" in
23184 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23188 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23189 case $as_mkdir_dir in
23190 # Skip DOS drivespec
23191 ?:) as_incr_dir=$as_mkdir_dir ;;
23193 as_incr_dir=$as_incr_dir/$as_mkdir_dir
23194 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23199 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23200 # A "../" for each directory in $ac_dir_suffix.
23201 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23203 ac_dir_suffix= ac_dots=
23208 if test -z "$ac_dots"; then
23211 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
23213 [\\/]* | ?:[\\/]* )
23214 ac_srcdir=$srcdir$ac_dir_suffix;
23215 ac_top_srcdir=$srcdir ;;
23216 *) # Relative path.
23217 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
23218 ac_top_srcdir=$ac_dots$srcdir ;;
23222 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23223 *) ac_INSTALL=$ac_dots$INSTALL ;;
23226 if test x"$ac_file" != x-; then
23227 { echo "$as_me:23227: creating $ac_file" >&5
23228 echo "$as_me: creating $ac_file" >&6;}
23231 # Let's still pretend it is `configure' which instantiates (i.e., don't
23232 # use $as_me), people would be surprised to read:
23233 # /* config.h. Generated automatically by config.status. */
23234 configure_input="Generated automatically from `echo $ac_file_in |
23235 sed 's,.*/,,'` by configure."
23237 # First look for the input files in the build tree, otherwise in the
23239 ac_file_inputs=`IFS=:
23240 for f in $ac_file_in; do
23242 -) echo $tmp/stdin ;;
23244 # Absolute (can't be DOS-style, as IFS=:)
23245 test -f "$f" || { { echo "$as_me:23245: error: cannot find input file: $f" >&5
23246 echo "$as_me: error: cannot find input file: $f" >&2;}
23247 { (exit 1); exit 1; }; }
23250 if test -f "$f"; then
23253 elif test -f "$srcdir/$f"; then
23258 { { echo "$as_me:23258: error: cannot find input file: $f" >&5
23259 echo "$as_me: error: cannot find input file: $f" >&2;}
23260 { (exit 1); exit 1; }; }
23263 done` || { (exit 1); exit 1; }
23265 cat >>$CONFIG_STATUS <<\EOF
23266 ac_warn_datarootdir=no
23267 if test x"$ac_file" != x-; then
23268 for ac_item in $ac_file_inputs
23270 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
23271 if test -n "$ac_seen"; then
23272 ac_used=`grep '@datarootdir@' $ac_item`
23273 if test -z "$ac_used"; then
23274 { echo "$as_me:23274: WARNING: datarootdir was used implicitly but not set:
23276 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23278 ac_warn_datarootdir=yes
23281 ac_seen=`grep '${datarootdir}' $ac_item`
23282 if test -n "$ac_seen"; then
23283 { echo "$as_me:23283: WARNING: datarootdir was used explicitly but not set:
23285 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23287 ac_warn_datarootdir=yes
23292 if test "x$ac_warn_datarootdir" = xyes; then
23293 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23297 cat >>$CONFIG_STATUS <<EOF
23301 cat >>$CONFIG_STATUS <<\EOF
23303 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23304 s,@configure_input@,$configure_input,;t t
23305 s,@srcdir@,$ac_srcdir,;t t
23306 s,@top_srcdir@,$ac_top_srcdir,;t t
23307 s,@INSTALL@,$ac_INSTALL,;t t
23308 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23310 if test x"$ac_file" != x-; then
23311 cp $tmp/out $ac_file
23313 for ac_name in prefix exec_prefix datarootdir
23315 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
23316 if test -n "$ac_seen"; then
23317 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
23318 if test -z "$ac_init"; then
23319 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23320 { echo "$as_me:23320: WARNING: Variable $ac_name is used but was not set:
23322 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23327 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
23328 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
23329 if test -s $tmp/out; then
23330 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23331 { echo "$as_me:23331: WARNING: Some variables may not be substituted:
23333 echo "$as_me: WARNING: Some variables may not be substituted:
23343 cat >>$CONFIG_STATUS <<\EOF
23346 # CONFIG_HEADER section.
23349 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23350 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23352 # ac_d sets the value in "#define NAME VALUE" lines.
23353 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
23354 ac_dB='[ ].*$,\1#\2'
23357 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23358 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
23359 ac_iB='\([ ]\),\1#\2define\3'
23362 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23363 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
23364 ac_uB='$,\1#\2define\3'
23368 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23369 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23371 - | *:- | *:-:* ) # input from stdin
23373 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23374 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23375 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23376 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23377 * ) ac_file_in=$ac_file.in ;;
23380 test x"$ac_file" != x- && { echo "$as_me:23380: creating $ac_file" >&5
23381 echo "$as_me: creating $ac_file" >&6;}
23383 # First look for the input files in the build tree, otherwise in the
23385 ac_file_inputs=`IFS=:
23386 for f in $ac_file_in; do
23388 -) echo $tmp/stdin ;;
23390 # Absolute (can't be DOS-style, as IFS=:)
23391 test -f "$f" || { { echo "$as_me:23391: error: cannot find input file: $f" >&5
23392 echo "$as_me: error: cannot find input file: $f" >&2;}
23393 { (exit 1); exit 1; }; }
23396 if test -f "$f"; then
23399 elif test -f "$srcdir/$f"; then
23404 { { echo "$as_me:23404: error: cannot find input file: $f" >&5
23405 echo "$as_me: error: cannot find input file: $f" >&2;}
23406 { (exit 1); exit 1; }; }
23409 done` || { (exit 1); exit 1; }
23410 # Remove the trailing spaces.
23411 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
23415 # Transform confdefs.h into a list of #define's. We won't use it as a sed
23416 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
23417 # be either 'cat' or 'sort'.
23418 cat confdefs.h | uniq >conftest.vals
23420 # Break up conftest.vals because some shells have a limit on
23421 # the size of here documents, and old seds have small limits too.
23423 rm -f conftest.tail
23424 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
23425 while grep . conftest.vals >/dev/null
23427 # Write chunks of a limited-size here document to conftest.frag.
23428 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
23429 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
23430 echo 'CEOF' >> $CONFIG_STATUS
23431 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23432 rm -f conftest.vals
23433 mv conftest.tail conftest.vals
23435 rm -f conftest.vals
23437 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23439 echo ' cat >> conftest.edit <<CEOF
23440 /@DEFS@/r conftest.frag
23443 sed -f conftest.edit $tmp/in > $tmp/out
23445 mv $tmp/out $tmp/in
23446 rm -f conftest.edit conftest.frag
23447 ' >> $CONFIG_STATUS
23449 cat >>$CONFIG_STATUS <<\EOF
23450 # Let's still pretend it is `configure' which instantiates (i.e., don't
23451 # use $as_me), people would be surprised to read:
23452 # /* config.h. Generated automatically by config.status. */
23453 if test x"$ac_file" = x-; then
23454 echo "/* Generated automatically by configure. */" >$tmp/config.h
23456 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
23458 cat $tmp/in >>$tmp/config.h
23460 if test x"$ac_file" != x-; then
23461 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
23462 { echo "$as_me:23462: $ac_file is unchanged" >&5
23463 echo "$as_me: $ac_file is unchanged" >&6;}
23465 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23466 X"$ac_file" : 'X\(//\)[^/]' \| \
23467 X"$ac_file" : 'X\(//\)$' \| \
23468 X"$ac_file" : 'X\(/\)' \| \
23469 . : '\(.\)' 2>/dev/null ||
23471 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23472 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23473 /^X\(\/\/\)$/{ s//\1/; q; }
23474 /^X\(\/\).*/{ s//\1/; q; }
23476 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23477 { case "$ac_dir" in
23478 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23482 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23483 case $as_mkdir_dir in
23484 # Skip DOS drivespec
23485 ?:) as_incr_dir=$as_mkdir_dir ;;
23487 as_incr_dir=$as_incr_dir/$as_mkdir_dir
23488 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23495 mv $tmp/config.h $ac_file
23499 rm -f $tmp/config.h
23503 cat >>$CONFIG_STATUS <<\EOF
23505 # CONFIG_COMMANDS section.
23507 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23508 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23509 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23516 if test ! -d $srcdir/$cf_dir; then
23518 elif test -f $srcdir/$cf_dir/programs; then
23519 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23523 cat >>Makefile <<TEST_EOF
23525 # These rules are generated so we do not rely on suffix rules, which do not
23526 # work consistently for different make-programs (the '\$(MODEL)/' confuses
23527 # some, and the '\$x' confuses others).
23530 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
23533 cat >>Makefile <<TEST_EOF
23535 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
23536 \$(srcdir)/test.priv.h \\
23539 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) -DMODULE_NAME="$N" \$(srcdir)/$N.c
23543 if test -f ../config.guess && test -f ../config.sub
23545 cat >>Makefile <<TEST_EOF
23547 # if we used CF_INHERIT for getting these files, we can remove them
23549 rm -f config.guess config.sub
23557 cat >>$CONFIG_STATUS <<\EOF
23559 { (exit 0); exit 0; }
23561 chmod +x $CONFIG_STATUS
23562 ac_clean_files=$ac_clean_files_save
23564 # configure is writing to config.log, and then calls config.status.
23565 # config.status does its own redirection, appending to config.log.
23566 # Unfortunately, on DOS this fails, as config.log is still kept open
23567 # by configure, so config.status won't be able to write to it; its
23568 # output is simply discarded. So we exec the FD to /dev/null,
23569 # effectively closing config.log, so it can be properly (re)opened and
23570 # appended to by config.status. When coming back to configure, we
23571 # need to make the FD available again.
23572 if test "$no_create" != yes; then
23575 $SHELL $CONFIG_STATUS || ac_cs_success=false
23577 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23578 # would make configure fail if this is the last instruction.
23579 $ac_cs_success || { (exit 1); exit 1; }