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 cat >conftest.$ac_ext <<_ACEOF
1922 #line 1922 "configure"
1923 #include "confdefs.h"
1938 rm -f conftest.$ac_objext
1939 if { (eval echo "$as_me:1939: \"$ac_compile\"") >&5
1940 (eval $ac_compile) 2>&5
1942 echo "$as_me:1942: \$? = $ac_status" >&5
1943 (exit $ac_status); } &&
1944 { ac_try='test -s conftest.$ac_objext'
1945 { (eval echo "$as_me:1945: \"$ac_try\"") >&5
1948 echo "$as_me:1948: \$? = $ac_status" >&5
1949 (exit $ac_status); }; }; then
1953 echo "$as_me: failed program was:" >&5
1954 cat conftest.$ac_ext >&5
1956 rm -f conftest.$ac_objext conftest.$ac_ext
1957 CFLAGS="$cf_save_CFLAGS"
1958 echo "$as_me:1958: result: $CLANG_COMPILER" >&5
1959 echo "${ECHO_T}$CLANG_COMPILER" >&6
1962 if test "x$CLANG_COMPILER" = "xyes" ; then
1963 for cf_clang_opt in \
1964 -Qunused-arguments \
1965 -Wno-error=implicit-function-declaration
1967 echo "$as_me:1967: checking if option $cf_clang_opt works" >&5
1968 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
1969 cat >conftest.$ac_ext <<_ACEOF
1970 #line 1970 "configure"
1971 #include "confdefs.h"
1983 rm -f conftest.$ac_objext conftest$ac_exeext
1984 if { (eval echo "$as_me:1984: \"$ac_link\"") >&5
1985 (eval $ac_link) 2>&5
1987 echo "$as_me:1987: \$? = $ac_status" >&5
1988 (exit $ac_status); } &&
1989 { ac_try='test -s conftest$ac_exeext'
1990 { (eval echo "$as_me:1990: \"$ac_try\"") >&5
1993 echo "$as_me:1993: \$? = $ac_status" >&5
1994 (exit $ac_status); }; }; then
1998 echo "$as_me: failed program was:" >&5
1999 cat conftest.$ac_ext >&5
2003 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2004 echo "$as_me:2004: result: $cf_clang_optok" >&5
2005 echo "${ECHO_T}$cf_clang_optok" >&6
2006 if test $cf_clang_optok = yes; then
2007 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2009 echo "${as_me:-configure}:2009: testing adding option $cf_clang_opt ..." 1>&5
2011 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2012 CFLAGS="${CFLAGS}$cf_clang_opt"
2018 echo "$as_me:2018: checking for $CC option to accept ANSI C" >&5
2019 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2020 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2021 echo $ECHO_N "(cached) $ECHO_C" >&6
2023 ac_cv_prog_cc_stdc=no
2025 cat >conftest.$ac_ext <<_ACEOF
2026 #line 2026 "configure"
2027 #include "confdefs.h"
2030 #include <sys/types.h>
2031 #include <sys/stat.h>
2032 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2033 struct buf { int x; };
2034 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2035 static char *e (p, i)
2041 static char *f (char * (*g) (char **, int), char **p, ...)
2046 s = g (p, va_arg (v,int));
2050 int test (int i, double x);
2051 struct s1 {int (*f) (int a);};
2052 struct s2 {int (*f) (double a);};
2053 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2059 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2064 # Don't try gcc -ansi; that turns off useful extensions and
2065 # breaks some systems' header files.
2066 # AIX -qlanglvl=ansi
2067 # Ultrix and OSF/1 -std1
2068 # HP-UX 10.20 and later -Ae
2069 # HP-UX older versions -Aa -D_HPUX_SOURCE
2070 # SVR4 -Xc -D__EXTENSIONS__
2071 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2073 CC="$ac_save_CC $ac_arg"
2074 rm -f conftest.$ac_objext
2075 if { (eval echo "$as_me:2075: \"$ac_compile\"") >&5
2076 (eval $ac_compile) 2>&5
2078 echo "$as_me:2078: \$? = $ac_status" >&5
2079 (exit $ac_status); } &&
2080 { ac_try='test -s conftest.$ac_objext'
2081 { (eval echo "$as_me:2081: \"$ac_try\"") >&5
2084 echo "$as_me:2084: \$? = $ac_status" >&5
2085 (exit $ac_status); }; }; then
2086 ac_cv_prog_cc_stdc=$ac_arg
2089 echo "$as_me: failed program was:" >&5
2090 cat conftest.$ac_ext >&5
2092 rm -f conftest.$ac_objext
2094 rm -f conftest.$ac_ext conftest.$ac_objext
2099 case "x$ac_cv_prog_cc_stdc" in
2101 echo "$as_me:2101: result: none needed" >&5
2102 echo "${ECHO_T}none needed" >&6 ;;
2104 echo "$as_me:2104: result: $ac_cv_prog_cc_stdc" >&5
2105 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2106 CC="$CC $ac_cv_prog_cc_stdc" ;;
2109 # This should have been defined by AC_PROG_CC
2112 echo "$as_me:2112: checking \$CFLAGS variable" >&5
2113 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2116 echo "$as_me:2116: result: broken" >&5
2117 echo "${ECHO_T}broken" >&6
2118 { echo "$as_me:2118: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2119 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2122 for cf_arg in $cf_flags
2128 cf_new_extra_cppflags=
2130 for cf_add_cflags in $cf_arg
2132 case $cf_fix_cppflags in
2134 case $cf_add_cflags in
2135 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2136 case $cf_add_cflags in
2138 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2140 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2141 && test -z "${cf_tst_cflags}" \
2142 && cf_fix_cppflags=yes
2144 if test $cf_fix_cppflags = yes ; then
2146 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2147 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2150 elif test "${cf_tst_cflags}" = "\"'" ; then
2152 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2153 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2163 case $cf_add_cflags in
2165 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2167 CPPFLAGS=`echo "$CPPFLAGS" | \
2168 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2169 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2174 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2175 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2182 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2183 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2190 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2191 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2193 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2195 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2196 && test -z "${cf_tst_cflags}" \
2197 && cf_fix_cppflags=no
2202 if test -n "$cf_new_cflags" ; then
2204 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2205 CFLAGS="${CFLAGS}$cf_new_cflags"
2209 if test -n "$cf_new_cppflags" ; then
2211 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2212 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2216 if test -n "$cf_new_extra_cppflags" ; then
2218 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2219 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2226 echo "$as_me:2226: result: ok" >&5
2227 echo "${ECHO_T}ok" >&6
2231 echo "$as_me:2231: checking \$CC variable" >&5
2232 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2235 echo "$as_me:2235: result: broken" >&5
2236 echo "${ECHO_T}broken" >&6
2237 { echo "$as_me:2237: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2238 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2240 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2241 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2243 for cf_arg in $cf_flags
2251 cf_new_extra_cppflags=
2253 for cf_add_cflags in $cf_arg
2255 case $cf_fix_cppflags in
2257 case $cf_add_cflags in
2258 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2259 case $cf_add_cflags in
2261 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2263 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2264 && test -z "${cf_tst_cflags}" \
2265 && cf_fix_cppflags=yes
2267 if test $cf_fix_cppflags = yes ; then
2269 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2270 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2273 elif test "${cf_tst_cflags}" = "\"'" ; then
2275 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2276 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2286 case $cf_add_cflags in
2288 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2290 CPPFLAGS=`echo "$CPPFLAGS" | \
2291 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2292 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2297 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2298 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2305 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2306 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2313 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2314 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2316 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2318 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2319 && test -z "${cf_tst_cflags}" \
2320 && cf_fix_cppflags=no
2325 if test -n "$cf_new_cflags" ; then
2327 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2328 CFLAGS="${CFLAGS}$cf_new_cflags"
2332 if test -n "$cf_new_cppflags" ; then
2334 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2335 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2339 if test -n "$cf_new_extra_cppflags" ; then
2341 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2342 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2352 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2354 echo "${as_me:-configure}:2354: testing resulting CC: '$CC' ..." 1>&5
2356 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2358 echo "${as_me:-configure}:2358: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2360 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2362 echo "${as_me:-configure}:2362: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2366 echo "$as_me:2366: result: ok" >&5
2367 echo "${ECHO_T}ok" >&6
2371 echo "$as_me:2371: checking for inline" >&5
2372 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2373 if test "${ac_cv_c_inline+set}" = set; then
2374 echo $ECHO_N "(cached) $ECHO_C" >&6
2377 for ac_kw in inline __inline__ __inline; do
2378 cat >conftest.$ac_ext <<_ACEOF
2379 #line 2379 "configure"
2380 #include "confdefs.h"
2382 static $ac_kw int static_foo () {return 0; }
2383 $ac_kw int foo () {return 0; }
2387 rm -f conftest.$ac_objext
2388 if { (eval echo "$as_me:2388: \"$ac_compile\"") >&5
2389 (eval $ac_compile) 2>&5
2391 echo "$as_me:2391: \$? = $ac_status" >&5
2392 (exit $ac_status); } &&
2393 { ac_try='test -s conftest.$ac_objext'
2394 { (eval echo "$as_me:2394: \"$ac_try\"") >&5
2397 echo "$as_me:2397: \$? = $ac_status" >&5
2398 (exit $ac_status); }; }; then
2399 ac_cv_c_inline=$ac_kw; break
2401 echo "$as_me: failed program was:" >&5
2402 cat conftest.$ac_ext >&5
2404 rm -f conftest.$ac_objext conftest.$ac_ext
2408 echo "$as_me:2408: result: $ac_cv_c_inline" >&5
2409 echo "${ECHO_T}$ac_cv_c_inline" >&6
2410 case $ac_cv_c_inline in
2413 cat >>confdefs.h <<\EOF
2417 *) cat >>confdefs.h <<EOF
2418 #define inline $ac_cv_c_inline
2424 ac_cpp='$CPP $CPPFLAGS'
2425 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2426 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2427 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2428 ac_main_return=return
2429 echo "$as_me:2429: checking how to run the C preprocessor" >&5
2430 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2431 # On Suns, sometimes $CPP names a directory.
2432 if test -n "$CPP" && test -d "$CPP"; then
2435 if test -z "$CPP"; then
2436 if test "${ac_cv_prog_CPP+set}" = set; then
2437 echo $ECHO_N "(cached) $ECHO_C" >&6
2439 # Double quotes because CPP needs to be expanded
2440 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2443 for ac_c_preproc_warn_flag in '' yes
2445 # Use a header file that comes with gcc, so configuring glibc
2446 # with a fresh cross-compiler works.
2447 # On the NeXT, cc -E runs the code through the compiler's parser,
2448 # not just through cpp. "Syntax error" is here to catch this case.
2449 cat >conftest.$ac_ext <<_ACEOF
2450 #line 2450 "configure"
2451 #include "confdefs.h"
2455 if { (eval echo "$as_me:2455: \"$ac_cpp conftest.$ac_ext\"") >&5
2456 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2458 egrep -v '^ *\+' conftest.er1 >conftest.err
2460 cat conftest.err >&5
2461 echo "$as_me:2461: \$? = $ac_status" >&5
2462 (exit $ac_status); } >/dev/null; then
2463 if test -s conftest.err; then
2464 ac_cpp_err=$ac_c_preproc_warn_flag
2471 if test -z "$ac_cpp_err"; then
2474 echo "$as_me: failed program was:" >&5
2475 cat conftest.$ac_ext >&5
2476 # Broken: fails on valid input.
2479 rm -f conftest.err conftest.$ac_ext
2481 # OK, works on sane cases. Now check whether non-existent headers
2482 # can be detected and how.
2483 cat >conftest.$ac_ext <<_ACEOF
2484 #line 2484 "configure"
2485 #include "confdefs.h"
2486 #include <ac_nonexistent.h>
2488 if { (eval echo "$as_me:2488: \"$ac_cpp conftest.$ac_ext\"") >&5
2489 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2491 egrep -v '^ *\+' conftest.er1 >conftest.err
2493 cat conftest.err >&5
2494 echo "$as_me:2494: \$? = $ac_status" >&5
2495 (exit $ac_status); } >/dev/null; then
2496 if test -s conftest.err; then
2497 ac_cpp_err=$ac_c_preproc_warn_flag
2504 if test -z "$ac_cpp_err"; then
2505 # Broken: success on invalid input.
2508 echo "$as_me: failed program was:" >&5
2509 cat conftest.$ac_ext >&5
2510 # Passes both tests.
2514 rm -f conftest.err conftest.$ac_ext
2517 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2518 rm -f conftest.err conftest.$ac_ext
2519 if $ac_preproc_ok; then
2531 echo "$as_me:2531: result: $CPP" >&5
2532 echo "${ECHO_T}$CPP" >&6
2534 for ac_c_preproc_warn_flag in '' yes
2536 # Use a header file that comes with gcc, so configuring glibc
2537 # with a fresh cross-compiler works.
2538 # On the NeXT, cc -E runs the code through the compiler's parser,
2539 # not just through cpp. "Syntax error" is here to catch this case.
2540 cat >conftest.$ac_ext <<_ACEOF
2541 #line 2541 "configure"
2542 #include "confdefs.h"
2546 if { (eval echo "$as_me:2546: \"$ac_cpp conftest.$ac_ext\"") >&5
2547 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2549 egrep -v '^ *\+' conftest.er1 >conftest.err
2551 cat conftest.err >&5
2552 echo "$as_me:2552: \$? = $ac_status" >&5
2553 (exit $ac_status); } >/dev/null; then
2554 if test -s conftest.err; then
2555 ac_cpp_err=$ac_c_preproc_warn_flag
2562 if test -z "$ac_cpp_err"; then
2565 echo "$as_me: failed program was:" >&5
2566 cat conftest.$ac_ext >&5
2567 # Broken: fails on valid input.
2570 rm -f conftest.err conftest.$ac_ext
2572 # OK, works on sane cases. Now check whether non-existent headers
2573 # can be detected and how.
2574 cat >conftest.$ac_ext <<_ACEOF
2575 #line 2575 "configure"
2576 #include "confdefs.h"
2577 #include <ac_nonexistent.h>
2579 if { (eval echo "$as_me:2579: \"$ac_cpp conftest.$ac_ext\"") >&5
2580 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2582 egrep -v '^ *\+' conftest.er1 >conftest.err
2584 cat conftest.err >&5
2585 echo "$as_me:2585: \$? = $ac_status" >&5
2586 (exit $ac_status); } >/dev/null; then
2587 if test -s conftest.err; then
2588 ac_cpp_err=$ac_c_preproc_warn_flag
2595 if test -z "$ac_cpp_err"; then
2596 # Broken: success on invalid input.
2599 echo "$as_me: failed program was:" >&5
2600 cat conftest.$ac_ext >&5
2601 # Passes both tests.
2605 rm -f conftest.err conftest.$ac_ext
2608 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2609 rm -f conftest.err conftest.$ac_ext
2610 if $ac_preproc_ok; then
2613 { { echo "$as_me:2613: error: C preprocessor \"$CPP\" fails sanity check" >&5
2614 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2615 { (exit 1); exit 1; }; }
2619 ac_cpp='$CPP $CPPFLAGS'
2620 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2621 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2622 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2623 ac_main_return=return
2625 for ac_prog in mawk gawk nawk awk
2627 # Extract the first word of "$ac_prog", so it can be a program name with args.
2628 set dummy $ac_prog; ac_word=$2
2629 echo "$as_me:2629: checking for $ac_word" >&5
2630 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2631 if test "${ac_cv_prog_AWK+set}" = set; then
2632 echo $ECHO_N "(cached) $ECHO_C" >&6
2634 if test -n "$AWK"; then
2635 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2637 ac_save_IFS=$IFS; IFS=$ac_path_separator
2639 for ac_dir in $ac_dummy; do
2641 test -z "$ac_dir" && ac_dir=.
2642 $as_executable_p "$ac_dir/$ac_word" || continue
2643 ac_cv_prog_AWK="$ac_prog"
2644 echo "$as_me:2644: found $ac_dir/$ac_word" >&5
2651 if test -n "$AWK"; then
2652 echo "$as_me:2652: result: $AWK" >&5
2653 echo "${ECHO_T}$AWK" >&6
2655 echo "$as_me:2655: result: no" >&5
2656 echo "${ECHO_T}no" >&6
2659 test -n "$AWK" && break
2662 # Find a good install program. We prefer a C program (faster),
2663 # so one script is as good as another. But avoid the broken or
2664 # incompatible versions:
2665 # SysV /etc/install, /usr/sbin/install
2666 # SunOS /usr/etc/install
2667 # IRIX /sbin/install
2669 # AmigaOS /C/install, which installs bootblocks on floppy discs
2670 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2671 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2672 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2673 # ./install, which can be erroneously created by make from ./install.sh.
2674 echo "$as_me:2674: checking for a BSD compatible install" >&5
2675 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2676 if test -z "$INSTALL"; then
2677 if test "${ac_cv_path_install+set}" = set; then
2678 echo $ECHO_N "(cached) $ECHO_C" >&6
2680 ac_save_IFS=$IFS; IFS=$ac_path_separator
2681 for ac_dir in $PATH; do
2683 # Account for people who put trailing slashes in PATH elements.
2685 / | ./ | .// | /cC/* \
2686 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2689 # OSF1 and SCO ODT 3.0 have their own names for install.
2690 # Don't use installbsd from OSF since it installs stuff as root
2692 for ac_prog in ginstall scoinst install; do
2693 if $as_executable_p "$ac_dir/$ac_prog"; then
2694 if test $ac_prog = install &&
2695 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2696 # AIX install. It has an incompatible calling convention.
2698 elif test $ac_prog = install &&
2699 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2700 # program-specific install script used by HP pwplus--don't use.
2703 ac_cv_path_install="$ac_dir/$ac_prog -c"
2713 if test "${ac_cv_path_install+set}" = set; then
2714 INSTALL=$ac_cv_path_install
2716 # As a last resort, use the slow shell script. We don't cache a
2717 # path for INSTALL within a source directory, because that will
2718 # break other packages using the cache if that directory is
2719 # removed, or if the path is relative.
2720 INSTALL=$ac_install_sh
2723 echo "$as_me:2723: result: $INSTALL" >&5
2724 echo "${ECHO_T}$INSTALL" >&6
2726 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2727 # It thinks the first close brace ends the variable substitution.
2728 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2730 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2732 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2738 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2739 test -z "$cf_dir" && cf_dir=.
2740 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2744 echo "$as_me:2744: checking if you want to install stripped executables" >&5
2745 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2747 # Check whether --enable-stripping or --disable-stripping was given.
2748 if test "${enable_stripping+set}" = set; then
2749 enableval="$enable_stripping"
2750 test "$enableval" != no && enableval=yes
2751 if test "$enableval" != "yes" ; then
2761 echo "$as_me:2761: result: $with_stripping" >&5
2762 echo "${ECHO_T}$with_stripping" >&6
2764 if test "$with_stripping" = yes
2771 : ${INSTALL:=install}
2772 echo "$as_me:2772: checking if install accepts -p option" >&5
2773 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
2774 if test "${cf_cv_install_p+set}" = set; then
2775 echo $ECHO_N "(cached) $ECHO_C" >&6
2782 if $INSTALL -p conftest.in conftest.out 2>/dev/null
2784 if test -f conftest.out/conftest.in
2786 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
2787 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
2788 if test -s conftest.err
2803 echo "$as_me:2803: result: $cf_cv_install_p" >&5
2804 echo "${ECHO_T}$cf_cv_install_p" >&6
2806 echo "$as_me:2806: checking if install needs to be told about ownership" >&5
2807 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
2808 case `$ac_config_guess` in
2817 echo "$as_me:2817: result: $with_install_o" >&5
2818 echo "${ECHO_T}$with_install_o" >&6
2819 if test "x$with_install_o" = xyes
2821 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'`
2826 for ac_prog in lint cppcheck splint
2828 # Extract the first word of "$ac_prog", so it can be a program name with args.
2829 set dummy $ac_prog; ac_word=$2
2830 echo "$as_me:2830: checking for $ac_word" >&5
2831 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2832 if test "${ac_cv_prog_LINT+set}" = set; then
2833 echo $ECHO_N "(cached) $ECHO_C" >&6
2835 if test -n "$LINT"; then
2836 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2838 ac_save_IFS=$IFS; IFS=$ac_path_separator
2840 for ac_dir in $ac_dummy; do
2842 test -z "$ac_dir" && ac_dir=.
2843 $as_executable_p "$ac_dir/$ac_word" || continue
2844 ac_cv_prog_LINT="$ac_prog"
2845 echo "$as_me:2845: found $ac_dir/$ac_word" >&5
2851 LINT=$ac_cv_prog_LINT
2852 if test -n "$LINT"; then
2853 echo "$as_me:2853: result: $LINT" >&5
2854 echo "${ECHO_T}$LINT" >&6
2856 echo "$as_me:2856: result: no" >&5
2857 echo "${ECHO_T}no" >&6
2860 test -n "$LINT" && break
2864 (xcppcheck|x*/cppcheck)
2865 test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
2869 echo "$as_me:2869: checking if filesystem supports mixed-case filenames" >&5
2870 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2871 if test "${cf_cv_mixedcase+set}" = set; then
2872 echo $ECHO_N "(cached) $ECHO_C" >&6
2875 if test "$cross_compiling" = yes ; then
2876 case $target_alias in
2877 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2885 rm -f conftest CONFTEST
2887 if test -f CONFTEST ; then
2892 rm -f conftest CONFTEST
2896 echo "$as_me:2896: result: $cf_cv_mixedcase" >&5
2897 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2898 test "$cf_cv_mixedcase" = yes &&
2899 cat >>confdefs.h <<\EOF
2900 #define MIXEDCASE_FILENAMES 1
2903 for ac_prog in exctags ctags
2905 # Extract the first word of "$ac_prog", so it can be a program name with args.
2906 set dummy $ac_prog; ac_word=$2
2907 echo "$as_me:2907: checking for $ac_word" >&5
2908 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2909 if test "${ac_cv_prog_CTAGS+set}" = set; then
2910 echo $ECHO_N "(cached) $ECHO_C" >&6
2912 if test -n "$CTAGS"; then
2913 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2915 ac_save_IFS=$IFS; IFS=$ac_path_separator
2917 for ac_dir in $ac_dummy; do
2919 test -z "$ac_dir" && ac_dir=.
2920 $as_executable_p "$ac_dir/$ac_word" || continue
2921 ac_cv_prog_CTAGS="$ac_prog"
2922 echo "$as_me:2922: found $ac_dir/$ac_word" >&5
2928 CTAGS=$ac_cv_prog_CTAGS
2929 if test -n "$CTAGS"; then
2930 echo "$as_me:2930: result: $CTAGS" >&5
2931 echo "${ECHO_T}$CTAGS" >&6
2933 echo "$as_me:2933: result: no" >&5
2934 echo "${ECHO_T}no" >&6
2937 test -n "$CTAGS" && break
2940 for ac_prog in exetags etags
2942 # Extract the first word of "$ac_prog", so it can be a program name with args.
2943 set dummy $ac_prog; ac_word=$2
2944 echo "$as_me:2944: checking for $ac_word" >&5
2945 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2946 if test "${ac_cv_prog_ETAGS+set}" = set; then
2947 echo $ECHO_N "(cached) $ECHO_C" >&6
2949 if test -n "$ETAGS"; then
2950 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2952 ac_save_IFS=$IFS; IFS=$ac_path_separator
2954 for ac_dir in $ac_dummy; do
2956 test -z "$ac_dir" && ac_dir=.
2957 $as_executable_p "$ac_dir/$ac_word" || continue
2958 ac_cv_prog_ETAGS="$ac_prog"
2959 echo "$as_me:2959: found $ac_dir/$ac_word" >&5
2965 ETAGS=$ac_cv_prog_ETAGS
2966 if test -n "$ETAGS"; then
2967 echo "$as_me:2967: result: $ETAGS" >&5
2968 echo "${ECHO_T}$ETAGS" >&6
2970 echo "$as_me:2970: result: no" >&5
2971 echo "${ECHO_T}no" >&6
2974 test -n "$ETAGS" && break
2977 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2978 set dummy ${CTAGS:-ctags}; ac_word=$2
2979 echo "$as_me:2979: checking for $ac_word" >&5
2980 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2981 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2982 echo $ECHO_N "(cached) $ECHO_C" >&6
2984 if test -n "$MAKE_LOWER_TAGS"; then
2985 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2987 ac_save_IFS=$IFS; IFS=$ac_path_separator
2989 for ac_dir in $ac_dummy; do
2991 test -z "$ac_dir" && ac_dir=.
2992 $as_executable_p "$ac_dir/$ac_word" || continue
2993 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2994 echo "$as_me:2994: found $ac_dir/$ac_word" >&5
2998 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3001 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3002 if test -n "$MAKE_LOWER_TAGS"; then
3003 echo "$as_me:3003: result: $MAKE_LOWER_TAGS" >&5
3004 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3006 echo "$as_me:3006: result: no" >&5
3007 echo "${ECHO_T}no" >&6
3010 if test "$cf_cv_mixedcase" = yes ; then
3011 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3012 set dummy ${ETAGS:-etags}; ac_word=$2
3013 echo "$as_me:3013: checking for $ac_word" >&5
3014 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3015 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3016 echo $ECHO_N "(cached) $ECHO_C" >&6
3018 if test -n "$MAKE_UPPER_TAGS"; then
3019 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3021 ac_save_IFS=$IFS; IFS=$ac_path_separator
3023 for ac_dir in $ac_dummy; do
3025 test -z "$ac_dir" && ac_dir=.
3026 $as_executable_p "$ac_dir/$ac_word" || continue
3027 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3028 echo "$as_me:3028: found $ac_dir/$ac_word" >&5
3032 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3035 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3036 if test -n "$MAKE_UPPER_TAGS"; then
3037 echo "$as_me:3037: result: $MAKE_UPPER_TAGS" >&5
3038 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3040 echo "$as_me:3040: result: no" >&5
3041 echo "${ECHO_T}no" >&6
3048 if test "$MAKE_UPPER_TAGS" = yes ; then
3054 if test "$MAKE_LOWER_TAGS" = yes ; then
3060 echo "$as_me:3060: checking if -lm needed for math functions" >&5
3061 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
3062 if test "${cf_cv_need_libm+set}" = set; then
3063 echo $ECHO_N "(cached) $ECHO_C" >&6
3066 cat >conftest.$ac_ext <<_ACEOF
3067 #line 3067 "configure"
3068 #include "confdefs.h"
3077 double x = rand(); printf("result = %g\n", pow(sin(x),x))
3082 rm -f conftest.$ac_objext conftest$ac_exeext
3083 if { (eval echo "$as_me:3083: \"$ac_link\"") >&5
3084 (eval $ac_link) 2>&5
3086 echo "$as_me:3086: \$? = $ac_status" >&5
3087 (exit $ac_status); } &&
3088 { ac_try='test -s conftest$ac_exeext'
3089 { (eval echo "$as_me:3089: \"$ac_try\"") >&5
3092 echo "$as_me:3092: \$? = $ac_status" >&5
3093 (exit $ac_status); }; }; then
3096 echo "$as_me: failed program was:" >&5
3097 cat conftest.$ac_ext >&5
3100 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3102 echo "$as_me:3102: result: $cf_cv_need_libm" >&5
3103 echo "${ECHO_T}$cf_cv_need_libm" >&6
3104 if test "$cf_cv_need_libm" = yes
3112 CC_SHARED_OPTS=unknown
3113 CPPFLAGS="$CPPFLAGS"
3115 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
3116 DFT_UPR_MODEL="NORMAL"
3129 PACKAGE="ncurses-examples"
3135 TINFO_LIBS='$(LIBS_CURSES)'
3136 cf_cv_abi_version=""
3137 cf_cv_rel_version=""
3143 if ( test "$GCC" = yes || test "$GXX" = yes )
3145 cat > conftest.i <<EOF
3147 #define GCC_PRINTF 0
3152 #ifndef GCC_NORETURN
3153 #define GCC_NORETURN /* nothing */
3156 #define GCC_UNUSED /* nothing */
3159 if test "$GCC" = yes
3161 { echo "$as_me:3161: checking for $CC __attribute__ directives..." >&5
3162 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
3163 cat > conftest.$ac_ext <<EOF
3164 #line 3164 "${as_me:-configure}"
3165 #include "confdefs.h"
3166 #include "conftest.h"
3167 #include "conftest.i"
3169 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3171 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
3174 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
3176 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
3178 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
3179 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
3180 extern void foo(void) GCC_NORETURN;
3181 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
3183 cf_printf_attribute=no
3184 cf_scanf_attribute=no
3185 for cf_attribute in scanf printf unused noreturn
3188 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3190 cf_directive="__attribute__(($cf_attribute))"
3191 echo "checking for $CC $cf_directive" 1>&5
3193 case $cf_attribute in
3195 cf_printf_attribute=yes
3196 cat >conftest.h <<EOF
3197 #define GCC_$cf_ATTRIBUTE 1
3201 cf_scanf_attribute=yes
3202 cat >conftest.h <<EOF
3203 #define GCC_$cf_ATTRIBUTE 1
3207 cat >conftest.h <<EOF
3208 #define GCC_$cf_ATTRIBUTE $cf_directive
3213 if { (eval echo "$as_me:3213: \"$ac_compile\"") >&5
3214 (eval $ac_compile) 2>&5
3216 echo "$as_me:3216: \$? = $ac_status" >&5
3217 (exit $ac_status); }; then
3218 test -n "$verbose" && echo "$as_me:3218: result: ... $cf_attribute" >&5
3219 echo "${ECHO_T}... $cf_attribute" >&6
3220 cat conftest.h >>confdefs.h
3221 case $cf_attribute in
3224 cat >>confdefs.h <<EOF
3225 #define GCC_NORETURN $cf_directive
3230 cf_value='/* nothing */'
3231 if test "$cf_printf_attribute" != no ; then
3232 cf_value='__attribute__((format(printf,fmt,var)))'
3234 cat >>confdefs.h <<\EOF
3235 #define GCC_PRINTF 1
3240 cat >>confdefs.h <<EOF
3241 #define GCC_PRINTFLIKE(fmt,var) $cf_value
3246 cf_value='/* nothing */'
3247 if test "$cf_scanf_attribute" != no ; then
3248 cf_value='__attribute__((format(scanf,fmt,var)))'
3250 cat >>confdefs.h <<\EOF
3256 cat >>confdefs.h <<EOF
3257 #define GCC_SCANFLIKE(fmt,var) $cf_value
3263 cat >>confdefs.h <<EOF
3264 #define GCC_UNUSED $cf_directive
3272 fgrep define conftest.i >>confdefs.h
3277 echo "$as_me:3277: checking if you want to work around bogus compiler/loader warnings" >&5
3278 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
3280 # Check whether --enable-string-hacks or --disable-string-hacks was given.
3281 if test "${enable_string_hacks+set}" = set; then
3282 enableval="$enable_string_hacks"
3283 with_string_hacks=$enableval
3285 with_string_hacks=no
3287 echo "$as_me:3287: result: $with_string_hacks" >&5
3288 echo "${ECHO_T}$with_string_hacks" >&6
3290 if test "x$with_string_hacks" = "xyes"; then
3292 cat >>confdefs.h <<\EOF
3293 #define USE_STRING_HACKS 1
3296 { echo "$as_me:3296: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
3297 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
3298 echo "$as_me:3298: checking for strlcat" >&5
3299 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
3300 if test "${ac_cv_func_strlcat+set}" = set; then
3301 echo $ECHO_N "(cached) $ECHO_C" >&6
3303 cat >conftest.$ac_ext <<_ACEOF
3304 #line 3304 "configure"
3305 #include "confdefs.h"
3306 #define strlcat autoconf_temporary
3307 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3314 /* We use char because int might match the return type of a gcc2
3315 builtin and then its argument prototype would still apply. */
3316 char strlcat (void);
3322 /* The GNU C library defines stubs for functions which it implements
3323 to always fail with ENOSYS. Some functions are actually named
3324 something starting with __ and the normal name is an alias. */
3325 #if defined (__stub_strlcat) || defined (__stub___strlcat)
3326 #error found stub for strlcat
3334 rm -f conftest.$ac_objext conftest$ac_exeext
3335 if { (eval echo "$as_me:3335: \"$ac_link\"") >&5
3336 (eval $ac_link) 2>&5
3338 echo "$as_me:3338: \$? = $ac_status" >&5
3339 (exit $ac_status); } &&
3340 { ac_try='test -s conftest$ac_exeext'
3341 { (eval echo "$as_me:3341: \"$ac_try\"") >&5
3344 echo "$as_me:3344: \$? = $ac_status" >&5
3345 (exit $ac_status); }; }; then
3346 ac_cv_func_strlcat=yes
3348 echo "$as_me: failed program was:" >&5
3349 cat conftest.$ac_ext >&5
3350 ac_cv_func_strlcat=no
3352 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3354 echo "$as_me:3354: result: $ac_cv_func_strlcat" >&5
3355 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
3356 if test $ac_cv_func_strlcat = yes; then
3358 cat >>confdefs.h <<\EOF
3359 #define HAVE_STRLCAT 1
3364 echo "$as_me:3364: checking for strlcat in -lbsd" >&5
3365 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
3366 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
3367 echo $ECHO_N "(cached) $ECHO_C" >&6
3369 ac_check_lib_save_LIBS=$LIBS
3371 cat >conftest.$ac_ext <<_ACEOF
3372 #line 3372 "configure"
3373 #include "confdefs.h"
3375 /* Override any gcc2 internal prototype to avoid an error. */
3379 /* We use char because int might match the return type of a gcc2
3380 builtin and then its argument prototype would still apply. */
3390 rm -f conftest.$ac_objext conftest$ac_exeext
3391 if { (eval echo "$as_me:3391: \"$ac_link\"") >&5
3392 (eval $ac_link) 2>&5
3394 echo "$as_me:3394: \$? = $ac_status" >&5
3395 (exit $ac_status); } &&
3396 { ac_try='test -s conftest$ac_exeext'
3397 { (eval echo "$as_me:3397: \"$ac_try\"") >&5
3400 echo "$as_me:3400: \$? = $ac_status" >&5
3401 (exit $ac_status); }; }; then
3402 ac_cv_lib_bsd_strlcat=yes
3404 echo "$as_me: failed program was:" >&5
3405 cat conftest.$ac_ext >&5
3406 ac_cv_lib_bsd_strlcat=no
3408 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3409 LIBS=$ac_check_lib_save_LIBS
3411 echo "$as_me:3411: result: $ac_cv_lib_bsd_strlcat" >&5
3412 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
3413 if test $ac_cv_lib_bsd_strlcat = yes; then
3418 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
3420 for cf_add_1lib in $cf_add_0lib; do
3421 for cf_add_2lib in $cf_add_libs; do
3422 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
3427 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
3431 for ac_header in bsd/string.h
3433 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3434 echo "$as_me:3434: checking for $ac_header" >&5
3435 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3436 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3437 echo $ECHO_N "(cached) $ECHO_C" >&6
3439 cat >conftest.$ac_ext <<_ACEOF
3440 #line 3440 "configure"
3441 #include "confdefs.h"
3442 #include <$ac_header>
3444 if { (eval echo "$as_me:3444: \"$ac_cpp conftest.$ac_ext\"") >&5
3445 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3447 egrep -v '^ *\+' conftest.er1 >conftest.err
3449 cat conftest.err >&5
3450 echo "$as_me:3450: \$? = $ac_status" >&5
3451 (exit $ac_status); } >/dev/null; then
3452 if test -s conftest.err; then
3453 ac_cpp_err=$ac_c_preproc_warn_flag
3460 if test -z "$ac_cpp_err"; then
3461 eval "$as_ac_Header=yes"
3463 echo "$as_me: failed program was:" >&5
3464 cat conftest.$ac_ext >&5
3465 eval "$as_ac_Header=no"
3467 rm -f conftest.err conftest.$ac_ext
3469 echo "$as_me:3469: result: `eval echo '${'$as_ac_Header'}'`" >&5
3470 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3471 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3472 cat >>confdefs.h <<EOF
3473 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3479 cat >>confdefs.h <<\EOF
3480 #define HAVE_STRLCAT 1
3487 for ac_func in strlcpy snprintf
3489 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3490 echo "$as_me:3490: checking for $ac_func" >&5
3491 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3492 if eval "test \"\${$as_ac_var+set}\" = set"; then
3493 echo $ECHO_N "(cached) $ECHO_C" >&6
3495 cat >conftest.$ac_ext <<_ACEOF
3496 #line 3496 "configure"
3497 #include "confdefs.h"
3498 #define $ac_func autoconf_temporary
3499 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3506 /* We use char because int might match the return type of a gcc2
3507 builtin and then its argument prototype would still apply. */
3508 char $ac_func (void);
3514 /* The GNU C library defines stubs for functions which it implements
3515 to always fail with ENOSYS. Some functions are actually named
3516 something starting with __ and the normal name is an alias. */
3517 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3518 #error found stub for $ac_func
3526 rm -f conftest.$ac_objext conftest$ac_exeext
3527 if { (eval echo "$as_me:3527: \"$ac_link\"") >&5
3528 (eval $ac_link) 2>&5
3530 echo "$as_me:3530: \$? = $ac_status" >&5
3531 (exit $ac_status); } &&
3532 { ac_try='test -s conftest$ac_exeext'
3533 { (eval echo "$as_me:3533: \"$ac_try\"") >&5
3536 echo "$as_me:3536: \$? = $ac_status" >&5
3537 (exit $ac_status); }; }; then
3538 eval "$as_ac_var=yes"
3540 echo "$as_me: failed program was:" >&5
3541 cat conftest.$ac_ext >&5
3542 eval "$as_ac_var=no"
3544 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3546 echo "$as_me:3546: result: `eval echo '${'$as_ac_var'}'`" >&5
3547 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
3548 if test `eval echo '${'$as_ac_var'}'` = yes; then
3549 cat >>confdefs.h <<EOF
3550 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3558 echo "$as_me:3558: checking if the POSIX test-macros are already defined" >&5
3559 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
3560 if test "${cf_cv_posix_visible+set}" = set; then
3561 echo $ECHO_N "(cached) $ECHO_C" >&6
3564 cat >conftest.$ac_ext <<_ACEOF
3565 #line 3565 "configure"
3566 #include "confdefs.h"
3572 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
3573 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
3574 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
3575 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
3576 #error conflicting symbols found
3583 rm -f conftest.$ac_objext
3584 if { (eval echo "$as_me:3584: \"$ac_compile\"") >&5
3585 (eval $ac_compile) 2>&5
3587 echo "$as_me:3587: \$? = $ac_status" >&5
3588 (exit $ac_status); } &&
3589 { ac_try='test -s conftest.$ac_objext'
3590 { (eval echo "$as_me:3590: \"$ac_try\"") >&5
3593 echo "$as_me:3593: \$? = $ac_status" >&5
3594 (exit $ac_status); }; }; then
3595 cf_cv_posix_visible=no
3597 echo "$as_me: failed program was:" >&5
3598 cat conftest.$ac_ext >&5
3599 cf_cv_posix_visible=yes
3601 rm -f conftest.$ac_objext conftest.$ac_ext
3604 echo "$as_me:3604: result: $cf_cv_posix_visible" >&5
3605 echo "${ECHO_T}$cf_cv_posix_visible" >&6
3607 if test "$cf_cv_posix_visible" = no; then
3610 cf_POSIX_C_SOURCE=199506L
3615 cf_xopen_source="-D_ALL_SOURCE"
3621 cf_xopen_source="-D_APPLE_C_SOURCE"
3624 cf_xopen_source="-D_DARWIN_C_SOURCE"
3627 (freebsd*|dragonfly*|midnightbsd*)
3628 # 5.x headers associate
3629 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3630 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3631 cf_POSIX_C_SOURCE=200112L
3633 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3636 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3639 cf_xopen_source="-D_HPUX_SOURCE"
3642 cf_xopen_source="-D_SGI_SOURCE"
3645 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3647 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3649 echo "$as_me:3649: checking if this is the GNU C library" >&5
3650 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3651 if test "${cf_cv_gnu_library+set}" = set; then
3652 echo $ECHO_N "(cached) $ECHO_C" >&6
3655 cat >conftest.$ac_ext <<_ACEOF
3656 #line 3656 "configure"
3657 #include "confdefs.h"
3658 #include <sys/types.h>
3663 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3665 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
3668 # error not GNU C library
3674 rm -f conftest.$ac_objext
3675 if { (eval echo "$as_me:3675: \"$ac_compile\"") >&5
3676 (eval $ac_compile) 2>&5
3678 echo "$as_me:3678: \$? = $ac_status" >&5
3679 (exit $ac_status); } &&
3680 { ac_try='test -s conftest.$ac_objext'
3681 { (eval echo "$as_me:3681: \"$ac_try\"") >&5
3684 echo "$as_me:3684: \$? = $ac_status" >&5
3685 (exit $ac_status); }; }; then
3686 cf_cv_gnu_library=yes
3688 echo "$as_me: failed program was:" >&5
3689 cat conftest.$ac_ext >&5
3690 cf_cv_gnu_library=no
3692 rm -f conftest.$ac_objext conftest.$ac_ext
3695 echo "$as_me:3695: result: $cf_cv_gnu_library" >&5
3696 echo "${ECHO_T}$cf_cv_gnu_library" >&6
3698 if test x$cf_cv_gnu_library = xyes; then
3700 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3701 # was changed to help a little. newlib incorporated the change about 4
3703 echo "$as_me:3703: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3704 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3705 if test "${cf_cv_gnu_library_219+set}" = set; then
3706 echo $ECHO_N "(cached) $ECHO_C" >&6
3711 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3712 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3714 cat >conftest.$ac_ext <<_ACEOF
3715 #line 3715 "configure"
3716 #include "confdefs.h"
3717 #include <sys/types.h>
3722 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
3724 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
3727 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
3733 rm -f conftest.$ac_objext
3734 if { (eval echo "$as_me:3734: \"$ac_compile\"") >&5
3735 (eval $ac_compile) 2>&5
3737 echo "$as_me:3737: \$? = $ac_status" >&5
3738 (exit $ac_status); } &&
3739 { ac_try='test -s conftest.$ac_objext'
3740 { (eval echo "$as_me:3740: \"$ac_try\"") >&5
3743 echo "$as_me:3743: \$? = $ac_status" >&5
3744 (exit $ac_status); }; }; then
3745 cf_cv_gnu_library_219=yes
3747 echo "$as_me: failed program was:" >&5
3748 cat conftest.$ac_ext >&5
3749 cf_cv_gnu_library_219=no
3751 rm -f conftest.$ac_objext conftest.$ac_ext
3755 echo "$as_me:3755: result: $cf_cv_gnu_library_219" >&5
3756 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
3758 if test "x$cf_cv_gnu_library_219" = xyes; then
3760 echo "$as_me:3760: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
3761 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
3762 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
3763 echo $ECHO_N "(cached) $ECHO_C" >&6
3769 cf_new_extra_cppflags=
3771 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
3773 case $cf_fix_cppflags in
3775 case $cf_add_cflags in
3776 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3777 case $cf_add_cflags in
3779 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3781 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3782 && test -z "${cf_tst_cflags}" \
3783 && cf_fix_cppflags=yes
3785 if test $cf_fix_cppflags = yes ; then
3787 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3788 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3791 elif test "${cf_tst_cflags}" = "\"'" ; then
3793 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3794 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3804 case $cf_add_cflags in
3806 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3808 CPPFLAGS=`echo "$CPPFLAGS" | \
3809 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3810 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3815 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3816 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3823 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3824 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3831 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3832 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3834 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3836 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3837 && test -z "${cf_tst_cflags}" \
3838 && cf_fix_cppflags=no
3843 if test -n "$cf_new_cflags" ; then
3845 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3846 CFLAGS="${CFLAGS}$cf_new_cflags"
3850 if test -n "$cf_new_cppflags" ; then
3852 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3853 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3857 if test -n "$cf_new_extra_cppflags" ; then
3859 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3860 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3864 cat >conftest.$ac_ext <<_ACEOF
3865 #line 3865 "configure"
3866 #include "confdefs.h"
3869 #include <sys/types.h>
3875 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
3878 # error GNU C library is too old
3884 rm -f conftest.$ac_objext
3885 if { (eval echo "$as_me:3885: \"$ac_compile\"") >&5
3886 (eval $ac_compile) 2>&5
3888 echo "$as_me:3888: \$? = $ac_status" >&5
3889 (exit $ac_status); } &&
3890 { ac_try='test -s conftest.$ac_objext'
3891 { (eval echo "$as_me:3891: \"$ac_try\"") >&5
3894 echo "$as_me:3894: \$? = $ac_status" >&5
3895 (exit $ac_status); }; }; then
3896 cf_cv_gnu_dftsrc_219=yes
3898 echo "$as_me: failed program was:" >&5
3899 cat conftest.$ac_ext >&5
3900 cf_cv_gnu_dftsrc_219=no
3902 rm -f conftest.$ac_objext conftest.$ac_ext
3905 echo "$as_me:3905: result: $cf_cv_gnu_dftsrc_219" >&5
3906 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
3907 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
3909 cf_cv_gnu_dftsrc_219=maybe
3912 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
3914 echo "$as_me:3914: checking if we must define _GNU_SOURCE" >&5
3915 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3916 if test "${cf_cv_gnu_source+set}" = set; then
3917 echo $ECHO_N "(cached) $ECHO_C" >&6
3920 cat >conftest.$ac_ext <<_ACEOF
3921 #line 3921 "configure"
3922 #include "confdefs.h"
3923 #include <sys/types.h>
3928 #ifndef _XOPEN_SOURCE
3929 #error expected _XOPEN_SOURCE to be defined
3935 rm -f conftest.$ac_objext
3936 if { (eval echo "$as_me:3936: \"$ac_compile\"") >&5
3937 (eval $ac_compile) 2>&5
3939 echo "$as_me:3939: \$? = $ac_status" >&5
3940 (exit $ac_status); } &&
3941 { ac_try='test -s conftest.$ac_objext'
3942 { (eval echo "$as_me:3942: \"$ac_try\"") >&5
3945 echo "$as_me:3945: \$? = $ac_status" >&5
3946 (exit $ac_status); }; }; then
3949 echo "$as_me: failed program was:" >&5
3950 cat conftest.$ac_ext >&5
3956 cf_new_extra_cppflags=
3958 for cf_add_cflags in -D_GNU_SOURCE
3960 case $cf_fix_cppflags in
3962 case $cf_add_cflags in
3963 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3964 case $cf_add_cflags in
3966 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3968 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3969 && test -z "${cf_tst_cflags}" \
3970 && cf_fix_cppflags=yes
3972 if test $cf_fix_cppflags = yes ; then
3974 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3975 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3978 elif test "${cf_tst_cflags}" = "\"'" ; then
3980 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3981 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3991 case $cf_add_cflags in
3993 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3995 CPPFLAGS=`echo "$CPPFLAGS" | \
3996 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3997 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4002 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4003 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4010 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4011 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4018 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4019 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4021 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4023 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4024 && test -z "${cf_tst_cflags}" \
4025 && cf_fix_cppflags=no
4030 if test -n "$cf_new_cflags" ; then
4032 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4033 CFLAGS="${CFLAGS}$cf_new_cflags"
4037 if test -n "$cf_new_cppflags" ; then
4039 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4040 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4044 if test -n "$cf_new_extra_cppflags" ; then
4046 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4047 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4051 cat >conftest.$ac_ext <<_ACEOF
4052 #line 4052 "configure"
4053 #include "confdefs.h"
4054 #include <sys/types.h>
4059 #ifdef _XOPEN_SOURCE
4060 #error expected _XOPEN_SOURCE to be undefined
4066 rm -f conftest.$ac_objext
4067 if { (eval echo "$as_me:4067: \"$ac_compile\"") >&5
4068 (eval $ac_compile) 2>&5
4070 echo "$as_me:4070: \$? = $ac_status" >&5
4071 (exit $ac_status); } &&
4072 { ac_try='test -s conftest.$ac_objext'
4073 { (eval echo "$as_me:4073: \"$ac_try\"") >&5
4076 echo "$as_me:4076: \$? = $ac_status" >&5
4077 (exit $ac_status); }; }; then
4080 echo "$as_me: failed program was:" >&5
4081 cat conftest.$ac_ext >&5
4082 cf_cv_gnu_source=yes
4084 rm -f conftest.$ac_objext conftest.$ac_ext
4088 rm -f conftest.$ac_objext conftest.$ac_ext
4091 echo "$as_me:4091: result: $cf_cv_gnu_source" >&5
4092 echo "${ECHO_T}$cf_cv_gnu_source" >&6
4094 if test "$cf_cv_gnu_source" = yes
4096 echo "$as_me:4096: checking if we should also define _DEFAULT_SOURCE" >&5
4097 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
4098 if test "${cf_cv_default_source+set}" = set; then
4099 echo $ECHO_N "(cached) $ECHO_C" >&6
4102 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4103 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
4105 cat >conftest.$ac_ext <<_ACEOF
4106 #line 4106 "configure"
4107 #include "confdefs.h"
4108 #include <sys/types.h>
4113 #ifdef _DEFAULT_SOURCE
4114 #error expected _DEFAULT_SOURCE to be undefined
4120 rm -f conftest.$ac_objext
4121 if { (eval echo "$as_me:4121: \"$ac_compile\"") >&5
4122 (eval $ac_compile) 2>&5
4124 echo "$as_me:4124: \$? = $ac_status" >&5
4125 (exit $ac_status); } &&
4126 { ac_try='test -s conftest.$ac_objext'
4127 { (eval echo "$as_me:4127: \"$ac_try\"") >&5
4130 echo "$as_me:4130: \$? = $ac_status" >&5
4131 (exit $ac_status); }; }; then
4132 cf_cv_default_source=no
4134 echo "$as_me: failed program was:" >&5
4135 cat conftest.$ac_ext >&5
4136 cf_cv_default_source=yes
4138 rm -f conftest.$ac_objext conftest.$ac_ext
4141 echo "$as_me:4141: result: $cf_cv_default_source" >&5
4142 echo "${ECHO_T}$cf_cv_default_source" >&6
4143 if test "$cf_cv_default_source" = yes
4146 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4147 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
4157 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
4160 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
4163 if test "$cf_cv_posix_visible" = no; then
4165 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4167 cf_save_CFLAGS="$CFLAGS"
4168 cf_save_CPPFLAGS="$CPPFLAGS"
4170 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4171 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4172 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4174 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4175 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4176 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4178 echo "$as_me:4178: checking if we should define _POSIX_C_SOURCE" >&5
4179 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4180 if test "${cf_cv_posix_c_source+set}" = set; then
4181 echo $ECHO_N "(cached) $ECHO_C" >&6
4184 echo "${as_me:-configure}:4184: testing if the symbol is already defined go no further ..." 1>&5
4186 cat >conftest.$ac_ext <<_ACEOF
4187 #line 4187 "configure"
4188 #include "confdefs.h"
4189 #include <sys/types.h>
4194 #ifndef _POSIX_C_SOURCE
4201 rm -f conftest.$ac_objext
4202 if { (eval echo "$as_me:4202: \"$ac_compile\"") >&5
4203 (eval $ac_compile) 2>&5
4205 echo "$as_me:4205: \$? = $ac_status" >&5
4206 (exit $ac_status); } &&
4207 { ac_try='test -s conftest.$ac_objext'
4208 { (eval echo "$as_me:4208: \"$ac_try\"") >&5
4211 echo "$as_me:4211: \$? = $ac_status" >&5
4212 (exit $ac_status); }; }; then
4213 cf_cv_posix_c_source=no
4215 echo "$as_me: failed program was:" >&5
4216 cat conftest.$ac_ext >&5
4217 cf_want_posix_source=no
4218 case .$cf_POSIX_C_SOURCE in
4220 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4223 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4224 cf_want_posix_source=yes
4227 cf_want_posix_source=yes
4230 if test "$cf_want_posix_source" = yes ; then
4231 cat >conftest.$ac_ext <<_ACEOF
4232 #line 4232 "configure"
4233 #include "confdefs.h"
4234 #include <sys/types.h>
4239 #ifdef _POSIX_SOURCE
4246 rm -f conftest.$ac_objext
4247 if { (eval echo "$as_me:4247: \"$ac_compile\"") >&5
4248 (eval $ac_compile) 2>&5
4250 echo "$as_me:4250: \$? = $ac_status" >&5
4251 (exit $ac_status); } &&
4252 { ac_try='test -s conftest.$ac_objext'
4253 { (eval echo "$as_me:4253: \"$ac_try\"") >&5
4256 echo "$as_me:4256: \$? = $ac_status" >&5
4257 (exit $ac_status); }; }; then
4260 echo "$as_me: failed program was:" >&5
4261 cat conftest.$ac_ext >&5
4262 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4264 rm -f conftest.$ac_objext conftest.$ac_ext
4267 echo "${as_me:-configure}:4267: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4269 CFLAGS="$cf_trim_CFLAGS"
4270 CPPFLAGS="$cf_trim_CPPFLAGS"
4272 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4273 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4275 echo "${as_me:-configure}:4275: testing if the second compile does not leave our definition intact error ..." 1>&5
4277 cat >conftest.$ac_ext <<_ACEOF
4278 #line 4278 "configure"
4279 #include "confdefs.h"
4280 #include <sys/types.h>
4285 #ifndef _POSIX_C_SOURCE
4292 rm -f conftest.$ac_objext
4293 if { (eval echo "$as_me:4293: \"$ac_compile\"") >&5
4294 (eval $ac_compile) 2>&5
4296 echo "$as_me:4296: \$? = $ac_status" >&5
4297 (exit $ac_status); } &&
4298 { ac_try='test -s conftest.$ac_objext'
4299 { (eval echo "$as_me:4299: \"$ac_try\"") >&5
4302 echo "$as_me:4302: \$? = $ac_status" >&5
4303 (exit $ac_status); }; }; then
4306 echo "$as_me: failed program was:" >&5
4307 cat conftest.$ac_ext >&5
4308 cf_cv_posix_c_source=no
4310 rm -f conftest.$ac_objext conftest.$ac_ext
4311 CFLAGS="$cf_save_CFLAGS"
4312 CPPFLAGS="$cf_save_CPPFLAGS"
4315 rm -f conftest.$ac_objext conftest.$ac_ext
4318 echo "$as_me:4318: result: $cf_cv_posix_c_source" >&5
4319 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4321 if test "$cf_cv_posix_c_source" != no ; then
4322 CFLAGS="$cf_trim_CFLAGS"
4323 CPPFLAGS="$cf_trim_CPPFLAGS"
4328 cf_new_extra_cppflags=
4330 for cf_add_cflags in $cf_cv_posix_c_source
4332 case $cf_fix_cppflags in
4334 case $cf_add_cflags in
4335 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4336 case $cf_add_cflags in
4338 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4340 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4341 && test -z "${cf_tst_cflags}" \
4342 && cf_fix_cppflags=yes
4344 if test $cf_fix_cppflags = yes ; then
4346 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4347 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4350 elif test "${cf_tst_cflags}" = "\"'" ; then
4352 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4353 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4363 case $cf_add_cflags in
4365 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4367 CPPFLAGS=`echo "$CPPFLAGS" | \
4368 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4369 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4374 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4375 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4382 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4383 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4390 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4391 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4393 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4395 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4396 && test -z "${cf_tst_cflags}" \
4397 && cf_fix_cppflags=no
4402 if test -n "$cf_new_cflags" ; then
4404 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4405 CFLAGS="${CFLAGS}$cf_new_cflags"
4409 if test -n "$cf_new_cppflags" ; then
4411 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4412 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4416 if test -n "$cf_new_extra_cppflags" ; then
4418 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4419 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4425 fi # cf_cv_posix_visible
4429 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4432 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
4433 cf_xopen_source="-D_BSD_SOURCE"
4437 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
4440 cf_xopen_source="-D_OSF_SOURCE"
4443 cf_xopen_source="-D_QNX_SOURCE"
4446 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
4449 cf_xopen_source="-D__EXTENSIONS__"
4450 cf_cv_xopen_source=broken
4452 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
4458 echo "$as_me:4458: checking if we should define _XOPEN_SOURCE" >&5
4459 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4460 if test "${cf_cv_xopen_source+set}" = set; then
4461 echo $ECHO_N "(cached) $ECHO_C" >&6
4464 cat >conftest.$ac_ext <<_ACEOF
4465 #line 4465 "configure"
4466 #include "confdefs.h"
4470 #include <sys/types.h>
4476 #ifndef _XOPEN_SOURCE
4483 rm -f conftest.$ac_objext
4484 if { (eval echo "$as_me:4484: \"$ac_compile\"") >&5
4485 (eval $ac_compile) 2>&5
4487 echo "$as_me:4487: \$? = $ac_status" >&5
4488 (exit $ac_status); } &&
4489 { ac_try='test -s conftest.$ac_objext'
4490 { (eval echo "$as_me:4490: \"$ac_try\"") >&5
4493 echo "$as_me:4493: \$? = $ac_status" >&5
4494 (exit $ac_status); }; }; then
4495 cf_cv_xopen_source=no
4497 echo "$as_me: failed program was:" >&5
4498 cat conftest.$ac_ext >&5
4501 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4502 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4504 cat >conftest.$ac_ext <<_ACEOF
4505 #line 4505 "configure"
4506 #include "confdefs.h"
4510 #include <sys/types.h>
4516 #ifdef _XOPEN_SOURCE
4523 rm -f conftest.$ac_objext
4524 if { (eval echo "$as_me:4524: \"$ac_compile\"") >&5
4525 (eval $ac_compile) 2>&5
4527 echo "$as_me:4527: \$? = $ac_status" >&5
4528 (exit $ac_status); } &&
4529 { ac_try='test -s conftest.$ac_objext'
4530 { (eval echo "$as_me:4530: \"$ac_try\"") >&5
4533 echo "$as_me:4533: \$? = $ac_status" >&5
4534 (exit $ac_status); }; }; then
4535 cf_cv_xopen_source=no
4537 echo "$as_me: failed program was:" >&5
4538 cat conftest.$ac_ext >&5
4539 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4541 rm -f conftest.$ac_objext conftest.$ac_ext
4545 rm -f conftest.$ac_objext conftest.$ac_ext
4548 echo "$as_me:4548: result: $cf_cv_xopen_source" >&5
4549 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4551 if test "$cf_cv_xopen_source" != no ; then
4553 CFLAGS=`echo "$CFLAGS" | \
4554 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4555 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4557 CPPFLAGS=`echo "$CPPFLAGS" | \
4558 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4559 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4561 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4566 cf_new_extra_cppflags=
4568 for cf_add_cflags in $cf_temp_xopen_source
4570 case $cf_fix_cppflags in
4572 case $cf_add_cflags in
4573 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4574 case $cf_add_cflags in
4576 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4578 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4579 && test -z "${cf_tst_cflags}" \
4580 && cf_fix_cppflags=yes
4582 if test $cf_fix_cppflags = yes ; then
4584 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4585 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4588 elif test "${cf_tst_cflags}" = "\"'" ; then
4590 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4591 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4601 case $cf_add_cflags in
4603 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4605 CPPFLAGS=`echo "$CPPFLAGS" | \
4606 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4607 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4612 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4613 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4620 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4621 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4628 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4629 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4631 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4633 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4634 && test -z "${cf_tst_cflags}" \
4635 && cf_fix_cppflags=no
4640 if test -n "$cf_new_cflags" ; then
4642 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4643 CFLAGS="${CFLAGS}$cf_new_cflags"
4647 if test -n "$cf_new_cppflags" ; then
4649 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4650 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4654 if test -n "$cf_new_extra_cppflags" ; then
4656 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4657 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4663 if test "$cf_cv_posix_visible" = no; then
4665 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4667 cf_save_CFLAGS="$CFLAGS"
4668 cf_save_CPPFLAGS="$CPPFLAGS"
4670 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4671 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4672 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4674 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4675 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4676 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4678 echo "$as_me:4678: checking if we should define _POSIX_C_SOURCE" >&5
4679 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4680 if test "${cf_cv_posix_c_source+set}" = set; then
4681 echo $ECHO_N "(cached) $ECHO_C" >&6
4684 echo "${as_me:-configure}:4684: testing if the symbol is already defined go no further ..." 1>&5
4686 cat >conftest.$ac_ext <<_ACEOF
4687 #line 4687 "configure"
4688 #include "confdefs.h"
4689 #include <sys/types.h>
4694 #ifndef _POSIX_C_SOURCE
4701 rm -f conftest.$ac_objext
4702 if { (eval echo "$as_me:4702: \"$ac_compile\"") >&5
4703 (eval $ac_compile) 2>&5
4705 echo "$as_me:4705: \$? = $ac_status" >&5
4706 (exit $ac_status); } &&
4707 { ac_try='test -s conftest.$ac_objext'
4708 { (eval echo "$as_me:4708: \"$ac_try\"") >&5
4711 echo "$as_me:4711: \$? = $ac_status" >&5
4712 (exit $ac_status); }; }; then
4713 cf_cv_posix_c_source=no
4715 echo "$as_me: failed program was:" >&5
4716 cat conftest.$ac_ext >&5
4717 cf_want_posix_source=no
4718 case .$cf_POSIX_C_SOURCE in
4720 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4723 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4724 cf_want_posix_source=yes
4727 cf_want_posix_source=yes
4730 if test "$cf_want_posix_source" = yes ; then
4731 cat >conftest.$ac_ext <<_ACEOF
4732 #line 4732 "configure"
4733 #include "confdefs.h"
4734 #include <sys/types.h>
4739 #ifdef _POSIX_SOURCE
4746 rm -f conftest.$ac_objext
4747 if { (eval echo "$as_me:4747: \"$ac_compile\"") >&5
4748 (eval $ac_compile) 2>&5
4750 echo "$as_me:4750: \$? = $ac_status" >&5
4751 (exit $ac_status); } &&
4752 { ac_try='test -s conftest.$ac_objext'
4753 { (eval echo "$as_me:4753: \"$ac_try\"") >&5
4756 echo "$as_me:4756: \$? = $ac_status" >&5
4757 (exit $ac_status); }; }; then
4760 echo "$as_me: failed program was:" >&5
4761 cat conftest.$ac_ext >&5
4762 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4764 rm -f conftest.$ac_objext conftest.$ac_ext
4767 echo "${as_me:-configure}:4767: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4769 CFLAGS="$cf_trim_CFLAGS"
4770 CPPFLAGS="$cf_trim_CPPFLAGS"
4772 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4773 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4775 echo "${as_me:-configure}:4775: testing if the second compile does not leave our definition intact error ..." 1>&5
4777 cat >conftest.$ac_ext <<_ACEOF
4778 #line 4778 "configure"
4779 #include "confdefs.h"
4780 #include <sys/types.h>
4785 #ifndef _POSIX_C_SOURCE
4792 rm -f conftest.$ac_objext
4793 if { (eval echo "$as_me:4793: \"$ac_compile\"") >&5
4794 (eval $ac_compile) 2>&5
4796 echo "$as_me:4796: \$? = $ac_status" >&5
4797 (exit $ac_status); } &&
4798 { ac_try='test -s conftest.$ac_objext'
4799 { (eval echo "$as_me:4799: \"$ac_try\"") >&5
4802 echo "$as_me:4802: \$? = $ac_status" >&5
4803 (exit $ac_status); }; }; then
4806 echo "$as_me: failed program was:" >&5
4807 cat conftest.$ac_ext >&5
4808 cf_cv_posix_c_source=no
4810 rm -f conftest.$ac_objext conftest.$ac_ext
4811 CFLAGS="$cf_save_CFLAGS"
4812 CPPFLAGS="$cf_save_CPPFLAGS"
4815 rm -f conftest.$ac_objext conftest.$ac_ext
4818 echo "$as_me:4818: result: $cf_cv_posix_c_source" >&5
4819 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4821 if test "$cf_cv_posix_c_source" != no ; then
4822 CFLAGS="$cf_trim_CFLAGS"
4823 CPPFLAGS="$cf_trim_CPPFLAGS"
4828 cf_new_extra_cppflags=
4830 for cf_add_cflags in $cf_cv_posix_c_source
4832 case $cf_fix_cppflags in
4834 case $cf_add_cflags in
4835 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4836 case $cf_add_cflags in
4838 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4840 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4841 && test -z "${cf_tst_cflags}" \
4842 && cf_fix_cppflags=yes
4844 if test $cf_fix_cppflags = yes ; then
4846 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4847 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4850 elif test "${cf_tst_cflags}" = "\"'" ; then
4852 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4853 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4863 case $cf_add_cflags in
4865 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4867 CPPFLAGS=`echo "$CPPFLAGS" | \
4868 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4869 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4874 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4875 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4882 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4883 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4890 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4891 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4893 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4895 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4896 && test -z "${cf_tst_cflags}" \
4897 && cf_fix_cppflags=no
4902 if test -n "$cf_new_cflags" ; then
4904 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4905 CFLAGS="${CFLAGS}$cf_new_cflags"
4909 if test -n "$cf_new_cppflags" ; then
4911 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4912 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4916 if test -n "$cf_new_extra_cppflags" ; then
4918 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4919 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4925 fi # cf_cv_posix_visible
4930 if test -n "$cf_xopen_source" ; then
4935 cf_new_extra_cppflags=
4937 for cf_add_cflags in $cf_xopen_source
4939 case $cf_fix_cppflags in
4941 case $cf_add_cflags in
4942 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4943 case $cf_add_cflags in
4945 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4947 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4948 && test -z "${cf_tst_cflags}" \
4949 && cf_fix_cppflags=yes
4951 if test $cf_fix_cppflags = yes ; then
4953 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4954 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4957 elif test "${cf_tst_cflags}" = "\"'" ; then
4959 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4960 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4970 case $cf_add_cflags in
4972 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4974 CPPFLAGS=`echo "$CPPFLAGS" | \
4975 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4976 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4981 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4982 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4989 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4990 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4997 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4998 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5000 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
5002 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5003 && test -z "${cf_tst_cflags}" \
5004 && cf_fix_cppflags=no
5009 if test -n "$cf_new_cflags" ; then
5010 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
5012 echo "${as_me:-configure}:5012: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
5014 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5015 CFLAGS="${CFLAGS}$cf_new_cflags"
5019 if test -n "$cf_new_cppflags" ; then
5020 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
5022 echo "${as_me:-configure}:5022: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
5024 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5025 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5029 if test -n "$cf_new_extra_cppflags" ; then
5030 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
5032 echo "${as_me:-configure}:5032: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
5034 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5035 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5041 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
5042 echo "$as_me:5042: checking if _XOPEN_SOURCE really is set" >&5
5043 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
5044 cat >conftest.$ac_ext <<_ACEOF
5045 #line 5045 "configure"
5046 #include "confdefs.h"
5052 #ifndef _XOPEN_SOURCE
5059 rm -f conftest.$ac_objext
5060 if { (eval echo "$as_me:5060: \"$ac_compile\"") >&5
5061 (eval $ac_compile) 2>&5
5063 echo "$as_me:5063: \$? = $ac_status" >&5
5064 (exit $ac_status); } &&
5065 { ac_try='test -s conftest.$ac_objext'
5066 { (eval echo "$as_me:5066: \"$ac_try\"") >&5
5069 echo "$as_me:5069: \$? = $ac_status" >&5
5070 (exit $ac_status); }; }; then
5071 cf_XOPEN_SOURCE_set=yes
5073 echo "$as_me: failed program was:" >&5
5074 cat conftest.$ac_ext >&5
5075 cf_XOPEN_SOURCE_set=no
5077 rm -f conftest.$ac_objext conftest.$ac_ext
5078 echo "$as_me:5078: result: $cf_XOPEN_SOURCE_set" >&5
5079 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
5080 if test $cf_XOPEN_SOURCE_set = yes
5082 cat >conftest.$ac_ext <<_ACEOF
5083 #line 5083 "configure"
5084 #include "confdefs.h"
5090 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
5097 rm -f conftest.$ac_objext
5098 if { (eval echo "$as_me:5098: \"$ac_compile\"") >&5
5099 (eval $ac_compile) 2>&5
5101 echo "$as_me:5101: \$? = $ac_status" >&5
5102 (exit $ac_status); } &&
5103 { ac_try='test -s conftest.$ac_objext'
5104 { (eval echo "$as_me:5104: \"$ac_try\"") >&5
5107 echo "$as_me:5107: \$? = $ac_status" >&5
5108 (exit $ac_status); }; }; then
5109 cf_XOPEN_SOURCE_set_ok=yes
5111 echo "$as_me: failed program was:" >&5
5112 cat conftest.$ac_ext >&5
5113 cf_XOPEN_SOURCE_set_ok=no
5115 rm -f conftest.$ac_objext conftest.$ac_ext
5116 if test $cf_XOPEN_SOURCE_set_ok = no
5118 { echo "$as_me:5118: WARNING: _XOPEN_SOURCE is lower than requested" >&5
5119 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
5123 echo "$as_me:5123: checking if we should define _XOPEN_SOURCE" >&5
5124 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
5125 if test "${cf_cv_xopen_source+set}" = set; then
5126 echo $ECHO_N "(cached) $ECHO_C" >&6
5129 cat >conftest.$ac_ext <<_ACEOF
5130 #line 5130 "configure"
5131 #include "confdefs.h"
5135 #include <sys/types.h>
5141 #ifndef _XOPEN_SOURCE
5148 rm -f conftest.$ac_objext
5149 if { (eval echo "$as_me:5149: \"$ac_compile\"") >&5
5150 (eval $ac_compile) 2>&5
5152 echo "$as_me:5152: \$? = $ac_status" >&5
5153 (exit $ac_status); } &&
5154 { ac_try='test -s conftest.$ac_objext'
5155 { (eval echo "$as_me:5155: \"$ac_try\"") >&5
5158 echo "$as_me:5158: \$? = $ac_status" >&5
5159 (exit $ac_status); }; }; then
5160 cf_cv_xopen_source=no
5162 echo "$as_me: failed program was:" >&5
5163 cat conftest.$ac_ext >&5
5166 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5167 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
5169 cat >conftest.$ac_ext <<_ACEOF
5170 #line 5170 "configure"
5171 #include "confdefs.h"
5175 #include <sys/types.h>
5181 #ifdef _XOPEN_SOURCE
5188 rm -f conftest.$ac_objext
5189 if { (eval echo "$as_me:5189: \"$ac_compile\"") >&5
5190 (eval $ac_compile) 2>&5
5192 echo "$as_me:5192: \$? = $ac_status" >&5
5193 (exit $ac_status); } &&
5194 { ac_try='test -s conftest.$ac_objext'
5195 { (eval echo "$as_me:5195: \"$ac_try\"") >&5
5198 echo "$as_me:5198: \$? = $ac_status" >&5
5199 (exit $ac_status); }; }; then
5200 cf_cv_xopen_source=no
5202 echo "$as_me: failed program was:" >&5
5203 cat conftest.$ac_ext >&5
5204 cf_cv_xopen_source=$cf_XOPEN_SOURCE
5206 rm -f conftest.$ac_objext conftest.$ac_ext
5210 rm -f conftest.$ac_objext conftest.$ac_ext
5213 echo "$as_me:5213: result: $cf_cv_xopen_source" >&5
5214 echo "${ECHO_T}$cf_cv_xopen_source" >&6
5216 if test "$cf_cv_xopen_source" != no ; then
5218 CFLAGS=`echo "$CFLAGS" | \
5219 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5220 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5222 CPPFLAGS=`echo "$CPPFLAGS" | \
5223 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5224 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5226 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
5231 cf_new_extra_cppflags=
5233 for cf_add_cflags in $cf_temp_xopen_source
5235 case $cf_fix_cppflags in
5237 case $cf_add_cflags in
5238 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5239 case $cf_add_cflags in
5241 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5243 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5244 && test -z "${cf_tst_cflags}" \
5245 && cf_fix_cppflags=yes
5247 if test $cf_fix_cppflags = yes ; then
5249 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5250 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5253 elif test "${cf_tst_cflags}" = "\"'" ; then
5255 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5256 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5266 case $cf_add_cflags in
5268 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5270 CPPFLAGS=`echo "$CPPFLAGS" | \
5271 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5272 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5277 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5278 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5285 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5286 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5293 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5294 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5296 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
5298 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5299 && test -z "${cf_tst_cflags}" \
5300 && cf_fix_cppflags=no
5305 if test -n "$cf_new_cflags" ; then
5307 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5308 CFLAGS="${CFLAGS}$cf_new_cflags"
5312 if test -n "$cf_new_cppflags" ; then
5314 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5315 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5319 if test -n "$cf_new_extra_cppflags" ; then
5321 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5322 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5330 fi # cf_cv_posix_visible
5332 echo "$as_me:5332: checking for signal global datatype" >&5
5333 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
5334 if test "${cf_cv_sig_atomic_t+set}" = set; then
5335 echo $ECHO_N "(cached) $ECHO_C" >&6
5339 "volatile sig_atomic_t" \
5343 cat >conftest.$ac_ext <<_ACEOF
5344 #line 5344 "configure"
5345 #include "confdefs.h"
5347 #include <sys/types.h>
5353 static void handler(int sig)
5361 signal(SIGINT, handler);
5367 rm -f conftest.$ac_objext
5368 if { (eval echo "$as_me:5368: \"$ac_compile\"") >&5
5369 (eval $ac_compile) 2>&5
5371 echo "$as_me:5371: \$? = $ac_status" >&5
5372 (exit $ac_status); } &&
5373 { ac_try='test -s conftest.$ac_objext'
5374 { (eval echo "$as_me:5374: \"$ac_try\"") >&5
5377 echo "$as_me:5377: \$? = $ac_status" >&5
5378 (exit $ac_status); }; }; then
5379 cf_cv_sig_atomic_t=$cf_type
5381 echo "$as_me: failed program was:" >&5
5382 cat conftest.$ac_ext >&5
5383 cf_cv_sig_atomic_t=no
5385 rm -f conftest.$ac_objext conftest.$ac_ext
5386 test "$cf_cv_sig_atomic_t" != no && break
5391 echo "$as_me:5391: result: $cf_cv_sig_atomic_t" >&5
5392 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
5393 test "$cf_cv_sig_atomic_t" != no &&
5394 cat >>confdefs.h <<EOF
5395 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
5398 # Work around breakage on OS X
5400 echo "$as_me:5400: checking if SIGWINCH is defined" >&5
5401 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
5402 if test "${cf_cv_define_sigwinch+set}" = set; then
5403 echo $ECHO_N "(cached) $ECHO_C" >&6
5406 cat >conftest.$ac_ext <<_ACEOF
5407 #line 5407 "configure"
5408 #include "confdefs.h"
5410 #include <sys/types.h>
5411 #include <sys/signal.h>
5416 int x = SIGWINCH; (void)x
5421 rm -f conftest.$ac_objext
5422 if { (eval echo "$as_me:5422: \"$ac_compile\"") >&5
5423 (eval $ac_compile) 2>&5
5425 echo "$as_me:5425: \$? = $ac_status" >&5
5426 (exit $ac_status); } &&
5427 { ac_try='test -s conftest.$ac_objext'
5428 { (eval echo "$as_me:5428: \"$ac_try\"") >&5
5431 echo "$as_me:5431: \$? = $ac_status" >&5
5432 (exit $ac_status); }; }; then
5433 cf_cv_define_sigwinch=yes
5435 echo "$as_me: failed program was:" >&5
5436 cat conftest.$ac_ext >&5
5437 cat >conftest.$ac_ext <<_ACEOF
5438 #line 5438 "configure"
5439 #include "confdefs.h"
5441 #undef _XOPEN_SOURCE
5442 #undef _POSIX_SOURCE
5443 #undef _POSIX_C_SOURCE
5444 #include <sys/types.h>
5445 #include <sys/signal.h>
5450 int x = SIGWINCH; (void)x
5455 rm -f conftest.$ac_objext
5456 if { (eval echo "$as_me:5456: \"$ac_compile\"") >&5
5457 (eval $ac_compile) 2>&5
5459 echo "$as_me:5459: \$? = $ac_status" >&5
5460 (exit $ac_status); } &&
5461 { ac_try='test -s conftest.$ac_objext'
5462 { (eval echo "$as_me:5462: \"$ac_try\"") >&5
5465 echo "$as_me:5465: \$? = $ac_status" >&5
5466 (exit $ac_status); }; }; then
5467 cf_cv_define_sigwinch=maybe
5469 echo "$as_me: failed program was:" >&5
5470 cat conftest.$ac_ext >&5
5471 cf_cv_define_sigwinch=no
5473 rm -f conftest.$ac_objext conftest.$ac_ext
5476 rm -f conftest.$ac_objext conftest.$ac_ext
5479 echo "$as_me:5479: result: $cf_cv_define_sigwinch" >&5
5480 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
5482 if test "$cf_cv_define_sigwinch" = maybe ; then
5483 echo "$as_me:5483: checking for actual SIGWINCH definition" >&5
5484 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
5485 if test "${cf_cv_fixup_sigwinch+set}" = set; then
5486 echo $ECHO_N "(cached) $ECHO_C" >&6
5489 cf_cv_fixup_sigwinch=unknown
5491 while test $cf_sigwinch != 1
5493 cat >conftest.$ac_ext <<_ACEOF
5494 #line 5494 "configure"
5495 #include "confdefs.h"
5497 #undef _XOPEN_SOURCE
5498 #undef _POSIX_SOURCE
5499 #undef _POSIX_C_SOURCE
5500 #include <sys/types.h>
5501 #include <sys/signal.h>
5507 #if SIGWINCH != $cf_sigwinch
5510 int x = SIGWINCH; (void)x
5515 rm -f conftest.$ac_objext
5516 if { (eval echo "$as_me:5516: \"$ac_compile\"") >&5
5517 (eval $ac_compile) 2>&5
5519 echo "$as_me:5519: \$? = $ac_status" >&5
5520 (exit $ac_status); } &&
5521 { ac_try='test -s conftest.$ac_objext'
5522 { (eval echo "$as_me:5522: \"$ac_try\"") >&5
5525 echo "$as_me:5525: \$? = $ac_status" >&5
5526 (exit $ac_status); }; }; then
5527 cf_cv_fixup_sigwinch=$cf_sigwinch
5530 echo "$as_me: failed program was:" >&5
5531 cat conftest.$ac_ext >&5
5533 rm -f conftest.$ac_objext conftest.$ac_ext
5535 cf_sigwinch=`expr $cf_sigwinch - 1`
5539 echo "$as_me:5539: result: $cf_cv_fixup_sigwinch" >&5
5540 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
5542 if test "$cf_cv_fixup_sigwinch" != unknown ; then
5543 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
5547 # Checks for CODESET support.
5549 echo "$as_me:5549: checking for nl_langinfo and CODESET" >&5
5550 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
5551 if test "${am_cv_langinfo_codeset+set}" = set; then
5552 echo $ECHO_N "(cached) $ECHO_C" >&6
5554 cat >conftest.$ac_ext <<_ACEOF
5555 #line 5555 "configure"
5556 #include "confdefs.h"
5557 #include <langinfo.h>
5561 char* cs = nl_langinfo(CODESET); (void)cs
5566 rm -f conftest.$ac_objext conftest$ac_exeext
5567 if { (eval echo "$as_me:5567: \"$ac_link\"") >&5
5568 (eval $ac_link) 2>&5
5570 echo "$as_me:5570: \$? = $ac_status" >&5
5571 (exit $ac_status); } &&
5572 { ac_try='test -s conftest$ac_exeext'
5573 { (eval echo "$as_me:5573: \"$ac_try\"") >&5
5576 echo "$as_me:5576: \$? = $ac_status" >&5
5577 (exit $ac_status); }; }; then
5578 am_cv_langinfo_codeset=yes
5580 echo "$as_me: failed program was:" >&5
5581 cat conftest.$ac_ext >&5
5582 am_cv_langinfo_codeset=no
5584 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5587 echo "$as_me:5587: result: $am_cv_langinfo_codeset" >&5
5588 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
5589 if test $am_cv_langinfo_codeset = yes; then
5591 cat >>confdefs.h <<\EOF
5592 #define HAVE_LANGINFO_CODESET 1
5597 echo "$as_me:5597: checking if you want to use pkg-config" >&5
5598 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
5600 # Check whether --with-pkg-config or --without-pkg-config was given.
5601 if test "${with_pkg_config+set}" = set; then
5602 withval="$with_pkg_config"
5603 cf_pkg_config=$withval
5607 echo "$as_me:5607: result: $cf_pkg_config" >&5
5608 echo "${ECHO_T}$cf_pkg_config" >&6
5610 case $cf_pkg_config in
5616 if test -n "$ac_tool_prefix"; then
5617 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5618 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5619 echo "$as_me:5619: checking for $ac_word" >&5
5620 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5621 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
5622 echo $ECHO_N "(cached) $ECHO_C" >&6
5626 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5629 ac_save_IFS=$IFS; IFS=$ac_path_separator
5631 for ac_dir in $ac_dummy; do
5633 test -z "$ac_dir" && ac_dir=.
5634 if $as_executable_p "$ac_dir/$ac_word"; then
5635 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
5636 echo "$as_me:5636: found $ac_dir/$ac_word" >&5
5644 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5646 if test -n "$PKG_CONFIG"; then
5647 echo "$as_me:5647: result: $PKG_CONFIG" >&5
5648 echo "${ECHO_T}$PKG_CONFIG" >&6
5650 echo "$as_me:5650: result: no" >&5
5651 echo "${ECHO_T}no" >&6
5655 if test -z "$ac_cv_path_PKG_CONFIG"; then
5656 ac_pt_PKG_CONFIG=$PKG_CONFIG
5657 # Extract the first word of "pkg-config", so it can be a program name with args.
5658 set dummy pkg-config; ac_word=$2
5659 echo "$as_me:5659: checking for $ac_word" >&5
5660 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5661 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
5662 echo $ECHO_N "(cached) $ECHO_C" >&6
5664 case $ac_pt_PKG_CONFIG in
5666 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5669 ac_save_IFS=$IFS; IFS=$ac_path_separator
5671 for ac_dir in $ac_dummy; do
5673 test -z "$ac_dir" && ac_dir=.
5674 if $as_executable_p "$ac_dir/$ac_word"; then
5675 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
5676 echo "$as_me:5676: found $ac_dir/$ac_word" >&5
5681 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
5685 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5687 if test -n "$ac_pt_PKG_CONFIG"; then
5688 echo "$as_me:5688: result: $ac_pt_PKG_CONFIG" >&5
5689 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
5691 echo "$as_me:5691: result: no" >&5
5692 echo "${ECHO_T}no" >&6
5695 PKG_CONFIG=$ac_pt_PKG_CONFIG
5697 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5706 test -z "$PKG_CONFIG" && PKG_CONFIG=none
5707 if test "$PKG_CONFIG" != none ; then
5709 if test "x$prefix" != xNONE; then
5710 cf_path_syntax="$prefix"
5712 cf_path_syntax="$ac_default_prefix"
5715 case ".$PKG_CONFIG" in
5720 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5722 (.\${*prefix}*|.\${*dir}*)
5723 eval PKG_CONFIG="$PKG_CONFIG"
5724 case ".$PKG_CONFIG" in
5726 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5731 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5734 { { echo "$as_me:5734: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
5735 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
5736 { (exit 1); exit 1; }; }
5740 elif test "x$cf_pkg_config" != xno ; then
5741 { echo "$as_me:5741: WARNING: pkg-config is not installed" >&5
5742 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
5745 echo "$as_me:5745: checking if you want to see long compiling messages" >&5
5746 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
5748 # Check whether --enable-echo or --disable-echo was given.
5749 if test "${enable_echo+set}" = set; then
5750 enableval="$enable_echo"
5751 test "$enableval" != no && enableval=yes
5752 if test "$enableval" != "yes" ; then
5755 ECHO_LD='@echo linking $@;'
5756 RULE_CC='@echo compiling $<'
5757 SHOW_CC='@echo compiling $@'
5779 echo "$as_me:5779: result: $enableval" >&5
5780 echo "${ECHO_T}$enableval" >&6
5782 echo "$as_me:5782: checking for ncurses wrap-prefix" >&5
5783 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
5785 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
5786 if test "${with_ncurses_wrap_prefix+set}" = set; then
5787 withval="$with_ncurses_wrap_prefix"
5788 NCURSES_WRAP_PREFIX=$withval
5790 NCURSES_WRAP_PREFIX=_nc_
5792 echo "$as_me:5792: result: $NCURSES_WRAP_PREFIX" >&5
5793 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
5795 echo "$as_me:5795: checking if you want to check for wide-character functions" >&5
5796 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
5798 # Check whether --enable-widec or --disable-widec was given.
5799 if test "${enable_widec+set}" = set; then
5800 enableval="$enable_widec"
5801 test "$enableval" != no && enableval=yes
5802 if test "$enableval" != "yes" ; then
5812 echo "$as_me:5812: result: $cf_enable_widec" >&5
5813 echo "${ECHO_T}$cf_enable_widec" >&6
5815 echo "$as_me:5815: checking for specific curses-directory" >&5
5816 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
5818 # Check whether --with-curses-dir or --without-curses-dir was given.
5819 if test "${with_curses_dir+set}" = set; then
5820 withval="$with_curses_dir"
5821 cf_cv_curses_dir=$withval
5825 echo "$as_me:5825: result: $cf_cv_curses_dir" >&5
5826 echo "${ECHO_T}$cf_cv_curses_dir" >&6
5828 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5831 if test "x$prefix" != xNONE; then
5832 cf_path_syntax="$prefix"
5834 cf_path_syntax="$ac_default_prefix"
5842 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5844 (.\${*prefix}*|.\${*dir}*)
5845 eval withval="$withval"
5848 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5853 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5856 { { echo "$as_me:5856: error: expected a pathname, not \"$withval\"" >&5
5857 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5858 { (exit 1); exit 1; }; }
5862 if test -d "$cf_cv_curses_dir"
5865 if test -n "$cf_cv_curses_dir/include" ; then
5866 for cf_add_incdir in $cf_cv_curses_dir/include
5868 while test $cf_add_incdir != /usr/include
5870 if test -d $cf_add_incdir
5873 if test -n "$CFLAGS$CPPFLAGS" ; then
5874 # a loop is needed to ensure we can add subdirs of existing dirs
5875 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5876 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5877 cf_have_incdir=yes; break
5882 if test "$cf_have_incdir" = no ; then
5883 if test "$cf_add_incdir" = /usr/local/include ; then
5884 if test "$GCC" = yes
5886 cf_save_CPPFLAGS=$CPPFLAGS
5888 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5889 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5891 cat >conftest.$ac_ext <<_ACEOF
5892 #line 5892 "configure"
5893 #include "confdefs.h"
5903 rm -f conftest.$ac_objext
5904 if { (eval echo "$as_me:5904: \"$ac_compile\"") >&5
5905 (eval $ac_compile) 2>&5
5907 echo "$as_me:5907: \$? = $ac_status" >&5
5908 (exit $ac_status); } &&
5909 { ac_try='test -s conftest.$ac_objext'
5910 { (eval echo "$as_me:5910: \"$ac_try\"") >&5
5913 echo "$as_me:5913: \$? = $ac_status" >&5
5914 (exit $ac_status); }; }; then
5917 echo "$as_me: failed program was:" >&5
5918 cat conftest.$ac_ext >&5
5921 rm -f conftest.$ac_objext conftest.$ac_ext
5922 CPPFLAGS=$cf_save_CPPFLAGS
5927 if test "$cf_have_incdir" = no ; then
5928 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5930 echo "${as_me:-configure}:5930: testing adding $cf_add_incdir to include-path ..." 1>&5
5932 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5934 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5935 test "$cf_top_incdir" = "$cf_add_incdir" && break
5936 cf_add_incdir="$cf_top_incdir"
5947 if test -n "$cf_cv_curses_dir/lib" ; then
5948 for cf_add_libdir in $cf_cv_curses_dir/lib
5950 if test $cf_add_libdir = /usr/lib ; then
5952 elif test -d $cf_add_libdir
5955 if test -n "$LDFLAGS$LIBS" ; then
5956 # a loop is needed to ensure we can add subdirs of existing dirs
5957 for cf_test_libdir in $LDFLAGS $LIBS ; do
5958 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5959 cf_have_libdir=yes; break
5963 if test "$cf_have_libdir" = no ; then
5964 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5966 echo "${as_me:-configure}:5966: testing adding $cf_add_libdir to library-path ..." 1>&5
5968 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5979 echo "$as_me:5979: checking for specified curses library type" >&5
5980 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
5982 # Check whether --with-screen or --without-screen was given.
5983 if test "${with_screen+set}" = set; then
5984 withval="$with_screen"
5985 cf_cv_screen=$withval
5988 # Check whether --with-ncursesw or --without-ncursesw was given.
5989 if test "${with_ncursesw+set}" = set; then
5990 withval="$with_ncursesw"
5991 cf_cv_screen=ncursesw
5994 # Check whether --with-ncurses or --without-ncurses was given.
5995 if test "${with_ncurses+set}" = set; then
5996 withval="$with_ncurses"
5997 cf_cv_screen=ncurses
6000 # Check whether --with-pdcurses or --without-pdcurses was given.
6001 if test "${with_pdcurses+set}" = set; then
6002 withval="$with_pdcurses"
6003 cf_cv_screen=pdcurses
6006 # Check whether --with-curses-colr or --without-curses-colr was given.
6007 if test "${with_curses_colr+set}" = set; then
6008 withval="$with_curses_colr"
6009 cf_cv_screen=curses_colr
6012 # Check whether --with-curses-5lib or --without-curses-5lib was given.
6013 if test "${with_curses_5lib+set}" = set; then
6014 withval="$with_curses_5lib"
6015 cf_cv_screen=curses_5lib
6023 echo "$as_me:6023: result: $cf_cv_screen" >&5
6024 echo "${ECHO_T}$cf_cv_screen" >&6
6026 case $cf_cv_screen in
6029 echo "$as_me:6029: checking for extra include directories" >&5
6030 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
6031 if test "${cf_cv_curses_incdir+set}" = set; then
6032 echo $ECHO_N "(cached) $ECHO_C" >&6
6035 cf_cv_curses_incdir=no
6038 if test "x$cf_cv_screen" = "xcurses_colr"
6040 test -d /usr/include/curses_colr && \
6041 cf_cv_curses_incdir="-I/usr/include/curses_colr"
6045 if test "x$cf_cv_screen" = "xcurses_5lib"
6047 test -d /usr/5lib && \
6048 test -d /usr/5include && \
6049 cf_cv_curses_incdir="-I/usr/5include"
6055 echo "$as_me:6055: result: $cf_cv_curses_incdir" >&5
6056 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
6057 if test "$cf_cv_curses_incdir" != no
6060 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6061 CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
6065 echo "$as_me:6065: checking if we have identified curses headers" >&5
6066 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6067 if test "${cf_cv_ncurses_header+set}" = set; then
6068 echo $ECHO_N "(cached) $ECHO_C" >&6
6071 cf_cv_ncurses_header=none
6074 curses.h ncurses/ncurses.h ncurses/curses.h
6076 cat >conftest.$ac_ext <<_ACEOF
6077 #line 6077 "configure"
6078 #include "confdefs.h"
6079 #include <${cf_header}>
6083 initscr(); tgoto("?", 0,0)
6088 rm -f conftest.$ac_objext
6089 if { (eval echo "$as_me:6089: \"$ac_compile\"") >&5
6090 (eval $ac_compile) 2>&5
6092 echo "$as_me:6092: \$? = $ac_status" >&5
6093 (exit $ac_status); } &&
6094 { ac_try='test -s conftest.$ac_objext'
6095 { (eval echo "$as_me:6095: \"$ac_try\"") >&5
6098 echo "$as_me:6098: \$? = $ac_status" >&5
6099 (exit $ac_status); }; }; then
6100 cf_cv_ncurses_header=$cf_header; break
6102 echo "$as_me: failed program was:" >&5
6103 cat conftest.$ac_ext >&5
6105 rm -f conftest.$ac_objext conftest.$ac_ext
6109 echo "$as_me:6109: result: $cf_cv_ncurses_header" >&5
6110 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6112 if test "$cf_cv_ncurses_header" = none ; then
6113 { { echo "$as_me:6113: error: No curses header-files found" >&5
6114 echo "$as_me: error: No curses header-files found" >&2;}
6115 { (exit 1); exit 1; }; }
6118 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6120 for ac_header in $cf_cv_ncurses_header
6122 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6123 echo "$as_me:6123: checking for $ac_header" >&5
6124 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6125 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6126 echo $ECHO_N "(cached) $ECHO_C" >&6
6128 cat >conftest.$ac_ext <<_ACEOF
6129 #line 6129 "configure"
6130 #include "confdefs.h"
6131 #include <$ac_header>
6133 if { (eval echo "$as_me:6133: \"$ac_cpp conftest.$ac_ext\"") >&5
6134 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6136 egrep -v '^ *\+' conftest.er1 >conftest.err
6138 cat conftest.err >&5
6139 echo "$as_me:6139: \$? = $ac_status" >&5
6140 (exit $ac_status); } >/dev/null; then
6141 if test -s conftest.err; then
6142 ac_cpp_err=$ac_c_preproc_warn_flag
6149 if test -z "$ac_cpp_err"; then
6150 eval "$as_ac_Header=yes"
6152 echo "$as_me: failed program was:" >&5
6153 cat conftest.$ac_ext >&5
6154 eval "$as_ac_Header=no"
6156 rm -f conftest.err conftest.$ac_ext
6158 echo "$as_me:6158: result: `eval echo '${'$as_ac_Header'}'`" >&5
6159 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6160 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6161 cat >>confdefs.h <<EOF
6162 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6168 echo "$as_me:6168: checking for terminfo header" >&5
6169 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6170 if test "${cf_cv_term_header+set}" = set; then
6171 echo $ECHO_N "(cached) $ECHO_C" >&6
6174 case ${cf_cv_ncurses_header} in
6175 (*/ncurses.h|*/ncursesw.h)
6176 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6179 cf_term_header=term.h
6183 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6185 cat >conftest.$ac_ext <<_ACEOF
6186 #line 6186 "configure"
6187 #include "confdefs.h"
6189 #include <${cf_cv_ncurses_header:-curses.h}>
6195 int x = auto_left_margin; (void)x
6200 rm -f conftest.$ac_objext
6201 if { (eval echo "$as_me:6201: \"$ac_compile\"") >&5
6202 (eval $ac_compile) 2>&5
6204 echo "$as_me:6204: \$? = $ac_status" >&5
6205 (exit $ac_status); } &&
6206 { ac_try='test -s conftest.$ac_objext'
6207 { (eval echo "$as_me:6207: \"$ac_try\"") >&5
6210 echo "$as_me:6210: \$? = $ac_status" >&5
6211 (exit $ac_status); }; }; then
6213 cf_cv_term_header="$cf_test"
6215 echo "$as_me: failed program was:" >&5
6216 cat conftest.$ac_ext >&5
6218 cf_cv_term_header=unknown
6221 rm -f conftest.$ac_objext conftest.$ac_ext
6222 test "$cf_cv_term_header" != unknown && break
6226 echo "$as_me:6226: result: $cf_cv_term_header" >&5
6227 echo "${ECHO_T}$cf_cv_term_header" >&6
6229 # Set definitions to allow ifdef'ing to accommodate subdirectories
6231 case $cf_cv_term_header in
6234 cat >>confdefs.h <<\EOF
6235 #define HAVE_TERM_H 1
6241 case $cf_cv_term_header in
6244 cat >>confdefs.h <<\EOF
6245 #define HAVE_NCURSES_TERM_H 1
6251 cat >>confdefs.h <<\EOF
6252 #define HAVE_NCURSESW_TERM_H 1
6258 echo "$as_me:6258: checking for ncurses version" >&5
6259 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6260 if test "${cf_cv_ncurses_version+set}" = set; then
6261 echo $ECHO_N "(cached) $ECHO_C" >&6
6264 cf_cv_ncurses_version=no
6267 if test "$cross_compiling" = yes; then
6269 # This will not work if the preprocessor splits the line after the
6270 # Autoconf token. The 'unproto' program does that.
6271 cat > conftest.$ac_ext <<EOF
6272 #include <${cf_cv_ncurses_header:-curses.h}>
6274 #ifdef NCURSES_VERSION
6275 Autoconf NCURSES_VERSION
6283 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6284 { (eval echo "$as_me:6284: \"$cf_try\"") >&5
6287 echo "$as_me:6287: \$? = $ac_status" >&5
6288 (exit $ac_status); }
6289 if test -f conftest.out ; then
6290 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6291 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6296 cat >conftest.$ac_ext <<_ACEOF
6297 #line 6297 "configure"
6298 #include "confdefs.h"
6300 #include <${cf_cv_ncurses_header:-curses.h}>
6304 FILE *fp = fopen("$cf_tempfile", "w");
6305 #ifdef NCURSES_VERSION
6306 # ifdef NCURSES_VERSION_PATCH
6307 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6309 fprintf(fp, "%s\n", NCURSES_VERSION);
6313 fprintf(fp, "old\n");
6318 ${cf_cv_main_return:-return}(0);
6321 rm -f conftest$ac_exeext
6322 if { (eval echo "$as_me:6322: \"$ac_link\"") >&5
6323 (eval $ac_link) 2>&5
6325 echo "$as_me:6325: \$? = $ac_status" >&5
6326 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6327 { (eval echo "$as_me:6327: \"$ac_try\"") >&5
6330 echo "$as_me:6330: \$? = $ac_status" >&5
6331 (exit $ac_status); }; }; then
6333 cf_cv_ncurses_version=`cat $cf_tempfile`
6335 echo "$as_me: program exited with status $ac_status" >&5
6336 echo "$as_me: failed program was:" >&5
6337 cat conftest.$ac_ext >&5
6339 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6344 echo "$as_me:6344: result: $cf_cv_ncurses_version" >&5
6345 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6346 test "$cf_cv_ncurses_version" = no ||
6347 cat >>confdefs.h <<\EOF
6351 echo "$as_me:6351: checking if we have identified curses libraries" >&5
6352 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
6353 cat >conftest.$ac_ext <<_ACEOF
6354 #line 6354 "configure"
6355 #include "confdefs.h"
6356 #include <${cf_cv_ncurses_header:-curses.h}>
6360 initscr(); tgoto("?", 0,0)
6365 rm -f conftest.$ac_objext conftest$ac_exeext
6366 if { (eval echo "$as_me:6366: \"$ac_link\"") >&5
6367 (eval $ac_link) 2>&5
6369 echo "$as_me:6369: \$? = $ac_status" >&5
6370 (exit $ac_status); } &&
6371 { ac_try='test -s conftest$ac_exeext'
6372 { (eval echo "$as_me:6372: \"$ac_try\"") >&5
6375 echo "$as_me:6375: \$? = $ac_status" >&5
6376 (exit $ac_status); }; }; then
6379 echo "$as_me: failed program was:" >&5
6380 cat conftest.$ac_ext >&5
6383 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6384 echo "$as_me:6384: result: $cf_result" >&5
6385 echo "${ECHO_T}$cf_result" >&6
6387 if test "$cf_result" = no ; then
6390 echo "$as_me:6390: checking for tgoto in -lmytinfo" >&5
6391 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6392 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6393 echo $ECHO_N "(cached) $ECHO_C" >&6
6395 ac_check_lib_save_LIBS=$LIBS
6396 LIBS="-lmytinfo $LIBS"
6397 cat >conftest.$ac_ext <<_ACEOF
6398 #line 6398 "configure"
6399 #include "confdefs.h"
6401 /* Override any gcc2 internal prototype to avoid an error. */
6405 /* We use char because int might match the return type of a gcc2
6406 builtin and then its argument prototype would still apply. */
6416 rm -f conftest.$ac_objext conftest$ac_exeext
6417 if { (eval echo "$as_me:6417: \"$ac_link\"") >&5
6418 (eval $ac_link) 2>&5
6420 echo "$as_me:6420: \$? = $ac_status" >&5
6421 (exit $ac_status); } &&
6422 { ac_try='test -s conftest$ac_exeext'
6423 { (eval echo "$as_me:6423: \"$ac_try\"") >&5
6426 echo "$as_me:6426: \$? = $ac_status" >&5
6427 (exit $ac_status); }; }; then
6428 ac_cv_lib_mytinfo_tgoto=yes
6430 echo "$as_me: failed program was:" >&5
6431 cat conftest.$ac_ext >&5
6432 ac_cv_lib_mytinfo_tgoto=no
6434 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6435 LIBS=$ac_check_lib_save_LIBS
6437 echo "$as_me:6437: result: $ac_cv_lib_mytinfo_tgoto" >&5
6438 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6439 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6444 for cf_add_1lib in -lmytinfo; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6446 for cf_add_1lib in $cf_add_0lib; do
6447 for cf_add_2lib in $cf_add_libs; do
6448 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6453 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6461 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
6462 # next (1998), and xcurses "newer" (2000). There is no header file for
6463 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
6464 # term.h) for cur_colr
6465 if test "x$cf_cv_screen" = "xcurses_colr"
6467 echo "$as_me:6467: checking for initscr in -lcur_colr" >&5
6468 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
6469 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
6470 echo $ECHO_N "(cached) $ECHO_C" >&6
6472 ac_check_lib_save_LIBS=$LIBS
6473 LIBS="-lcur_colr $LIBS"
6474 cat >conftest.$ac_ext <<_ACEOF
6475 #line 6475 "configure"
6476 #include "confdefs.h"
6478 /* Override any gcc2 internal prototype to avoid an error. */
6482 /* We use char because int might match the return type of a gcc2
6483 builtin and then its argument prototype would still apply. */
6493 rm -f conftest.$ac_objext conftest$ac_exeext
6494 if { (eval echo "$as_me:6494: \"$ac_link\"") >&5
6495 (eval $ac_link) 2>&5
6497 echo "$as_me:6497: \$? = $ac_status" >&5
6498 (exit $ac_status); } &&
6499 { ac_try='test -s conftest$ac_exeext'
6500 { (eval echo "$as_me:6500: \"$ac_try\"") >&5
6503 echo "$as_me:6503: \$? = $ac_status" >&5
6504 (exit $ac_status); }; }; then
6505 ac_cv_lib_cur_colr_initscr=yes
6507 echo "$as_me: failed program was:" >&5
6508 cat conftest.$ac_ext >&5
6509 ac_cv_lib_cur_colr_initscr=no
6511 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6512 LIBS=$ac_check_lib_save_LIBS
6514 echo "$as_me:6514: result: $ac_cv_lib_cur_colr_initscr" >&5
6515 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
6516 if test $ac_cv_lib_cur_colr_initscr = yes; then
6521 for cf_add_1lib in -lcur_colr; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6523 for cf_add_1lib in $cf_add_0lib; do
6524 for cf_add_2lib in $cf_add_libs; do
6525 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6530 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6534 ac_cv_func_initscr=yes
6538 echo "$as_me:6538: checking for initscr in -lHcurses" >&5
6539 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
6540 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
6541 echo $ECHO_N "(cached) $ECHO_C" >&6
6543 ac_check_lib_save_LIBS=$LIBS
6544 LIBS="-lHcurses $LIBS"
6545 cat >conftest.$ac_ext <<_ACEOF
6546 #line 6546 "configure"
6547 #include "confdefs.h"
6549 /* Override any gcc2 internal prototype to avoid an error. */
6553 /* We use char because int might match the return type of a gcc2
6554 builtin and then its argument prototype would still apply. */
6564 rm -f conftest.$ac_objext conftest$ac_exeext
6565 if { (eval echo "$as_me:6565: \"$ac_link\"") >&5
6566 (eval $ac_link) 2>&5
6568 echo "$as_me:6568: \$? = $ac_status" >&5
6569 (exit $ac_status); } &&
6570 { ac_try='test -s conftest$ac_exeext'
6571 { (eval echo "$as_me:6571: \"$ac_try\"") >&5
6574 echo "$as_me:6574: \$? = $ac_status" >&5
6575 (exit $ac_status); }; }; then
6576 ac_cv_lib_Hcurses_initscr=yes
6578 echo "$as_me: failed program was:" >&5
6579 cat conftest.$ac_ext >&5
6580 ac_cv_lib_Hcurses_initscr=no
6582 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6583 LIBS=$ac_check_lib_save_LIBS
6585 echo "$as_me:6585: result: $ac_cv_lib_Hcurses_initscr" >&5
6586 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
6587 if test $ac_cv_lib_Hcurses_initscr = yes; then
6589 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
6594 for cf_add_1lib in -lHcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6596 for cf_add_1lib in $cf_add_0lib; do
6597 for cf_add_2lib in $cf_add_libs; do
6598 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6603 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6607 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6608 CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
6610 ac_cv_func_initscr=yes
6619 case `arch 2>/dev/null` in
6624 if test -n "/lib64" ; then
6625 for cf_add_libdir in /lib64
6627 if test $cf_add_libdir = /usr/lib ; then
6629 elif test -d $cf_add_libdir
6632 if test -n "$LDFLAGS$LIBS" ; then
6633 # a loop is needed to ensure we can add subdirs of existing dirs
6634 for cf_test_libdir in $LDFLAGS $LIBS ; do
6635 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6636 cf_have_libdir=yes; break
6640 if test "$cf_have_libdir" = no ; then
6641 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6643 echo "${as_me:-configure}:6643: testing adding $cf_add_libdir to library-path ..." 1>&5
6645 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6653 if test -n "/lib" ; then
6654 for cf_add_libdir in /lib
6656 if test $cf_add_libdir = /usr/lib ; then
6658 elif test -d $cf_add_libdir
6661 if test -n "$LDFLAGS$LIBS" ; then
6662 # a loop is needed to ensure we can add subdirs of existing dirs
6663 for cf_test_libdir in $LDFLAGS $LIBS ; do
6664 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6665 cf_have_libdir=yes; break
6669 if test "$cf_have_libdir" = no ; then
6670 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6672 echo "${as_me:-configure}:6672: testing adding $cf_add_libdir to library-path ..." 1>&5
6674 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6684 if test -n "/lib" ; then
6685 for cf_add_libdir in /lib
6687 if test $cf_add_libdir = /usr/lib ; then
6689 elif test -d $cf_add_libdir
6692 if test -n "$LDFLAGS$LIBS" ; then
6693 # a loop is needed to ensure we can add subdirs of existing dirs
6694 for cf_test_libdir in $LDFLAGS $LIBS ; do
6695 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6696 cf_have_libdir=yes; break
6700 if test "$cf_have_libdir" = no ; then
6701 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6703 echo "${as_me:-configure}:6703: testing adding $cf_add_libdir to library-path ..." 1>&5
6705 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6715 if test "x$cf_cv_screen" = "xcurses_5lib"
6717 if test -d /usr/5lib ; then
6719 if test -n "/usr/5lib" ; then
6720 for cf_add_libdir in /usr/5lib
6722 if test $cf_add_libdir = /usr/lib ; then
6724 elif test -d $cf_add_libdir
6727 if test -n "$LDFLAGS$LIBS" ; then
6728 # a loop is needed to ensure we can add subdirs of existing dirs
6729 for cf_test_libdir in $LDFLAGS $LIBS ; do
6730 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6731 cf_have_libdir=yes; break
6735 if test "$cf_have_libdir" = no ; then
6736 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6738 echo "${as_me:-configure}:6738: testing adding $cf_add_libdir to library-path ..." 1>&5
6740 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6749 for cf_add_1lib in -lcurses -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6751 for cf_add_1lib in $cf_add_0lib; do
6752 for cf_add_2lib in $cf_add_libs; do
6753 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6758 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6764 ac_cv_func_initscr=yes
6768 if test ".$ac_cv_func_initscr" != .yes ; then
6769 cf_save_LIBS="$LIBS"
6771 if test ".${cf_cv_ncurses_version:-no}" != .no
6773 cf_check_list="ncurses curses cursesX"
6775 cf_check_list="cursesX curses ncurses"
6778 # Check for library containing tgoto. Do this before curses library
6779 # because it may be needed to link the test-case for initscr.
6780 if test "x$cf_term_lib" = x
6782 echo "$as_me:6782: checking for tgoto" >&5
6783 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
6784 if test "${ac_cv_func_tgoto+set}" = set; then
6785 echo $ECHO_N "(cached) $ECHO_C" >&6
6787 cat >conftest.$ac_ext <<_ACEOF
6788 #line 6788 "configure"
6789 #include "confdefs.h"
6790 #define tgoto autoconf_temporary
6791 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6798 /* We use char because int might match the return type of a gcc2
6799 builtin and then its argument prototype would still apply. */
6806 /* The GNU C library defines stubs for functions which it implements
6807 to always fail with ENOSYS. Some functions are actually named
6808 something starting with __ and the normal name is an alias. */
6809 #if defined (__stub_tgoto) || defined (__stub___tgoto)
6810 #error found stub for tgoto
6818 rm -f conftest.$ac_objext conftest$ac_exeext
6819 if { (eval echo "$as_me:6819: \"$ac_link\"") >&5
6820 (eval $ac_link) 2>&5
6822 echo "$as_me:6822: \$? = $ac_status" >&5
6823 (exit $ac_status); } &&
6824 { ac_try='test -s conftest$ac_exeext'
6825 { (eval echo "$as_me:6825: \"$ac_try\"") >&5
6828 echo "$as_me:6828: \$? = $ac_status" >&5
6829 (exit $ac_status); }; }; then
6830 ac_cv_func_tgoto=yes
6832 echo "$as_me: failed program was:" >&5
6833 cat conftest.$ac_ext >&5
6836 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6838 echo "$as_me:6838: result: $ac_cv_func_tgoto" >&5
6839 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
6840 if test $ac_cv_func_tgoto = yes; then
6841 cf_term_lib=predefined
6844 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
6846 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
6847 echo "$as_me:6847: checking for tgoto in -l$cf_term_lib" >&5
6848 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
6849 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
6850 echo $ECHO_N "(cached) $ECHO_C" >&6
6852 ac_check_lib_save_LIBS=$LIBS
6853 LIBS="-l$cf_term_lib $LIBS"
6854 cat >conftest.$ac_ext <<_ACEOF
6855 #line 6855 "configure"
6856 #include "confdefs.h"
6858 /* Override any gcc2 internal prototype to avoid an error. */
6862 /* We use char because int might match the return type of a gcc2
6863 builtin and then its argument prototype would still apply. */
6873 rm -f conftest.$ac_objext conftest$ac_exeext
6874 if { (eval echo "$as_me:6874: \"$ac_link\"") >&5
6875 (eval $ac_link) 2>&5
6877 echo "$as_me:6877: \$? = $ac_status" >&5
6878 (exit $ac_status); } &&
6879 { ac_try='test -s conftest$ac_exeext'
6880 { (eval echo "$as_me:6880: \"$ac_try\"") >&5
6883 echo "$as_me:6883: \$? = $ac_status" >&5
6884 (exit $ac_status); }; }; then
6885 eval "$as_ac_Lib=yes"
6887 echo "$as_me: failed program was:" >&5
6888 cat conftest.$ac_ext >&5
6889 eval "$as_ac_Lib=no"
6891 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6892 LIBS=$ac_check_lib_save_LIBS
6894 echo "$as_me:6894: result: `eval echo '${'$as_ac_Lib'}'`" >&5
6895 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
6896 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
6898 : ${cf_nculib_root:=$cf_term_lib}
6909 # Check for library containing initscr
6910 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
6911 if test "x$cf_curs_lib" = x
6913 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
6915 LIBS="-l$cf_curs_lib $cf_save_LIBS"
6916 if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
6917 echo "$as_me:6917: checking if we can link with $cf_curs_lib library" >&5
6918 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
6919 cat >conftest.$ac_ext <<_ACEOF
6920 #line 6920 "configure"
6921 #include "confdefs.h"
6922 #include <${cf_cv_ncurses_header:-curses.h}>
6931 rm -f conftest.$ac_objext conftest$ac_exeext
6932 if { (eval echo "$as_me:6932: \"$ac_link\"") >&5
6933 (eval $ac_link) 2>&5
6935 echo "$as_me:6935: \$? = $ac_status" >&5
6936 (exit $ac_status); } &&
6937 { ac_try='test -s conftest$ac_exeext'
6938 { (eval echo "$as_me:6938: \"$ac_try\"") >&5
6941 echo "$as_me:6941: \$? = $ac_status" >&5
6942 (exit $ac_status); }; }; then
6945 echo "$as_me: failed program was:" >&5
6946 cat conftest.$ac_ext >&5
6949 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6950 echo "$as_me:6950: result: $cf_result" >&5
6951 echo "${ECHO_T}$cf_result" >&6
6952 test $cf_result = yes && break
6953 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
6955 elif test "$cf_term_lib" != predefined ; then
6956 echo "$as_me:6956: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
6957 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
6958 cat >conftest.$ac_ext <<_ACEOF
6959 #line 6959 "configure"
6960 #include "confdefs.h"
6961 #include <${cf_cv_ncurses_header:-curses.h}>
6965 initscr(); tgoto((char *)0, 0, 0);
6970 rm -f conftest.$ac_objext conftest$ac_exeext
6971 if { (eval echo "$as_me:6971: \"$ac_link\"") >&5
6972 (eval $ac_link) 2>&5
6974 echo "$as_me:6974: \$? = $ac_status" >&5
6975 (exit $ac_status); } &&
6976 { ac_try='test -s conftest$ac_exeext'
6977 { (eval echo "$as_me:6977: \"$ac_try\"") >&5
6980 echo "$as_me:6980: \$? = $ac_status" >&5
6981 (exit $ac_status); }; }; then
6984 echo "$as_me: failed program was:" >&5
6985 cat conftest.$ac_ext >&5
6987 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
6988 cat >conftest.$ac_ext <<_ACEOF
6989 #line 6989 "configure"
6990 #include "confdefs.h"
6991 #include <${cf_cv_ncurses_header:-curses.h}>
7000 rm -f conftest.$ac_objext conftest$ac_exeext
7001 if { (eval echo "$as_me:7001: \"$ac_link\"") >&5
7002 (eval $ac_link) 2>&5
7004 echo "$as_me:7004: \$? = $ac_status" >&5
7005 (exit $ac_status); } &&
7006 { ac_try='test -s conftest$ac_exeext'
7007 { (eval echo "$as_me:7007: \"$ac_try\"") >&5
7010 echo "$as_me:7010: \$? = $ac_status" >&5
7011 (exit $ac_status); }; }; then
7014 echo "$as_me: failed program was:" >&5
7015 cat conftest.$ac_ext >&5
7018 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7021 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7022 echo "$as_me:7022: result: $cf_result" >&5
7023 echo "${ECHO_T}$cf_result" >&6
7024 test $cf_result != error && break
7028 test $cf_curs_lib = unknown && { { echo "$as_me:7028: error: no curses library found" >&5
7029 echo "$as_me: error: no curses library found" >&2;}
7030 { (exit 1); exit 1; }; }
7037 echo "$as_me:7037: checking for multibyte character support" >&5
7038 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7039 if test "${cf_cv_utf8_lib+set}" = set; then
7040 echo $ECHO_N "(cached) $ECHO_C" >&6
7043 cf_save_LIBS="$LIBS"
7044 cat >conftest.$ac_ext <<_ACEOF
7045 #line 7045 "configure"
7046 #include "confdefs.h"
7057 rm -f conftest.$ac_objext conftest$ac_exeext
7058 if { (eval echo "$as_me:7058: \"$ac_link\"") >&5
7059 (eval $ac_link) 2>&5
7061 echo "$as_me:7061: \$? = $ac_status" >&5
7062 (exit $ac_status); } &&
7063 { ac_try='test -s conftest$ac_exeext'
7064 { (eval echo "$as_me:7064: \"$ac_try\"") >&5
7067 echo "$as_me:7067: \$? = $ac_status" >&5
7068 (exit $ac_status); }; }; then
7071 echo "$as_me: failed program was:" >&5
7072 cat conftest.$ac_ext >&5
7074 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7075 # will be set on completion of the AC_TRY_LINK below.
7076 cf_cv_header_path_utf8=
7077 cf_cv_library_path_utf8=
7079 echo "${as_me:-configure}:7079: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7081 cf_save_LIBS="$LIBS"
7083 cat >conftest.$ac_ext <<_ACEOF
7084 #line 7084 "configure"
7085 #include "confdefs.h"
7087 #include <libutf8.h>
7096 rm -f conftest.$ac_objext conftest$ac_exeext
7097 if { (eval echo "$as_me:7097: \"$ac_link\"") >&5
7098 (eval $ac_link) 2>&5
7100 echo "$as_me:7100: \$? = $ac_status" >&5
7101 (exit $ac_status); } &&
7102 { ac_try='test -s conftest$ac_exeext'
7103 { (eval echo "$as_me:7103: \"$ac_try\"") >&5
7106 echo "$as_me:7106: \$? = $ac_status" >&5
7107 (exit $ac_status); }; }; then
7109 cf_cv_find_linkage_utf8=yes
7110 cf_cv_header_path_utf8=/usr/include
7111 cf_cv_library_path_utf8=/usr/lib
7114 echo "$as_me: failed program was:" >&5
7115 cat conftest.$ac_ext >&5
7117 LIBS="-lutf8 $cf_save_LIBS"
7119 cat >conftest.$ac_ext <<_ACEOF
7120 #line 7120 "configure"
7121 #include "confdefs.h"
7123 #include <libutf8.h>
7132 rm -f conftest.$ac_objext conftest$ac_exeext
7133 if { (eval echo "$as_me:7133: \"$ac_link\"") >&5
7134 (eval $ac_link) 2>&5
7136 echo "$as_me:7136: \$? = $ac_status" >&5
7137 (exit $ac_status); } &&
7138 { ac_try='test -s conftest$ac_exeext'
7139 { (eval echo "$as_me:7139: \"$ac_try\"") >&5
7142 echo "$as_me:7142: \$? = $ac_status" >&5
7143 (exit $ac_status); }; }; then
7145 cf_cv_find_linkage_utf8=yes
7146 cf_cv_header_path_utf8=/usr/include
7147 cf_cv_library_path_utf8=/usr/lib
7148 cf_cv_library_file_utf8="-lutf8"
7151 echo "$as_me: failed program was:" >&5
7152 cat conftest.$ac_ext >&5
7154 cf_cv_find_linkage_utf8=no
7155 LIBS="$cf_save_LIBS"
7157 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
7159 echo "${as_me:-configure}:7159: testing find linkage for utf8 library ..." 1>&5
7161 echo "${as_me:-configure}:7161: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7163 cf_save_CPPFLAGS="$CPPFLAGS"
7164 cf_test_CPPFLAGS="$CPPFLAGS"
7168 # collect the current set of include-directories from compiler flags
7169 cf_header_path_list=""
7170 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7171 for cf_header_path in $CPPFLAGS $CFLAGS
7173 case $cf_header_path in
7175 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7177 test "x$cf_header_path" != "xNONE" && \
7178 test -d "$cf_header_path" && \
7180 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7181 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7182 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
7183 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
7184 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
7185 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7188 cf_header_path_list="$cf_header_path_list $cf_search"
7194 # add the variations for the package we are looking for
7198 test "x$prefix" != "xNONE" && \
7199 test -d "$prefix" && \
7201 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7202 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7203 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
7204 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
7205 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
7206 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
7209 for cf_subdir_prefix in \
7218 test "x$cf_subdir_prefix" != "x$prefix" && \
7219 test -d "$cf_subdir_prefix" && \
7220 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7221 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7222 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
7223 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
7224 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
7225 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
7226 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
7231 test "$includedir" != NONE && \
7232 test "$includedir" != "/usr/include" && \
7233 test -d "$includedir" && {
7234 test -d $includedir && cf_search="$cf_search $includedir"
7235 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7238 test "$oldincludedir" != NONE && \
7239 test "$oldincludedir" != "/usr/include" && \
7240 test -d "$oldincludedir" && {
7241 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7242 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7245 cf_search="$cf_search $cf_header_path_list"
7247 for cf_cv_header_path_utf8 in $cf_search
7249 if test -d $cf_cv_header_path_utf8 ; then
7250 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
7252 echo "${as_me:-configure}:7252: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7254 CPPFLAGS="$cf_save_CPPFLAGS"
7256 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7257 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
7259 cat >conftest.$ac_ext <<_ACEOF
7260 #line 7260 "configure"
7261 #include "confdefs.h"
7263 #include <libutf8.h>
7272 rm -f conftest.$ac_objext
7273 if { (eval echo "$as_me:7273: \"$ac_compile\"") >&5
7274 (eval $ac_compile) 2>&5
7276 echo "$as_me:7276: \$? = $ac_status" >&5
7277 (exit $ac_status); } &&
7278 { ac_try='test -s conftest.$ac_objext'
7279 { (eval echo "$as_me:7279: \"$ac_try\"") >&5
7282 echo "$as_me:7282: \$? = $ac_status" >&5
7283 (exit $ac_status); }; }; then
7285 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7287 echo "${as_me:-configure}:7287: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7289 cf_cv_find_linkage_utf8=maybe
7290 cf_test_CPPFLAGS="$CPPFLAGS"
7293 echo "$as_me: failed program was:" >&5
7294 cat conftest.$ac_ext >&5
7296 CPPFLAGS="$cf_save_CPPFLAGS"
7299 rm -f conftest.$ac_objext conftest.$ac_ext
7303 if test "$cf_cv_find_linkage_utf8" = maybe ; then
7305 echo "${as_me:-configure}:7305: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7307 cf_save_LIBS="$LIBS"
7308 cf_save_LDFLAGS="$LDFLAGS"
7310 if test "$cf_cv_find_linkage_utf8" != yes ; then
7313 cf_library_path_list=""
7314 if test -n "${LDFLAGS}${LIBS}" ; then
7315 for cf_library_path in $LDFLAGS $LIBS
7317 case $cf_library_path in
7319 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7321 test "x$cf_library_path" != "xNONE" && \
7322 test -d "$cf_library_path" && \
7324 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7325 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7326 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
7327 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7328 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
7329 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7332 cf_library_path_list="$cf_library_path_list $cf_search"
7340 test "x$prefix" != "xNONE" && \
7341 test -d "$prefix" && \
7343 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7344 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7345 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
7346 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
7347 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
7348 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
7351 for cf_subdir_prefix in \
7360 test "x$cf_subdir_prefix" != "x$prefix" && \
7361 test -d "$cf_subdir_prefix" && \
7362 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7363 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7364 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
7365 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
7366 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
7367 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
7368 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
7373 cf_search="$cf_library_path_list $cf_search"
7375 for cf_cv_library_path_utf8 in $cf_search
7377 if test -d $cf_cv_library_path_utf8 ; then
7378 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7380 echo "${as_me:-configure}:7380: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7382 CPPFLAGS="$cf_test_CPPFLAGS"
7383 LIBS="-lutf8 $cf_save_LIBS"
7384 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7385 cat >conftest.$ac_ext <<_ACEOF
7386 #line 7386 "configure"
7387 #include "confdefs.h"
7389 #include <libutf8.h>
7398 rm -f conftest.$ac_objext conftest$ac_exeext
7399 if { (eval echo "$as_me:7399: \"$ac_link\"") >&5
7400 (eval $ac_link) 2>&5
7402 echo "$as_me:7402: \$? = $ac_status" >&5
7403 (exit $ac_status); } &&
7404 { ac_try='test -s conftest$ac_exeext'
7405 { (eval echo "$as_me:7405: \"$ac_try\"") >&5
7408 echo "$as_me:7408: \$? = $ac_status" >&5
7409 (exit $ac_status); }; }; then
7411 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7413 echo "${as_me:-configure}:7413: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7415 cf_cv_find_linkage_utf8=yes
7416 cf_cv_library_file_utf8="-lutf8"
7419 echo "$as_me: failed program was:" >&5
7420 cat conftest.$ac_ext >&5
7422 CPPFLAGS="$cf_save_CPPFLAGS"
7423 LIBS="$cf_save_LIBS"
7424 LDFLAGS="$cf_save_LDFLAGS"
7427 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7430 CPPFLAGS="$cf_save_CPPFLAGS"
7431 LDFLAGS="$cf_save_LDFLAGS"
7435 cf_cv_find_linkage_utf8=no
7439 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7442 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7444 LIBS="$cf_save_LIBS"
7446 if test "$cf_cv_find_linkage_utf8" = yes ; then
7447 cf_cv_utf8_lib=add-on
7453 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7455 echo "$as_me:7455: result: $cf_cv_utf8_lib" >&5
7456 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7458 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7460 if test "$cf_cv_utf8_lib" = "add-on" ; then
7462 cat >>confdefs.h <<\EOF
7463 #define HAVE_LIBUTF8_H 1
7466 if test -n "$cf_cv_header_path_utf8" ; then
7467 for cf_add_incdir in $cf_cv_header_path_utf8
7469 while test $cf_add_incdir != /usr/include
7471 if test -d $cf_add_incdir
7474 if test -n "$CFLAGS$CPPFLAGS" ; then
7475 # a loop is needed to ensure we can add subdirs of existing dirs
7476 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7477 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7478 cf_have_incdir=yes; break
7483 if test "$cf_have_incdir" = no ; then
7484 if test "$cf_add_incdir" = /usr/local/include ; then
7485 if test "$GCC" = yes
7487 cf_save_CPPFLAGS=$CPPFLAGS
7489 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7490 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7492 cat >conftest.$ac_ext <<_ACEOF
7493 #line 7493 "configure"
7494 #include "confdefs.h"
7504 rm -f conftest.$ac_objext
7505 if { (eval echo "$as_me:7505: \"$ac_compile\"") >&5
7506 (eval $ac_compile) 2>&5
7508 echo "$as_me:7508: \$? = $ac_status" >&5
7509 (exit $ac_status); } &&
7510 { ac_try='test -s conftest.$ac_objext'
7511 { (eval echo "$as_me:7511: \"$ac_try\"") >&5
7514 echo "$as_me:7514: \$? = $ac_status" >&5
7515 (exit $ac_status); }; }; then
7518 echo "$as_me: failed program was:" >&5
7519 cat conftest.$ac_ext >&5
7522 rm -f conftest.$ac_objext conftest.$ac_ext
7523 CPPFLAGS=$cf_save_CPPFLAGS
7528 if test "$cf_have_incdir" = no ; then
7529 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7531 echo "${as_me:-configure}:7531: testing adding $cf_add_incdir to include-path ..." 1>&5
7533 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7535 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7536 test "$cf_top_incdir" = "$cf_add_incdir" && break
7537 cf_add_incdir="$cf_top_incdir"
7548 if test -n "$cf_cv_library_path_utf8" ; then
7549 for cf_add_libdir in $cf_cv_library_path_utf8
7551 if test $cf_add_libdir = /usr/lib ; then
7553 elif test -d $cf_add_libdir
7556 if test -n "$LDFLAGS$LIBS" ; then
7557 # a loop is needed to ensure we can add subdirs of existing dirs
7558 for cf_test_libdir in $LDFLAGS $LIBS ; do
7559 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7560 cf_have_libdir=yes; break
7564 if test "$cf_have_libdir" = no ; then
7565 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7567 echo "${as_me:-configure}:7567: testing adding $cf_add_libdir to library-path ..." 1>&5
7569 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7578 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7580 for cf_add_1lib in $cf_add_0lib; do
7581 for cf_add_2lib in $cf_add_libs; do
7582 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7587 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7593 cf_ncuconfig_root=$cf_cv_screen
7594 cf_have_ncuconfig=no
7596 if test "x${PKG_CONFIG:=none}" != xnone; then
7597 echo "$as_me:7597: checking pkg-config for $cf_ncuconfig_root" >&5
7598 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7599 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7600 echo "$as_me:7600: result: yes" >&5
7601 echo "${ECHO_T}yes" >&6
7603 echo "$as_me:7603: checking if the $cf_ncuconfig_root package files work" >&5
7604 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7605 cf_have_ncuconfig=unknown
7607 cf_save_CFLAGS="$CFLAGS"
7608 cf_save_CPPFLAGS="$CPPFLAGS"
7609 cf_save_LIBS="$LIBS"
7611 cf_pkg_cflags=`$PKG_CONFIG --cflags $cf_ncuconfig_root`
7612 cf_pkg_libs=`$PKG_CONFIG --libs $cf_ncuconfig_root`
7614 # while -W for passing linker flags is prevalent, it is not "standard".
7615 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7616 # incompatible _and_ non-standard -W option which gives an error. Work
7617 # around that pitfall.
7618 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7624 cf_new_extra_cppflags=
7626 for cf_add_cflags in $cf_pkg_cflags
7628 case $cf_fix_cppflags in
7630 case $cf_add_cflags in
7631 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7632 case $cf_add_cflags in
7634 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7636 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7637 && test -z "${cf_tst_cflags}" \
7638 && cf_fix_cppflags=yes
7640 if test $cf_fix_cppflags = yes ; then
7642 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7643 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7646 elif test "${cf_tst_cflags}" = "\"'" ; then
7648 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7649 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7659 case $cf_add_cflags in
7661 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7663 CPPFLAGS=`echo "$CPPFLAGS" | \
7664 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7665 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7670 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7671 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7678 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7679 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7686 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7687 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7689 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7691 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7692 && test -z "${cf_tst_cflags}" \
7693 && cf_fix_cppflags=no
7698 if test -n "$cf_new_cflags" ; then
7700 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7701 CFLAGS="${CFLAGS}$cf_new_cflags"
7705 if test -n "$cf_new_cppflags" ; then
7707 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7708 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7712 if test -n "$cf_new_extra_cppflags" ; then
7714 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7715 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7722 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7724 for cf_add_1lib in $cf_add_0lib; do
7725 for cf_add_2lib in $cf_add_libs; do
7726 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7731 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7735 cat >conftest.$ac_ext <<_ACEOF
7736 #line 7736 "configure"
7737 #include "confdefs.h"
7738 #include <${cf_cv_ncurses_header:-curses.h}>
7742 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7747 rm -f conftest.$ac_objext conftest$ac_exeext
7748 if { (eval echo "$as_me:7748: \"$ac_link\"") >&5
7749 (eval $ac_link) 2>&5
7751 echo "$as_me:7751: \$? = $ac_status" >&5
7752 (exit $ac_status); } &&
7753 { ac_try='test -s conftest$ac_exeext'
7754 { (eval echo "$as_me:7754: \"$ac_try\"") >&5
7757 echo "$as_me:7757: \$? = $ac_status" >&5
7758 (exit $ac_status); }; }; then
7759 if test "$cross_compiling" = yes; then
7760 cf_test_ncuconfig=maybe
7762 cat >conftest.$ac_ext <<_ACEOF
7763 #line 7763 "configure"
7764 #include "confdefs.h"
7765 #include <${cf_cv_ncurses_header:-curses.h}>
7767 { char *xx = curses_version(); return (xx == 0); }
7769 rm -f conftest$ac_exeext
7770 if { (eval echo "$as_me:7770: \"$ac_link\"") >&5
7771 (eval $ac_link) 2>&5
7773 echo "$as_me:7773: \$? = $ac_status" >&5
7774 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7775 { (eval echo "$as_me:7775: \"$ac_try\"") >&5
7778 echo "$as_me:7778: \$? = $ac_status" >&5
7779 (exit $ac_status); }; }; then
7780 cf_test_ncuconfig=yes
7782 echo "$as_me: program exited with status $ac_status" >&5
7783 echo "$as_me: failed program was:" >&5
7784 cat conftest.$ac_ext >&5
7785 cf_test_ncuconfig=no
7787 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7790 echo "$as_me: failed program was:" >&5
7791 cat conftest.$ac_ext >&5
7792 cf_test_ncuconfig=no
7794 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7796 CFLAGS="$cf_save_CFLAGS"
7797 CPPFLAGS="$cf_save_CPPFLAGS"
7798 LIBS="$cf_save_LIBS"
7800 if test "x$cf_test_ncuconfig" != xyes; then
7801 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7802 cf_pkg_cflags="$cf_temp"
7803 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7804 cf_pkg_libs="$cf_temp"
7812 cf_new_extra_cppflags=
7814 for cf_add_cflags in $cf_pkg_cflags
7816 case $cf_fix_cppflags in
7818 case $cf_add_cflags in
7819 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7820 case $cf_add_cflags in
7822 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7824 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7825 && test -z "${cf_tst_cflags}" \
7826 && cf_fix_cppflags=yes
7828 if test $cf_fix_cppflags = yes ; then
7830 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7831 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7834 elif test "${cf_tst_cflags}" = "\"'" ; then
7836 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7837 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7847 case $cf_add_cflags in
7849 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7851 CPPFLAGS=`echo "$CPPFLAGS" | \
7852 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7853 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7858 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7859 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7866 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7867 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7874 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7875 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7877 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7879 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7880 && test -z "${cf_tst_cflags}" \
7881 && cf_fix_cppflags=no
7886 if test -n "$cf_new_cflags" ; then
7888 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7889 CFLAGS="${CFLAGS}$cf_new_cflags"
7893 if test -n "$cf_new_cppflags" ; then
7895 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7896 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7900 if test -n "$cf_new_extra_cppflags" ; then
7902 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7903 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7910 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7912 for cf_add_1lib in $cf_add_0lib; do
7913 for cf_add_2lib in $cf_add_libs; do
7914 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7919 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7923 cat >conftest.$ac_ext <<_ACEOF
7924 #line 7924 "configure"
7925 #include "confdefs.h"
7926 #include <${cf_cv_ncurses_header:-curses.h}>
7930 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7935 rm -f conftest.$ac_objext conftest$ac_exeext
7936 if { (eval echo "$as_me:7936: \"$ac_link\"") >&5
7937 (eval $ac_link) 2>&5
7939 echo "$as_me:7939: \$? = $ac_status" >&5
7940 (exit $ac_status); } &&
7941 { ac_try='test -s conftest$ac_exeext'
7942 { (eval echo "$as_me:7942: \"$ac_try\"") >&5
7945 echo "$as_me:7945: \$? = $ac_status" >&5
7946 (exit $ac_status); }; }; then
7947 if test "$cross_compiling" = yes; then
7948 cf_have_ncuconfig=maybe
7950 cat >conftest.$ac_ext <<_ACEOF
7951 #line 7951 "configure"
7952 #include "confdefs.h"
7953 #include <${cf_cv_ncurses_header:-curses.h}>
7955 { char *xx = curses_version(); return (xx == 0); }
7957 rm -f conftest$ac_exeext
7958 if { (eval echo "$as_me:7958: \"$ac_link\"") >&5
7959 (eval $ac_link) 2>&5
7961 echo "$as_me:7961: \$? = $ac_status" >&5
7962 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7963 { (eval echo "$as_me:7963: \"$ac_try\"") >&5
7966 echo "$as_me:7966: \$? = $ac_status" >&5
7967 (exit $ac_status); }; }; then
7968 cf_have_ncuconfig=yes
7970 echo "$as_me: program exited with status $ac_status" >&5
7971 echo "$as_me: failed program was:" >&5
7972 cat conftest.$ac_ext >&5
7973 cf_have_ncuconfig=no
7975 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7978 echo "$as_me: failed program was:" >&5
7979 cat conftest.$ac_ext >&5
7980 cf_have_ncuconfig=no
7982 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7983 echo "$as_me:7983: result: $cf_have_ncuconfig" >&5
7984 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7985 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7986 if test "$cf_have_ncuconfig" != "yes"
7988 CPPFLAGS="$cf_save_CPPFLAGS"
7989 LIBS="$cf_save_LIBS"
7990 NCURSES_CONFIG_PKG=none
7993 cat >>confdefs.h <<\EOF
7997 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7999 echo "$as_me:7999: checking for terminfo header" >&5
8000 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8001 if test "${cf_cv_term_header+set}" = set; then
8002 echo $ECHO_N "(cached) $ECHO_C" >&6
8005 case ${cf_cv_ncurses_header} in
8006 (*/ncurses.h|*/ncursesw.h)
8007 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8010 cf_term_header=term.h
8014 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8016 cat >conftest.$ac_ext <<_ACEOF
8017 #line 8017 "configure"
8018 #include "confdefs.h"
8020 #include <${cf_cv_ncurses_header:-curses.h}>
8026 int x = auto_left_margin; (void)x
8031 rm -f conftest.$ac_objext
8032 if { (eval echo "$as_me:8032: \"$ac_compile\"") >&5
8033 (eval $ac_compile) 2>&5
8035 echo "$as_me:8035: \$? = $ac_status" >&5
8036 (exit $ac_status); } &&
8037 { ac_try='test -s conftest.$ac_objext'
8038 { (eval echo "$as_me:8038: \"$ac_try\"") >&5
8041 echo "$as_me:8041: \$? = $ac_status" >&5
8042 (exit $ac_status); }; }; then
8044 cf_cv_term_header="$cf_test"
8046 echo "$as_me: failed program was:" >&5
8047 cat conftest.$ac_ext >&5
8049 cf_cv_term_header=unknown
8052 rm -f conftest.$ac_objext conftest.$ac_ext
8053 test "$cf_cv_term_header" != unknown && break
8057 echo "$as_me:8057: result: $cf_cv_term_header" >&5
8058 echo "${ECHO_T}$cf_cv_term_header" >&6
8060 # Set definitions to allow ifdef'ing to accommodate subdirectories
8062 case $cf_cv_term_header in
8065 cat >>confdefs.h <<\EOF
8066 #define HAVE_TERM_H 1
8072 case $cf_cv_term_header in
8075 cat >>confdefs.h <<\EOF
8076 #define HAVE_NCURSES_TERM_H 1
8082 cat >>confdefs.h <<\EOF
8083 #define HAVE_NCURSESW_TERM_H 1
8092 echo "$as_me:8092: result: no" >&5
8093 echo "${ECHO_T}no" >&6
8094 NCURSES_CONFIG_PKG=none
8097 NCURSES_CONFIG_PKG=none
8100 if test "x$cf_have_ncuconfig" = "xno"; then
8101 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
8103 if test -n "$ac_tool_prefix"; then
8104 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8106 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8107 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8108 echo "$as_me:8108: checking for $ac_word" >&5
8109 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8110 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8111 echo $ECHO_N "(cached) $ECHO_C" >&6
8113 if test -n "$NCURSES_CONFIG"; then
8114 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8116 ac_save_IFS=$IFS; IFS=$ac_path_separator
8118 for ac_dir in $ac_dummy; do
8120 test -z "$ac_dir" && ac_dir=.
8121 $as_executable_p "$ac_dir/$ac_word" || continue
8122 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8123 echo "$as_me:8123: found $ac_dir/$ac_word" >&5
8129 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8130 if test -n "$NCURSES_CONFIG"; then
8131 echo "$as_me:8131: result: $NCURSES_CONFIG" >&5
8132 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8134 echo "$as_me:8134: result: no" >&5
8135 echo "${ECHO_T}no" >&6
8138 test -n "$NCURSES_CONFIG" && break
8141 if test -z "$NCURSES_CONFIG"; then
8142 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8143 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8145 # Extract the first word of "$ac_prog", so it can be a program name with args.
8146 set dummy $ac_prog; ac_word=$2
8147 echo "$as_me:8147: checking for $ac_word" >&5
8148 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8149 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8150 echo $ECHO_N "(cached) $ECHO_C" >&6
8152 if test -n "$ac_ct_NCURSES_CONFIG"; then
8153 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8155 ac_save_IFS=$IFS; IFS=$ac_path_separator
8157 for ac_dir in $ac_dummy; do
8159 test -z "$ac_dir" && ac_dir=.
8160 $as_executable_p "$ac_dir/$ac_word" || continue
8161 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8162 echo "$as_me:8162: found $ac_dir/$ac_word" >&5
8168 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8169 if test -n "$ac_ct_NCURSES_CONFIG"; then
8170 echo "$as_me:8170: result: $ac_ct_NCURSES_CONFIG" >&5
8171 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8173 echo "$as_me:8173: result: no" >&5
8174 echo "${ECHO_T}no" >&6
8177 test -n "$ac_ct_NCURSES_CONFIG" && break
8179 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8181 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8184 if test "$NCURSES_CONFIG" != none ; then
8189 cf_new_extra_cppflags=
8191 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
8193 case $cf_fix_cppflags in
8195 case $cf_add_cflags in
8196 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8197 case $cf_add_cflags in
8199 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8201 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8202 && test -z "${cf_tst_cflags}" \
8203 && cf_fix_cppflags=yes
8205 if test $cf_fix_cppflags = yes ; then
8207 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8208 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8211 elif test "${cf_tst_cflags}" = "\"'" ; then
8213 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8214 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8224 case $cf_add_cflags in
8226 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8228 CPPFLAGS=`echo "$CPPFLAGS" | \
8229 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8230 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8235 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8236 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8243 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8244 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8251 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8252 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8254 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8256 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8257 && test -z "${cf_tst_cflags}" \
8258 && cf_fix_cppflags=no
8263 if test -n "$cf_new_cflags" ; then
8265 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8266 CFLAGS="${CFLAGS}$cf_new_cflags"
8270 if test -n "$cf_new_cppflags" ; then
8272 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8273 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8277 if test -n "$cf_new_extra_cppflags" ; then
8279 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8280 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8287 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8289 for cf_add_1lib in $cf_add_0lib; do
8290 for cf_add_2lib in $cf_add_libs; do
8291 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8296 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8300 # even with config script, some packages use no-override for curses.h
8302 echo "$as_me:8302: checking if we have identified curses headers" >&5
8303 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8304 if test "${cf_cv_ncurses_header+set}" = set; then
8305 echo $ECHO_N "(cached) $ECHO_C" >&6
8308 cf_cv_ncurses_header=none
8310 ncurses.h $cf_cv_screen/ncurses.h \
8311 curses.h $cf_cv_screen/curses.h
8313 cat >conftest.$ac_ext <<_ACEOF
8314 #line 8314 "configure"
8315 #include "confdefs.h"
8316 #include <${cf_header}>
8320 initscr(); tgoto("?", 0,0)
8325 rm -f conftest.$ac_objext
8326 if { (eval echo "$as_me:8326: \"$ac_compile\"") >&5
8327 (eval $ac_compile) 2>&5
8329 echo "$as_me:8329: \$? = $ac_status" >&5
8330 (exit $ac_status); } &&
8331 { ac_try='test -s conftest.$ac_objext'
8332 { (eval echo "$as_me:8332: \"$ac_try\"") >&5
8335 echo "$as_me:8335: \$? = $ac_status" >&5
8336 (exit $ac_status); }; }; then
8337 cf_cv_ncurses_header=$cf_header; break
8339 echo "$as_me: failed program was:" >&5
8340 cat conftest.$ac_ext >&5
8342 rm -f conftest.$ac_objext conftest.$ac_ext
8346 echo "$as_me:8346: result: $cf_cv_ncurses_header" >&5
8347 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8349 if test "$cf_cv_ncurses_header" = none ; then
8350 { { echo "$as_me:8350: error: No curses header-files found" >&5
8351 echo "$as_me: error: No curses header-files found" >&2;}
8352 { (exit 1); exit 1; }; }
8355 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8357 for ac_header in $cf_cv_ncurses_header
8359 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8360 echo "$as_me:8360: checking for $ac_header" >&5
8361 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8362 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8363 echo $ECHO_N "(cached) $ECHO_C" >&6
8365 cat >conftest.$ac_ext <<_ACEOF
8366 #line 8366 "configure"
8367 #include "confdefs.h"
8368 #include <$ac_header>
8370 if { (eval echo "$as_me:8370: \"$ac_cpp conftest.$ac_ext\"") >&5
8371 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8373 egrep -v '^ *\+' conftest.er1 >conftest.err
8375 cat conftest.err >&5
8376 echo "$as_me:8376: \$? = $ac_status" >&5
8377 (exit $ac_status); } >/dev/null; then
8378 if test -s conftest.err; then
8379 ac_cpp_err=$ac_c_preproc_warn_flag
8386 if test -z "$ac_cpp_err"; then
8387 eval "$as_ac_Header=yes"
8389 echo "$as_me: failed program was:" >&5
8390 cat conftest.$ac_ext >&5
8391 eval "$as_ac_Header=no"
8393 rm -f conftest.err conftest.$ac_ext
8395 echo "$as_me:8395: result: `eval echo '${'$as_ac_Header'}'`" >&5
8396 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8397 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8398 cat >>confdefs.h <<EOF
8399 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8405 cat >>confdefs.h <<\EOF
8409 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8411 cat >>confdefs.h <<EOF
8412 #define $cf_nculib_ROOT 1
8415 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8419 cf_ncuhdr_root=$cf_cv_screen
8421 test -n "$cf_cv_curses_dir" && \
8422 test "$cf_cv_curses_dir" != "no" && { \
8424 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8425 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8427 while test $cf_add_incdir != /usr/include
8429 if test -d $cf_add_incdir
8432 if test -n "$CFLAGS$CPPFLAGS" ; then
8433 # a loop is needed to ensure we can add subdirs of existing dirs
8434 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8435 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8436 cf_have_incdir=yes; break
8441 if test "$cf_have_incdir" = no ; then
8442 if test "$cf_add_incdir" = /usr/local/include ; then
8443 if test "$GCC" = yes
8445 cf_save_CPPFLAGS=$CPPFLAGS
8447 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8448 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8450 cat >conftest.$ac_ext <<_ACEOF
8451 #line 8451 "configure"
8452 #include "confdefs.h"
8462 rm -f conftest.$ac_objext
8463 if { (eval echo "$as_me:8463: \"$ac_compile\"") >&5
8464 (eval $ac_compile) 2>&5
8466 echo "$as_me:8466: \$? = $ac_status" >&5
8467 (exit $ac_status); } &&
8468 { ac_try='test -s conftest.$ac_objext'
8469 { (eval echo "$as_me:8469: \"$ac_try\"") >&5
8472 echo "$as_me:8472: \$? = $ac_status" >&5
8473 (exit $ac_status); }; }; then
8476 echo "$as_me: failed program was:" >&5
8477 cat conftest.$ac_ext >&5
8480 rm -f conftest.$ac_objext conftest.$ac_ext
8481 CPPFLAGS=$cf_save_CPPFLAGS
8486 if test "$cf_have_incdir" = no ; then
8487 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8489 echo "${as_me:-configure}:8489: testing adding $cf_add_incdir to include-path ..." 1>&5
8491 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8493 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8494 test "$cf_top_incdir" = "$cf_add_incdir" && break
8495 cf_add_incdir="$cf_top_incdir"
8508 echo "$as_me:8508: checking for $cf_ncuhdr_root header in include-path" >&5
8509 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8510 if test "${cf_cv_ncurses_h+set}" = set; then
8511 echo $ECHO_N "(cached) $ECHO_C" >&6
8514 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8515 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8516 for cf_header in $cf_header_list
8519 cat >conftest.$ac_ext <<_ACEOF
8520 #line 8520 "configure"
8521 #include "confdefs.h"
8523 #include <$cf_header>
8528 #ifdef NCURSES_VERSION
8530 printf("%s\n", NCURSES_VERSION);
8543 rm -f conftest.$ac_objext
8544 if { (eval echo "$as_me:8544: \"$ac_compile\"") >&5
8545 (eval $ac_compile) 2>&5
8547 echo "$as_me:8547: \$? = $ac_status" >&5
8548 (exit $ac_status); } &&
8549 { ac_try='test -s conftest.$ac_objext'
8550 { (eval echo "$as_me:8550: \"$ac_try\"") >&5
8553 echo "$as_me:8553: \$? = $ac_status" >&5
8554 (exit $ac_status); }; }; then
8555 cf_cv_ncurses_h=$cf_header
8558 echo "$as_me: failed program was:" >&5
8559 cat conftest.$ac_ext >&5
8562 rm -f conftest.$ac_objext conftest.$ac_ext
8564 test "$cf_cv_ncurses_h" != no && break
8568 echo "$as_me:8568: result: $cf_cv_ncurses_h" >&5
8569 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8571 if test "$cf_cv_ncurses_h" != no ; then
8572 cf_cv_ncurses_header=$cf_cv_ncurses_h
8575 echo "$as_me:8575: checking for $cf_ncuhdr_root include-path" >&5
8576 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8577 if test "${cf_cv_ncurses_h2+set}" = set; then
8578 echo $ECHO_N "(cached) $ECHO_C" >&6
8581 test -n "$verbose" && echo
8585 # collect the current set of include-directories from compiler flags
8586 cf_header_path_list=""
8587 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8588 for cf_header_path in $CPPFLAGS $CFLAGS
8590 case $cf_header_path in
8592 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8594 test "x$cf_header_path" != "xNONE" && \
8595 test -d "$cf_header_path" && \
8597 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8598 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
8599 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8600 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8601 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8602 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"
8605 cf_header_path_list="$cf_header_path_list $cf_search"
8611 # add the variations for the package we are looking for
8615 test "x$prefix" != "xNONE" && \
8616 test -d "$prefix" && \
8618 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8619 test -d $prefix/include && cf_search="$cf_search $prefix/include"
8620 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8621 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8622 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8623 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8626 for cf_subdir_prefix in \
8635 test "x$cf_subdir_prefix" != "x$prefix" && \
8636 test -d "$cf_subdir_prefix" && \
8637 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8638 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8639 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
8640 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8641 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8642 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8643 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"
8648 test "$includedir" != NONE && \
8649 test "$includedir" != "/usr/include" && \
8650 test -d "$includedir" && {
8651 test -d $includedir && cf_search="$cf_search $includedir"
8652 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8655 test "$oldincludedir" != NONE && \
8656 test "$oldincludedir" != "/usr/include" && \
8657 test -d "$oldincludedir" && {
8658 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8659 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8662 cf_search="$cf_search $cf_header_path_list"
8664 test -n "$verbose" && echo search path $cf_search
8665 cf_save2_CPPFLAGS="$CPPFLAGS"
8666 for cf_incdir in $cf_search
8669 if test -n "$cf_incdir" ; then
8670 for cf_add_incdir in $cf_incdir
8672 while test $cf_add_incdir != /usr/include
8674 if test -d $cf_add_incdir
8677 if test -n "$CFLAGS$CPPFLAGS" ; then
8678 # a loop is needed to ensure we can add subdirs of existing dirs
8679 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8680 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8681 cf_have_incdir=yes; break
8686 if test "$cf_have_incdir" = no ; then
8687 if test "$cf_add_incdir" = /usr/local/include ; then
8688 if test "$GCC" = yes
8690 cf_save_CPPFLAGS=$CPPFLAGS
8692 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8693 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8695 cat >conftest.$ac_ext <<_ACEOF
8696 #line 8696 "configure"
8697 #include "confdefs.h"
8707 rm -f conftest.$ac_objext
8708 if { (eval echo "$as_me:8708: \"$ac_compile\"") >&5
8709 (eval $ac_compile) 2>&5
8711 echo "$as_me:8711: \$? = $ac_status" >&5
8712 (exit $ac_status); } &&
8713 { ac_try='test -s conftest.$ac_objext'
8714 { (eval echo "$as_me:8714: \"$ac_try\"") >&5
8717 echo "$as_me:8717: \$? = $ac_status" >&5
8718 (exit $ac_status); }; }; then
8721 echo "$as_me: failed program was:" >&5
8722 cat conftest.$ac_ext >&5
8725 rm -f conftest.$ac_objext conftest.$ac_ext
8726 CPPFLAGS=$cf_save_CPPFLAGS
8731 if test "$cf_have_incdir" = no ; then
8732 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8734 echo "${as_me:-configure}:8734: testing adding $cf_add_incdir to include-path ..." 1>&5
8736 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8738 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8739 test "$cf_top_incdir" = "$cf_add_incdir" && break
8740 cf_add_incdir="$cf_top_incdir"
8756 cat >conftest.$ac_ext <<_ACEOF
8757 #line 8757 "configure"
8758 #include "confdefs.h"
8760 #include <$cf_header>
8765 #ifdef NCURSES_VERSION
8767 printf("%s\n", NCURSES_VERSION);
8780 rm -f conftest.$ac_objext
8781 if { (eval echo "$as_me:8781: \"$ac_compile\"") >&5
8782 (eval $ac_compile) 2>&5
8784 echo "$as_me:8784: \$? = $ac_status" >&5
8785 (exit $ac_status); } &&
8786 { ac_try='test -s conftest.$ac_objext'
8787 { (eval echo "$as_me:8787: \"$ac_try\"") >&5
8790 echo "$as_me:8790: \$? = $ac_status" >&5
8791 (exit $ac_status); }; }; then
8792 cf_cv_ncurses_h2=$cf_header
8795 echo "$as_me: failed program was:" >&5
8796 cat conftest.$ac_ext >&5
8799 rm -f conftest.$ac_objext conftest.$ac_ext
8801 if test "$cf_cv_ncurses_h2" != no ; then
8802 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8803 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8806 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8808 CPPFLAGS="$cf_save2_CPPFLAGS"
8809 test "$cf_cv_ncurses_h2" != no && break
8811 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8811: error: not found" >&5
8812 echo "$as_me: error: not found" >&2;}
8813 { (exit 1); exit 1; }; }
8816 echo "$as_me:8816: result: $cf_cv_ncurses_h2" >&5
8817 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8819 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8820 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8821 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8822 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8825 if test -n "$cf_1st_incdir" ; then
8826 for cf_add_incdir in $cf_1st_incdir
8828 while test $cf_add_incdir != /usr/include
8830 if test -d $cf_add_incdir
8833 if test -n "$CFLAGS$CPPFLAGS" ; then
8834 # a loop is needed to ensure we can add subdirs of existing dirs
8835 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8836 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8837 cf_have_incdir=yes; break
8842 if test "$cf_have_incdir" = no ; then
8843 if test "$cf_add_incdir" = /usr/local/include ; then
8844 if test "$GCC" = yes
8846 cf_save_CPPFLAGS=$CPPFLAGS
8848 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8849 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8851 cat >conftest.$ac_ext <<_ACEOF
8852 #line 8852 "configure"
8853 #include "confdefs.h"
8863 rm -f conftest.$ac_objext
8864 if { (eval echo "$as_me:8864: \"$ac_compile\"") >&5
8865 (eval $ac_compile) 2>&5
8867 echo "$as_me:8867: \$? = $ac_status" >&5
8868 (exit $ac_status); } &&
8869 { ac_try='test -s conftest.$ac_objext'
8870 { (eval echo "$as_me:8870: \"$ac_try\"") >&5
8873 echo "$as_me:8873: \$? = $ac_status" >&5
8874 (exit $ac_status); }; }; then
8877 echo "$as_me: failed program was:" >&5
8878 cat conftest.$ac_ext >&5
8881 rm -f conftest.$ac_objext conftest.$ac_ext
8882 CPPFLAGS=$cf_save_CPPFLAGS
8887 if test "$cf_have_incdir" = no ; then
8888 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8890 echo "${as_me:-configure}:8890: testing adding $cf_add_incdir to include-path ..." 1>&5
8892 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8894 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8895 test "$cf_top_incdir" = "$cf_add_incdir" && break
8896 cf_add_incdir="$cf_top_incdir"
8909 # Set definitions to allow ifdef'ing for ncurses.h
8911 case $cf_cv_ncurses_header in
8914 cat >>confdefs.h <<\EOF
8915 #define HAVE_NCURSES_H 1
8921 case $cf_cv_ncurses_header in
8922 (ncurses/curses.h|ncurses/ncurses.h)
8924 cat >>confdefs.h <<\EOF
8925 #define HAVE_NCURSES_NCURSES_H 1
8929 (ncursesw/curses.h|ncursesw/ncurses.h)
8931 cat >>confdefs.h <<\EOF
8932 #define HAVE_NCURSESW_NCURSES_H 1
8938 echo "$as_me:8938: checking for terminfo header" >&5
8939 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8940 if test "${cf_cv_term_header+set}" = set; then
8941 echo $ECHO_N "(cached) $ECHO_C" >&6
8944 case ${cf_cv_ncurses_header} in
8945 (*/ncurses.h|*/ncursesw.h)
8946 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8949 cf_term_header=term.h
8953 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8955 cat >conftest.$ac_ext <<_ACEOF
8956 #line 8956 "configure"
8957 #include "confdefs.h"
8959 #include <${cf_cv_ncurses_header:-curses.h}>
8965 int x = auto_left_margin; (void)x
8970 rm -f conftest.$ac_objext
8971 if { (eval echo "$as_me:8971: \"$ac_compile\"") >&5
8972 (eval $ac_compile) 2>&5
8974 echo "$as_me:8974: \$? = $ac_status" >&5
8975 (exit $ac_status); } &&
8976 { ac_try='test -s conftest.$ac_objext'
8977 { (eval echo "$as_me:8977: \"$ac_try\"") >&5
8980 echo "$as_me:8980: \$? = $ac_status" >&5
8981 (exit $ac_status); }; }; then
8983 cf_cv_term_header="$cf_test"
8985 echo "$as_me: failed program was:" >&5
8986 cat conftest.$ac_ext >&5
8988 cf_cv_term_header=unknown
8991 rm -f conftest.$ac_objext conftest.$ac_ext
8992 test "$cf_cv_term_header" != unknown && break
8996 echo "$as_me:8996: result: $cf_cv_term_header" >&5
8997 echo "${ECHO_T}$cf_cv_term_header" >&6
8999 # Set definitions to allow ifdef'ing to accommodate subdirectories
9001 case $cf_cv_term_header in
9004 cat >>confdefs.h <<\EOF
9005 #define HAVE_TERM_H 1
9011 case $cf_cv_term_header in
9014 cat >>confdefs.h <<\EOF
9015 #define HAVE_NCURSES_TERM_H 1
9021 cat >>confdefs.h <<\EOF
9022 #define HAVE_NCURSESW_TERM_H 1
9028 # some applications need this, but should check for NCURSES_VERSION
9030 cat >>confdefs.h <<\EOF
9034 echo "$as_me:9034: checking for ncurses version" >&5
9035 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9036 if test "${cf_cv_ncurses_version+set}" = set; then
9037 echo $ECHO_N "(cached) $ECHO_C" >&6
9040 cf_cv_ncurses_version=no
9043 if test "$cross_compiling" = yes; then
9045 # This will not work if the preprocessor splits the line after the
9046 # Autoconf token. The 'unproto' program does that.
9047 cat > conftest.$ac_ext <<EOF
9048 #include <${cf_cv_ncurses_header:-curses.h}>
9050 #ifdef NCURSES_VERSION
9051 Autoconf NCURSES_VERSION
9059 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9060 { (eval echo "$as_me:9060: \"$cf_try\"") >&5
9063 echo "$as_me:9063: \$? = $ac_status" >&5
9064 (exit $ac_status); }
9065 if test -f conftest.out ; then
9066 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
9067 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9072 cat >conftest.$ac_ext <<_ACEOF
9073 #line 9073 "configure"
9074 #include "confdefs.h"
9076 #include <${cf_cv_ncurses_header:-curses.h}>
9080 FILE *fp = fopen("$cf_tempfile", "w");
9081 #ifdef NCURSES_VERSION
9082 # ifdef NCURSES_VERSION_PATCH
9083 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9085 fprintf(fp, "%s\n", NCURSES_VERSION);
9089 fprintf(fp, "old\n");
9094 ${cf_cv_main_return:-return}(0);
9097 rm -f conftest$ac_exeext
9098 if { (eval echo "$as_me:9098: \"$ac_link\"") >&5
9099 (eval $ac_link) 2>&5
9101 echo "$as_me:9101: \$? = $ac_status" >&5
9102 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9103 { (eval echo "$as_me:9103: \"$ac_try\"") >&5
9106 echo "$as_me:9106: \$? = $ac_status" >&5
9107 (exit $ac_status); }; }; then
9109 cf_cv_ncurses_version=`cat $cf_tempfile`
9111 echo "$as_me: program exited with status $ac_status" >&5
9112 echo "$as_me: failed program was:" >&5
9113 cat conftest.$ac_ext >&5
9115 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9120 echo "$as_me:9120: result: $cf_cv_ncurses_version" >&5
9121 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9122 test "$cf_cv_ncurses_version" = no ||
9123 cat >>confdefs.h <<\EOF
9127 cf_nculib_root=$cf_cv_screen
9128 # This works, except for the special case where we find gpm, but
9129 # ncurses is in a nonstandard location via $LIBS, and we really want
9132 cf_ncurses_SAVE="$LIBS"
9133 echo "$as_me:9133: checking for Gpm_Open in -lgpm" >&5
9134 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9135 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9136 echo $ECHO_N "(cached) $ECHO_C" >&6
9138 ac_check_lib_save_LIBS=$LIBS
9140 cat >conftest.$ac_ext <<_ACEOF
9141 #line 9141 "configure"
9142 #include "confdefs.h"
9144 /* Override any gcc2 internal prototype to avoid an error. */
9148 /* We use char because int might match the return type of a gcc2
9149 builtin and then its argument prototype would still apply. */
9159 rm -f conftest.$ac_objext conftest$ac_exeext
9160 if { (eval echo "$as_me:9160: \"$ac_link\"") >&5
9161 (eval $ac_link) 2>&5
9163 echo "$as_me:9163: \$? = $ac_status" >&5
9164 (exit $ac_status); } &&
9165 { ac_try='test -s conftest$ac_exeext'
9166 { (eval echo "$as_me:9166: \"$ac_try\"") >&5
9169 echo "$as_me:9169: \$? = $ac_status" >&5
9170 (exit $ac_status); }; }; then
9171 ac_cv_lib_gpm_Gpm_Open=yes
9173 echo "$as_me: failed program was:" >&5
9174 cat conftest.$ac_ext >&5
9175 ac_cv_lib_gpm_Gpm_Open=no
9177 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9178 LIBS=$ac_check_lib_save_LIBS
9180 echo "$as_me:9180: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9181 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9182 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
9183 echo "$as_me:9183: checking for initscr in -lgpm" >&5
9184 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9185 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9186 echo $ECHO_N "(cached) $ECHO_C" >&6
9188 ac_check_lib_save_LIBS=$LIBS
9190 cat >conftest.$ac_ext <<_ACEOF
9191 #line 9191 "configure"
9192 #include "confdefs.h"
9194 /* Override any gcc2 internal prototype to avoid an error. */
9198 /* We use char because int might match the return type of a gcc2
9199 builtin and then its argument prototype would still apply. */
9209 rm -f conftest.$ac_objext conftest$ac_exeext
9210 if { (eval echo "$as_me:9210: \"$ac_link\"") >&5
9211 (eval $ac_link) 2>&5
9213 echo "$as_me:9213: \$? = $ac_status" >&5
9214 (exit $ac_status); } &&
9215 { ac_try='test -s conftest$ac_exeext'
9216 { (eval echo "$as_me:9216: \"$ac_try\"") >&5
9219 echo "$as_me:9219: \$? = $ac_status" >&5
9220 (exit $ac_status); }; }; then
9221 ac_cv_lib_gpm_initscr=yes
9223 echo "$as_me: failed program was:" >&5
9224 cat conftest.$ac_ext >&5
9225 ac_cv_lib_gpm_initscr=no
9227 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9228 LIBS=$ac_check_lib_save_LIBS
9230 echo "$as_me:9230: result: $ac_cv_lib_gpm_initscr" >&5
9231 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9232 if test $ac_cv_lib_gpm_initscr = yes; then
9233 LIBS="$cf_ncurses_SAVE"
9235 cf_ncurses_LIBS="-lgpm"
9242 # This is only necessary if you are linking against an obsolete
9243 # version of ncurses (but it should do no harm, since it's static).
9244 if test "$cf_nculib_root" = ncurses ; then
9245 echo "$as_me:9245: checking for tgoto in -lmytinfo" >&5
9246 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9247 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9248 echo $ECHO_N "(cached) $ECHO_C" >&6
9250 ac_check_lib_save_LIBS=$LIBS
9251 LIBS="-lmytinfo $LIBS"
9252 cat >conftest.$ac_ext <<_ACEOF
9253 #line 9253 "configure"
9254 #include "confdefs.h"
9256 /* Override any gcc2 internal prototype to avoid an error. */
9260 /* We use char because int might match the return type of a gcc2
9261 builtin and then its argument prototype would still apply. */
9271 rm -f conftest.$ac_objext conftest$ac_exeext
9272 if { (eval echo "$as_me:9272: \"$ac_link\"") >&5
9273 (eval $ac_link) 2>&5
9275 echo "$as_me:9275: \$? = $ac_status" >&5
9276 (exit $ac_status); } &&
9277 { ac_try='test -s conftest$ac_exeext'
9278 { (eval echo "$as_me:9278: \"$ac_try\"") >&5
9281 echo "$as_me:9281: \$? = $ac_status" >&5
9282 (exit $ac_status); }; }; then
9283 ac_cv_lib_mytinfo_tgoto=yes
9285 echo "$as_me: failed program was:" >&5
9286 cat conftest.$ac_ext >&5
9287 ac_cv_lib_mytinfo_tgoto=no
9289 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9290 LIBS=$ac_check_lib_save_LIBS
9292 echo "$as_me:9292: result: $ac_cv_lib_mytinfo_tgoto" >&5
9293 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9294 if test $ac_cv_lib_mytinfo_tgoto = yes; then
9295 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9305 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9307 for cf_add_1lib in $cf_add_0lib; do
9308 for cf_add_2lib in $cf_add_libs; do
9309 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9314 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9318 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
9324 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9326 for cf_add_1lib in $cf_add_0lib; do
9327 for cf_add_2lib in $cf_add_libs; do
9328 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9333 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9339 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9341 echo "$as_me:9341: checking for initscr" >&5
9342 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9343 if test "${ac_cv_func_initscr+set}" = set; then
9344 echo $ECHO_N "(cached) $ECHO_C" >&6
9346 cat >conftest.$ac_ext <<_ACEOF
9347 #line 9347 "configure"
9348 #include "confdefs.h"
9349 #define initscr autoconf_temporary
9350 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9357 /* We use char because int might match the return type of a gcc2
9358 builtin and then its argument prototype would still apply. */
9359 char initscr (void);
9365 /* The GNU C library defines stubs for functions which it implements
9366 to always fail with ENOSYS. Some functions are actually named
9367 something starting with __ and the normal name is an alias. */
9368 #if defined (__stub_initscr) || defined (__stub___initscr)
9369 #error found stub for initscr
9377 rm -f conftest.$ac_objext conftest$ac_exeext
9378 if { (eval echo "$as_me:9378: \"$ac_link\"") >&5
9379 (eval $ac_link) 2>&5
9381 echo "$as_me:9381: \$? = $ac_status" >&5
9382 (exit $ac_status); } &&
9383 { ac_try='test -s conftest$ac_exeext'
9384 { (eval echo "$as_me:9384: \"$ac_try\"") >&5
9387 echo "$as_me:9387: \$? = $ac_status" >&5
9388 (exit $ac_status); }; }; then
9389 ac_cv_func_initscr=yes
9391 echo "$as_me: failed program was:" >&5
9392 cat conftest.$ac_ext >&5
9393 ac_cv_func_initscr=no
9395 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9397 echo "$as_me:9397: result: $ac_cv_func_initscr" >&5
9398 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9399 if test $ac_cv_func_initscr = yes; then
9400 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9403 cf_save_LIBS="$LIBS"
9404 echo "$as_me:9404: checking for initscr in -l$cf_nculib_root" >&5
9405 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9406 LIBS="-l$cf_nculib_root $LIBS"
9407 cat >conftest.$ac_ext <<_ACEOF
9408 #line 9408 "configure"
9409 #include "confdefs.h"
9410 #include <${cf_cv_ncurses_header:-curses.h}>
9419 rm -f conftest.$ac_objext conftest$ac_exeext
9420 if { (eval echo "$as_me:9420: \"$ac_link\"") >&5
9421 (eval $ac_link) 2>&5
9423 echo "$as_me:9423: \$? = $ac_status" >&5
9424 (exit $ac_status); } &&
9425 { ac_try='test -s conftest$ac_exeext'
9426 { (eval echo "$as_me:9426: \"$ac_try\"") >&5
9429 echo "$as_me:9429: \$? = $ac_status" >&5
9430 (exit $ac_status); }; }; then
9431 echo "$as_me:9431: result: yes" >&5
9432 echo "${ECHO_T}yes" >&6
9433 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9436 echo "$as_me: failed program was:" >&5
9437 cat conftest.$ac_ext >&5
9438 echo "$as_me:9438: result: no" >&5
9439 echo "${ECHO_T}no" >&6
9442 cf_library_path_list=""
9443 if test -n "${LDFLAGS}${LIBS}" ; then
9444 for cf_library_path in $LDFLAGS $LIBS
9446 case $cf_library_path in
9448 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9450 test "x$cf_library_path" != "xNONE" && \
9451 test -d "$cf_library_path" && \
9453 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9454 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9455 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9456 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9457 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9458 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"
9461 cf_library_path_list="$cf_library_path_list $cf_search"
9469 test "x$prefix" != "xNONE" && \
9470 test -d "$prefix" && \
9472 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9473 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9474 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9475 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9476 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9477 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9480 for cf_subdir_prefix in \
9489 test "x$cf_subdir_prefix" != "x$prefix" && \
9490 test -d "$cf_subdir_prefix" && \
9491 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9492 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9493 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
9494 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9495 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9496 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9497 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"
9502 cf_search="$cf_library_path_list $cf_search"
9504 for cf_libdir in $cf_search
9506 echo "$as_me:9506: checking for -l$cf_nculib_root in $cf_libdir" >&5
9507 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9508 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9509 cat >conftest.$ac_ext <<_ACEOF
9510 #line 9510 "configure"
9511 #include "confdefs.h"
9512 #include <${cf_cv_ncurses_header:-curses.h}>
9521 rm -f conftest.$ac_objext conftest$ac_exeext
9522 if { (eval echo "$as_me:9522: \"$ac_link\"") >&5
9523 (eval $ac_link) 2>&5
9525 echo "$as_me:9525: \$? = $ac_status" >&5
9526 (exit $ac_status); } &&
9527 { ac_try='test -s conftest$ac_exeext'
9528 { (eval echo "$as_me:9528: \"$ac_try\"") >&5
9531 echo "$as_me:9531: \$? = $ac_status" >&5
9532 (exit $ac_status); }; }; then
9533 echo "$as_me:9533: result: yes" >&5
9534 echo "${ECHO_T}yes" >&6
9535 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9538 echo "$as_me: failed program was:" >&5
9539 cat conftest.$ac_ext >&5
9540 echo "$as_me:9540: result: no" >&5
9541 echo "${ECHO_T}no" >&6
9542 LIBS="$cf_save_LIBS"
9544 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9548 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9552 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9554 if test $cf_found_library = no ; then
9555 { { echo "$as_me:9555: error: Cannot link $cf_nculib_root library" >&5
9556 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9557 { (exit 1); exit 1; }; }
9562 if test -n "$cf_ncurses_LIBS" ; then
9563 echo "$as_me:9563: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9564 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9565 cf_ncurses_SAVE="$LIBS"
9566 for p in $cf_ncurses_LIBS ; do
9567 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9568 if test "$q" != "$LIBS" ; then
9572 cat >conftest.$ac_ext <<_ACEOF
9573 #line 9573 "configure"
9574 #include "confdefs.h"
9575 #include <${cf_cv_ncurses_header:-curses.h}>
9579 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9584 rm -f conftest.$ac_objext conftest$ac_exeext
9585 if { (eval echo "$as_me:9585: \"$ac_link\"") >&5
9586 (eval $ac_link) 2>&5
9588 echo "$as_me:9588: \$? = $ac_status" >&5
9589 (exit $ac_status); } &&
9590 { ac_try='test -s conftest$ac_exeext'
9591 { (eval echo "$as_me:9591: \"$ac_try\"") >&5
9594 echo "$as_me:9594: \$? = $ac_status" >&5
9595 (exit $ac_status); }; }; then
9596 echo "$as_me:9596: result: yes" >&5
9597 echo "${ECHO_T}yes" >&6
9599 echo "$as_me: failed program was:" >&5
9600 cat conftest.$ac_ext >&5
9601 echo "$as_me:9601: result: no" >&5
9602 echo "${ECHO_T}no" >&6
9603 LIBS="$cf_ncurses_SAVE"
9605 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9608 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9610 cat >>confdefs.h <<EOF
9611 #define $cf_nculib_ROOT 1
9622 cf_ncuconfig_root=$cf_cv_screen
9623 cf_have_ncuconfig=no
9625 if test "x${PKG_CONFIG:=none}" != xnone; then
9626 echo "$as_me:9626: checking pkg-config for $cf_ncuconfig_root" >&5
9627 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9628 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9629 echo "$as_me:9629: result: yes" >&5
9630 echo "${ECHO_T}yes" >&6
9632 echo "$as_me:9632: checking if the $cf_ncuconfig_root package files work" >&5
9633 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9634 cf_have_ncuconfig=unknown
9636 cf_save_CFLAGS="$CFLAGS"
9637 cf_save_CPPFLAGS="$CPPFLAGS"
9638 cf_save_LIBS="$LIBS"
9640 cf_pkg_cflags=`$PKG_CONFIG --cflags $cf_ncuconfig_root`
9641 cf_pkg_libs=`$PKG_CONFIG --libs $cf_ncuconfig_root`
9643 # while -W for passing linker flags is prevalent, it is not "standard".
9644 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9645 # incompatible _and_ non-standard -W option which gives an error. Work
9646 # around that pitfall.
9647 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9653 cf_new_extra_cppflags=
9655 for cf_add_cflags in $cf_pkg_cflags
9657 case $cf_fix_cppflags in
9659 case $cf_add_cflags in
9660 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9661 case $cf_add_cflags in
9663 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9665 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9666 && test -z "${cf_tst_cflags}" \
9667 && cf_fix_cppflags=yes
9669 if test $cf_fix_cppflags = yes ; then
9671 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9672 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9675 elif test "${cf_tst_cflags}" = "\"'" ; then
9677 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9678 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9688 case $cf_add_cflags in
9690 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9692 CPPFLAGS=`echo "$CPPFLAGS" | \
9693 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9694 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9699 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9700 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9707 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9708 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9715 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9716 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9718 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9720 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9721 && test -z "${cf_tst_cflags}" \
9722 && cf_fix_cppflags=no
9727 if test -n "$cf_new_cflags" ; then
9729 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9730 CFLAGS="${CFLAGS}$cf_new_cflags"
9734 if test -n "$cf_new_cppflags" ; then
9736 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9737 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9741 if test -n "$cf_new_extra_cppflags" ; then
9743 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9744 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9751 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9753 for cf_add_1lib in $cf_add_0lib; do
9754 for cf_add_2lib in $cf_add_libs; do
9755 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9760 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9764 cat >conftest.$ac_ext <<_ACEOF
9765 #line 9765 "configure"
9766 #include "confdefs.h"
9767 #include <${cf_cv_ncurses_header:-curses.h}>
9771 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9776 rm -f conftest.$ac_objext conftest$ac_exeext
9777 if { (eval echo "$as_me:9777: \"$ac_link\"") >&5
9778 (eval $ac_link) 2>&5
9780 echo "$as_me:9780: \$? = $ac_status" >&5
9781 (exit $ac_status); } &&
9782 { ac_try='test -s conftest$ac_exeext'
9783 { (eval echo "$as_me:9783: \"$ac_try\"") >&5
9786 echo "$as_me:9786: \$? = $ac_status" >&5
9787 (exit $ac_status); }; }; then
9788 if test "$cross_compiling" = yes; then
9789 cf_test_ncuconfig=maybe
9791 cat >conftest.$ac_ext <<_ACEOF
9792 #line 9792 "configure"
9793 #include "confdefs.h"
9794 #include <${cf_cv_ncurses_header:-curses.h}>
9796 { char *xx = curses_version(); return (xx == 0); }
9798 rm -f conftest$ac_exeext
9799 if { (eval echo "$as_me:9799: \"$ac_link\"") >&5
9800 (eval $ac_link) 2>&5
9802 echo "$as_me:9802: \$? = $ac_status" >&5
9803 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9804 { (eval echo "$as_me:9804: \"$ac_try\"") >&5
9807 echo "$as_me:9807: \$? = $ac_status" >&5
9808 (exit $ac_status); }; }; then
9809 cf_test_ncuconfig=yes
9811 echo "$as_me: program exited with status $ac_status" >&5
9812 echo "$as_me: failed program was:" >&5
9813 cat conftest.$ac_ext >&5
9814 cf_test_ncuconfig=no
9816 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9819 echo "$as_me: failed program was:" >&5
9820 cat conftest.$ac_ext >&5
9821 cf_test_ncuconfig=no
9823 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9825 CFLAGS="$cf_save_CFLAGS"
9826 CPPFLAGS="$cf_save_CPPFLAGS"
9827 LIBS="$cf_save_LIBS"
9829 if test "x$cf_test_ncuconfig" != xyes; then
9830 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9831 cf_pkg_cflags="$cf_temp"
9832 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9833 cf_pkg_libs="$cf_temp"
9841 cf_new_extra_cppflags=
9843 for cf_add_cflags in $cf_pkg_cflags
9845 case $cf_fix_cppflags in
9847 case $cf_add_cflags in
9848 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9849 case $cf_add_cflags in
9851 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9853 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9854 && test -z "${cf_tst_cflags}" \
9855 && cf_fix_cppflags=yes
9857 if test $cf_fix_cppflags = yes ; then
9859 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9860 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9863 elif test "${cf_tst_cflags}" = "\"'" ; then
9865 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9866 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9876 case $cf_add_cflags in
9878 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9880 CPPFLAGS=`echo "$CPPFLAGS" | \
9881 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9882 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9887 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9888 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9895 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9896 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9903 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9904 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9906 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9908 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9909 && test -z "${cf_tst_cflags}" \
9910 && cf_fix_cppflags=no
9915 if test -n "$cf_new_cflags" ; then
9917 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9918 CFLAGS="${CFLAGS}$cf_new_cflags"
9922 if test -n "$cf_new_cppflags" ; then
9924 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9925 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9929 if test -n "$cf_new_extra_cppflags" ; then
9931 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9932 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9939 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9941 for cf_add_1lib in $cf_add_0lib; do
9942 for cf_add_2lib in $cf_add_libs; do
9943 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9948 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9952 cat >conftest.$ac_ext <<_ACEOF
9953 #line 9953 "configure"
9954 #include "confdefs.h"
9955 #include <${cf_cv_ncurses_header:-curses.h}>
9959 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9964 rm -f conftest.$ac_objext conftest$ac_exeext
9965 if { (eval echo "$as_me:9965: \"$ac_link\"") >&5
9966 (eval $ac_link) 2>&5
9968 echo "$as_me:9968: \$? = $ac_status" >&5
9969 (exit $ac_status); } &&
9970 { ac_try='test -s conftest$ac_exeext'
9971 { (eval echo "$as_me:9971: \"$ac_try\"") >&5
9974 echo "$as_me:9974: \$? = $ac_status" >&5
9975 (exit $ac_status); }; }; then
9976 if test "$cross_compiling" = yes; then
9977 cf_have_ncuconfig=maybe
9979 cat >conftest.$ac_ext <<_ACEOF
9980 #line 9980 "configure"
9981 #include "confdefs.h"
9982 #include <${cf_cv_ncurses_header:-curses.h}>
9984 { char *xx = curses_version(); return (xx == 0); }
9986 rm -f conftest$ac_exeext
9987 if { (eval echo "$as_me:9987: \"$ac_link\"") >&5
9988 (eval $ac_link) 2>&5
9990 echo "$as_me:9990: \$? = $ac_status" >&5
9991 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9992 { (eval echo "$as_me:9992: \"$ac_try\"") >&5
9995 echo "$as_me:9995: \$? = $ac_status" >&5
9996 (exit $ac_status); }; }; then
9997 cf_have_ncuconfig=yes
9999 echo "$as_me: program exited with status $ac_status" >&5
10000 echo "$as_me: failed program was:" >&5
10001 cat conftest.$ac_ext >&5
10002 cf_have_ncuconfig=no
10004 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10007 echo "$as_me: failed program was:" >&5
10008 cat conftest.$ac_ext >&5
10009 cf_have_ncuconfig=no
10011 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10012 echo "$as_me:10012: result: $cf_have_ncuconfig" >&5
10013 echo "${ECHO_T}$cf_have_ncuconfig" >&6
10014 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
10015 if test "$cf_have_ncuconfig" != "yes"
10017 CPPFLAGS="$cf_save_CPPFLAGS"
10018 LIBS="$cf_save_LIBS"
10019 NCURSES_CONFIG_PKG=none
10022 cat >>confdefs.h <<\EOF
10026 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
10028 echo "$as_me:10028: checking for terminfo header" >&5
10029 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10030 if test "${cf_cv_term_header+set}" = set; then
10031 echo $ECHO_N "(cached) $ECHO_C" >&6
10034 case ${cf_cv_ncurses_header} in
10035 (*/ncurses.h|*/ncursesw.h)
10036 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10039 cf_term_header=term.h
10043 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10045 cat >conftest.$ac_ext <<_ACEOF
10046 #line 10046 "configure"
10047 #include "confdefs.h"
10049 #include <${cf_cv_ncurses_header:-curses.h}>
10050 #include <$cf_test>
10055 int x = auto_left_margin; (void)x
10060 rm -f conftest.$ac_objext
10061 if { (eval echo "$as_me:10061: \"$ac_compile\"") >&5
10062 (eval $ac_compile) 2>&5
10064 echo "$as_me:10064: \$? = $ac_status" >&5
10065 (exit $ac_status); } &&
10066 { ac_try='test -s conftest.$ac_objext'
10067 { (eval echo "$as_me:10067: \"$ac_try\"") >&5
10068 (eval $ac_try) 2>&5
10070 echo "$as_me:10070: \$? = $ac_status" >&5
10071 (exit $ac_status); }; }; then
10073 cf_cv_term_header="$cf_test"
10075 echo "$as_me: failed program was:" >&5
10076 cat conftest.$ac_ext >&5
10078 cf_cv_term_header=unknown
10081 rm -f conftest.$ac_objext conftest.$ac_ext
10082 test "$cf_cv_term_header" != unknown && break
10086 echo "$as_me:10086: result: $cf_cv_term_header" >&5
10087 echo "${ECHO_T}$cf_cv_term_header" >&6
10089 # Set definitions to allow ifdef'ing to accommodate subdirectories
10091 case $cf_cv_term_header in
10094 cat >>confdefs.h <<\EOF
10095 #define HAVE_TERM_H 1
10101 case $cf_cv_term_header in
10104 cat >>confdefs.h <<\EOF
10105 #define HAVE_NCURSES_TERM_H 1
10111 cat >>confdefs.h <<\EOF
10112 #define HAVE_NCURSESW_TERM_H 1
10121 echo "$as_me:10121: result: no" >&5
10122 echo "${ECHO_T}no" >&6
10123 NCURSES_CONFIG_PKG=none
10126 NCURSES_CONFIG_PKG=none
10129 if test "x$cf_have_ncuconfig" = "xno"; then
10130 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
10132 if test -n "$ac_tool_prefix"; then
10133 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10135 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
10136 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
10137 echo "$as_me:10137: checking for $ac_word" >&5
10138 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10139 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
10140 echo $ECHO_N "(cached) $ECHO_C" >&6
10142 if test -n "$NCURSES_CONFIG"; then
10143 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
10145 ac_save_IFS=$IFS; IFS=$ac_path_separator
10147 for ac_dir in $ac_dummy; do
10149 test -z "$ac_dir" && ac_dir=.
10150 $as_executable_p "$ac_dir/$ac_word" || continue
10151 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
10152 echo "$as_me:10152: found $ac_dir/$ac_word" >&5
10158 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
10159 if test -n "$NCURSES_CONFIG"; then
10160 echo "$as_me:10160: result: $NCURSES_CONFIG" >&5
10161 echo "${ECHO_T}$NCURSES_CONFIG" >&6
10163 echo "$as_me:10163: result: no" >&5
10164 echo "${ECHO_T}no" >&6
10167 test -n "$NCURSES_CONFIG" && break
10170 if test -z "$NCURSES_CONFIG"; then
10171 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
10172 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10174 # Extract the first word of "$ac_prog", so it can be a program name with args.
10175 set dummy $ac_prog; ac_word=$2
10176 echo "$as_me:10176: checking for $ac_word" >&5
10177 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10178 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
10179 echo $ECHO_N "(cached) $ECHO_C" >&6
10181 if test -n "$ac_ct_NCURSES_CONFIG"; then
10182 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
10184 ac_save_IFS=$IFS; IFS=$ac_path_separator
10186 for ac_dir in $ac_dummy; do
10188 test -z "$ac_dir" && ac_dir=.
10189 $as_executable_p "$ac_dir/$ac_word" || continue
10190 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
10191 echo "$as_me:10191: found $ac_dir/$ac_word" >&5
10197 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
10198 if test -n "$ac_ct_NCURSES_CONFIG"; then
10199 echo "$as_me:10199: result: $ac_ct_NCURSES_CONFIG" >&5
10200 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
10202 echo "$as_me:10202: result: no" >&5
10203 echo "${ECHO_T}no" >&6
10206 test -n "$ac_ct_NCURSES_CONFIG" && break
10208 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
10210 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
10213 if test "$NCURSES_CONFIG" != none ; then
10218 cf_new_extra_cppflags=
10220 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
10222 case $cf_fix_cppflags in
10224 case $cf_add_cflags in
10225 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10226 case $cf_add_cflags in
10228 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10230 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10231 && test -z "${cf_tst_cflags}" \
10232 && cf_fix_cppflags=yes
10234 if test $cf_fix_cppflags = yes ; then
10236 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10237 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10240 elif test "${cf_tst_cflags}" = "\"'" ; then
10242 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10243 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10249 case "$CPPFLAGS" in
10253 case $cf_add_cflags in
10255 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10257 CPPFLAGS=`echo "$CPPFLAGS" | \
10258 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10259 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10264 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10265 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10272 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10273 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10280 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10281 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10283 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10285 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10286 && test -z "${cf_tst_cflags}" \
10287 && cf_fix_cppflags=no
10292 if test -n "$cf_new_cflags" ; then
10294 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10295 CFLAGS="${CFLAGS}$cf_new_cflags"
10299 if test -n "$cf_new_cppflags" ; then
10301 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10302 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10306 if test -n "$cf_new_extra_cppflags" ; then
10308 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10309 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10313 cf_add_libs="$LIBS"
10316 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10317 # filter duplicates
10318 for cf_add_1lib in $cf_add_0lib; do
10319 for cf_add_2lib in $cf_add_libs; do
10320 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10325 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10327 LIBS="$cf_add_libs"
10329 # even with config script, some packages use no-override for curses.h
10331 echo "$as_me:10331: checking if we have identified curses headers" >&5
10332 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10333 if test "${cf_cv_ncurses_header+set}" = set; then
10334 echo $ECHO_N "(cached) $ECHO_C" >&6
10337 cf_cv_ncurses_header=none
10339 ncurses.h $cf_cv_screen/ncurses.h \
10340 curses.h $cf_cv_screen/curses.h
10342 cat >conftest.$ac_ext <<_ACEOF
10343 #line 10343 "configure"
10344 #include "confdefs.h"
10345 #include <${cf_header}>
10349 initscr(); tgoto("?", 0,0)
10354 rm -f conftest.$ac_objext
10355 if { (eval echo "$as_me:10355: \"$ac_compile\"") >&5
10356 (eval $ac_compile) 2>&5
10358 echo "$as_me:10358: \$? = $ac_status" >&5
10359 (exit $ac_status); } &&
10360 { ac_try='test -s conftest.$ac_objext'
10361 { (eval echo "$as_me:10361: \"$ac_try\"") >&5
10362 (eval $ac_try) 2>&5
10364 echo "$as_me:10364: \$? = $ac_status" >&5
10365 (exit $ac_status); }; }; then
10366 cf_cv_ncurses_header=$cf_header; break
10368 echo "$as_me: failed program was:" >&5
10369 cat conftest.$ac_ext >&5
10371 rm -f conftest.$ac_objext conftest.$ac_ext
10375 echo "$as_me:10375: result: $cf_cv_ncurses_header" >&5
10376 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10378 if test "$cf_cv_ncurses_header" = none ; then
10379 { { echo "$as_me:10379: error: No curses header-files found" >&5
10380 echo "$as_me: error: No curses header-files found" >&2;}
10381 { (exit 1); exit 1; }; }
10384 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10386 for ac_header in $cf_cv_ncurses_header
10388 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10389 echo "$as_me:10389: checking for $ac_header" >&5
10390 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10391 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10392 echo $ECHO_N "(cached) $ECHO_C" >&6
10394 cat >conftest.$ac_ext <<_ACEOF
10395 #line 10395 "configure"
10396 #include "confdefs.h"
10397 #include <$ac_header>
10399 if { (eval echo "$as_me:10399: \"$ac_cpp conftest.$ac_ext\"") >&5
10400 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10402 egrep -v '^ *\+' conftest.er1 >conftest.err
10404 cat conftest.err >&5
10405 echo "$as_me:10405: \$? = $ac_status" >&5
10406 (exit $ac_status); } >/dev/null; then
10407 if test -s conftest.err; then
10408 ac_cpp_err=$ac_c_preproc_warn_flag
10415 if test -z "$ac_cpp_err"; then
10416 eval "$as_ac_Header=yes"
10418 echo "$as_me: failed program was:" >&5
10419 cat conftest.$ac_ext >&5
10420 eval "$as_ac_Header=no"
10422 rm -f conftest.err conftest.$ac_ext
10424 echo "$as_me:10424: result: `eval echo '${'$as_ac_Header'}'`" >&5
10425 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10426 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10427 cat >>confdefs.h <<EOF
10428 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10434 cat >>confdefs.h <<\EOF
10438 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10440 cat >>confdefs.h <<EOF
10441 #define $cf_nculib_ROOT 1
10444 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
10448 cf_ncuhdr_root=$cf_cv_screen
10450 test -n "$cf_cv_curses_dir" && \
10451 test "$cf_cv_curses_dir" != "no" && { \
10453 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
10454 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
10456 while test $cf_add_incdir != /usr/include
10458 if test -d $cf_add_incdir
10461 if test -n "$CFLAGS$CPPFLAGS" ; then
10462 # a loop is needed to ensure we can add subdirs of existing dirs
10463 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10464 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10465 cf_have_incdir=yes; break
10470 if test "$cf_have_incdir" = no ; then
10471 if test "$cf_add_incdir" = /usr/local/include ; then
10472 if test "$GCC" = yes
10474 cf_save_CPPFLAGS=$CPPFLAGS
10476 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10477 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10479 cat >conftest.$ac_ext <<_ACEOF
10480 #line 10480 "configure"
10481 #include "confdefs.h"
10491 rm -f conftest.$ac_objext
10492 if { (eval echo "$as_me:10492: \"$ac_compile\"") >&5
10493 (eval $ac_compile) 2>&5
10495 echo "$as_me:10495: \$? = $ac_status" >&5
10496 (exit $ac_status); } &&
10497 { ac_try='test -s conftest.$ac_objext'
10498 { (eval echo "$as_me:10498: \"$ac_try\"") >&5
10499 (eval $ac_try) 2>&5
10501 echo "$as_me:10501: \$? = $ac_status" >&5
10502 (exit $ac_status); }; }; then
10505 echo "$as_me: failed program was:" >&5
10506 cat conftest.$ac_ext >&5
10509 rm -f conftest.$ac_objext conftest.$ac_ext
10510 CPPFLAGS=$cf_save_CPPFLAGS
10515 if test "$cf_have_incdir" = no ; then
10516 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10518 echo "${as_me:-configure}:10518: testing adding $cf_add_incdir to include-path ..." 1>&5
10520 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10522 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10523 test "$cf_top_incdir" = "$cf_add_incdir" && break
10524 cf_add_incdir="$cf_top_incdir"
10537 echo "$as_me:10537: checking for $cf_ncuhdr_root header in include-path" >&5
10538 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10539 if test "${cf_cv_ncurses_h+set}" = set; then
10540 echo $ECHO_N "(cached) $ECHO_C" >&6
10543 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10544 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
10545 for cf_header in $cf_header_list
10548 cat >conftest.$ac_ext <<_ACEOF
10549 #line 10549 "configure"
10550 #include "confdefs.h"
10552 #include <$cf_header>
10557 #ifdef NCURSES_VERSION
10559 printf("%s\n", NCURSES_VERSION);
10572 rm -f conftest.$ac_objext
10573 if { (eval echo "$as_me:10573: \"$ac_compile\"") >&5
10574 (eval $ac_compile) 2>&5
10576 echo "$as_me:10576: \$? = $ac_status" >&5
10577 (exit $ac_status); } &&
10578 { ac_try='test -s conftest.$ac_objext'
10579 { (eval echo "$as_me:10579: \"$ac_try\"") >&5
10580 (eval $ac_try) 2>&5
10582 echo "$as_me:10582: \$? = $ac_status" >&5
10583 (exit $ac_status); }; }; then
10584 cf_cv_ncurses_h=$cf_header
10587 echo "$as_me: failed program was:" >&5
10588 cat conftest.$ac_ext >&5
10591 rm -f conftest.$ac_objext conftest.$ac_ext
10593 test "$cf_cv_ncurses_h" != no && break
10597 echo "$as_me:10597: result: $cf_cv_ncurses_h" >&5
10598 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10600 if test "$cf_cv_ncurses_h" != no ; then
10601 cf_cv_ncurses_header=$cf_cv_ncurses_h
10604 echo "$as_me:10604: checking for $cf_ncuhdr_root include-path" >&5
10605 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10606 if test "${cf_cv_ncurses_h2+set}" = set; then
10607 echo $ECHO_N "(cached) $ECHO_C" >&6
10610 test -n "$verbose" && echo
10614 # collect the current set of include-directories from compiler flags
10615 cf_header_path_list=""
10616 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10617 for cf_header_path in $CPPFLAGS $CFLAGS
10619 case $cf_header_path in
10621 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10623 test "x$cf_header_path" != "xNONE" && \
10624 test -d "$cf_header_path" && \
10626 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10627 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
10628 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10629 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10630 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10631 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"
10634 cf_header_path_list="$cf_header_path_list $cf_search"
10640 # add the variations for the package we are looking for
10644 test "x$prefix" != "xNONE" && \
10645 test -d "$prefix" && \
10647 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10648 test -d $prefix/include && cf_search="$cf_search $prefix/include"
10649 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10650 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10651 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10652 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10655 for cf_subdir_prefix in \
10664 test "x$cf_subdir_prefix" != "x$prefix" && \
10665 test -d "$cf_subdir_prefix" && \
10666 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10667 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10668 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
10669 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10670 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10671 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10672 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"
10677 test "$includedir" != NONE && \
10678 test "$includedir" != "/usr/include" && \
10679 test -d "$includedir" && {
10680 test -d $includedir && cf_search="$cf_search $includedir"
10681 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10684 test "$oldincludedir" != NONE && \
10685 test "$oldincludedir" != "/usr/include" && \
10686 test -d "$oldincludedir" && {
10687 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
10688 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10691 cf_search="$cf_search $cf_header_path_list"
10693 test -n "$verbose" && echo search path $cf_search
10694 cf_save2_CPPFLAGS="$CPPFLAGS"
10695 for cf_incdir in $cf_search
10698 if test -n "$cf_incdir" ; then
10699 for cf_add_incdir in $cf_incdir
10701 while test $cf_add_incdir != /usr/include
10703 if test -d $cf_add_incdir
10706 if test -n "$CFLAGS$CPPFLAGS" ; then
10707 # a loop is needed to ensure we can add subdirs of existing dirs
10708 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10709 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10710 cf_have_incdir=yes; break
10715 if test "$cf_have_incdir" = no ; then
10716 if test "$cf_add_incdir" = /usr/local/include ; then
10717 if test "$GCC" = yes
10719 cf_save_CPPFLAGS=$CPPFLAGS
10721 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10722 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10724 cat >conftest.$ac_ext <<_ACEOF
10725 #line 10725 "configure"
10726 #include "confdefs.h"
10736 rm -f conftest.$ac_objext
10737 if { (eval echo "$as_me:10737: \"$ac_compile\"") >&5
10738 (eval $ac_compile) 2>&5
10740 echo "$as_me:10740: \$? = $ac_status" >&5
10741 (exit $ac_status); } &&
10742 { ac_try='test -s conftest.$ac_objext'
10743 { (eval echo "$as_me:10743: \"$ac_try\"") >&5
10744 (eval $ac_try) 2>&5
10746 echo "$as_me:10746: \$? = $ac_status" >&5
10747 (exit $ac_status); }; }; then
10750 echo "$as_me: failed program was:" >&5
10751 cat conftest.$ac_ext >&5
10754 rm -f conftest.$ac_objext conftest.$ac_ext
10755 CPPFLAGS=$cf_save_CPPFLAGS
10760 if test "$cf_have_incdir" = no ; then
10761 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10763 echo "${as_me:-configure}:10763: testing adding $cf_add_incdir to include-path ..." 1>&5
10765 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10767 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10768 test "$cf_top_incdir" = "$cf_add_incdir" && break
10769 cf_add_incdir="$cf_top_incdir"
10785 cat >conftest.$ac_ext <<_ACEOF
10786 #line 10786 "configure"
10787 #include "confdefs.h"
10789 #include <$cf_header>
10794 #ifdef NCURSES_VERSION
10796 printf("%s\n", NCURSES_VERSION);
10809 rm -f conftest.$ac_objext
10810 if { (eval echo "$as_me:10810: \"$ac_compile\"") >&5
10811 (eval $ac_compile) 2>&5
10813 echo "$as_me:10813: \$? = $ac_status" >&5
10814 (exit $ac_status); } &&
10815 { ac_try='test -s conftest.$ac_objext'
10816 { (eval echo "$as_me:10816: \"$ac_try\"") >&5
10817 (eval $ac_try) 2>&5
10819 echo "$as_me:10819: \$? = $ac_status" >&5
10820 (exit $ac_status); }; }; then
10821 cf_cv_ncurses_h2=$cf_header
10824 echo "$as_me: failed program was:" >&5
10825 cat conftest.$ac_ext >&5
10826 cf_cv_ncurses_h2=no
10828 rm -f conftest.$ac_objext conftest.$ac_ext
10830 if test "$cf_cv_ncurses_h2" != no ; then
10831 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10832 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
10835 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10837 CPPFLAGS="$cf_save2_CPPFLAGS"
10838 test "$cf_cv_ncurses_h2" != no && break
10840 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10840: error: not found" >&5
10841 echo "$as_me: error: not found" >&2;}
10842 { (exit 1); exit 1; }; }
10845 echo "$as_me:10845: result: $cf_cv_ncurses_h2" >&5
10846 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10848 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
10849 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
10850 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
10851 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
10854 if test -n "$cf_1st_incdir" ; then
10855 for cf_add_incdir in $cf_1st_incdir
10857 while test $cf_add_incdir != /usr/include
10859 if test -d $cf_add_incdir
10862 if test -n "$CFLAGS$CPPFLAGS" ; then
10863 # a loop is needed to ensure we can add subdirs of existing dirs
10864 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10865 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10866 cf_have_incdir=yes; break
10871 if test "$cf_have_incdir" = no ; then
10872 if test "$cf_add_incdir" = /usr/local/include ; then
10873 if test "$GCC" = yes
10875 cf_save_CPPFLAGS=$CPPFLAGS
10877 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10878 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10880 cat >conftest.$ac_ext <<_ACEOF
10881 #line 10881 "configure"
10882 #include "confdefs.h"
10892 rm -f conftest.$ac_objext
10893 if { (eval echo "$as_me:10893: \"$ac_compile\"") >&5
10894 (eval $ac_compile) 2>&5
10896 echo "$as_me:10896: \$? = $ac_status" >&5
10897 (exit $ac_status); } &&
10898 { ac_try='test -s conftest.$ac_objext'
10899 { (eval echo "$as_me:10899: \"$ac_try\"") >&5
10900 (eval $ac_try) 2>&5
10902 echo "$as_me:10902: \$? = $ac_status" >&5
10903 (exit $ac_status); }; }; then
10906 echo "$as_me: failed program was:" >&5
10907 cat conftest.$ac_ext >&5
10910 rm -f conftest.$ac_objext conftest.$ac_ext
10911 CPPFLAGS=$cf_save_CPPFLAGS
10916 if test "$cf_have_incdir" = no ; then
10917 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10919 echo "${as_me:-configure}:10919: testing adding $cf_add_incdir to include-path ..." 1>&5
10921 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10923 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10924 test "$cf_top_incdir" = "$cf_add_incdir" && break
10925 cf_add_incdir="$cf_top_incdir"
10938 # Set definitions to allow ifdef'ing for ncurses.h
10940 case $cf_cv_ncurses_header in
10943 cat >>confdefs.h <<\EOF
10944 #define HAVE_NCURSES_H 1
10950 case $cf_cv_ncurses_header in
10951 (ncurses/curses.h|ncurses/ncurses.h)
10953 cat >>confdefs.h <<\EOF
10954 #define HAVE_NCURSES_NCURSES_H 1
10958 (ncursesw/curses.h|ncursesw/ncurses.h)
10960 cat >>confdefs.h <<\EOF
10961 #define HAVE_NCURSESW_NCURSES_H 1
10967 echo "$as_me:10967: checking for terminfo header" >&5
10968 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10969 if test "${cf_cv_term_header+set}" = set; then
10970 echo $ECHO_N "(cached) $ECHO_C" >&6
10973 case ${cf_cv_ncurses_header} in
10974 (*/ncurses.h|*/ncursesw.h)
10975 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10978 cf_term_header=term.h
10982 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10984 cat >conftest.$ac_ext <<_ACEOF
10985 #line 10985 "configure"
10986 #include "confdefs.h"
10988 #include <${cf_cv_ncurses_header:-curses.h}>
10989 #include <$cf_test>
10994 int x = auto_left_margin; (void)x
10999 rm -f conftest.$ac_objext
11000 if { (eval echo "$as_me:11000: \"$ac_compile\"") >&5
11001 (eval $ac_compile) 2>&5
11003 echo "$as_me:11003: \$? = $ac_status" >&5
11004 (exit $ac_status); } &&
11005 { ac_try='test -s conftest.$ac_objext'
11006 { (eval echo "$as_me:11006: \"$ac_try\"") >&5
11007 (eval $ac_try) 2>&5
11009 echo "$as_me:11009: \$? = $ac_status" >&5
11010 (exit $ac_status); }; }; then
11012 cf_cv_term_header="$cf_test"
11014 echo "$as_me: failed program was:" >&5
11015 cat conftest.$ac_ext >&5
11017 cf_cv_term_header=unknown
11020 rm -f conftest.$ac_objext conftest.$ac_ext
11021 test "$cf_cv_term_header" != unknown && break
11025 echo "$as_me:11025: result: $cf_cv_term_header" >&5
11026 echo "${ECHO_T}$cf_cv_term_header" >&6
11028 # Set definitions to allow ifdef'ing to accommodate subdirectories
11030 case $cf_cv_term_header in
11033 cat >>confdefs.h <<\EOF
11034 #define HAVE_TERM_H 1
11040 case $cf_cv_term_header in
11043 cat >>confdefs.h <<\EOF
11044 #define HAVE_NCURSES_TERM_H 1
11050 cat >>confdefs.h <<\EOF
11051 #define HAVE_NCURSESW_TERM_H 1
11057 # some applications need this, but should check for NCURSES_VERSION
11059 cat >>confdefs.h <<\EOF
11063 echo "$as_me:11063: checking for ncurses version" >&5
11064 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
11065 if test "${cf_cv_ncurses_version+set}" = set; then
11066 echo $ECHO_N "(cached) $ECHO_C" >&6
11069 cf_cv_ncurses_version=no
11072 if test "$cross_compiling" = yes; then
11074 # This will not work if the preprocessor splits the line after the
11075 # Autoconf token. The 'unproto' program does that.
11076 cat > conftest.$ac_ext <<EOF
11077 #include <${cf_cv_ncurses_header:-curses.h}>
11079 #ifdef NCURSES_VERSION
11080 Autoconf NCURSES_VERSION
11088 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
11089 { (eval echo "$as_me:11089: \"$cf_try\"") >&5
11090 (eval $cf_try) 2>&5
11092 echo "$as_me:11092: \$? = $ac_status" >&5
11093 (exit $ac_status); }
11094 if test -f conftest.out ; then
11095 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
11096 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
11101 cat >conftest.$ac_ext <<_ACEOF
11102 #line 11102 "configure"
11103 #include "confdefs.h"
11105 #include <${cf_cv_ncurses_header:-curses.h}>
11109 FILE *fp = fopen("$cf_tempfile", "w");
11110 #ifdef NCURSES_VERSION
11111 # ifdef NCURSES_VERSION_PATCH
11112 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
11114 fprintf(fp, "%s\n", NCURSES_VERSION);
11117 # ifdef __NCURSES_H
11118 fprintf(fp, "old\n");
11123 ${cf_cv_main_return:-return}(0);
11126 rm -f conftest$ac_exeext
11127 if { (eval echo "$as_me:11127: \"$ac_link\"") >&5
11128 (eval $ac_link) 2>&5
11130 echo "$as_me:11130: \$? = $ac_status" >&5
11131 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11132 { (eval echo "$as_me:11132: \"$ac_try\"") >&5
11133 (eval $ac_try) 2>&5
11135 echo "$as_me:11135: \$? = $ac_status" >&5
11136 (exit $ac_status); }; }; then
11138 cf_cv_ncurses_version=`cat $cf_tempfile`
11140 echo "$as_me: program exited with status $ac_status" >&5
11141 echo "$as_me: failed program was:" >&5
11142 cat conftest.$ac_ext >&5
11144 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11149 echo "$as_me:11149: result: $cf_cv_ncurses_version" >&5
11150 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
11151 test "$cf_cv_ncurses_version" = no ||
11152 cat >>confdefs.h <<\EOF
11156 cf_nculib_root=$cf_cv_screen
11157 # This works, except for the special case where we find gpm, but
11158 # ncurses is in a nonstandard location via $LIBS, and we really want
11161 cf_ncurses_SAVE="$LIBS"
11162 echo "$as_me:11162: checking for Gpm_Open in -lgpm" >&5
11163 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
11164 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
11165 echo $ECHO_N "(cached) $ECHO_C" >&6
11167 ac_check_lib_save_LIBS=$LIBS
11169 cat >conftest.$ac_ext <<_ACEOF
11170 #line 11170 "configure"
11171 #include "confdefs.h"
11173 /* Override any gcc2 internal prototype to avoid an error. */
11177 /* We use char because int might match the return type of a gcc2
11178 builtin and then its argument prototype would still apply. */
11188 rm -f conftest.$ac_objext conftest$ac_exeext
11189 if { (eval echo "$as_me:11189: \"$ac_link\"") >&5
11190 (eval $ac_link) 2>&5
11192 echo "$as_me:11192: \$? = $ac_status" >&5
11193 (exit $ac_status); } &&
11194 { ac_try='test -s conftest$ac_exeext'
11195 { (eval echo "$as_me:11195: \"$ac_try\"") >&5
11196 (eval $ac_try) 2>&5
11198 echo "$as_me:11198: \$? = $ac_status" >&5
11199 (exit $ac_status); }; }; then
11200 ac_cv_lib_gpm_Gpm_Open=yes
11202 echo "$as_me: failed program was:" >&5
11203 cat conftest.$ac_ext >&5
11204 ac_cv_lib_gpm_Gpm_Open=no
11206 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11207 LIBS=$ac_check_lib_save_LIBS
11209 echo "$as_me:11209: result: $ac_cv_lib_gpm_Gpm_Open" >&5
11210 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
11211 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
11212 echo "$as_me:11212: checking for initscr in -lgpm" >&5
11213 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
11214 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
11215 echo $ECHO_N "(cached) $ECHO_C" >&6
11217 ac_check_lib_save_LIBS=$LIBS
11219 cat >conftest.$ac_ext <<_ACEOF
11220 #line 11220 "configure"
11221 #include "confdefs.h"
11223 /* Override any gcc2 internal prototype to avoid an error. */
11227 /* We use char because int might match the return type of a gcc2
11228 builtin and then its argument prototype would still apply. */
11238 rm -f conftest.$ac_objext conftest$ac_exeext
11239 if { (eval echo "$as_me:11239: \"$ac_link\"") >&5
11240 (eval $ac_link) 2>&5
11242 echo "$as_me:11242: \$? = $ac_status" >&5
11243 (exit $ac_status); } &&
11244 { ac_try='test -s conftest$ac_exeext'
11245 { (eval echo "$as_me:11245: \"$ac_try\"") >&5
11246 (eval $ac_try) 2>&5
11248 echo "$as_me:11248: \$? = $ac_status" >&5
11249 (exit $ac_status); }; }; then
11250 ac_cv_lib_gpm_initscr=yes
11252 echo "$as_me: failed program was:" >&5
11253 cat conftest.$ac_ext >&5
11254 ac_cv_lib_gpm_initscr=no
11256 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11257 LIBS=$ac_check_lib_save_LIBS
11259 echo "$as_me:11259: result: $ac_cv_lib_gpm_initscr" >&5
11260 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
11261 if test $ac_cv_lib_gpm_initscr = yes; then
11262 LIBS="$cf_ncurses_SAVE"
11264 cf_ncurses_LIBS="-lgpm"
11271 # This is only necessary if you are linking against an obsolete
11272 # version of ncurses (but it should do no harm, since it's static).
11273 if test "$cf_nculib_root" = ncurses ; then
11274 echo "$as_me:11274: checking for tgoto in -lmytinfo" >&5
11275 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
11276 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
11277 echo $ECHO_N "(cached) $ECHO_C" >&6
11279 ac_check_lib_save_LIBS=$LIBS
11280 LIBS="-lmytinfo $LIBS"
11281 cat >conftest.$ac_ext <<_ACEOF
11282 #line 11282 "configure"
11283 #include "confdefs.h"
11285 /* Override any gcc2 internal prototype to avoid an error. */
11289 /* We use char because int might match the return type of a gcc2
11290 builtin and then its argument prototype would still apply. */
11300 rm -f conftest.$ac_objext conftest$ac_exeext
11301 if { (eval echo "$as_me:11301: \"$ac_link\"") >&5
11302 (eval $ac_link) 2>&5
11304 echo "$as_me:11304: \$? = $ac_status" >&5
11305 (exit $ac_status); } &&
11306 { ac_try='test -s conftest$ac_exeext'
11307 { (eval echo "$as_me:11307: \"$ac_try\"") >&5
11308 (eval $ac_try) 2>&5
11310 echo "$as_me:11310: \$? = $ac_status" >&5
11311 (exit $ac_status); }; }; then
11312 ac_cv_lib_mytinfo_tgoto=yes
11314 echo "$as_me: failed program was:" >&5
11315 cat conftest.$ac_ext >&5
11316 ac_cv_lib_mytinfo_tgoto=no
11318 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11319 LIBS=$ac_check_lib_save_LIBS
11321 echo "$as_me:11321: result: $ac_cv_lib_mytinfo_tgoto" >&5
11322 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11323 if test $ac_cv_lib_mytinfo_tgoto = yes; then
11324 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
11331 cf_add_libs="$LIBS"
11334 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11335 # filter duplicates
11336 for cf_add_1lib in $cf_add_0lib; do
11337 for cf_add_2lib in $cf_add_libs; do
11338 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11343 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11345 LIBS="$cf_add_libs"
11347 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
11350 cf_add_libs="$LIBS"
11353 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11354 # filter duplicates
11355 for cf_add_1lib in $cf_add_0lib; do
11356 for cf_add_2lib in $cf_add_libs; do
11357 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11362 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11364 LIBS="$cf_add_libs"
11368 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
11370 echo "$as_me:11370: checking for initscr" >&5
11371 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
11372 if test "${ac_cv_func_initscr+set}" = set; then
11373 echo $ECHO_N "(cached) $ECHO_C" >&6
11375 cat >conftest.$ac_ext <<_ACEOF
11376 #line 11376 "configure"
11377 #include "confdefs.h"
11378 #define initscr autoconf_temporary
11379 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11386 /* We use char because int might match the return type of a gcc2
11387 builtin and then its argument prototype would still apply. */
11388 char initscr (void);
11394 /* The GNU C library defines stubs for functions which it implements
11395 to always fail with ENOSYS. Some functions are actually named
11396 something starting with __ and the normal name is an alias. */
11397 #if defined (__stub_initscr) || defined (__stub___initscr)
11398 #error found stub for initscr
11406 rm -f conftest.$ac_objext conftest$ac_exeext
11407 if { (eval echo "$as_me:11407: \"$ac_link\"") >&5
11408 (eval $ac_link) 2>&5
11410 echo "$as_me:11410: \$? = $ac_status" >&5
11411 (exit $ac_status); } &&
11412 { ac_try='test -s conftest$ac_exeext'
11413 { (eval echo "$as_me:11413: \"$ac_try\"") >&5
11414 (eval $ac_try) 2>&5
11416 echo "$as_me:11416: \$? = $ac_status" >&5
11417 (exit $ac_status); }; }; then
11418 ac_cv_func_initscr=yes
11420 echo "$as_me: failed program was:" >&5
11421 cat conftest.$ac_ext >&5
11422 ac_cv_func_initscr=no
11424 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11426 echo "$as_me:11426: result: $ac_cv_func_initscr" >&5
11427 echo "${ECHO_T}$ac_cv_func_initscr" >&6
11428 if test $ac_cv_func_initscr = yes; then
11429 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
11432 cf_save_LIBS="$LIBS"
11433 echo "$as_me:11433: checking for initscr in -l$cf_nculib_root" >&5
11434 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
11435 LIBS="-l$cf_nculib_root $LIBS"
11436 cat >conftest.$ac_ext <<_ACEOF
11437 #line 11437 "configure"
11438 #include "confdefs.h"
11439 #include <${cf_cv_ncurses_header:-curses.h}>
11448 rm -f conftest.$ac_objext conftest$ac_exeext
11449 if { (eval echo "$as_me:11449: \"$ac_link\"") >&5
11450 (eval $ac_link) 2>&5
11452 echo "$as_me:11452: \$? = $ac_status" >&5
11453 (exit $ac_status); } &&
11454 { ac_try='test -s conftest$ac_exeext'
11455 { (eval echo "$as_me:11455: \"$ac_try\"") >&5
11456 (eval $ac_try) 2>&5
11458 echo "$as_me:11458: \$? = $ac_status" >&5
11459 (exit $ac_status); }; }; then
11460 echo "$as_me:11460: result: yes" >&5
11461 echo "${ECHO_T}yes" >&6
11462 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
11465 echo "$as_me: failed program was:" >&5
11466 cat conftest.$ac_ext >&5
11467 echo "$as_me:11467: result: no" >&5
11468 echo "${ECHO_T}no" >&6
11471 cf_library_path_list=""
11472 if test -n "${LDFLAGS}${LIBS}" ; then
11473 for cf_library_path in $LDFLAGS $LIBS
11475 case $cf_library_path in
11477 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11479 test "x$cf_library_path" != "xNONE" && \
11480 test -d "$cf_library_path" && \
11482 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11483 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
11484 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11485 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11486 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11487 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"
11490 cf_library_path_list="$cf_library_path_list $cf_search"
11498 test "x$prefix" != "xNONE" && \
11499 test -d "$prefix" && \
11501 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11502 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
11503 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11504 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11505 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11506 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11509 for cf_subdir_prefix in \
11518 test "x$cf_subdir_prefix" != "x$prefix" && \
11519 test -d "$cf_subdir_prefix" && \
11520 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11521 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11522 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
11523 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11524 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11525 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11526 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"
11531 cf_search="$cf_library_path_list $cf_search"
11533 for cf_libdir in $cf_search
11535 echo "$as_me:11535: checking for -l$cf_nculib_root in $cf_libdir" >&5
11536 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11537 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11538 cat >conftest.$ac_ext <<_ACEOF
11539 #line 11539 "configure"
11540 #include "confdefs.h"
11541 #include <${cf_cv_ncurses_header:-curses.h}>
11550 rm -f conftest.$ac_objext conftest$ac_exeext
11551 if { (eval echo "$as_me:11551: \"$ac_link\"") >&5
11552 (eval $ac_link) 2>&5
11554 echo "$as_me:11554: \$? = $ac_status" >&5
11555 (exit $ac_status); } &&
11556 { ac_try='test -s conftest$ac_exeext'
11557 { (eval echo "$as_me:11557: \"$ac_try\"") >&5
11558 (eval $ac_try) 2>&5
11560 echo "$as_me:11560: \$? = $ac_status" >&5
11561 (exit $ac_status); }; }; then
11562 echo "$as_me:11562: result: yes" >&5
11563 echo "${ECHO_T}yes" >&6
11564 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
11567 echo "$as_me: failed program was:" >&5
11568 cat conftest.$ac_ext >&5
11569 echo "$as_me:11569: result: no" >&5
11570 echo "${ECHO_T}no" >&6
11571 LIBS="$cf_save_LIBS"
11573 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11577 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11581 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
11583 if test $cf_found_library = no ; then
11584 { { echo "$as_me:11584: error: Cannot link $cf_nculib_root library" >&5
11585 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11586 { (exit 1); exit 1; }; }
11591 if test -n "$cf_ncurses_LIBS" ; then
11592 echo "$as_me:11592: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11593 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11594 cf_ncurses_SAVE="$LIBS"
11595 for p in $cf_ncurses_LIBS ; do
11596 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
11597 if test "$q" != "$LIBS" ; then
11601 cat >conftest.$ac_ext <<_ACEOF
11602 #line 11602 "configure"
11603 #include "confdefs.h"
11604 #include <${cf_cv_ncurses_header:-curses.h}>
11608 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
11613 rm -f conftest.$ac_objext conftest$ac_exeext
11614 if { (eval echo "$as_me:11614: \"$ac_link\"") >&5
11615 (eval $ac_link) 2>&5
11617 echo "$as_me:11617: \$? = $ac_status" >&5
11618 (exit $ac_status); } &&
11619 { ac_try='test -s conftest$ac_exeext'
11620 { (eval echo "$as_me:11620: \"$ac_try\"") >&5
11621 (eval $ac_try) 2>&5
11623 echo "$as_me:11623: \$? = $ac_status" >&5
11624 (exit $ac_status); }; }; then
11625 echo "$as_me:11625: result: yes" >&5
11626 echo "${ECHO_T}yes" >&6
11628 echo "$as_me: failed program was:" >&5
11629 cat conftest.$ac_ext >&5
11630 echo "$as_me:11630: result: no" >&5
11631 echo "${ECHO_T}no" >&6
11632 LIBS="$cf_ncurses_SAVE"
11634 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11637 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11639 cat >>confdefs.h <<EOF
11640 #define $cf_nculib_ROOT 1
11645 NCURSES_CONFIG=none
11650 echo "$as_me:11650: checking for X" >&5
11651 echo $ECHO_N "checking for X... $ECHO_C" >&6
11653 # Check whether --with-x or --without-x was given.
11654 if test "${with_x+set}" = set; then
11658 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
11659 if test "x$with_x" = xno; then
11660 # The user explicitly disabled X.
11663 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
11664 # Both variables are already set.
11667 if test "${ac_cv_have_x+set}" = set; then
11668 echo $ECHO_N "(cached) $ECHO_C" >&6
11670 # One or both of the vars are not set, and there is no cached value.
11671 ac_x_includes=no ac_x_libraries=no
11672 rm -fr conftest.dir
11673 if mkdir conftest.dir; then
11675 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
11676 cat >Imakefile <<'EOF'
11678 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
11680 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
11681 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
11682 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
11683 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
11684 for ac_extension in a so sl dylib dll; do
11685 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
11686 test -f $ac_im_libdir/libX11.$ac_extension; then
11687 ac_im_usrlibdir=$ac_im_libdir; break
11690 # Screen out bogus values from the imake configuration. They are
11691 # bogus both because they are the default anyway, and because
11692 # using them would break gcc on systems where it needs fixed includes.
11693 case $ac_im_incroot in
11695 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
11697 case $ac_im_usrlibdir in
11698 /usr/lib | /lib) ;;
11699 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
11703 rm -fr conftest.dir
11706 # Standard set of common directories for X headers.
11707 # Check X11 before X11Rn because it is often a symlink to the current release.
11724 /usr/local/X11/include
11725 /usr/local/X11R7/include
11726 /usr/local/X11R6/include
11727 /usr/local/X11R5/include
11728 /usr/local/X11R4/include
11730 /usr/local/include/X11
11731 /usr/local/include/X11R7
11732 /usr/local/include/X11R6
11733 /usr/local/include/X11R5
11734 /usr/local/include/X11R4
11738 /usr/XFree86/include/X11
11742 /usr/unsupported/include
11743 /usr/athena/include
11744 /usr/local/x11r5/include
11745 /usr/lpp/Xamples/include
11747 /usr/openwin/include
11748 /usr/openwin/share/include'
11750 if test "$ac_x_includes" = no; then
11751 # Guess where to find include files, by looking for Intrinsic.h.
11752 # First, try using that file with no special directory specified.
11753 cat >conftest.$ac_ext <<_ACEOF
11754 #line 11754 "configure"
11755 #include "confdefs.h"
11756 #include <X11/Intrinsic.h>
11758 if { (eval echo "$as_me:11758: \"$ac_cpp conftest.$ac_ext\"") >&5
11759 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11761 egrep -v '^ *\+' conftest.er1 >conftest.err
11763 cat conftest.err >&5
11764 echo "$as_me:11764: \$? = $ac_status" >&5
11765 (exit $ac_status); } >/dev/null; then
11766 if test -s conftest.err; then
11767 ac_cpp_err=$ac_c_preproc_warn_flag
11774 if test -z "$ac_cpp_err"; then
11775 # We can compile using X headers with no special include directory.
11778 echo "$as_me: failed program was:" >&5
11779 cat conftest.$ac_ext >&5
11780 for ac_dir in $ac_x_header_dirs; do
11781 if test -r "$ac_dir/X11/Intrinsic.h"; then
11782 ac_x_includes=$ac_dir
11787 rm -f conftest.err conftest.$ac_ext
11788 fi # $ac_x_includes = no
11790 if test "$ac_x_libraries" = no; then
11791 # Check for the libraries.
11792 # See if we find them without any special options.
11793 # Don't add to $LIBS permanently.
11796 cat >conftest.$ac_ext <<_ACEOF
11797 #line 11797 "configure"
11798 #include "confdefs.h"
11799 #include <X11/Intrinsic.h>
11808 rm -f conftest.$ac_objext conftest$ac_exeext
11809 if { (eval echo "$as_me:11809: \"$ac_link\"") >&5
11810 (eval $ac_link) 2>&5
11812 echo "$as_me:11812: \$? = $ac_status" >&5
11813 (exit $ac_status); } &&
11814 { ac_try='test -s conftest$ac_exeext'
11815 { (eval echo "$as_me:11815: \"$ac_try\"") >&5
11816 (eval $ac_try) 2>&5
11818 echo "$as_me:11818: \$? = $ac_status" >&5
11819 (exit $ac_status); }; }; then
11821 # We can link X programs with no special library path.
11824 echo "$as_me: failed program was:" >&5
11825 cat conftest.$ac_ext >&5
11827 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
11829 # Don't even attempt the hair of trying to link an X program!
11830 for ac_extension in a so sl dylib dll; do
11831 if test -r $ac_dir/libXt.$ac_extension; then
11832 ac_x_libraries=$ac_dir
11838 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11839 fi # $ac_x_libraries = no
11841 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
11842 # Didn't find X anywhere. Cache the known absence of X.
11843 ac_cv_have_x="have_x=no"
11845 # Record where we found X for the cache.
11846 ac_cv_have_x="have_x=yes \
11847 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
11852 eval "$ac_cv_have_x"
11855 if test "$have_x" != yes; then
11856 echo "$as_me:11856: result: $have_x" >&5
11857 echo "${ECHO_T}$have_x" >&6
11860 # If each of the values was on the command line, it overrides each guess.
11861 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
11862 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
11863 # Update the cache value to reflect the command line values.
11864 ac_cv_have_x="have_x=yes \
11865 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
11866 echo "$as_me:11866: result: libraries $x_libraries, headers $x_includes" >&5
11867 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
11870 if test "$no_x" = yes; then
11871 # Not all programs may use this symbol, but it does not hurt to define it.
11873 cat >>confdefs.h <<\EOF
11874 #define X_DISPLAY_MISSING 1
11877 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
11879 if test -n "$x_includes"; then
11880 X_CFLAGS="$X_CFLAGS -I$x_includes"
11883 # It would also be nice to do this for all -L options, not just this one.
11884 if test -n "$x_libraries"; then
11885 X_LIBS="$X_LIBS -L$x_libraries"
11886 # For Solaris; some versions of Sun CC require a space after -R and
11887 # others require no space. Words are not sufficient . . . .
11888 case `(uname -sr) 2>/dev/null` in
11890 echo "$as_me:11890: checking whether -R must be followed by a space" >&5
11891 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
11892 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
11893 cat >conftest.$ac_ext <<_ACEOF
11894 #line 11894 "configure"
11895 #include "confdefs.h"
11905 rm -f conftest.$ac_objext conftest$ac_exeext
11906 if { (eval echo "$as_me:11906: \"$ac_link\"") >&5
11907 (eval $ac_link) 2>&5
11909 echo "$as_me:11909: \$? = $ac_status" >&5
11910 (exit $ac_status); } &&
11911 { ac_try='test -s conftest$ac_exeext'
11912 { (eval echo "$as_me:11912: \"$ac_try\"") >&5
11913 (eval $ac_try) 2>&5
11915 echo "$as_me:11915: \$? = $ac_status" >&5
11916 (exit $ac_status); }; }; then
11919 echo "$as_me: failed program was:" >&5
11920 cat conftest.$ac_ext >&5
11923 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11924 if test $ac_R_nospace = yes; then
11925 echo "$as_me:11925: result: no" >&5
11926 echo "${ECHO_T}no" >&6
11927 X_LIBS="$X_LIBS -R$x_libraries"
11929 LIBS="$ac_xsave_LIBS -R $x_libraries"
11930 cat >conftest.$ac_ext <<_ACEOF
11931 #line 11931 "configure"
11932 #include "confdefs.h"
11942 rm -f conftest.$ac_objext conftest$ac_exeext
11943 if { (eval echo "$as_me:11943: \"$ac_link\"") >&5
11944 (eval $ac_link) 2>&5
11946 echo "$as_me:11946: \$? = $ac_status" >&5
11947 (exit $ac_status); } &&
11948 { ac_try='test -s conftest$ac_exeext'
11949 { (eval echo "$as_me:11949: \"$ac_try\"") >&5
11950 (eval $ac_try) 2>&5
11952 echo "$as_me:11952: \$? = $ac_status" >&5
11953 (exit $ac_status); }; }; then
11956 echo "$as_me: failed program was:" >&5
11957 cat conftest.$ac_ext >&5
11960 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11961 if test $ac_R_space = yes; then
11962 echo "$as_me:11962: result: yes" >&5
11963 echo "${ECHO_T}yes" >&6
11964 X_LIBS="$X_LIBS -R $x_libraries"
11966 echo "$as_me:11966: result: neither works" >&5
11967 echo "${ECHO_T}neither works" >&6
11970 LIBS=$ac_xsave_LIBS
11974 # Check for system-dependent libraries X programs must link with.
11975 # Do this before checking for the system-independent R6 libraries
11976 # (-lICE), since we may need -lsocket or whatever for X linking.
11978 if test "$ISC" = yes; then
11979 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
11981 # Martyn Johnson says this is needed for Ultrix, if the X
11982 # libraries were built with DECnet support. And Karl Berry says
11983 # the Alpha needs dnet_stub (dnet does not exist).
11984 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
11985 cat >conftest.$ac_ext <<_ACEOF
11986 #line 11986 "configure"
11987 #include "confdefs.h"
11989 /* Override any gcc2 internal prototype to avoid an error. */
11993 /* We use char because int might match the return type of a gcc2
11994 builtin and then its argument prototype would still apply. */
11995 char XOpenDisplay ();
12004 rm -f conftest.$ac_objext conftest$ac_exeext
12005 if { (eval echo "$as_me:12005: \"$ac_link\"") >&5
12006 (eval $ac_link) 2>&5
12008 echo "$as_me:12008: \$? = $ac_status" >&5
12009 (exit $ac_status); } &&
12010 { ac_try='test -s conftest$ac_exeext'
12011 { (eval echo "$as_me:12011: \"$ac_try\"") >&5
12012 (eval $ac_try) 2>&5
12014 echo "$as_me:12014: \$? = $ac_status" >&5
12015 (exit $ac_status); }; }; then
12018 echo "$as_me: failed program was:" >&5
12019 cat conftest.$ac_ext >&5
12020 echo "$as_me:12020: checking for dnet_ntoa in -ldnet" >&5
12021 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
12022 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
12023 echo $ECHO_N "(cached) $ECHO_C" >&6
12025 ac_check_lib_save_LIBS=$LIBS
12026 LIBS="-ldnet $LIBS"
12027 cat >conftest.$ac_ext <<_ACEOF
12028 #line 12028 "configure"
12029 #include "confdefs.h"
12031 /* Override any gcc2 internal prototype to avoid an error. */
12035 /* We use char because int might match the return type of a gcc2
12036 builtin and then its argument prototype would still apply. */
12046 rm -f conftest.$ac_objext conftest$ac_exeext
12047 if { (eval echo "$as_me:12047: \"$ac_link\"") >&5
12048 (eval $ac_link) 2>&5
12050 echo "$as_me:12050: \$? = $ac_status" >&5
12051 (exit $ac_status); } &&
12052 { ac_try='test -s conftest$ac_exeext'
12053 { (eval echo "$as_me:12053: \"$ac_try\"") >&5
12054 (eval $ac_try) 2>&5
12056 echo "$as_me:12056: \$? = $ac_status" >&5
12057 (exit $ac_status); }; }; then
12058 ac_cv_lib_dnet_dnet_ntoa=yes
12060 echo "$as_me: failed program was:" >&5
12061 cat conftest.$ac_ext >&5
12062 ac_cv_lib_dnet_dnet_ntoa=no
12064 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12065 LIBS=$ac_check_lib_save_LIBS
12067 echo "$as_me:12067: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
12068 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
12069 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
12070 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
12073 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
12074 echo "$as_me:12074: checking for dnet_ntoa in -ldnet_stub" >&5
12075 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
12076 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
12077 echo $ECHO_N "(cached) $ECHO_C" >&6
12079 ac_check_lib_save_LIBS=$LIBS
12080 LIBS="-ldnet_stub $LIBS"
12081 cat >conftest.$ac_ext <<_ACEOF
12082 #line 12082 "configure"
12083 #include "confdefs.h"
12085 /* Override any gcc2 internal prototype to avoid an error. */
12089 /* We use char because int might match the return type of a gcc2
12090 builtin and then its argument prototype would still apply. */
12100 rm -f conftest.$ac_objext conftest$ac_exeext
12101 if { (eval echo "$as_me:12101: \"$ac_link\"") >&5
12102 (eval $ac_link) 2>&5
12104 echo "$as_me:12104: \$? = $ac_status" >&5
12105 (exit $ac_status); } &&
12106 { ac_try='test -s conftest$ac_exeext'
12107 { (eval echo "$as_me:12107: \"$ac_try\"") >&5
12108 (eval $ac_try) 2>&5
12110 echo "$as_me:12110: \$? = $ac_status" >&5
12111 (exit $ac_status); }; }; then
12112 ac_cv_lib_dnet_stub_dnet_ntoa=yes
12114 echo "$as_me: failed program was:" >&5
12115 cat conftest.$ac_ext >&5
12116 ac_cv_lib_dnet_stub_dnet_ntoa=no
12118 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12119 LIBS=$ac_check_lib_save_LIBS
12121 echo "$as_me:12121: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
12122 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
12123 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
12124 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
12129 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12130 LIBS="$ac_xsave_LIBS"
12132 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
12133 # to get the SysV transport functions.
12134 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
12136 # The nsl library prevents programs from opening the X display
12137 # on Irix 5.2, according to T.E. Dickey.
12138 # The functions gethostbyname, getservbyname, and inet_addr are
12139 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
12140 echo "$as_me:12140: checking for gethostbyname" >&5
12141 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
12142 if test "${ac_cv_func_gethostbyname+set}" = set; then
12143 echo $ECHO_N "(cached) $ECHO_C" >&6
12145 cat >conftest.$ac_ext <<_ACEOF
12146 #line 12146 "configure"
12147 #include "confdefs.h"
12148 #define gethostbyname autoconf_temporary
12149 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12150 #undef gethostbyname
12156 /* We use char because int might match the return type of a gcc2
12157 builtin and then its argument prototype would still apply. */
12158 char gethostbyname (void);
12164 /* The GNU C library defines stubs for functions which it implements
12165 to always fail with ENOSYS. Some functions are actually named
12166 something starting with __ and the normal name is an alias. */
12167 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
12168 #error found stub for gethostbyname
12171 return gethostbyname ();
12176 rm -f conftest.$ac_objext conftest$ac_exeext
12177 if { (eval echo "$as_me:12177: \"$ac_link\"") >&5
12178 (eval $ac_link) 2>&5
12180 echo "$as_me:12180: \$? = $ac_status" >&5
12181 (exit $ac_status); } &&
12182 { ac_try='test -s conftest$ac_exeext'
12183 { (eval echo "$as_me:12183: \"$ac_try\"") >&5
12184 (eval $ac_try) 2>&5
12186 echo "$as_me:12186: \$? = $ac_status" >&5
12187 (exit $ac_status); }; }; then
12188 ac_cv_func_gethostbyname=yes
12190 echo "$as_me: failed program was:" >&5
12191 cat conftest.$ac_ext >&5
12192 ac_cv_func_gethostbyname=no
12194 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12196 echo "$as_me:12196: result: $ac_cv_func_gethostbyname" >&5
12197 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
12199 if test $ac_cv_func_gethostbyname = no; then
12200 echo "$as_me:12200: checking for gethostbyname in -lnsl" >&5
12201 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
12202 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
12203 echo $ECHO_N "(cached) $ECHO_C" >&6
12205 ac_check_lib_save_LIBS=$LIBS
12207 cat >conftest.$ac_ext <<_ACEOF
12208 #line 12208 "configure"
12209 #include "confdefs.h"
12211 /* Override any gcc2 internal prototype to avoid an error. */
12215 /* We use char because int might match the return type of a gcc2
12216 builtin and then its argument prototype would still apply. */
12217 char gethostbyname ();
12226 rm -f conftest.$ac_objext conftest$ac_exeext
12227 if { (eval echo "$as_me:12227: \"$ac_link\"") >&5
12228 (eval $ac_link) 2>&5
12230 echo "$as_me:12230: \$? = $ac_status" >&5
12231 (exit $ac_status); } &&
12232 { ac_try='test -s conftest$ac_exeext'
12233 { (eval echo "$as_me:12233: \"$ac_try\"") >&5
12234 (eval $ac_try) 2>&5
12236 echo "$as_me:12236: \$? = $ac_status" >&5
12237 (exit $ac_status); }; }; then
12238 ac_cv_lib_nsl_gethostbyname=yes
12240 echo "$as_me: failed program was:" >&5
12241 cat conftest.$ac_ext >&5
12242 ac_cv_lib_nsl_gethostbyname=no
12244 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12245 LIBS=$ac_check_lib_save_LIBS
12247 echo "$as_me:12247: result: $ac_cv_lib_nsl_gethostbyname" >&5
12248 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
12249 if test $ac_cv_lib_nsl_gethostbyname = yes; then
12250 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
12253 if test $ac_cv_lib_nsl_gethostbyname = no; then
12254 echo "$as_me:12254: checking for gethostbyname in -lbsd" >&5
12255 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
12256 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
12257 echo $ECHO_N "(cached) $ECHO_C" >&6
12259 ac_check_lib_save_LIBS=$LIBS
12261 cat >conftest.$ac_ext <<_ACEOF
12262 #line 12262 "configure"
12263 #include "confdefs.h"
12265 /* Override any gcc2 internal prototype to avoid an error. */
12269 /* We use char because int might match the return type of a gcc2
12270 builtin and then its argument prototype would still apply. */
12271 char gethostbyname ();
12280 rm -f conftest.$ac_objext conftest$ac_exeext
12281 if { (eval echo "$as_me:12281: \"$ac_link\"") >&5
12282 (eval $ac_link) 2>&5
12284 echo "$as_me:12284: \$? = $ac_status" >&5
12285 (exit $ac_status); } &&
12286 { ac_try='test -s conftest$ac_exeext'
12287 { (eval echo "$as_me:12287: \"$ac_try\"") >&5
12288 (eval $ac_try) 2>&5
12290 echo "$as_me:12290: \$? = $ac_status" >&5
12291 (exit $ac_status); }; }; then
12292 ac_cv_lib_bsd_gethostbyname=yes
12294 echo "$as_me: failed program was:" >&5
12295 cat conftest.$ac_ext >&5
12296 ac_cv_lib_bsd_gethostbyname=no
12298 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12299 LIBS=$ac_check_lib_save_LIBS
12301 echo "$as_me:12301: result: $ac_cv_lib_bsd_gethostbyname" >&5
12302 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
12303 if test $ac_cv_lib_bsd_gethostbyname = yes; then
12304 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
12310 # lieder@skyler.mavd.honeywell.com says without -lsocket,
12311 # socket/setsockopt and other routines are undefined under SCO ODT
12312 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
12313 # on later versions), says Simon Leinen: it contains gethostby*
12314 # variants that don't use the nameserver (or something). -lsocket
12315 # must be given before -lnsl if both are needed. We assume that
12316 # if connect needs -lnsl, so does gethostbyname.
12317 echo "$as_me:12317: checking for connect" >&5
12318 echo $ECHO_N "checking for connect... $ECHO_C" >&6
12319 if test "${ac_cv_func_connect+set}" = set; then
12320 echo $ECHO_N "(cached) $ECHO_C" >&6
12322 cat >conftest.$ac_ext <<_ACEOF
12323 #line 12323 "configure"
12324 #include "confdefs.h"
12325 #define connect autoconf_temporary
12326 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12333 /* We use char because int might match the return type of a gcc2
12334 builtin and then its argument prototype would still apply. */
12335 char connect (void);
12341 /* The GNU C library defines stubs for functions which it implements
12342 to always fail with ENOSYS. Some functions are actually named
12343 something starting with __ and the normal name is an alias. */
12344 #if defined (__stub_connect) || defined (__stub___connect)
12345 #error found stub for connect
12353 rm -f conftest.$ac_objext conftest$ac_exeext
12354 if { (eval echo "$as_me:12354: \"$ac_link\"") >&5
12355 (eval $ac_link) 2>&5
12357 echo "$as_me:12357: \$? = $ac_status" >&5
12358 (exit $ac_status); } &&
12359 { ac_try='test -s conftest$ac_exeext'
12360 { (eval echo "$as_me:12360: \"$ac_try\"") >&5
12361 (eval $ac_try) 2>&5
12363 echo "$as_me:12363: \$? = $ac_status" >&5
12364 (exit $ac_status); }; }; then
12365 ac_cv_func_connect=yes
12367 echo "$as_me: failed program was:" >&5
12368 cat conftest.$ac_ext >&5
12369 ac_cv_func_connect=no
12371 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12373 echo "$as_me:12373: result: $ac_cv_func_connect" >&5
12374 echo "${ECHO_T}$ac_cv_func_connect" >&6
12376 if test $ac_cv_func_connect = no; then
12377 echo "$as_me:12377: checking for connect in -lsocket" >&5
12378 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
12379 if test "${ac_cv_lib_socket_connect+set}" = set; then
12380 echo $ECHO_N "(cached) $ECHO_C" >&6
12382 ac_check_lib_save_LIBS=$LIBS
12383 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
12384 cat >conftest.$ac_ext <<_ACEOF
12385 #line 12385 "configure"
12386 #include "confdefs.h"
12388 /* Override any gcc2 internal prototype to avoid an error. */
12392 /* We use char because int might match the return type of a gcc2
12393 builtin and then its argument prototype would still apply. */
12403 rm -f conftest.$ac_objext conftest$ac_exeext
12404 if { (eval echo "$as_me:12404: \"$ac_link\"") >&5
12405 (eval $ac_link) 2>&5
12407 echo "$as_me:12407: \$? = $ac_status" >&5
12408 (exit $ac_status); } &&
12409 { ac_try='test -s conftest$ac_exeext'
12410 { (eval echo "$as_me:12410: \"$ac_try\"") >&5
12411 (eval $ac_try) 2>&5
12413 echo "$as_me:12413: \$? = $ac_status" >&5
12414 (exit $ac_status); }; }; then
12415 ac_cv_lib_socket_connect=yes
12417 echo "$as_me: failed program was:" >&5
12418 cat conftest.$ac_ext >&5
12419 ac_cv_lib_socket_connect=no
12421 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12422 LIBS=$ac_check_lib_save_LIBS
12424 echo "$as_me:12424: result: $ac_cv_lib_socket_connect" >&5
12425 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
12426 if test $ac_cv_lib_socket_connect = yes; then
12427 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
12432 # Guillermo Gomez says -lposix is necessary on A/UX.
12433 echo "$as_me:12433: checking for remove" >&5
12434 echo $ECHO_N "checking for remove... $ECHO_C" >&6
12435 if test "${ac_cv_func_remove+set}" = set; then
12436 echo $ECHO_N "(cached) $ECHO_C" >&6
12438 cat >conftest.$ac_ext <<_ACEOF
12439 #line 12439 "configure"
12440 #include "confdefs.h"
12441 #define remove autoconf_temporary
12442 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12449 /* We use char because int might match the return type of a gcc2
12450 builtin and then its argument prototype would still apply. */
12451 char remove (void);
12457 /* The GNU C library defines stubs for functions which it implements
12458 to always fail with ENOSYS. Some functions are actually named
12459 something starting with __ and the normal name is an alias. */
12460 #if defined (__stub_remove) || defined (__stub___remove)
12461 #error found stub for remove
12469 rm -f conftest.$ac_objext conftest$ac_exeext
12470 if { (eval echo "$as_me:12470: \"$ac_link\"") >&5
12471 (eval $ac_link) 2>&5
12473 echo "$as_me:12473: \$? = $ac_status" >&5
12474 (exit $ac_status); } &&
12475 { ac_try='test -s conftest$ac_exeext'
12476 { (eval echo "$as_me:12476: \"$ac_try\"") >&5
12477 (eval $ac_try) 2>&5
12479 echo "$as_me:12479: \$? = $ac_status" >&5
12480 (exit $ac_status); }; }; then
12481 ac_cv_func_remove=yes
12483 echo "$as_me: failed program was:" >&5
12484 cat conftest.$ac_ext >&5
12485 ac_cv_func_remove=no
12487 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12489 echo "$as_me:12489: result: $ac_cv_func_remove" >&5
12490 echo "${ECHO_T}$ac_cv_func_remove" >&6
12492 if test $ac_cv_func_remove = no; then
12493 echo "$as_me:12493: checking for remove in -lposix" >&5
12494 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
12495 if test "${ac_cv_lib_posix_remove+set}" = set; then
12496 echo $ECHO_N "(cached) $ECHO_C" >&6
12498 ac_check_lib_save_LIBS=$LIBS
12499 LIBS="-lposix $LIBS"
12500 cat >conftest.$ac_ext <<_ACEOF
12501 #line 12501 "configure"
12502 #include "confdefs.h"
12504 /* Override any gcc2 internal prototype to avoid an error. */
12508 /* We use char because int might match the return type of a gcc2
12509 builtin and then its argument prototype would still apply. */
12519 rm -f conftest.$ac_objext conftest$ac_exeext
12520 if { (eval echo "$as_me:12520: \"$ac_link\"") >&5
12521 (eval $ac_link) 2>&5
12523 echo "$as_me:12523: \$? = $ac_status" >&5
12524 (exit $ac_status); } &&
12525 { ac_try='test -s conftest$ac_exeext'
12526 { (eval echo "$as_me:12526: \"$ac_try\"") >&5
12527 (eval $ac_try) 2>&5
12529 echo "$as_me:12529: \$? = $ac_status" >&5
12530 (exit $ac_status); }; }; then
12531 ac_cv_lib_posix_remove=yes
12533 echo "$as_me: failed program was:" >&5
12534 cat conftest.$ac_ext >&5
12535 ac_cv_lib_posix_remove=no
12537 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12538 LIBS=$ac_check_lib_save_LIBS
12540 echo "$as_me:12540: result: $ac_cv_lib_posix_remove" >&5
12541 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
12542 if test $ac_cv_lib_posix_remove = yes; then
12543 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
12548 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
12549 echo "$as_me:12549: checking for shmat" >&5
12550 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
12551 if test "${ac_cv_func_shmat+set}" = set; then
12552 echo $ECHO_N "(cached) $ECHO_C" >&6
12554 cat >conftest.$ac_ext <<_ACEOF
12555 #line 12555 "configure"
12556 #include "confdefs.h"
12557 #define shmat autoconf_temporary
12558 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12565 /* We use char because int might match the return type of a gcc2
12566 builtin and then its argument prototype would still apply. */
12573 /* The GNU C library defines stubs for functions which it implements
12574 to always fail with ENOSYS. Some functions are actually named
12575 something starting with __ and the normal name is an alias. */
12576 #if defined (__stub_shmat) || defined (__stub___shmat)
12577 #error found stub for shmat
12585 rm -f conftest.$ac_objext conftest$ac_exeext
12586 if { (eval echo "$as_me:12586: \"$ac_link\"") >&5
12587 (eval $ac_link) 2>&5
12589 echo "$as_me:12589: \$? = $ac_status" >&5
12590 (exit $ac_status); } &&
12591 { ac_try='test -s conftest$ac_exeext'
12592 { (eval echo "$as_me:12592: \"$ac_try\"") >&5
12593 (eval $ac_try) 2>&5
12595 echo "$as_me:12595: \$? = $ac_status" >&5
12596 (exit $ac_status); }; }; then
12597 ac_cv_func_shmat=yes
12599 echo "$as_me: failed program was:" >&5
12600 cat conftest.$ac_ext >&5
12601 ac_cv_func_shmat=no
12603 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12605 echo "$as_me:12605: result: $ac_cv_func_shmat" >&5
12606 echo "${ECHO_T}$ac_cv_func_shmat" >&6
12608 if test $ac_cv_func_shmat = no; then
12609 echo "$as_me:12609: checking for shmat in -lipc" >&5
12610 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
12611 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
12612 echo $ECHO_N "(cached) $ECHO_C" >&6
12614 ac_check_lib_save_LIBS=$LIBS
12616 cat >conftest.$ac_ext <<_ACEOF
12617 #line 12617 "configure"
12618 #include "confdefs.h"
12620 /* Override any gcc2 internal prototype to avoid an error. */
12624 /* We use char because int might match the return type of a gcc2
12625 builtin and then its argument prototype would still apply. */
12635 rm -f conftest.$ac_objext conftest$ac_exeext
12636 if { (eval echo "$as_me:12636: \"$ac_link\"") >&5
12637 (eval $ac_link) 2>&5
12639 echo "$as_me:12639: \$? = $ac_status" >&5
12640 (exit $ac_status); } &&
12641 { ac_try='test -s conftest$ac_exeext'
12642 { (eval echo "$as_me:12642: \"$ac_try\"") >&5
12643 (eval $ac_try) 2>&5
12645 echo "$as_me:12645: \$? = $ac_status" >&5
12646 (exit $ac_status); }; }; then
12647 ac_cv_lib_ipc_shmat=yes
12649 echo "$as_me: failed program was:" >&5
12650 cat conftest.$ac_ext >&5
12651 ac_cv_lib_ipc_shmat=no
12653 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12654 LIBS=$ac_check_lib_save_LIBS
12656 echo "$as_me:12656: result: $ac_cv_lib_ipc_shmat" >&5
12657 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
12658 if test $ac_cv_lib_ipc_shmat = yes; then
12659 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
12665 # Check for libraries that X11R6 Xt/Xaw programs need.
12666 ac_save_LDFLAGS=$LDFLAGS
12667 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
12668 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
12669 # check for ICE first), but we must link in the order -lSM -lICE or
12670 # we get undefined symbols. So assume we have SM if we have ICE.
12671 # These have to be linked with before -lX11, unlike the other
12672 # libraries we check for below, so use a different variable.
12673 # John Interrante, Karl Berry
12674 echo "$as_me:12674: checking for IceConnectionNumber in -lICE" >&5
12675 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
12676 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
12677 echo $ECHO_N "(cached) $ECHO_C" >&6
12679 ac_check_lib_save_LIBS=$LIBS
12680 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
12681 cat >conftest.$ac_ext <<_ACEOF
12682 #line 12682 "configure"
12683 #include "confdefs.h"
12685 /* Override any gcc2 internal prototype to avoid an error. */
12689 /* We use char because int might match the return type of a gcc2
12690 builtin and then its argument prototype would still apply. */
12691 char IceConnectionNumber ();
12695 IceConnectionNumber ();
12700 rm -f conftest.$ac_objext conftest$ac_exeext
12701 if { (eval echo "$as_me:12701: \"$ac_link\"") >&5
12702 (eval $ac_link) 2>&5
12704 echo "$as_me:12704: \$? = $ac_status" >&5
12705 (exit $ac_status); } &&
12706 { ac_try='test -s conftest$ac_exeext'
12707 { (eval echo "$as_me:12707: \"$ac_try\"") >&5
12708 (eval $ac_try) 2>&5
12710 echo "$as_me:12710: \$? = $ac_status" >&5
12711 (exit $ac_status); }; }; then
12712 ac_cv_lib_ICE_IceConnectionNumber=yes
12714 echo "$as_me: failed program was:" >&5
12715 cat conftest.$ac_ext >&5
12716 ac_cv_lib_ICE_IceConnectionNumber=no
12718 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12719 LIBS=$ac_check_lib_save_LIBS
12721 echo "$as_me:12721: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
12722 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
12723 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
12724 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
12727 LDFLAGS=$ac_save_LDFLAGS
12731 cf_x_athena=${cf_x_athena:-Xaw}
12733 echo "$as_me:12733: checking if you want to link with Xaw 3d library" >&5
12734 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
12737 # Check whether --with-Xaw3d or --without-Xaw3d was given.
12738 if test "${with_Xaw3d+set}" = set; then
12739 withval="$with_Xaw3d"
12742 if test "$withval" = yes ; then
12744 echo "$as_me:12744: result: yes" >&5
12745 echo "${ECHO_T}yes" >&6
12747 echo "$as_me:12747: result: no" >&5
12748 echo "${ECHO_T}no" >&6
12751 echo "$as_me:12751: checking if you want to link with Xaw 3d xft library" >&5
12752 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
12755 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
12756 if test "${with_Xaw3dxft+set}" = set; then
12757 withval="$with_Xaw3dxft"
12760 if test "$withval" = yes ; then
12761 cf_x_athena=Xaw3dxft
12762 echo "$as_me:12762: result: yes" >&5
12763 echo "${ECHO_T}yes" >&6
12765 echo "$as_me:12765: result: no" >&5
12766 echo "${ECHO_T}no" >&6
12769 echo "$as_me:12769: checking if you want to link with neXT Athena library" >&5
12770 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
12773 # Check whether --with-neXtaw or --without-neXtaw was given.
12774 if test "${with_neXtaw+set}" = set; then
12775 withval="$with_neXtaw"
12778 if test "$withval" = yes ; then
12780 echo "$as_me:12780: result: yes" >&5
12781 echo "${ECHO_T}yes" >&6
12783 echo "$as_me:12783: result: no" >&5
12784 echo "${ECHO_T}no" >&6
12787 echo "$as_me:12787: checking if you want to link with Athena-Plus library" >&5
12788 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
12791 # Check whether --with-XawPlus or --without-XawPlus was given.
12792 if test "${with_XawPlus+set}" = set; then
12793 withval="$with_XawPlus"
12796 if test "$withval" = yes ; then
12797 cf_x_athena=XawPlus
12798 echo "$as_me:12798: result: yes" >&5
12799 echo "${ECHO_T}yes" >&6
12801 echo "$as_me:12801: result: no" >&5
12802 echo "${ECHO_T}no" >&6
12807 if test "$PKG_CONFIG" != none ; then
12809 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
12810 for cf_athena_pkg in \
12813 ${cf_x_athena}-devel \
12814 lib${cf_x_athena} \
12815 lib${cf_x_athena}-devel
12818 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
12819 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
12821 echo "${as_me:-configure}:12821: testing found package $cf_athena_pkg ..." 1>&5
12823 cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
12824 cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
12825 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
12827 echo "${as_me:-configure}:12827: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12829 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
12831 echo "${as_me:-configure}:12831: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
12836 cf_new_extra_cppflags=
12838 for cf_add_cflags in $cf_pkgconfig_incs
12840 case $cf_fix_cppflags in
12842 case $cf_add_cflags in
12843 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12844 case $cf_add_cflags in
12846 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12848 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12849 && test -z "${cf_tst_cflags}" \
12850 && cf_fix_cppflags=yes
12852 if test $cf_fix_cppflags = yes ; then
12854 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12855 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12858 elif test "${cf_tst_cflags}" = "\"'" ; then
12860 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12861 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12867 case "$CPPFLAGS" in
12871 case $cf_add_cflags in
12873 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12875 CPPFLAGS=`echo "$CPPFLAGS" | \
12876 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12877 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12882 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12883 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12890 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12891 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12898 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12899 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12901 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12903 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12904 && test -z "${cf_tst_cflags}" \
12905 && cf_fix_cppflags=no
12910 if test -n "$cf_new_cflags" ; then
12912 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12913 CFLAGS="${CFLAGS}$cf_new_cflags"
12917 if test -n "$cf_new_cppflags" ; then
12919 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12920 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12924 if test -n "$cf_new_extra_cppflags" ; then
12926 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12927 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12931 cf_add_libs="$LIBS"
12934 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12935 # filter duplicates
12936 for cf_add_1lib in $cf_add_0lib; do
12937 for cf_add_2lib in $cf_add_libs; do
12938 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12943 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12945 LIBS="$cf_add_libs"
12947 cf_x_athena_lib="$cf_pkgconfig_libs"
12949 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12951 cat >>confdefs.h <<EOF
12952 #define $cf_x_athena_LIBS 1
12955 for cf_trim_lib in Xmu Xt X11
12958 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
12959 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
12960 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
12962 echo "${as_me:-configure}:12962: testing ..trimmed $LIBS ..." 1>&5
12968 echo "$as_me:12968: checking for usable $cf_x_athena/Xmu package" >&5
12969 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
12970 if test "${cf_cv_xaw_compat+set}" = set; then
12971 echo $ECHO_N "(cached) $ECHO_C" >&6
12974 cat >conftest.$ac_ext <<_ACEOF
12975 #line 12975 "configure"
12976 #include "confdefs.h"
12978 #include <X11/Xmu/CharSet.h>
12984 int check = XmuCompareISOLatin1("big", "small");
12991 rm -f conftest.$ac_objext conftest$ac_exeext
12992 if { (eval echo "$as_me:12992: \"$ac_link\"") >&5
12993 (eval $ac_link) 2>&5
12995 echo "$as_me:12995: \$? = $ac_status" >&5
12996 (exit $ac_status); } &&
12997 { ac_try='test -s conftest$ac_exeext'
12998 { (eval echo "$as_me:12998: \"$ac_try\"") >&5
12999 (eval $ac_try) 2>&5
13001 echo "$as_me:13001: \$? = $ac_status" >&5
13002 (exit $ac_status); }; }; then
13003 cf_cv_xaw_compat=yes
13005 echo "$as_me: failed program was:" >&5
13006 cat conftest.$ac_ext >&5
13007 cf_cv_xaw_compat=no
13009 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13011 echo "$as_me:13011: result: $cf_cv_xaw_compat" >&5
13012 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
13014 if test "$cf_cv_xaw_compat" = no
13016 # workaround for broken ".pc" files...
13017 case "$cf_x_athena_lib" in
13021 test -n "$verbose" && echo " work around broken package" 1>&6
13023 echo "${as_me:-configure}:13023: testing work around broken package ..." 1>&5
13025 cf_save_xmu="$LIBS"
13026 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
13028 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
13029 test -n "$verbose" && echo " found package xmu" 1>&6
13031 echo "${as_me:-configure}:13031: testing found package xmu ..." 1>&5
13033 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
13034 cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`"
13035 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
13037 echo "${as_me:-configure}:13037: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13039 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
13041 echo "${as_me:-configure}:13041: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
13046 cf_new_extra_cppflags=
13048 for cf_add_cflags in $cf_pkgconfig_incs
13050 case $cf_fix_cppflags in
13052 case $cf_add_cflags in
13053 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13054 case $cf_add_cflags in
13056 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13058 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13059 && test -z "${cf_tst_cflags}" \
13060 && cf_fix_cppflags=yes
13062 if test $cf_fix_cppflags = yes ; then
13064 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13065 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13068 elif test "${cf_tst_cflags}" = "\"'" ; then
13070 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13071 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13077 case "$CPPFLAGS" in
13081 case $cf_add_cflags in
13083 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13085 CPPFLAGS=`echo "$CPPFLAGS" | \
13086 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13087 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13092 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13093 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13100 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13101 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13108 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13109 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13111 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13113 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13114 && test -z "${cf_tst_cflags}" \
13115 && cf_fix_cppflags=no
13120 if test -n "$cf_new_cflags" ; then
13122 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13123 CFLAGS="${CFLAGS}$cf_new_cflags"
13127 if test -n "$cf_new_cppflags" ; then
13129 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13130 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13134 if test -n "$cf_new_extra_cppflags" ; then
13136 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13137 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13141 cf_add_libs="$LIBS"
13144 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13145 # filter duplicates
13146 for cf_add_1lib in $cf_add_0lib; do
13147 for cf_add_2lib in $cf_add_libs; do
13148 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13153 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13155 LIBS="$cf_add_libs"
13157 LIBS="$cf_save_xmu"
13159 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13161 echo "${as_me:-configure}:13161: testing ...before $LIBS ..." 1>&5
13163 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
13164 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13166 echo "${as_me:-configure}:13166: testing ...after $LIBS ..." 1>&5
13172 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13174 echo "${as_me:-configure}:13174: testing ...before $LIBS ..." 1>&5
13176 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
13177 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13179 echo "${as_me:-configure}:13179: testing ...after $LIBS ..." 1>&5
13183 for cf_trim_lib in Xmu Xt X11
13186 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13187 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13188 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13190 echo "${as_me:-configure}:13190: testing ..trimmed $LIBS ..." 1>&5
13210 if test -z "$cf_x_athena_lib" ; then
13212 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
13213 test -n "$verbose" && echo " found package Xext" 1>&6
13215 echo "${as_me:-configure}:13215: testing found package Xext ..." 1>&5
13217 cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
13218 cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
13219 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
13221 echo "${as_me:-configure}:13221: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13223 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
13225 echo "${as_me:-configure}:13225: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
13230 cf_new_extra_cppflags=
13232 for cf_add_cflags in $cf_pkgconfig_incs
13234 case $cf_fix_cppflags in
13236 case $cf_add_cflags in
13237 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13238 case $cf_add_cflags in
13240 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13242 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13243 && test -z "${cf_tst_cflags}" \
13244 && cf_fix_cppflags=yes
13246 if test $cf_fix_cppflags = yes ; then
13248 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13249 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13252 elif test "${cf_tst_cflags}" = "\"'" ; then
13254 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13255 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13261 case "$CPPFLAGS" in
13265 case $cf_add_cflags in
13267 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13269 CPPFLAGS=`echo "$CPPFLAGS" | \
13270 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13271 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13276 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13277 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13284 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13285 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13292 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13293 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13295 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13297 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13298 && test -z "${cf_tst_cflags}" \
13299 && cf_fix_cppflags=no
13304 if test -n "$cf_new_cflags" ; then
13306 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13307 CFLAGS="${CFLAGS}$cf_new_cflags"
13311 if test -n "$cf_new_cppflags" ; then
13313 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13314 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13318 if test -n "$cf_new_extra_cppflags" ; then
13320 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13321 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13325 cf_add_libs="$LIBS"
13328 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13329 # filter duplicates
13330 for cf_add_1lib in $cf_add_0lib; do
13331 for cf_add_2lib in $cf_add_libs; do
13332 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13337 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13339 LIBS="$cf_add_libs"
13346 echo "$as_me:13346: checking for XextCreateExtension in -lXext" >&5
13347 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
13348 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
13349 echo $ECHO_N "(cached) $ECHO_C" >&6
13351 ac_check_lib_save_LIBS=$LIBS
13352 LIBS="-lXext $LIBS"
13353 cat >conftest.$ac_ext <<_ACEOF
13354 #line 13354 "configure"
13355 #include "confdefs.h"
13357 /* Override any gcc2 internal prototype to avoid an error. */
13361 /* We use char because int might match the return type of a gcc2
13362 builtin and then its argument prototype would still apply. */
13363 char XextCreateExtension ();
13367 XextCreateExtension ();
13372 rm -f conftest.$ac_objext conftest$ac_exeext
13373 if { (eval echo "$as_me:13373: \"$ac_link\"") >&5
13374 (eval $ac_link) 2>&5
13376 echo "$as_me:13376: \$? = $ac_status" >&5
13377 (exit $ac_status); } &&
13378 { ac_try='test -s conftest$ac_exeext'
13379 { (eval echo "$as_me:13379: \"$ac_try\"") >&5
13380 (eval $ac_try) 2>&5
13382 echo "$as_me:13382: \$? = $ac_status" >&5
13383 (exit $ac_status); }; }; then
13384 ac_cv_lib_Xext_XextCreateExtension=yes
13386 echo "$as_me: failed program was:" >&5
13387 cat conftest.$ac_ext >&5
13388 ac_cv_lib_Xext_XextCreateExtension=no
13390 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13391 LIBS=$ac_check_lib_save_LIBS
13393 echo "$as_me:13393: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
13394 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
13395 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
13397 cf_add_libs="$LIBS"
13400 for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13401 # filter duplicates
13402 for cf_add_1lib in $cf_add_0lib; do
13403 for cf_add_2lib in $cf_add_libs; do
13404 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13409 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13411 LIBS="$cf_add_libs"
13417 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
13418 # in some cases has installed dummy files in the former, other cases replaced
13419 # it with a link to the new location). This complicates the configure script.
13420 # Check for that pitfall, and recover using pkg-config
13422 # If none of these are set, the configuration is almost certainly broken.
13423 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
13426 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
13427 test -n "$verbose" && echo " found package x11" 1>&6
13429 echo "${as_me:-configure}:13429: testing found package x11 ..." 1>&5
13431 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
13432 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
13433 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
13435 echo "${as_me:-configure}:13435: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13437 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
13439 echo "${as_me:-configure}:13439: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
13444 cf_new_extra_cppflags=
13446 for cf_add_cflags in $cf_pkgconfig_incs
13448 case $cf_fix_cppflags in
13450 case $cf_add_cflags in
13451 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13452 case $cf_add_cflags in
13454 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13456 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13457 && test -z "${cf_tst_cflags}" \
13458 && cf_fix_cppflags=yes
13460 if test $cf_fix_cppflags = yes ; then
13462 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13463 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13466 elif test "${cf_tst_cflags}" = "\"'" ; then
13468 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13469 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13475 case "$CPPFLAGS" in
13479 case $cf_add_cflags in
13481 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13483 CPPFLAGS=`echo "$CPPFLAGS" | \
13484 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13485 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13490 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13491 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13498 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13499 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13506 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13507 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13509 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13511 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13512 && test -z "${cf_tst_cflags}" \
13513 && cf_fix_cppflags=no
13518 if test -n "$cf_new_cflags" ; then
13520 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13521 CFLAGS="${CFLAGS}$cf_new_cflags"
13525 if test -n "$cf_new_cppflags" ; then
13527 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13528 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13532 if test -n "$cf_new_extra_cppflags" ; then
13534 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13535 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13539 cf_add_libs="$LIBS"
13542 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13543 # filter duplicates
13544 for cf_add_1lib in $cf_add_0lib; do
13545 for cf_add_2lib in $cf_add_libs; do
13546 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13551 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13553 LIBS="$cf_add_libs"
13559 { echo "$as_me:13559: WARNING: unable to find X11 library" >&5
13560 echo "$as_me: WARNING: unable to find X11 library" >&2;}
13563 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
13564 test -n "$verbose" && echo " found package ice" 1>&6
13566 echo "${as_me:-configure}:13566: testing found package ice ..." 1>&5
13568 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
13569 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
13570 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
13572 echo "${as_me:-configure}:13572: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13574 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
13576 echo "${as_me:-configure}:13576: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
13581 cf_new_extra_cppflags=
13583 for cf_add_cflags in $cf_pkgconfig_incs
13585 case $cf_fix_cppflags in
13587 case $cf_add_cflags in
13588 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13589 case $cf_add_cflags in
13591 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13593 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13594 && test -z "${cf_tst_cflags}" \
13595 && cf_fix_cppflags=yes
13597 if test $cf_fix_cppflags = yes ; then
13599 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13600 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13603 elif test "${cf_tst_cflags}" = "\"'" ; then
13605 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13606 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13612 case "$CPPFLAGS" in
13616 case $cf_add_cflags in
13618 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13620 CPPFLAGS=`echo "$CPPFLAGS" | \
13621 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13622 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13627 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13628 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13635 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13636 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13643 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13644 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13646 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13648 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13649 && test -z "${cf_tst_cflags}" \
13650 && cf_fix_cppflags=no
13655 if test -n "$cf_new_cflags" ; then
13657 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13658 CFLAGS="${CFLAGS}$cf_new_cflags"
13662 if test -n "$cf_new_cppflags" ; then
13664 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13665 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13669 if test -n "$cf_new_extra_cppflags" ; then
13671 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13672 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13676 cf_add_libs="$LIBS"
13679 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13680 # filter duplicates
13681 for cf_add_1lib in $cf_add_0lib; do
13682 for cf_add_2lib in $cf_add_libs; do
13683 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13688 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13690 LIBS="$cf_add_libs"
13696 { echo "$as_me:13696: WARNING: unable to find ICE library" >&5
13697 echo "$as_me: WARNING: unable to find ICE library" >&2;}
13700 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
13701 test -n "$verbose" && echo " found package sm" 1>&6
13703 echo "${as_me:-configure}:13703: testing found package sm ..." 1>&5
13705 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
13706 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
13707 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
13709 echo "${as_me:-configure}:13709: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13711 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
13713 echo "${as_me:-configure}:13713: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
13718 cf_new_extra_cppflags=
13720 for cf_add_cflags in $cf_pkgconfig_incs
13722 case $cf_fix_cppflags in
13724 case $cf_add_cflags in
13725 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13726 case $cf_add_cflags in
13728 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13730 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13731 && test -z "${cf_tst_cflags}" \
13732 && cf_fix_cppflags=yes
13734 if test $cf_fix_cppflags = yes ; then
13736 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13737 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13740 elif test "${cf_tst_cflags}" = "\"'" ; then
13742 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13743 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13749 case "$CPPFLAGS" in
13753 case $cf_add_cflags in
13755 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13757 CPPFLAGS=`echo "$CPPFLAGS" | \
13758 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13759 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13764 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13765 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13772 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13773 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13780 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13781 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13783 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13785 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13786 && test -z "${cf_tst_cflags}" \
13787 && cf_fix_cppflags=no
13792 if test -n "$cf_new_cflags" ; then
13794 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13795 CFLAGS="${CFLAGS}$cf_new_cflags"
13799 if test -n "$cf_new_cppflags" ; then
13801 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13802 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13806 if test -n "$cf_new_extra_cppflags" ; then
13808 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13809 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13813 cf_add_libs="$LIBS"
13816 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13817 # filter duplicates
13818 for cf_add_1lib in $cf_add_0lib; do
13819 for cf_add_2lib in $cf_add_libs; do
13820 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13825 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13827 LIBS="$cf_add_libs"
13833 { echo "$as_me:13833: WARNING: unable to find SM library" >&5
13834 echo "$as_me: WARNING: unable to find SM library" >&2;}
13837 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
13838 test -n "$verbose" && echo " found package xt" 1>&6
13840 echo "${as_me:-configure}:13840: testing found package xt ..." 1>&5
13842 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
13843 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
13844 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13846 echo "${as_me:-configure}:13846: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13848 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
13850 echo "${as_me:-configure}:13850: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13855 cf_new_extra_cppflags=
13857 for cf_add_cflags in $cf_pkgconfig_incs
13859 case $cf_fix_cppflags in
13861 case $cf_add_cflags in
13862 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13863 case $cf_add_cflags in
13865 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13867 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13868 && test -z "${cf_tst_cflags}" \
13869 && cf_fix_cppflags=yes
13871 if test $cf_fix_cppflags = yes ; then
13873 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13874 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13877 elif test "${cf_tst_cflags}" = "\"'" ; then
13879 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13880 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13886 case "$CPPFLAGS" in
13890 case $cf_add_cflags in
13892 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13894 CPPFLAGS=`echo "$CPPFLAGS" | \
13895 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13896 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13901 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13902 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13909 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13910 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13917 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13918 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13920 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13922 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13923 && test -z "${cf_tst_cflags}" \
13924 && cf_fix_cppflags=no
13929 if test -n "$cf_new_cflags" ; then
13931 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13932 CFLAGS="${CFLAGS}$cf_new_cflags"
13936 if test -n "$cf_new_cppflags" ; then
13938 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13939 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13943 if test -n "$cf_new_extra_cppflags" ; then
13945 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13946 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13950 cf_add_libs="$LIBS"
13953 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13954 # filter duplicates
13955 for cf_add_1lib in $cf_add_0lib; do
13956 for cf_add_2lib in $cf_add_libs; do
13957 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13962 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13964 LIBS="$cf_add_libs"
13970 { echo "$as_me:13970: WARNING: unable to find Xt library" >&5
13971 echo "$as_me: WARNING: unable to find Xt library" >&2;}
13975 LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
13980 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
13981 test -n "$verbose" && echo " found package xt" 1>&6
13983 echo "${as_me:-configure}:13983: testing found package xt ..." 1>&5
13985 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
13986 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
13987 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13989 echo "${as_me:-configure}:13989: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13991 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
13993 echo "${as_me:-configure}:13993: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13998 cf_new_extra_cppflags=
14000 for cf_add_cflags in $cf_pkgconfig_incs
14002 case $cf_fix_cppflags in
14004 case $cf_add_cflags in
14005 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14006 case $cf_add_cflags in
14008 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14010 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14011 && test -z "${cf_tst_cflags}" \
14012 && cf_fix_cppflags=yes
14014 if test $cf_fix_cppflags = yes ; then
14016 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14017 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14020 elif test "${cf_tst_cflags}" = "\"'" ; then
14022 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14023 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14029 case "$CPPFLAGS" in
14033 case $cf_add_cflags in
14035 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14037 CPPFLAGS=`echo "$CPPFLAGS" | \
14038 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14039 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14044 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14045 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14052 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14053 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14060 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14061 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14063 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14065 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14066 && test -z "${cf_tst_cflags}" \
14067 && cf_fix_cppflags=no
14072 if test -n "$cf_new_cflags" ; then
14074 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14075 CFLAGS="${CFLAGS}$cf_new_cflags"
14079 if test -n "$cf_new_cppflags" ; then
14081 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14082 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14086 if test -n "$cf_new_extra_cppflags" ; then
14088 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14089 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14093 cf_add_libs="$LIBS"
14096 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14097 # filter duplicates
14098 for cf_add_1lib in $cf_add_0lib; do
14099 for cf_add_2lib in $cf_add_libs; do
14100 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14105 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14107 LIBS="$cf_add_libs"
14113 # we have an "xt" package, but it may omit Xt's dependency on X11
14114 echo "$as_me:14114: checking for usable X dependency" >&5
14115 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
14116 if test "${cf_cv_xt_x11_compat+set}" = set; then
14117 echo $ECHO_N "(cached) $ECHO_C" >&6
14120 cat >conftest.$ac_ext <<_ACEOF
14121 #line 14121 "configure"
14122 #include "confdefs.h"
14124 #include <X11/Xlib.h>
14130 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
14131 int rc2 = XClearWindow((Display*) 0, (Window) 0);
14132 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
14133 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
14139 rm -f conftest.$ac_objext conftest$ac_exeext
14140 if { (eval echo "$as_me:14140: \"$ac_link\"") >&5
14141 (eval $ac_link) 2>&5
14143 echo "$as_me:14143: \$? = $ac_status" >&5
14144 (exit $ac_status); } &&
14145 { ac_try='test -s conftest$ac_exeext'
14146 { (eval echo "$as_me:14146: \"$ac_try\"") >&5
14147 (eval $ac_try) 2>&5
14149 echo "$as_me:14149: \$? = $ac_status" >&5
14150 (exit $ac_status); }; }; then
14151 cf_cv_xt_x11_compat=yes
14153 echo "$as_me: failed program was:" >&5
14154 cat conftest.$ac_ext >&5
14155 cf_cv_xt_x11_compat=no
14157 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14159 echo "$as_me:14159: result: $cf_cv_xt_x11_compat" >&5
14160 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
14161 if test "$cf_cv_xt_x11_compat" = no
14163 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
14165 echo "${as_me:-configure}:14165: testing work around broken X11 dependency ..." 1>&5
14167 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
14169 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
14170 test -n "$verbose" && echo " found package x11" 1>&6
14172 echo "${as_me:-configure}:14172: testing found package x11 ..." 1>&5
14174 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
14175 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
14176 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
14178 echo "${as_me:-configure}:14178: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14180 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
14182 echo "${as_me:-configure}:14182: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
14187 cf_new_extra_cppflags=
14189 for cf_add_cflags in $cf_pkgconfig_incs
14191 case $cf_fix_cppflags in
14193 case $cf_add_cflags in
14194 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14195 case $cf_add_cflags in
14197 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14199 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14200 && test -z "${cf_tst_cflags}" \
14201 && cf_fix_cppflags=yes
14203 if test $cf_fix_cppflags = yes ; then
14205 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14206 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14209 elif test "${cf_tst_cflags}" = "\"'" ; then
14211 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14212 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14218 case "$CPPFLAGS" in
14222 case $cf_add_cflags in
14224 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14226 CPPFLAGS=`echo "$CPPFLAGS" | \
14227 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14228 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14233 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14234 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14241 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14242 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14249 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14250 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14252 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14254 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14255 && test -z "${cf_tst_cflags}" \
14256 && cf_fix_cppflags=no
14261 if test -n "$cf_new_cflags" ; then
14263 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14264 CFLAGS="${CFLAGS}$cf_new_cflags"
14268 if test -n "$cf_new_cppflags" ; then
14270 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14271 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14275 if test -n "$cf_new_extra_cppflags" ; then
14277 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14278 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14282 cf_add_libs="$LIBS"
14285 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14286 # filter duplicates
14287 for cf_add_1lib in $cf_add_0lib; do
14288 for cf_add_2lib in $cf_add_libs; do
14289 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14294 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14296 LIBS="$cf_add_libs"
14303 test -n "$verbose" && echo " ...before $LIBS" 1>&6
14305 echo "${as_me:-configure}:14305: testing ...before $LIBS ..." 1>&5
14307 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
14308 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14310 echo "${as_me:-configure}:14310: testing ...after $LIBS ..." 1>&5
14318 echo "$as_me:14318: checking for usable X Toolkit package" >&5
14319 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
14320 if test "${cf_cv_xt_ice_compat+set}" = set; then
14321 echo $ECHO_N "(cached) $ECHO_C" >&6
14324 cat >conftest.$ac_ext <<_ACEOF
14325 #line 14325 "configure"
14326 #include "confdefs.h"
14328 #include <X11/Shell.h>
14333 int num = IceConnectionNumber(0); (void) num
14339 rm -f conftest.$ac_objext conftest$ac_exeext
14340 if { (eval echo "$as_me:14340: \"$ac_link\"") >&5
14341 (eval $ac_link) 2>&5
14343 echo "$as_me:14343: \$? = $ac_status" >&5
14344 (exit $ac_status); } &&
14345 { ac_try='test -s conftest$ac_exeext'
14346 { (eval echo "$as_me:14346: \"$ac_try\"") >&5
14347 (eval $ac_try) 2>&5
14349 echo "$as_me:14349: \$? = $ac_status" >&5
14350 (exit $ac_status); }; }; then
14351 cf_cv_xt_ice_compat=yes
14353 echo "$as_me: failed program was:" >&5
14354 cat conftest.$ac_ext >&5
14355 cf_cv_xt_ice_compat=no
14357 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14359 echo "$as_me:14359: result: $cf_cv_xt_ice_compat" >&5
14360 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
14362 if test "$cf_cv_xt_ice_compat" = no
14364 # workaround for broken ".pc" files used for X Toolkit.
14365 case "x$X_PRE_LIBS" in
14371 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
14373 echo "${as_me:-configure}:14373: testing work around broken ICE dependency ..." 1>&5
14375 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
14376 test -n "$verbose" && echo " found package ice" 1>&6
14378 echo "${as_me:-configure}:14378: testing found package ice ..." 1>&5
14380 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
14381 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
14382 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
14384 echo "${as_me:-configure}:14384: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14386 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
14388 echo "${as_me:-configure}:14388: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
14393 cf_new_extra_cppflags=
14395 for cf_add_cflags in $cf_pkgconfig_incs
14397 case $cf_fix_cppflags in
14399 case $cf_add_cflags in
14400 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14401 case $cf_add_cflags in
14403 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14405 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14406 && test -z "${cf_tst_cflags}" \
14407 && cf_fix_cppflags=yes
14409 if test $cf_fix_cppflags = yes ; then
14411 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14412 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14415 elif test "${cf_tst_cflags}" = "\"'" ; then
14417 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14418 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14424 case "$CPPFLAGS" in
14428 case $cf_add_cflags in
14430 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14432 CPPFLAGS=`echo "$CPPFLAGS" | \
14433 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14434 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14439 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14440 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14447 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14448 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14455 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14456 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14458 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14460 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14461 && test -z "${cf_tst_cflags}" \
14462 && cf_fix_cppflags=no
14467 if test -n "$cf_new_cflags" ; then
14469 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14470 CFLAGS="${CFLAGS}$cf_new_cflags"
14474 if test -n "$cf_new_cppflags" ; then
14476 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14477 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14481 if test -n "$cf_new_extra_cppflags" ; then
14483 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14484 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14488 cf_add_libs="$LIBS"
14491 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14492 # filter duplicates
14493 for cf_add_1lib in $cf_add_0lib; do
14494 for cf_add_2lib in $cf_add_libs; do
14495 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14500 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14502 LIBS="$cf_add_libs"
14504 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
14505 test -n "$verbose" && echo " found package sm" 1>&6
14507 echo "${as_me:-configure}:14507: testing found package sm ..." 1>&5
14509 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
14510 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
14511 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
14513 echo "${as_me:-configure}:14513: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14515 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
14517 echo "${as_me:-configure}:14517: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
14522 cf_new_extra_cppflags=
14524 for cf_add_cflags in $cf_pkgconfig_incs
14526 case $cf_fix_cppflags in
14528 case $cf_add_cflags in
14529 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14530 case $cf_add_cflags in
14532 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14534 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14535 && test -z "${cf_tst_cflags}" \
14536 && cf_fix_cppflags=yes
14538 if test $cf_fix_cppflags = yes ; then
14540 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14541 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14544 elif test "${cf_tst_cflags}" = "\"'" ; then
14546 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14547 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14553 case "$CPPFLAGS" in
14557 case $cf_add_cflags in
14559 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14561 CPPFLAGS=`echo "$CPPFLAGS" | \
14562 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14563 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14568 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14569 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14576 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14577 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14584 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14585 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14587 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14589 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14590 && test -z "${cf_tst_cflags}" \
14591 && cf_fix_cppflags=no
14596 if test -n "$cf_new_cflags" ; then
14598 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14599 CFLAGS="${CFLAGS}$cf_new_cflags"
14603 if test -n "$cf_new_cppflags" ; then
14605 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14606 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14610 if test -n "$cf_new_extra_cppflags" ; then
14612 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14613 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14617 cf_add_libs="$LIBS"
14620 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14621 # filter duplicates
14622 for cf_add_1lib in $cf_add_0lib; do
14623 for cf_add_2lib in $cf_add_libs; do
14624 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14629 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14631 LIBS="$cf_add_libs"
14644 test -n "$verbose" && echo " ...before $LIBS" 1>&6
14646 echo "${as_me:-configure}:14646: testing ...before $LIBS ..." 1>&5
14648 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
14649 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14651 echo "${as_me:-configure}:14651: testing ...after $LIBS ..." 1>&5
14667 LDFLAGS="$X_LIBS $LDFLAGS"
14669 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
14671 echo "${as_me:-configure}:14671: testing checking additions to CFLAGS ..." 1>&5
14673 cf_check_cflags="$CFLAGS"
14674 cf_check_cppflags="$CPPFLAGS"
14679 cf_new_extra_cppflags=
14681 for cf_add_cflags in $X_CFLAGS
14683 case $cf_fix_cppflags in
14685 case $cf_add_cflags in
14686 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14687 case $cf_add_cflags in
14689 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14691 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14692 && test -z "${cf_tst_cflags}" \
14693 && cf_fix_cppflags=yes
14695 if test $cf_fix_cppflags = yes ; then
14697 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14698 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14701 elif test "${cf_tst_cflags}" = "\"'" ; then
14703 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14704 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14710 case "$CPPFLAGS" in
14714 case $cf_add_cflags in
14716 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14718 CPPFLAGS=`echo "$CPPFLAGS" | \
14719 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14720 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14725 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14726 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14733 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14734 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14741 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14742 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14744 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14746 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14747 && test -z "${cf_tst_cflags}" \
14748 && cf_fix_cppflags=no
14753 if test -n "$cf_new_cflags" ; then
14754 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
14756 echo "${as_me:-configure}:14756: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
14758 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14759 CFLAGS="${CFLAGS}$cf_new_cflags"
14763 if test -n "$cf_new_cppflags" ; then
14764 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
14766 echo "${as_me:-configure}:14766: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
14768 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14769 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14773 if test -n "$cf_new_extra_cppflags" ; then
14774 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
14776 echo "${as_me:-configure}:14776: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
14778 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14779 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14783 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
14784 cat >conftest.$ac_ext <<_ACEOF
14785 #line 14785 "configure"
14786 #include "confdefs.h"
14791 printf("Hello world");
14796 rm -f conftest.$ac_objext conftest$ac_exeext
14797 if { (eval echo "$as_me:14797: \"$ac_link\"") >&5
14798 (eval $ac_link) 2>&5
14800 echo "$as_me:14800: \$? = $ac_status" >&5
14801 (exit $ac_status); } &&
14802 { ac_try='test -s conftest$ac_exeext'
14803 { (eval echo "$as_me:14803: \"$ac_try\"") >&5
14804 (eval $ac_try) 2>&5
14806 echo "$as_me:14806: \$? = $ac_status" >&5
14807 (exit $ac_status); }; }; then
14810 echo "$as_me: failed program was:" >&5
14811 cat conftest.$ac_ext >&5
14812 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
14814 echo "${as_me:-configure}:14814: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
14816 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
14817 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
14819 echo "${as_me:-configure}:14819: testing but keeping change to \$CPPFLAGS ..." 1>&5
14822 CFLAGS="$cf_check_flags"
14824 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14827 echo "$as_me:14827: checking for XOpenDisplay" >&5
14828 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
14829 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
14830 echo $ECHO_N "(cached) $ECHO_C" >&6
14832 cat >conftest.$ac_ext <<_ACEOF
14833 #line 14833 "configure"
14834 #include "confdefs.h"
14835 #define XOpenDisplay autoconf_temporary
14836 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14837 #undef XOpenDisplay
14843 /* We use char because int might match the return type of a gcc2
14844 builtin and then its argument prototype would still apply. */
14845 char XOpenDisplay (void);
14851 /* The GNU C library defines stubs for functions which it implements
14852 to always fail with ENOSYS. Some functions are actually named
14853 something starting with __ and the normal name is an alias. */
14854 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
14855 #error found stub for XOpenDisplay
14858 return XOpenDisplay ();
14863 rm -f conftest.$ac_objext conftest$ac_exeext
14864 if { (eval echo "$as_me:14864: \"$ac_link\"") >&5
14865 (eval $ac_link) 2>&5
14867 echo "$as_me:14867: \$? = $ac_status" >&5
14868 (exit $ac_status); } &&
14869 { ac_try='test -s conftest$ac_exeext'
14870 { (eval echo "$as_me:14870: \"$ac_try\"") >&5
14871 (eval $ac_try) 2>&5
14873 echo "$as_me:14873: \$? = $ac_status" >&5
14874 (exit $ac_status); }; }; then
14875 ac_cv_func_XOpenDisplay=yes
14877 echo "$as_me: failed program was:" >&5
14878 cat conftest.$ac_ext >&5
14879 ac_cv_func_XOpenDisplay=no
14881 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14883 echo "$as_me:14883: result: $ac_cv_func_XOpenDisplay" >&5
14884 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
14885 if test $ac_cv_func_XOpenDisplay = yes; then
14889 echo "$as_me:14889: checking for XOpenDisplay in -lX11" >&5
14890 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
14891 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
14892 echo $ECHO_N "(cached) $ECHO_C" >&6
14894 ac_check_lib_save_LIBS=$LIBS
14896 cat >conftest.$ac_ext <<_ACEOF
14897 #line 14897 "configure"
14898 #include "confdefs.h"
14900 /* Override any gcc2 internal prototype to avoid an error. */
14904 /* We use char because int might match the return type of a gcc2
14905 builtin and then its argument prototype would still apply. */
14906 char XOpenDisplay ();
14915 rm -f conftest.$ac_objext conftest$ac_exeext
14916 if { (eval echo "$as_me:14916: \"$ac_link\"") >&5
14917 (eval $ac_link) 2>&5
14919 echo "$as_me:14919: \$? = $ac_status" >&5
14920 (exit $ac_status); } &&
14921 { ac_try='test -s conftest$ac_exeext'
14922 { (eval echo "$as_me:14922: \"$ac_try\"") >&5
14923 (eval $ac_try) 2>&5
14925 echo "$as_me:14925: \$? = $ac_status" >&5
14926 (exit $ac_status); }; }; then
14927 ac_cv_lib_X11_XOpenDisplay=yes
14929 echo "$as_me: failed program was:" >&5
14930 cat conftest.$ac_ext >&5
14931 ac_cv_lib_X11_XOpenDisplay=no
14933 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14934 LIBS=$ac_check_lib_save_LIBS
14936 echo "$as_me:14936: result: $ac_cv_lib_X11_XOpenDisplay" >&5
14937 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
14938 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
14940 cf_add_libs="$LIBS"
14943 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14944 # filter duplicates
14945 for cf_add_1lib in $cf_add_0lib; do
14946 for cf_add_2lib in $cf_add_libs; do
14947 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14952 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14954 LIBS="$cf_add_libs"
14960 echo "$as_me:14960: checking for XtAppInitialize" >&5
14961 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
14962 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
14963 echo $ECHO_N "(cached) $ECHO_C" >&6
14965 cat >conftest.$ac_ext <<_ACEOF
14966 #line 14966 "configure"
14967 #include "confdefs.h"
14968 #define XtAppInitialize autoconf_temporary
14969 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14970 #undef XtAppInitialize
14976 /* We use char because int might match the return type of a gcc2
14977 builtin and then its argument prototype would still apply. */
14978 char XtAppInitialize (void);
14984 /* The GNU C library defines stubs for functions which it implements
14985 to always fail with ENOSYS. Some functions are actually named
14986 something starting with __ and the normal name is an alias. */
14987 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
14988 #error found stub for XtAppInitialize
14991 return XtAppInitialize ();
14996 rm -f conftest.$ac_objext conftest$ac_exeext
14997 if { (eval echo "$as_me:14997: \"$ac_link\"") >&5
14998 (eval $ac_link) 2>&5
15000 echo "$as_me:15000: \$? = $ac_status" >&5
15001 (exit $ac_status); } &&
15002 { ac_try='test -s conftest$ac_exeext'
15003 { (eval echo "$as_me:15003: \"$ac_try\"") >&5
15004 (eval $ac_try) 2>&5
15006 echo "$as_me:15006: \$? = $ac_status" >&5
15007 (exit $ac_status); }; }; then
15008 ac_cv_func_XtAppInitialize=yes
15010 echo "$as_me: failed program was:" >&5
15011 cat conftest.$ac_ext >&5
15012 ac_cv_func_XtAppInitialize=no
15014 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15016 echo "$as_me:15016: result: $ac_cv_func_XtAppInitialize" >&5
15017 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
15018 if test $ac_cv_func_XtAppInitialize = yes; then
15022 echo "$as_me:15022: checking for XtAppInitialize in -lXt" >&5
15023 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
15024 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
15025 echo $ECHO_N "(cached) $ECHO_C" >&6
15027 ac_check_lib_save_LIBS=$LIBS
15029 cat >conftest.$ac_ext <<_ACEOF
15030 #line 15030 "configure"
15031 #include "confdefs.h"
15033 /* Override any gcc2 internal prototype to avoid an error. */
15037 /* We use char because int might match the return type of a gcc2
15038 builtin and then its argument prototype would still apply. */
15039 char XtAppInitialize ();
15043 XtAppInitialize ();
15048 rm -f conftest.$ac_objext conftest$ac_exeext
15049 if { (eval echo "$as_me:15049: \"$ac_link\"") >&5
15050 (eval $ac_link) 2>&5
15052 echo "$as_me:15052: \$? = $ac_status" >&5
15053 (exit $ac_status); } &&
15054 { ac_try='test -s conftest$ac_exeext'
15055 { (eval echo "$as_me:15055: \"$ac_try\"") >&5
15056 (eval $ac_try) 2>&5
15058 echo "$as_me:15058: \$? = $ac_status" >&5
15059 (exit $ac_status); }; }; then
15060 ac_cv_lib_Xt_XtAppInitialize=yes
15062 echo "$as_me: failed program was:" >&5
15063 cat conftest.$ac_ext >&5
15064 ac_cv_lib_Xt_XtAppInitialize=no
15066 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15067 LIBS=$ac_check_lib_save_LIBS
15069 echo "$as_me:15069: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
15070 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
15071 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
15073 cat >>confdefs.h <<\EOF
15074 #define HAVE_LIBXT 1
15085 if test $cf_have_X_LIBS = no ; then
15086 { echo "$as_me:15086: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15087 test program. You will have to check and add the proper libraries by hand
15089 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15090 test program. You will have to check and add the proper libraries by hand
15091 to makefile." >&2;}
15094 cf_x_athena_root=$cf_x_athena
15097 for cf_path in default \
15098 /usr/contrib/X11R6 \
15099 /usr/contrib/X11R5 \
15103 if test -z "$cf_x_athena_inc" ; then
15105 cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
15106 cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
15107 cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
15108 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15109 for cf_X_CFLAGS in $X_CFLAGS
15111 case "x$cf_X_CFLAGS" in
15113 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15116 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15121 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
15122 if test $cf_path != default ; then
15124 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15125 CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
15127 echo "$as_me:15127: checking for $cf_test in $cf_path" >&5
15128 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
15130 echo "$as_me:15130: checking for $cf_test" >&5
15131 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
15133 cat >conftest.$ac_ext <<_ACEOF
15134 #line 15134 "configure"
15135 #include "confdefs.h"
15137 #include <X11/Intrinsic.h>
15138 #include <$cf_test>
15147 rm -f conftest.$ac_objext
15148 if { (eval echo "$as_me:15148: \"$ac_compile\"") >&5
15149 (eval $ac_compile) 2>&5
15151 echo "$as_me:15151: \$? = $ac_status" >&5
15152 (exit $ac_status); } &&
15153 { ac_try='test -s conftest.$ac_objext'
15154 { (eval echo "$as_me:15154: \"$ac_try\"") >&5
15155 (eval $ac_try) 2>&5
15157 echo "$as_me:15157: \$? = $ac_status" >&5
15158 (exit $ac_status); }; }; then
15161 echo "$as_me: failed program was:" >&5
15162 cat conftest.$ac_ext >&5
15165 rm -f conftest.$ac_objext conftest.$ac_ext
15166 echo "$as_me:15166: result: $cf_result" >&5
15167 echo "${ECHO_T}$cf_result" >&6
15169 LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
15170 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
15171 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
15173 if test "$cf_result" = yes ; then
15174 test "$cf_path" = default && cf_x_athena_inc=default
15175 test "$cf_path" != default && cf_x_athena_inc=$cf_path/include
15181 if test -z "$cf_x_athena_inc" ; then
15182 { echo "$as_me:15182: WARNING: Unable to find Athena header files" >&5
15183 echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
15184 elif test "$cf_x_athena_inc" != default ; then
15186 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15187 CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
15191 cf_x_athena_root=$cf_x_athena
15194 for cf_path in default \
15195 /usr/contrib/X11R6 \
15196 /usr/contrib/X11R5 \
15201 ${cf_x_athena_root} \
15202 ${cf_x_athena_root}7 \
15203 ${cf_x_athena_root}6
15206 "-l$cf_lib -lXmu" \
15207 "-l$cf_lib -lXpm -lXmu" \
15208 "-l${cf_lib}_s -lXmu_s"
15210 test -n "$cf_x_athena_lib" && break
15212 cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
15213 cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
15214 cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
15215 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15216 for cf_X_CFLAGS in $X_CFLAGS
15218 case "x$cf_X_CFLAGS" in
15220 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15223 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15228 cf_test=XawSimpleMenuAddGlobalActions
15229 test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
15231 cf_add_libs="$LIBS"
15234 for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15235 # filter duplicates
15236 for cf_add_1lib in $cf_add_0lib; do
15237 for cf_add_2lib in $cf_add_libs; do
15238 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15243 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15245 LIBS="$cf_add_libs"
15247 echo "$as_me:15247: checking for $cf_test in $cf_libs" >&5
15248 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
15249 cat >conftest.$ac_ext <<_ACEOF
15250 #line 15250 "configure"
15251 #include "confdefs.h"
15253 #include <X11/Intrinsic.h>
15254 #include <X11/$cf_x_athena_root/SimpleMenu.h>
15260 $cf_test((XtAppContext) 0)
15265 rm -f conftest.$ac_objext conftest$ac_exeext
15266 if { (eval echo "$as_me:15266: \"$ac_link\"") >&5
15267 (eval $ac_link) 2>&5
15269 echo "$as_me:15269: \$? = $ac_status" >&5
15270 (exit $ac_status); } &&
15271 { ac_try='test -s conftest$ac_exeext'
15272 { (eval echo "$as_me:15272: \"$ac_try\"") >&5
15273 (eval $ac_try) 2>&5
15275 echo "$as_me:15275: \$? = $ac_status" >&5
15276 (exit $ac_status); }; }; then
15279 echo "$as_me: failed program was:" >&5
15280 cat conftest.$ac_ext >&5
15283 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15284 echo "$as_me:15284: result: $cf_result" >&5
15285 echo "${ECHO_T}$cf_result" >&6
15287 LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
15288 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
15289 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
15291 if test "$cf_result" = yes ; then
15292 cf_x_athena_lib="$cf_libs"
15296 test -n "$cf_x_athena_lib" && break
15300 if test -z "$cf_x_athena_lib" ; then
15301 { { echo "$as_me:15301: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
15302 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
15303 { (exit 1); exit 1; }; }
15306 cf_add_libs="$LIBS"
15309 for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15310 # filter duplicates
15311 for cf_add_1lib in $cf_add_0lib; do
15312 for cf_add_2lib in $cf_add_libs; do
15313 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15318 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15320 LIBS="$cf_add_libs"
15322 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15324 cat >>confdefs.h <<EOF
15325 #define $cf_x_athena_LIBS 1
15330 if test -n "$ac_tool_prefix"; then
15331 for ac_prog in xcurses-config
15333 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
15334 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
15335 echo "$as_me:15335: checking for $ac_word" >&5
15336 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15337 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
15338 echo $ECHO_N "(cached) $ECHO_C" >&6
15340 if test -n "$XCURSES_CONFIG"; then
15341 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
15343 ac_save_IFS=$IFS; IFS=$ac_path_separator
15345 for ac_dir in $ac_dummy; do
15347 test -z "$ac_dir" && ac_dir=.
15348 $as_executable_p "$ac_dir/$ac_word" || continue
15349 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
15350 echo "$as_me:15350: found $ac_dir/$ac_word" >&5
15356 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
15357 if test -n "$XCURSES_CONFIG"; then
15358 echo "$as_me:15358: result: $XCURSES_CONFIG" >&5
15359 echo "${ECHO_T}$XCURSES_CONFIG" >&6
15361 echo "$as_me:15361: result: no" >&5
15362 echo "${ECHO_T}no" >&6
15365 test -n "$XCURSES_CONFIG" && break
15368 if test -z "$XCURSES_CONFIG"; then
15369 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
15370 for ac_prog in xcurses-config
15372 # Extract the first word of "$ac_prog", so it can be a program name with args.
15373 set dummy $ac_prog; ac_word=$2
15374 echo "$as_me:15374: checking for $ac_word" >&5
15375 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15376 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
15377 echo $ECHO_N "(cached) $ECHO_C" >&6
15379 if test -n "$ac_ct_XCURSES_CONFIG"; then
15380 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
15382 ac_save_IFS=$IFS; IFS=$ac_path_separator
15384 for ac_dir in $ac_dummy; do
15386 test -z "$ac_dir" && ac_dir=.
15387 $as_executable_p "$ac_dir/$ac_word" || continue
15388 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
15389 echo "$as_me:15389: found $ac_dir/$ac_word" >&5
15395 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
15396 if test -n "$ac_ct_XCURSES_CONFIG"; then
15397 echo "$as_me:15397: result: $ac_ct_XCURSES_CONFIG" >&5
15398 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
15400 echo "$as_me:15400: result: no" >&5
15401 echo "${ECHO_T}no" >&6
15404 test -n "$ac_ct_XCURSES_CONFIG" && break
15406 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
15408 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
15411 if test "$XCURSES_CONFIG" != none ; then
15416 cf_new_extra_cppflags=
15418 for cf_add_cflags in `$XCURSES_CONFIG --cflags`
15420 case $cf_fix_cppflags in
15422 case $cf_add_cflags in
15423 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15424 case $cf_add_cflags in
15426 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15428 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15429 && test -z "${cf_tst_cflags}" \
15430 && cf_fix_cppflags=yes
15432 if test $cf_fix_cppflags = yes ; then
15434 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15435 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15438 elif test "${cf_tst_cflags}" = "\"'" ; then
15440 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15441 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15447 case "$CPPFLAGS" in
15451 case $cf_add_cflags in
15453 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15455 CPPFLAGS=`echo "$CPPFLAGS" | \
15456 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15457 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15462 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15463 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15470 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15471 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15478 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15479 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15481 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15483 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15484 && test -z "${cf_tst_cflags}" \
15485 && cf_fix_cppflags=no
15490 if test -n "$cf_new_cflags" ; then
15492 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15493 CFLAGS="${CFLAGS}$cf_new_cflags"
15497 if test -n "$cf_new_cppflags" ; then
15499 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15500 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15504 if test -n "$cf_new_extra_cppflags" ; then
15506 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15507 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15511 cf_add_libs="$LIBS"
15514 for cf_add_1lib in `$XCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15515 # filter duplicates
15516 for cf_add_1lib in $cf_add_0lib; do
15517 for cf_add_2lib in $cf_add_libs; do
15518 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15523 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15525 LIBS="$cf_add_libs"
15527 cf_cv_lib_XCurses=yes
15531 LDFLAGS="$LDFLAGS $X_LIBS"
15533 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
15535 echo "${as_me:-configure}:15535: testing checking additions to CFLAGS ..." 1>&5
15537 cf_check_cflags="$CFLAGS"
15538 cf_check_cppflags="$CPPFLAGS"
15543 cf_new_extra_cppflags=
15545 for cf_add_cflags in $X_CFLAGS
15547 case $cf_fix_cppflags in
15549 case $cf_add_cflags in
15550 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15551 case $cf_add_cflags in
15553 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15555 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15556 && test -z "${cf_tst_cflags}" \
15557 && cf_fix_cppflags=yes
15559 if test $cf_fix_cppflags = yes ; then
15561 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15562 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15565 elif test "${cf_tst_cflags}" = "\"'" ; then
15567 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15568 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15574 case "$CPPFLAGS" in
15578 case $cf_add_cflags in
15580 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15582 CPPFLAGS=`echo "$CPPFLAGS" | \
15583 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15584 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15589 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15590 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15597 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15598 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15605 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15606 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15608 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15610 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15611 && test -z "${cf_tst_cflags}" \
15612 && cf_fix_cppflags=no
15617 if test -n "$cf_new_cflags" ; then
15618 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
15620 echo "${as_me:-configure}:15620: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
15622 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15623 CFLAGS="${CFLAGS}$cf_new_cflags"
15627 if test -n "$cf_new_cppflags" ; then
15628 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
15630 echo "${as_me:-configure}:15630: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
15632 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15633 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15637 if test -n "$cf_new_extra_cppflags" ; then
15638 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
15640 echo "${as_me:-configure}:15640: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
15642 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15643 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15647 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
15648 cat >conftest.$ac_ext <<_ACEOF
15649 #line 15649 "configure"
15650 #include "confdefs.h"
15655 printf("Hello world");
15660 rm -f conftest.$ac_objext conftest$ac_exeext
15661 if { (eval echo "$as_me:15661: \"$ac_link\"") >&5
15662 (eval $ac_link) 2>&5
15664 echo "$as_me:15664: \$? = $ac_status" >&5
15665 (exit $ac_status); } &&
15666 { ac_try='test -s conftest$ac_exeext'
15667 { (eval echo "$as_me:15667: \"$ac_try\"") >&5
15668 (eval $ac_try) 2>&5
15670 echo "$as_me:15670: \$? = $ac_status" >&5
15671 (exit $ac_status); }; }; then
15674 echo "$as_me: failed program was:" >&5
15675 cat conftest.$ac_ext >&5
15676 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
15678 echo "${as_me:-configure}:15678: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
15680 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
15681 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
15683 echo "${as_me:-configure}:15683: testing but keeping change to \$CPPFLAGS ..." 1>&5
15686 CFLAGS="$cf_check_flags"
15688 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15691 echo "$as_me:15691: checking for XOpenDisplay in -lX11" >&5
15692 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
15693 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
15694 echo $ECHO_N "(cached) $ECHO_C" >&6
15696 ac_check_lib_save_LIBS=$LIBS
15697 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
15698 cat >conftest.$ac_ext <<_ACEOF
15699 #line 15699 "configure"
15700 #include "confdefs.h"
15702 /* Override any gcc2 internal prototype to avoid an error. */
15706 /* We use char because int might match the return type of a gcc2
15707 builtin and then its argument prototype would still apply. */
15708 char XOpenDisplay ();
15717 rm -f conftest.$ac_objext conftest$ac_exeext
15718 if { (eval echo "$as_me:15718: \"$ac_link\"") >&5
15719 (eval $ac_link) 2>&5
15721 echo "$as_me:15721: \$? = $ac_status" >&5
15722 (exit $ac_status); } &&
15723 { ac_try='test -s conftest$ac_exeext'
15724 { (eval echo "$as_me:15724: \"$ac_try\"") >&5
15725 (eval $ac_try) 2>&5
15727 echo "$as_me:15727: \$? = $ac_status" >&5
15728 (exit $ac_status); }; }; then
15729 ac_cv_lib_X11_XOpenDisplay=yes
15731 echo "$as_me: failed program was:" >&5
15732 cat conftest.$ac_ext >&5
15733 ac_cv_lib_X11_XOpenDisplay=no
15735 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15736 LIBS=$ac_check_lib_save_LIBS
15738 echo "$as_me:15738: result: $ac_cv_lib_X11_XOpenDisplay" >&5
15739 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
15740 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
15742 cf_add_libs="$LIBS"
15745 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15746 # filter duplicates
15747 for cf_add_1lib in $cf_add_0lib; do
15748 for cf_add_2lib in $cf_add_libs; do
15749 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15754 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15756 LIBS="$cf_add_libs"
15760 echo "$as_me:15760: checking for XCurses library" >&5
15761 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
15762 if test "${cf_cv_lib_XCurses+set}" = set; then
15763 echo $ECHO_N "(cached) $ECHO_C" >&6
15766 cf_add_libs="$LIBS"
15769 for cf_add_1lib in -lXCurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15770 # filter duplicates
15771 for cf_add_1lib in $cf_add_0lib; do
15772 for cf_add_2lib in $cf_add_libs; do
15773 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15778 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15780 LIBS="$cf_add_libs"
15782 cat >conftest.$ac_ext <<_ACEOF
15783 #line 15783 "configure"
15784 #include "confdefs.h"
15786 #include <xcurses.h>
15787 char *XCursesProgramName = "test";
15797 rm -f conftest.$ac_objext conftest$ac_exeext
15798 if { (eval echo "$as_me:15798: \"$ac_link\"") >&5
15799 (eval $ac_link) 2>&5
15801 echo "$as_me:15801: \$? = $ac_status" >&5
15802 (exit $ac_status); } &&
15803 { ac_try='test -s conftest$ac_exeext'
15804 { (eval echo "$as_me:15804: \"$ac_try\"") >&5
15805 (eval $ac_try) 2>&5
15807 echo "$as_me:15807: \$? = $ac_status" >&5
15808 (exit $ac_status); }; }; then
15809 cf_cv_lib_XCurses=yes
15811 echo "$as_me: failed program was:" >&5
15812 cat conftest.$ac_ext >&5
15813 cf_cv_lib_XCurses=no
15815 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15818 echo "$as_me:15818: result: $cf_cv_lib_XCurses" >&5
15819 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
15823 if test $cf_cv_lib_XCurses = yes ; then
15825 cat >>confdefs.h <<\EOF
15829 cat >>confdefs.h <<\EOF
15833 echo "$as_me:15833: checking for xcurses.h" >&5
15834 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
15835 if test "${ac_cv_header_xcurses_h+set}" = set; then
15836 echo $ECHO_N "(cached) $ECHO_C" >&6
15838 cat >conftest.$ac_ext <<_ACEOF
15839 #line 15839 "configure"
15840 #include "confdefs.h"
15841 #include <xcurses.h>
15843 if { (eval echo "$as_me:15843: \"$ac_cpp conftest.$ac_ext\"") >&5
15844 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15846 egrep -v '^ *\+' conftest.er1 >conftest.err
15848 cat conftest.err >&5
15849 echo "$as_me:15849: \$? = $ac_status" >&5
15850 (exit $ac_status); } >/dev/null; then
15851 if test -s conftest.err; then
15852 ac_cpp_err=$ac_c_preproc_warn_flag
15859 if test -z "$ac_cpp_err"; then
15860 ac_cv_header_xcurses_h=yes
15862 echo "$as_me: failed program was:" >&5
15863 cat conftest.$ac_ext >&5
15864 ac_cv_header_xcurses_h=no
15866 rm -f conftest.err conftest.$ac_ext
15868 echo "$as_me:15868: result: $ac_cv_header_xcurses_h" >&5
15869 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
15870 if test $ac_cv_header_xcurses_h = yes; then
15872 cat >>confdefs.h <<\EOF
15873 #define HAVE_XCURSES 1
15879 { { echo "$as_me:15879: error: Cannot link with XCurses" >&5
15880 echo "$as_me: error: Cannot link with XCurses" >&2;}
15881 { (exit 1); exit 1; }; }
15886 { { echo "$as_me:15886: error: unexpected screen-value: $cf_cv_screen" >&5
15887 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
15888 { (exit 1); exit 1; }; }
15892 : ${cf_nculib_root:=$cf_cv_screen}
15893 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
15894 echo "$as_me:15894: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
15895 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
15896 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15897 echo $ECHO_N "(cached) $ECHO_C" >&6
15899 ac_check_lib_save_LIBS=$LIBS
15900 LIBS="-l$cf_nculib_root $LIBS"
15901 cat >conftest.$ac_ext <<_ACEOF
15902 #line 15902 "configure"
15903 #include "confdefs.h"
15905 /* Override any gcc2 internal prototype to avoid an error. */
15909 /* We use char because int might match the return type of a gcc2
15910 builtin and then its argument prototype would still apply. */
15911 char _nc_init_pthreads ();
15915 _nc_init_pthreads ();
15920 rm -f conftest.$ac_objext conftest$ac_exeext
15921 if { (eval echo "$as_me:15921: \"$ac_link\"") >&5
15922 (eval $ac_link) 2>&5
15924 echo "$as_me:15924: \$? = $ac_status" >&5
15925 (exit $ac_status); } &&
15926 { ac_try='test -s conftest$ac_exeext'
15927 { (eval echo "$as_me:15927: \"$ac_try\"") >&5
15928 (eval $ac_try) 2>&5
15930 echo "$as_me:15930: \$? = $ac_status" >&5
15931 (exit $ac_status); }; }; then
15932 eval "$as_ac_Lib=yes"
15934 echo "$as_me: failed program was:" >&5
15935 cat conftest.$ac_ext >&5
15936 eval "$as_ac_Lib=no"
15938 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15939 LIBS=$ac_check_lib_save_LIBS
15941 echo "$as_me:15941: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15942 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15943 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15944 cf_cv_ncurses_pthreads=yes
15946 cf_cv_ncurses_pthreads=no
15949 if test "$cf_cv_ncurses_pthreads" = yes
15952 cf_add_libs="$LIBS"
15955 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15956 # filter duplicates
15957 for cf_add_1lib in $cf_add_0lib; do
15958 for cf_add_2lib in $cf_add_libs; do
15959 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15964 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15966 LIBS="$cf_add_libs"
15970 case $cf_cv_screen in
15972 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
15976 echo "$as_me:15976: checking for X11 rgb file" >&5
15977 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
15979 # Check whether --with-x11-rgb or --without-x11-rgb was given.
15980 if test "${with_x11_rgb+set}" = set; then
15981 withval="$with_x11_rgb"
15987 if test "x$RGB_PATH" = xauto
15989 RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
15991 /opt/local/share/X11/rgb.txt \
15992 /opt/X11/share/X11/rgb.txt \
15993 /usr/share/X11/rgb.txt \
15994 /usr/X11/share/X11/rgb.txt \
15995 /usr/X11/lib/X11/rgb.txt \
15996 /usr/lib/X11/rgb.txt \
15998 /usr/pkg/lib/X11/rgb.txt \
15999 /usr/X11R7/lib/X11/rgb.txt \
16000 /usr/X11R6/lib/X11/rgb.txt \
16001 /usr/X11R5/lib/X11/rgb.txt \
16002 /usr/X11R4/lib/X11/rgb.txt \
16003 /usr/local/lib/X11/rgb.txt \
16004 /usr/local/share/X11/rgb.txt \
16005 /usr/lib64/X11/rgb.txt
16007 if test -f "$cf_path" ; then
16008 RGB_PATH="$cf_path"
16015 if test "x$prefix" != xNONE; then
16016 cf_path_syntax="$prefix"
16018 cf_path_syntax="$ac_default_prefix"
16021 case ".$cf_path" in
16022 (.\$\(*\)*|.\'*\'*)
16026 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
16028 (.\${*prefix}*|.\${*dir}*)
16029 eval cf_path="$cf_path"
16030 case ".$cf_path" in
16032 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
16037 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
16040 { { echo "$as_me:16040: error: expected a pathname, not \"$cf_path\"" >&5
16041 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
16042 { (exit 1); exit 1; }; }
16048 echo "$as_me:16048: result: $RGB_PATH" >&5
16049 echo "${ECHO_T}$RGB_PATH" >&6
16051 cat >>confdefs.h <<EOF
16052 #define RGB_PATH "$cf_path"
16056 if test "$RGB_PATH" = no
16063 case $cf_cv_screen in
16065 cf_default_panel=no
16068 cf_default_tinfo=no
16070 (xcurses|bsdcurses)
16071 cf_default_panel=no
16074 cf_default_tinfo=yes
16077 cf_default_panel=yes
16078 cf_default_form=yes
16079 cf_default_menu=yes
16080 cf_default_tinfo=yes
16081 case $cf_cv_screen in
16083 cf_curses_headers="nc_alloc.h nomacros.h term_entry.h"
16089 echo "$as_me:16089: checking for desired basename for form library" >&5
16090 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
16092 # Check whether --with-form-libname or --without-form-libname was given.
16093 if test "${with_form_libname+set}" = set; then
16094 withval="$with_form_libname"
16095 with_lib_basename=$withval
16097 with_lib_basename=form
16099 FORM_NAME="$with_lib_basename"
16101 case "x$FORM_NAME" in
16109 echo "$as_me:16109: result: $FORM_NAME" >&5
16110 echo "${ECHO_T}$FORM_NAME" >&6
16112 echo "$as_me:16112: checking for desired basename for menu library" >&5
16113 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
16115 # Check whether --with-menu-libname or --without-menu-libname was given.
16116 if test "${with_menu_libname+set}" = set; then
16117 withval="$with_menu_libname"
16118 with_lib_basename=$withval
16120 with_lib_basename=menu
16122 MENU_NAME="$with_lib_basename"
16124 case "x$MENU_NAME" in
16132 echo "$as_me:16132: result: $MENU_NAME" >&5
16133 echo "${ECHO_T}$MENU_NAME" >&6
16135 echo "$as_me:16135: checking for desired basename for panel library" >&5
16136 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
16138 # Check whether --with-panel-libname or --without-panel-libname was given.
16139 if test "${with_panel_libname+set}" = set; then
16140 withval="$with_panel_libname"
16141 with_lib_basename=$withval
16143 with_lib_basename=panel
16145 PANEL_NAME="$with_lib_basename"
16147 case "x$PANEL_NAME" in
16155 echo "$as_me:16155: result: $PANEL_NAME" >&5
16156 echo "${ECHO_T}$PANEL_NAME" >&6
16158 echo "$as_me:16158: checking if you want to check for panel functions" >&5
16159 echo $ECHO_N "checking if you want to check for panel functions... $ECHO_C" >&6
16161 # Check whether --enable-panel or --disable-panel was given.
16162 if test "${enable_panel+set}" = set; then
16163 enableval="$enable_panel"
16164 test "$enableval" != no && enableval=yes
16165 if test "$enableval" != "yes" ; then
16168 cf_enable_panel=$cf_default_panel
16172 cf_enable_panel=$cf_default_panel
16175 echo "$as_me:16175: result: $cf_enable_panel" >&5
16176 echo "${ECHO_T}$cf_enable_panel" >&6
16177 if test $cf_enable_panel = yes
16180 cf_have_curses_lib=no
16182 : ${NCURSES_CONFIG_PKG:=none}
16183 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16185 elif test "x${PKG_CONFIG:=none}" != xnone; then
16186 echo "$as_me:16186: checking pkg-config for $PANEL_NAME$cf_cv_libtype" >&5
16187 echo $ECHO_N "checking pkg-config for $PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
16188 if "$PKG_CONFIG" --exists $PANEL_NAME$cf_cv_libtype ; then
16189 echo "$as_me:16189: result: yes" >&5
16190 echo "${ECHO_T}yes" >&6
16192 echo "$as_me:16192: checking if the $PANEL_NAME$cf_cv_libtype package files work" >&5
16193 echo $ECHO_N "checking if the $PANEL_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
16195 cf_save_CPPFLAGS="$CPPFLAGS"
16196 cf_save_LIBS="$LIBS"
16201 cf_new_extra_cppflags=
16203 for cf_add_cflags in `$PKG_CONFIG --cflags $PANEL_NAME$cf_cv_libtype`
16205 case $cf_fix_cppflags in
16207 case $cf_add_cflags in
16208 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16209 case $cf_add_cflags in
16211 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16213 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16214 && test -z "${cf_tst_cflags}" \
16215 && cf_fix_cppflags=yes
16217 if test $cf_fix_cppflags = yes ; then
16219 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16220 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16223 elif test "${cf_tst_cflags}" = "\"'" ; then
16225 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16226 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16232 case "$CPPFLAGS" in
16236 case $cf_add_cflags in
16238 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16240 CPPFLAGS=`echo "$CPPFLAGS" | \
16241 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16242 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16247 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16248 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16255 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16256 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16263 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16264 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16266 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16268 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16269 && test -z "${cf_tst_cflags}" \
16270 && cf_fix_cppflags=no
16275 if test -n "$cf_new_cflags" ; then
16277 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16278 CFLAGS="${CFLAGS}$cf_new_cflags"
16282 if test -n "$cf_new_cppflags" ; then
16284 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16285 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16289 if test -n "$cf_new_extra_cppflags" ; then
16291 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16292 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16296 cf_add_libs="$LIBS"
16299 for cf_add_1lib in `$PKG_CONFIG --libs $PANEL_NAME$cf_cv_libtype`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16300 # filter duplicates
16301 for cf_add_1lib in $cf_add_0lib; do
16302 for cf_add_2lib in $cf_add_libs; do
16303 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16308 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16310 LIBS="$cf_add_libs"
16312 cat >conftest.$ac_ext <<_ACEOF
16313 #line 16313 "configure"
16314 #include "confdefs.h"
16315 #include <$PANEL_NAME.h>
16319 (void) new_panel ( 0 );
16324 rm -f conftest.$ac_objext conftest$ac_exeext
16325 if { (eval echo "$as_me:16325: \"$ac_link\"") >&5
16326 (eval $ac_link) 2>&5
16328 echo "$as_me:16328: \$? = $ac_status" >&5
16329 (exit $ac_status); } &&
16330 { ac_try='test -s conftest$ac_exeext'
16331 { (eval echo "$as_me:16331: \"$ac_try\"") >&5
16332 (eval $ac_try) 2>&5
16334 echo "$as_me:16334: \$? = $ac_status" >&5
16335 (exit $ac_status); }; }; then
16336 if test "$cross_compiling" = yes; then
16337 cf_have_curses_lib=maybe
16339 cat >conftest.$ac_ext <<_ACEOF
16340 #line 16340 "configure"
16341 #include "confdefs.h"
16342 #include <$PANEL_NAME.h>
16344 { (void) new_panel ( 0 ); return 0; }
16346 rm -f conftest$ac_exeext
16347 if { (eval echo "$as_me:16347: \"$ac_link\"") >&5
16348 (eval $ac_link) 2>&5
16350 echo "$as_me:16350: \$? = $ac_status" >&5
16351 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16352 { (eval echo "$as_me:16352: \"$ac_try\"") >&5
16353 (eval $ac_try) 2>&5
16355 echo "$as_me:16355: \$? = $ac_status" >&5
16356 (exit $ac_status); }; }; then
16357 cf_have_curses_lib=yes
16359 echo "$as_me: program exited with status $ac_status" >&5
16360 echo "$as_me: failed program was:" >&5
16361 cat conftest.$ac_ext >&5
16362 cf_have_curses_lib=no
16364 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16367 echo "$as_me: failed program was:" >&5
16368 cat conftest.$ac_ext >&5
16369 cf_have_curses_lib=no
16371 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16372 echo "$as_me:16372: result: $cf_have_curses_lib" >&5
16373 echo "${ECHO_T}$cf_have_curses_lib" >&6
16374 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
16375 if test "$cf_have_curses_lib" != "yes"
16377 CPPFLAGS="$cf_save_CPPFLAGS"
16378 LIBS="$cf_save_LIBS"
16381 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16383 cat >>confdefs.h <<EOF
16384 #define $cf_upper 1
16390 if test "$cf_have_curses_lib" = no; then
16391 as_ac_Lib=`echo "ac_cv_lib_$PANEL_NAME$cf_cv_libtype''_new_panel" | $as_tr_sh`
16392 echo "$as_me:16392: checking for new_panel in -l$PANEL_NAME$cf_cv_libtype" >&5
16393 echo $ECHO_N "checking for new_panel in -l$PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
16394 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16395 echo $ECHO_N "(cached) $ECHO_C" >&6
16397 ac_check_lib_save_LIBS=$LIBS
16398 LIBS="-l$PANEL_NAME$cf_cv_libtype $LIBS"
16399 cat >conftest.$ac_ext <<_ACEOF
16400 #line 16400 "configure"
16401 #include "confdefs.h"
16403 /* Override any gcc2 internal prototype to avoid an error. */
16407 /* We use char because int might match the return type of a gcc2
16408 builtin and then its argument prototype would still apply. */
16418 rm -f conftest.$ac_objext conftest$ac_exeext
16419 if { (eval echo "$as_me:16419: \"$ac_link\"") >&5
16420 (eval $ac_link) 2>&5
16422 echo "$as_me:16422: \$? = $ac_status" >&5
16423 (exit $ac_status); } &&
16424 { ac_try='test -s conftest$ac_exeext'
16425 { (eval echo "$as_me:16425: \"$ac_try\"") >&5
16426 (eval $ac_try) 2>&5
16428 echo "$as_me:16428: \$? = $ac_status" >&5
16429 (exit $ac_status); }; }; then
16430 eval "$as_ac_Lib=yes"
16432 echo "$as_me: failed program was:" >&5
16433 cat conftest.$ac_ext >&5
16434 eval "$as_ac_Lib=no"
16436 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16437 LIBS=$ac_check_lib_save_LIBS
16439 echo "$as_me:16439: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16440 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16441 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16443 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16445 cf_add_libs="$LIBS"
16448 for cf_add_1lib in -l$PANEL_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16449 # filter duplicates
16450 for cf_add_1lib in $cf_add_0lib; do
16451 for cf_add_2lib in $cf_add_libs; do
16452 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16457 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16459 LIBS="$cf_add_libs"
16461 cat >>confdefs.h <<EOF
16462 #define $cf_upper 1
16469 cf_curses_headers="$cf_curses_headers panel.h"
16472 echo "$as_me:16472: checking if you want to check for menu functions" >&5
16473 echo $ECHO_N "checking if you want to check for menu functions... $ECHO_C" >&6
16475 # Check whether --enable-menu or --disable-menu was given.
16476 if test "${enable_menu+set}" = set; then
16477 enableval="$enable_menu"
16478 test "$enableval" != no && enableval=yes
16479 if test "$enableval" != "yes" ; then
16482 cf_enable_menu=$cf_default_menu
16486 cf_enable_menu=$cf_default_menu
16489 echo "$as_me:16489: result: $cf_enable_menu" >&5
16490 echo "${ECHO_T}$cf_enable_menu" >&6
16491 if test $cf_enable_menu = yes
16493 case $cf_cv_screen in
16498 echo "$as_me:16498: checking for NetBSD menu.h" >&5
16499 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
16500 if test "${cf_cv_netbsd_menu_h+set}" = set; then
16501 echo $ECHO_N "(cached) $ECHO_C" >&6
16504 cat >conftest.$ac_ext <<_ACEOF
16505 #line 16505 "configure"
16506 #include "confdefs.h"
16508 #include <${cf_cv_ncurses_header:-curses.h}>
16516 int y = menu->max_item_width;
16522 rm -f conftest.$ac_objext
16523 if { (eval echo "$as_me:16523: \"$ac_compile\"") >&5
16524 (eval $ac_compile) 2>&5
16526 echo "$as_me:16526: \$? = $ac_status" >&5
16527 (exit $ac_status); } &&
16528 { ac_try='test -s conftest.$ac_objext'
16529 { (eval echo "$as_me:16529: \"$ac_try\"") >&5
16530 (eval $ac_try) 2>&5
16532 echo "$as_me:16532: \$? = $ac_status" >&5
16533 (exit $ac_status); }; }; then
16534 cf_cv_netbsd_menu_h=yes
16537 echo "$as_me: failed program was:" >&5
16538 cat conftest.$ac_ext >&5
16539 cf_cv_netbsd_menu_h=no
16541 rm -f conftest.$ac_objext conftest.$ac_ext
16544 echo "$as_me:16544: result: $cf_cv_netbsd_menu_h" >&5
16545 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
16547 test "$cf_cv_netbsd_menu_h" = yes &&
16548 cat >>confdefs.h <<\EOF
16549 #define HAVE_NETBSD_MENU_H 1
16555 cf_have_curses_lib=no
16557 : ${NCURSES_CONFIG_PKG:=none}
16558 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16560 elif test "x${PKG_CONFIG:=none}" != xnone; then
16561 echo "$as_me:16561: checking pkg-config for $MENU_NAME$cf_cv_libtype" >&5
16562 echo $ECHO_N "checking pkg-config for $MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
16563 if "$PKG_CONFIG" --exists $MENU_NAME$cf_cv_libtype ; then
16564 echo "$as_me:16564: result: yes" >&5
16565 echo "${ECHO_T}yes" >&6
16567 echo "$as_me:16567: checking if the $MENU_NAME$cf_cv_libtype package files work" >&5
16568 echo $ECHO_N "checking if the $MENU_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
16570 cf_save_CPPFLAGS="$CPPFLAGS"
16571 cf_save_LIBS="$LIBS"
16576 cf_new_extra_cppflags=
16578 for cf_add_cflags in `$PKG_CONFIG --cflags $MENU_NAME$cf_cv_libtype`
16580 case $cf_fix_cppflags in
16582 case $cf_add_cflags in
16583 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16584 case $cf_add_cflags in
16586 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16588 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16589 && test -z "${cf_tst_cflags}" \
16590 && cf_fix_cppflags=yes
16592 if test $cf_fix_cppflags = yes ; then
16594 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16595 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16598 elif test "${cf_tst_cflags}" = "\"'" ; then
16600 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16601 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16607 case "$CPPFLAGS" in
16611 case $cf_add_cflags in
16613 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16615 CPPFLAGS=`echo "$CPPFLAGS" | \
16616 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16617 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16622 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16623 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16630 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16631 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16638 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16639 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16641 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16643 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16644 && test -z "${cf_tst_cflags}" \
16645 && cf_fix_cppflags=no
16650 if test -n "$cf_new_cflags" ; then
16652 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16653 CFLAGS="${CFLAGS}$cf_new_cflags"
16657 if test -n "$cf_new_cppflags" ; then
16659 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16660 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16664 if test -n "$cf_new_extra_cppflags" ; then
16666 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16667 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16671 cf_add_libs="$LIBS"
16674 for cf_add_1lib in `$PKG_CONFIG --libs $MENU_NAME$cf_cv_libtype`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16675 # filter duplicates
16676 for cf_add_1lib in $cf_add_0lib; do
16677 for cf_add_2lib in $cf_add_libs; do
16678 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16683 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16685 LIBS="$cf_add_libs"
16687 cat >conftest.$ac_ext <<_ACEOF
16688 #line 16688 "configure"
16689 #include "confdefs.h"
16690 #include <$MENU_NAME.h>
16694 (void) menu_driver ( 0,0 );
16699 rm -f conftest.$ac_objext conftest$ac_exeext
16700 if { (eval echo "$as_me:16700: \"$ac_link\"") >&5
16701 (eval $ac_link) 2>&5
16703 echo "$as_me:16703: \$? = $ac_status" >&5
16704 (exit $ac_status); } &&
16705 { ac_try='test -s conftest$ac_exeext'
16706 { (eval echo "$as_me:16706: \"$ac_try\"") >&5
16707 (eval $ac_try) 2>&5
16709 echo "$as_me:16709: \$? = $ac_status" >&5
16710 (exit $ac_status); }; }; then
16711 if test "$cross_compiling" = yes; then
16712 cf_have_curses_lib=maybe
16714 cat >conftest.$ac_ext <<_ACEOF
16715 #line 16715 "configure"
16716 #include "confdefs.h"
16717 #include <$MENU_NAME.h>
16719 { (void) menu_driver ( 0,0 ); return 0; }
16721 rm -f conftest$ac_exeext
16722 if { (eval echo "$as_me:16722: \"$ac_link\"") >&5
16723 (eval $ac_link) 2>&5
16725 echo "$as_me:16725: \$? = $ac_status" >&5
16726 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16727 { (eval echo "$as_me:16727: \"$ac_try\"") >&5
16728 (eval $ac_try) 2>&5
16730 echo "$as_me:16730: \$? = $ac_status" >&5
16731 (exit $ac_status); }; }; then
16732 cf_have_curses_lib=yes
16734 echo "$as_me: program exited with status $ac_status" >&5
16735 echo "$as_me: failed program was:" >&5
16736 cat conftest.$ac_ext >&5
16737 cf_have_curses_lib=no
16739 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16742 echo "$as_me: failed program was:" >&5
16743 cat conftest.$ac_ext >&5
16744 cf_have_curses_lib=no
16746 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16747 echo "$as_me:16747: result: $cf_have_curses_lib" >&5
16748 echo "${ECHO_T}$cf_have_curses_lib" >&6
16749 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
16750 if test "$cf_have_curses_lib" != "yes"
16752 CPPFLAGS="$cf_save_CPPFLAGS"
16753 LIBS="$cf_save_LIBS"
16756 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16758 cat >>confdefs.h <<EOF
16759 #define $cf_upper 1
16765 if test "$cf_have_curses_lib" = no; then
16766 as_ac_Lib=`echo "ac_cv_lib_$MENU_NAME$cf_cv_libtype''_menu_driver" | $as_tr_sh`
16767 echo "$as_me:16767: checking for menu_driver in -l$MENU_NAME$cf_cv_libtype" >&5
16768 echo $ECHO_N "checking for menu_driver in -l$MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
16769 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16770 echo $ECHO_N "(cached) $ECHO_C" >&6
16772 ac_check_lib_save_LIBS=$LIBS
16773 LIBS="-l$MENU_NAME$cf_cv_libtype $LIBS"
16774 cat >conftest.$ac_ext <<_ACEOF
16775 #line 16775 "configure"
16776 #include "confdefs.h"
16778 /* Override any gcc2 internal prototype to avoid an error. */
16782 /* We use char because int might match the return type of a gcc2
16783 builtin and then its argument prototype would still apply. */
16784 char menu_driver ();
16793 rm -f conftest.$ac_objext conftest$ac_exeext
16794 if { (eval echo "$as_me:16794: \"$ac_link\"") >&5
16795 (eval $ac_link) 2>&5
16797 echo "$as_me:16797: \$? = $ac_status" >&5
16798 (exit $ac_status); } &&
16799 { ac_try='test -s conftest$ac_exeext'
16800 { (eval echo "$as_me:16800: \"$ac_try\"") >&5
16801 (eval $ac_try) 2>&5
16803 echo "$as_me:16803: \$? = $ac_status" >&5
16804 (exit $ac_status); }; }; then
16805 eval "$as_ac_Lib=yes"
16807 echo "$as_me: failed program was:" >&5
16808 cat conftest.$ac_ext >&5
16809 eval "$as_ac_Lib=no"
16811 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16812 LIBS=$ac_check_lib_save_LIBS
16814 echo "$as_me:16814: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16815 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16816 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16818 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16820 cf_add_libs="$LIBS"
16823 for cf_add_1lib in -l$MENU_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16824 # filter duplicates
16825 for cf_add_1lib in $cf_add_0lib; do
16826 for cf_add_2lib in $cf_add_libs; do
16827 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16832 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16834 LIBS="$cf_add_libs"
16836 cat >>confdefs.h <<EOF
16837 #define $cf_upper 1
16844 cf_curses_headers="$cf_curses_headers menu.h"
16847 echo "$as_me:16847: checking if you want to check for form functions" >&5
16848 echo $ECHO_N "checking if you want to check for form functions... $ECHO_C" >&6
16850 # Check whether --enable-form or --disable-form was given.
16851 if test "${enable_form+set}" = set; then
16852 enableval="$enable_form"
16853 test "$enableval" != no && enableval=yes
16854 if test "$enableval" != "yes" ; then
16857 cf_enable_form=$cf_default_form
16861 cf_enable_form=$cf_default_form
16864 echo "$as_me:16864: result: $cf_enable_form" >&5
16865 echo "${ECHO_T}$cf_enable_form" >&6
16866 if test $cf_enable_form = yes
16868 case $cf_cv_screen in
16873 echo "$as_me:16873: checking for NetBSD form.h" >&5
16874 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
16875 if test "${cf_cv_netbsd_form_h+set}" = set; then
16876 echo $ECHO_N "(cached) $ECHO_C" >&6
16879 cat >conftest.$ac_ext <<_ACEOF
16880 #line 16880 "configure"
16881 #include "confdefs.h"
16883 #include <${cf_cv_ncurses_header:-curses.h}>
16891 int y = current_field(form)->cursor_ypos;
16892 int x = current_field(form)->cursor_xpos;
16898 rm -f conftest.$ac_objext
16899 if { (eval echo "$as_me:16899: \"$ac_compile\"") >&5
16900 (eval $ac_compile) 2>&5
16902 echo "$as_me:16902: \$? = $ac_status" >&5
16903 (exit $ac_status); } &&
16904 { ac_try='test -s conftest.$ac_objext'
16905 { (eval echo "$as_me:16905: \"$ac_try\"") >&5
16906 (eval $ac_try) 2>&5
16908 echo "$as_me:16908: \$? = $ac_status" >&5
16909 (exit $ac_status); }; }; then
16910 cf_cv_netbsd_form_h=yes
16913 echo "$as_me: failed program was:" >&5
16914 cat conftest.$ac_ext >&5
16915 cf_cv_netbsd_form_h=no
16917 rm -f conftest.$ac_objext conftest.$ac_ext
16920 echo "$as_me:16920: result: $cf_cv_netbsd_form_h" >&5
16921 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
16923 test "$cf_cv_netbsd_form_h" = yes &&
16924 cat >>confdefs.h <<\EOF
16925 #define HAVE_NETBSD_FORM_H 1
16931 cf_have_curses_lib=no
16933 : ${NCURSES_CONFIG_PKG:=none}
16934 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16936 elif test "x${PKG_CONFIG:=none}" != xnone; then
16937 echo "$as_me:16937: checking pkg-config for $FORM_NAME$cf_cv_libtype" >&5
16938 echo $ECHO_N "checking pkg-config for $FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
16939 if "$PKG_CONFIG" --exists $FORM_NAME$cf_cv_libtype ; then
16940 echo "$as_me:16940: result: yes" >&5
16941 echo "${ECHO_T}yes" >&6
16943 echo "$as_me:16943: checking if the $FORM_NAME$cf_cv_libtype package files work" >&5
16944 echo $ECHO_N "checking if the $FORM_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
16946 cf_save_CPPFLAGS="$CPPFLAGS"
16947 cf_save_LIBS="$LIBS"
16952 cf_new_extra_cppflags=
16954 for cf_add_cflags in `$PKG_CONFIG --cflags $FORM_NAME$cf_cv_libtype`
16956 case $cf_fix_cppflags in
16958 case $cf_add_cflags in
16959 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16960 case $cf_add_cflags in
16962 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16964 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16965 && test -z "${cf_tst_cflags}" \
16966 && cf_fix_cppflags=yes
16968 if test $cf_fix_cppflags = yes ; then
16970 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16971 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16974 elif test "${cf_tst_cflags}" = "\"'" ; then
16976 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16977 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16983 case "$CPPFLAGS" in
16987 case $cf_add_cflags in
16989 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16991 CPPFLAGS=`echo "$CPPFLAGS" | \
16992 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16993 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16998 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16999 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17006 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17007 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17014 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17015 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17017 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17019 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17020 && test -z "${cf_tst_cflags}" \
17021 && cf_fix_cppflags=no
17026 if test -n "$cf_new_cflags" ; then
17028 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17029 CFLAGS="${CFLAGS}$cf_new_cflags"
17033 if test -n "$cf_new_cppflags" ; then
17035 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17036 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17040 if test -n "$cf_new_extra_cppflags" ; then
17042 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17043 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17047 cf_add_libs="$LIBS"
17050 for cf_add_1lib in `$PKG_CONFIG --libs $FORM_NAME$cf_cv_libtype`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17051 # filter duplicates
17052 for cf_add_1lib in $cf_add_0lib; do
17053 for cf_add_2lib in $cf_add_libs; do
17054 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17059 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17061 LIBS="$cf_add_libs"
17063 cat >conftest.$ac_ext <<_ACEOF
17064 #line 17064 "configure"
17065 #include "confdefs.h"
17066 #include <$FORM_NAME.h>
17070 (void) form_driver ( 0,0 );
17075 rm -f conftest.$ac_objext conftest$ac_exeext
17076 if { (eval echo "$as_me:17076: \"$ac_link\"") >&5
17077 (eval $ac_link) 2>&5
17079 echo "$as_me:17079: \$? = $ac_status" >&5
17080 (exit $ac_status); } &&
17081 { ac_try='test -s conftest$ac_exeext'
17082 { (eval echo "$as_me:17082: \"$ac_try\"") >&5
17083 (eval $ac_try) 2>&5
17085 echo "$as_me:17085: \$? = $ac_status" >&5
17086 (exit $ac_status); }; }; then
17087 if test "$cross_compiling" = yes; then
17088 cf_have_curses_lib=maybe
17090 cat >conftest.$ac_ext <<_ACEOF
17091 #line 17091 "configure"
17092 #include "confdefs.h"
17093 #include <$FORM_NAME.h>
17095 { (void) form_driver ( 0,0 ); return 0; }
17097 rm -f conftest$ac_exeext
17098 if { (eval echo "$as_me:17098: \"$ac_link\"") >&5
17099 (eval $ac_link) 2>&5
17101 echo "$as_me:17101: \$? = $ac_status" >&5
17102 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17103 { (eval echo "$as_me:17103: \"$ac_try\"") >&5
17104 (eval $ac_try) 2>&5
17106 echo "$as_me:17106: \$? = $ac_status" >&5
17107 (exit $ac_status); }; }; then
17108 cf_have_curses_lib=yes
17110 echo "$as_me: program exited with status $ac_status" >&5
17111 echo "$as_me: failed program was:" >&5
17112 cat conftest.$ac_ext >&5
17113 cf_have_curses_lib=no
17115 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17118 echo "$as_me: failed program was:" >&5
17119 cat conftest.$ac_ext >&5
17120 cf_have_curses_lib=no
17122 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17123 echo "$as_me:17123: result: $cf_have_curses_lib" >&5
17124 echo "${ECHO_T}$cf_have_curses_lib" >&6
17125 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17126 if test "$cf_have_curses_lib" != "yes"
17128 CPPFLAGS="$cf_save_CPPFLAGS"
17129 LIBS="$cf_save_LIBS"
17132 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17134 cat >>confdefs.h <<EOF
17135 #define $cf_upper 1
17141 if test "$cf_have_curses_lib" = no; then
17142 as_ac_Lib=`echo "ac_cv_lib_$FORM_NAME$cf_cv_libtype''_form_driver" | $as_tr_sh`
17143 echo "$as_me:17143: checking for form_driver in -l$FORM_NAME$cf_cv_libtype" >&5
17144 echo $ECHO_N "checking for form_driver in -l$FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
17145 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17146 echo $ECHO_N "(cached) $ECHO_C" >&6
17148 ac_check_lib_save_LIBS=$LIBS
17149 LIBS="-l$FORM_NAME$cf_cv_libtype $LIBS"
17150 cat >conftest.$ac_ext <<_ACEOF
17151 #line 17151 "configure"
17152 #include "confdefs.h"
17154 /* Override any gcc2 internal prototype to avoid an error. */
17158 /* We use char because int might match the return type of a gcc2
17159 builtin and then its argument prototype would still apply. */
17160 char form_driver ();
17169 rm -f conftest.$ac_objext conftest$ac_exeext
17170 if { (eval echo "$as_me:17170: \"$ac_link\"") >&5
17171 (eval $ac_link) 2>&5
17173 echo "$as_me:17173: \$? = $ac_status" >&5
17174 (exit $ac_status); } &&
17175 { ac_try='test -s conftest$ac_exeext'
17176 { (eval echo "$as_me:17176: \"$ac_try\"") >&5
17177 (eval $ac_try) 2>&5
17179 echo "$as_me:17179: \$? = $ac_status" >&5
17180 (exit $ac_status); }; }; then
17181 eval "$as_ac_Lib=yes"
17183 echo "$as_me: failed program was:" >&5
17184 cat conftest.$ac_ext >&5
17185 eval "$as_ac_Lib=no"
17187 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17188 LIBS=$ac_check_lib_save_LIBS
17190 echo "$as_me:17190: result: `eval echo '${'$as_ac_Lib'}'`" >&5
17191 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
17192 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
17194 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17196 cf_add_libs="$LIBS"
17199 for cf_add_1lib in -l$FORM_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17200 # filter duplicates
17201 for cf_add_1lib in $cf_add_0lib; do
17202 for cf_add_2lib in $cf_add_libs; do
17203 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17208 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17210 LIBS="$cf_add_libs"
17212 cat >>confdefs.h <<EOF
17213 #define $cf_upper 1
17220 cf_curses_headers="$cf_curses_headers form.h"
17223 # look for curses-related headers
17225 for ac_header in $cf_curses_headers
17227 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17228 echo "$as_me:17228: checking for $ac_header" >&5
17229 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17230 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17231 echo $ECHO_N "(cached) $ECHO_C" >&6
17233 cat >conftest.$ac_ext <<_ACEOF
17234 #line 17234 "configure"
17235 #include "confdefs.h"
17236 #include <$ac_header>
17238 if { (eval echo "$as_me:17238: \"$ac_cpp conftest.$ac_ext\"") >&5
17239 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17241 egrep -v '^ *\+' conftest.er1 >conftest.err
17243 cat conftest.err >&5
17244 echo "$as_me:17244: \$? = $ac_status" >&5
17245 (exit $ac_status); } >/dev/null; then
17246 if test -s conftest.err; then
17247 ac_cpp_err=$ac_c_preproc_warn_flag
17254 if test -z "$ac_cpp_err"; then
17255 eval "$as_ac_Header=yes"
17257 echo "$as_me: failed program was:" >&5
17258 cat conftest.$ac_ext >&5
17259 eval "$as_ac_Header=no"
17261 rm -f conftest.err conftest.$ac_ext
17263 echo "$as_me:17263: result: `eval echo '${'$as_ac_Header'}'`" >&5
17264 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17265 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17266 cat >>confdefs.h <<EOF
17267 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17273 echo "$as_me:17273: checking for ANSI C header files" >&5
17274 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
17275 if test "${ac_cv_header_stdc+set}" = set; then
17276 echo $ECHO_N "(cached) $ECHO_C" >&6
17278 cat >conftest.$ac_ext <<_ACEOF
17279 #line 17279 "configure"
17280 #include "confdefs.h"
17281 #include <stdlib.h>
17282 #include <stdarg.h>
17283 #include <string.h>
17287 if { (eval echo "$as_me:17287: \"$ac_cpp conftest.$ac_ext\"") >&5
17288 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17290 egrep -v '^ *\+' conftest.er1 >conftest.err
17292 cat conftest.err >&5
17293 echo "$as_me:17293: \$? = $ac_status" >&5
17294 (exit $ac_status); } >/dev/null; then
17295 if test -s conftest.err; then
17296 ac_cpp_err=$ac_c_preproc_warn_flag
17303 if test -z "$ac_cpp_err"; then
17304 ac_cv_header_stdc=yes
17306 echo "$as_me: failed program was:" >&5
17307 cat conftest.$ac_ext >&5
17308 ac_cv_header_stdc=no
17310 rm -f conftest.err conftest.$ac_ext
17312 if test $ac_cv_header_stdc = yes; then
17313 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
17314 cat >conftest.$ac_ext <<_ACEOF
17315 #line 17315 "configure"
17316 #include "confdefs.h"
17317 #include <string.h>
17320 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17321 egrep "memchr" >/dev/null 2>&1; then
17324 ac_cv_header_stdc=no
17330 if test $ac_cv_header_stdc = yes; then
17331 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
17332 cat >conftest.$ac_ext <<_ACEOF
17333 #line 17333 "configure"
17334 #include "confdefs.h"
17335 #include <stdlib.h>
17338 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17339 egrep "free" >/dev/null 2>&1; then
17342 ac_cv_header_stdc=no
17348 if test $ac_cv_header_stdc = yes; then
17349 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
17350 if test "$cross_compiling" = yes; then
17353 cat >conftest.$ac_ext <<_ACEOF
17354 #line 17354 "configure"
17355 #include "confdefs.h"
17357 #if ((' ' & 0x0FF) == 0x020)
17358 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
17359 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
17361 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
17362 || ('j' <= (c) && (c) <= 'r') \
17363 || ('s' <= (c) && (c) <= 'z'))
17364 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
17367 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
17372 for (i = 0; i < 256; i++)
17373 if (XOR (islower (i), ISLOWER (i))
17374 || toupper (i) != TOUPPER (i))
17375 $ac_main_return(2);
17376 $ac_main_return (0);
17379 rm -f conftest$ac_exeext
17380 if { (eval echo "$as_me:17380: \"$ac_link\"") >&5
17381 (eval $ac_link) 2>&5
17383 echo "$as_me:17383: \$? = $ac_status" >&5
17384 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17385 { (eval echo "$as_me:17385: \"$ac_try\"") >&5
17386 (eval $ac_try) 2>&5
17388 echo "$as_me:17388: \$? = $ac_status" >&5
17389 (exit $ac_status); }; }; then
17392 echo "$as_me: program exited with status $ac_status" >&5
17393 echo "$as_me: failed program was:" >&5
17394 cat conftest.$ac_ext >&5
17395 ac_cv_header_stdc=no
17397 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17401 echo "$as_me:17401: result: $ac_cv_header_stdc" >&5
17402 echo "${ECHO_T}$ac_cv_header_stdc" >&6
17403 if test $ac_cv_header_stdc = yes; then
17405 cat >>confdefs.h <<\EOF
17406 #define STDC_HEADERS 1
17411 echo "$as_me:17411: checking whether time.h and sys/time.h may both be included" >&5
17412 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17413 if test "${ac_cv_header_time+set}" = set; then
17414 echo $ECHO_N "(cached) $ECHO_C" >&6
17416 cat >conftest.$ac_ext <<_ACEOF
17417 #line 17417 "configure"
17418 #include "confdefs.h"
17419 #include <sys/types.h>
17420 #include <sys/time.h>
17426 if ((struct tm *) 0)
17432 rm -f conftest.$ac_objext
17433 if { (eval echo "$as_me:17433: \"$ac_compile\"") >&5
17434 (eval $ac_compile) 2>&5
17436 echo "$as_me:17436: \$? = $ac_status" >&5
17437 (exit $ac_status); } &&
17438 { ac_try='test -s conftest.$ac_objext'
17439 { (eval echo "$as_me:17439: \"$ac_try\"") >&5
17440 (eval $ac_try) 2>&5
17442 echo "$as_me:17442: \$? = $ac_status" >&5
17443 (exit $ac_status); }; }; then
17444 ac_cv_header_time=yes
17446 echo "$as_me: failed program was:" >&5
17447 cat conftest.$ac_ext >&5
17448 ac_cv_header_time=no
17450 rm -f conftest.$ac_objext conftest.$ac_ext
17452 echo "$as_me:17452: result: $ac_cv_header_time" >&5
17453 echo "${ECHO_T}$ac_cv_header_time" >&6
17454 if test $ac_cv_header_time = yes; then
17456 cat >>confdefs.h <<\EOF
17457 #define TIME_WITH_SYS_TIME 1
17475 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17476 echo "$as_me:17476: checking for $ac_header" >&5
17477 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17478 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17479 echo $ECHO_N "(cached) $ECHO_C" >&6
17481 cat >conftest.$ac_ext <<_ACEOF
17482 #line 17482 "configure"
17483 #include "confdefs.h"
17484 #include <$ac_header>
17486 if { (eval echo "$as_me:17486: \"$ac_cpp conftest.$ac_ext\"") >&5
17487 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17489 egrep -v '^ *\+' conftest.er1 >conftest.err
17491 cat conftest.err >&5
17492 echo "$as_me:17492: \$? = $ac_status" >&5
17493 (exit $ac_status); } >/dev/null; then
17494 if test -s conftest.err; then
17495 ac_cpp_err=$ac_c_preproc_warn_flag
17502 if test -z "$ac_cpp_err"; then
17503 eval "$as_ac_Header=yes"
17505 echo "$as_me: failed program was:" >&5
17506 cat conftest.$ac_ext >&5
17507 eval "$as_ac_Header=no"
17509 rm -f conftest.err conftest.$ac_ext
17511 echo "$as_me:17511: result: `eval echo '${'$as_ac_Header'}'`" >&5
17512 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17513 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17514 cat >>confdefs.h <<EOF
17515 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17521 for ac_header in unistd.h getopt.h
17523 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17524 echo "$as_me:17524: checking for $ac_header" >&5
17525 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17526 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17527 echo $ECHO_N "(cached) $ECHO_C" >&6
17529 cat >conftest.$ac_ext <<_ACEOF
17530 #line 17530 "configure"
17531 #include "confdefs.h"
17532 #include <$ac_header>
17534 if { (eval echo "$as_me:17534: \"$ac_cpp conftest.$ac_ext\"") >&5
17535 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17537 egrep -v '^ *\+' conftest.er1 >conftest.err
17539 cat conftest.err >&5
17540 echo "$as_me:17540: \$? = $ac_status" >&5
17541 (exit $ac_status); } >/dev/null; then
17542 if test -s conftest.err; then
17543 ac_cpp_err=$ac_c_preproc_warn_flag
17550 if test -z "$ac_cpp_err"; then
17551 eval "$as_ac_Header=yes"
17553 echo "$as_me: failed program was:" >&5
17554 cat conftest.$ac_ext >&5
17555 eval "$as_ac_Header=no"
17557 rm -f conftest.err conftest.$ac_ext
17559 echo "$as_me:17559: result: `eval echo '${'$as_ac_Header'}'`" >&5
17560 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17561 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17562 cat >>confdefs.h <<EOF
17563 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17569 echo "$as_me:17569: checking for header declaring getopt variables" >&5
17570 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
17571 if test "${cf_cv_getopt_header+set}" = set; then
17572 echo $ECHO_N "(cached) $ECHO_C" >&6
17575 cf_cv_getopt_header=none
17576 for cf_header in stdio.h stdlib.h unistd.h getopt.h
17578 cat >conftest.$ac_ext <<_ACEOF
17579 #line 17579 "configure"
17580 #include "confdefs.h"
17582 #include <$cf_header>
17586 int x = optind; char *y = optarg
17591 rm -f conftest.$ac_objext
17592 if { (eval echo "$as_me:17592: \"$ac_compile\"") >&5
17593 (eval $ac_compile) 2>&5
17595 echo "$as_me:17595: \$? = $ac_status" >&5
17596 (exit $ac_status); } &&
17597 { ac_try='test -s conftest.$ac_objext'
17598 { (eval echo "$as_me:17598: \"$ac_try\"") >&5
17599 (eval $ac_try) 2>&5
17601 echo "$as_me:17601: \$? = $ac_status" >&5
17602 (exit $ac_status); }; }; then
17603 cf_cv_getopt_header=$cf_header
17606 echo "$as_me: failed program was:" >&5
17607 cat conftest.$ac_ext >&5
17609 rm -f conftest.$ac_objext conftest.$ac_ext
17613 echo "$as_me:17613: result: $cf_cv_getopt_header" >&5
17614 echo "${ECHO_T}$cf_cv_getopt_header" >&6
17615 if test $cf_cv_getopt_header != none ; then
17617 cat >>confdefs.h <<\EOF
17618 #define HAVE_GETOPT_HEADER 1
17622 if test $cf_cv_getopt_header = getopt.h ; then
17624 cat >>confdefs.h <<\EOF
17625 #define NEED_GETOPT_H 1
17639 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17640 echo "$as_me:17640: checking for $ac_func" >&5
17641 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17642 if eval "test \"\${$as_ac_var+set}\" = set"; then
17643 echo $ECHO_N "(cached) $ECHO_C" >&6
17645 cat >conftest.$ac_ext <<_ACEOF
17646 #line 17646 "configure"
17647 #include "confdefs.h"
17648 #define $ac_func autoconf_temporary
17649 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17656 /* We use char because int might match the return type of a gcc2
17657 builtin and then its argument prototype would still apply. */
17658 char $ac_func (void);
17664 /* The GNU C library defines stubs for functions which it implements
17665 to always fail with ENOSYS. Some functions are actually named
17666 something starting with __ and the normal name is an alias. */
17667 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17668 #error found stub for $ac_func
17671 return $ac_func ();
17676 rm -f conftest.$ac_objext conftest$ac_exeext
17677 if { (eval echo "$as_me:17677: \"$ac_link\"") >&5
17678 (eval $ac_link) 2>&5
17680 echo "$as_me:17680: \$? = $ac_status" >&5
17681 (exit $ac_status); } &&
17682 { ac_try='test -s conftest$ac_exeext'
17683 { (eval echo "$as_me:17683: \"$ac_try\"") >&5
17684 (eval $ac_try) 2>&5
17686 echo "$as_me:17686: \$? = $ac_status" >&5
17687 (exit $ac_status); }; }; then
17688 eval "$as_ac_var=yes"
17690 echo "$as_me: failed program was:" >&5
17691 cat conftest.$ac_ext >&5
17692 eval "$as_ac_var=no"
17694 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17696 echo "$as_me:17696: result: `eval echo '${'$as_ac_var'}'`" >&5
17697 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17698 if test `eval echo '${'$as_ac_var'}'` = yes; then
17699 cat >>confdefs.h <<EOF
17700 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17706 # use a compile-check to work with ncurses*-config and subdirectory includes
17707 echo "$as_me:17707: checking if we can use termcap.h" >&5
17708 echo $ECHO_N "checking if we can use termcap.h... $ECHO_C" >&6
17709 if test "${cf_cv_have_termcap_h+set}" = set; then
17710 echo $ECHO_N "(cached) $ECHO_C" >&6
17713 cat >conftest.$ac_ext <<_ACEOF
17714 #line 17714 "configure"
17715 #include "confdefs.h"
17717 #include <curses.h>
17718 #ifdef NCURSES_VERSION
17719 #undef NCURSES_VERSION
17721 #include <termcap.h>
17722 #ifndef NCURSES_VERSION
17723 #error wrong header
17734 rm -f conftest.$ac_objext
17735 if { (eval echo "$as_me:17735: \"$ac_compile\"") >&5
17736 (eval $ac_compile) 2>&5
17738 echo "$as_me:17738: \$? = $ac_status" >&5
17739 (exit $ac_status); } &&
17740 { ac_try='test -s conftest.$ac_objext'
17741 { (eval echo "$as_me:17741: \"$ac_try\"") >&5
17742 (eval $ac_try) 2>&5
17744 echo "$as_me:17744: \$? = $ac_status" >&5
17745 (exit $ac_status); }; }; then
17746 cf_cv_have_termcap_h=yes
17748 echo "$as_me: failed program was:" >&5
17749 cat conftest.$ac_ext >&5
17750 cf_cv_have_termcap_h=no
17752 rm -f conftest.$ac_objext conftest.$ac_ext
17754 echo "$as_me:17754: result: $cf_cv_have_termcap_h" >&5
17755 echo "${ECHO_T}$cf_cv_have_termcap_h" >&6
17756 if test "x$cf_cv_have_termcap_h" = xyes
17759 cat >>confdefs.h <<\EOF
17760 #define HAVE_TERMCAP_H 1
17764 echo "$as_me:17764: checking if we can use ncurses/termcap.h" >&5
17765 echo $ECHO_N "checking if we can use ncurses/termcap.h... $ECHO_C" >&6
17766 if test "${cf_cv_have_ncurses_termcap_h+set}" = set; then
17767 echo $ECHO_N "(cached) $ECHO_C" >&6
17770 cat >conftest.$ac_ext <<_ACEOF
17771 #line 17771 "configure"
17772 #include "confdefs.h"
17774 #include <ncurses/curses.h>
17775 #ifdef NCURSES_VERSION
17776 #undef NCURSES_VERSION
17778 #include <ncurses/termcap.h>
17779 #ifndef NCURSES_VERSION
17780 #error wrong header
17791 rm -f conftest.$ac_objext
17792 if { (eval echo "$as_me:17792: \"$ac_compile\"") >&5
17793 (eval $ac_compile) 2>&5
17795 echo "$as_me:17795: \$? = $ac_status" >&5
17796 (exit $ac_status); } &&
17797 { ac_try='test -s conftest.$ac_objext'
17798 { (eval echo "$as_me:17798: \"$ac_try\"") >&5
17799 (eval $ac_try) 2>&5
17801 echo "$as_me:17801: \$? = $ac_status" >&5
17802 (exit $ac_status); }; }; then
17803 cf_cv_have_ncurses_termcap_h=yes
17805 echo "$as_me: failed program was:" >&5
17806 cat conftest.$ac_ext >&5
17807 cf_cv_have_ncurses_termcap_h=no
17809 rm -f conftest.$ac_objext conftest.$ac_ext
17811 echo "$as_me:17811: result: $cf_cv_have_ncurses_termcap_h" >&5
17812 echo "${ECHO_T}$cf_cv_have_ncurses_termcap_h" >&6
17813 test "x$cf_cv_have_ncurses_termcap_h" = xyes &&
17814 cat >>confdefs.h <<\EOF
17815 #define HAVE_NCURSES_TERMCAP_H 1
17820 if test "x$ac_cv_func_getopt" = xno; then
17821 { { echo "$as_me:17821: error: getopt is required for building programs" >&5
17822 echo "$as_me: error: getopt is required for building programs" >&2;}
17823 { (exit 1); exit 1; }; }
17826 if test "$cf_enable_widec" = yes; then
17839 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17840 echo "$as_me:17840: checking for $ac_func" >&5
17841 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17842 if eval "test \"\${$as_ac_var+set}\" = set"; then
17843 echo $ECHO_N "(cached) $ECHO_C" >&6
17845 cat >conftest.$ac_ext <<_ACEOF
17846 #line 17846 "configure"
17847 #include "confdefs.h"
17848 #define $ac_func autoconf_temporary
17849 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17856 /* We use char because int might match the return type of a gcc2
17857 builtin and then its argument prototype would still apply. */
17858 char $ac_func (void);
17864 /* The GNU C library defines stubs for functions which it implements
17865 to always fail with ENOSYS. Some functions are actually named
17866 something starting with __ and the normal name is an alias. */
17867 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17868 #error found stub for $ac_func
17871 return $ac_func ();
17876 rm -f conftest.$ac_objext conftest$ac_exeext
17877 if { (eval echo "$as_me:17877: \"$ac_link\"") >&5
17878 (eval $ac_link) 2>&5
17880 echo "$as_me:17880: \$? = $ac_status" >&5
17881 (exit $ac_status); } &&
17882 { ac_try='test -s conftest$ac_exeext'
17883 { (eval echo "$as_me:17883: \"$ac_try\"") >&5
17884 (eval $ac_try) 2>&5
17886 echo "$as_me:17886: \$? = $ac_status" >&5
17887 (exit $ac_status); }; }; then
17888 eval "$as_ac_var=yes"
17890 echo "$as_me: failed program was:" >&5
17891 cat conftest.$ac_ext >&5
17892 eval "$as_ac_var=no"
17894 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17896 echo "$as_me:17896: result: `eval echo '${'$as_ac_var'}'`" >&5
17897 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17898 if test `eval echo '${'$as_ac_var'}'` = yes; then
17899 cat >>confdefs.h <<EOF
17900 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17908 echo "$as_me:17908: checking definition to turn on extended curses functions" >&5
17909 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
17910 if test "${cf_cv_need_xopen_extension+set}" = set; then
17911 echo $ECHO_N "(cached) $ECHO_C" >&6
17914 cf_cv_need_xopen_extension=unknown
17915 cat >conftest.$ac_ext <<_ACEOF
17916 #line 17916 "configure"
17917 #include "confdefs.h"
17919 #include <stdlib.h>
17920 #include <${cf_cv_ncurses_header:-curses.h}>
17925 #if defined(NCURSES_VERSION_PATCH)
17926 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
17930 #ifdef NCURSES_VERSION
17932 int check2 = curs_set((int)sizeof(check));
17934 long x = winnstr(stdscr, "", 0);
17936 #ifdef NCURSES_VERSION
17939 getbegyx(stdscr, y1, x1);
17948 rm -f conftest.$ac_objext conftest$ac_exeext
17949 if { (eval echo "$as_me:17949: \"$ac_link\"") >&5
17950 (eval $ac_link) 2>&5
17952 echo "$as_me:17952: \$? = $ac_status" >&5
17953 (exit $ac_status); } &&
17954 { ac_try='test -s conftest$ac_exeext'
17955 { (eval echo "$as_me:17955: \"$ac_try\"") >&5
17956 (eval $ac_try) 2>&5
17958 echo "$as_me:17958: \$? = $ac_status" >&5
17959 (exit $ac_status); }; }; then
17960 cf_cv_need_xopen_extension=none
17962 echo "$as_me: failed program was:" >&5
17963 cat conftest.$ac_ext >&5
17965 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
17967 cat >conftest.$ac_ext <<_ACEOF
17968 #line 17968 "configure"
17969 #include "confdefs.h"
17971 #define $cf_try_xopen_extension 1
17972 #include <stdlib.h>
17973 #include <${cf_cv_ncurses_header:-curses.h}>
17978 #ifdef NCURSES_VERSION
17980 int check2 = curs_set((int)sizeof(check));
17982 long x = winnstr(stdscr, "", 0);
17984 getbegyx(stdscr, y1, x1);
17985 #ifdef NCURSES_VERSION
17996 rm -f conftest.$ac_objext conftest$ac_exeext
17997 if { (eval echo "$as_me:17997: \"$ac_link\"") >&5
17998 (eval $ac_link) 2>&5
18000 echo "$as_me:18000: \$? = $ac_status" >&5
18001 (exit $ac_status); } &&
18002 { ac_try='test -s conftest$ac_exeext'
18003 { (eval echo "$as_me:18003: \"$ac_try\"") >&5
18004 (eval $ac_try) 2>&5
18006 echo "$as_me:18006: \$? = $ac_status" >&5
18007 (exit $ac_status); }; }; then
18008 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
18010 echo "$as_me: failed program was:" >&5
18011 cat conftest.$ac_ext >&5
18013 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18017 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18020 echo "$as_me:18020: result: $cf_cv_need_xopen_extension" >&5
18021 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
18023 case $cf_cv_need_xopen_extension in
18026 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18027 CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
18032 echo "$as_me:18032: checking for term.h" >&5
18033 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
18034 if test "${cf_cv_term_header+set}" = set; then
18035 echo $ECHO_N "(cached) $ECHO_C" >&6
18038 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
18039 # for <term.h> if we do not find the variant.
18041 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
18043 case ${cf_cv_ncurses_header:-curses.h} in
18045 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
18046 cf_header_list="$cf_header_item $cf_header_list"
18050 for cf_header in $cf_header_list
18052 cat >conftest.$ac_ext <<_ACEOF
18053 #line 18053 "configure"
18054 #include "confdefs.h"
18056 #include <${cf_cv_ncurses_header:-curses.h}>
18057 #include <${cf_header}>
18066 rm -f conftest.$ac_objext
18067 if { (eval echo "$as_me:18067: \"$ac_compile\"") >&5
18068 (eval $ac_compile) 2>&5
18070 echo "$as_me:18070: \$? = $ac_status" >&5
18071 (exit $ac_status); } &&
18072 { ac_try='test -s conftest.$ac_objext'
18073 { (eval echo "$as_me:18073: \"$ac_try\"") >&5
18074 (eval $ac_try) 2>&5
18076 echo "$as_me:18076: \$? = $ac_status" >&5
18077 (exit $ac_status); }; }; then
18078 cf_cv_term_header=$cf_header
18081 echo "$as_me: failed program was:" >&5
18082 cat conftest.$ac_ext >&5
18083 cf_cv_term_header=no
18085 rm -f conftest.$ac_objext conftest.$ac_ext
18088 case $cf_cv_term_header in
18090 # If curses is ncurses, some packagers still mess it up by trying to make
18091 # us use GNU termcap. This handles the most common case.
18092 for cf_header in ncurses/term.h ncursesw/term.h
18094 cat >conftest.$ac_ext <<_ACEOF
18095 #line 18095 "configure"
18096 #include "confdefs.h"
18098 #include <${cf_cv_ncurses_header:-curses.h}>
18099 #ifdef NCURSES_VERSION
18100 #include <${cf_header}>
18112 rm -f conftest.$ac_objext
18113 if { (eval echo "$as_me:18113: \"$ac_compile\"") >&5
18114 (eval $ac_compile) 2>&5
18116 echo "$as_me:18116: \$? = $ac_status" >&5
18117 (exit $ac_status); } &&
18118 { ac_try='test -s conftest.$ac_objext'
18119 { (eval echo "$as_me:18119: \"$ac_try\"") >&5
18120 (eval $ac_try) 2>&5
18122 echo "$as_me:18122: \$? = $ac_status" >&5
18123 (exit $ac_status); }; }; then
18124 cf_cv_term_header=$cf_header
18127 echo "$as_me: failed program was:" >&5
18128 cat conftest.$ac_ext >&5
18129 cf_cv_term_header=no
18131 rm -f conftest.$ac_objext conftest.$ac_ext
18137 echo "$as_me:18137: result: $cf_cv_term_header" >&5
18138 echo "${ECHO_T}$cf_cv_term_header" >&6
18140 case $cf_cv_term_header in
18143 cat >>confdefs.h <<\EOF
18144 #define HAVE_TERM_H 1
18150 cat >>confdefs.h <<\EOF
18151 #define HAVE_NCURSES_TERM_H 1
18157 cat >>confdefs.h <<\EOF
18158 #define HAVE_NCURSESW_TERM_H 1
18164 echo "$as_me:18164: checking for unctrl.h" >&5
18165 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
18166 if test "${cf_cv_unctrl_header+set}" = set; then
18167 echo $ECHO_N "(cached) $ECHO_C" >&6
18170 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
18171 # for <unctrl.h> if we do not find the variant.
18173 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
18175 case ${cf_cv_ncurses_header:-curses.h} in
18177 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
18178 cf_header_list="$cf_header_item $cf_header_list"
18182 for cf_header in $cf_header_list
18184 cat >conftest.$ac_ext <<_ACEOF
18185 #line 18185 "configure"
18186 #include "confdefs.h"
18188 #include <${cf_cv_ncurses_header:-curses.h}>
18189 #include <${cf_header}>
18198 rm -f conftest.$ac_objext
18199 if { (eval echo "$as_me:18199: \"$ac_compile\"") >&5
18200 (eval $ac_compile) 2>&5
18202 echo "$as_me:18202: \$? = $ac_status" >&5
18203 (exit $ac_status); } &&
18204 { ac_try='test -s conftest.$ac_objext'
18205 { (eval echo "$as_me:18205: \"$ac_try\"") >&5
18206 (eval $ac_try) 2>&5
18208 echo "$as_me:18208: \$? = $ac_status" >&5
18209 (exit $ac_status); }; }; then
18210 cf_cv_unctrl_header=$cf_header
18213 echo "$as_me: failed program was:" >&5
18214 cat conftest.$ac_ext >&5
18215 cf_cv_unctrl_header=no
18217 rm -f conftest.$ac_objext conftest.$ac_ext
18221 echo "$as_me:18221: result: $cf_cv_unctrl_header" >&5
18222 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
18224 case $cf_cv_unctrl_header in
18226 { echo "$as_me:18226: WARNING: unctrl.h header not found" >&5
18227 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
18231 case $cf_cv_unctrl_header in
18234 cat >>confdefs.h <<\EOF
18235 #define HAVE_UNCTRL_H 1
18241 cat >>confdefs.h <<\EOF
18242 #define HAVE_NCURSES_UNCTRL_H 1
18246 (ncursesw/unctrl.h)
18248 cat >>confdefs.h <<\EOF
18249 #define HAVE_NCURSESW_UNCTRL_H 1
18257 assume_default_colors \
18274 init_extended_color \
18282 reset_color_pairs \
18298 use_default_colors \
18300 use_extended_names \
18316 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18318 echo "$as_me:18318: checking for ${cf_func}" >&5
18319 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
18321 echo "${as_me:-configure}:18321: testing ${cf_func} ..." 1>&5
18323 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
18324 echo $ECHO_N "(cached) $ECHO_C" >&6
18327 eval cf_result='$ac_cv_func_'$cf_func
18328 if test ".$cf_result" != ".no"; then
18329 cat >conftest.$ac_ext <<_ACEOF
18330 #line 18330 "configure"
18331 #include "confdefs.h"
18333 #ifdef HAVE_XCURSES
18334 #include <xcurses.h>
18335 char * XCursesProgramName = "test";
18337 #include <${cf_cv_ncurses_header:-curses.h}>
18338 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
18339 #include <ncursesw/term.h>
18340 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
18341 #include <ncurses/term.h>
18342 #elif defined(HAVE_TERM_H)
18352 long foo = (long)(&${cf_func});
18353 fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
18354 if (foo + 1234L > 5678L)
18355 ${cf_cv_main_return:-return}(foo != 0);
18362 rm -f conftest.$ac_objext conftest$ac_exeext
18363 if { (eval echo "$as_me:18363: \"$ac_link\"") >&5
18364 (eval $ac_link) 2>&5
18366 echo "$as_me:18366: \$? = $ac_status" >&5
18367 (exit $ac_status); } &&
18368 { ac_try='test -s conftest$ac_exeext'
18369 { (eval echo "$as_me:18369: \"$ac_try\"") >&5
18370 (eval $ac_try) 2>&5
18372 echo "$as_me:18372: \$? = $ac_status" >&5
18373 (exit $ac_status); }; }; then
18376 echo "$as_me: failed program was:" >&5
18377 cat conftest.$ac_ext >&5
18380 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18382 eval 'cf_cv_func_'$cf_func'=$cf_result'
18386 # use the computed/retrieved cache-value:
18387 eval 'cf_result=$cf_cv_func_'$cf_func
18388 echo "$as_me:18388: result: $cf_result" >&5
18389 echo "${ECHO_T}$cf_result" >&6
18390 if test $cf_result != no; then
18391 cat >>confdefs.h <<EOF
18392 #define HAVE_${cf_tr_func} 1
18398 for cf_func in tputs
18401 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18403 echo "$as_me:18403: checking for ${cf_func}" >&5
18404 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
18406 echo "${as_me:-configure}:18406: testing ${cf_func} ..." 1>&5
18408 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
18409 echo $ECHO_N "(cached) $ECHO_C" >&6
18412 eval cf_result='$ac_cv_func_'$cf_func
18413 if test ".$cf_result" != ".no"; then
18414 cat >conftest.$ac_ext <<_ACEOF
18415 #line 18415 "configure"
18416 #include "confdefs.h"
18418 #ifdef HAVE_XCURSES
18419 #include <xcurses.h>
18420 char * XCursesProgramName = "test";
18422 #include <${cf_cv_ncurses_header:-curses.h}>
18423 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
18424 #include <ncursesw/term.h>
18425 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
18426 #include <ncurses/term.h>
18427 #elif defined(HAVE_TERM_H)
18437 long foo = (long)(&${cf_func});
18438 fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
18439 if (foo + 1234L > 5678L)
18440 ${cf_cv_main_return:-return}(foo != 0);
18447 rm -f conftest.$ac_objext conftest$ac_exeext
18448 if { (eval echo "$as_me:18448: \"$ac_link\"") >&5
18449 (eval $ac_link) 2>&5
18451 echo "$as_me:18451: \$? = $ac_status" >&5
18452 (exit $ac_status); } &&
18453 { ac_try='test -s conftest$ac_exeext'
18454 { (eval echo "$as_me:18454: \"$ac_try\"") >&5
18455 (eval $ac_try) 2>&5
18457 echo "$as_me:18457: \$? = $ac_status" >&5
18458 (exit $ac_status); }; }; then
18461 echo "$as_me: failed program was:" >&5
18462 cat conftest.$ac_ext >&5
18465 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18467 eval 'cf_cv_func_'$cf_func'=$cf_result'
18471 # use the computed/retrieved cache-value:
18472 eval 'cf_result=$cf_cv_func_'$cf_func
18473 echo "$as_me:18473: result: $cf_result" >&5
18474 echo "${ECHO_T}$cf_result" >&6
18475 if test $cf_result != no; then
18476 cat >>confdefs.h <<EOF
18477 #define HAVE_${cf_tr_func} 1
18483 if test x$cf_cv_func_tputs = xyes
18486 for cf_arg in int char
18488 for cf_ret in int void
18490 if test $cf_ret = void
18492 cf_return="/* nothing */"
18494 cf_return="return value"
18496 cat >conftest.$ac_ext <<_ACEOF
18497 #line 18497 "configure"
18498 #include "confdefs.h"
18500 #include <${cf_cv_ncurses_header:-curses.h}>
18501 #include <$cf_cv_term_header>
18503 static $cf_ret outc($cf_arg value) { $cf_return; }
18509 tputs("hello", 0, outc);
18510 ${cf_cv_main_return:-return}(0);
18516 rm -f conftest.$ac_objext
18517 if { (eval echo "$as_me:18517: \"$ac_compile\"") >&5
18518 (eval $ac_compile) 2>&5
18520 echo "$as_me:18520: \$? = $ac_status" >&5
18521 (exit $ac_status); } &&
18522 { ac_try='test -s conftest.$ac_objext'
18523 { (eval echo "$as_me:18523: \"$ac_try\"") >&5
18524 (eval $ac_try) 2>&5
18526 echo "$as_me:18526: \$? = $ac_status" >&5
18527 (exit $ac_status); }; }; then
18529 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
18531 echo "${as_me:-configure}:18531: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
18533 cat >>confdefs.h <<EOF
18534 #define TPUTS_ARG $cf_arg
18535 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
18536 #define TPUTS_RETURN(value) $cf_return
18542 echo "$as_me: failed program was:" >&5
18543 cat conftest.$ac_ext >&5
18545 rm -f conftest.$ac_objext conftest.$ac_ext
18547 test $cf_done = yes && break
18551 echo "$as_me:18551: checking for ncurses extended functions" >&5
18552 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
18553 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
18554 echo $ECHO_N "(cached) $ECHO_C" >&6
18557 cat >conftest.$ac_ext <<_ACEOF
18558 #line 18558 "configure"
18559 #include "confdefs.h"
18561 #include <${cf_cv_ncurses_header:-curses.h}>
18566 int x = NCURSES_EXT_FUNCS
18572 rm -f conftest.$ac_objext
18573 if { (eval echo "$as_me:18573: \"$ac_compile\"") >&5
18574 (eval $ac_compile) 2>&5
18576 echo "$as_me:18576: \$? = $ac_status" >&5
18577 (exit $ac_status); } &&
18578 { ac_try='test -s conftest.$ac_objext'
18579 { (eval echo "$as_me:18579: \"$ac_try\"") >&5
18580 (eval $ac_try) 2>&5
18582 echo "$as_me:18582: \$? = $ac_status" >&5
18583 (exit $ac_status); }; }; then
18584 cf_cv_ncurses_ext_funcs=defined
18586 echo "$as_me: failed program was:" >&5
18587 cat conftest.$ac_ext >&5
18589 cat >conftest.$ac_ext <<_ACEOF
18590 #line 18590 "configure"
18591 #include "confdefs.h"
18593 #include <${cf_cv_ncurses_header:-curses.h}>
18598 (void) assume_default_colors (0, 0);
18599 (void) curses_version ();
18600 (void) define_key (0, 0);
18601 (void) is_term_resized (0, 0);
18602 (void) key_defined (0);
18603 (void) keybound (0, 0);
18604 (void) keyok (0, 0);
18605 (void) resize_term (0, 0);
18606 (void) resizeterm (0, 0);
18607 (void) use_default_colors ();
18608 (void) use_extended_names (0);
18609 (void) wresize (0, 0, 0);
18614 rm -f conftest.$ac_objext conftest$ac_exeext
18615 if { (eval echo "$as_me:18615: \"$ac_link\"") >&5
18616 (eval $ac_link) 2>&5
18618 echo "$as_me:18618: \$? = $ac_status" >&5
18619 (exit $ac_status); } &&
18620 { ac_try='test -s conftest$ac_exeext'
18621 { (eval echo "$as_me:18621: \"$ac_try\"") >&5
18622 (eval $ac_try) 2>&5
18624 echo "$as_me:18624: \$? = $ac_status" >&5
18625 (exit $ac_status); }; }; then
18626 cf_cv_ncurses_ext_funcs=yes
18628 echo "$as_me: failed program was:" >&5
18629 cat conftest.$ac_ext >&5
18630 cf_cv_ncurses_ext_funcs=no
18632 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18635 rm -f conftest.$ac_objext conftest.$ac_ext
18638 echo "$as_me:18638: result: $cf_cv_ncurses_ext_funcs" >&5
18639 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
18640 test "$cf_cv_ncurses_ext_funcs" = yes &&
18641 cat >>confdefs.h <<\EOF
18642 #define NCURSES_EXT_FUNCS 1
18645 if test "$cf_enable_widec" = yes
18647 # workaround for systems with ncurses before 20111029, due to change of
18648 # feature test macro from _XPG5 to _XOPEN_SOURCE
18649 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
18652 echo "$as_me:18652: checking if _XPG5 should be defined to enable wide-characters" >&5
18653 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
18655 cat >conftest.$ac_ext <<_ACEOF
18656 #line 18656 "configure"
18657 #include "confdefs.h"
18659 #include <${cf_cv_ncurses_header:-curses.h}>
18668 rm -f conftest.$ac_objext
18669 if { (eval echo "$as_me:18669: \"$ac_compile\"") >&5
18670 (eval $ac_compile) 2>&5
18672 echo "$as_me:18672: \$? = $ac_status" >&5
18673 (exit $ac_status); } &&
18674 { ac_try='test -s conftest.$ac_objext'
18675 { (eval echo "$as_me:18675: \"$ac_try\"") >&5
18676 (eval $ac_try) 2>&5
18678 echo "$as_me:18678: \$? = $ac_status" >&5
18679 (exit $ac_status); }; }; then
18682 echo "$as_me: failed program was:" >&5
18683 cat conftest.$ac_ext >&5
18684 cf_save_cppflags="$CPPFLAGS"
18685 CPPFLAGS="$CPPFLAGS -D_XPG5"
18686 cat >conftest.$ac_ext <<_ACEOF
18687 #line 18687 "configure"
18688 #include "confdefs.h"
18690 #include <${cf_cv_ncurses_header:-curses.h}>
18699 rm -f conftest.$ac_objext
18700 if { (eval echo "$as_me:18700: \"$ac_compile\"") >&5
18701 (eval $ac_compile) 2>&5
18703 echo "$as_me:18703: \$? = $ac_status" >&5
18704 (exit $ac_status); } &&
18705 { ac_try='test -s conftest.$ac_objext'
18706 { (eval echo "$as_me:18706: \"$ac_try\"") >&5
18707 (eval $ac_try) 2>&5
18709 echo "$as_me:18709: \$? = $ac_status" >&5
18710 (exit $ac_status); }; }; then
18713 echo "$as_me: failed program was:" >&5
18714 cat conftest.$ac_ext >&5
18716 rm -f conftest.$ac_objext conftest.$ac_ext
18717 CPPFLAGS="$cf_save_cppflags"
18719 rm -f conftest.$ac_objext conftest.$ac_ext
18720 echo "$as_me:18720: result: $cf_define_xpg5" >&5
18721 echo "${ECHO_T}$cf_define_xpg5" >&6
18723 if test "$cf_define_xpg5" = yes
18725 CPPFLAGS="$CPPFLAGS -D_XPG5"
18729 echo "$as_me:18729: checking for wide-character functions" >&5
18730 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
18731 if test "${cf_cv_widechar_funcs+set}" = set; then
18732 echo $ECHO_N "(cached) $ECHO_C" >&6
18735 cat >conftest.$ac_ext <<_ACEOF
18736 #line 18736 "configure"
18737 #include "confdefs.h"
18739 #include <${cf_cv_ncurses_header:-curses.h}>
18744 static wchar_t src_wchar[2];
18745 static cchar_t dst_cchar;
18746 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
18752 rm -f conftest.$ac_objext conftest$ac_exeext
18753 if { (eval echo "$as_me:18753: \"$ac_link\"") >&5
18754 (eval $ac_link) 2>&5
18756 echo "$as_me:18756: \$? = $ac_status" >&5
18757 (exit $ac_status); } &&
18758 { ac_try='test -s conftest$ac_exeext'
18759 { (eval echo "$as_me:18759: \"$ac_try\"") >&5
18760 (eval $ac_try) 2>&5
18762 echo "$as_me:18762: \$? = $ac_status" >&5
18763 (exit $ac_status); }; }; then
18764 cf_cv_widechar_funcs=yes
18766 echo "$as_me: failed program was:" >&5
18767 cat conftest.$ac_ext >&5
18768 cf_cv_widechar_funcs=no
18770 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18773 echo "$as_me:18773: result: $cf_cv_widechar_funcs" >&5
18774 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
18775 if test "$cf_cv_widechar_funcs" != no ; then
18777 cat >>confdefs.h <<\EOF
18778 #define USE_WIDEC_SUPPORT 1
18782 cat >>confdefs.h <<\EOF
18783 #define USE_WIDEC_SUPPORT 0
18788 cat >>confdefs.h <<\EOF
18789 #define USE_WIDEC_SUPPORT 0
18794 echo "$as_me:18794: checking if $cf_cv_screen library uses pthreads" >&5
18795 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
18796 if test "${cf_cv_use_pthreads+set}" = set; then
18797 echo $ECHO_N "(cached) $ECHO_C" >&6
18800 cat >conftest.$ac_ext <<_ACEOF
18801 #line 18801 "configure"
18802 #include "confdefs.h"
18804 #include <${cf_cv_ncurses_header:-curses.h}>
18805 extern void _nc_init_pthreads(void);
18812 _nc_init_pthreads();
18818 rm -f conftest.$ac_objext conftest$ac_exeext
18819 if { (eval echo "$as_me:18819: \"$ac_link\"") >&5
18820 (eval $ac_link) 2>&5
18822 echo "$as_me:18822: \$? = $ac_status" >&5
18823 (exit $ac_status); } &&
18824 { ac_try='test -s conftest$ac_exeext'
18825 { (eval echo "$as_me:18825: \"$ac_try\"") >&5
18826 (eval $ac_try) 2>&5
18828 echo "$as_me:18828: \$? = $ac_status" >&5
18829 (exit $ac_status); }; }; then
18830 cf_cv_use_pthreads=yes
18832 echo "$as_me: failed program was:" >&5
18833 cat conftest.$ac_ext >&5
18834 cf_cv_use_pthreads=no
18836 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18839 echo "$as_me:18839: result: $cf_cv_use_pthreads" >&5
18840 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
18841 test $cf_cv_use_pthreads = yes &&
18842 cat >>confdefs.h <<\EOF
18843 #define USE_PTHREADS 1
18846 echo "$as_me:18846: checking if sys/time.h works with sys/select.h" >&5
18847 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
18848 if test "${cf_cv_sys_time_select+set}" = set; then
18849 echo $ECHO_N "(cached) $ECHO_C" >&6
18852 cat >conftest.$ac_ext <<_ACEOF
18853 #line 18853 "configure"
18854 #include "confdefs.h"
18856 #include <sys/types.h>
18857 #ifdef HAVE_SYS_TIME_H
18858 #include <sys/time.h>
18860 #ifdef HAVE_SYS_SELECT_H
18861 #include <sys/select.h>
18872 rm -f conftest.$ac_objext
18873 if { (eval echo "$as_me:18873: \"$ac_compile\"") >&5
18874 (eval $ac_compile) 2>&5
18876 echo "$as_me:18876: \$? = $ac_status" >&5
18877 (exit $ac_status); } &&
18878 { ac_try='test -s conftest.$ac_objext'
18879 { (eval echo "$as_me:18879: \"$ac_try\"") >&5
18880 (eval $ac_try) 2>&5
18882 echo "$as_me:18882: \$? = $ac_status" >&5
18883 (exit $ac_status); }; }; then
18884 cf_cv_sys_time_select=yes
18886 echo "$as_me: failed program was:" >&5
18887 cat conftest.$ac_ext >&5
18888 cf_cv_sys_time_select=no
18890 rm -f conftest.$ac_objext conftest.$ac_ext
18894 echo "$as_me:18894: result: $cf_cv_sys_time_select" >&5
18895 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
18896 test "$cf_cv_sys_time_select" = yes &&
18897 cat >>confdefs.h <<\EOF
18898 #define HAVE_SYS_TIME_SELECT 1
18901 # special check for test/ditto.c
18903 echo "$as_me:18903: checking for openpty in -lutil" >&5
18904 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18905 if test "${ac_cv_lib_util_openpty+set}" = set; then
18906 echo $ECHO_N "(cached) $ECHO_C" >&6
18908 ac_check_lib_save_LIBS=$LIBS
18909 LIBS="-lutil $LIBS"
18910 cat >conftest.$ac_ext <<_ACEOF
18911 #line 18911 "configure"
18912 #include "confdefs.h"
18914 /* Override any gcc2 internal prototype to avoid an error. */
18918 /* We use char because int might match the return type of a gcc2
18919 builtin and then its argument prototype would still apply. */
18929 rm -f conftest.$ac_objext conftest$ac_exeext
18930 if { (eval echo "$as_me:18930: \"$ac_link\"") >&5
18931 (eval $ac_link) 2>&5
18933 echo "$as_me:18933: \$? = $ac_status" >&5
18934 (exit $ac_status); } &&
18935 { ac_try='test -s conftest$ac_exeext'
18936 { (eval echo "$as_me:18936: \"$ac_try\"") >&5
18937 (eval $ac_try) 2>&5
18939 echo "$as_me:18939: \$? = $ac_status" >&5
18940 (exit $ac_status); }; }; then
18941 ac_cv_lib_util_openpty=yes
18943 echo "$as_me: failed program was:" >&5
18944 cat conftest.$ac_ext >&5
18945 ac_cv_lib_util_openpty=no
18947 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18948 LIBS=$ac_check_lib_save_LIBS
18950 echo "$as_me:18950: result: $ac_cv_lib_util_openpty" >&5
18951 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18952 if test $ac_cv_lib_util_openpty = yes; then
18958 echo "$as_me:18958: checking for openpty header" >&5
18959 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18960 if test "${cf_cv_func_openpty+set}" = set; then
18961 echo $ECHO_N "(cached) $ECHO_C" >&6
18964 cf_save_LIBS="$LIBS"
18965 test $cf_cv_lib_util = yes && {
18966 cf_add_libs="$LIBS"
18969 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18970 # filter duplicates
18971 for cf_add_1lib in $cf_add_0lib; do
18972 for cf_add_2lib in $cf_add_libs; do
18973 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18978 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18980 LIBS="$cf_add_libs"
18982 for cf_header in pty.h libutil.h util.h
18984 cat >conftest.$ac_ext <<_ACEOF
18985 #line 18985 "configure"
18986 #include "confdefs.h"
18988 #include <$cf_header>
18994 int x = openpty((int *)0, (int *)0, (char *)0,
18995 (struct termios *)0, (struct winsize *)0);
19001 rm -f conftest.$ac_objext conftest$ac_exeext
19002 if { (eval echo "$as_me:19002: \"$ac_link\"") >&5
19003 (eval $ac_link) 2>&5
19005 echo "$as_me:19005: \$? = $ac_status" >&5
19006 (exit $ac_status); } &&
19007 { ac_try='test -s conftest$ac_exeext'
19008 { (eval echo "$as_me:19008: \"$ac_try\"") >&5
19009 (eval $ac_try) 2>&5
19011 echo "$as_me:19011: \$? = $ac_status" >&5
19012 (exit $ac_status); }; }; then
19014 cf_cv_func_openpty=$cf_header
19018 echo "$as_me: failed program was:" >&5
19019 cat conftest.$ac_ext >&5
19021 cf_cv_func_openpty=no
19024 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19026 LIBS="$cf_save_LIBS"
19029 echo "$as_me:19029: result: $cf_cv_func_openpty" >&5
19030 echo "${ECHO_T}$cf_cv_func_openpty" >&6
19032 if test "$cf_cv_func_openpty" != no ; then
19034 cat >>confdefs.h <<EOF
19035 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
19038 cat >>confdefs.h <<\EOF
19039 #define USE_XTERM_PTY 1
19042 if test "x$cf_cv_lib_util" = xyes ; then
19044 cf_add_libs="$TEST_LIBS"
19047 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19048 # filter duplicates
19049 for cf_add_1lib in $cf_add_0lib; do
19050 for cf_add_2lib in $cf_add_libs; do
19051 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19056 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19058 TEST_LIBS="$cf_add_libs"
19063 echo "$as_me:19063: checking for function curses_version" >&5
19064 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
19065 if test "${cf_cv_func_curses_version+set}" = set; then
19066 echo $ECHO_N "(cached) $ECHO_C" >&6
19069 if test "$cross_compiling" = yes; then
19070 cf_cv_func_curses_version=unknown
19072 cat >conftest.$ac_ext <<_ACEOF
19073 #line 19073 "configure"
19074 #include "confdefs.h"
19076 #include <${cf_cv_ncurses_header:-curses.h}>
19080 sprintf(temp, "%s\n", curses_version());
19081 ${cf_cv_main_return:-return}(0);
19085 rm -f conftest$ac_exeext
19086 if { (eval echo "$as_me:19086: \"$ac_link\"") >&5
19087 (eval $ac_link) 2>&5
19089 echo "$as_me:19089: \$? = $ac_status" >&5
19090 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19091 { (eval echo "$as_me:19091: \"$ac_try\"") >&5
19092 (eval $ac_try) 2>&5
19094 echo "$as_me:19094: \$? = $ac_status" >&5
19095 (exit $ac_status); }; }; then
19096 cf_cv_func_curses_version=yes
19099 echo "$as_me: program exited with status $ac_status" >&5
19100 echo "$as_me: failed program was:" >&5
19101 cat conftest.$ac_ext >&5
19102 cf_cv_func_curses_version=no
19105 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19109 echo "$as_me:19109: result: $cf_cv_func_curses_version" >&5
19110 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
19111 test "$cf_cv_func_curses_version" = yes &&
19112 cat >>confdefs.h <<\EOF
19113 #define HAVE_CURSES_VERSION 1
19116 echo "$as_me:19116: checking for alternate character set array" >&5
19117 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
19118 if test "${cf_cv_curses_acs_map+set}" = set; then
19119 echo $ECHO_N "(cached) $ECHO_C" >&6
19122 cf_cv_curses_acs_map=unknown
19123 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
19125 cat >conftest.$ac_ext <<_ACEOF
19126 #line 19126 "configure"
19127 #include "confdefs.h"
19129 #include <${cf_cv_ncurses_header:-curses.h}>
19135 $name['k'] = ACS_PLUS
19141 rm -f conftest.$ac_objext conftest$ac_exeext
19142 if { (eval echo "$as_me:19142: \"$ac_link\"") >&5
19143 (eval $ac_link) 2>&5
19145 echo "$as_me:19145: \$? = $ac_status" >&5
19146 (exit $ac_status); } &&
19147 { ac_try='test -s conftest$ac_exeext'
19148 { (eval echo "$as_me:19148: \"$ac_try\"") >&5
19149 (eval $ac_try) 2>&5
19151 echo "$as_me:19151: \$? = $ac_status" >&5
19152 (exit $ac_status); }; }; then
19153 cf_cv_curses_acs_map=$name; break
19155 echo "$as_me: failed program was:" >&5
19156 cat conftest.$ac_ext >&5
19158 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19162 echo "$as_me:19162: result: $cf_cv_curses_acs_map" >&5
19163 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
19165 test "$cf_cv_curses_acs_map" != unknown &&
19166 cat >>confdefs.h <<EOF
19167 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
19170 if test "$cf_enable_widec" = yes; then
19172 echo "$as_me:19172: checking for wide alternate character set array" >&5
19173 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
19174 if test "${cf_cv_curses_wacs_map+set}" = set; then
19175 echo $ECHO_N "(cached) $ECHO_C" >&6
19178 cf_cv_curses_wacs_map=unknown
19179 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
19181 cat >conftest.$ac_ext <<_ACEOF
19182 #line 19182 "configure"
19183 #include "confdefs.h"
19185 #ifndef _XOPEN_SOURCE_EXTENDED
19186 #define _XOPEN_SOURCE_EXTENDED
19188 #include <${cf_cv_ncurses_header:-curses.h}>
19192 void *foo = &($name['k']); (void)foo
19197 rm -f conftest.$ac_objext conftest$ac_exeext
19198 if { (eval echo "$as_me:19198: \"$ac_link\"") >&5
19199 (eval $ac_link) 2>&5
19201 echo "$as_me:19201: \$? = $ac_status" >&5
19202 (exit $ac_status); } &&
19203 { ac_try='test -s conftest$ac_exeext'
19204 { (eval echo "$as_me:19204: \"$ac_try\"") >&5
19205 (eval $ac_try) 2>&5
19207 echo "$as_me:19207: \$? = $ac_status" >&5
19208 (exit $ac_status); }; }; then
19209 cf_cv_curses_wacs_map=$name
19212 echo "$as_me: failed program was:" >&5
19213 cat conftest.$ac_ext >&5
19215 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19218 echo "$as_me:19218: result: $cf_cv_curses_wacs_map" >&5
19219 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
19221 test "$cf_cv_curses_wacs_map" != unknown &&
19222 cat >>confdefs.h <<EOF
19223 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
19226 echo "$as_me:19226: checking for wide alternate character constants" >&5
19227 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
19228 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
19229 echo $ECHO_N "(cached) $ECHO_C" >&6
19232 cf_cv_curses_wacs_symbols=no
19233 if test "$cf_cv_curses_wacs_map" != unknown
19235 cat >conftest.$ac_ext <<_ACEOF
19236 #line 19236 "configure"
19237 #include "confdefs.h"
19239 #ifndef _XOPEN_SOURCE_EXTENDED
19240 #define _XOPEN_SOURCE_EXTENDED
19242 #include <${cf_cv_ncurses_header:-curses.h}>
19246 cchar_t *foo = WACS_PLUS;
19247 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS; (void)foo
19252 rm -f conftest.$ac_objext conftest$ac_exeext
19253 if { (eval echo "$as_me:19253: \"$ac_link\"") >&5
19254 (eval $ac_link) 2>&5
19256 echo "$as_me:19256: \$? = $ac_status" >&5
19257 (exit $ac_status); } &&
19258 { ac_try='test -s conftest$ac_exeext'
19259 { (eval echo "$as_me:19259: \"$ac_try\"") >&5
19260 (eval $ac_try) 2>&5
19262 echo "$as_me:19262: \$? = $ac_status" >&5
19263 (exit $ac_status); }; }; then
19264 cf_cv_curses_wacs_symbols=yes
19266 echo "$as_me: failed program was:" >&5
19267 cat conftest.$ac_ext >&5
19269 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19271 cat >conftest.$ac_ext <<_ACEOF
19272 #line 19272 "configure"
19273 #include "confdefs.h"
19275 #ifndef _XOPEN_SOURCE_EXTENDED
19276 #define _XOPEN_SOURCE_EXTENDED
19278 #include <${cf_cv_ncurses_header:-curses.h}>
19282 cchar_t *foo = WACS_PLUS; (void)foo
19287 rm -f conftest.$ac_objext conftest$ac_exeext
19288 if { (eval echo "$as_me:19288: \"$ac_link\"") >&5
19289 (eval $ac_link) 2>&5
19291 echo "$as_me:19291: \$? = $ac_status" >&5
19292 (exit $ac_status); } &&
19293 { ac_try='test -s conftest$ac_exeext'
19294 { (eval echo "$as_me:19294: \"$ac_try\"") >&5
19295 (eval $ac_try) 2>&5
19297 echo "$as_me:19297: \$? = $ac_status" >&5
19298 (exit $ac_status); }; }; then
19299 cf_cv_curses_wacs_symbols=yes
19301 echo "$as_me: failed program was:" >&5
19302 cat conftest.$ac_ext >&5
19304 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19308 echo "$as_me:19308: result: $cf_cv_curses_wacs_symbols" >&5
19309 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
19311 test "$cf_cv_curses_wacs_symbols" != no &&
19312 cat >>confdefs.h <<\EOF
19313 #define CURSES_WACS_SYMBOLS 1
19318 echo "$as_me:19318: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19319 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19320 cat >conftest.$ac_ext <<_ACEOF
19321 #line 19321 "configure"
19322 #include "confdefs.h"
19324 #ifndef _XOPEN_SOURCE_EXTENDED
19325 #define _XOPEN_SOURCE_EXTENDED
19327 #include <${cf_cv_ncurses_header:-curses.h}>
19338 rm -f conftest.$ac_objext
19339 if { (eval echo "$as_me:19339: \"$ac_compile\"") >&5
19340 (eval $ac_compile) 2>&5
19342 echo "$as_me:19342: \$? = $ac_status" >&5
19343 (exit $ac_status); } &&
19344 { ac_try='test -s conftest.$ac_objext'
19345 { (eval echo "$as_me:19345: \"$ac_try\"") >&5
19346 (eval $ac_try) 2>&5
19348 echo "$as_me:19348: \$? = $ac_status" >&5
19349 (exit $ac_status); }; }; then
19352 echo "$as_me: failed program was:" >&5
19353 cat conftest.$ac_ext >&5
19356 rm -f conftest.$ac_objext conftest.$ac_ext
19357 echo "$as_me:19357: result: $cf_result" >&5
19358 echo "${ECHO_T}$cf_result" >&6
19359 if test $cf_result = yes ; then
19361 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19363 cat >>confdefs.h <<EOF
19364 #define $cf_result 1
19369 cat >>confdefs.h <<EOF
19370 #define attr_t long
19375 if test "$cf_enable_widec" = yes; then
19377 # This is needed on Tru64 5.0 to declare mbstate_t
19378 echo "$as_me:19378: checking if we must include wchar.h to declare mbstate_t" >&5
19379 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
19380 if test "${cf_cv_mbstate_t+set}" = set; then
19381 echo $ECHO_N "(cached) $ECHO_C" >&6
19384 cat >conftest.$ac_ext <<_ACEOF
19385 #line 19385 "configure"
19386 #include "confdefs.h"
19388 #include <stdlib.h>
19389 #include <stdarg.h>
19391 #ifdef HAVE_LIBUTF8_H
19392 #include <libutf8.h>
19402 rm -f conftest.$ac_objext
19403 if { (eval echo "$as_me:19403: \"$ac_compile\"") >&5
19404 (eval $ac_compile) 2>&5
19406 echo "$as_me:19406: \$? = $ac_status" >&5
19407 (exit $ac_status); } &&
19408 { ac_try='test -s conftest.$ac_objext'
19409 { (eval echo "$as_me:19409: \"$ac_try\"") >&5
19410 (eval $ac_try) 2>&5
19412 echo "$as_me:19412: \$? = $ac_status" >&5
19413 (exit $ac_status); }; }; then
19416 echo "$as_me: failed program was:" >&5
19417 cat conftest.$ac_ext >&5
19418 cat >conftest.$ac_ext <<_ACEOF
19419 #line 19419 "configure"
19420 #include "confdefs.h"
19422 #include <stdlib.h>
19423 #include <stdarg.h>
19426 #ifdef HAVE_LIBUTF8_H
19427 #include <libutf8.h>
19437 rm -f conftest.$ac_objext
19438 if { (eval echo "$as_me:19438: \"$ac_compile\"") >&5
19439 (eval $ac_compile) 2>&5
19441 echo "$as_me:19441: \$? = $ac_status" >&5
19442 (exit $ac_status); } &&
19443 { ac_try='test -s conftest.$ac_objext'
19444 { (eval echo "$as_me:19444: \"$ac_try\"") >&5
19445 (eval $ac_try) 2>&5
19447 echo "$as_me:19447: \$? = $ac_status" >&5
19448 (exit $ac_status); }; }; then
19449 cf_cv_mbstate_t=yes
19451 echo "$as_me: failed program was:" >&5
19452 cat conftest.$ac_ext >&5
19453 cf_cv_mbstate_t=unknown
19455 rm -f conftest.$ac_objext conftest.$ac_ext
19457 rm -f conftest.$ac_objext conftest.$ac_ext
19459 echo "$as_me:19459: result: $cf_cv_mbstate_t" >&5
19460 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
19462 if test "$cf_cv_mbstate_t" = yes ; then
19464 cat >>confdefs.h <<\EOF
19465 #define NEED_WCHAR_H 1
19471 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
19472 if test "$cf_cv_mbstate_t" = unknown ; then
19473 NCURSES_MBSTATE_T=1
19476 # if we find mbstate_t in either place, use substitution to provide a fallback.
19477 if test "$cf_cv_mbstate_t" != unknown ; then
19478 NCURSES_OK_MBSTATE_T=1
19481 # This is needed on Tru64 5.0 to declare wchar_t
19482 echo "$as_me:19482: checking if we must include wchar.h to declare wchar_t" >&5
19483 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
19484 if test "${cf_cv_wchar_t+set}" = set; then
19485 echo $ECHO_N "(cached) $ECHO_C" >&6
19488 cat >conftest.$ac_ext <<_ACEOF
19489 #line 19489 "configure"
19490 #include "confdefs.h"
19492 #include <stdlib.h>
19493 #include <stdarg.h>
19495 #ifdef HAVE_LIBUTF8_H
19496 #include <libutf8.h>
19506 rm -f conftest.$ac_objext
19507 if { (eval echo "$as_me:19507: \"$ac_compile\"") >&5
19508 (eval $ac_compile) 2>&5
19510 echo "$as_me:19510: \$? = $ac_status" >&5
19511 (exit $ac_status); } &&
19512 { ac_try='test -s conftest.$ac_objext'
19513 { (eval echo "$as_me:19513: \"$ac_try\"") >&5
19514 (eval $ac_try) 2>&5
19516 echo "$as_me:19516: \$? = $ac_status" >&5
19517 (exit $ac_status); }; }; then
19520 echo "$as_me: failed program was:" >&5
19521 cat conftest.$ac_ext >&5
19522 cat >conftest.$ac_ext <<_ACEOF
19523 #line 19523 "configure"
19524 #include "confdefs.h"
19526 #include <stdlib.h>
19527 #include <stdarg.h>
19530 #ifdef HAVE_LIBUTF8_H
19531 #include <libutf8.h>
19541 rm -f conftest.$ac_objext
19542 if { (eval echo "$as_me:19542: \"$ac_compile\"") >&5
19543 (eval $ac_compile) 2>&5
19545 echo "$as_me:19545: \$? = $ac_status" >&5
19546 (exit $ac_status); } &&
19547 { ac_try='test -s conftest.$ac_objext'
19548 { (eval echo "$as_me:19548: \"$ac_try\"") >&5
19549 (eval $ac_try) 2>&5
19551 echo "$as_me:19551: \$? = $ac_status" >&5
19552 (exit $ac_status); }; }; then
19555 echo "$as_me: failed program was:" >&5
19556 cat conftest.$ac_ext >&5
19557 cf_cv_wchar_t=unknown
19559 rm -f conftest.$ac_objext conftest.$ac_ext
19561 rm -f conftest.$ac_objext conftest.$ac_ext
19563 echo "$as_me:19563: result: $cf_cv_wchar_t" >&5
19564 echo "${ECHO_T}$cf_cv_wchar_t" >&6
19566 if test "$cf_cv_wchar_t" = yes ; then
19568 cat >>confdefs.h <<\EOF
19569 #define NEED_WCHAR_H 1
19575 # if we do not find wchar_t in either place, use substitution to provide a fallback.
19576 if test "$cf_cv_wchar_t" = unknown ; then
19580 # if we find wchar_t in either place, use substitution to provide a fallback.
19581 if test "$cf_cv_wchar_t" != unknown ; then
19582 NCURSES_OK_WCHAR_T=1
19585 # This is needed on Tru64 5.0 to declare wint_t
19586 echo "$as_me:19586: checking if we must include wchar.h to declare wint_t" >&5
19587 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
19588 if test "${cf_cv_wint_t+set}" = set; then
19589 echo $ECHO_N "(cached) $ECHO_C" >&6
19592 cat >conftest.$ac_ext <<_ACEOF
19593 #line 19593 "configure"
19594 #include "confdefs.h"
19596 #include <stdlib.h>
19597 #include <stdarg.h>
19599 #ifdef HAVE_LIBUTF8_H
19600 #include <libutf8.h>
19610 rm -f conftest.$ac_objext
19611 if { (eval echo "$as_me:19611: \"$ac_compile\"") >&5
19612 (eval $ac_compile) 2>&5
19614 echo "$as_me:19614: \$? = $ac_status" >&5
19615 (exit $ac_status); } &&
19616 { ac_try='test -s conftest.$ac_objext'
19617 { (eval echo "$as_me:19617: \"$ac_try\"") >&5
19618 (eval $ac_try) 2>&5
19620 echo "$as_me:19620: \$? = $ac_status" >&5
19621 (exit $ac_status); }; }; then
19624 echo "$as_me: failed program was:" >&5
19625 cat conftest.$ac_ext >&5
19626 cat >conftest.$ac_ext <<_ACEOF
19627 #line 19627 "configure"
19628 #include "confdefs.h"
19630 #include <stdlib.h>
19631 #include <stdarg.h>
19634 #ifdef HAVE_LIBUTF8_H
19635 #include <libutf8.h>
19645 rm -f conftest.$ac_objext
19646 if { (eval echo "$as_me:19646: \"$ac_compile\"") >&5
19647 (eval $ac_compile) 2>&5
19649 echo "$as_me:19649: \$? = $ac_status" >&5
19650 (exit $ac_status); } &&
19651 { ac_try='test -s conftest.$ac_objext'
19652 { (eval echo "$as_me:19652: \"$ac_try\"") >&5
19653 (eval $ac_try) 2>&5
19655 echo "$as_me:19655: \$? = $ac_status" >&5
19656 (exit $ac_status); }; }; then
19659 echo "$as_me: failed program was:" >&5
19660 cat conftest.$ac_ext >&5
19661 cf_cv_wint_t=unknown
19663 rm -f conftest.$ac_objext conftest.$ac_ext
19665 rm -f conftest.$ac_objext conftest.$ac_ext
19667 echo "$as_me:19667: result: $cf_cv_wint_t" >&5
19668 echo "${ECHO_T}$cf_cv_wint_t" >&6
19670 if test "$cf_cv_wint_t" = yes ; then
19672 cat >>confdefs.h <<\EOF
19673 #define NEED_WCHAR_H 1
19679 # if we do not find wint_t in either place, use substitution to provide a fallback.
19680 if test "$cf_cv_wint_t" = unknown ; then
19684 # if we find wint_t in either place, use substitution to provide a fallback.
19685 if test "$cf_cv_wint_t" != unknown ; then
19686 NCURSES_OK_WINT_T=1
19689 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
19691 echo "$as_me:19691: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19692 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19693 cat >conftest.$ac_ext <<_ACEOF
19694 #line 19694 "configure"
19695 #include "confdefs.h"
19697 #ifndef _XOPEN_SOURCE_EXTENDED
19698 #define _XOPEN_SOURCE_EXTENDED
19700 #include <${cf_cv_ncurses_header:-curses.h}>
19711 rm -f conftest.$ac_objext
19712 if { (eval echo "$as_me:19712: \"$ac_compile\"") >&5
19713 (eval $ac_compile) 2>&5
19715 echo "$as_me:19715: \$? = $ac_status" >&5
19716 (exit $ac_status); } &&
19717 { ac_try='test -s conftest.$ac_objext'
19718 { (eval echo "$as_me:19718: \"$ac_try\"") >&5
19719 (eval $ac_try) 2>&5
19721 echo "$as_me:19721: \$? = $ac_status" >&5
19722 (exit $ac_status); }; }; then
19725 echo "$as_me: failed program was:" >&5
19726 cat conftest.$ac_ext >&5
19729 rm -f conftest.$ac_objext conftest.$ac_ext
19730 echo "$as_me:19730: result: $cf_result" >&5
19731 echo "${ECHO_T}$cf_result" >&6
19732 if test $cf_result = yes ; then
19734 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19736 cat >>confdefs.h <<EOF
19737 #define $cf_result 1
19742 cat >>confdefs.h <<EOF
19743 #define mbstate_t long
19750 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
19752 echo "$as_me:19752: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19753 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19754 cat >conftest.$ac_ext <<_ACEOF
19755 #line 19755 "configure"
19756 #include "confdefs.h"
19758 #ifndef _XOPEN_SOURCE_EXTENDED
19759 #define _XOPEN_SOURCE_EXTENDED
19761 #include <${cf_cv_ncurses_header:-curses.h}>
19772 rm -f conftest.$ac_objext
19773 if { (eval echo "$as_me:19773: \"$ac_compile\"") >&5
19774 (eval $ac_compile) 2>&5
19776 echo "$as_me:19776: \$? = $ac_status" >&5
19777 (exit $ac_status); } &&
19778 { ac_try='test -s conftest.$ac_objext'
19779 { (eval echo "$as_me:19779: \"$ac_try\"") >&5
19780 (eval $ac_try) 2>&5
19782 echo "$as_me:19782: \$? = $ac_status" >&5
19783 (exit $ac_status); }; }; then
19786 echo "$as_me: failed program was:" >&5
19787 cat conftest.$ac_ext >&5
19790 rm -f conftest.$ac_objext conftest.$ac_ext
19791 echo "$as_me:19791: result: $cf_result" >&5
19792 echo "${ECHO_T}$cf_result" >&6
19793 if test $cf_result = yes ; then
19795 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19797 cat >>confdefs.h <<EOF
19798 #define $cf_result 1
19803 cat >>confdefs.h <<EOF
19804 #define wchar_t long
19811 if test "$NCURSES_OK_WINT_T" = 0 ; then
19813 echo "$as_me:19813: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19814 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19815 cat >conftest.$ac_ext <<_ACEOF
19816 #line 19816 "configure"
19817 #include "confdefs.h"
19819 #ifndef _XOPEN_SOURCE_EXTENDED
19820 #define _XOPEN_SOURCE_EXTENDED
19822 #include <${cf_cv_ncurses_header:-curses.h}>
19833 rm -f conftest.$ac_objext
19834 if { (eval echo "$as_me:19834: \"$ac_compile\"") >&5
19835 (eval $ac_compile) 2>&5
19837 echo "$as_me:19837: \$? = $ac_status" >&5
19838 (exit $ac_status); } &&
19839 { ac_try='test -s conftest.$ac_objext'
19840 { (eval echo "$as_me:19840: \"$ac_try\"") >&5
19841 (eval $ac_try) 2>&5
19843 echo "$as_me:19843: \$? = $ac_status" >&5
19844 (exit $ac_status); }; }; then
19847 echo "$as_me: failed program was:" >&5
19848 cat conftest.$ac_ext >&5
19851 rm -f conftest.$ac_objext conftest.$ac_ext
19852 echo "$as_me:19852: result: $cf_result" >&5
19853 echo "${ECHO_T}$cf_result" >&6
19854 if test $cf_result = yes ; then
19856 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19858 cat >>confdefs.h <<EOF
19859 #define $cf_result 1
19864 cat >>confdefs.h <<EOF
19865 #define wint_t long
19881 echo "$as_me:19881: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
19882 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19884 cat >conftest.$ac_ext <<_ACEOF
19885 #line 19885 "configure"
19886 #include "confdefs.h"
19888 #ifdef HAVE_XCURSES
19889 #include <xcurses.h>
19890 char * XCursesProgramName = "test";
19892 #include <${cf_cv_ncurses_header:-curses.h}>
19893 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19894 #include <ncursesw/term.h>
19895 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19896 #include <ncurses/term.h>
19897 #elif defined(HAVE_TERM_H)
19906 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
19907 const void *foo = (const void *)($cf_data);
19909 const void *foo = &($cf_data);
19911 fprintf(stderr, "testing linkage of $cf_data:%p\n", (const void *)foo);
19917 rm -f conftest.$ac_objext
19918 if { (eval echo "$as_me:19918: \"$ac_compile\"") >&5
19919 (eval $ac_compile) 2>&5
19921 echo "$as_me:19921: \$? = $ac_status" >&5
19922 (exit $ac_status); } &&
19923 { ac_try='test -s conftest.$ac_objext'
19924 { (eval echo "$as_me:19924: \"$ac_try\"") >&5
19925 (eval $ac_try) 2>&5
19927 echo "$as_me:19927: \$? = $ac_status" >&5
19928 (exit $ac_status); }; }; then
19932 echo "$as_me: failed program was:" >&5
19933 cat conftest.$ac_ext >&5
19936 rm -f conftest.$ac_objext conftest.$ac_ext
19937 echo "$as_me:19937: result: $cf_result" >&5
19938 echo "${ECHO_T}$cf_result" >&6
19940 if test $cf_result = yes ; then
19942 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19944 cat >>confdefs.h <<EOF
19945 #define $cf_result 1
19949 echo "$as_me:19949: checking for data $cf_data in library" >&5
19950 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
19951 # BSD linkers insist on making weak linkage, but resolve at runtime.
19952 if test "$cross_compiling" = yes; then
19955 cat >conftest.$ac_ext <<_ACEOF
19956 #line 19956 "configure"
19957 #include "confdefs.h"
19959 #ifdef HAVE_XCURSES
19960 #include <xcurses.h>
19961 char * XCursesProgramName = "test";
19963 #include <${cf_cv_ncurses_header:-curses.h}>
19964 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19965 #include <ncursesw/term.h>
19966 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19967 #include <ncurses/term.h>
19968 #elif defined(HAVE_TERM_H)
19973 extern char $cf_data;
19980 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
19981 const void *foo = (const void *)($cf_data);
19983 const void *foo = &($cf_data);
19985 fprintf(stderr, "testing linkage of $cf_data:%p\n", (const void *)foo);
19987 ${cf_cv_main_return:-return}(foo == 0);
19994 rm -f conftest.$ac_objext conftest$ac_exeext
19995 if { (eval echo "$as_me:19995: \"$ac_link\"") >&5
19996 (eval $ac_link) 2>&5
19998 echo "$as_me:19998: \$? = $ac_status" >&5
19999 (exit $ac_status); } &&
20000 { ac_try='test -s conftest$ac_exeext'
20001 { (eval echo "$as_me:20001: \"$ac_try\"") >&5
20002 (eval $ac_try) 2>&5
20004 echo "$as_me:20004: \$? = $ac_status" >&5
20005 (exit $ac_status); }; }; then
20008 echo "$as_me: failed program was:" >&5
20009 cat conftest.$ac_ext >&5
20012 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20015 cat >conftest.$ac_ext <<_ACEOF
20016 #line 20016 "configure"
20017 #include "confdefs.h"
20019 #ifdef HAVE_XCURSES
20020 #include <xcurses.h>
20021 char * XCursesProgramName = "test";
20023 #include <${cf_cv_ncurses_header:-curses.h}>
20024 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20025 #include <ncursesw/term.h>
20026 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20027 #include <ncurses/term.h>
20028 #elif defined(HAVE_TERM_H)
20033 extern char $cf_data;
20037 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20038 const void *foo = (const void *)($cf_data);
20040 const void *foo = &($cf_data);
20042 fprintf(stderr, "testing linkage of $cf_data:%p\n", (const void *)foo);
20044 ${cf_cv_main_return:-return}(foo == 0);
20047 rm -f conftest$ac_exeext
20048 if { (eval echo "$as_me:20048: \"$ac_link\"") >&5
20049 (eval $ac_link) 2>&5
20051 echo "$as_me:20051: \$? = $ac_status" >&5
20052 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20053 { (eval echo "$as_me:20053: \"$ac_try\"") >&5
20054 (eval $ac_try) 2>&5
20056 echo "$as_me:20056: \$? = $ac_status" >&5
20057 (exit $ac_status); }; }; then
20061 echo "$as_me: program exited with status $ac_status" >&5
20062 echo "$as_me: failed program was:" >&5
20063 cat conftest.$ac_ext >&5
20066 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20068 echo "$as_me:20068: result: $cf_result" >&5
20069 echo "${ECHO_T}$cf_result" >&6
20070 if test $cf_result = yes ; then
20072 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20074 cat >>confdefs.h <<EOF
20075 #define $cf_result 1
20078 # do not exit loop here, since we prefer system's declarations
20083 if test -n "$with_screen" && test "x$with_screen" = "xpdcurses"
20085 echo "$as_me:20085: checking for X" >&5
20086 echo $ECHO_N "checking for X... $ECHO_C" >&6
20088 # Check whether --with-x or --without-x was given.
20089 if test "${with_x+set}" = set; then
20093 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
20094 if test "x$with_x" = xno; then
20095 # The user explicitly disabled X.
20098 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
20099 # Both variables are already set.
20102 if test "${ac_cv_have_x+set}" = set; then
20103 echo $ECHO_N "(cached) $ECHO_C" >&6
20105 # One or both of the vars are not set, and there is no cached value.
20106 ac_x_includes=no ac_x_libraries=no
20107 rm -fr conftest.dir
20108 if mkdir conftest.dir; then
20110 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
20111 cat >Imakefile <<'EOF'
20113 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
20115 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
20116 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
20117 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
20118 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
20119 for ac_extension in a so sl dylib dll; do
20120 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
20121 test -f $ac_im_libdir/libX11.$ac_extension; then
20122 ac_im_usrlibdir=$ac_im_libdir; break
20125 # Screen out bogus values from the imake configuration. They are
20126 # bogus both because they are the default anyway, and because
20127 # using them would break gcc on systems where it needs fixed includes.
20128 case $ac_im_incroot in
20130 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
20132 case $ac_im_usrlibdir in
20133 /usr/lib | /lib) ;;
20134 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
20138 rm -fr conftest.dir
20141 # Standard set of common directories for X headers.
20142 # Check X11 before X11Rn because it is often a symlink to the current release.
20159 /usr/local/X11/include
20160 /usr/local/X11R7/include
20161 /usr/local/X11R6/include
20162 /usr/local/X11R5/include
20163 /usr/local/X11R4/include
20165 /usr/local/include/X11
20166 /usr/local/include/X11R7
20167 /usr/local/include/X11R6
20168 /usr/local/include/X11R5
20169 /usr/local/include/X11R4
20173 /usr/XFree86/include/X11
20177 /usr/unsupported/include
20178 /usr/athena/include
20179 /usr/local/x11r5/include
20180 /usr/lpp/Xamples/include
20182 /usr/openwin/include
20183 /usr/openwin/share/include'
20185 if test "$ac_x_includes" = no; then
20186 # Guess where to find include files, by looking for Intrinsic.h.
20187 # First, try using that file with no special directory specified.
20188 cat >conftest.$ac_ext <<_ACEOF
20189 #line 20189 "configure"
20190 #include "confdefs.h"
20191 #include <X11/Intrinsic.h>
20193 if { (eval echo "$as_me:20193: \"$ac_cpp conftest.$ac_ext\"") >&5
20194 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20196 egrep -v '^ *\+' conftest.er1 >conftest.err
20198 cat conftest.err >&5
20199 echo "$as_me:20199: \$? = $ac_status" >&5
20200 (exit $ac_status); } >/dev/null; then
20201 if test -s conftest.err; then
20202 ac_cpp_err=$ac_c_preproc_warn_flag
20209 if test -z "$ac_cpp_err"; then
20210 # We can compile using X headers with no special include directory.
20213 echo "$as_me: failed program was:" >&5
20214 cat conftest.$ac_ext >&5
20215 for ac_dir in $ac_x_header_dirs; do
20216 if test -r "$ac_dir/X11/Intrinsic.h"; then
20217 ac_x_includes=$ac_dir
20222 rm -f conftest.err conftest.$ac_ext
20223 fi # $ac_x_includes = no
20225 if test "$ac_x_libraries" = no; then
20226 # Check for the libraries.
20227 # See if we find them without any special options.
20228 # Don't add to $LIBS permanently.
20231 cat >conftest.$ac_ext <<_ACEOF
20232 #line 20232 "configure"
20233 #include "confdefs.h"
20234 #include <X11/Intrinsic.h>
20243 rm -f conftest.$ac_objext conftest$ac_exeext
20244 if { (eval echo "$as_me:20244: \"$ac_link\"") >&5
20245 (eval $ac_link) 2>&5
20247 echo "$as_me:20247: \$? = $ac_status" >&5
20248 (exit $ac_status); } &&
20249 { ac_try='test -s conftest$ac_exeext'
20250 { (eval echo "$as_me:20250: \"$ac_try\"") >&5
20251 (eval $ac_try) 2>&5
20253 echo "$as_me:20253: \$? = $ac_status" >&5
20254 (exit $ac_status); }; }; then
20256 # We can link X programs with no special library path.
20259 echo "$as_me: failed program was:" >&5
20260 cat conftest.$ac_ext >&5
20262 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
20264 # Don't even attempt the hair of trying to link an X program!
20265 for ac_extension in a so sl dylib dll; do
20266 if test -r $ac_dir/libXt.$ac_extension; then
20267 ac_x_libraries=$ac_dir
20273 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20274 fi # $ac_x_libraries = no
20276 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
20277 # Didn't find X anywhere. Cache the known absence of X.
20278 ac_cv_have_x="have_x=no"
20280 # Record where we found X for the cache.
20281 ac_cv_have_x="have_x=yes \
20282 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
20287 eval "$ac_cv_have_x"
20290 if test "$have_x" != yes; then
20291 echo "$as_me:20291: result: $have_x" >&5
20292 echo "${ECHO_T}$have_x" >&6
20295 # If each of the values was on the command line, it overrides each guess.
20296 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
20297 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
20298 # Update the cache value to reflect the command line values.
20299 ac_cv_have_x="have_x=yes \
20300 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
20301 echo "$as_me:20301: result: libraries $x_libraries, headers $x_includes" >&5
20302 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
20305 if test "$no_x" = yes; then
20306 # Not all programs may use this symbol, but it does not hurt to define it.
20308 cat >>confdefs.h <<\EOF
20309 #define X_DISPLAY_MISSING 1
20312 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
20314 if test -n "$x_includes"; then
20315 X_CFLAGS="$X_CFLAGS -I$x_includes"
20318 # It would also be nice to do this for all -L options, not just this one.
20319 if test -n "$x_libraries"; then
20320 X_LIBS="$X_LIBS -L$x_libraries"
20321 # For Solaris; some versions of Sun CC require a space after -R and
20322 # others require no space. Words are not sufficient . . . .
20323 case `(uname -sr) 2>/dev/null` in
20325 echo "$as_me:20325: checking whether -R must be followed by a space" >&5
20326 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
20327 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
20328 cat >conftest.$ac_ext <<_ACEOF
20329 #line 20329 "configure"
20330 #include "confdefs.h"
20340 rm -f conftest.$ac_objext conftest$ac_exeext
20341 if { (eval echo "$as_me:20341: \"$ac_link\"") >&5
20342 (eval $ac_link) 2>&5
20344 echo "$as_me:20344: \$? = $ac_status" >&5
20345 (exit $ac_status); } &&
20346 { ac_try='test -s conftest$ac_exeext'
20347 { (eval echo "$as_me:20347: \"$ac_try\"") >&5
20348 (eval $ac_try) 2>&5
20350 echo "$as_me:20350: \$? = $ac_status" >&5
20351 (exit $ac_status); }; }; then
20354 echo "$as_me: failed program was:" >&5
20355 cat conftest.$ac_ext >&5
20358 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20359 if test $ac_R_nospace = yes; then
20360 echo "$as_me:20360: result: no" >&5
20361 echo "${ECHO_T}no" >&6
20362 X_LIBS="$X_LIBS -R$x_libraries"
20364 LIBS="$ac_xsave_LIBS -R $x_libraries"
20365 cat >conftest.$ac_ext <<_ACEOF
20366 #line 20366 "configure"
20367 #include "confdefs.h"
20377 rm -f conftest.$ac_objext conftest$ac_exeext
20378 if { (eval echo "$as_me:20378: \"$ac_link\"") >&5
20379 (eval $ac_link) 2>&5
20381 echo "$as_me:20381: \$? = $ac_status" >&5
20382 (exit $ac_status); } &&
20383 { ac_try='test -s conftest$ac_exeext'
20384 { (eval echo "$as_me:20384: \"$ac_try\"") >&5
20385 (eval $ac_try) 2>&5
20387 echo "$as_me:20387: \$? = $ac_status" >&5
20388 (exit $ac_status); }; }; then
20391 echo "$as_me: failed program was:" >&5
20392 cat conftest.$ac_ext >&5
20395 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20396 if test $ac_R_space = yes; then
20397 echo "$as_me:20397: result: yes" >&5
20398 echo "${ECHO_T}yes" >&6
20399 X_LIBS="$X_LIBS -R $x_libraries"
20401 echo "$as_me:20401: result: neither works" >&5
20402 echo "${ECHO_T}neither works" >&6
20405 LIBS=$ac_xsave_LIBS
20409 # Check for system-dependent libraries X programs must link with.
20410 # Do this before checking for the system-independent R6 libraries
20411 # (-lICE), since we may need -lsocket or whatever for X linking.
20413 if test "$ISC" = yes; then
20414 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
20416 # Martyn Johnson says this is needed for Ultrix, if the X
20417 # libraries were built with DECnet support. And Karl Berry says
20418 # the Alpha needs dnet_stub (dnet does not exist).
20419 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
20420 cat >conftest.$ac_ext <<_ACEOF
20421 #line 20421 "configure"
20422 #include "confdefs.h"
20424 /* Override any gcc2 internal prototype to avoid an error. */
20428 /* We use char because int might match the return type of a gcc2
20429 builtin and then its argument prototype would still apply. */
20430 char XOpenDisplay ();
20439 rm -f conftest.$ac_objext conftest$ac_exeext
20440 if { (eval echo "$as_me:20440: \"$ac_link\"") >&5
20441 (eval $ac_link) 2>&5
20443 echo "$as_me:20443: \$? = $ac_status" >&5
20444 (exit $ac_status); } &&
20445 { ac_try='test -s conftest$ac_exeext'
20446 { (eval echo "$as_me:20446: \"$ac_try\"") >&5
20447 (eval $ac_try) 2>&5
20449 echo "$as_me:20449: \$? = $ac_status" >&5
20450 (exit $ac_status); }; }; then
20453 echo "$as_me: failed program was:" >&5
20454 cat conftest.$ac_ext >&5
20455 echo "$as_me:20455: checking for dnet_ntoa in -ldnet" >&5
20456 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
20457 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
20458 echo $ECHO_N "(cached) $ECHO_C" >&6
20460 ac_check_lib_save_LIBS=$LIBS
20461 LIBS="-ldnet $LIBS"
20462 cat >conftest.$ac_ext <<_ACEOF
20463 #line 20463 "configure"
20464 #include "confdefs.h"
20466 /* Override any gcc2 internal prototype to avoid an error. */
20470 /* We use char because int might match the return type of a gcc2
20471 builtin and then its argument prototype would still apply. */
20481 rm -f conftest.$ac_objext conftest$ac_exeext
20482 if { (eval echo "$as_me:20482: \"$ac_link\"") >&5
20483 (eval $ac_link) 2>&5
20485 echo "$as_me:20485: \$? = $ac_status" >&5
20486 (exit $ac_status); } &&
20487 { ac_try='test -s conftest$ac_exeext'
20488 { (eval echo "$as_me:20488: \"$ac_try\"") >&5
20489 (eval $ac_try) 2>&5
20491 echo "$as_me:20491: \$? = $ac_status" >&5
20492 (exit $ac_status); }; }; then
20493 ac_cv_lib_dnet_dnet_ntoa=yes
20495 echo "$as_me: failed program was:" >&5
20496 cat conftest.$ac_ext >&5
20497 ac_cv_lib_dnet_dnet_ntoa=no
20499 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20500 LIBS=$ac_check_lib_save_LIBS
20502 echo "$as_me:20502: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
20503 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
20504 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
20505 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
20508 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
20509 echo "$as_me:20509: checking for dnet_ntoa in -ldnet_stub" >&5
20510 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
20511 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
20512 echo $ECHO_N "(cached) $ECHO_C" >&6
20514 ac_check_lib_save_LIBS=$LIBS
20515 LIBS="-ldnet_stub $LIBS"
20516 cat >conftest.$ac_ext <<_ACEOF
20517 #line 20517 "configure"
20518 #include "confdefs.h"
20520 /* Override any gcc2 internal prototype to avoid an error. */
20524 /* We use char because int might match the return type of a gcc2
20525 builtin and then its argument prototype would still apply. */
20535 rm -f conftest.$ac_objext conftest$ac_exeext
20536 if { (eval echo "$as_me:20536: \"$ac_link\"") >&5
20537 (eval $ac_link) 2>&5
20539 echo "$as_me:20539: \$? = $ac_status" >&5
20540 (exit $ac_status); } &&
20541 { ac_try='test -s conftest$ac_exeext'
20542 { (eval echo "$as_me:20542: \"$ac_try\"") >&5
20543 (eval $ac_try) 2>&5
20545 echo "$as_me:20545: \$? = $ac_status" >&5
20546 (exit $ac_status); }; }; then
20547 ac_cv_lib_dnet_stub_dnet_ntoa=yes
20549 echo "$as_me: failed program was:" >&5
20550 cat conftest.$ac_ext >&5
20551 ac_cv_lib_dnet_stub_dnet_ntoa=no
20553 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20554 LIBS=$ac_check_lib_save_LIBS
20556 echo "$as_me:20556: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
20557 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
20558 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
20559 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
20564 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20565 LIBS="$ac_xsave_LIBS"
20567 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
20568 # to get the SysV transport functions.
20569 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
20571 # The nsl library prevents programs from opening the X display
20572 # on Irix 5.2, according to T.E. Dickey.
20573 # The functions gethostbyname, getservbyname, and inet_addr are
20574 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
20575 echo "$as_me:20575: checking for gethostbyname" >&5
20576 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
20577 if test "${ac_cv_func_gethostbyname+set}" = set; then
20578 echo $ECHO_N "(cached) $ECHO_C" >&6
20580 cat >conftest.$ac_ext <<_ACEOF
20581 #line 20581 "configure"
20582 #include "confdefs.h"
20583 #define gethostbyname autoconf_temporary
20584 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
20585 #undef gethostbyname
20591 /* We use char because int might match the return type of a gcc2
20592 builtin and then its argument prototype would still apply. */
20593 char gethostbyname (void);
20599 /* The GNU C library defines stubs for functions which it implements
20600 to always fail with ENOSYS. Some functions are actually named
20601 something starting with __ and the normal name is an alias. */
20602 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
20603 #error found stub for gethostbyname
20606 return gethostbyname ();
20611 rm -f conftest.$ac_objext conftest$ac_exeext
20612 if { (eval echo "$as_me:20612: \"$ac_link\"") >&5
20613 (eval $ac_link) 2>&5
20615 echo "$as_me:20615: \$? = $ac_status" >&5
20616 (exit $ac_status); } &&
20617 { ac_try='test -s conftest$ac_exeext'
20618 { (eval echo "$as_me:20618: \"$ac_try\"") >&5
20619 (eval $ac_try) 2>&5
20621 echo "$as_me:20621: \$? = $ac_status" >&5
20622 (exit $ac_status); }; }; then
20623 ac_cv_func_gethostbyname=yes
20625 echo "$as_me: failed program was:" >&5
20626 cat conftest.$ac_ext >&5
20627 ac_cv_func_gethostbyname=no
20629 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20631 echo "$as_me:20631: result: $ac_cv_func_gethostbyname" >&5
20632 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
20634 if test $ac_cv_func_gethostbyname = no; then
20635 echo "$as_me:20635: checking for gethostbyname in -lnsl" >&5
20636 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
20637 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
20638 echo $ECHO_N "(cached) $ECHO_C" >&6
20640 ac_check_lib_save_LIBS=$LIBS
20642 cat >conftest.$ac_ext <<_ACEOF
20643 #line 20643 "configure"
20644 #include "confdefs.h"
20646 /* Override any gcc2 internal prototype to avoid an error. */
20650 /* We use char because int might match the return type of a gcc2
20651 builtin and then its argument prototype would still apply. */
20652 char gethostbyname ();
20661 rm -f conftest.$ac_objext conftest$ac_exeext
20662 if { (eval echo "$as_me:20662: \"$ac_link\"") >&5
20663 (eval $ac_link) 2>&5
20665 echo "$as_me:20665: \$? = $ac_status" >&5
20666 (exit $ac_status); } &&
20667 { ac_try='test -s conftest$ac_exeext'
20668 { (eval echo "$as_me:20668: \"$ac_try\"") >&5
20669 (eval $ac_try) 2>&5
20671 echo "$as_me:20671: \$? = $ac_status" >&5
20672 (exit $ac_status); }; }; then
20673 ac_cv_lib_nsl_gethostbyname=yes
20675 echo "$as_me: failed program was:" >&5
20676 cat conftest.$ac_ext >&5
20677 ac_cv_lib_nsl_gethostbyname=no
20679 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20680 LIBS=$ac_check_lib_save_LIBS
20682 echo "$as_me:20682: result: $ac_cv_lib_nsl_gethostbyname" >&5
20683 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
20684 if test $ac_cv_lib_nsl_gethostbyname = yes; then
20685 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
20688 if test $ac_cv_lib_nsl_gethostbyname = no; then
20689 echo "$as_me:20689: checking for gethostbyname in -lbsd" >&5
20690 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
20691 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
20692 echo $ECHO_N "(cached) $ECHO_C" >&6
20694 ac_check_lib_save_LIBS=$LIBS
20696 cat >conftest.$ac_ext <<_ACEOF
20697 #line 20697 "configure"
20698 #include "confdefs.h"
20700 /* Override any gcc2 internal prototype to avoid an error. */
20704 /* We use char because int might match the return type of a gcc2
20705 builtin and then its argument prototype would still apply. */
20706 char gethostbyname ();
20715 rm -f conftest.$ac_objext conftest$ac_exeext
20716 if { (eval echo "$as_me:20716: \"$ac_link\"") >&5
20717 (eval $ac_link) 2>&5
20719 echo "$as_me:20719: \$? = $ac_status" >&5
20720 (exit $ac_status); } &&
20721 { ac_try='test -s conftest$ac_exeext'
20722 { (eval echo "$as_me:20722: \"$ac_try\"") >&5
20723 (eval $ac_try) 2>&5
20725 echo "$as_me:20725: \$? = $ac_status" >&5
20726 (exit $ac_status); }; }; then
20727 ac_cv_lib_bsd_gethostbyname=yes
20729 echo "$as_me: failed program was:" >&5
20730 cat conftest.$ac_ext >&5
20731 ac_cv_lib_bsd_gethostbyname=no
20733 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20734 LIBS=$ac_check_lib_save_LIBS
20736 echo "$as_me:20736: result: $ac_cv_lib_bsd_gethostbyname" >&5
20737 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
20738 if test $ac_cv_lib_bsd_gethostbyname = yes; then
20739 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
20745 # lieder@skyler.mavd.honeywell.com says without -lsocket,
20746 # socket/setsockopt and other routines are undefined under SCO ODT
20747 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
20748 # on later versions), says Simon Leinen: it contains gethostby*
20749 # variants that don't use the nameserver (or something). -lsocket
20750 # must be given before -lnsl if both are needed. We assume that
20751 # if connect needs -lnsl, so does gethostbyname.
20752 echo "$as_me:20752: checking for connect" >&5
20753 echo $ECHO_N "checking for connect... $ECHO_C" >&6
20754 if test "${ac_cv_func_connect+set}" = set; then
20755 echo $ECHO_N "(cached) $ECHO_C" >&6
20757 cat >conftest.$ac_ext <<_ACEOF
20758 #line 20758 "configure"
20759 #include "confdefs.h"
20760 #define connect autoconf_temporary
20761 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
20768 /* We use char because int might match the return type of a gcc2
20769 builtin and then its argument prototype would still apply. */
20770 char connect (void);
20776 /* The GNU C library defines stubs for functions which it implements
20777 to always fail with ENOSYS. Some functions are actually named
20778 something starting with __ and the normal name is an alias. */
20779 #if defined (__stub_connect) || defined (__stub___connect)
20780 #error found stub for connect
20788 rm -f conftest.$ac_objext conftest$ac_exeext
20789 if { (eval echo "$as_me:20789: \"$ac_link\"") >&5
20790 (eval $ac_link) 2>&5
20792 echo "$as_me:20792: \$? = $ac_status" >&5
20793 (exit $ac_status); } &&
20794 { ac_try='test -s conftest$ac_exeext'
20795 { (eval echo "$as_me:20795: \"$ac_try\"") >&5
20796 (eval $ac_try) 2>&5
20798 echo "$as_me:20798: \$? = $ac_status" >&5
20799 (exit $ac_status); }; }; then
20800 ac_cv_func_connect=yes
20802 echo "$as_me: failed program was:" >&5
20803 cat conftest.$ac_ext >&5
20804 ac_cv_func_connect=no
20806 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20808 echo "$as_me:20808: result: $ac_cv_func_connect" >&5
20809 echo "${ECHO_T}$ac_cv_func_connect" >&6
20811 if test $ac_cv_func_connect = no; then
20812 echo "$as_me:20812: checking for connect in -lsocket" >&5
20813 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
20814 if test "${ac_cv_lib_socket_connect+set}" = set; then
20815 echo $ECHO_N "(cached) $ECHO_C" >&6
20817 ac_check_lib_save_LIBS=$LIBS
20818 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
20819 cat >conftest.$ac_ext <<_ACEOF
20820 #line 20820 "configure"
20821 #include "confdefs.h"
20823 /* Override any gcc2 internal prototype to avoid an error. */
20827 /* We use char because int might match the return type of a gcc2
20828 builtin and then its argument prototype would still apply. */
20838 rm -f conftest.$ac_objext conftest$ac_exeext
20839 if { (eval echo "$as_me:20839: \"$ac_link\"") >&5
20840 (eval $ac_link) 2>&5
20842 echo "$as_me:20842: \$? = $ac_status" >&5
20843 (exit $ac_status); } &&
20844 { ac_try='test -s conftest$ac_exeext'
20845 { (eval echo "$as_me:20845: \"$ac_try\"") >&5
20846 (eval $ac_try) 2>&5
20848 echo "$as_me:20848: \$? = $ac_status" >&5
20849 (exit $ac_status); }; }; then
20850 ac_cv_lib_socket_connect=yes
20852 echo "$as_me: failed program was:" >&5
20853 cat conftest.$ac_ext >&5
20854 ac_cv_lib_socket_connect=no
20856 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20857 LIBS=$ac_check_lib_save_LIBS
20859 echo "$as_me:20859: result: $ac_cv_lib_socket_connect" >&5
20860 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
20861 if test $ac_cv_lib_socket_connect = yes; then
20862 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
20867 # Guillermo Gomez says -lposix is necessary on A/UX.
20868 echo "$as_me:20868: checking for remove" >&5
20869 echo $ECHO_N "checking for remove... $ECHO_C" >&6
20870 if test "${ac_cv_func_remove+set}" = set; then
20871 echo $ECHO_N "(cached) $ECHO_C" >&6
20873 cat >conftest.$ac_ext <<_ACEOF
20874 #line 20874 "configure"
20875 #include "confdefs.h"
20876 #define remove autoconf_temporary
20877 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
20884 /* We use char because int might match the return type of a gcc2
20885 builtin and then its argument prototype would still apply. */
20886 char remove (void);
20892 /* The GNU C library defines stubs for functions which it implements
20893 to always fail with ENOSYS. Some functions are actually named
20894 something starting with __ and the normal name is an alias. */
20895 #if defined (__stub_remove) || defined (__stub___remove)
20896 #error found stub for remove
20904 rm -f conftest.$ac_objext conftest$ac_exeext
20905 if { (eval echo "$as_me:20905: \"$ac_link\"") >&5
20906 (eval $ac_link) 2>&5
20908 echo "$as_me:20908: \$? = $ac_status" >&5
20909 (exit $ac_status); } &&
20910 { ac_try='test -s conftest$ac_exeext'
20911 { (eval echo "$as_me:20911: \"$ac_try\"") >&5
20912 (eval $ac_try) 2>&5
20914 echo "$as_me:20914: \$? = $ac_status" >&5
20915 (exit $ac_status); }; }; then
20916 ac_cv_func_remove=yes
20918 echo "$as_me: failed program was:" >&5
20919 cat conftest.$ac_ext >&5
20920 ac_cv_func_remove=no
20922 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20924 echo "$as_me:20924: result: $ac_cv_func_remove" >&5
20925 echo "${ECHO_T}$ac_cv_func_remove" >&6
20927 if test $ac_cv_func_remove = no; then
20928 echo "$as_me:20928: checking for remove in -lposix" >&5
20929 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
20930 if test "${ac_cv_lib_posix_remove+set}" = set; then
20931 echo $ECHO_N "(cached) $ECHO_C" >&6
20933 ac_check_lib_save_LIBS=$LIBS
20934 LIBS="-lposix $LIBS"
20935 cat >conftest.$ac_ext <<_ACEOF
20936 #line 20936 "configure"
20937 #include "confdefs.h"
20939 /* Override any gcc2 internal prototype to avoid an error. */
20943 /* We use char because int might match the return type of a gcc2
20944 builtin and then its argument prototype would still apply. */
20954 rm -f conftest.$ac_objext conftest$ac_exeext
20955 if { (eval echo "$as_me:20955: \"$ac_link\"") >&5
20956 (eval $ac_link) 2>&5
20958 echo "$as_me:20958: \$? = $ac_status" >&5
20959 (exit $ac_status); } &&
20960 { ac_try='test -s conftest$ac_exeext'
20961 { (eval echo "$as_me:20961: \"$ac_try\"") >&5
20962 (eval $ac_try) 2>&5
20964 echo "$as_me:20964: \$? = $ac_status" >&5
20965 (exit $ac_status); }; }; then
20966 ac_cv_lib_posix_remove=yes
20968 echo "$as_me: failed program was:" >&5
20969 cat conftest.$ac_ext >&5
20970 ac_cv_lib_posix_remove=no
20972 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20973 LIBS=$ac_check_lib_save_LIBS
20975 echo "$as_me:20975: result: $ac_cv_lib_posix_remove" >&5
20976 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
20977 if test $ac_cv_lib_posix_remove = yes; then
20978 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
20983 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
20984 echo "$as_me:20984: checking for shmat" >&5
20985 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
20986 if test "${ac_cv_func_shmat+set}" = set; then
20987 echo $ECHO_N "(cached) $ECHO_C" >&6
20989 cat >conftest.$ac_ext <<_ACEOF
20990 #line 20990 "configure"
20991 #include "confdefs.h"
20992 #define shmat autoconf_temporary
20993 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21000 /* We use char because int might match the return type of a gcc2
21001 builtin and then its argument prototype would still apply. */
21008 /* The GNU C library defines stubs for functions which it implements
21009 to always fail with ENOSYS. Some functions are actually named
21010 something starting with __ and the normal name is an alias. */
21011 #if defined (__stub_shmat) || defined (__stub___shmat)
21012 #error found stub for shmat
21020 rm -f conftest.$ac_objext conftest$ac_exeext
21021 if { (eval echo "$as_me:21021: \"$ac_link\"") >&5
21022 (eval $ac_link) 2>&5
21024 echo "$as_me:21024: \$? = $ac_status" >&5
21025 (exit $ac_status); } &&
21026 { ac_try='test -s conftest$ac_exeext'
21027 { (eval echo "$as_me:21027: \"$ac_try\"") >&5
21028 (eval $ac_try) 2>&5
21030 echo "$as_me:21030: \$? = $ac_status" >&5
21031 (exit $ac_status); }; }; then
21032 ac_cv_func_shmat=yes
21034 echo "$as_me: failed program was:" >&5
21035 cat conftest.$ac_ext >&5
21036 ac_cv_func_shmat=no
21038 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21040 echo "$as_me:21040: result: $ac_cv_func_shmat" >&5
21041 echo "${ECHO_T}$ac_cv_func_shmat" >&6
21043 if test $ac_cv_func_shmat = no; then
21044 echo "$as_me:21044: checking for shmat in -lipc" >&5
21045 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
21046 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
21047 echo $ECHO_N "(cached) $ECHO_C" >&6
21049 ac_check_lib_save_LIBS=$LIBS
21051 cat >conftest.$ac_ext <<_ACEOF
21052 #line 21052 "configure"
21053 #include "confdefs.h"
21055 /* Override any gcc2 internal prototype to avoid an error. */
21059 /* We use char because int might match the return type of a gcc2
21060 builtin and then its argument prototype would still apply. */
21070 rm -f conftest.$ac_objext conftest$ac_exeext
21071 if { (eval echo "$as_me:21071: \"$ac_link\"") >&5
21072 (eval $ac_link) 2>&5
21074 echo "$as_me:21074: \$? = $ac_status" >&5
21075 (exit $ac_status); } &&
21076 { ac_try='test -s conftest$ac_exeext'
21077 { (eval echo "$as_me:21077: \"$ac_try\"") >&5
21078 (eval $ac_try) 2>&5
21080 echo "$as_me:21080: \$? = $ac_status" >&5
21081 (exit $ac_status); }; }; then
21082 ac_cv_lib_ipc_shmat=yes
21084 echo "$as_me: failed program was:" >&5
21085 cat conftest.$ac_ext >&5
21086 ac_cv_lib_ipc_shmat=no
21088 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21089 LIBS=$ac_check_lib_save_LIBS
21091 echo "$as_me:21091: result: $ac_cv_lib_ipc_shmat" >&5
21092 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
21093 if test $ac_cv_lib_ipc_shmat = yes; then
21094 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
21100 # Check for libraries that X11R6 Xt/Xaw programs need.
21101 ac_save_LDFLAGS=$LDFLAGS
21102 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
21103 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
21104 # check for ICE first), but we must link in the order -lSM -lICE or
21105 # we get undefined symbols. So assume we have SM if we have ICE.
21106 # These have to be linked with before -lX11, unlike the other
21107 # libraries we check for below, so use a different variable.
21108 # John Interrante, Karl Berry
21109 echo "$as_me:21109: checking for IceConnectionNumber in -lICE" >&5
21110 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
21111 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
21112 echo $ECHO_N "(cached) $ECHO_C" >&6
21114 ac_check_lib_save_LIBS=$LIBS
21115 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
21116 cat >conftest.$ac_ext <<_ACEOF
21117 #line 21117 "configure"
21118 #include "confdefs.h"
21120 /* Override any gcc2 internal prototype to avoid an error. */
21124 /* We use char because int might match the return type of a gcc2
21125 builtin and then its argument prototype would still apply. */
21126 char IceConnectionNumber ();
21130 IceConnectionNumber ();
21135 rm -f conftest.$ac_objext conftest$ac_exeext
21136 if { (eval echo "$as_me:21136: \"$ac_link\"") >&5
21137 (eval $ac_link) 2>&5
21139 echo "$as_me:21139: \$? = $ac_status" >&5
21140 (exit $ac_status); } &&
21141 { ac_try='test -s conftest$ac_exeext'
21142 { (eval echo "$as_me:21142: \"$ac_try\"") >&5
21143 (eval $ac_try) 2>&5
21145 echo "$as_me:21145: \$? = $ac_status" >&5
21146 (exit $ac_status); }; }; then
21147 ac_cv_lib_ICE_IceConnectionNumber=yes
21149 echo "$as_me: failed program was:" >&5
21150 cat conftest.$ac_ext >&5
21151 ac_cv_lib_ICE_IceConnectionNumber=no
21153 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21154 LIBS=$ac_check_lib_save_LIBS
21156 echo "$as_me:21156: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
21157 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
21158 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
21159 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
21162 LDFLAGS=$ac_save_LDFLAGS
21168 if ( test "$GCC" = yes || test "$GXX" = yes )
21171 if ( test "$GCC" = yes || test "$GXX" = yes )
21175 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
21177 echo "${as_me:-configure}:21177: testing repairing CFLAGS: $CFLAGS ..." 1>&5
21180 for cf_temp_scan in $CFLAGS
21182 case "x$cf_temp_scan" in
21185 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
21186 EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
21191 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
21192 cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
21197 CFLAGS="$cf_temp_flags"
21198 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
21200 echo "${as_me:-configure}:21200: testing ... fixed $CFLAGS ..." 1>&5
21202 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
21204 echo "${as_me:-configure}:21204: testing ... extra $EXTRA_CFLAGS ..." 1>&5
21210 if ( test "$GCC" = yes || test "$GXX" = yes )
21214 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
21216 echo "${as_me:-configure}:21216: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
21219 for cf_temp_scan in $CPPFLAGS
21221 case "x$cf_temp_scan" in
21224 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
21225 EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
21230 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
21231 cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
21236 CPPFLAGS="$cf_temp_flags"
21237 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
21239 echo "${as_me:-configure}:21239: testing ... fixed $CPPFLAGS ..." 1>&5
21241 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
21243 echo "${as_me:-configure}:21243: testing ... extra $EXTRA_CFLAGS ..." 1>&5
21249 if ( test "$GCC" = yes || test "$GXX" = yes )
21253 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
21255 echo "${as_me:-configure}:21255: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
21258 for cf_temp_scan in $LDFLAGS
21260 case "x$cf_temp_scan" in
21263 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
21264 EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
21269 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
21270 cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
21275 LDFLAGS="$cf_temp_flags"
21276 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
21278 echo "${as_me:-configure}:21278: testing ... fixed $LDFLAGS ..." 1>&5
21280 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
21282 echo "${as_me:-configure}:21282: testing ... extra $EXTRA_CFLAGS ..." 1>&5
21288 echo "$as_me:21288: checking if you want to turn on gcc warnings" >&5
21289 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
21291 # Check whether --enable-warnings or --disable-warnings was given.
21292 if test "${enable_warnings+set}" = set; then
21293 enableval="$enable_warnings"
21294 test "$enableval" != yes && enableval=no
21295 if test "$enableval" != "no" ; then
21305 echo "$as_me:21305: result: $with_warnings" >&5
21306 echo "${ECHO_T}$with_warnings" >&6
21307 if test "$with_warnings" = "yes"
21310 if ( test "$GCC" = yes || test "$GXX" = yes )
21312 cat > conftest.i <<EOF
21314 #define GCC_PRINTF 0
21317 #define GCC_SCANF 0
21319 #ifndef GCC_NORETURN
21320 #define GCC_NORETURN /* nothing */
21323 #define GCC_UNUSED /* nothing */
21326 if test "$GCC" = yes
21328 { echo "$as_me:21328: checking for $CC __attribute__ directives..." >&5
21329 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
21330 cat > conftest.$ac_ext <<EOF
21331 #line 21331 "${as_me:-configure}"
21332 #include "confdefs.h"
21333 #include "conftest.h"
21334 #include "conftest.i"
21336 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
21338 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
21341 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
21343 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
21345 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
21346 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
21347 extern void foo(void) GCC_NORETURN;
21348 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
21350 cf_printf_attribute=no
21351 cf_scanf_attribute=no
21352 for cf_attribute in scanf printf unused noreturn
21355 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21357 cf_directive="__attribute__(($cf_attribute))"
21358 echo "checking for $CC $cf_directive" 1>&5
21360 case $cf_attribute in
21362 cf_printf_attribute=yes
21363 cat >conftest.h <<EOF
21364 #define GCC_$cf_ATTRIBUTE 1
21368 cf_scanf_attribute=yes
21369 cat >conftest.h <<EOF
21370 #define GCC_$cf_ATTRIBUTE 1
21374 cat >conftest.h <<EOF
21375 #define GCC_$cf_ATTRIBUTE $cf_directive
21380 if { (eval echo "$as_me:21380: \"$ac_compile\"") >&5
21381 (eval $ac_compile) 2>&5
21383 echo "$as_me:21383: \$? = $ac_status" >&5
21384 (exit $ac_status); }; then
21385 test -n "$verbose" && echo "$as_me:21385: result: ... $cf_attribute" >&5
21386 echo "${ECHO_T}... $cf_attribute" >&6
21387 cat conftest.h >>confdefs.h
21388 case $cf_attribute in
21391 cat >>confdefs.h <<EOF
21392 #define GCC_NORETURN $cf_directive
21397 cf_value='/* nothing */'
21398 if test "$cf_printf_attribute" != no ; then
21399 cf_value='__attribute__((format(printf,fmt,var)))'
21401 cat >>confdefs.h <<\EOF
21402 #define GCC_PRINTF 1
21407 cat >>confdefs.h <<EOF
21408 #define GCC_PRINTFLIKE(fmt,var) $cf_value
21413 cf_value='/* nothing */'
21414 if test "$cf_scanf_attribute" != no ; then
21415 cf_value='__attribute__((format(scanf,fmt,var)))'
21417 cat >>confdefs.h <<\EOF
21418 #define GCC_SCANF 1
21423 cat >>confdefs.h <<EOF
21424 #define GCC_SCANFLIKE(fmt,var) $cf_value
21430 cat >>confdefs.h <<EOF
21431 #define GCC_UNUSED $cf_directive
21439 fgrep define conftest.i >>confdefs.h
21444 if test "x$have_x" = xyes; then
21446 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
21447 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
21448 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
21449 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
21450 for cf_X_CFLAGS in $X_CFLAGS
21452 case "x$cf_X_CFLAGS" in
21454 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
21457 CFLAGS="$CFLAGS $cf_X_CFLAGS"
21462 cat >conftest.$ac_ext <<_ACEOF
21463 #line 21463 "configure"
21464 #include "confdefs.h"
21466 #include <stdlib.h>
21467 #include <X11/Intrinsic.h>
21472 String foo = malloc(1); (void)foo
21477 rm -f conftest.$ac_objext
21478 if { (eval echo "$as_me:21478: \"$ac_compile\"") >&5
21479 (eval $ac_compile) 2>&5
21481 echo "$as_me:21481: \$? = $ac_status" >&5
21482 (exit $ac_status); } &&
21483 { ac_try='test -s conftest.$ac_objext'
21484 { (eval echo "$as_me:21484: \"$ac_try\"") >&5
21485 (eval $ac_try) 2>&5
21487 echo "$as_me:21487: \$? = $ac_status" >&5
21488 (exit $ac_status); }; }; then
21490 echo "$as_me:21490: checking for X11/Xt const-feature" >&5
21491 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
21492 if test "${cf_cv_const_x_string+set}" = set; then
21493 echo $ECHO_N "(cached) $ECHO_C" >&6
21496 cat >conftest.$ac_ext <<_ACEOF
21497 #line 21497 "configure"
21498 #include "confdefs.h"
21500 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
21501 #undef XTSTRINGDEFINES /* X11R5 and later */
21502 #include <stdlib.h>
21503 #include <X11/Intrinsic.h>
21508 String foo = malloc(1); *foo = 0
21513 rm -f conftest.$ac_objext
21514 if { (eval echo "$as_me:21514: \"$ac_compile\"") >&5
21515 (eval $ac_compile) 2>&5
21517 echo "$as_me:21517: \$? = $ac_status" >&5
21518 (exit $ac_status); } &&
21519 { ac_try='test -s conftest.$ac_objext'
21520 { (eval echo "$as_me:21520: \"$ac_try\"") >&5
21521 (eval $ac_try) 2>&5
21523 echo "$as_me:21523: \$? = $ac_status" >&5
21524 (exit $ac_status); }; }; then
21526 cf_cv_const_x_string=no
21529 echo "$as_me: failed program was:" >&5
21530 cat conftest.$ac_ext >&5
21532 cf_cv_const_x_string=yes
21535 rm -f conftest.$ac_objext conftest.$ac_ext
21538 echo "$as_me:21538: result: $cf_cv_const_x_string" >&5
21539 echo "${ECHO_T}$cf_cv_const_x_string" >&6
21541 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
21542 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
21543 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
21545 case $cf_cv_const_x_string in
21548 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21549 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
21554 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21555 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
21561 echo "$as_me: failed program was:" >&5
21562 cat conftest.$ac_ext >&5
21564 rm -f conftest.$ac_objext conftest.$ac_ext
21566 cat > conftest.$ac_ext <<EOF
21567 #line 21567 "${as_me:-configure}"
21568 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
21570 if test "$INTEL_COMPILER" = yes
21572 # The "-wdXXX" options suppress warnings:
21573 # remark #1419: external declaration in primary source file
21574 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
21575 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
21576 # remark #193: zero used for undefined preprocessing identifier
21577 # remark #593: variable "curs_sb_left_arrow" was set but never used
21578 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
21579 # remark #869: parameter "tw" was never referenced
21580 # remark #981: operands are evaluated in unspecified order
21581 # warning #279: controlling expression is constant
21583 { echo "$as_me:21583: checking for $CC warning options..." >&5
21584 echo "$as_me: checking for $CC warning options..." >&6;}
21585 cf_save_CFLAGS="$CFLAGS"
21586 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
21598 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
21599 if { (eval echo "$as_me:21599: \"$ac_compile\"") >&5
21600 (eval $ac_compile) 2>&5
21602 echo "$as_me:21602: \$? = $ac_status" >&5
21603 (exit $ac_status); }; then
21604 test -n "$verbose" && echo "$as_me:21604: result: ... -$cf_opt" >&5
21605 echo "${ECHO_T}... -$cf_opt" >&6
21606 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
21609 CFLAGS="$cf_save_CFLAGS"
21610 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
21612 { echo "$as_me:21612: checking for $CC warning options..." >&5
21613 echo "$as_me: checking for $CC warning options..." >&6;}
21614 cf_save_CFLAGS="$CFLAGS"
21616 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
21617 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
21618 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
21619 for cf_opt in W Wall \
21620 Wbad-function-cast \
21623 Wdeclaration-after-statement \
21626 Wmissing-declarations \
21627 Wmissing-prototypes \
21631 Wstrict-prototypes \
21632 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
21634 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
21635 if { (eval echo "$as_me:21635: \"$ac_compile\"") >&5
21636 (eval $ac_compile) 2>&5
21638 echo "$as_me:21638: \$? = $ac_status" >&5
21639 (exit $ac_status); }; then
21640 test -n "$verbose" && echo "$as_me:21640: result: ... -$cf_opt" >&5
21641 echo "${ECHO_T}... -$cf_opt" >&6
21644 case $GCC_VERSION in
21646 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
21648 echo "${as_me:-configure}:21648: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
21654 case $GCC_VERSION in
21656 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
21658 echo "${as_me:-configure}:21658: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
21664 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
21667 CFLAGS="$cf_save_CFLAGS"
21675 echo "$as_me:21675: checking if you want to use dmalloc for testing" >&5
21676 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
21678 # Check whether --with-dmalloc or --without-dmalloc was given.
21679 if test "${with_dmalloc+set}" = set; then
21680 withval="$with_dmalloc"
21682 cat >>confdefs.h <<EOF
21683 #define USE_DMALLOC 1
21686 : ${with_cflags:=-g}
21687 : ${with_no_leaks:=yes}
21692 echo "$as_me:21692: result: ${with_dmalloc:-no}" >&5
21693 echo "${ECHO_T}${with_dmalloc:-no}" >&6
21695 case .$with_cflags in
21705 cf_new_extra_cppflags=
21707 for cf_add_cflags in -g
21709 case $cf_fix_cppflags in
21711 case $cf_add_cflags in
21712 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21713 case $cf_add_cflags in
21715 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21717 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21718 && test -z "${cf_tst_cflags}" \
21719 && cf_fix_cppflags=yes
21721 if test $cf_fix_cppflags = yes ; then
21723 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21724 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21727 elif test "${cf_tst_cflags}" = "\"'" ; then
21729 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21730 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21736 case "$CPPFLAGS" in
21740 case $cf_add_cflags in
21742 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21744 CPPFLAGS=`echo "$CPPFLAGS" | \
21745 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
21746 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
21751 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21752 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21759 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21760 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21767 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21768 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21770 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
21772 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21773 && test -z "${cf_tst_cflags}" \
21774 && cf_fix_cppflags=no
21779 if test -n "$cf_new_cflags" ; then
21781 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21782 CFLAGS="${CFLAGS}$cf_new_cflags"
21786 if test -n "$cf_new_cppflags" ; then
21788 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21789 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21793 if test -n "$cf_new_extra_cppflags" ; then
21795 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21796 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21805 if test "$with_dmalloc" = yes ; then
21806 echo "$as_me:21806: checking for dmalloc.h" >&5
21807 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
21808 if test "${ac_cv_header_dmalloc_h+set}" = set; then
21809 echo $ECHO_N "(cached) $ECHO_C" >&6
21811 cat >conftest.$ac_ext <<_ACEOF
21812 #line 21812 "configure"
21813 #include "confdefs.h"
21814 #include <dmalloc.h>
21816 if { (eval echo "$as_me:21816: \"$ac_cpp conftest.$ac_ext\"") >&5
21817 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21819 egrep -v '^ *\+' conftest.er1 >conftest.err
21821 cat conftest.err >&5
21822 echo "$as_me:21822: \$? = $ac_status" >&5
21823 (exit $ac_status); } >/dev/null; then
21824 if test -s conftest.err; then
21825 ac_cpp_err=$ac_c_preproc_warn_flag
21832 if test -z "$ac_cpp_err"; then
21833 ac_cv_header_dmalloc_h=yes
21835 echo "$as_me: failed program was:" >&5
21836 cat conftest.$ac_ext >&5
21837 ac_cv_header_dmalloc_h=no
21839 rm -f conftest.err conftest.$ac_ext
21841 echo "$as_me:21841: result: $ac_cv_header_dmalloc_h" >&5
21842 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
21843 if test $ac_cv_header_dmalloc_h = yes; then
21845 echo "$as_me:21845: checking for dmalloc_debug in -ldmalloc" >&5
21846 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
21847 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
21848 echo $ECHO_N "(cached) $ECHO_C" >&6
21850 ac_check_lib_save_LIBS=$LIBS
21851 LIBS="-ldmalloc $LIBS"
21852 cat >conftest.$ac_ext <<_ACEOF
21853 #line 21853 "configure"
21854 #include "confdefs.h"
21856 /* Override any gcc2 internal prototype to avoid an error. */
21860 /* We use char because int might match the return type of a gcc2
21861 builtin and then its argument prototype would still apply. */
21862 char dmalloc_debug ();
21871 rm -f conftest.$ac_objext conftest$ac_exeext
21872 if { (eval echo "$as_me:21872: \"$ac_link\"") >&5
21873 (eval $ac_link) 2>&5
21875 echo "$as_me:21875: \$? = $ac_status" >&5
21876 (exit $ac_status); } &&
21877 { ac_try='test -s conftest$ac_exeext'
21878 { (eval echo "$as_me:21878: \"$ac_try\"") >&5
21879 (eval $ac_try) 2>&5
21881 echo "$as_me:21881: \$? = $ac_status" >&5
21882 (exit $ac_status); }; }; then
21883 ac_cv_lib_dmalloc_dmalloc_debug=yes
21885 echo "$as_me: failed program was:" >&5
21886 cat conftest.$ac_ext >&5
21887 ac_cv_lib_dmalloc_dmalloc_debug=no
21889 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21890 LIBS=$ac_check_lib_save_LIBS
21892 echo "$as_me:21892: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
21893 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
21894 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
21895 cat >>confdefs.h <<EOF
21896 #define HAVE_LIBDMALLOC 1
21899 LIBS="-ldmalloc $LIBS"
21907 echo "$as_me:21907: checking if you want to use dbmalloc for testing" >&5
21908 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
21910 # Check whether --with-dbmalloc or --without-dbmalloc was given.
21911 if test "${with_dbmalloc+set}" = set; then
21912 withval="$with_dbmalloc"
21914 cat >>confdefs.h <<EOF
21915 #define USE_DBMALLOC 1
21918 : ${with_cflags:=-g}
21919 : ${with_no_leaks:=yes}
21924 echo "$as_me:21924: result: ${with_dbmalloc:-no}" >&5
21925 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
21927 case .$with_cflags in
21937 cf_new_extra_cppflags=
21939 for cf_add_cflags in -g
21941 case $cf_fix_cppflags in
21943 case $cf_add_cflags in
21944 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21945 case $cf_add_cflags in
21947 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21949 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21950 && test -z "${cf_tst_cflags}" \
21951 && cf_fix_cppflags=yes
21953 if test $cf_fix_cppflags = yes ; then
21955 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21956 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21959 elif test "${cf_tst_cflags}" = "\"'" ; then
21961 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21962 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21968 case "$CPPFLAGS" in
21972 case $cf_add_cflags in
21974 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21976 CPPFLAGS=`echo "$CPPFLAGS" | \
21977 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
21978 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
21983 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21984 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21991 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21992 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21999 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22000 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22002 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
22004 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22005 && test -z "${cf_tst_cflags}" \
22006 && cf_fix_cppflags=no
22011 if test -n "$cf_new_cflags" ; then
22013 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22014 CFLAGS="${CFLAGS}$cf_new_cflags"
22018 if test -n "$cf_new_cppflags" ; then
22020 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22021 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22025 if test -n "$cf_new_extra_cppflags" ; then
22027 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22028 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22037 if test "$with_dbmalloc" = yes ; then
22038 echo "$as_me:22038: checking for dbmalloc.h" >&5
22039 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
22040 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
22041 echo $ECHO_N "(cached) $ECHO_C" >&6
22043 cat >conftest.$ac_ext <<_ACEOF
22044 #line 22044 "configure"
22045 #include "confdefs.h"
22046 #include <dbmalloc.h>
22048 if { (eval echo "$as_me:22048: \"$ac_cpp conftest.$ac_ext\"") >&5
22049 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22051 egrep -v '^ *\+' conftest.er1 >conftest.err
22053 cat conftest.err >&5
22054 echo "$as_me:22054: \$? = $ac_status" >&5
22055 (exit $ac_status); } >/dev/null; then
22056 if test -s conftest.err; then
22057 ac_cpp_err=$ac_c_preproc_warn_flag
22064 if test -z "$ac_cpp_err"; then
22065 ac_cv_header_dbmalloc_h=yes
22067 echo "$as_me: failed program was:" >&5
22068 cat conftest.$ac_ext >&5
22069 ac_cv_header_dbmalloc_h=no
22071 rm -f conftest.err conftest.$ac_ext
22073 echo "$as_me:22073: result: $ac_cv_header_dbmalloc_h" >&5
22074 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
22075 if test $ac_cv_header_dbmalloc_h = yes; then
22077 echo "$as_me:22077: checking for debug_malloc in -ldbmalloc" >&5
22078 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
22079 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
22080 echo $ECHO_N "(cached) $ECHO_C" >&6
22082 ac_check_lib_save_LIBS=$LIBS
22083 LIBS="-ldbmalloc $LIBS"
22084 cat >conftest.$ac_ext <<_ACEOF
22085 #line 22085 "configure"
22086 #include "confdefs.h"
22088 /* Override any gcc2 internal prototype to avoid an error. */
22092 /* We use char because int might match the return type of a gcc2
22093 builtin and then its argument prototype would still apply. */
22094 char debug_malloc ();
22103 rm -f conftest.$ac_objext conftest$ac_exeext
22104 if { (eval echo "$as_me:22104: \"$ac_link\"") >&5
22105 (eval $ac_link) 2>&5
22107 echo "$as_me:22107: \$? = $ac_status" >&5
22108 (exit $ac_status); } &&
22109 { ac_try='test -s conftest$ac_exeext'
22110 { (eval echo "$as_me:22110: \"$ac_try\"") >&5
22111 (eval $ac_try) 2>&5
22113 echo "$as_me:22113: \$? = $ac_status" >&5
22114 (exit $ac_status); }; }; then
22115 ac_cv_lib_dbmalloc_debug_malloc=yes
22117 echo "$as_me: failed program was:" >&5
22118 cat conftest.$ac_ext >&5
22119 ac_cv_lib_dbmalloc_debug_malloc=no
22121 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22122 LIBS=$ac_check_lib_save_LIBS
22124 echo "$as_me:22124: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
22125 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
22126 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
22127 cat >>confdefs.h <<EOF
22128 #define HAVE_LIBDBMALLOC 1
22131 LIBS="-ldbmalloc $LIBS"
22139 echo "$as_me:22139: checking if you want to use valgrind for testing" >&5
22140 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
22142 # Check whether --with-valgrind or --without-valgrind was given.
22143 if test "${with_valgrind+set}" = set; then
22144 withval="$with_valgrind"
22146 cat >>confdefs.h <<EOF
22147 #define USE_VALGRIND 1
22150 : ${with_cflags:=-g}
22151 : ${with_no_leaks:=yes}
22156 echo "$as_me:22156: result: ${with_valgrind:-no}" >&5
22157 echo "${ECHO_T}${with_valgrind:-no}" >&6
22159 case .$with_cflags in
22169 cf_new_extra_cppflags=
22171 for cf_add_cflags in -g
22173 case $cf_fix_cppflags in
22175 case $cf_add_cflags in
22176 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22177 case $cf_add_cflags in
22179 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22181 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22182 && test -z "${cf_tst_cflags}" \
22183 && cf_fix_cppflags=yes
22185 if test $cf_fix_cppflags = yes ; then
22187 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22188 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22191 elif test "${cf_tst_cflags}" = "\"'" ; then
22193 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22194 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22200 case "$CPPFLAGS" in
22204 case $cf_add_cflags in
22206 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22208 CPPFLAGS=`echo "$CPPFLAGS" | \
22209 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22210 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22215 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22216 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22223 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22224 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22231 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22232 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22234 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
22236 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22237 && test -z "${cf_tst_cflags}" \
22238 && cf_fix_cppflags=no
22243 if test -n "$cf_new_cflags" ; then
22245 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22246 CFLAGS="${CFLAGS}$cf_new_cflags"
22250 if test -n "$cf_new_cppflags" ; then
22252 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22253 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22257 if test -n "$cf_new_extra_cppflags" ; then
22259 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22260 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22269 echo "$as_me:22269: checking if you want to perform memory-leak testing" >&5
22270 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
22272 # Check whether --enable-leaks or --disable-leaks was given.
22273 if test "${enable_leaks+set}" = set; then
22274 enableval="$enable_leaks"
22275 if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
22277 : ${with_no_leaks:=no}
22279 echo "$as_me:22279: result: $with_no_leaks" >&5
22280 echo "${ECHO_T}$with_no_leaks" >&6
22282 if test "$with_no_leaks" = yes ; then
22284 cat >>confdefs.h <<\EOF
22288 cat >>confdefs.h <<\EOF
22289 #define YY_NO_LEAKS 1
22295 if test "x$cf_cv_enable_rpath" != xno
22297 echo "$as_me:22297: checking for an rpath option" >&5
22298 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
22299 case $cf_cv_system_name in
22301 if test "$GCC" = yes; then
22302 LD_RPATH_OPT="-Wl,-rpath,"
22304 LD_RPATH_OPT="-rpath "
22307 (linux*|gnu*|k*bsd*-gnu|freebsd*)
22308 LD_RPATH_OPT="-Wl,-rpath,"
22310 (openbsd[2-9].*|mirbsd*)
22311 LD_RPATH_OPT="-Wl,-rpath,"
22314 LD_RPATH_OPT="-rpath "
22317 LD_RPATH_OPT="-Wl,-rpath,"
22320 LD_RPATH_OPT="-rpath "
22328 echo "$as_me:22328: result: $LD_RPATH_OPT" >&5
22329 echo "${ECHO_T}$LD_RPATH_OPT" >&6
22331 case "x$LD_RPATH_OPT" in
22333 echo "$as_me:22333: checking if we need a space after rpath option" >&5
22334 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
22335 cf_save_LIBS="$LIBS"
22337 cf_add_libs="$LIBS"
22340 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22341 # filter duplicates
22342 for cf_add_1lib in $cf_add_0lib; do
22343 for cf_add_2lib in $cf_add_libs; do
22344 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22349 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22351 LIBS="$cf_add_libs"
22353 cat >conftest.$ac_ext <<_ACEOF
22354 #line 22354 "configure"
22355 #include "confdefs.h"
22365 rm -f conftest.$ac_objext conftest$ac_exeext
22366 if { (eval echo "$as_me:22366: \"$ac_link\"") >&5
22367 (eval $ac_link) 2>&5
22369 echo "$as_me:22369: \$? = $ac_status" >&5
22370 (exit $ac_status); } &&
22371 { ac_try='test -s conftest$ac_exeext'
22372 { (eval echo "$as_me:22372: \"$ac_try\"") >&5
22373 (eval $ac_try) 2>&5
22375 echo "$as_me:22375: \$? = $ac_status" >&5
22376 (exit $ac_status); }; }; then
22379 echo "$as_me: failed program was:" >&5
22380 cat conftest.$ac_ext >&5
22383 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22384 LIBS="$cf_save_LIBS"
22385 echo "$as_me:22385: result: $cf_rpath_space" >&5
22386 echo "${ECHO_T}$cf_rpath_space" >&6
22387 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
22392 echo "$as_me:22392: checking if rpath-hack should be disabled" >&5
22393 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
22395 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
22396 if test "${enable_rpath_hack+set}" = set; then
22397 enableval="$enable_rpath_hack"
22398 test "$enableval" != no && enableval=yes
22399 if test "$enableval" != "yes" ; then
22400 cf_disable_rpath_hack=yes
22402 cf_disable_rpath_hack=no
22406 cf_disable_rpath_hack=no
22409 echo "$as_me:22409: result: $cf_disable_rpath_hack" >&5
22410 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
22411 if test "$cf_disable_rpath_hack" = no ; then
22413 echo "$as_me:22413: checking for updated LDFLAGS" >&5
22414 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
22415 if test -n "$LD_RPATH_OPT" ; then
22416 echo "$as_me:22416: result: maybe" >&5
22417 echo "${ECHO_T}maybe" >&6
22421 # Extract the first word of "$ac_prog", so it can be a program name with args.
22422 set dummy $ac_prog; ac_word=$2
22423 echo "$as_me:22423: checking for $ac_word" >&5
22424 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22425 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
22426 echo $ECHO_N "(cached) $ECHO_C" >&6
22428 if test -n "$cf_ldd_prog"; then
22429 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
22431 ac_save_IFS=$IFS; IFS=$ac_path_separator
22433 for ac_dir in $ac_dummy; do
22435 test -z "$ac_dir" && ac_dir=.
22436 $as_executable_p "$ac_dir/$ac_word" || continue
22437 ac_cv_prog_cf_ldd_prog="$ac_prog"
22438 echo "$as_me:22438: found $ac_dir/$ac_word" >&5
22444 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
22445 if test -n "$cf_ldd_prog"; then
22446 echo "$as_me:22446: result: $cf_ldd_prog" >&5
22447 echo "${ECHO_T}$cf_ldd_prog" >&6
22449 echo "$as_me:22449: result: no" >&5
22450 echo "${ECHO_T}no" >&6
22453 test -n "$cf_ldd_prog" && break
22455 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
22457 cf_rpath_list="/usr/lib /lib"
22458 if test "$cf_ldd_prog" != no
22462 cat >conftest.$ac_ext <<_ACEOF
22463 #line 22463 "configure"
22464 #include "confdefs.h"
22474 rm -f conftest.$ac_objext conftest$ac_exeext
22475 if { (eval echo "$as_me:22475: \"$ac_link\"") >&5
22476 (eval $ac_link) 2>&5
22478 echo "$as_me:22478: \$? = $ac_status" >&5
22479 (exit $ac_status); } &&
22480 { ac_try='test -s conftest$ac_exeext'
22481 { (eval echo "$as_me:22481: \"$ac_try\"") >&5
22482 (eval $ac_try) 2>&5
22484 echo "$as_me:22484: \$? = $ac_status" >&5
22485 (exit $ac_status); }; }; then
22486 cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
22487 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
22489 echo "$as_me: failed program was:" >&5
22490 cat conftest.$ac_ext >&5
22492 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22494 # If we passed the link-test, but get a "not found" on a given library,
22495 # this could be due to inept reconfiguration of gcc to make it only
22496 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
22497 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
22498 # /usr/local libraries.
22499 if test -n "$cf_rpath_oops"
22501 for cf_rpath_src in $cf_rpath_oops
22503 for cf_rpath_dir in \
22508 if test -f $cf_rpath_dir/lib/$cf_rpath_src
22510 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
22512 echo "${as_me:-configure}:22512: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
22514 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
22522 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
22524 echo "${as_me:-configure}:22524: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
22526 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
22528 echo "${as_me:-configure}:22528: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
22531 for cf_rpath_src in $LDFLAGS
22533 case $cf_rpath_src in
22536 # check if this refers to a directory which we will ignore
22538 if test -n "$cf_rpath_list"
22540 for cf_rpath_item in $cf_rpath_list
22542 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
22550 if test "$cf_rpath_skip" = no
22552 # transform the option
22553 if test "$LD_RPATH_OPT" = "-R " ; then
22554 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
22556 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
22559 # if we have not already added this, add it now
22560 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
22561 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
22563 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
22565 echo "${as_me:-configure}:22565: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
22567 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
22572 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
22574 LDFLAGS=$cf_rpath_dst
22576 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
22578 echo "${as_me:-configure}:22578: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
22580 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
22582 echo "${as_me:-configure}:22582: testing ...checking LIBS $LIBS ..." 1>&5
22585 for cf_rpath_src in $LIBS
22587 case $cf_rpath_src in
22590 # check if this refers to a directory which we will ignore
22592 if test -n "$cf_rpath_list"
22594 for cf_rpath_item in $cf_rpath_list
22596 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
22604 if test "$cf_rpath_skip" = no
22606 # transform the option
22607 if test "$LD_RPATH_OPT" = "-R " ; then
22608 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
22610 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
22613 # if we have not already added this, add it now
22614 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
22615 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
22617 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
22619 echo "${as_me:-configure}:22619: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
22621 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
22626 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
22630 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
22632 echo "${as_me:-configure}:22632: testing ...checked LIBS $LIBS ..." 1>&5
22634 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
22636 echo "${as_me:-configure}:22636: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
22639 echo "$as_me:22639: result: no" >&5
22640 echo "${ECHO_T}no" >&6
22648 ac_config_files="$ac_config_files Makefile"
22649 ac_config_commands="$ac_config_commands default"
22650 cat >confcache <<\_ACEOF
22651 # This file is a shell script that caches the results of configure
22652 # tests run on this system so they can be shared between configure
22653 # scripts and configure runs, see configure's option --config-cache.
22654 # It is not useful on other systems. If it contains results you don't
22655 # want to keep, you may remove or edit it.
22657 # config.status only pays attention to the cache file if you give it
22658 # the --recheck option to rerun configure.
22660 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22661 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22662 # following values.
22666 # The following way of writing the cache mishandles newlines in values,
22667 # but we know of no workaround that is simple, portable, and efficient.
22668 # So, don't put newlines in cache variables' values.
22669 # Ultrix sh set writes to stderr and can't be redirected directly,
22670 # and sets the high bit in the cache file unless we assign to the vars.
22673 case `(ac_space=' '; set | grep ac_space) 2>&1` in
22675 # `set' does not quote correctly, so add quotes (double-quote
22676 # substitution turns \\\\ into \\, and sed turns \\ into \).
22679 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22682 # `set' quotes correctly as required by POSIX, so do not add quotes.
22684 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22691 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22693 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22695 if cmp -s $cache_file confcache; then :; else
22696 if test -w $cache_file; then
22697 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22698 cat confcache >$cache_file
22700 echo "not updating unwritable cache $cache_file"
22705 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22706 # Let make expand exec_prefix.
22707 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22709 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22710 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22711 # trailing colons and then remove the whole line if VPATH becomes empty
22712 # (actually we leave an empty line to preserve line numbers).
22713 if test "x$srcdir" = x.; then
22714 ac_vpsub='/^[ ]*VPATH[ ]*=/{
22715 s/:*\$(srcdir):*/:/;
22716 s/:*\${srcdir}:*/:/;
22718 s/^\([^=]*=[ ]*\):*/\1/;
22724 DEFS=-DHAVE_CONFIG_H
22726 : ${CONFIG_STATUS=./config.status}
22727 ac_clean_files_save=$ac_clean_files
22728 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22729 { echo "$as_me:22729: creating $CONFIG_STATUS" >&5
22730 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22731 cat >$CONFIG_STATUS <<_ACEOF
22733 # Generated automatically by configure.
22734 # Run this file to recreate the current configuration.
22735 # Compiler output produced by configure, useful for debugging
22736 # configure, is in config.log if it exists.
22739 SHELL=\${CONFIG_SHELL-$SHELL}
22740 ac_cs_invocation="\$0 \$@"
22742 CLICOLOR_FORCE= GREP_OPTIONS=
22743 unset CLICOLOR_FORCE GREP_OPTIONS
22746 cat >>$CONFIG_STATUS <<\_ACEOF
22747 # Be Bourne compatible
22748 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22751 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22755 # Name of the executable.
22756 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22758 if expr a : '\(a\)' >/dev/null 2>&1; then
22764 rm -f conf$$ conf$$.exe conf$$.file
22766 if ln -s conf$$.file conf$$ 2>/dev/null; then
22767 # We could just check for DJGPP; but this test a) works b) is more generic
22768 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22769 if test -f conf$$.exe; then
22770 # Don't use ln at all; we don't have any links
22775 elif ln conf$$.file conf$$ 2>/dev/null; then
22780 rm -f conf$$ conf$$.exe conf$$.file
22782 as_executable_p="test -f"
22784 # Support unset when possible.
22785 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22792 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22793 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22794 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22795 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22796 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22797 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22798 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22799 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22802 # We need space, tab and new line, in precisely that order.
22808 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22814 # Files that config.status was made for.
22815 if test -n "$ac_config_files"; then
22816 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22819 if test -n "$ac_config_headers"; then
22820 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22823 if test -n "$ac_config_links"; then
22824 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22827 if test -n "$ac_config_commands"; then
22828 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22831 cat >>$CONFIG_STATUS <<\EOF
22834 \`$as_me' instantiates files from templates according to the
22835 current configuration.
22837 Usage: $0 [OPTIONS] [FILE]...
22839 -h, --help print this help, then exit
22840 -V, --version print version number, then exit
22841 -d, --debug don't remove temporary files
22842 --recheck update $as_me by reconfiguring in the same conditions
22843 --file=FILE[:TEMPLATE]
22844 instantiate the configuration file FILE
22845 --header=FILE[:TEMPLATE]
22846 instantiate the configuration header FILE
22848 Configuration files:
22851 Configuration headers:
22854 Configuration commands:
22857 Report bugs to <dickey@invisible-island.net>."
22860 cat >>$CONFIG_STATUS <<EOF
22863 configured by $0, generated by GNU Autoconf 2.52.20200802,
22864 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22866 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22867 Free Software Foundation, Inc.
22868 This config.status script is free software; the Free Software Foundation
22869 gives unlimited permission to copy, distribute and modify it."
22874 cat >>$CONFIG_STATUS <<\EOF
22875 # If no file are specified by the user, then we need to provide default
22876 # value. By we need to know if files were specified by the user.
22882 ac_option=`expr "x$1" : 'x\([^=]*\)='`
22883 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22885 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22889 *) # This is not an option, so the user has probably given explicit
22891 ac_need_defaults=false;;
22895 # Handling of the options.
22897 cat >>$CONFIG_STATUS <<EOF
22898 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22899 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22900 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22902 cat >>$CONFIG_STATUS <<\EOF
22903 --version | --vers* | -V )
22904 echo "$ac_cs_version"; exit 0 ;;
22906 # Conflict between --help and --header
22907 { { echo "$as_me:22907: error: ambiguous option: $1
22908 Try \`$0 --help' for more information." >&5
22909 echo "$as_me: error: ambiguous option: $1
22910 Try \`$0 --help' for more information." >&2;}
22911 { (exit 1); exit 1; }; };;
22912 --help | --hel | -h )
22913 echo "$ac_cs_usage"; exit 0 ;;
22914 --debug | --d* | -d )
22916 --file | --fil | --fi | --f )
22918 CONFIG_FILES="$CONFIG_FILES $1"
22919 ac_need_defaults=false;;
22920 --header | --heade | --head | --hea )
22922 CONFIG_HEADERS="$CONFIG_HEADERS $1"
22923 ac_need_defaults=false;;
22925 # This is an error.
22926 -*) { { echo "$as_me:22926: error: unrecognized option: $1
22927 Try \`$0 --help' for more information." >&5
22928 echo "$as_me: error: unrecognized option: $1
22929 Try \`$0 --help' for more information." >&2;}
22930 { (exit 1); exit 1; }; } ;;
22932 *) ac_config_targets="$ac_config_targets $1" ;;
22941 ## ----------------------- ##
22942 ## Running config.status. ##
22943 ## ----------------------- ##
22945 This file was extended by $as_me 2.52.20200802, executed with
22946 CONFIG_FILES = $CONFIG_FILES
22947 CONFIG_HEADERS = $CONFIG_HEADERS
22948 CONFIG_LINKS = $CONFIG_LINKS
22949 CONFIG_COMMANDS = $CONFIG_COMMANDS
22950 > $ac_cs_invocation
22951 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22956 cat >>$CONFIG_STATUS <<EOF
22958 # INIT-COMMANDS section.
22968 cat >>$CONFIG_STATUS <<\EOF
22969 for ac_config_target in $ac_config_targets
22971 case "$ac_config_target" in
22972 # Handling of arguments.
22973 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22974 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22975 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
22976 *) { { echo "$as_me:22976: error: invalid argument: $ac_config_target" >&5
22977 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22978 { (exit 1); exit 1; }; };;
22982 # If the user did not use the arguments to specify the items to instantiate,
22983 # then the envvar interface is used. Set only those that are not.
22984 # We use the long form for the default assignment because of an extremely
22985 # bizarre bug on SunOS 4.1.3.
22986 if $ac_need_defaults; then
22987 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22988 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22989 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22992 # Create a temporary directory, and hook for its removal unless debugging.
22995 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22996 trap '{ (exit 1); exit 1; }' 1 2 13 15
22999 # Create a (secure) tmp directory for tmp files.
23002 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
23003 test -n "$tmp" && test -d "$tmp"
23006 tmp=$TMPDIR/cs$$-$RANDOM
23007 (umask 077 && mkdir $tmp)
23010 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
23011 { (exit 1); exit 1; }
23016 cat >>$CONFIG_STATUS <<EOF
23019 # CONFIG_FILES section.
23022 # No need to generate the scripts if there are no CONFIG_FILES.
23023 # This happens for instance when ./config.status config.h
23024 if test -n "\$CONFIG_FILES"; then
23025 # Protect against being on the right side of a sed subst in config.status.
23026 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23027 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23028 s,@SHELL@,$SHELL,;t t
23029 s,@exec_prefix@,$exec_prefix,;t t
23030 s,@prefix@,$prefix,;t t
23031 s,@program_transform_name@,$program_transform_name,;t t
23032 s,@bindir@,$bindir,;t t
23033 s,@sbindir@,$sbindir,;t t
23034 s,@libexecdir@,$libexecdir,;t t
23035 s,@datarootdir@,$datarootdir,;t t
23036 s,@datadir@,$datadir,;t t
23037 s,@sysconfdir@,$sysconfdir,;t t
23038 s,@sharedstatedir@,$sharedstatedir,;t t
23039 s,@localstatedir@,$localstatedir,;t t
23040 s,@runstatedir@,$runstatedir,;t t
23041 s,@libdir@,$libdir,;t t
23042 s,@includedir@,$includedir,;t t
23043 s,@oldincludedir@,$oldincludedir,;t t
23044 s,@infodir@,$infodir,;t t
23045 s,@mandir@,$mandir,;t t
23046 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23047 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23048 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23049 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23050 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23051 s,@build_alias@,$build_alias,;t t
23052 s,@host_alias@,$host_alias,;t t
23053 s,@target_alias@,$target_alias,;t t
23054 s,@ECHO_C@,$ECHO_C,;t t
23055 s,@ECHO_N@,$ECHO_N,;t t
23056 s,@ECHO_T@,$ECHO_T,;t t
23057 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23058 s,@DEFS@,$DEFS,;t t
23059 s,@LIBS@,$LIBS,;t t
23060 s,@build@,$build,;t t
23061 s,@build_cpu@,$build_cpu,;t t
23062 s,@build_vendor@,$build_vendor,;t t
23063 s,@build_os@,$build_os,;t t
23064 s,@host@,$host,;t t
23065 s,@host_cpu@,$host_cpu,;t t
23066 s,@host_vendor@,$host_vendor,;t t
23067 s,@host_os@,$host_os,;t t
23068 s,@SET_MAKE@,$SET_MAKE,;t t
23070 s,@CFLAGS@,$CFLAGS,;t t
23071 s,@LDFLAGS@,$LDFLAGS,;t t
23072 s,@CPPFLAGS@,$CPPFLAGS,;t t
23073 s,@ac_ct_CC@,$ac_ct_CC,;t t
23074 s,@EXEEXT@,$EXEEXT,;t t
23075 s,@OBJEXT@,$OBJEXT,;t t
23076 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
23079 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23080 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23081 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
23082 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
23083 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
23084 s,@LINT@,$LINT,;t t
23085 s,@LINT_OPTS@,$LINT_OPTS,;t t
23086 s,@CTAGS@,$CTAGS,;t t
23087 s,@ETAGS@,$ETAGS,;t t
23088 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
23089 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
23090 s,@MATH_LIB@,$MATH_LIB,;t t
23091 s,@top_builddir@,$top_builddir,;t t
23092 s,@CC_G_OPT@,$CC_G_OPT,;t t
23093 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
23094 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
23095 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
23096 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
23098 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23099 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23100 s,@LD_MODEL@,$LD_MODEL,;t t
23101 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
23102 s,@LIBTOOL@,$LIBTOOL,;t t
23103 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
23104 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
23105 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
23106 s,@LIB_LINK@,$LIB_LINK,;t t
23107 s,@LINK_TESTS@,$LINK_TESTS,;t t
23108 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
23109 s,@PACKAGE@,$PACKAGE,;t t
23110 s,@PTHREAD@,$PTHREAD,;t t
23111 s,@TEST_ARGS@,$TEST_ARGS,;t t
23112 s,@TEST_DEPS@,$TEST_DEPS,;t t
23113 s,@TEST_LIBS@,$TEST_LIBS,;t t
23114 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23115 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23116 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
23117 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
23118 s,@includesubdir@,$includesubdir,;t t
23119 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
23120 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
23121 s,@ECHO_LT@,$ECHO_LT,;t t
23122 s,@ECHO_LD@,$ECHO_LD,;t t
23123 s,@RULE_CC@,$RULE_CC,;t t
23124 s,@SHOW_CC@,$SHOW_CC,;t t
23125 s,@ECHO_CC@,$ECHO_CC,;t t
23126 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
23127 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
23128 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
23129 s,@X_CFLAGS@,$X_CFLAGS,;t t
23130 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
23131 s,@X_LIBS@,$X_LIBS,;t t
23132 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
23133 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
23134 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
23135 s,@RGB_PATH@,$RGB_PATH,;t t
23136 s,@no_x11_rgb@,$no_x11_rgb,;t t
23137 s,@FORM_NAME@,$FORM_NAME,;t t
23138 s,@MENU_NAME@,$MENU_NAME,;t t
23139 s,@PANEL_NAME@,$PANEL_NAME,;t t
23140 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
23141 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
23142 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
23147 cat >>$CONFIG_STATUS <<\EOF
23148 # Split the substitutions into bite-sized pieces for seds with
23149 # small command number limits, like on Digital OSF/1 and HP-UX.
23150 ac_max_sed_lines=48
23151 ac_sed_frag=1 # Number of current file.
23152 ac_beg=1 # First line for current file.
23153 ac_end=$ac_max_sed_lines # Line after last line for current file.
23156 while $ac_more_lines; do
23157 if test $ac_beg -gt 1; then
23158 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23160 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23162 if test ! -s $tmp/subs.frag; then
23163 ac_more_lines=false
23165 # The purpose of the label and of the branching condition is to
23166 # speed up the sed processing (if there are no `@' at all, there
23167 # is no need to browse any of the substitutions).
23168 # These are the two extra sed commands mentioned above.
23170 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23171 # It is possible to make a multiline substitution using escaped newlines.
23172 # Ensure that we do not split the substitution between script fragments.
23174 ac_END=`expr $ac_end + $ac_max_sed_lines`
23175 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
23176 if test -s $tmp/subs.next; then
23177 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
23178 if test ! -s $tmp/subs.edit; then
23179 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
23180 if test ! -s $tmp/subs.edit; then
23181 if test $ac_beg -gt 1; then
23182 ac_end=`expr $ac_end - 1`
23189 if test -z "$ac_sed_cmds"; then
23190 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23192 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23194 ac_sed_frag=`expr $ac_sed_frag + 1`
23196 ac_end=`expr $ac_end + $ac_max_sed_lines`
23199 if test -z "$ac_sed_cmds"; then
23202 fi # test -n "$CONFIG_FILES"
23205 cat >>$CONFIG_STATUS <<\EOF
23206 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23207 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23209 - | *:- | *:-:* ) # input from stdin
23211 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23212 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23213 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23214 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23215 * ) ac_file_in=$ac_file.in ;;
23218 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23219 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23220 X"$ac_file" : 'X\(//\)[^/]' \| \
23221 X"$ac_file" : 'X\(//\)$' \| \
23222 X"$ac_file" : 'X\(/\)' \| \
23223 . : '\(.\)' 2>/dev/null ||
23225 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23226 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23227 /^X\(\/\/\)$/{ s//\1/; q; }
23228 /^X\(\/\).*/{ s//\1/; q; }
23230 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23231 { case "$ac_dir" in
23232 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23236 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23237 case $as_mkdir_dir in
23238 # Skip DOS drivespec
23239 ?:) as_incr_dir=$as_mkdir_dir ;;
23241 as_incr_dir=$as_incr_dir/$as_mkdir_dir
23242 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23247 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23248 # A "../" for each directory in $ac_dir_suffix.
23249 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23251 ac_dir_suffix= ac_dots=
23256 if test -z "$ac_dots"; then
23259 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
23261 [\\/]* | ?:[\\/]* )
23262 ac_srcdir=$srcdir$ac_dir_suffix;
23263 ac_top_srcdir=$srcdir ;;
23264 *) # Relative path.
23265 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
23266 ac_top_srcdir=$ac_dots$srcdir ;;
23270 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23271 *) ac_INSTALL=$ac_dots$INSTALL ;;
23274 if test x"$ac_file" != x-; then
23275 { echo "$as_me:23275: creating $ac_file" >&5
23276 echo "$as_me: creating $ac_file" >&6;}
23279 # Let's still pretend it is `configure' which instantiates (i.e., don't
23280 # use $as_me), people would be surprised to read:
23281 # /* config.h. Generated automatically by config.status. */
23282 configure_input="Generated automatically from `echo $ac_file_in |
23283 sed 's,.*/,,'` by configure."
23285 # First look for the input files in the build tree, otherwise in the
23287 ac_file_inputs=`IFS=:
23288 for f in $ac_file_in; do
23290 -) echo $tmp/stdin ;;
23292 # Absolute (can't be DOS-style, as IFS=:)
23293 test -f "$f" || { { echo "$as_me:23293: error: cannot find input file: $f" >&5
23294 echo "$as_me: error: cannot find input file: $f" >&2;}
23295 { (exit 1); exit 1; }; }
23298 if test -f "$f"; then
23301 elif test -f "$srcdir/$f"; then
23306 { { echo "$as_me:23306: error: cannot find input file: $f" >&5
23307 echo "$as_me: error: cannot find input file: $f" >&2;}
23308 { (exit 1); exit 1; }; }
23311 done` || { (exit 1); exit 1; }
23313 cat >>$CONFIG_STATUS <<\EOF
23314 ac_warn_datarootdir=no
23315 if test x"$ac_file" != x-; then
23316 for ac_item in $ac_file_inputs
23318 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
23319 if test -n "$ac_seen"; then
23320 ac_used=`grep '@datarootdir@' $ac_item`
23321 if test -z "$ac_used"; then
23322 { echo "$as_me:23322: WARNING: datarootdir was used implicitly but not set:
23324 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23326 ac_warn_datarootdir=yes
23329 ac_seen=`grep '${datarootdir}' $ac_item`
23330 if test -n "$ac_seen"; then
23331 { echo "$as_me:23331: WARNING: datarootdir was used explicitly but not set:
23333 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23335 ac_warn_datarootdir=yes
23340 if test "x$ac_warn_datarootdir" = xyes; then
23341 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23345 cat >>$CONFIG_STATUS <<EOF
23349 cat >>$CONFIG_STATUS <<\EOF
23351 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23352 s,@configure_input@,$configure_input,;t t
23353 s,@srcdir@,$ac_srcdir,;t t
23354 s,@top_srcdir@,$ac_top_srcdir,;t t
23355 s,@INSTALL@,$ac_INSTALL,;t t
23356 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23358 if test x"$ac_file" != x-; then
23359 cp $tmp/out $ac_file
23361 for ac_name in prefix exec_prefix datarootdir
23363 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
23364 if test -n "$ac_seen"; then
23365 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
23366 if test -z "$ac_init"; then
23367 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23368 { echo "$as_me:23368: WARNING: Variable $ac_name is used but was not set:
23370 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23375 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
23376 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
23377 if test -s $tmp/out; then
23378 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23379 { echo "$as_me:23379: WARNING: Some variables may not be substituted:
23381 echo "$as_me: WARNING: Some variables may not be substituted:
23391 cat >>$CONFIG_STATUS <<\EOF
23394 # CONFIG_HEADER section.
23397 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23398 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23400 # ac_d sets the value in "#define NAME VALUE" lines.
23401 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
23402 ac_dB='[ ].*$,\1#\2'
23405 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23406 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
23407 ac_iB='\([ ]\),\1#\2define\3'
23410 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23411 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
23412 ac_uB='$,\1#\2define\3'
23416 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23417 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23419 - | *:- | *:-:* ) # input from stdin
23421 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23422 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23423 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23424 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23425 * ) ac_file_in=$ac_file.in ;;
23428 test x"$ac_file" != x- && { echo "$as_me:23428: creating $ac_file" >&5
23429 echo "$as_me: creating $ac_file" >&6;}
23431 # First look for the input files in the build tree, otherwise in the
23433 ac_file_inputs=`IFS=:
23434 for f in $ac_file_in; do
23436 -) echo $tmp/stdin ;;
23438 # Absolute (can't be DOS-style, as IFS=:)
23439 test -f "$f" || { { echo "$as_me:23439: error: cannot find input file: $f" >&5
23440 echo "$as_me: error: cannot find input file: $f" >&2;}
23441 { (exit 1); exit 1; }; }
23444 if test -f "$f"; then
23447 elif test -f "$srcdir/$f"; then
23452 { { echo "$as_me:23452: error: cannot find input file: $f" >&5
23453 echo "$as_me: error: cannot find input file: $f" >&2;}
23454 { (exit 1); exit 1; }; }
23457 done` || { (exit 1); exit 1; }
23458 # Remove the trailing spaces.
23459 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
23463 # Transform confdefs.h into a list of #define's. We won't use it as a sed
23464 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
23465 # be either 'cat' or 'sort'.
23466 cat confdefs.h | uniq >conftest.vals
23468 # Break up conftest.vals because some shells have a limit on
23469 # the size of here documents, and old seds have small limits too.
23471 rm -f conftest.tail
23472 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
23473 while grep . conftest.vals >/dev/null
23475 # Write chunks of a limited-size here document to conftest.frag.
23476 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
23477 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
23478 echo 'CEOF' >> $CONFIG_STATUS
23479 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23480 rm -f conftest.vals
23481 mv conftest.tail conftest.vals
23483 rm -f conftest.vals
23485 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23487 echo ' cat >> conftest.edit <<CEOF
23488 /@DEFS@/r conftest.frag
23491 sed -f conftest.edit $tmp/in > $tmp/out
23493 mv $tmp/out $tmp/in
23494 rm -f conftest.edit conftest.frag
23495 ' >> $CONFIG_STATUS
23497 cat >>$CONFIG_STATUS <<\EOF
23498 # Let's still pretend it is `configure' which instantiates (i.e., don't
23499 # use $as_me), people would be surprised to read:
23500 # /* config.h. Generated automatically by config.status. */
23501 if test x"$ac_file" = x-; then
23502 echo "/* Generated automatically by configure. */" >$tmp/config.h
23504 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
23506 cat $tmp/in >>$tmp/config.h
23508 if test x"$ac_file" != x-; then
23509 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
23510 { echo "$as_me:23510: $ac_file is unchanged" >&5
23511 echo "$as_me: $ac_file is unchanged" >&6;}
23513 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23514 X"$ac_file" : 'X\(//\)[^/]' \| \
23515 X"$ac_file" : 'X\(//\)$' \| \
23516 X"$ac_file" : 'X\(/\)' \| \
23517 . : '\(.\)' 2>/dev/null ||
23519 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23520 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23521 /^X\(\/\/\)$/{ s//\1/; q; }
23522 /^X\(\/\).*/{ s//\1/; q; }
23524 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23525 { case "$ac_dir" in
23526 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23530 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23531 case $as_mkdir_dir in
23532 # Skip DOS drivespec
23533 ?:) as_incr_dir=$as_mkdir_dir ;;
23535 as_incr_dir=$as_incr_dir/$as_mkdir_dir
23536 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23543 mv $tmp/config.h $ac_file
23547 rm -f $tmp/config.h
23551 cat >>$CONFIG_STATUS <<\EOF
23553 # CONFIG_COMMANDS section.
23555 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23556 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23557 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23564 if test ! -d $srcdir/$cf_dir; then
23566 elif test -f $srcdir/$cf_dir/programs; then
23567 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23571 cat >>Makefile <<TEST_EOF
23573 # These rules are generated so we do not rely on suffix rules, which do not
23574 # work consistently for different make-programs (the '\$(MODEL)/' confuses
23575 # some, and the '\$x' confuses others).
23578 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
23581 cat >>Makefile <<TEST_EOF
23583 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
23584 \$(srcdir)/test.priv.h \\
23587 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) -DMODULE_NAME="$N" \$(srcdir)/$N.c
23591 if test -f ../config.guess && test -f ../config.sub
23593 cat >>Makefile <<TEST_EOF
23595 # if we used CF_INHERIT for getting these files, we can remove them
23597 rm -f config.guess config.sub
23605 cat >>$CONFIG_STATUS <<\EOF
23607 { (exit 0); exit 0; }
23609 chmod +x $CONFIG_STATUS
23610 ac_clean_files=$ac_clean_files_save
23612 # configure is writing to config.log, and then calls config.status.
23613 # config.status does its own redirection, appending to config.log.
23614 # Unfortunately, on DOS this fails, as config.log is still kept open
23615 # by configure, so config.status won't be able to write to it; its
23616 # output is simply discarded. So we exec the FD to /dev/null,
23617 # effectively closing config.log, so it can be properly (re)opened and
23618 # appended to by config.status. When coming back to configure, we
23619 # need to make the FD available again.
23620 if test "$no_create" != yes; then
23623 $SHELL $CONFIG_STATUS || ac_cs_success=false
23625 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23626 # would make configure fail if this is the last instruction.
23627 $ac_cs_success || { (exit 1); exit 1; }