2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20170501.
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 libdir='${exec_prefix}/lib'
143 includedir='${prefix}/include'
144 oldincludedir='/usr/include'
145 infodir='${datarootdir}/info'
146 mandir='${datarootdir}/man'
148 # Identity of this package.
158 # If the previous option needs an argument, assign it.
159 if test -n "$ac_prev"; then
160 eval "$ac_prev=\$ac_option"
165 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
167 # Accept the important Cygnus configure options, so we can diagnose typos.
171 -bindir | --bindir | --bindi | --bind | --bin | --bi)
173 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
176 -build | --build | --buil | --bui | --bu)
177 ac_prev=build_alias ;;
178 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
179 build_alias=$ac_optarg ;;
181 -cache-file | --cache-file | --cache-fil | --cache-fi \
182 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
183 ac_prev=cache_file ;;
184 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
185 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
186 cache_file=$ac_optarg ;;
189 cache_file=config.cache ;;
191 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
193 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
195 datadir=$ac_optarg ;;
197 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
198 | --dataroo | --dataro | --datar)
199 ac_prev=datarootdir ;;
200 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
201 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
202 datarootdir=$ac_optarg ;;
204 -disable-* | --disable-*)
205 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
206 # Reject names that are not valid shell variable names.
207 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
208 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
209 { (exit 1); exit 1; }; }
210 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
211 eval "enable_$ac_feature=no" ;;
213 -enable-* | --enable-*)
214 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
215 # Reject names that are not valid shell variable names.
216 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
217 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
218 { (exit 1); exit 1; }; }
219 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
221 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
224 eval "enable_$ac_feature='$ac_optarg'" ;;
226 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
227 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
228 | --exec | --exe | --ex)
229 ac_prev=exec_prefix ;;
230 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
231 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
232 | --exec=* | --exe=* | --ex=*)
233 exec_prefix=$ac_optarg ;;
235 -gas | --gas | --ga | --g)
236 # Obsolete; use --with-gas.
239 -help | --help | --hel | --he | -h)
241 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
242 ac_init_help=recursive ;;
243 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
244 ac_init_help=short ;;
246 -host | --host | --hos | --ho)
247 ac_prev=host_alias ;;
248 -host=* | --host=* | --hos=* | --ho=*)
249 host_alias=$ac_optarg ;;
251 -includedir | --includedir | --includedi | --included | --include \
252 | --includ | --inclu | --incl | --inc)
253 ac_prev=includedir ;;
254 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
255 | --includ=* | --inclu=* | --incl=* | --inc=*)
256 includedir=$ac_optarg ;;
258 -infodir | --infodir | --infodi | --infod | --info | --inf)
260 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
261 infodir=$ac_optarg ;;
263 -libdir | --libdir | --libdi | --libd)
265 -libdir=* | --libdir=* | --libdi=* | --libd=*)
268 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
269 | --libexe | --libex | --libe)
270 ac_prev=libexecdir ;;
271 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
272 | --libexe=* | --libex=* | --libe=*)
273 libexecdir=$ac_optarg ;;
275 -localstatedir | --localstatedir | --localstatedi | --localstated \
276 | --localstate | --localstat | --localsta | --localst \
277 | --locals | --local | --loca | --loc | --lo)
278 ac_prev=localstatedir ;;
279 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
280 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
281 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
282 localstatedir=$ac_optarg ;;
284 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
286 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
290 # Obsolete; use --without-fp.
293 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
297 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
298 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
301 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
302 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
303 | --oldin | --oldi | --old | --ol | --o)
304 ac_prev=oldincludedir ;;
305 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
306 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
307 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
308 oldincludedir=$ac_optarg ;;
310 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
312 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
315 -program-prefix | --program-prefix | --program-prefi | --program-pref \
316 | --program-pre | --program-pr | --program-p)
317 ac_prev=program_prefix ;;
318 -program-prefix=* | --program-prefix=* | --program-prefi=* \
319 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
320 program_prefix=$ac_optarg ;;
322 -program-suffix | --program-suffix | --program-suffi | --program-suff \
323 | --program-suf | --program-su | --program-s)
324 ac_prev=program_suffix ;;
325 -program-suffix=* | --program-suffix=* | --program-suffi=* \
326 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
327 program_suffix=$ac_optarg ;;
329 -program-transform-name | --program-transform-name \
330 | --program-transform-nam | --program-transform-na \
331 | --program-transform-n | --program-transform- \
332 | --program-transform | --program-transfor \
333 | --program-transfo | --program-transf \
334 | --program-trans | --program-tran \
335 | --progr-tra | --program-tr | --program-t)
336 ac_prev=program_transform_name ;;
337 -program-transform-name=* | --program-transform-name=* \
338 | --program-transform-nam=* | --program-transform-na=* \
339 | --program-transform-n=* | --program-transform-=* \
340 | --program-transform=* | --program-transfor=* \
341 | --program-transfo=* | --program-transf=* \
342 | --program-trans=* | --program-tran=* \
343 | --progr-tra=* | --program-tr=* | --program-t=*)
344 program_transform_name=$ac_optarg ;;
346 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
347 | -silent | --silent | --silen | --sile | --sil)
350 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
352 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
354 sbindir=$ac_optarg ;;
356 -sharedstatedir | --sharedstatedir | --sharedstatedi \
357 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
358 | --sharedst | --shareds | --shared | --share | --shar \
360 ac_prev=sharedstatedir ;;
361 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
362 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
363 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
365 sharedstatedir=$ac_optarg ;;
367 -site | --site | --sit)
369 -site=* | --site=* | --sit=*)
372 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
374 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
377 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
378 | --syscon | --sysco | --sysc | --sys | --sy)
379 ac_prev=sysconfdir ;;
380 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
381 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
382 sysconfdir=$ac_optarg ;;
384 -target | --target | --targe | --targ | --tar | --ta | --t)
385 ac_prev=target_alias ;;
386 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
387 target_alias=$ac_optarg ;;
389 -v | -verbose | --verbose | --verbos | --verbo | --verb)
392 -version | --version | --versio | --versi | --vers | -V)
396 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
397 # Reject names that are not valid shell variable names.
398 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399 { echo "$as_me: error: invalid package name: $ac_package" >&2
400 { (exit 1); exit 1; }; }
401 ac_package=`echo $ac_package| sed 's/-/_/g'`
403 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
406 eval "with_$ac_package='$ac_optarg'" ;;
408 -without-* | --without-*)
409 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
410 # Reject names that are not valid shell variable names.
411 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
412 { echo "$as_me: error: invalid package name: $ac_package" >&2
413 { (exit 1); exit 1; }; }
414 ac_package=`echo $ac_package | sed 's/-/_/g'`
415 eval "with_$ac_package=no" ;;
418 # Obsolete; use --with-x.
421 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
422 | --x-incl | --x-inc | --x-in | --x-i)
423 ac_prev=x_includes ;;
424 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
425 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
426 x_includes=$ac_optarg ;;
428 -x-libraries | --x-libraries | --x-librarie | --x-librari \
429 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
430 ac_prev=x_libraries ;;
431 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
432 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
433 x_libraries=$ac_optarg ;;
435 -*) { echo "$as_me: error: unrecognized option: $ac_option
436 Try \`$0 --help' for more information." >&2
437 { (exit 1); exit 1; }; }
441 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
442 # Reject names that are not valid shell variable names.
443 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
444 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
445 { (exit 1); exit 1; }; }
446 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
447 eval "$ac_envvar='$ac_optarg'"
451 # FIXME: should be removed in autoconf 3.0.
452 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
453 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
454 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
455 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
461 if test -n "$ac_prev"; then
462 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
463 { echo "$as_me: error: missing argument to $ac_option" >&2
464 { (exit 1); exit 1; }; }
467 # Be sure to have absolute paths.
468 for ac_var in exec_prefix prefix
470 eval ac_val=$`echo $ac_var`
472 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
473 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
474 { (exit 1); exit 1; }; };;
478 # Be sure to have absolute paths.
479 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
480 localstatedir libdir includedir oldincludedir infodir mandir
482 eval ac_val=$`echo $ac_var`
484 [\\/$]* | ?:[\\/]* ) ;;
485 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
486 { (exit 1); exit 1; }; };;
490 # There might be people who depend on the old broken behavior: `$host'
491 # used to hold the argument of --host etc.
496 # FIXME: should be removed in autoconf 3.0.
497 if test "x$host_alias" != x; then
498 if test "x$build_alias" = x; then
499 cross_compiling=maybe
500 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
501 If a cross compiler is detected then cross compile mode will be used." >&2
502 elif test "x$build_alias" != "x$host_alias"; then
508 test -n "$host_alias" && ac_tool_prefix=$host_alias-
510 test "$silent" = yes && exec 6>/dev/null
512 # Find the source files, if location was not specified.
513 if test -z "$srcdir"; then
514 ac_srcdir_defaulted=yes
515 # Try the directory containing this script, then its parent.
517 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
518 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
520 if test ! -r $srcdir/$ac_unique_file; then
524 ac_srcdir_defaulted=no
526 if test ! -r $srcdir/$ac_unique_file; then
527 if test "$ac_srcdir_defaulted" = yes; then
528 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
529 { (exit 1); exit 1; }; }
531 { echo "$as_me: error: cannot find sources in $srcdir" >&2
532 { (exit 1); exit 1; }; }
535 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
536 ac_env_build_alias_set=${build_alias+set}
537 ac_env_build_alias_value=$build_alias
538 ac_cv_env_build_alias_set=${build_alias+set}
539 ac_cv_env_build_alias_value=$build_alias
540 ac_env_host_alias_set=${host_alias+set}
541 ac_env_host_alias_value=$host_alias
542 ac_cv_env_host_alias_set=${host_alias+set}
543 ac_cv_env_host_alias_value=$host_alias
544 ac_env_target_alias_set=${target_alias+set}
545 ac_env_target_alias_value=$target_alias
546 ac_cv_env_target_alias_set=${target_alias+set}
547 ac_cv_env_target_alias_value=$target_alias
548 ac_env_CC_set=${CC+set}
550 ac_cv_env_CC_set=${CC+set}
551 ac_cv_env_CC_value=$CC
552 ac_env_CFLAGS_set=${CFLAGS+set}
553 ac_env_CFLAGS_value=$CFLAGS
554 ac_cv_env_CFLAGS_set=${CFLAGS+set}
555 ac_cv_env_CFLAGS_value=$CFLAGS
556 ac_env_LDFLAGS_set=${LDFLAGS+set}
557 ac_env_LDFLAGS_value=$LDFLAGS
558 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
559 ac_cv_env_LDFLAGS_value=$LDFLAGS
560 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
561 ac_env_CPPFLAGS_value=$CPPFLAGS
562 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
563 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
564 ac_env_CPP_set=${CPP+set}
565 ac_env_CPP_value=$CPP
566 ac_cv_env_CPP_set=${CPP+set}
567 ac_cv_env_CPP_value=$CPP
570 # Report the --help message.
572 if test "$ac_init_help" = "long"; then
573 # Omit some internal or obsolete options to make the list less imposing.
574 # This message is too long to be a string in the A/UX 3.1 sh.
576 \`configure' configures this package to adapt to many kinds of systems.
578 Usage: $0 [OPTION]... [VAR=VALUE]...
580 To assign environment variables (e.g., CC, CFLAGS...), specify them as
581 VAR=VALUE. See below for descriptions of some of the useful variables.
583 Defaults for the options are specified in brackets.
586 -h, --help display this help and exit
587 --help=short display options specific to this package
588 --help=recursive display the short help of all the included packages
589 -V, --version display version information and exit
590 -q, --quiet, --silent do not print \`checking...' messages
591 --cache-file=FILE cache test results in FILE [disabled]
592 -C, --config-cache alias for \`--cache-file=config.cache'
593 -n, --no-create do not create output files
594 --srcdir=DIR find the sources in DIR [configure dir or \`..']
599 Installation directories:
600 --prefix=PREFIX install architecture-independent files in PREFIX
602 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
605 By default, \`make install' will install all the files in
606 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
607 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
608 for instance \`--prefix=\$HOME'.
610 For better control, use the options below.
612 Fine tuning of the installation directories:
613 --bindir=DIR user executables [EPREFIX/bin]
614 --sbindir=DIR system admin executables [EPREFIX/sbin]
615 --libexecdir=DIR program executables [EPREFIX/libexec]
616 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
617 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
618 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
619 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
620 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
621 --libdir=DIR object code libraries [EPREFIX/lib]
622 --includedir=DIR C header files [PREFIX/include]
623 --oldincludedir=DIR C header files for non-gcc [/usr/include]
624 --infodir=DIR info documentation [DATAROOTDIR/info]
625 --mandir=DIR man documentation [DATAROOTDIR/man]
631 --program-prefix=PREFIX prepend PREFIX to installed program names
632 --program-suffix=SUFFIX append SUFFIX to installed program names
633 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
636 --x-includes=DIR X include files are in DIR
637 --x-libraries=DIR X library files are in DIR
640 --build=BUILD configure for building on BUILD [guessed]
641 --host=HOST build programs to run on HOST [BUILD]
645 if test -n "$ac_init_help"; then
650 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
651 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
654 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
655 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
658 --disable-stripping do not strip installed executables
659 --enable-string-hacks work around bogus compiler/loader warnings
660 --with-pkg-config{=path} enable/disable use of pkg-config
661 --disable-echo do not display "compiling" commands
662 Curses Version-dependent Options:
663 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
664 --disable-widec disable checks for wide-character functions
665 --with-curses-dir=DIR directory in which (n)curses is installed
666 --with-screen=XXX use specified curses-libraries
667 --with-ncursesw use wide ncurses-libraries
668 --with-ncurses use ncurses-libraries
669 --with-pdcurses compile/link with pdcurses X11 library
670 --with-curses-colr compile/link with HPUX 10.x color-curses
671 --with-curses-5lib compile/link with SunOS 5lib curses
672 --with-Xaw3d link with Xaw 3d library
673 --with-Xaw3dxft link with Xaw 3d xft library
674 --with-neXtaw link with neXT Athena library
675 --with-XawPlus link with Athena-Plus library
676 --with-x use the X Window System
677 --with-x11-rgb=FILE file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
678 --disable-panel disable checks for panel functions
679 --disable-menu disable checks for menu functions
680 --disable-form disable checks for form functions
681 Testing/development Options:
682 --enable-warnings test: turn on gcc compiler warnings
683 --with-dmalloc test: use Gray Watson's dmalloc library
684 --with-dbmalloc test: use Conor Cahill's dbmalloc library
685 --with-valgrind test: use valgrind
686 --disable-leaks test: free permanent memory, analyze leaks
687 --disable-rpath-hack don't add rpath options for additional libraries
689 Some influential environment variables:
690 CC C compiler command
691 CFLAGS C compiler flags
692 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
693 nonstandard directory <lib dir>
694 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
695 headers in a nonstandard directory <include dir>
698 Use these variables to override the choices made by `configure' or to help
699 it to find libraries and programs with nonstandard names/locations.
704 if test "$ac_init_help" = "recursive"; then
705 # If there are subdirs, report their specific --help.
707 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
709 # A "../" for each directory in /$ac_subdir.
710 ac_dots=`echo $ac_subdir |
711 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
714 .) # No --srcdir option. We are building in place.
715 ac_sub_srcdir=$srcdir ;;
716 [\\/]* | ?:[\\/]* ) # Absolute path.
717 ac_sub_srcdir=$srcdir/$ac_subdir ;;
719 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
722 # Check for guested configure; otherwise get Cygnus style configure.
723 if test -f $ac_sub_srcdir/configure.gnu; then
725 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
726 elif test -f $ac_sub_srcdir/configure; then
728 $SHELL $ac_sub_srcdir/configure --help=recursive
729 elif test -f $ac_sub_srcdir/configure.ac ||
730 test -f $ac_sub_srcdir/configure.in; then
734 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
740 test -n "$ac_init_help" && exit 0
741 if $ac_init_version; then
744 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
745 Free Software Foundation, Inc.
746 This configure script is free software; the Free Software Foundation
747 gives unlimited permission to copy, distribute and modify it.
753 This file contains any messages produced by compilers while
754 running configure, to aid debugging if configure makes a mistake.
756 It was created by $as_me, which was
757 generated by GNU Autoconf 2.52.20170501. Invocation command line was
768 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
769 uname -m = `(uname -m) 2>/dev/null || echo unknown`
770 uname -r = `(uname -r) 2>/dev/null || echo unknown`
771 uname -s = `(uname -s) 2>/dev/null || echo unknown`
772 uname -v = `(uname -v) 2>/dev/null || echo unknown`
774 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
775 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
777 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
778 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
779 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
780 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
781 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
782 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
783 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
797 # Keep a trace of the command line.
798 # Strip out --no-create and --no-recursion so they do not pile up.
799 # Also quote any args containing shell meta-characters.
805 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
806 | --no-cr | --no-c) ;;
807 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
808 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
809 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
810 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
811 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
813 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
816 # Get rid of the leading space.
819 # When interrupted or exit'd, cleanup temporary files, and complete
820 # config.log. We remove comments because anyway the quotes in there
821 # would cause problems or look ugly.
823 # Save into config.log some information that might help in debugging.
825 echo "## ----------------- ##" >&5
826 echo "## Cache variables. ##" >&5
827 echo "## ----------------- ##" >&5
829 # The following way of writing the cache mishandles newlines in values,
832 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
835 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
836 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
840 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
844 sed "/^$/d" confdefs.h >conftest.log
845 if test -s conftest.log; then
847 echo "## ------------ ##" >&5
848 echo "## confdefs.h. ##" >&5
849 echo "## ------------ ##" >&5
854 test "$ac_signal" != 0 &&
855 echo "$as_me: caught signal $ac_signal" >&5
856 echo "$as_me: exit $exit_status" >&5
857 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
860 for ac_signal in 1 2 13 15; do
861 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
865 # confdefs.h avoids OS command line length limits that DEFS can exceed.
866 rm -rf conftest* confdefs.h
867 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
870 # Let the site file select an alternate cache file if it wants to.
871 # Prefer explicitly selected file to automatically selected ones.
872 if test -z "$CONFIG_SITE"; then
873 if test "x$prefix" != xNONE; then
874 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
876 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
879 for ac_site_file in $CONFIG_SITE; do
880 if test -r "$ac_site_file"; then
881 { echo "$as_me:881: loading site script $ac_site_file" >&5
882 echo "$as_me: loading site script $ac_site_file" >&6;}
883 cat "$ac_site_file" >&5
888 if test -r "$cache_file"; then
889 # Some versions of bash will fail to source /dev/null (special
890 # files actually), so we avoid doing that.
891 if test -f "$cache_file"; then
892 { echo "$as_me:892: loading cache $cache_file" >&5
893 echo "$as_me: loading cache $cache_file" >&6;}
895 [\\/]* | ?:[\\/]* ) . $cache_file;;
900 { echo "$as_me:900: creating cache $cache_file" >&5
901 echo "$as_me: creating cache $cache_file" >&6;}
905 # Check that the precious variables saved in the cache have kept the same
907 ac_cache_corrupted=false
908 for ac_var in `(set) 2>&1 |
909 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
910 eval ac_old_set=\$ac_cv_env_${ac_var}_set
911 eval ac_new_set=\$ac_env_${ac_var}_set
912 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
913 eval ac_new_val="\$ac_env_${ac_var}_value"
914 case $ac_old_set,$ac_new_set in
916 { echo "$as_me:916: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
917 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
918 ac_cache_corrupted=: ;;
920 { echo "$as_me:920: error: \`$ac_var' was not set in the previous run" >&5
921 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
922 ac_cache_corrupted=: ;;
925 if test "x$ac_old_val" != "x$ac_new_val"; then
926 { echo "$as_me:926: error: \`$ac_var' has changed since the previous run:" >&5
927 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
928 { echo "$as_me:928: former value: $ac_old_val" >&5
929 echo "$as_me: former value: $ac_old_val" >&2;}
930 { echo "$as_me:930: current value: $ac_new_val" >&5
931 echo "$as_me: current value: $ac_new_val" >&2;}
935 # Pass precious variables to config.status. It doesn't matter if
936 # we pass some twice (in addition to the command line arguments).
937 if test "$ac_new_set" = set; then
939 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
940 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
941 ac_configure_args="$ac_configure_args '$ac_arg'"
943 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
948 if $ac_cache_corrupted; then
949 { echo "$as_me:949: error: changes in the environment can compromise the build" >&5
950 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
951 { { echo "$as_me:951: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
952 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
953 { (exit 1); exit 1; }; }
957 ac_cpp='$CPP $CPPFLAGS'
958 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
959 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
960 ac_compiler_gnu=$ac_cv_c_compiler_gnu
961 ac_main_return=return
963 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
964 *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
966 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
967 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
969 echo "#! $SHELL" >conftest.sh
970 echo "exit 0" >>conftest.sh
972 if { (echo "$as_me:972: PATH=\".;.\"; conftest.sh") >&5
973 (PATH=".;."; conftest.sh) 2>&5
975 echo "$as_me:975: \$? = $ac_status" >&5
976 (exit $ac_status); }; then
977 ac_path_separator=';'
981 PATH_SEPARATOR="$ac_path_separator"
984 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
986 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
988 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
991 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
992 if test -f $ac_dir/install-sh; then
994 ac_install_sh="$ac_aux_dir/install-sh -c"
996 elif test -f $ac_dir/install.sh; then
998 ac_install_sh="$ac_aux_dir/install.sh -c"
1000 elif test -f $ac_dir/shtool; then
1002 ac_install_sh="$ac_aux_dir/shtool install -c"
1006 if test -z "$ac_aux_dir"; then
1007 { { echo "$as_me:1007: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1008 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1009 { (exit 1); exit 1; }; }
1011 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1012 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1013 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1015 # Make sure we can run config.sub.
1016 $ac_config_sub sun4 >/dev/null 2>&1 ||
1017 { { echo "$as_me:1017: error: cannot run $ac_config_sub" >&5
1018 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1019 { (exit 1); exit 1; }; }
1021 echo "$as_me:1021: checking build system type" >&5
1022 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1023 if test "${ac_cv_build+set}" = set; then
1024 echo $ECHO_N "(cached) $ECHO_C" >&6
1026 ac_cv_build_alias=$build_alias
1027 test -z "$ac_cv_build_alias" &&
1028 ac_cv_build_alias=`$ac_config_guess`
1029 test -z "$ac_cv_build_alias" &&
1030 { { echo "$as_me:1030: error: cannot guess build type; you must specify one" >&5
1031 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1032 { (exit 1); exit 1; }; }
1033 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1034 { { echo "$as_me:1034: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1035 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1036 { (exit 1); exit 1; }; }
1039 echo "$as_me:1039: result: $ac_cv_build" >&5
1040 echo "${ECHO_T}$ac_cv_build" >&6
1042 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1043 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1044 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1046 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1047 echo "$as_me:1047: checking host system type" >&5
1048 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1049 if test "${ac_cv_host+set}" = set; then
1050 echo $ECHO_N "(cached) $ECHO_C" >&6
1052 ac_cv_host_alias=$host_alias
1053 test -z "$ac_cv_host_alias" &&
1054 ac_cv_host_alias=$ac_cv_build_alias
1055 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1056 { { echo "$as_me:1056: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1057 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1058 { (exit 1); exit 1; }; }
1061 echo "$as_me:1061: result: $ac_cv_host" >&5
1062 echo "${ECHO_T}$ac_cv_host" >&6
1064 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1065 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1066 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1068 system_name="$host_os"
1070 system_name="`(uname -s -r) 2>/dev/null`"
1071 if test -z "$system_name" ; then
1072 system_name="`(hostname) 2>/dev/null`"
1075 test -n "$system_name" &&
1076 cat >>confdefs.h <<EOF
1077 #define SYSTEM_NAME "$system_name"
1080 if test "${cf_cv_system_name+set}" = set; then
1081 echo $ECHO_N "(cached) $ECHO_C" >&6
1083 cf_cv_system_name="$system_name"
1086 test -z "$system_name" && system_name="$cf_cv_system_name"
1087 test -n "$cf_cv_system_name" && echo "$as_me:1087: result: Configuring for $cf_cv_system_name" >&5
1088 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1090 if test ".$system_name" != ".$cf_cv_system_name" ; then
1091 echo "$as_me:1091: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1092 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1093 { { echo "$as_me:1093: error: \"Please remove config.cache and try again.\"" >&5
1094 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1095 { (exit 1); exit 1; }; }
1098 test "$program_prefix" != NONE &&
1099 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1100 # Use a double $ so make ignores it.
1101 test "$program_suffix" != NONE &&
1102 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1103 # Double any \ or $. echo might interpret backslashes.
1104 # By default was `s,x,x', remove it if useless.
1105 cat <<\_ACEOF >conftest.sed
1106 s/[\\$]/&&/g;s/;s,x,x,$//
1108 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1111 echo "$as_me:1111: checking whether ${MAKE-make} sets \${MAKE}" >&5
1112 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1113 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1114 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1115 echo $ECHO_N "(cached) $ECHO_C" >&6
1117 cat >conftest.make <<\EOF
1119 @echo 'ac_maketemp="${MAKE}"'
1121 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1122 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1123 if test -n "$ac_maketemp"; then
1124 eval ac_cv_prog_make_${ac_make}_set=yes
1126 eval ac_cv_prog_make_${ac_make}_set=no
1130 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1131 echo "$as_me:1131: result: yes" >&5
1132 echo "${ECHO_T}yes" >&6
1135 echo "$as_me:1135: result: no" >&5
1136 echo "${ECHO_T}no" >&6
1137 SET_MAKE="MAKE=${MAKE-make}"
1141 ac_cpp='$CPP $CPPFLAGS'
1142 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1143 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1144 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1145 ac_main_return=return
1146 if test -n "$ac_tool_prefix"; then
1147 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1148 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1149 echo "$as_me:1149: checking for $ac_word" >&5
1150 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1151 if test "${ac_cv_prog_CC+set}" = set; then
1152 echo $ECHO_N "(cached) $ECHO_C" >&6
1154 if test -n "$CC"; then
1155 ac_cv_prog_CC="$CC" # Let the user override the test.
1157 ac_save_IFS=$IFS; IFS=$ac_path_separator
1159 for ac_dir in $ac_dummy; do
1161 test -z "$ac_dir" && ac_dir=.
1162 $as_executable_p "$ac_dir/$ac_word" || continue
1163 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1164 echo "$as_me:1164: found $ac_dir/$ac_word" >&5
1171 if test -n "$CC"; then
1172 echo "$as_me:1172: result: $CC" >&5
1173 echo "${ECHO_T}$CC" >&6
1175 echo "$as_me:1175: result: no" >&5
1176 echo "${ECHO_T}no" >&6
1180 if test -z "$ac_cv_prog_CC"; then
1182 # Extract the first word of "gcc", so it can be a program name with args.
1183 set dummy gcc; ac_word=$2
1184 echo "$as_me:1184: checking for $ac_word" >&5
1185 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1186 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1187 echo $ECHO_N "(cached) $ECHO_C" >&6
1189 if test -n "$ac_ct_CC"; then
1190 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1192 ac_save_IFS=$IFS; IFS=$ac_path_separator
1194 for ac_dir in $ac_dummy; do
1196 test -z "$ac_dir" && ac_dir=.
1197 $as_executable_p "$ac_dir/$ac_word" || continue
1198 ac_cv_prog_ac_ct_CC="gcc"
1199 echo "$as_me:1199: found $ac_dir/$ac_word" >&5
1205 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1206 if test -n "$ac_ct_CC"; then
1207 echo "$as_me:1207: result: $ac_ct_CC" >&5
1208 echo "${ECHO_T}$ac_ct_CC" >&6
1210 echo "$as_me:1210: result: no" >&5
1211 echo "${ECHO_T}no" >&6
1219 if test -z "$CC"; then
1220 if test -n "$ac_tool_prefix"; then
1221 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1222 set dummy ${ac_tool_prefix}cc; ac_word=$2
1223 echo "$as_me:1223: checking for $ac_word" >&5
1224 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1225 if test "${ac_cv_prog_CC+set}" = set; then
1226 echo $ECHO_N "(cached) $ECHO_C" >&6
1228 if test -n "$CC"; then
1229 ac_cv_prog_CC="$CC" # Let the user override the test.
1231 ac_save_IFS=$IFS; IFS=$ac_path_separator
1233 for ac_dir in $ac_dummy; do
1235 test -z "$ac_dir" && ac_dir=.
1236 $as_executable_p "$ac_dir/$ac_word" || continue
1237 ac_cv_prog_CC="${ac_tool_prefix}cc"
1238 echo "$as_me:1238: found $ac_dir/$ac_word" >&5
1245 if test -n "$CC"; then
1246 echo "$as_me:1246: result: $CC" >&5
1247 echo "${ECHO_T}$CC" >&6
1249 echo "$as_me:1249: result: no" >&5
1250 echo "${ECHO_T}no" >&6
1254 if test -z "$ac_cv_prog_CC"; then
1256 # Extract the first word of "cc", so it can be a program name with args.
1257 set dummy cc; ac_word=$2
1258 echo "$as_me:1258: checking for $ac_word" >&5
1259 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1260 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1261 echo $ECHO_N "(cached) $ECHO_C" >&6
1263 if test -n "$ac_ct_CC"; then
1264 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1266 ac_save_IFS=$IFS; IFS=$ac_path_separator
1268 for ac_dir in $ac_dummy; do
1270 test -z "$ac_dir" && ac_dir=.
1271 $as_executable_p "$ac_dir/$ac_word" || continue
1272 ac_cv_prog_ac_ct_CC="cc"
1273 echo "$as_me:1273: found $ac_dir/$ac_word" >&5
1279 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1280 if test -n "$ac_ct_CC"; then
1281 echo "$as_me:1281: result: $ac_ct_CC" >&5
1282 echo "${ECHO_T}$ac_ct_CC" >&6
1284 echo "$as_me:1284: result: no" >&5
1285 echo "${ECHO_T}no" >&6
1294 if test -z "$CC"; then
1295 # Extract the first word of "cc", so it can be a program name with args.
1296 set dummy cc; ac_word=$2
1297 echo "$as_me:1297: checking for $ac_word" >&5
1298 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1299 if test "${ac_cv_prog_CC+set}" = set; then
1300 echo $ECHO_N "(cached) $ECHO_C" >&6
1302 if test -n "$CC"; then
1303 ac_cv_prog_CC="$CC" # Let the user override the test.
1306 ac_save_IFS=$IFS; IFS=$ac_path_separator
1308 for ac_dir in $ac_dummy; do
1310 test -z "$ac_dir" && ac_dir=.
1311 $as_executable_p "$ac_dir/$ac_word" || continue
1312 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1313 ac_prog_rejected=yes
1317 echo "$as_me:1317: found $ac_dir/$ac_word" >&5
1321 if test $ac_prog_rejected = yes; then
1322 # We found a bogon in the path, so make sure we never use it.
1323 set dummy $ac_cv_prog_CC
1325 if test $# != 0; then
1326 # We chose a different compiler from the bogus one.
1327 # However, it has the same basename, so the bogon will be chosen
1328 # first if we set CC to just the basename; use the full file name.
1330 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1338 if test -n "$CC"; then
1339 echo "$as_me:1339: result: $CC" >&5
1340 echo "${ECHO_T}$CC" >&6
1342 echo "$as_me:1342: result: no" >&5
1343 echo "${ECHO_T}no" >&6
1347 if test -z "$CC"; then
1348 if test -n "$ac_tool_prefix"; then
1351 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1352 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1353 echo "$as_me:1353: checking for $ac_word" >&5
1354 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1355 if test "${ac_cv_prog_CC+set}" = set; then
1356 echo $ECHO_N "(cached) $ECHO_C" >&6
1358 if test -n "$CC"; then
1359 ac_cv_prog_CC="$CC" # Let the user override the test.
1361 ac_save_IFS=$IFS; IFS=$ac_path_separator
1363 for ac_dir in $ac_dummy; do
1365 test -z "$ac_dir" && ac_dir=.
1366 $as_executable_p "$ac_dir/$ac_word" || continue
1367 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1368 echo "$as_me:1368: found $ac_dir/$ac_word" >&5
1375 if test -n "$CC"; then
1376 echo "$as_me:1376: result: $CC" >&5
1377 echo "${ECHO_T}$CC" >&6
1379 echo "$as_me:1379: result: no" >&5
1380 echo "${ECHO_T}no" >&6
1383 test -n "$CC" && break
1386 if test -z "$CC"; then
1390 # Extract the first word of "$ac_prog", so it can be a program name with args.
1391 set dummy $ac_prog; ac_word=$2
1392 echo "$as_me:1392: checking for $ac_word" >&5
1393 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1394 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1395 echo $ECHO_N "(cached) $ECHO_C" >&6
1397 if test -n "$ac_ct_CC"; then
1398 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1400 ac_save_IFS=$IFS; IFS=$ac_path_separator
1402 for ac_dir in $ac_dummy; do
1404 test -z "$ac_dir" && ac_dir=.
1405 $as_executable_p "$ac_dir/$ac_word" || continue
1406 ac_cv_prog_ac_ct_CC="$ac_prog"
1407 echo "$as_me:1407: found $ac_dir/$ac_word" >&5
1413 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1414 if test -n "$ac_ct_CC"; then
1415 echo "$as_me:1415: result: $ac_ct_CC" >&5
1416 echo "${ECHO_T}$ac_ct_CC" >&6
1418 echo "$as_me:1418: result: no" >&5
1419 echo "${ECHO_T}no" >&6
1422 test -n "$ac_ct_CC" && break
1430 test -z "$CC" && { { echo "$as_me:1430: error: no acceptable cc found in \$PATH" >&5
1431 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1432 { (exit 1); exit 1; }; }
1434 # Provide some information about the compiler.
1435 echo "$as_me:1435:" \
1436 "checking for C compiler version" >&5
1437 ac_compiler=`set X $ac_compile; echo $2`
1438 { (eval echo "$as_me:1438: \"$ac_compiler --version </dev/null >&5\"") >&5
1439 (eval $ac_compiler --version </dev/null >&5) 2>&5
1441 echo "$as_me:1441: \$? = $ac_status" >&5
1442 (exit $ac_status); }
1443 { (eval echo "$as_me:1443: \"$ac_compiler -v </dev/null >&5\"") >&5
1444 (eval $ac_compiler -v </dev/null >&5) 2>&5
1446 echo "$as_me:1446: \$? = $ac_status" >&5
1447 (exit $ac_status); }
1448 { (eval echo "$as_me:1448: \"$ac_compiler -V </dev/null >&5\"") >&5
1449 (eval $ac_compiler -V </dev/null >&5) 2>&5
1451 echo "$as_me:1451: \$? = $ac_status" >&5
1452 (exit $ac_status); }
1454 cat >conftest.$ac_ext <<_ACEOF
1455 #line 1455 "configure"
1456 #include "confdefs.h"
1466 ac_clean_files_save=$ac_clean_files
1467 ac_clean_files="$ac_clean_files a.out a.exe"
1468 # Try to create an executable without -o first, disregard a.out.
1469 # It will help us diagnose broken compilers, and finding out an intuition
1471 echo "$as_me:1471: checking for C compiler default output" >&5
1472 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1473 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1474 if { (eval echo "$as_me:1474: \"$ac_link_default\"") >&5
1475 (eval $ac_link_default) 2>&5
1477 echo "$as_me:1477: \$? = $ac_status" >&5
1478 (exit $ac_status); }; then
1479 # Find the output, starting from the most likely. This scheme is
1480 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1482 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1483 ls a.out conftest 2>/dev/null;
1484 ls a.* conftest.* 2>/dev/null`; do
1486 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1487 a.out ) # We found the default executable, but exeext='' is most
1490 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1491 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1498 echo "$as_me: failed program was:" >&5
1499 cat conftest.$ac_ext >&5
1500 { { echo "$as_me:1500: error: C compiler cannot create executables" >&5
1501 echo "$as_me: error: C compiler cannot create executables" >&2;}
1502 { (exit 77); exit 77; }; }
1505 ac_exeext=$ac_cv_exeext
1506 echo "$as_me:1506: result: $ac_file" >&5
1507 echo "${ECHO_T}$ac_file" >&6
1509 # Check the compiler produces executables we can run. If not, either
1510 # the compiler is broken, or we cross compile.
1511 echo "$as_me:1511: checking whether the C compiler works" >&5
1512 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1513 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1514 # If not cross compiling, check that we can run a simple program.
1515 if test "$cross_compiling" != yes; then
1516 if { ac_try='./$ac_file'
1517 { (eval echo "$as_me:1517: \"$ac_try\"") >&5
1520 echo "$as_me:1520: \$? = $ac_status" >&5
1521 (exit $ac_status); }; }; then
1524 if test "$cross_compiling" = maybe; then
1527 { { echo "$as_me:1527: error: cannot run C compiled programs.
1528 If you meant to cross compile, use \`--host'." >&5
1529 echo "$as_me: error: cannot run C compiled programs.
1530 If you meant to cross compile, use \`--host'." >&2;}
1531 { (exit 1); exit 1; }; }
1535 echo "$as_me:1535: result: yes" >&5
1536 echo "${ECHO_T}yes" >&6
1538 rm -f a.out a.exe conftest$ac_cv_exeext
1539 ac_clean_files=$ac_clean_files_save
1540 # Check the compiler produces executables we can run. If not, either
1541 # the compiler is broken, or we cross compile.
1542 echo "$as_me:1542: checking whether we are cross compiling" >&5
1543 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1544 echo "$as_me:1544: result: $cross_compiling" >&5
1545 echo "${ECHO_T}$cross_compiling" >&6
1547 echo "$as_me:1547: checking for executable suffix" >&5
1548 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1549 if { (eval echo "$as_me:1549: \"$ac_link\"") >&5
1550 (eval $ac_link) 2>&5
1552 echo "$as_me:1552: \$? = $ac_status" >&5
1553 (exit $ac_status); }; then
1554 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1555 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1556 # work properly (i.e., refer to `conftest.exe'), while it won't with
1558 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1560 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1561 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1568 { { echo "$as_me:1568: error: cannot compute EXEEXT: cannot compile and link" >&5
1569 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1570 { (exit 1); exit 1; }; }
1573 rm -f conftest$ac_cv_exeext
1574 echo "$as_me:1574: result: $ac_cv_exeext" >&5
1575 echo "${ECHO_T}$ac_cv_exeext" >&6
1577 rm -f conftest.$ac_ext
1578 EXEEXT=$ac_cv_exeext
1580 echo "$as_me:1580: checking for object suffix" >&5
1581 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1582 if test "${ac_cv_objext+set}" = set; then
1583 echo $ECHO_N "(cached) $ECHO_C" >&6
1585 cat >conftest.$ac_ext <<_ACEOF
1586 #line 1586 "configure"
1587 #include "confdefs.h"
1597 rm -f conftest.o conftest.obj
1598 if { (eval echo "$as_me:1598: \"$ac_compile\"") >&5
1599 (eval $ac_compile) 2>&5
1601 echo "$as_me:1601: \$? = $ac_status" >&5
1602 (exit $ac_status); }; then
1603 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1605 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1606 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1611 echo "$as_me: failed program was:" >&5
1612 cat conftest.$ac_ext >&5
1613 { { echo "$as_me:1613: error: cannot compute OBJEXT: cannot compile" >&5
1614 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1615 { (exit 1); exit 1; }; }
1618 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1620 echo "$as_me:1620: result: $ac_cv_objext" >&5
1621 echo "${ECHO_T}$ac_cv_objext" >&6
1622 OBJEXT=$ac_cv_objext
1624 echo "$as_me:1624: checking whether we are using the GNU C compiler" >&5
1625 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1626 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1627 echo $ECHO_N "(cached) $ECHO_C" >&6
1629 cat >conftest.$ac_ext <<_ACEOF
1630 #line 1630 "configure"
1631 #include "confdefs.h"
1644 rm -f conftest.$ac_objext
1645 if { (eval echo "$as_me:1645: \"$ac_compile\"") >&5
1646 (eval $ac_compile) 2>&5
1648 echo "$as_me:1648: \$? = $ac_status" >&5
1649 (exit $ac_status); } &&
1650 { ac_try='test -s conftest.$ac_objext'
1651 { (eval echo "$as_me:1651: \"$ac_try\"") >&5
1654 echo "$as_me:1654: \$? = $ac_status" >&5
1655 (exit $ac_status); }; }; then
1658 echo "$as_me: failed program was:" >&5
1659 cat conftest.$ac_ext >&5
1662 rm -f conftest.$ac_objext conftest.$ac_ext
1663 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1666 echo "$as_me:1666: result: $ac_cv_c_compiler_gnu" >&5
1667 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1668 GCC=`test $ac_compiler_gnu = yes && echo yes`
1669 ac_test_CFLAGS=${CFLAGS+set}
1670 ac_save_CFLAGS=$CFLAGS
1672 echo "$as_me:1672: checking whether $CC accepts -g" >&5
1673 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1674 if test "${ac_cv_prog_cc_g+set}" = set; then
1675 echo $ECHO_N "(cached) $ECHO_C" >&6
1677 cat >conftest.$ac_ext <<_ACEOF
1678 #line 1678 "configure"
1679 #include "confdefs.h"
1689 rm -f conftest.$ac_objext
1690 if { (eval echo "$as_me:1690: \"$ac_compile\"") >&5
1691 (eval $ac_compile) 2>&5
1693 echo "$as_me:1693: \$? = $ac_status" >&5
1694 (exit $ac_status); } &&
1695 { ac_try='test -s conftest.$ac_objext'
1696 { (eval echo "$as_me:1696: \"$ac_try\"") >&5
1699 echo "$as_me:1699: \$? = $ac_status" >&5
1700 (exit $ac_status); }; }; then
1703 echo "$as_me: failed program was:" >&5
1704 cat conftest.$ac_ext >&5
1707 rm -f conftest.$ac_objext conftest.$ac_ext
1709 echo "$as_me:1709: result: $ac_cv_prog_cc_g" >&5
1710 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1711 if test "$ac_test_CFLAGS" = set; then
1712 CFLAGS=$ac_save_CFLAGS
1713 elif test $ac_cv_prog_cc_g = yes; then
1714 if test "$GCC" = yes; then
1720 if test "$GCC" = yes; then
1726 # Some people use a C++ compiler to compile C. Since we use `exit',
1727 # in C++ we need to declare it. In case someone uses the same compiler
1728 # for both compiling C and C++ we need to have the C++ compiler decide
1729 # the declaration of exit, since it's the most demanding environment.
1730 cat >conftest.$ac_ext <<_ACEOF
1735 rm -f conftest.$ac_objext
1736 if { (eval echo "$as_me:1736: \"$ac_compile\"") >&5
1737 (eval $ac_compile) 2>&5
1739 echo "$as_me:1739: \$? = $ac_status" >&5
1740 (exit $ac_status); } &&
1741 { ac_try='test -s conftest.$ac_objext'
1742 { (eval echo "$as_me:1742: \"$ac_try\"") >&5
1745 echo "$as_me:1745: \$? = $ac_status" >&5
1746 (exit $ac_status); }; }; then
1747 for ac_declaration in \
1749 '#include <stdlib.h>' \
1750 'extern "C" void std::exit (int) throw (); using std::exit;' \
1751 'extern "C" void std::exit (int); using std::exit;' \
1752 'extern "C" void exit (int) throw ();' \
1753 'extern "C" void exit (int);' \
1756 cat >conftest.$ac_ext <<_ACEOF
1757 #line 1757 "configure"
1758 #include "confdefs.h"
1769 rm -f conftest.$ac_objext
1770 if { (eval echo "$as_me:1770: \"$ac_compile\"") >&5
1771 (eval $ac_compile) 2>&5
1773 echo "$as_me:1773: \$? = $ac_status" >&5
1774 (exit $ac_status); } &&
1775 { ac_try='test -s conftest.$ac_objext'
1776 { (eval echo "$as_me:1776: \"$ac_try\"") >&5
1779 echo "$as_me:1779: \$? = $ac_status" >&5
1780 (exit $ac_status); }; }; then
1783 echo "$as_me: failed program was:" >&5
1784 cat conftest.$ac_ext >&5
1787 rm -f conftest.$ac_objext conftest.$ac_ext
1788 cat >conftest.$ac_ext <<_ACEOF
1789 #line 1789 "configure"
1790 #include "confdefs.h"
1800 rm -f conftest.$ac_objext
1801 if { (eval echo "$as_me:1801: \"$ac_compile\"") >&5
1802 (eval $ac_compile) 2>&5
1804 echo "$as_me:1804: \$? = $ac_status" >&5
1805 (exit $ac_status); } &&
1806 { ac_try='test -s conftest.$ac_objext'
1807 { (eval echo "$as_me:1807: \"$ac_try\"") >&5
1810 echo "$as_me:1810: \$? = $ac_status" >&5
1811 (exit $ac_status); }; }; then
1814 echo "$as_me: failed program was:" >&5
1815 cat conftest.$ac_ext >&5
1817 rm -f conftest.$ac_objext conftest.$ac_ext
1820 if test -n "$ac_declaration"; then
1821 echo '#ifdef __cplusplus' >>confdefs.h
1822 echo $ac_declaration >>confdefs.h
1823 echo '#endif' >>confdefs.h
1827 echo "$as_me: failed program was:" >&5
1828 cat conftest.$ac_ext >&5
1830 rm -f conftest.$ac_objext conftest.$ac_ext
1832 ac_cpp='$CPP $CPPFLAGS'
1833 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1834 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1835 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1836 ac_main_return=return
1839 if test "$GCC" = yes ; then
1840 echo "$as_me:1840: checking version of $CC" >&5
1841 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1842 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.].*//'`"
1843 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1844 echo "$as_me:1844: result: $GCC_VERSION" >&5
1845 echo "${ECHO_T}$GCC_VERSION" >&6
1848 echo "$as_me:1848: checking for $CC option to accept ANSI C" >&5
1849 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1850 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1851 echo $ECHO_N "(cached) $ECHO_C" >&6
1853 ac_cv_prog_cc_stdc=no
1855 cat >conftest.$ac_ext <<_ACEOF
1856 #line 1856 "configure"
1857 #include "confdefs.h"
1860 #include <sys/types.h>
1861 #include <sys/stat.h>
1862 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1863 struct buf { int x; };
1864 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1865 static char *e (p, i)
1871 static char *f (char * (*g) (char **, int), char **p, ...)
1876 s = g (p, va_arg (v,int));
1880 int test (int i, double x);
1881 struct s1 {int (*f) (int a);};
1882 struct s2 {int (*f) (double a);};
1883 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1889 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1894 # Don't try gcc -ansi; that turns off useful extensions and
1895 # breaks some systems' header files.
1896 # AIX -qlanglvl=ansi
1897 # Ultrix and OSF/1 -std1
1898 # HP-UX 10.20 and later -Ae
1899 # HP-UX older versions -Aa -D_HPUX_SOURCE
1900 # SVR4 -Xc -D__EXTENSIONS__
1901 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1903 CC="$ac_save_CC $ac_arg"
1904 rm -f conftest.$ac_objext
1905 if { (eval echo "$as_me:1905: \"$ac_compile\"") >&5
1906 (eval $ac_compile) 2>&5
1908 echo "$as_me:1908: \$? = $ac_status" >&5
1909 (exit $ac_status); } &&
1910 { ac_try='test -s conftest.$ac_objext'
1911 { (eval echo "$as_me:1911: \"$ac_try\"") >&5
1914 echo "$as_me:1914: \$? = $ac_status" >&5
1915 (exit $ac_status); }; }; then
1916 ac_cv_prog_cc_stdc=$ac_arg
1919 echo "$as_me: failed program was:" >&5
1920 cat conftest.$ac_ext >&5
1922 rm -f conftest.$ac_objext
1924 rm -f conftest.$ac_ext conftest.$ac_objext
1929 case "x$ac_cv_prog_cc_stdc" in
1931 echo "$as_me:1931: result: none needed" >&5
1932 echo "${ECHO_T}none needed" >&6 ;;
1934 echo "$as_me:1934: result: $ac_cv_prog_cc_stdc" >&5
1935 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1936 CC="$CC $ac_cv_prog_cc_stdc" ;;
1939 # This should have been defined by AC_PROG_CC
1942 echo "$as_me:1942: checking \$CC variable" >&5
1943 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1946 echo "$as_me:1946: result: broken" >&5
1947 echo "${ECHO_T}broken" >&6
1948 { echo "$as_me:1948: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1949 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1951 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
1952 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
1954 for cf_arg in $cf_flags
1962 cf_new_extra_cppflags=
1964 for cf_add_cflags in $cf_arg
1966 case $cf_fix_cppflags in
1968 case $cf_add_cflags in
1969 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1970 case $cf_add_cflags in
1972 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1974 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1975 && test -z "${cf_tst_cflags}" \
1976 && cf_fix_cppflags=yes
1978 if test $cf_fix_cppflags = yes ; then
1980 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1981 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1984 elif test "${cf_tst_cflags}" = "\"'" ; then
1986 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1987 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1997 case $cf_add_cflags in
1999 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2001 CPPFLAGS=`echo "$CPPFLAGS" | \
2002 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2003 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2008 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2009 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2016 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2017 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2024 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2025 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2027 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2029 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2030 && test -z "${cf_tst_cflags}" \
2031 && cf_fix_cppflags=no
2036 if test -n "$cf_new_cflags" ; then
2038 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2039 CFLAGS="${CFLAGS}$cf_new_cflags"
2043 if test -n "$cf_new_cppflags" ; then
2045 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2046 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2050 if test -n "$cf_new_extra_cppflags" ; then
2052 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2053 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2063 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2065 echo "${as_me:-configure}:2065: testing resulting CC: '$CC' ..." 1>&5
2067 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2069 echo "${as_me:-configure}:2069: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2071 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2073 echo "${as_me:-configure}:2073: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2077 echo "$as_me:2077: result: ok" >&5
2078 echo "${ECHO_T}ok" >&6
2082 echo "$as_me:2082: checking for inline" >&5
2083 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2084 if test "${ac_cv_c_inline+set}" = set; then
2085 echo $ECHO_N "(cached) $ECHO_C" >&6
2088 for ac_kw in inline __inline__ __inline; do
2089 cat >conftest.$ac_ext <<_ACEOF
2090 #line 2090 "configure"
2091 #include "confdefs.h"
2093 static $ac_kw int static_foo () {return 0; }
2094 $ac_kw int foo () {return 0; }
2098 rm -f conftest.$ac_objext
2099 if { (eval echo "$as_me:2099: \"$ac_compile\"") >&5
2100 (eval $ac_compile) 2>&5
2102 echo "$as_me:2102: \$? = $ac_status" >&5
2103 (exit $ac_status); } &&
2104 { ac_try='test -s conftest.$ac_objext'
2105 { (eval echo "$as_me:2105: \"$ac_try\"") >&5
2108 echo "$as_me:2108: \$? = $ac_status" >&5
2109 (exit $ac_status); }; }; then
2110 ac_cv_c_inline=$ac_kw; break
2112 echo "$as_me: failed program was:" >&5
2113 cat conftest.$ac_ext >&5
2115 rm -f conftest.$ac_objext conftest.$ac_ext
2119 echo "$as_me:2119: result: $ac_cv_c_inline" >&5
2120 echo "${ECHO_T}$ac_cv_c_inline" >&6
2121 case $ac_cv_c_inline in
2124 cat >>confdefs.h <<\EOF
2128 *) cat >>confdefs.h <<EOF
2129 #define inline $ac_cv_c_inline
2135 ac_cpp='$CPP $CPPFLAGS'
2136 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2137 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2138 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2139 ac_main_return=return
2140 echo "$as_me:2140: checking how to run the C preprocessor" >&5
2141 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2142 # On Suns, sometimes $CPP names a directory.
2143 if test -n "$CPP" && test -d "$CPP"; then
2146 if test -z "$CPP"; then
2147 if test "${ac_cv_prog_CPP+set}" = set; then
2148 echo $ECHO_N "(cached) $ECHO_C" >&6
2150 # Double quotes because CPP needs to be expanded
2151 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2154 for ac_c_preproc_warn_flag in '' yes
2156 # Use a header file that comes with gcc, so configuring glibc
2157 # with a fresh cross-compiler works.
2158 # On the NeXT, cc -E runs the code through the compiler's parser,
2159 # not just through cpp. "Syntax error" is here to catch this case.
2160 cat >conftest.$ac_ext <<_ACEOF
2161 #line 2161 "configure"
2162 #include "confdefs.h"
2166 if { (eval echo "$as_me:2166: \"$ac_cpp conftest.$ac_ext\"") >&5
2167 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2169 egrep -v '^ *\+' conftest.er1 >conftest.err
2171 cat conftest.err >&5
2172 echo "$as_me:2172: \$? = $ac_status" >&5
2173 (exit $ac_status); } >/dev/null; then
2174 if test -s conftest.err; then
2175 ac_cpp_err=$ac_c_preproc_warn_flag
2182 if test -z "$ac_cpp_err"; then
2185 echo "$as_me: failed program was:" >&5
2186 cat conftest.$ac_ext >&5
2187 # Broken: fails on valid input.
2190 rm -f conftest.err conftest.$ac_ext
2192 # OK, works on sane cases. Now check whether non-existent headers
2193 # can be detected and how.
2194 cat >conftest.$ac_ext <<_ACEOF
2195 #line 2195 "configure"
2196 #include "confdefs.h"
2197 #include <ac_nonexistent.h>
2199 if { (eval echo "$as_me:2199: \"$ac_cpp conftest.$ac_ext\"") >&5
2200 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2202 egrep -v '^ *\+' conftest.er1 >conftest.err
2204 cat conftest.err >&5
2205 echo "$as_me:2205: \$? = $ac_status" >&5
2206 (exit $ac_status); } >/dev/null; then
2207 if test -s conftest.err; then
2208 ac_cpp_err=$ac_c_preproc_warn_flag
2215 if test -z "$ac_cpp_err"; then
2216 # Broken: success on invalid input.
2219 echo "$as_me: failed program was:" >&5
2220 cat conftest.$ac_ext >&5
2221 # Passes both tests.
2225 rm -f conftest.err conftest.$ac_ext
2228 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2229 rm -f conftest.err conftest.$ac_ext
2230 if $ac_preproc_ok; then
2242 echo "$as_me:2242: result: $CPP" >&5
2243 echo "${ECHO_T}$CPP" >&6
2245 for ac_c_preproc_warn_flag in '' yes
2247 # Use a header file that comes with gcc, so configuring glibc
2248 # with a fresh cross-compiler works.
2249 # On the NeXT, cc -E runs the code through the compiler's parser,
2250 # not just through cpp. "Syntax error" is here to catch this case.
2251 cat >conftest.$ac_ext <<_ACEOF
2252 #line 2252 "configure"
2253 #include "confdefs.h"
2257 if { (eval echo "$as_me:2257: \"$ac_cpp conftest.$ac_ext\"") >&5
2258 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2260 egrep -v '^ *\+' conftest.er1 >conftest.err
2262 cat conftest.err >&5
2263 echo "$as_me:2263: \$? = $ac_status" >&5
2264 (exit $ac_status); } >/dev/null; then
2265 if test -s conftest.err; then
2266 ac_cpp_err=$ac_c_preproc_warn_flag
2273 if test -z "$ac_cpp_err"; then
2276 echo "$as_me: failed program was:" >&5
2277 cat conftest.$ac_ext >&5
2278 # Broken: fails on valid input.
2281 rm -f conftest.err conftest.$ac_ext
2283 # OK, works on sane cases. Now check whether non-existent headers
2284 # can be detected and how.
2285 cat >conftest.$ac_ext <<_ACEOF
2286 #line 2286 "configure"
2287 #include "confdefs.h"
2288 #include <ac_nonexistent.h>
2290 if { (eval echo "$as_me:2290: \"$ac_cpp conftest.$ac_ext\"") >&5
2291 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2293 egrep -v '^ *\+' conftest.er1 >conftest.err
2295 cat conftest.err >&5
2296 echo "$as_me:2296: \$? = $ac_status" >&5
2297 (exit $ac_status); } >/dev/null; then
2298 if test -s conftest.err; then
2299 ac_cpp_err=$ac_c_preproc_warn_flag
2306 if test -z "$ac_cpp_err"; then
2307 # Broken: success on invalid input.
2310 echo "$as_me: failed program was:" >&5
2311 cat conftest.$ac_ext >&5
2312 # Passes both tests.
2316 rm -f conftest.err conftest.$ac_ext
2319 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2320 rm -f conftest.err conftest.$ac_ext
2321 if $ac_preproc_ok; then
2324 { { echo "$as_me:2324: error: C preprocessor \"$CPP\" fails sanity check" >&5
2325 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2326 { (exit 1); exit 1; }; }
2330 ac_cpp='$CPP $CPPFLAGS'
2331 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2332 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2333 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2334 ac_main_return=return
2336 for ac_prog in mawk gawk nawk awk
2338 # Extract the first word of "$ac_prog", so it can be a program name with args.
2339 set dummy $ac_prog; ac_word=$2
2340 echo "$as_me:2340: checking for $ac_word" >&5
2341 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2342 if test "${ac_cv_prog_AWK+set}" = set; then
2343 echo $ECHO_N "(cached) $ECHO_C" >&6
2345 if test -n "$AWK"; then
2346 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2348 ac_save_IFS=$IFS; IFS=$ac_path_separator
2350 for ac_dir in $ac_dummy; do
2352 test -z "$ac_dir" && ac_dir=.
2353 $as_executable_p "$ac_dir/$ac_word" || continue
2354 ac_cv_prog_AWK="$ac_prog"
2355 echo "$as_me:2355: found $ac_dir/$ac_word" >&5
2362 if test -n "$AWK"; then
2363 echo "$as_me:2363: result: $AWK" >&5
2364 echo "${ECHO_T}$AWK" >&6
2366 echo "$as_me:2366: result: no" >&5
2367 echo "${ECHO_T}no" >&6
2370 test -n "$AWK" && break
2373 # Find a good install program. We prefer a C program (faster),
2374 # so one script is as good as another. But avoid the broken or
2375 # incompatible versions:
2376 # SysV /etc/install, /usr/sbin/install
2377 # SunOS /usr/etc/install
2378 # IRIX /sbin/install
2380 # AmigaOS /C/install, which installs bootblocks on floppy discs
2381 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2382 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2383 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2384 # ./install, which can be erroneously created by make from ./install.sh.
2385 echo "$as_me:2385: checking for a BSD compatible install" >&5
2386 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2387 if test -z "$INSTALL"; then
2388 if test "${ac_cv_path_install+set}" = set; then
2389 echo $ECHO_N "(cached) $ECHO_C" >&6
2391 ac_save_IFS=$IFS; IFS=$ac_path_separator
2392 for ac_dir in $PATH; do
2394 # Account for people who put trailing slashes in PATH elements.
2396 / | ./ | .// | /cC/* \
2397 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2400 # OSF1 and SCO ODT 3.0 have their own names for install.
2401 # Don't use installbsd from OSF since it installs stuff as root
2403 for ac_prog in ginstall scoinst install; do
2404 if $as_executable_p "$ac_dir/$ac_prog"; then
2405 if test $ac_prog = install &&
2406 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2407 # AIX install. It has an incompatible calling convention.
2409 elif test $ac_prog = install &&
2410 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2411 # program-specific install script used by HP pwplus--don't use.
2414 ac_cv_path_install="$ac_dir/$ac_prog -c"
2424 if test "${ac_cv_path_install+set}" = set; then
2425 INSTALL=$ac_cv_path_install
2427 # As a last resort, use the slow shell script. We don't cache a
2428 # path for INSTALL within a source directory, because that will
2429 # break other packages using the cache if that directory is
2430 # removed, or if the path is relative.
2431 INSTALL=$ac_install_sh
2434 echo "$as_me:2434: result: $INSTALL" >&5
2435 echo "${ECHO_T}$INSTALL" >&6
2437 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2438 # It thinks the first close brace ends the variable substitution.
2439 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2441 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2443 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2449 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2450 test -z "$cf_dir" && cf_dir=.
2451 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2455 echo "$as_me:2455: checking if you want to install stripped executables" >&5
2456 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2458 # Check whether --enable-stripping or --disable-stripping was given.
2459 if test "${enable_stripping+set}" = set; then
2460 enableval="$enable_stripping"
2461 test "$enableval" != no && enableval=yes
2462 if test "$enableval" != "yes" ; then
2472 echo "$as_me:2472: result: $with_stripping" >&5
2473 echo "${ECHO_T}$with_stripping" >&6
2475 if test "$with_stripping" = yes
2482 echo "$as_me:2482: checking if install needs to be told about ownership" >&5
2483 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
2484 case `$ac_config_guess` in
2493 echo "$as_me:2493: result: $with_install_o" >&5
2494 echo "${ECHO_T}$with_install_o" >&6
2495 if test "x$with_install_o" = xyes
2497 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'`
2502 for ac_prog in lint cppcheck splint
2504 # Extract the first word of "$ac_prog", so it can be a program name with args.
2505 set dummy $ac_prog; ac_word=$2
2506 echo "$as_me:2506: checking for $ac_word" >&5
2507 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2508 if test "${ac_cv_prog_LINT+set}" = set; then
2509 echo $ECHO_N "(cached) $ECHO_C" >&6
2511 if test -n "$LINT"; then
2512 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2514 ac_save_IFS=$IFS; IFS=$ac_path_separator
2516 for ac_dir in $ac_dummy; do
2518 test -z "$ac_dir" && ac_dir=.
2519 $as_executable_p "$ac_dir/$ac_word" || continue
2520 ac_cv_prog_LINT="$ac_prog"
2521 echo "$as_me:2521: found $ac_dir/$ac_word" >&5
2527 LINT=$ac_cv_prog_LINT
2528 if test -n "$LINT"; then
2529 echo "$as_me:2529: result: $LINT" >&5
2530 echo "${ECHO_T}$LINT" >&6
2532 echo "$as_me:2532: result: no" >&5
2533 echo "${ECHO_T}no" >&6
2536 test -n "$LINT" && break
2539 echo "$as_me:2539: checking if filesystem supports mixed-case filenames" >&5
2540 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2541 if test "${cf_cv_mixedcase+set}" = set; then
2542 echo $ECHO_N "(cached) $ECHO_C" >&6
2545 if test "$cross_compiling" = yes ; then
2546 case $target_alias in
2547 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2555 rm -f conftest CONFTEST
2557 if test -f CONFTEST ; then
2562 rm -f conftest CONFTEST
2566 echo "$as_me:2566: result: $cf_cv_mixedcase" >&5
2567 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2568 test "$cf_cv_mixedcase" = yes &&
2569 cat >>confdefs.h <<\EOF
2570 #define MIXEDCASE_FILENAMES 1
2573 for ac_prog in exctags ctags
2575 # Extract the first word of "$ac_prog", so it can be a program name with args.
2576 set dummy $ac_prog; ac_word=$2
2577 echo "$as_me:2577: checking for $ac_word" >&5
2578 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2579 if test "${ac_cv_prog_CTAGS+set}" = set; then
2580 echo $ECHO_N "(cached) $ECHO_C" >&6
2582 if test -n "$CTAGS"; then
2583 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2585 ac_save_IFS=$IFS; IFS=$ac_path_separator
2587 for ac_dir in $ac_dummy; do
2589 test -z "$ac_dir" && ac_dir=.
2590 $as_executable_p "$ac_dir/$ac_word" || continue
2591 ac_cv_prog_CTAGS="$ac_prog"
2592 echo "$as_me:2592: found $ac_dir/$ac_word" >&5
2598 CTAGS=$ac_cv_prog_CTAGS
2599 if test -n "$CTAGS"; then
2600 echo "$as_me:2600: result: $CTAGS" >&5
2601 echo "${ECHO_T}$CTAGS" >&6
2603 echo "$as_me:2603: result: no" >&5
2604 echo "${ECHO_T}no" >&6
2607 test -n "$CTAGS" && break
2610 for ac_prog in exetags etags
2612 # Extract the first word of "$ac_prog", so it can be a program name with args.
2613 set dummy $ac_prog; ac_word=$2
2614 echo "$as_me:2614: checking for $ac_word" >&5
2615 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2616 if test "${ac_cv_prog_ETAGS+set}" = set; then
2617 echo $ECHO_N "(cached) $ECHO_C" >&6
2619 if test -n "$ETAGS"; then
2620 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2622 ac_save_IFS=$IFS; IFS=$ac_path_separator
2624 for ac_dir in $ac_dummy; do
2626 test -z "$ac_dir" && ac_dir=.
2627 $as_executable_p "$ac_dir/$ac_word" || continue
2628 ac_cv_prog_ETAGS="$ac_prog"
2629 echo "$as_me:2629: found $ac_dir/$ac_word" >&5
2635 ETAGS=$ac_cv_prog_ETAGS
2636 if test -n "$ETAGS"; then
2637 echo "$as_me:2637: result: $ETAGS" >&5
2638 echo "${ECHO_T}$ETAGS" >&6
2640 echo "$as_me:2640: result: no" >&5
2641 echo "${ECHO_T}no" >&6
2644 test -n "$ETAGS" && break
2647 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2648 set dummy ${CTAGS:-ctags}; ac_word=$2
2649 echo "$as_me:2649: checking for $ac_word" >&5
2650 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2651 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2652 echo $ECHO_N "(cached) $ECHO_C" >&6
2654 if test -n "$MAKE_LOWER_TAGS"; then
2655 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2657 ac_save_IFS=$IFS; IFS=$ac_path_separator
2659 for ac_dir in $ac_dummy; do
2661 test -z "$ac_dir" && ac_dir=.
2662 $as_executable_p "$ac_dir/$ac_word" || continue
2663 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2664 echo "$as_me:2664: found $ac_dir/$ac_word" >&5
2668 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2671 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2672 if test -n "$MAKE_LOWER_TAGS"; then
2673 echo "$as_me:2673: result: $MAKE_LOWER_TAGS" >&5
2674 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2676 echo "$as_me:2676: result: no" >&5
2677 echo "${ECHO_T}no" >&6
2680 if test "$cf_cv_mixedcase" = yes ; then
2681 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2682 set dummy ${ETAGS:-etags}; ac_word=$2
2683 echo "$as_me:2683: checking for $ac_word" >&5
2684 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2685 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2686 echo $ECHO_N "(cached) $ECHO_C" >&6
2688 if test -n "$MAKE_UPPER_TAGS"; then
2689 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2691 ac_save_IFS=$IFS; IFS=$ac_path_separator
2693 for ac_dir in $ac_dummy; do
2695 test -z "$ac_dir" && ac_dir=.
2696 $as_executable_p "$ac_dir/$ac_word" || continue
2697 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2698 echo "$as_me:2698: found $ac_dir/$ac_word" >&5
2702 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2705 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2706 if test -n "$MAKE_UPPER_TAGS"; then
2707 echo "$as_me:2707: result: $MAKE_UPPER_TAGS" >&5
2708 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2710 echo "$as_me:2710: result: no" >&5
2711 echo "${ECHO_T}no" >&6
2718 if test "$MAKE_UPPER_TAGS" = yes ; then
2724 if test "$MAKE_LOWER_TAGS" = yes ; then
2730 echo "$as_me:2730: checking if -lm needed for math functions" >&5
2731 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
2732 if test "${cf_cv_need_libm+set}" = set; then
2733 echo $ECHO_N "(cached) $ECHO_C" >&6
2736 cat >conftest.$ac_ext <<_ACEOF
2737 #line 2737 "configure"
2738 #include "confdefs.h"
2747 double x = rand(); printf("result = %g\n", pow(sin(x),x))
2752 rm -f conftest.$ac_objext conftest$ac_exeext
2753 if { (eval echo "$as_me:2753: \"$ac_link\"") >&5
2754 (eval $ac_link) 2>&5
2756 echo "$as_me:2756: \$? = $ac_status" >&5
2757 (exit $ac_status); } &&
2758 { ac_try='test -s conftest$ac_exeext'
2759 { (eval echo "$as_me:2759: \"$ac_try\"") >&5
2762 echo "$as_me:2762: \$? = $ac_status" >&5
2763 (exit $ac_status); }; }; then
2766 echo "$as_me: failed program was:" >&5
2767 cat conftest.$ac_ext >&5
2770 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2772 echo "$as_me:2772: result: $cf_cv_need_libm" >&5
2773 echo "${ECHO_T}$cf_cv_need_libm" >&6
2774 if test "$cf_cv_need_libm" = yes
2782 CC_SHARED_OPTS=unknown
2783 CPPFLAGS="$CPPFLAGS"
2785 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
2786 DFT_UPR_MODEL="NORMAL"
2799 PACKAGE="ncurses-examples"
2805 TINFO_LIBS='$(LIBS_CURSES)'
2806 cf_cv_abi_version=""
2807 cf_cv_rel_version=""
2813 if test "$GCC" = yes
2815 cat > conftest.i <<EOF
2817 #define GCC_PRINTF 0
2822 #ifndef GCC_NORETURN
2823 #define GCC_NORETURN /* nothing */
2826 #define GCC_UNUSED /* nothing */
2829 if test "$GCC" = yes
2831 { echo "$as_me:2831: checking for $CC __attribute__ directives..." >&5
2832 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
2833 cat > conftest.$ac_ext <<EOF
2834 #line 2834 "${as_me:-configure}"
2835 #include "confdefs.h"
2836 #include "conftest.h"
2837 #include "conftest.i"
2839 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2841 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2844 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
2846 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
2848 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2849 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2850 extern void foo(void) GCC_NORETURN;
2851 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2853 cf_printf_attribute=no
2854 cf_scanf_attribute=no
2855 for cf_attribute in scanf printf unused noreturn
2858 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2860 cf_directive="__attribute__(($cf_attribute))"
2861 echo "checking for $CC $cf_directive" 1>&5
2863 case $cf_attribute in
2865 cf_printf_attribute=yes
2866 cat >conftest.h <<EOF
2867 #define GCC_$cf_ATTRIBUTE 1
2871 cf_scanf_attribute=yes
2872 cat >conftest.h <<EOF
2873 #define GCC_$cf_ATTRIBUTE 1
2877 cat >conftest.h <<EOF
2878 #define GCC_$cf_ATTRIBUTE $cf_directive
2883 if { (eval echo "$as_me:2883: \"$ac_compile\"") >&5
2884 (eval $ac_compile) 2>&5
2886 echo "$as_me:2886: \$? = $ac_status" >&5
2887 (exit $ac_status); }; then
2888 test -n "$verbose" && echo "$as_me:2888: result: ... $cf_attribute" >&5
2889 echo "${ECHO_T}... $cf_attribute" >&6
2890 cat conftest.h >>confdefs.h
2891 case $cf_attribute in
2894 cat >>confdefs.h <<EOF
2895 #define GCC_NORETURN $cf_directive
2900 cf_value='/* nothing */'
2901 if test "$cf_printf_attribute" != no ; then
2902 cf_value='__attribute__((format(printf,fmt,var)))'
2904 cat >>confdefs.h <<\EOF
2905 #define GCC_PRINTF 1
2910 cat >>confdefs.h <<EOF
2911 #define GCC_PRINTFLIKE(fmt,var) $cf_value
2916 cf_value='/* nothing */'
2917 if test "$cf_scanf_attribute" != no ; then
2918 cf_value='__attribute__((format(scanf,fmt,var)))'
2920 cat >>confdefs.h <<\EOF
2926 cat >>confdefs.h <<EOF
2927 #define GCC_SCANFLIKE(fmt,var) $cf_value
2933 cat >>confdefs.h <<EOF
2934 #define GCC_UNUSED $cf_directive
2942 fgrep define conftest.i >>confdefs.h
2947 echo "$as_me:2947: checking if you want to work around bogus compiler/loader warnings" >&5
2948 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
2950 # Check whether --enable-string-hacks or --disable-string-hacks was given.
2951 if test "${enable_string_hacks+set}" = set; then
2952 enableval="$enable_string_hacks"
2953 with_string_hacks=$enableval
2955 with_string_hacks=no
2957 echo "$as_me:2957: result: $with_string_hacks" >&5
2958 echo "${ECHO_T}$with_string_hacks" >&6
2960 if test "x$with_string_hacks" = "xyes"; then
2962 cat >>confdefs.h <<\EOF
2963 #define USE_STRING_HACKS 1
2966 { echo "$as_me:2966: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
2967 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
2968 echo "$as_me:2968: checking for strlcat" >&5
2969 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
2970 if test "${ac_cv_func_strlcat+set}" = set; then
2971 echo $ECHO_N "(cached) $ECHO_C" >&6
2973 cat >conftest.$ac_ext <<_ACEOF
2974 #line 2974 "configure"
2975 #include "confdefs.h"
2976 /* System header to define __stub macros and hopefully few prototypes,
2977 which can conflict with char strlcat (); below. */
2979 /* Override any gcc2 internal prototype to avoid an error. */
2983 /* We use char because int might match the return type of a gcc2
2984 builtin and then its argument prototype would still apply. */
2991 /* The GNU C library defines this for functions which it implements
2992 to always fail with ENOSYS. Some functions are actually named
2993 something starting with __ and the normal name is an alias. */
2994 #if defined (__stub_strlcat) || defined (__stub___strlcat)
2997 f = strlcat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
3004 rm -f conftest.$ac_objext conftest$ac_exeext
3005 if { (eval echo "$as_me:3005: \"$ac_link\"") >&5
3006 (eval $ac_link) 2>&5
3008 echo "$as_me:3008: \$? = $ac_status" >&5
3009 (exit $ac_status); } &&
3010 { ac_try='test -s conftest$ac_exeext'
3011 { (eval echo "$as_me:3011: \"$ac_try\"") >&5
3014 echo "$as_me:3014: \$? = $ac_status" >&5
3015 (exit $ac_status); }; }; then
3016 ac_cv_func_strlcat=yes
3018 echo "$as_me: failed program was:" >&5
3019 cat conftest.$ac_ext >&5
3020 ac_cv_func_strlcat=no
3022 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3024 echo "$as_me:3024: result: $ac_cv_func_strlcat" >&5
3025 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
3026 if test $ac_cv_func_strlcat = yes; then
3028 cat >>confdefs.h <<\EOF
3029 #define HAVE_STRLCAT 1
3034 echo "$as_me:3034: checking for strlcat in -lbsd" >&5
3035 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
3036 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
3037 echo $ECHO_N "(cached) $ECHO_C" >&6
3039 ac_check_lib_save_LIBS=$LIBS
3041 cat >conftest.$ac_ext <<_ACEOF
3042 #line 3042 "configure"
3043 #include "confdefs.h"
3045 /* Override any gcc2 internal prototype to avoid an error. */
3049 /* We use char because int might match the return type of a gcc2
3050 builtin and then its argument prototype would still apply. */
3060 rm -f conftest.$ac_objext conftest$ac_exeext
3061 if { (eval echo "$as_me:3061: \"$ac_link\"") >&5
3062 (eval $ac_link) 2>&5
3064 echo "$as_me:3064: \$? = $ac_status" >&5
3065 (exit $ac_status); } &&
3066 { ac_try='test -s conftest$ac_exeext'
3067 { (eval echo "$as_me:3067: \"$ac_try\"") >&5
3070 echo "$as_me:3070: \$? = $ac_status" >&5
3071 (exit $ac_status); }; }; then
3072 ac_cv_lib_bsd_strlcat=yes
3074 echo "$as_me: failed program was:" >&5
3075 cat conftest.$ac_ext >&5
3076 ac_cv_lib_bsd_strlcat=no
3078 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3079 LIBS=$ac_check_lib_save_LIBS
3081 echo "$as_me:3081: result: $ac_cv_lib_bsd_strlcat" >&5
3082 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
3083 if test $ac_cv_lib_bsd_strlcat = yes; then
3086 # Filter out duplicates - this happens with badly-designed ".pc" files...
3087 for cf_add_1lib in $LIBS
3089 for cf_add_2lib in $cf_add_libs
3091 if test "x$cf_add_1lib" = "x$cf_add_2lib"
3097 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
3101 for ac_header in bsd/string.h
3103 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3104 echo "$as_me:3104: checking for $ac_header" >&5
3105 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3106 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3107 echo $ECHO_N "(cached) $ECHO_C" >&6
3109 cat >conftest.$ac_ext <<_ACEOF
3110 #line 3110 "configure"
3111 #include "confdefs.h"
3112 #include <$ac_header>
3114 if { (eval echo "$as_me:3114: \"$ac_cpp conftest.$ac_ext\"") >&5
3115 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3117 egrep -v '^ *\+' conftest.er1 >conftest.err
3119 cat conftest.err >&5
3120 echo "$as_me:3120: \$? = $ac_status" >&5
3121 (exit $ac_status); } >/dev/null; then
3122 if test -s conftest.err; then
3123 ac_cpp_err=$ac_c_preproc_warn_flag
3130 if test -z "$ac_cpp_err"; then
3131 eval "$as_ac_Header=yes"
3133 echo "$as_me: failed program was:" >&5
3134 cat conftest.$ac_ext >&5
3135 eval "$as_ac_Header=no"
3137 rm -f conftest.err conftest.$ac_ext
3139 echo "$as_me:3139: result: `eval echo '${'$as_ac_Header'}'`" >&5
3140 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3141 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3142 cat >>confdefs.h <<EOF
3143 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3149 cat >>confdefs.h <<\EOF
3150 #define HAVE_STRLCAT 1
3157 for ac_func in strlcpy snprintf
3159 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3160 echo "$as_me:3160: checking for $ac_func" >&5
3161 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3162 if eval "test \"\${$as_ac_var+set}\" = set"; then
3163 echo $ECHO_N "(cached) $ECHO_C" >&6
3165 cat >conftest.$ac_ext <<_ACEOF
3166 #line 3166 "configure"
3167 #include "confdefs.h"
3168 /* System header to define __stub macros and hopefully few prototypes,
3169 which can conflict with char $ac_func (); below. */
3171 /* Override any gcc2 internal prototype to avoid an error. */
3175 /* We use char because int might match the return type of a gcc2
3176 builtin and then its argument prototype would still apply. */
3183 /* The GNU C library defines this for functions which it implements
3184 to always fail with ENOSYS. Some functions are actually named
3185 something starting with __ and the normal name is an alias. */
3186 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3189 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
3196 rm -f conftest.$ac_objext conftest$ac_exeext
3197 if { (eval echo "$as_me:3197: \"$ac_link\"") >&5
3198 (eval $ac_link) 2>&5
3200 echo "$as_me:3200: \$? = $ac_status" >&5
3201 (exit $ac_status); } &&
3202 { ac_try='test -s conftest$ac_exeext'
3203 { (eval echo "$as_me:3203: \"$ac_try\"") >&5
3206 echo "$as_me:3206: \$? = $ac_status" >&5
3207 (exit $ac_status); }; }; then
3208 eval "$as_ac_var=yes"
3210 echo "$as_me: failed program was:" >&5
3211 cat conftest.$ac_ext >&5
3212 eval "$as_ac_var=no"
3214 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3216 echo "$as_me:3216: result: `eval echo '${'$as_ac_var'}'`" >&5
3217 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
3218 if test `eval echo '${'$as_ac_var'}'` = yes; then
3219 cat >>confdefs.h <<EOF
3220 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3229 cf_POSIX_C_SOURCE=199506L
3234 cf_xopen_source="-D_ALL_SOURCE"
3240 cf_xopen_source="-D_APPLE_C_SOURCE"
3243 cf_xopen_source="-D_DARWIN_C_SOURCE"
3246 (freebsd*|dragonfly*)
3247 # 5.x headers associate
3248 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3249 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3250 cf_POSIX_C_SOURCE=200112L
3252 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3255 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3258 cf_xopen_source="-D_HPUX_SOURCE"
3261 cf_xopen_source="-D_SGI_SOURCE"
3264 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3266 echo "$as_me:3266: checking if we must define _GNU_SOURCE" >&5
3267 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3268 if test "${cf_cv_gnu_source+set}" = set; then
3269 echo $ECHO_N "(cached) $ECHO_C" >&6
3272 cat >conftest.$ac_ext <<_ACEOF
3273 #line 3273 "configure"
3274 #include "confdefs.h"
3275 #include <sys/types.h>
3280 #ifndef _XOPEN_SOURCE
3287 rm -f conftest.$ac_objext
3288 if { (eval echo "$as_me:3288: \"$ac_compile\"") >&5
3289 (eval $ac_compile) 2>&5
3291 echo "$as_me:3291: \$? = $ac_status" >&5
3292 (exit $ac_status); } &&
3293 { ac_try='test -s conftest.$ac_objext'
3294 { (eval echo "$as_me:3294: \"$ac_try\"") >&5
3297 echo "$as_me:3297: \$? = $ac_status" >&5
3298 (exit $ac_status); }; }; then
3301 echo "$as_me: failed program was:" >&5
3302 cat conftest.$ac_ext >&5
3304 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
3305 cat >conftest.$ac_ext <<_ACEOF
3306 #line 3306 "configure"
3307 #include "confdefs.h"
3308 #include <sys/types.h>
3313 #ifdef _XOPEN_SOURCE
3320 rm -f conftest.$ac_objext
3321 if { (eval echo "$as_me:3321: \"$ac_compile\"") >&5
3322 (eval $ac_compile) 2>&5
3324 echo "$as_me:3324: \$? = $ac_status" >&5
3325 (exit $ac_status); } &&
3326 { ac_try='test -s conftest.$ac_objext'
3327 { (eval echo "$as_me:3327: \"$ac_try\"") >&5
3330 echo "$as_me:3330: \$? = $ac_status" >&5
3331 (exit $ac_status); }; }; then
3334 echo "$as_me: failed program was:" >&5
3335 cat conftest.$ac_ext >&5
3336 cf_cv_gnu_source=yes
3338 rm -f conftest.$ac_objext conftest.$ac_ext
3342 rm -f conftest.$ac_objext conftest.$ac_ext
3345 echo "$as_me:3345: result: $cf_cv_gnu_source" >&5
3346 echo "${ECHO_T}$cf_cv_gnu_source" >&6
3348 if test "$cf_cv_gnu_source" = yes
3350 echo "$as_me:3350: checking if we should also define _DEFAULT_SOURCE" >&5
3351 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
3352 if test "${cf_cv_default_source+set}" = set; then
3353 echo $ECHO_N "(cached) $ECHO_C" >&6
3356 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
3357 cat >conftest.$ac_ext <<_ACEOF
3358 #line 3358 "configure"
3359 #include "confdefs.h"
3360 #include <sys/types.h>
3365 #ifdef _DEFAULT_SOURCE
3372 rm -f conftest.$ac_objext
3373 if { (eval echo "$as_me:3373: \"$ac_compile\"") >&5
3374 (eval $ac_compile) 2>&5
3376 echo "$as_me:3376: \$? = $ac_status" >&5
3377 (exit $ac_status); } &&
3378 { ac_try='test -s conftest.$ac_objext'
3379 { (eval echo "$as_me:3379: \"$ac_try\"") >&5
3382 echo "$as_me:3382: \$? = $ac_status" >&5
3383 (exit $ac_status); }; }; then
3384 cf_cv_default_source=no
3386 echo "$as_me: failed program was:" >&5
3387 cat conftest.$ac_ext >&5
3388 cf_cv_default_source=yes
3390 rm -f conftest.$ac_objext conftest.$ac_ext
3393 echo "$as_me:3393: result: $cf_cv_default_source" >&5
3394 echo "${ECHO_T}$cf_cv_default_source" >&6
3395 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
3400 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
3403 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
3406 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3408 cf_save_CFLAGS="$CFLAGS"
3409 cf_save_CPPFLAGS="$CPPFLAGS"
3411 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3412 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3413 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3415 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3416 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3417 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3419 echo "$as_me:3419: checking if we should define _POSIX_C_SOURCE" >&5
3420 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3421 if test "${cf_cv_posix_c_source+set}" = set; then
3422 echo $ECHO_N "(cached) $ECHO_C" >&6
3425 echo "${as_me:-configure}:3425: testing if the symbol is already defined go no further ..." 1>&5
3427 cat >conftest.$ac_ext <<_ACEOF
3428 #line 3428 "configure"
3429 #include "confdefs.h"
3430 #include <sys/types.h>
3435 #ifndef _POSIX_C_SOURCE
3442 rm -f conftest.$ac_objext
3443 if { (eval echo "$as_me:3443: \"$ac_compile\"") >&5
3444 (eval $ac_compile) 2>&5
3446 echo "$as_me:3446: \$? = $ac_status" >&5
3447 (exit $ac_status); } &&
3448 { ac_try='test -s conftest.$ac_objext'
3449 { (eval echo "$as_me:3449: \"$ac_try\"") >&5
3452 echo "$as_me:3452: \$? = $ac_status" >&5
3453 (exit $ac_status); }; }; then
3454 cf_cv_posix_c_source=no
3456 echo "$as_me: failed program was:" >&5
3457 cat conftest.$ac_ext >&5
3458 cf_want_posix_source=no
3459 case .$cf_POSIX_C_SOURCE in
3461 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3464 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3465 cf_want_posix_source=yes
3468 cf_want_posix_source=yes
3471 if test "$cf_want_posix_source" = yes ; then
3472 cat >conftest.$ac_ext <<_ACEOF
3473 #line 3473 "configure"
3474 #include "confdefs.h"
3475 #include <sys/types.h>
3480 #ifdef _POSIX_SOURCE
3487 rm -f conftest.$ac_objext
3488 if { (eval echo "$as_me:3488: \"$ac_compile\"") >&5
3489 (eval $ac_compile) 2>&5
3491 echo "$as_me:3491: \$? = $ac_status" >&5
3492 (exit $ac_status); } &&
3493 { ac_try='test -s conftest.$ac_objext'
3494 { (eval echo "$as_me:3494: \"$ac_try\"") >&5
3497 echo "$as_me:3497: \$? = $ac_status" >&5
3498 (exit $ac_status); }; }; then
3501 echo "$as_me: failed program was:" >&5
3502 cat conftest.$ac_ext >&5
3503 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3505 rm -f conftest.$ac_objext conftest.$ac_ext
3508 echo "${as_me:-configure}:3508: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3510 CFLAGS="$cf_trim_CFLAGS"
3511 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3513 echo "${as_me:-configure}:3513: testing if the second compile does not leave our definition intact error ..." 1>&5
3515 cat >conftest.$ac_ext <<_ACEOF
3516 #line 3516 "configure"
3517 #include "confdefs.h"
3518 #include <sys/types.h>
3523 #ifndef _POSIX_C_SOURCE
3530 rm -f conftest.$ac_objext
3531 if { (eval echo "$as_me:3531: \"$ac_compile\"") >&5
3532 (eval $ac_compile) 2>&5
3534 echo "$as_me:3534: \$? = $ac_status" >&5
3535 (exit $ac_status); } &&
3536 { ac_try='test -s conftest.$ac_objext'
3537 { (eval echo "$as_me:3537: \"$ac_try\"") >&5
3540 echo "$as_me:3540: \$? = $ac_status" >&5
3541 (exit $ac_status); }; }; then
3544 echo "$as_me: failed program was:" >&5
3545 cat conftest.$ac_ext >&5
3546 cf_cv_posix_c_source=no
3548 rm -f conftest.$ac_objext conftest.$ac_ext
3549 CFLAGS="$cf_save_CFLAGS"
3550 CPPFLAGS="$cf_save_CPPFLAGS"
3553 rm -f conftest.$ac_objext conftest.$ac_ext
3556 echo "$as_me:3556: result: $cf_cv_posix_c_source" >&5
3557 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3559 if test "$cf_cv_posix_c_source" != no ; then
3560 CFLAGS="$cf_trim_CFLAGS"
3561 CPPFLAGS="$cf_trim_CPPFLAGS"
3566 cf_new_extra_cppflags=
3568 for cf_add_cflags in $cf_cv_posix_c_source
3570 case $cf_fix_cppflags in
3572 case $cf_add_cflags in
3573 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3574 case $cf_add_cflags in
3576 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3578 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3579 && test -z "${cf_tst_cflags}" \
3580 && cf_fix_cppflags=yes
3582 if test $cf_fix_cppflags = yes ; then
3584 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3585 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3588 elif test "${cf_tst_cflags}" = "\"'" ; then
3590 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3591 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3601 case $cf_add_cflags in
3603 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3605 CPPFLAGS=`echo "$CPPFLAGS" | \
3606 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3607 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3612 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3613 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3620 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3621 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3628 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3629 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3631 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3633 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3634 && test -z "${cf_tst_cflags}" \
3635 && cf_fix_cppflags=no
3640 if test -n "$cf_new_cflags" ; then
3642 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3643 CFLAGS="${CFLAGS}$cf_new_cflags"
3647 if test -n "$cf_new_cppflags" ; then
3649 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3650 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3654 if test -n "$cf_new_extra_cppflags" ; then
3656 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3657 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3665 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3668 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3669 cf_xopen_source="-D_BSD_SOURCE"
3673 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3676 cf_xopen_source="-D_OSF_SOURCE"
3679 cf_xopen_source="-D_QNX_SOURCE"
3682 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3685 cf_xopen_source="-D__EXTENSIONS__"
3686 cf_cv_xopen_source=broken
3688 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
3694 echo "$as_me:3694: checking if we should define _XOPEN_SOURCE" >&5
3695 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3696 if test "${cf_cv_xopen_source+set}" = set; then
3697 echo $ECHO_N "(cached) $ECHO_C" >&6
3700 cat >conftest.$ac_ext <<_ACEOF
3701 #line 3701 "configure"
3702 #include "confdefs.h"
3706 #include <sys/types.h>
3712 #ifndef _XOPEN_SOURCE
3719 rm -f conftest.$ac_objext
3720 if { (eval echo "$as_me:3720: \"$ac_compile\"") >&5
3721 (eval $ac_compile) 2>&5
3723 echo "$as_me:3723: \$? = $ac_status" >&5
3724 (exit $ac_status); } &&
3725 { ac_try='test -s conftest.$ac_objext'
3726 { (eval echo "$as_me:3726: \"$ac_try\"") >&5
3729 echo "$as_me:3729: \$? = $ac_status" >&5
3730 (exit $ac_status); }; }; then
3731 cf_cv_xopen_source=no
3733 echo "$as_me: failed program was:" >&5
3734 cat conftest.$ac_ext >&5
3736 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3737 cat >conftest.$ac_ext <<_ACEOF
3738 #line 3738 "configure"
3739 #include "confdefs.h"
3743 #include <sys/types.h>
3749 #ifdef _XOPEN_SOURCE
3756 rm -f conftest.$ac_objext
3757 if { (eval echo "$as_me:3757: \"$ac_compile\"") >&5
3758 (eval $ac_compile) 2>&5
3760 echo "$as_me:3760: \$? = $ac_status" >&5
3761 (exit $ac_status); } &&
3762 { ac_try='test -s conftest.$ac_objext'
3763 { (eval echo "$as_me:3763: \"$ac_try\"") >&5
3766 echo "$as_me:3766: \$? = $ac_status" >&5
3767 (exit $ac_status); }; }; then
3768 cf_cv_xopen_source=no
3770 echo "$as_me: failed program was:" >&5
3771 cat conftest.$ac_ext >&5
3772 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3774 rm -f conftest.$ac_objext conftest.$ac_ext
3778 rm -f conftest.$ac_objext conftest.$ac_ext
3781 echo "$as_me:3781: result: $cf_cv_xopen_source" >&5
3782 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3784 if test "$cf_cv_xopen_source" != no ; then
3786 CFLAGS=`echo "$CFLAGS" | \
3787 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3788 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3790 CPPFLAGS=`echo "$CPPFLAGS" | \
3791 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3792 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3794 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3799 cf_new_extra_cppflags=
3801 for cf_add_cflags in $cf_temp_xopen_source
3803 case $cf_fix_cppflags in
3805 case $cf_add_cflags in
3806 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3807 case $cf_add_cflags in
3809 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3811 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3812 && test -z "${cf_tst_cflags}" \
3813 && cf_fix_cppflags=yes
3815 if test $cf_fix_cppflags = yes ; then
3817 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3818 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3821 elif test "${cf_tst_cflags}" = "\"'" ; then
3823 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3824 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3834 case $cf_add_cflags in
3836 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3838 CPPFLAGS=`echo "$CPPFLAGS" | \
3839 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3840 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3845 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3846 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3853 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3854 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3861 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3862 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3864 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3866 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3867 && test -z "${cf_tst_cflags}" \
3868 && cf_fix_cppflags=no
3873 if test -n "$cf_new_cflags" ; then
3875 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3876 CFLAGS="${CFLAGS}$cf_new_cflags"
3880 if test -n "$cf_new_cppflags" ; then
3882 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3883 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3887 if test -n "$cf_new_extra_cppflags" ; then
3889 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3890 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3896 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3898 cf_save_CFLAGS="$CFLAGS"
3899 cf_save_CPPFLAGS="$CPPFLAGS"
3901 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3902 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3903 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3905 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3906 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3907 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3909 echo "$as_me:3909: checking if we should define _POSIX_C_SOURCE" >&5
3910 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3911 if test "${cf_cv_posix_c_source+set}" = set; then
3912 echo $ECHO_N "(cached) $ECHO_C" >&6
3915 echo "${as_me:-configure}:3915: testing if the symbol is already defined go no further ..." 1>&5
3917 cat >conftest.$ac_ext <<_ACEOF
3918 #line 3918 "configure"
3919 #include "confdefs.h"
3920 #include <sys/types.h>
3925 #ifndef _POSIX_C_SOURCE
3932 rm -f conftest.$ac_objext
3933 if { (eval echo "$as_me:3933: \"$ac_compile\"") >&5
3934 (eval $ac_compile) 2>&5
3936 echo "$as_me:3936: \$? = $ac_status" >&5
3937 (exit $ac_status); } &&
3938 { ac_try='test -s conftest.$ac_objext'
3939 { (eval echo "$as_me:3939: \"$ac_try\"") >&5
3942 echo "$as_me:3942: \$? = $ac_status" >&5
3943 (exit $ac_status); }; }; then
3944 cf_cv_posix_c_source=no
3946 echo "$as_me: failed program was:" >&5
3947 cat conftest.$ac_ext >&5
3948 cf_want_posix_source=no
3949 case .$cf_POSIX_C_SOURCE in
3951 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3954 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3955 cf_want_posix_source=yes
3958 cf_want_posix_source=yes
3961 if test "$cf_want_posix_source" = yes ; then
3962 cat >conftest.$ac_ext <<_ACEOF
3963 #line 3963 "configure"
3964 #include "confdefs.h"
3965 #include <sys/types.h>
3970 #ifdef _POSIX_SOURCE
3977 rm -f conftest.$ac_objext
3978 if { (eval echo "$as_me:3978: \"$ac_compile\"") >&5
3979 (eval $ac_compile) 2>&5
3981 echo "$as_me:3981: \$? = $ac_status" >&5
3982 (exit $ac_status); } &&
3983 { ac_try='test -s conftest.$ac_objext'
3984 { (eval echo "$as_me:3984: \"$ac_try\"") >&5
3987 echo "$as_me:3987: \$? = $ac_status" >&5
3988 (exit $ac_status); }; }; then
3991 echo "$as_me: failed program was:" >&5
3992 cat conftest.$ac_ext >&5
3993 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3995 rm -f conftest.$ac_objext conftest.$ac_ext
3998 echo "${as_me:-configure}:3998: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4000 CFLAGS="$cf_trim_CFLAGS"
4001 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
4003 echo "${as_me:-configure}:4003: testing if the second compile does not leave our definition intact error ..." 1>&5
4005 cat >conftest.$ac_ext <<_ACEOF
4006 #line 4006 "configure"
4007 #include "confdefs.h"
4008 #include <sys/types.h>
4013 #ifndef _POSIX_C_SOURCE
4020 rm -f conftest.$ac_objext
4021 if { (eval echo "$as_me:4021: \"$ac_compile\"") >&5
4022 (eval $ac_compile) 2>&5
4024 echo "$as_me:4024: \$? = $ac_status" >&5
4025 (exit $ac_status); } &&
4026 { ac_try='test -s conftest.$ac_objext'
4027 { (eval echo "$as_me:4027: \"$ac_try\"") >&5
4030 echo "$as_me:4030: \$? = $ac_status" >&5
4031 (exit $ac_status); }; }; then
4034 echo "$as_me: failed program was:" >&5
4035 cat conftest.$ac_ext >&5
4036 cf_cv_posix_c_source=no
4038 rm -f conftest.$ac_objext conftest.$ac_ext
4039 CFLAGS="$cf_save_CFLAGS"
4040 CPPFLAGS="$cf_save_CPPFLAGS"
4043 rm -f conftest.$ac_objext conftest.$ac_ext
4046 echo "$as_me:4046: result: $cf_cv_posix_c_source" >&5
4047 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4049 if test "$cf_cv_posix_c_source" != no ; then
4050 CFLAGS="$cf_trim_CFLAGS"
4051 CPPFLAGS="$cf_trim_CPPFLAGS"
4056 cf_new_extra_cppflags=
4058 for cf_add_cflags in $cf_cv_posix_c_source
4060 case $cf_fix_cppflags in
4062 case $cf_add_cflags in
4063 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4064 case $cf_add_cflags in
4066 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4068 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4069 && test -z "${cf_tst_cflags}" \
4070 && cf_fix_cppflags=yes
4072 if test $cf_fix_cppflags = yes ; then
4074 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4075 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4078 elif test "${cf_tst_cflags}" = "\"'" ; then
4080 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4081 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4091 case $cf_add_cflags in
4093 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4095 CPPFLAGS=`echo "$CPPFLAGS" | \
4096 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4097 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4102 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4103 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4110 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4111 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4118 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4119 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4121 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4123 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4124 && test -z "${cf_tst_cflags}" \
4125 && cf_fix_cppflags=no
4130 if test -n "$cf_new_cflags" ; then
4132 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4133 CFLAGS="${CFLAGS}$cf_new_cflags"
4137 if test -n "$cf_new_cppflags" ; then
4139 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4140 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4144 if test -n "$cf_new_extra_cppflags" ; then
4146 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4147 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4156 if test -n "$cf_xopen_source" ; then
4161 cf_new_extra_cppflags=
4163 for cf_add_cflags in $cf_xopen_source
4165 case $cf_fix_cppflags in
4167 case $cf_add_cflags in
4168 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4169 case $cf_add_cflags in
4171 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4173 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4174 && test -z "${cf_tst_cflags}" \
4175 && cf_fix_cppflags=yes
4177 if test $cf_fix_cppflags = yes ; then
4179 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4180 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4183 elif test "${cf_tst_cflags}" = "\"'" ; then
4185 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4186 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4196 case $cf_add_cflags in
4198 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4200 CPPFLAGS=`echo "$CPPFLAGS" | \
4201 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4202 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4207 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4208 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4215 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4216 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4223 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4224 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4226 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4228 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4229 && test -z "${cf_tst_cflags}" \
4230 && cf_fix_cppflags=no
4235 if test -n "$cf_new_cflags" ; then
4236 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
4238 echo "${as_me:-configure}:4238: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
4240 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4241 CFLAGS="${CFLAGS}$cf_new_cflags"
4245 if test -n "$cf_new_cppflags" ; then
4246 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
4248 echo "${as_me:-configure}:4248: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
4250 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4251 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4255 if test -n "$cf_new_extra_cppflags" ; then
4256 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
4258 echo "${as_me:-configure}:4258: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
4260 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4261 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4267 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
4268 echo "$as_me:4268: checking if _XOPEN_SOURCE really is set" >&5
4269 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
4270 cat >conftest.$ac_ext <<_ACEOF
4271 #line 4271 "configure"
4272 #include "confdefs.h"
4278 #ifndef _XOPEN_SOURCE
4285 rm -f conftest.$ac_objext
4286 if { (eval echo "$as_me:4286: \"$ac_compile\"") >&5
4287 (eval $ac_compile) 2>&5
4289 echo "$as_me:4289: \$? = $ac_status" >&5
4290 (exit $ac_status); } &&
4291 { ac_try='test -s conftest.$ac_objext'
4292 { (eval echo "$as_me:4292: \"$ac_try\"") >&5
4295 echo "$as_me:4295: \$? = $ac_status" >&5
4296 (exit $ac_status); }; }; then
4297 cf_XOPEN_SOURCE_set=yes
4299 echo "$as_me: failed program was:" >&5
4300 cat conftest.$ac_ext >&5
4301 cf_XOPEN_SOURCE_set=no
4303 rm -f conftest.$ac_objext conftest.$ac_ext
4304 echo "$as_me:4304: result: $cf_XOPEN_SOURCE_set" >&5
4305 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
4306 if test $cf_XOPEN_SOURCE_set = yes
4308 cat >conftest.$ac_ext <<_ACEOF
4309 #line 4309 "configure"
4310 #include "confdefs.h"
4316 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
4323 rm -f conftest.$ac_objext
4324 if { (eval echo "$as_me:4324: \"$ac_compile\"") >&5
4325 (eval $ac_compile) 2>&5
4327 echo "$as_me:4327: \$? = $ac_status" >&5
4328 (exit $ac_status); } &&
4329 { ac_try='test -s conftest.$ac_objext'
4330 { (eval echo "$as_me:4330: \"$ac_try\"") >&5
4333 echo "$as_me:4333: \$? = $ac_status" >&5
4334 (exit $ac_status); }; }; then
4335 cf_XOPEN_SOURCE_set_ok=yes
4337 echo "$as_me: failed program was:" >&5
4338 cat conftest.$ac_ext >&5
4339 cf_XOPEN_SOURCE_set_ok=no
4341 rm -f conftest.$ac_objext conftest.$ac_ext
4342 if test $cf_XOPEN_SOURCE_set_ok = no
4344 { echo "$as_me:4344: WARNING: _XOPEN_SOURCE is lower than requested" >&5
4345 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
4349 echo "$as_me:4349: checking if we should define _XOPEN_SOURCE" >&5
4350 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4351 if test "${cf_cv_xopen_source+set}" = set; then
4352 echo $ECHO_N "(cached) $ECHO_C" >&6
4355 cat >conftest.$ac_ext <<_ACEOF
4356 #line 4356 "configure"
4357 #include "confdefs.h"
4361 #include <sys/types.h>
4367 #ifndef _XOPEN_SOURCE
4374 rm -f conftest.$ac_objext
4375 if { (eval echo "$as_me:4375: \"$ac_compile\"") >&5
4376 (eval $ac_compile) 2>&5
4378 echo "$as_me:4378: \$? = $ac_status" >&5
4379 (exit $ac_status); } &&
4380 { ac_try='test -s conftest.$ac_objext'
4381 { (eval echo "$as_me:4381: \"$ac_try\"") >&5
4384 echo "$as_me:4384: \$? = $ac_status" >&5
4385 (exit $ac_status); }; }; then
4386 cf_cv_xopen_source=no
4388 echo "$as_me: failed program was:" >&5
4389 cat conftest.$ac_ext >&5
4391 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4392 cat >conftest.$ac_ext <<_ACEOF
4393 #line 4393 "configure"
4394 #include "confdefs.h"
4398 #include <sys/types.h>
4404 #ifdef _XOPEN_SOURCE
4411 rm -f conftest.$ac_objext
4412 if { (eval echo "$as_me:4412: \"$ac_compile\"") >&5
4413 (eval $ac_compile) 2>&5
4415 echo "$as_me:4415: \$? = $ac_status" >&5
4416 (exit $ac_status); } &&
4417 { ac_try='test -s conftest.$ac_objext'
4418 { (eval echo "$as_me:4418: \"$ac_try\"") >&5
4421 echo "$as_me:4421: \$? = $ac_status" >&5
4422 (exit $ac_status); }; }; then
4423 cf_cv_xopen_source=no
4425 echo "$as_me: failed program was:" >&5
4426 cat conftest.$ac_ext >&5
4427 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4429 rm -f conftest.$ac_objext conftest.$ac_ext
4433 rm -f conftest.$ac_objext conftest.$ac_ext
4436 echo "$as_me:4436: result: $cf_cv_xopen_source" >&5
4437 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4439 if test "$cf_cv_xopen_source" != no ; then
4441 CFLAGS=`echo "$CFLAGS" | \
4442 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4443 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4445 CPPFLAGS=`echo "$CPPFLAGS" | \
4446 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4447 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4449 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4454 cf_new_extra_cppflags=
4456 for cf_add_cflags in $cf_temp_xopen_source
4458 case $cf_fix_cppflags in
4460 case $cf_add_cflags in
4461 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4462 case $cf_add_cflags in
4464 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4466 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4467 && test -z "${cf_tst_cflags}" \
4468 && cf_fix_cppflags=yes
4470 if test $cf_fix_cppflags = yes ; then
4472 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4473 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4476 elif test "${cf_tst_cflags}" = "\"'" ; then
4478 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4479 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4489 case $cf_add_cflags in
4491 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4493 CPPFLAGS=`echo "$CPPFLAGS" | \
4494 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4495 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4500 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4501 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4508 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4509 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4516 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4517 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4519 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4521 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4522 && test -z "${cf_tst_cflags}" \
4523 && cf_fix_cppflags=no
4528 if test -n "$cf_new_cflags" ; then
4530 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4531 CFLAGS="${CFLAGS}$cf_new_cflags"
4535 if test -n "$cf_new_cppflags" ; then
4537 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4538 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4542 if test -n "$cf_new_extra_cppflags" ; then
4544 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4545 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4554 echo "$as_me:4554: checking for signal global datatype" >&5
4555 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
4556 if test "${cf_cv_sig_atomic_t+set}" = set; then
4557 echo $ECHO_N "(cached) $ECHO_C" >&6
4561 "volatile sig_atomic_t" \
4565 cat >conftest.$ac_ext <<_ACEOF
4566 #line 4566 "configure"
4567 #include "confdefs.h"
4569 #include <sys/types.h>
4575 static void handler(int sig)
4582 signal(SIGINT, handler);
4588 rm -f conftest.$ac_objext
4589 if { (eval echo "$as_me:4589: \"$ac_compile\"") >&5
4590 (eval $ac_compile) 2>&5
4592 echo "$as_me:4592: \$? = $ac_status" >&5
4593 (exit $ac_status); } &&
4594 { ac_try='test -s conftest.$ac_objext'
4595 { (eval echo "$as_me:4595: \"$ac_try\"") >&5
4598 echo "$as_me:4598: \$? = $ac_status" >&5
4599 (exit $ac_status); }; }; then
4600 cf_cv_sig_atomic_t=$cf_type
4602 echo "$as_me: failed program was:" >&5
4603 cat conftest.$ac_ext >&5
4604 cf_cv_sig_atomic_t=no
4606 rm -f conftest.$ac_objext conftest.$ac_ext
4607 test "$cf_cv_sig_atomic_t" != no && break
4612 echo "$as_me:4612: result: $cf_cv_sig_atomic_t" >&5
4613 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
4614 test "$cf_cv_sig_atomic_t" != no &&
4615 cat >>confdefs.h <<EOF
4616 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
4619 # Work around breakage on OS X
4621 echo "$as_me:4621: checking if SIGWINCH is defined" >&5
4622 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
4623 if test "${cf_cv_define_sigwinch+set}" = set; then
4624 echo $ECHO_N "(cached) $ECHO_C" >&6
4627 cat >conftest.$ac_ext <<_ACEOF
4628 #line 4628 "configure"
4629 #include "confdefs.h"
4631 #include <sys/types.h>
4632 #include <sys/signal.h>
4642 rm -f conftest.$ac_objext
4643 if { (eval echo "$as_me:4643: \"$ac_compile\"") >&5
4644 (eval $ac_compile) 2>&5
4646 echo "$as_me:4646: \$? = $ac_status" >&5
4647 (exit $ac_status); } &&
4648 { ac_try='test -s conftest.$ac_objext'
4649 { (eval echo "$as_me:4649: \"$ac_try\"") >&5
4652 echo "$as_me:4652: \$? = $ac_status" >&5
4653 (exit $ac_status); }; }; then
4654 cf_cv_define_sigwinch=yes
4656 echo "$as_me: failed program was:" >&5
4657 cat conftest.$ac_ext >&5
4658 cat >conftest.$ac_ext <<_ACEOF
4659 #line 4659 "configure"
4660 #include "confdefs.h"
4662 #undef _XOPEN_SOURCE
4663 #undef _POSIX_SOURCE
4664 #undef _POSIX_C_SOURCE
4665 #include <sys/types.h>
4666 #include <sys/signal.h>
4676 rm -f conftest.$ac_objext
4677 if { (eval echo "$as_me:4677: \"$ac_compile\"") >&5
4678 (eval $ac_compile) 2>&5
4680 echo "$as_me:4680: \$? = $ac_status" >&5
4681 (exit $ac_status); } &&
4682 { ac_try='test -s conftest.$ac_objext'
4683 { (eval echo "$as_me:4683: \"$ac_try\"") >&5
4686 echo "$as_me:4686: \$? = $ac_status" >&5
4687 (exit $ac_status); }; }; then
4688 cf_cv_define_sigwinch=maybe
4690 echo "$as_me: failed program was:" >&5
4691 cat conftest.$ac_ext >&5
4692 cf_cv_define_sigwinch=no
4694 rm -f conftest.$ac_objext conftest.$ac_ext
4697 rm -f conftest.$ac_objext conftest.$ac_ext
4700 echo "$as_me:4700: result: $cf_cv_define_sigwinch" >&5
4701 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
4703 if test "$cf_cv_define_sigwinch" = maybe ; then
4704 echo "$as_me:4704: checking for actual SIGWINCH definition" >&5
4705 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
4706 if test "${cf_cv_fixup_sigwinch+set}" = set; then
4707 echo $ECHO_N "(cached) $ECHO_C" >&6
4710 cf_cv_fixup_sigwinch=unknown
4712 while test $cf_sigwinch != 1
4714 cat >conftest.$ac_ext <<_ACEOF
4715 #line 4715 "configure"
4716 #include "confdefs.h"
4718 #undef _XOPEN_SOURCE
4719 #undef _POSIX_SOURCE
4720 #undef _POSIX_C_SOURCE
4721 #include <sys/types.h>
4722 #include <sys/signal.h>
4728 #if SIGWINCH != $cf_sigwinch
4736 rm -f conftest.$ac_objext
4737 if { (eval echo "$as_me:4737: \"$ac_compile\"") >&5
4738 (eval $ac_compile) 2>&5
4740 echo "$as_me:4740: \$? = $ac_status" >&5
4741 (exit $ac_status); } &&
4742 { ac_try='test -s conftest.$ac_objext'
4743 { (eval echo "$as_me:4743: \"$ac_try\"") >&5
4746 echo "$as_me:4746: \$? = $ac_status" >&5
4747 (exit $ac_status); }; }; then
4748 cf_cv_fixup_sigwinch=$cf_sigwinch
4751 echo "$as_me: failed program was:" >&5
4752 cat conftest.$ac_ext >&5
4754 rm -f conftest.$ac_objext conftest.$ac_ext
4756 cf_sigwinch=`expr $cf_sigwinch - 1`
4760 echo "$as_me:4760: result: $cf_cv_fixup_sigwinch" >&5
4761 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
4763 if test "$cf_cv_fixup_sigwinch" != unknown ; then
4764 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
4768 # Checks for CODESET support.
4770 echo "$as_me:4770: checking for nl_langinfo and CODESET" >&5
4771 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
4772 if test "${am_cv_langinfo_codeset+set}" = set; then
4773 echo $ECHO_N "(cached) $ECHO_C" >&6
4775 cat >conftest.$ac_ext <<_ACEOF
4776 #line 4776 "configure"
4777 #include "confdefs.h"
4778 #include <langinfo.h>
4782 char* cs = nl_langinfo(CODESET);
4787 rm -f conftest.$ac_objext conftest$ac_exeext
4788 if { (eval echo "$as_me:4788: \"$ac_link\"") >&5
4789 (eval $ac_link) 2>&5
4791 echo "$as_me:4791: \$? = $ac_status" >&5
4792 (exit $ac_status); } &&
4793 { ac_try='test -s conftest$ac_exeext'
4794 { (eval echo "$as_me:4794: \"$ac_try\"") >&5
4797 echo "$as_me:4797: \$? = $ac_status" >&5
4798 (exit $ac_status); }; }; then
4799 am_cv_langinfo_codeset=yes
4801 echo "$as_me: failed program was:" >&5
4802 cat conftest.$ac_ext >&5
4803 am_cv_langinfo_codeset=no
4805 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4808 echo "$as_me:4808: result: $am_cv_langinfo_codeset" >&5
4809 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
4810 if test $am_cv_langinfo_codeset = yes; then
4812 cat >>confdefs.h <<\EOF
4813 #define HAVE_LANGINFO_CODESET 1
4818 echo "$as_me:4818: checking if you want to use pkg-config" >&5
4819 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4821 # Check whether --with-pkg-config or --without-pkg-config was given.
4822 if test "${with_pkg_config+set}" = set; then
4823 withval="$with_pkg_config"
4824 cf_pkg_config=$withval
4828 echo "$as_me:4828: result: $cf_pkg_config" >&5
4829 echo "${ECHO_T}$cf_pkg_config" >&6
4831 case $cf_pkg_config in
4837 if test -n "$ac_tool_prefix"; then
4838 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4839 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4840 echo "$as_me:4840: checking for $ac_word" >&5
4841 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4842 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4843 echo $ECHO_N "(cached) $ECHO_C" >&6
4847 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4850 ac_save_IFS=$IFS; IFS=$ac_path_separator
4852 for ac_dir in $ac_dummy; do
4854 test -z "$ac_dir" && ac_dir=.
4855 if $as_executable_p "$ac_dir/$ac_word"; then
4856 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4857 echo "$as_me:4857: found $ac_dir/$ac_word" >&5
4865 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4867 if test -n "$PKG_CONFIG"; then
4868 echo "$as_me:4868: result: $PKG_CONFIG" >&5
4869 echo "${ECHO_T}$PKG_CONFIG" >&6
4871 echo "$as_me:4871: result: no" >&5
4872 echo "${ECHO_T}no" >&6
4876 if test -z "$ac_cv_path_PKG_CONFIG"; then
4877 ac_pt_PKG_CONFIG=$PKG_CONFIG
4878 # Extract the first word of "pkg-config", so it can be a program name with args.
4879 set dummy pkg-config; ac_word=$2
4880 echo "$as_me:4880: checking for $ac_word" >&5
4881 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4882 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4883 echo $ECHO_N "(cached) $ECHO_C" >&6
4885 case $ac_pt_PKG_CONFIG in
4887 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4890 ac_save_IFS=$IFS; IFS=$ac_path_separator
4892 for ac_dir in $ac_dummy; do
4894 test -z "$ac_dir" && ac_dir=.
4895 if $as_executable_p "$ac_dir/$ac_word"; then
4896 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4897 echo "$as_me:4897: found $ac_dir/$ac_word" >&5
4902 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4906 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4908 if test -n "$ac_pt_PKG_CONFIG"; then
4909 echo "$as_me:4909: result: $ac_pt_PKG_CONFIG" >&5
4910 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4912 echo "$as_me:4912: result: no" >&5
4913 echo "${ECHO_T}no" >&6
4916 PKG_CONFIG=$ac_pt_PKG_CONFIG
4918 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4927 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4928 if test "$PKG_CONFIG" != none ; then
4930 if test "x$prefix" != xNONE; then
4931 cf_path_syntax="$prefix"
4933 cf_path_syntax="$ac_default_prefix"
4936 case ".$PKG_CONFIG" in
4941 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4943 (.\${*prefix}*|.\${*dir}*)
4944 eval PKG_CONFIG="$PKG_CONFIG"
4945 case ".$PKG_CONFIG" in
4947 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
4952 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
4955 { { echo "$as_me:4955: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4956 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4957 { (exit 1); exit 1; }; }
4961 elif test "x$cf_pkg_config" != xno ; then
4962 { echo "$as_me:4962: WARNING: pkg-config is not installed" >&5
4963 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4966 echo "$as_me:4966: checking if you want to see long compiling messages" >&5
4967 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
4969 # Check whether --enable-echo or --disable-echo was given.
4970 if test "${enable_echo+set}" = set; then
4971 enableval="$enable_echo"
4972 test "$enableval" != no && enableval=yes
4973 if test "$enableval" != "yes" ; then
4976 ECHO_LD='@echo linking $@;'
4977 RULE_CC='@echo compiling $<'
4978 SHOW_CC='@echo compiling $@'
5000 echo "$as_me:5000: result: $enableval" >&5
5001 echo "${ECHO_T}$enableval" >&6
5003 echo "$as_me:5003: checking for ncurses wrap-prefix" >&5
5004 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
5006 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
5007 if test "${with_ncurses_wrap_prefix+set}" = set; then
5008 withval="$with_ncurses_wrap_prefix"
5009 NCURSES_WRAP_PREFIX=$withval
5011 NCURSES_WRAP_PREFIX=_nc_
5013 echo "$as_me:5013: result: $NCURSES_WRAP_PREFIX" >&5
5014 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
5016 echo "$as_me:5016: checking if you want to check for wide-character functions" >&5
5017 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
5019 # Check whether --enable-widec or --disable-widec was given.
5020 if test "${enable_widec+set}" = set; then
5021 enableval="$enable_widec"
5022 test "$enableval" != no && enableval=yes
5023 if test "$enableval" != "yes" ; then
5033 echo "$as_me:5033: result: $cf_enable_widec" >&5
5034 echo "${ECHO_T}$cf_enable_widec" >&6
5036 echo "$as_me:5036: checking for specific curses-directory" >&5
5037 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
5039 # Check whether --with-curses-dir or --without-curses-dir was given.
5040 if test "${with_curses_dir+set}" = set; then
5041 withval="$with_curses_dir"
5042 cf_cv_curses_dir=$withval
5046 echo "$as_me:5046: result: $cf_cv_curses_dir" >&5
5047 echo "${ECHO_T}$cf_cv_curses_dir" >&6
5049 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5052 if test "x$prefix" != xNONE; then
5053 cf_path_syntax="$prefix"
5055 cf_path_syntax="$ac_default_prefix"
5063 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5065 (.\${*prefix}*|.\${*dir}*)
5066 eval withval="$withval"
5069 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5074 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5077 { { echo "$as_me:5077: error: expected a pathname, not \"$withval\"" >&5
5078 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5079 { (exit 1); exit 1; }; }
5083 if test -d "$cf_cv_curses_dir"
5086 if test -n "$cf_cv_curses_dir/include" ; then
5087 for cf_add_incdir in $cf_cv_curses_dir/include
5089 while test $cf_add_incdir != /usr/include
5091 if test -d $cf_add_incdir
5094 if test -n "$CFLAGS$CPPFLAGS" ; then
5095 # a loop is needed to ensure we can add subdirs of existing dirs
5096 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5097 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5098 cf_have_incdir=yes; break
5103 if test "$cf_have_incdir" = no ; then
5104 if test "$cf_add_incdir" = /usr/local/include ; then
5105 if test "$GCC" = yes
5107 cf_save_CPPFLAGS=$CPPFLAGS
5108 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5109 cat >conftest.$ac_ext <<_ACEOF
5110 #line 5110 "configure"
5111 #include "confdefs.h"
5121 rm -f conftest.$ac_objext
5122 if { (eval echo "$as_me:5122: \"$ac_compile\"") >&5
5123 (eval $ac_compile) 2>&5
5125 echo "$as_me:5125: \$? = $ac_status" >&5
5126 (exit $ac_status); } &&
5127 { ac_try='test -s conftest.$ac_objext'
5128 { (eval echo "$as_me:5128: \"$ac_try\"") >&5
5131 echo "$as_me:5131: \$? = $ac_status" >&5
5132 (exit $ac_status); }; }; then
5135 echo "$as_me: failed program was:" >&5
5136 cat conftest.$ac_ext >&5
5139 rm -f conftest.$ac_objext conftest.$ac_ext
5140 CPPFLAGS=$cf_save_CPPFLAGS
5145 if test "$cf_have_incdir" = no ; then
5146 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5148 echo "${as_me:-configure}:5148: testing adding $cf_add_incdir to include-path ..." 1>&5
5150 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5152 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5153 test "$cf_top_incdir" = "$cf_add_incdir" && break
5154 cf_add_incdir="$cf_top_incdir"
5165 if test -n "$cf_cv_curses_dir/lib" ; then
5166 for cf_add_libdir in $cf_cv_curses_dir/lib
5168 if test $cf_add_libdir = /usr/lib ; then
5170 elif test -d $cf_add_libdir
5173 if test -n "$LDFLAGS$LIBS" ; then
5174 # a loop is needed to ensure we can add subdirs of existing dirs
5175 for cf_test_libdir in $LDFLAGS $LIBS ; do
5176 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5177 cf_have_libdir=yes; break
5181 if test "$cf_have_libdir" = no ; then
5182 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5184 echo "${as_me:-configure}:5184: testing adding $cf_add_libdir to library-path ..." 1>&5
5186 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5197 echo "$as_me:5197: checking for specified curses library type" >&5
5198 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
5200 # Check whether --with-screen or --without-screen was given.
5201 if test "${with_screen+set}" = set; then
5202 withval="$with_screen"
5203 cf_cv_screen=$withval
5206 # Check whether --with-ncursesw or --without-ncursesw was given.
5207 if test "${with_ncursesw+set}" = set; then
5208 withval="$with_ncursesw"
5209 cf_cv_screen=ncursesw
5212 # Check whether --with-ncurses or --without-ncurses was given.
5213 if test "${with_ncurses+set}" = set; then
5214 withval="$with_ncurses"
5215 cf_cv_screen=ncurses
5218 # Check whether --with-pdcurses or --without-pdcurses was given.
5219 if test "${with_pdcurses+set}" = set; then
5220 withval="$with_pdcurses"
5221 cf_cv_screen=pdcurses
5224 # Check whether --with-curses-colr or --without-curses-colr was given.
5225 if test "${with_curses_colr+set}" = set; then
5226 withval="$with_curses_colr"
5227 cf_cv_screen=curses_colr
5230 # Check whether --with-curses-5lib or --without-curses-5lib was given.
5231 if test "${with_curses_5lib+set}" = set; then
5232 withval="$with_curses_5lib"
5233 cf_cv_screen=curses_5lib
5241 echo "$as_me:5241: result: $cf_cv_screen" >&5
5242 echo "${ECHO_T}$cf_cv_screen" >&6
5244 case $cf_cv_screen in
5247 echo "$as_me:5247: checking for extra include directories" >&5
5248 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
5249 if test "${cf_cv_curses_incdir+set}" = set; then
5250 echo $ECHO_N "(cached) $ECHO_C" >&6
5253 cf_cv_curses_incdir=no
5256 if test "x$cf_cv_screen" = "xcurses_colr"
5258 test -d /usr/include/curses_colr && \
5259 cf_cv_curses_incdir="-I/usr/include/curses_colr"
5263 if test "x$cf_cv_screen" = "xcurses_5lib"
5265 test -d /usr/5lib && \
5266 test -d /usr/5include && \
5267 cf_cv_curses_incdir="-I/usr/5include"
5273 echo "$as_me:5273: result: $cf_cv_curses_incdir" >&5
5274 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
5275 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
5277 echo "$as_me:5277: checking if we have identified curses headers" >&5
5278 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5279 if test "${cf_cv_ncurses_header+set}" = set; then
5280 echo $ECHO_N "(cached) $ECHO_C" >&6
5283 cf_cv_ncurses_header=none
5286 curses.h ncurses/ncurses.h ncurses/curses.h
5288 cat >conftest.$ac_ext <<_ACEOF
5289 #line 5289 "configure"
5290 #include "confdefs.h"
5291 #include <${cf_header}>
5295 initscr(); tgoto("?", 0,0)
5300 rm -f conftest.$ac_objext
5301 if { (eval echo "$as_me:5301: \"$ac_compile\"") >&5
5302 (eval $ac_compile) 2>&5
5304 echo "$as_me:5304: \$? = $ac_status" >&5
5305 (exit $ac_status); } &&
5306 { ac_try='test -s conftest.$ac_objext'
5307 { (eval echo "$as_me:5307: \"$ac_try\"") >&5
5310 echo "$as_me:5310: \$? = $ac_status" >&5
5311 (exit $ac_status); }; }; then
5312 cf_cv_ncurses_header=$cf_header; break
5314 echo "$as_me: failed program was:" >&5
5315 cat conftest.$ac_ext >&5
5317 rm -f conftest.$ac_objext conftest.$ac_ext
5321 echo "$as_me:5321: result: $cf_cv_ncurses_header" >&5
5322 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5324 if test "$cf_cv_ncurses_header" = none ; then
5325 { { echo "$as_me:5325: error: No curses header-files found" >&5
5326 echo "$as_me: error: No curses header-files found" >&2;}
5327 { (exit 1); exit 1; }; }
5330 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5332 for ac_header in $cf_cv_ncurses_header
5334 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5335 echo "$as_me:5335: checking for $ac_header" >&5
5336 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5337 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5338 echo $ECHO_N "(cached) $ECHO_C" >&6
5340 cat >conftest.$ac_ext <<_ACEOF
5341 #line 5341 "configure"
5342 #include "confdefs.h"
5343 #include <$ac_header>
5345 if { (eval echo "$as_me:5345: \"$ac_cpp conftest.$ac_ext\"") >&5
5346 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5348 egrep -v '^ *\+' conftest.er1 >conftest.err
5350 cat conftest.err >&5
5351 echo "$as_me:5351: \$? = $ac_status" >&5
5352 (exit $ac_status); } >/dev/null; then
5353 if test -s conftest.err; then
5354 ac_cpp_err=$ac_c_preproc_warn_flag
5361 if test -z "$ac_cpp_err"; then
5362 eval "$as_ac_Header=yes"
5364 echo "$as_me: failed program was:" >&5
5365 cat conftest.$ac_ext >&5
5366 eval "$as_ac_Header=no"
5368 rm -f conftest.err conftest.$ac_ext
5370 echo "$as_me:5370: result: `eval echo '${'$as_ac_Header'}'`" >&5
5371 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5372 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5373 cat >>confdefs.h <<EOF
5374 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5380 echo "$as_me:5380: checking for terminfo header" >&5
5381 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5382 if test "${cf_cv_term_header+set}" = set; then
5383 echo $ECHO_N "(cached) $ECHO_C" >&6
5386 case ${cf_cv_ncurses_header} in
5387 (*/ncurses.h|*/ncursesw.h)
5388 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5391 cf_term_header=term.h
5395 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5397 cat >conftest.$ac_ext <<_ACEOF
5398 #line 5398 "configure"
5399 #include "confdefs.h"
5401 #include <${cf_cv_ncurses_header:-curses.h}>
5407 int x = auto_left_margin
5412 rm -f conftest.$ac_objext
5413 if { (eval echo "$as_me:5413: \"$ac_compile\"") >&5
5414 (eval $ac_compile) 2>&5
5416 echo "$as_me:5416: \$? = $ac_status" >&5
5417 (exit $ac_status); } &&
5418 { ac_try='test -s conftest.$ac_objext'
5419 { (eval echo "$as_me:5419: \"$ac_try\"") >&5
5422 echo "$as_me:5422: \$? = $ac_status" >&5
5423 (exit $ac_status); }; }; then
5425 cf_cv_term_header="$cf_test"
5427 echo "$as_me: failed program was:" >&5
5428 cat conftest.$ac_ext >&5
5430 cf_cv_term_header=unknown
5433 rm -f conftest.$ac_objext conftest.$ac_ext
5434 test "$cf_cv_term_header" != unknown && break
5438 echo "$as_me:5438: result: $cf_cv_term_header" >&5
5439 echo "${ECHO_T}$cf_cv_term_header" >&6
5441 # Set definitions to allow ifdef'ing to accommodate subdirectories
5443 case $cf_cv_term_header in
5446 cat >>confdefs.h <<\EOF
5447 #define HAVE_TERM_H 1
5453 case $cf_cv_term_header in
5456 cat >>confdefs.h <<\EOF
5457 #define HAVE_NCURSES_TERM_H 1
5463 cat >>confdefs.h <<\EOF
5464 #define HAVE_NCURSESW_TERM_H 1
5470 echo "$as_me:5470: checking for ncurses version" >&5
5471 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5472 if test "${cf_cv_ncurses_version+set}" = set; then
5473 echo $ECHO_N "(cached) $ECHO_C" >&6
5476 cf_cv_ncurses_version=no
5479 if test "$cross_compiling" = yes; then
5481 # This will not work if the preprocessor splits the line after the
5482 # Autoconf token. The 'unproto' program does that.
5483 cat > conftest.$ac_ext <<EOF
5484 #include <${cf_cv_ncurses_header:-curses.h}>
5486 #ifdef NCURSES_VERSION
5487 Autoconf NCURSES_VERSION
5495 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5496 { (eval echo "$as_me:5496: \"$cf_try\"") >&5
5499 echo "$as_me:5499: \$? = $ac_status" >&5
5500 (exit $ac_status); }
5501 if test -f conftest.out ; then
5502 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5503 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5508 cat >conftest.$ac_ext <<_ACEOF
5509 #line 5509 "configure"
5510 #include "confdefs.h"
5512 #include <${cf_cv_ncurses_header:-curses.h}>
5516 FILE *fp = fopen("$cf_tempfile", "w");
5517 #ifdef NCURSES_VERSION
5518 # ifdef NCURSES_VERSION_PATCH
5519 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5521 fprintf(fp, "%s\n", NCURSES_VERSION);
5525 fprintf(fp, "old\n");
5530 ${cf_cv_main_return:-return}(0);
5533 rm -f conftest$ac_exeext
5534 if { (eval echo "$as_me:5534: \"$ac_link\"") >&5
5535 (eval $ac_link) 2>&5
5537 echo "$as_me:5537: \$? = $ac_status" >&5
5538 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5539 { (eval echo "$as_me:5539: \"$ac_try\"") >&5
5542 echo "$as_me:5542: \$? = $ac_status" >&5
5543 (exit $ac_status); }; }; then
5545 cf_cv_ncurses_version=`cat $cf_tempfile`
5547 echo "$as_me: program exited with status $ac_status" >&5
5548 echo "$as_me: failed program was:" >&5
5549 cat conftest.$ac_ext >&5
5551 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5556 echo "$as_me:5556: result: $cf_cv_ncurses_version" >&5
5557 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5558 test "$cf_cv_ncurses_version" = no ||
5559 cat >>confdefs.h <<\EOF
5563 echo "$as_me:5563: checking if we have identified curses libraries" >&5
5564 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
5565 cat >conftest.$ac_ext <<_ACEOF
5566 #line 5566 "configure"
5567 #include "confdefs.h"
5568 #include <${cf_cv_ncurses_header:-curses.h}>
5572 initscr(); tgoto("?", 0,0)
5577 rm -f conftest.$ac_objext conftest$ac_exeext
5578 if { (eval echo "$as_me:5578: \"$ac_link\"") >&5
5579 (eval $ac_link) 2>&5
5581 echo "$as_me:5581: \$? = $ac_status" >&5
5582 (exit $ac_status); } &&
5583 { ac_try='test -s conftest$ac_exeext'
5584 { (eval echo "$as_me:5584: \"$ac_try\"") >&5
5587 echo "$as_me:5587: \$? = $ac_status" >&5
5588 (exit $ac_status); }; }; then
5591 echo "$as_me: failed program was:" >&5
5592 cat conftest.$ac_ext >&5
5595 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5596 echo "$as_me:5596: result: $cf_result" >&5
5597 echo "${ECHO_T}$cf_result" >&6
5599 if test "$cf_result" = no ; then
5602 echo "$as_me:5602: checking for tgoto in -lmytinfo" >&5
5603 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5604 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5605 echo $ECHO_N "(cached) $ECHO_C" >&6
5607 ac_check_lib_save_LIBS=$LIBS
5608 LIBS="-lmytinfo $LIBS"
5609 cat >conftest.$ac_ext <<_ACEOF
5610 #line 5610 "configure"
5611 #include "confdefs.h"
5613 /* Override any gcc2 internal prototype to avoid an error. */
5617 /* We use char because int might match the return type of a gcc2
5618 builtin and then its argument prototype would still apply. */
5628 rm -f conftest.$ac_objext conftest$ac_exeext
5629 if { (eval echo "$as_me:5629: \"$ac_link\"") >&5
5630 (eval $ac_link) 2>&5
5632 echo "$as_me:5632: \$? = $ac_status" >&5
5633 (exit $ac_status); } &&
5634 { ac_try='test -s conftest$ac_exeext'
5635 { (eval echo "$as_me:5635: \"$ac_try\"") >&5
5638 echo "$as_me:5638: \$? = $ac_status" >&5
5639 (exit $ac_status); }; }; then
5640 ac_cv_lib_mytinfo_tgoto=yes
5642 echo "$as_me: failed program was:" >&5
5643 cat conftest.$ac_ext >&5
5644 ac_cv_lib_mytinfo_tgoto=no
5646 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5647 LIBS=$ac_check_lib_save_LIBS
5649 echo "$as_me:5649: result: $ac_cv_lib_mytinfo_tgoto" >&5
5650 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5651 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5653 cf_add_libs="-lmytinfo"
5654 # Filter out duplicates - this happens with badly-designed ".pc" files...
5655 for cf_add_1lib in $LIBS
5657 for cf_add_2lib in $cf_add_libs
5659 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5665 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5673 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
5674 # next (1998), and xcurses "newer" (2000). There is no header file for
5675 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
5676 # term.h) for cur_colr
5677 if test "x$cf_cv_screen" = "xcurses_colr"
5679 echo "$as_me:5679: checking for initscr in -lcur_colr" >&5
5680 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
5681 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
5682 echo $ECHO_N "(cached) $ECHO_C" >&6
5684 ac_check_lib_save_LIBS=$LIBS
5685 LIBS="-lcur_colr $LIBS"
5686 cat >conftest.$ac_ext <<_ACEOF
5687 #line 5687 "configure"
5688 #include "confdefs.h"
5690 /* Override any gcc2 internal prototype to avoid an error. */
5694 /* We use char because int might match the return type of a gcc2
5695 builtin and then its argument prototype would still apply. */
5705 rm -f conftest.$ac_objext conftest$ac_exeext
5706 if { (eval echo "$as_me:5706: \"$ac_link\"") >&5
5707 (eval $ac_link) 2>&5
5709 echo "$as_me:5709: \$? = $ac_status" >&5
5710 (exit $ac_status); } &&
5711 { ac_try='test -s conftest$ac_exeext'
5712 { (eval echo "$as_me:5712: \"$ac_try\"") >&5
5715 echo "$as_me:5715: \$? = $ac_status" >&5
5716 (exit $ac_status); }; }; then
5717 ac_cv_lib_cur_colr_initscr=yes
5719 echo "$as_me: failed program was:" >&5
5720 cat conftest.$ac_ext >&5
5721 ac_cv_lib_cur_colr_initscr=no
5723 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5724 LIBS=$ac_check_lib_save_LIBS
5726 echo "$as_me:5726: result: $ac_cv_lib_cur_colr_initscr" >&5
5727 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
5728 if test $ac_cv_lib_cur_colr_initscr = yes; then
5730 cf_add_libs="-lcur_colr"
5731 # Filter out duplicates - this happens with badly-designed ".pc" files...
5732 for cf_add_1lib in $LIBS
5734 for cf_add_2lib in $cf_add_libs
5736 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5742 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5746 ac_cv_func_initscr=yes
5750 echo "$as_me:5750: checking for initscr in -lHcurses" >&5
5751 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
5752 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
5753 echo $ECHO_N "(cached) $ECHO_C" >&6
5755 ac_check_lib_save_LIBS=$LIBS
5756 LIBS="-lHcurses $LIBS"
5757 cat >conftest.$ac_ext <<_ACEOF
5758 #line 5758 "configure"
5759 #include "confdefs.h"
5761 /* Override any gcc2 internal prototype to avoid an error. */
5765 /* We use char because int might match the return type of a gcc2
5766 builtin and then its argument prototype would still apply. */
5776 rm -f conftest.$ac_objext conftest$ac_exeext
5777 if { (eval echo "$as_me:5777: \"$ac_link\"") >&5
5778 (eval $ac_link) 2>&5
5780 echo "$as_me:5780: \$? = $ac_status" >&5
5781 (exit $ac_status); } &&
5782 { ac_try='test -s conftest$ac_exeext'
5783 { (eval echo "$as_me:5783: \"$ac_try\"") >&5
5786 echo "$as_me:5786: \$? = $ac_status" >&5
5787 (exit $ac_status); }; }; then
5788 ac_cv_lib_Hcurses_initscr=yes
5790 echo "$as_me: failed program was:" >&5
5791 cat conftest.$ac_ext >&5
5792 ac_cv_lib_Hcurses_initscr=no
5794 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5795 LIBS=$ac_check_lib_save_LIBS
5797 echo "$as_me:5797: result: $ac_cv_lib_Hcurses_initscr" >&5
5798 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
5799 if test $ac_cv_lib_Hcurses_initscr = yes; then
5801 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
5803 cf_add_libs="-lHcurses"
5804 # Filter out duplicates - this happens with badly-designed ".pc" files...
5805 for cf_add_1lib in $LIBS
5807 for cf_add_2lib in $cf_add_libs
5809 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5815 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5819 CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
5820 ac_cv_func_initscr=yes
5829 case `arch 2>/dev/null` in
5834 if test -n "/lib64" ; then
5835 for cf_add_libdir in /lib64
5837 if test $cf_add_libdir = /usr/lib ; then
5839 elif test -d $cf_add_libdir
5842 if test -n "$LDFLAGS$LIBS" ; then
5843 # a loop is needed to ensure we can add subdirs of existing dirs
5844 for cf_test_libdir in $LDFLAGS $LIBS ; do
5845 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5846 cf_have_libdir=yes; break
5850 if test "$cf_have_libdir" = no ; then
5851 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5853 echo "${as_me:-configure}:5853: testing adding $cf_add_libdir to library-path ..." 1>&5
5855 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5863 if test -n "/lib" ; then
5864 for cf_add_libdir in /lib
5866 if test $cf_add_libdir = /usr/lib ; then
5868 elif test -d $cf_add_libdir
5871 if test -n "$LDFLAGS$LIBS" ; then
5872 # a loop is needed to ensure we can add subdirs of existing dirs
5873 for cf_test_libdir in $LDFLAGS $LIBS ; do
5874 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5875 cf_have_libdir=yes; break
5879 if test "$cf_have_libdir" = no ; then
5880 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5882 echo "${as_me:-configure}:5882: testing adding $cf_add_libdir to library-path ..." 1>&5
5884 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5894 if test -n "/lib" ; then
5895 for cf_add_libdir in /lib
5897 if test $cf_add_libdir = /usr/lib ; then
5899 elif test -d $cf_add_libdir
5902 if test -n "$LDFLAGS$LIBS" ; then
5903 # a loop is needed to ensure we can add subdirs of existing dirs
5904 for cf_test_libdir in $LDFLAGS $LIBS ; do
5905 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5906 cf_have_libdir=yes; break
5910 if test "$cf_have_libdir" = no ; then
5911 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5913 echo "${as_me:-configure}:5913: testing adding $cf_add_libdir to library-path ..." 1>&5
5915 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5925 if test "x$cf_cv_screen" = "xcurses_5lib"
5927 if test -d /usr/5lib ; then
5929 if test -n "/usr/5lib" ; then
5930 for cf_add_libdir in /usr/5lib
5932 if test $cf_add_libdir = /usr/lib ; then
5934 elif test -d $cf_add_libdir
5937 if test -n "$LDFLAGS$LIBS" ; then
5938 # a loop is needed to ensure we can add subdirs of existing dirs
5939 for cf_test_libdir in $LDFLAGS $LIBS ; do
5940 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5941 cf_have_libdir=yes; break
5945 if test "$cf_have_libdir" = no ; then
5946 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5948 echo "${as_me:-configure}:5948: testing adding $cf_add_libdir to library-path ..." 1>&5
5950 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5956 cf_add_libs="-lcurses -ltermcap"
5957 # Filter out duplicates - this happens with badly-designed ".pc" files...
5958 for cf_add_1lib in $LIBS
5960 for cf_add_2lib in $cf_add_libs
5962 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5968 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5974 ac_cv_func_initscr=yes
5978 if test ".$ac_cv_func_initscr" != .yes ; then
5979 cf_save_LIBS="$LIBS"
5981 if test ".${cf_cv_ncurses_version:-no}" != .no
5983 cf_check_list="ncurses curses cursesX"
5985 cf_check_list="cursesX curses ncurses"
5988 # Check for library containing tgoto. Do this before curses library
5989 # because it may be needed to link the test-case for initscr.
5990 if test "x$cf_term_lib" = x
5992 echo "$as_me:5992: checking for tgoto" >&5
5993 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
5994 if test "${ac_cv_func_tgoto+set}" = set; then
5995 echo $ECHO_N "(cached) $ECHO_C" >&6
5997 cat >conftest.$ac_ext <<_ACEOF
5998 #line 5998 "configure"
5999 #include "confdefs.h"
6000 /* System header to define __stub macros and hopefully few prototypes,
6001 which can conflict with char tgoto (); below. */
6003 /* Override any gcc2 internal prototype to avoid an error. */
6007 /* We use char because int might match the return type of a gcc2
6008 builtin and then its argument prototype would still apply. */
6015 /* The GNU C library defines this for functions which it implements
6016 to always fail with ENOSYS. Some functions are actually named
6017 something starting with __ and the normal name is an alias. */
6018 #if defined (__stub_tgoto) || defined (__stub___tgoto)
6021 f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6028 rm -f conftest.$ac_objext conftest$ac_exeext
6029 if { (eval echo "$as_me:6029: \"$ac_link\"") >&5
6030 (eval $ac_link) 2>&5
6032 echo "$as_me:6032: \$? = $ac_status" >&5
6033 (exit $ac_status); } &&
6034 { ac_try='test -s conftest$ac_exeext'
6035 { (eval echo "$as_me:6035: \"$ac_try\"") >&5
6038 echo "$as_me:6038: \$? = $ac_status" >&5
6039 (exit $ac_status); }; }; then
6040 ac_cv_func_tgoto=yes
6042 echo "$as_me: failed program was:" >&5
6043 cat conftest.$ac_ext >&5
6046 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6048 echo "$as_me:6048: result: $ac_cv_func_tgoto" >&5
6049 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
6050 if test $ac_cv_func_tgoto = yes; then
6051 cf_term_lib=predefined
6054 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
6056 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
6057 echo "$as_me:6057: checking for tgoto in -l$cf_term_lib" >&5
6058 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
6059 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
6060 echo $ECHO_N "(cached) $ECHO_C" >&6
6062 ac_check_lib_save_LIBS=$LIBS
6063 LIBS="-l$cf_term_lib $LIBS"
6064 cat >conftest.$ac_ext <<_ACEOF
6065 #line 6065 "configure"
6066 #include "confdefs.h"
6068 /* Override any gcc2 internal prototype to avoid an error. */
6072 /* We use char because int might match the return type of a gcc2
6073 builtin and then its argument prototype would still apply. */
6083 rm -f conftest.$ac_objext conftest$ac_exeext
6084 if { (eval echo "$as_me:6084: \"$ac_link\"") >&5
6085 (eval $ac_link) 2>&5
6087 echo "$as_me:6087: \$? = $ac_status" >&5
6088 (exit $ac_status); } &&
6089 { ac_try='test -s conftest$ac_exeext'
6090 { (eval echo "$as_me:6090: \"$ac_try\"") >&5
6093 echo "$as_me:6093: \$? = $ac_status" >&5
6094 (exit $ac_status); }; }; then
6095 eval "$as_ac_Lib=yes"
6097 echo "$as_me: failed program was:" >&5
6098 cat conftest.$ac_ext >&5
6099 eval "$as_ac_Lib=no"
6101 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6102 LIBS=$ac_check_lib_save_LIBS
6104 echo "$as_me:6104: result: `eval echo '${'$as_ac_Lib'}'`" >&5
6105 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
6106 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
6108 : ${cf_nculib_root:=$cf_term_lib}
6119 # Check for library containing initscr
6120 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
6121 if test "x$cf_curs_lib" = x
6123 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
6125 LIBS="-l$cf_curs_lib $cf_save_LIBS"
6126 if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
6127 echo "$as_me:6127: checking if we can link with $cf_curs_lib library" >&5
6128 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
6129 cat >conftest.$ac_ext <<_ACEOF
6130 #line 6130 "configure"
6131 #include "confdefs.h"
6132 #include <${cf_cv_ncurses_header:-curses.h}>
6141 rm -f conftest.$ac_objext conftest$ac_exeext
6142 if { (eval echo "$as_me:6142: \"$ac_link\"") >&5
6143 (eval $ac_link) 2>&5
6145 echo "$as_me:6145: \$? = $ac_status" >&5
6146 (exit $ac_status); } &&
6147 { ac_try='test -s conftest$ac_exeext'
6148 { (eval echo "$as_me:6148: \"$ac_try\"") >&5
6151 echo "$as_me:6151: \$? = $ac_status" >&5
6152 (exit $ac_status); }; }; then
6155 echo "$as_me: failed program was:" >&5
6156 cat conftest.$ac_ext >&5
6159 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6160 echo "$as_me:6160: result: $cf_result" >&5
6161 echo "${ECHO_T}$cf_result" >&6
6162 test $cf_result = yes && break
6163 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
6165 elif test "$cf_term_lib" != predefined ; then
6166 echo "$as_me:6166: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
6167 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
6168 cat >conftest.$ac_ext <<_ACEOF
6169 #line 6169 "configure"
6170 #include "confdefs.h"
6171 #include <${cf_cv_ncurses_header:-curses.h}>
6175 initscr(); tgoto((char *)0, 0, 0);
6180 rm -f conftest.$ac_objext conftest$ac_exeext
6181 if { (eval echo "$as_me:6181: \"$ac_link\"") >&5
6182 (eval $ac_link) 2>&5
6184 echo "$as_me:6184: \$? = $ac_status" >&5
6185 (exit $ac_status); } &&
6186 { ac_try='test -s conftest$ac_exeext'
6187 { (eval echo "$as_me:6187: \"$ac_try\"") >&5
6190 echo "$as_me:6190: \$? = $ac_status" >&5
6191 (exit $ac_status); }; }; then
6194 echo "$as_me: failed program was:" >&5
6195 cat conftest.$ac_ext >&5
6197 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
6198 cat >conftest.$ac_ext <<_ACEOF
6199 #line 6199 "configure"
6200 #include "confdefs.h"
6201 #include <${cf_cv_ncurses_header:-curses.h}>
6210 rm -f conftest.$ac_objext conftest$ac_exeext
6211 if { (eval echo "$as_me:6211: \"$ac_link\"") >&5
6212 (eval $ac_link) 2>&5
6214 echo "$as_me:6214: \$? = $ac_status" >&5
6215 (exit $ac_status); } &&
6216 { ac_try='test -s conftest$ac_exeext'
6217 { (eval echo "$as_me:6217: \"$ac_try\"") >&5
6220 echo "$as_me:6220: \$? = $ac_status" >&5
6221 (exit $ac_status); }; }; then
6224 echo "$as_me: failed program was:" >&5
6225 cat conftest.$ac_ext >&5
6228 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6231 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6232 echo "$as_me:6232: result: $cf_result" >&5
6233 echo "${ECHO_T}$cf_result" >&6
6234 test $cf_result != error && break
6238 test $cf_curs_lib = unknown && { { echo "$as_me:6238: error: no curses library found" >&5
6239 echo "$as_me: error: no curses library found" >&2;}
6240 { (exit 1); exit 1; }; }
6247 echo "$as_me:6247: checking for multibyte character support" >&5
6248 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6249 if test "${cf_cv_utf8_lib+set}" = set; then
6250 echo $ECHO_N "(cached) $ECHO_C" >&6
6253 cf_save_LIBS="$LIBS"
6254 cat >conftest.$ac_ext <<_ACEOF
6255 #line 6255 "configure"
6256 #include "confdefs.h"
6267 rm -f conftest.$ac_objext conftest$ac_exeext
6268 if { (eval echo "$as_me:6268: \"$ac_link\"") >&5
6269 (eval $ac_link) 2>&5
6271 echo "$as_me:6271: \$? = $ac_status" >&5
6272 (exit $ac_status); } &&
6273 { ac_try='test -s conftest$ac_exeext'
6274 { (eval echo "$as_me:6274: \"$ac_try\"") >&5
6277 echo "$as_me:6277: \$? = $ac_status" >&5
6278 (exit $ac_status); }; }; then
6281 echo "$as_me: failed program was:" >&5
6282 cat conftest.$ac_ext >&5
6284 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6285 # will be set on completion of the AC_TRY_LINK below.
6286 cf_cv_header_path_utf8=
6287 cf_cv_library_path_utf8=
6289 echo "${as_me:-configure}:6289: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6291 cf_save_LIBS="$LIBS"
6293 cat >conftest.$ac_ext <<_ACEOF
6294 #line 6294 "configure"
6295 #include "confdefs.h"
6297 #include <libutf8.h>
6306 rm -f conftest.$ac_objext conftest$ac_exeext
6307 if { (eval echo "$as_me:6307: \"$ac_link\"") >&5
6308 (eval $ac_link) 2>&5
6310 echo "$as_me:6310: \$? = $ac_status" >&5
6311 (exit $ac_status); } &&
6312 { ac_try='test -s conftest$ac_exeext'
6313 { (eval echo "$as_me:6313: \"$ac_try\"") >&5
6316 echo "$as_me:6316: \$? = $ac_status" >&5
6317 (exit $ac_status); }; }; then
6319 cf_cv_find_linkage_utf8=yes
6320 cf_cv_header_path_utf8=/usr/include
6321 cf_cv_library_path_utf8=/usr/lib
6324 echo "$as_me: failed program was:" >&5
6325 cat conftest.$ac_ext >&5
6327 LIBS="-lutf8 $cf_save_LIBS"
6329 cat >conftest.$ac_ext <<_ACEOF
6330 #line 6330 "configure"
6331 #include "confdefs.h"
6333 #include <libutf8.h>
6342 rm -f conftest.$ac_objext conftest$ac_exeext
6343 if { (eval echo "$as_me:6343: \"$ac_link\"") >&5
6344 (eval $ac_link) 2>&5
6346 echo "$as_me:6346: \$? = $ac_status" >&5
6347 (exit $ac_status); } &&
6348 { ac_try='test -s conftest$ac_exeext'
6349 { (eval echo "$as_me:6349: \"$ac_try\"") >&5
6352 echo "$as_me:6352: \$? = $ac_status" >&5
6353 (exit $ac_status); }; }; then
6355 cf_cv_find_linkage_utf8=yes
6356 cf_cv_header_path_utf8=/usr/include
6357 cf_cv_library_path_utf8=/usr/lib
6358 cf_cv_library_file_utf8="-lutf8"
6361 echo "$as_me: failed program was:" >&5
6362 cat conftest.$ac_ext >&5
6364 cf_cv_find_linkage_utf8=no
6365 LIBS="$cf_save_LIBS"
6367 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6369 echo "${as_me:-configure}:6369: testing find linkage for utf8 library ..." 1>&5
6371 echo "${as_me:-configure}:6371: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6373 cf_save_CPPFLAGS="$CPPFLAGS"
6374 cf_test_CPPFLAGS="$CPPFLAGS"
6378 # collect the current set of include-directories from compiler flags
6379 cf_header_path_list=""
6380 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6381 for cf_header_path in $CPPFLAGS $CFLAGS
6383 case $cf_header_path in
6385 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6387 test "x$cf_header_path" != "xNONE" && \
6388 test -d "$cf_header_path" && \
6390 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6391 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6392 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
6393 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
6394 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
6395 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6398 cf_header_path_list="$cf_header_path_list $cf_search"
6404 # add the variations for the package we are looking for
6408 test "x$prefix" != "xNONE" && \
6409 test -d "$prefix" && \
6411 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6412 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6413 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
6414 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
6415 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
6416 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
6419 for cf_subdir_prefix in \
6428 test "x$cf_subdir_prefix" != "x$prefix" && \
6429 test -d "$cf_subdir_prefix" && \
6430 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6431 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6432 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6433 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6434 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6435 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6436 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6441 test "$includedir" != NONE && \
6442 test "$includedir" != "/usr/include" && \
6443 test -d "$includedir" && {
6444 test -d $includedir && cf_search="$cf_search $includedir"
6445 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
6448 test "$oldincludedir" != NONE && \
6449 test "$oldincludedir" != "/usr/include" && \
6450 test -d "$oldincludedir" && {
6451 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6452 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
6455 cf_search="$cf_search $cf_header_path_list"
6457 for cf_cv_header_path_utf8 in $cf_search
6459 if test -d $cf_cv_header_path_utf8 ; then
6460 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6462 echo "${as_me:-configure}:6462: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6464 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
6465 cat >conftest.$ac_ext <<_ACEOF
6466 #line 6466 "configure"
6467 #include "confdefs.h"
6469 #include <libutf8.h>
6478 rm -f conftest.$ac_objext
6479 if { (eval echo "$as_me:6479: \"$ac_compile\"") >&5
6480 (eval $ac_compile) 2>&5
6482 echo "$as_me:6482: \$? = $ac_status" >&5
6483 (exit $ac_status); } &&
6484 { ac_try='test -s conftest.$ac_objext'
6485 { (eval echo "$as_me:6485: \"$ac_try\"") >&5
6488 echo "$as_me:6488: \$? = $ac_status" >&5
6489 (exit $ac_status); }; }; then
6491 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6493 echo "${as_me:-configure}:6493: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6495 cf_cv_find_linkage_utf8=maybe
6496 cf_test_CPPFLAGS="$CPPFLAGS"
6499 echo "$as_me: failed program was:" >&5
6500 cat conftest.$ac_ext >&5
6502 CPPFLAGS="$cf_save_CPPFLAGS"
6505 rm -f conftest.$ac_objext conftest.$ac_ext
6509 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6511 echo "${as_me:-configure}:6511: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6513 cf_save_LIBS="$LIBS"
6514 cf_save_LDFLAGS="$LDFLAGS"
6516 if test "$cf_cv_find_linkage_utf8" != yes ; then
6519 cf_library_path_list=""
6520 if test -n "${LDFLAGS}${LIBS}" ; then
6521 for cf_library_path in $LDFLAGS $LIBS
6523 case $cf_library_path in
6525 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6527 test "x$cf_library_path" != "xNONE" && \
6528 test -d "$cf_library_path" && \
6530 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6531 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6532 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
6533 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6534 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
6535 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6538 cf_library_path_list="$cf_library_path_list $cf_search"
6546 test "x$prefix" != "xNONE" && \
6547 test -d "$prefix" && \
6549 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6550 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6551 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
6552 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
6553 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
6554 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
6557 for cf_subdir_prefix in \
6566 test "x$cf_subdir_prefix" != "x$prefix" && \
6567 test -d "$cf_subdir_prefix" && \
6568 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6569 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6570 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
6571 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6572 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6573 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6574 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6579 cf_search="$cf_library_path_list $cf_search"
6581 for cf_cv_library_path_utf8 in $cf_search
6583 if test -d $cf_cv_library_path_utf8 ; then
6584 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6586 echo "${as_me:-configure}:6586: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6588 CPPFLAGS="$cf_test_CPPFLAGS"
6589 LIBS="-lutf8 $cf_save_LIBS"
6590 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6591 cat >conftest.$ac_ext <<_ACEOF
6592 #line 6592 "configure"
6593 #include "confdefs.h"
6595 #include <libutf8.h>
6604 rm -f conftest.$ac_objext conftest$ac_exeext
6605 if { (eval echo "$as_me:6605: \"$ac_link\"") >&5
6606 (eval $ac_link) 2>&5
6608 echo "$as_me:6608: \$? = $ac_status" >&5
6609 (exit $ac_status); } &&
6610 { ac_try='test -s conftest$ac_exeext'
6611 { (eval echo "$as_me:6611: \"$ac_try\"") >&5
6614 echo "$as_me:6614: \$? = $ac_status" >&5
6615 (exit $ac_status); }; }; then
6617 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
6619 echo "${as_me:-configure}:6619: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
6621 cf_cv_find_linkage_utf8=yes
6622 cf_cv_library_file_utf8="-lutf8"
6625 echo "$as_me: failed program was:" >&5
6626 cat conftest.$ac_ext >&5
6628 CPPFLAGS="$cf_save_CPPFLAGS"
6629 LIBS="$cf_save_LIBS"
6630 LDFLAGS="$cf_save_LDFLAGS"
6633 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6636 CPPFLAGS="$cf_save_CPPFLAGS"
6637 LDFLAGS="$cf_save_LDFLAGS"
6641 cf_cv_find_linkage_utf8=no
6645 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6648 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6650 LIBS="$cf_save_LIBS"
6652 if test "$cf_cv_find_linkage_utf8" = yes ; then
6653 cf_cv_utf8_lib=add-on
6659 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6661 echo "$as_me:6661: result: $cf_cv_utf8_lib" >&5
6662 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
6664 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
6666 if test "$cf_cv_utf8_lib" = "add-on" ; then
6668 cat >>confdefs.h <<\EOF
6669 #define HAVE_LIBUTF8_H 1
6672 if test -n "$cf_cv_header_path_utf8" ; then
6673 for cf_add_incdir in $cf_cv_header_path_utf8
6675 while test $cf_add_incdir != /usr/include
6677 if test -d $cf_add_incdir
6680 if test -n "$CFLAGS$CPPFLAGS" ; then
6681 # a loop is needed to ensure we can add subdirs of existing dirs
6682 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6683 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6684 cf_have_incdir=yes; break
6689 if test "$cf_have_incdir" = no ; then
6690 if test "$cf_add_incdir" = /usr/local/include ; then
6691 if test "$GCC" = yes
6693 cf_save_CPPFLAGS=$CPPFLAGS
6694 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6695 cat >conftest.$ac_ext <<_ACEOF
6696 #line 6696 "configure"
6697 #include "confdefs.h"
6707 rm -f conftest.$ac_objext
6708 if { (eval echo "$as_me:6708: \"$ac_compile\"") >&5
6709 (eval $ac_compile) 2>&5
6711 echo "$as_me:6711: \$? = $ac_status" >&5
6712 (exit $ac_status); } &&
6713 { ac_try='test -s conftest.$ac_objext'
6714 { (eval echo "$as_me:6714: \"$ac_try\"") >&5
6717 echo "$as_me:6717: \$? = $ac_status" >&5
6718 (exit $ac_status); }; }; then
6721 echo "$as_me: failed program was:" >&5
6722 cat conftest.$ac_ext >&5
6725 rm -f conftest.$ac_objext conftest.$ac_ext
6726 CPPFLAGS=$cf_save_CPPFLAGS
6731 if test "$cf_have_incdir" = no ; then
6732 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6734 echo "${as_me:-configure}:6734: testing adding $cf_add_incdir to include-path ..." 1>&5
6736 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6738 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6739 test "$cf_top_incdir" = "$cf_add_incdir" && break
6740 cf_add_incdir="$cf_top_incdir"
6751 if test -n "$cf_cv_library_path_utf8" ; then
6752 for cf_add_libdir in $cf_cv_library_path_utf8
6754 if test $cf_add_libdir = /usr/lib ; then
6756 elif test -d $cf_add_libdir
6759 if test -n "$LDFLAGS$LIBS" ; then
6760 # a loop is needed to ensure we can add subdirs of existing dirs
6761 for cf_test_libdir in $LDFLAGS $LIBS ; do
6762 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6763 cf_have_libdir=yes; break
6767 if test "$cf_have_libdir" = no ; then
6768 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6770 echo "${as_me:-configure}:6770: testing adding $cf_add_libdir to library-path ..." 1>&5
6772 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6778 cf_add_libs="$cf_cv_library_file_utf8"
6779 # Filter out duplicates - this happens with badly-designed ".pc" files...
6780 for cf_add_1lib in $LIBS
6782 for cf_add_2lib in $cf_add_libs
6784 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6790 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6796 cf_ncuconfig_root=$cf_cv_screen
6797 cf_have_ncuconfig=no
6799 if test "x${PKG_CONFIG:=none}" != xnone; then
6800 echo "$as_me:6800: checking pkg-config for $cf_ncuconfig_root" >&5
6801 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
6802 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
6803 echo "$as_me:6803: result: yes" >&5
6804 echo "${ECHO_T}yes" >&6
6806 echo "$as_me:6806: checking if the $cf_ncuconfig_root package files work" >&5
6807 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
6808 cf_have_ncuconfig=unknown
6810 cf_save_CPPFLAGS="$CPPFLAGS"
6811 cf_save_LIBS="$LIBS"
6813 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
6815 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
6816 # Filter out duplicates - this happens with badly-designed ".pc" files...
6817 for cf_add_1lib in $LIBS
6819 for cf_add_2lib in $cf_add_libs
6821 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6827 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6831 cat >conftest.$ac_ext <<_ACEOF
6832 #line 6832 "configure"
6833 #include "confdefs.h"
6834 #include <${cf_cv_ncurses_header:-curses.h}>
6838 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6843 rm -f conftest.$ac_objext conftest$ac_exeext
6844 if { (eval echo "$as_me:6844: \"$ac_link\"") >&5
6845 (eval $ac_link) 2>&5
6847 echo "$as_me:6847: \$? = $ac_status" >&5
6848 (exit $ac_status); } &&
6849 { ac_try='test -s conftest$ac_exeext'
6850 { (eval echo "$as_me:6850: \"$ac_try\"") >&5
6853 echo "$as_me:6853: \$? = $ac_status" >&5
6854 (exit $ac_status); }; }; then
6855 if test "$cross_compiling" = yes; then
6856 cf_have_ncuconfig=maybe
6858 cat >conftest.$ac_ext <<_ACEOF
6859 #line 6859 "configure"
6860 #include "confdefs.h"
6861 #include <${cf_cv_ncurses_header:-curses.h}>
6863 { char *xx = curses_version(); return (xx == 0); }
6865 rm -f conftest$ac_exeext
6866 if { (eval echo "$as_me:6866: \"$ac_link\"") >&5
6867 (eval $ac_link) 2>&5
6869 echo "$as_me:6869: \$? = $ac_status" >&5
6870 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6871 { (eval echo "$as_me:6871: \"$ac_try\"") >&5
6874 echo "$as_me:6874: \$? = $ac_status" >&5
6875 (exit $ac_status); }; }; then
6876 cf_have_ncuconfig=yes
6878 echo "$as_me: program exited with status $ac_status" >&5
6879 echo "$as_me: failed program was:" >&5
6880 cat conftest.$ac_ext >&5
6881 cf_have_ncuconfig=no
6883 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6886 echo "$as_me: failed program was:" >&5
6887 cat conftest.$ac_ext >&5
6888 cf_have_ncuconfig=no
6890 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6891 echo "$as_me:6891: result: $cf_have_ncuconfig" >&5
6892 echo "${ECHO_T}$cf_have_ncuconfig" >&6
6893 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
6894 if test "$cf_have_ncuconfig" != "yes"
6896 CPPFLAGS="$cf_save_CPPFLAGS"
6897 LIBS="$cf_save_LIBS"
6898 NCURSES_CONFIG_PKG=none
6901 cat >>confdefs.h <<\EOF
6905 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
6907 echo "$as_me:6907: checking for terminfo header" >&5
6908 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6909 if test "${cf_cv_term_header+set}" = set; then
6910 echo $ECHO_N "(cached) $ECHO_C" >&6
6913 case ${cf_cv_ncurses_header} in
6914 (*/ncurses.h|*/ncursesw.h)
6915 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6918 cf_term_header=term.h
6922 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6924 cat >conftest.$ac_ext <<_ACEOF
6925 #line 6925 "configure"
6926 #include "confdefs.h"
6928 #include <${cf_cv_ncurses_header:-curses.h}>
6934 int x = auto_left_margin
6939 rm -f conftest.$ac_objext
6940 if { (eval echo "$as_me:6940: \"$ac_compile\"") >&5
6941 (eval $ac_compile) 2>&5
6943 echo "$as_me:6943: \$? = $ac_status" >&5
6944 (exit $ac_status); } &&
6945 { ac_try='test -s conftest.$ac_objext'
6946 { (eval echo "$as_me:6946: \"$ac_try\"") >&5
6949 echo "$as_me:6949: \$? = $ac_status" >&5
6950 (exit $ac_status); }; }; then
6952 cf_cv_term_header="$cf_test"
6954 echo "$as_me: failed program was:" >&5
6955 cat conftest.$ac_ext >&5
6957 cf_cv_term_header=unknown
6960 rm -f conftest.$ac_objext conftest.$ac_ext
6961 test "$cf_cv_term_header" != unknown && break
6965 echo "$as_me:6965: result: $cf_cv_term_header" >&5
6966 echo "${ECHO_T}$cf_cv_term_header" >&6
6968 # Set definitions to allow ifdef'ing to accommodate subdirectories
6970 case $cf_cv_term_header in
6973 cat >>confdefs.h <<\EOF
6974 #define HAVE_TERM_H 1
6980 case $cf_cv_term_header in
6983 cat >>confdefs.h <<\EOF
6984 #define HAVE_NCURSES_TERM_H 1
6990 cat >>confdefs.h <<\EOF
6991 #define HAVE_NCURSESW_TERM_H 1
7000 echo "$as_me:7000: result: no" >&5
7001 echo "${ECHO_T}no" >&6
7002 NCURSES_CONFIG_PKG=none
7005 NCURSES_CONFIG_PKG=none
7008 if test "x$cf_have_ncuconfig" = "xno"; then
7009 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7011 if test -n "$ac_tool_prefix"; then
7012 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7014 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7015 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7016 echo "$as_me:7016: checking for $ac_word" >&5
7017 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7018 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7019 echo $ECHO_N "(cached) $ECHO_C" >&6
7021 if test -n "$NCURSES_CONFIG"; then
7022 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7024 ac_save_IFS=$IFS; IFS=$ac_path_separator
7026 for ac_dir in $ac_dummy; do
7028 test -z "$ac_dir" && ac_dir=.
7029 $as_executable_p "$ac_dir/$ac_word" || continue
7030 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7031 echo "$as_me:7031: found $ac_dir/$ac_word" >&5
7037 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7038 if test -n "$NCURSES_CONFIG"; then
7039 echo "$as_me:7039: result: $NCURSES_CONFIG" >&5
7040 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7042 echo "$as_me:7042: result: no" >&5
7043 echo "${ECHO_T}no" >&6
7046 test -n "$NCURSES_CONFIG" && break
7049 if test -z "$NCURSES_CONFIG"; then
7050 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7051 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7053 # Extract the first word of "$ac_prog", so it can be a program name with args.
7054 set dummy $ac_prog; ac_word=$2
7055 echo "$as_me:7055: checking for $ac_word" >&5
7056 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7057 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7058 echo $ECHO_N "(cached) $ECHO_C" >&6
7060 if test -n "$ac_ct_NCURSES_CONFIG"; then
7061 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7063 ac_save_IFS=$IFS; IFS=$ac_path_separator
7065 for ac_dir in $ac_dummy; do
7067 test -z "$ac_dir" && ac_dir=.
7068 $as_executable_p "$ac_dir/$ac_word" || continue
7069 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7070 echo "$as_me:7070: found $ac_dir/$ac_word" >&5
7076 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7077 if test -n "$ac_ct_NCURSES_CONFIG"; then
7078 echo "$as_me:7078: result: $ac_ct_NCURSES_CONFIG" >&5
7079 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7081 echo "$as_me:7081: result: no" >&5
7082 echo "${ECHO_T}no" >&6
7085 test -n "$ac_ct_NCURSES_CONFIG" && break
7087 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7089 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7092 if test "$NCURSES_CONFIG" != none ; then
7094 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
7096 cf_add_libs="`$NCURSES_CONFIG --libs`"
7097 # Filter out duplicates - this happens with badly-designed ".pc" files...
7098 for cf_add_1lib in $LIBS
7100 for cf_add_2lib in $cf_add_libs
7102 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7108 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7112 # even with config script, some packages use no-override for curses.h
7114 echo "$as_me:7114: checking if we have identified curses headers" >&5
7115 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7116 if test "${cf_cv_ncurses_header+set}" = set; then
7117 echo $ECHO_N "(cached) $ECHO_C" >&6
7120 cf_cv_ncurses_header=none
7122 ncurses.h $cf_cv_screen/ncurses.h \
7123 curses.h $cf_cv_screen/curses.h
7125 cat >conftest.$ac_ext <<_ACEOF
7126 #line 7126 "configure"
7127 #include "confdefs.h"
7128 #include <${cf_header}>
7132 initscr(); tgoto("?", 0,0)
7137 rm -f conftest.$ac_objext
7138 if { (eval echo "$as_me:7138: \"$ac_compile\"") >&5
7139 (eval $ac_compile) 2>&5
7141 echo "$as_me:7141: \$? = $ac_status" >&5
7142 (exit $ac_status); } &&
7143 { ac_try='test -s conftest.$ac_objext'
7144 { (eval echo "$as_me:7144: \"$ac_try\"") >&5
7147 echo "$as_me:7147: \$? = $ac_status" >&5
7148 (exit $ac_status); }; }; then
7149 cf_cv_ncurses_header=$cf_header; break
7151 echo "$as_me: failed program was:" >&5
7152 cat conftest.$ac_ext >&5
7154 rm -f conftest.$ac_objext conftest.$ac_ext
7158 echo "$as_me:7158: result: $cf_cv_ncurses_header" >&5
7159 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7161 if test "$cf_cv_ncurses_header" = none ; then
7162 { { echo "$as_me:7162: error: No curses header-files found" >&5
7163 echo "$as_me: error: No curses header-files found" >&2;}
7164 { (exit 1); exit 1; }; }
7167 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7169 for ac_header in $cf_cv_ncurses_header
7171 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7172 echo "$as_me:7172: checking for $ac_header" >&5
7173 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7174 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7175 echo $ECHO_N "(cached) $ECHO_C" >&6
7177 cat >conftest.$ac_ext <<_ACEOF
7178 #line 7178 "configure"
7179 #include "confdefs.h"
7180 #include <$ac_header>
7182 if { (eval echo "$as_me:7182: \"$ac_cpp conftest.$ac_ext\"") >&5
7183 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7185 egrep -v '^ *\+' conftest.er1 >conftest.err
7187 cat conftest.err >&5
7188 echo "$as_me:7188: \$? = $ac_status" >&5
7189 (exit $ac_status); } >/dev/null; then
7190 if test -s conftest.err; then
7191 ac_cpp_err=$ac_c_preproc_warn_flag
7198 if test -z "$ac_cpp_err"; then
7199 eval "$as_ac_Header=yes"
7201 echo "$as_me: failed program was:" >&5
7202 cat conftest.$ac_ext >&5
7203 eval "$as_ac_Header=no"
7205 rm -f conftest.err conftest.$ac_ext
7207 echo "$as_me:7207: result: `eval echo '${'$as_ac_Header'}'`" >&5
7208 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7209 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7210 cat >>confdefs.h <<EOF
7211 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7217 cat >>confdefs.h <<\EOF
7221 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7223 cat >>confdefs.h <<EOF
7224 #define $cf_nculib_ROOT 1
7227 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7231 cf_ncuhdr_root=$cf_cv_screen
7233 test -n "$cf_cv_curses_dir" && \
7234 test "$cf_cv_curses_dir" != "no" && { \
7236 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7237 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7239 while test $cf_add_incdir != /usr/include
7241 if test -d $cf_add_incdir
7244 if test -n "$CFLAGS$CPPFLAGS" ; then
7245 # a loop is needed to ensure we can add subdirs of existing dirs
7246 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7247 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7248 cf_have_incdir=yes; break
7253 if test "$cf_have_incdir" = no ; then
7254 if test "$cf_add_incdir" = /usr/local/include ; then
7255 if test "$GCC" = yes
7257 cf_save_CPPFLAGS=$CPPFLAGS
7258 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7259 cat >conftest.$ac_ext <<_ACEOF
7260 #line 7260 "configure"
7261 #include "confdefs.h"
7271 rm -f conftest.$ac_objext
7272 if { (eval echo "$as_me:7272: \"$ac_compile\"") >&5
7273 (eval $ac_compile) 2>&5
7275 echo "$as_me:7275: \$? = $ac_status" >&5
7276 (exit $ac_status); } &&
7277 { ac_try='test -s conftest.$ac_objext'
7278 { (eval echo "$as_me:7278: \"$ac_try\"") >&5
7281 echo "$as_me:7281: \$? = $ac_status" >&5
7282 (exit $ac_status); }; }; then
7285 echo "$as_me: failed program was:" >&5
7286 cat conftest.$ac_ext >&5
7289 rm -f conftest.$ac_objext conftest.$ac_ext
7290 CPPFLAGS=$cf_save_CPPFLAGS
7295 if test "$cf_have_incdir" = no ; then
7296 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7298 echo "${as_me:-configure}:7298: testing adding $cf_add_incdir to include-path ..." 1>&5
7300 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7302 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7303 test "$cf_top_incdir" = "$cf_add_incdir" && break
7304 cf_add_incdir="$cf_top_incdir"
7317 echo "$as_me:7317: checking for $cf_ncuhdr_root header in include-path" >&5
7318 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
7319 if test "${cf_cv_ncurses_h+set}" = set; then
7320 echo $ECHO_N "(cached) $ECHO_C" >&6
7323 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
7324 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
7325 for cf_header in $cf_header_list
7328 cat >conftest.$ac_ext <<_ACEOF
7329 #line 7329 "configure"
7330 #include "confdefs.h"
7332 #include <$cf_header>
7337 #ifdef NCURSES_VERSION
7339 printf("%s\n", NCURSES_VERSION);
7352 rm -f conftest.$ac_objext
7353 if { (eval echo "$as_me:7353: \"$ac_compile\"") >&5
7354 (eval $ac_compile) 2>&5
7356 echo "$as_me:7356: \$? = $ac_status" >&5
7357 (exit $ac_status); } &&
7358 { ac_try='test -s conftest.$ac_objext'
7359 { (eval echo "$as_me:7359: \"$ac_try\"") >&5
7362 echo "$as_me:7362: \$? = $ac_status" >&5
7363 (exit $ac_status); }; }; then
7364 cf_cv_ncurses_h=$cf_header
7367 echo "$as_me: failed program was:" >&5
7368 cat conftest.$ac_ext >&5
7371 rm -f conftest.$ac_objext conftest.$ac_ext
7373 test "$cf_cv_ncurses_h" != no && break
7377 echo "$as_me:7377: result: $cf_cv_ncurses_h" >&5
7378 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
7380 if test "$cf_cv_ncurses_h" != no ; then
7381 cf_cv_ncurses_header=$cf_cv_ncurses_h
7384 echo "$as_me:7384: checking for $cf_ncuhdr_root include-path" >&5
7385 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
7386 if test "${cf_cv_ncurses_h2+set}" = set; then
7387 echo $ECHO_N "(cached) $ECHO_C" >&6
7390 test -n "$verbose" && echo
7394 # collect the current set of include-directories from compiler flags
7395 cf_header_path_list=""
7396 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7397 for cf_header_path in $CPPFLAGS $CFLAGS
7399 case $cf_header_path in
7401 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7403 test "x$cf_header_path" != "xNONE" && \
7404 test -d "$cf_header_path" && \
7406 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7407 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7408 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
7409 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
7410 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
7411 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"
7414 cf_header_path_list="$cf_header_path_list $cf_search"
7420 # add the variations for the package we are looking for
7424 test "x$prefix" != "xNONE" && \
7425 test -d "$prefix" && \
7427 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7428 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7429 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
7430 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
7431 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
7432 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7435 for cf_subdir_prefix in \
7444 test "x$cf_subdir_prefix" != "x$prefix" && \
7445 test -d "$cf_subdir_prefix" && \
7446 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7447 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7448 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
7449 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
7450 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
7451 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
7452 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"
7457 test "$includedir" != NONE && \
7458 test "$includedir" != "/usr/include" && \
7459 test -d "$includedir" && {
7460 test -d $includedir && cf_search="$cf_search $includedir"
7461 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
7464 test "$oldincludedir" != NONE && \
7465 test "$oldincludedir" != "/usr/include" && \
7466 test -d "$oldincludedir" && {
7467 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7468 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
7471 cf_search="$cf_search $cf_header_path_list"
7473 test -n "$verbose" && echo search path $cf_search
7474 cf_save2_CPPFLAGS="$CPPFLAGS"
7475 for cf_incdir in $cf_search
7478 if test -n "$cf_incdir" ; then
7479 for cf_add_incdir in $cf_incdir
7481 while test $cf_add_incdir != /usr/include
7483 if test -d $cf_add_incdir
7486 if test -n "$CFLAGS$CPPFLAGS" ; then
7487 # a loop is needed to ensure we can add subdirs of existing dirs
7488 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7489 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7490 cf_have_incdir=yes; break
7495 if test "$cf_have_incdir" = no ; then
7496 if test "$cf_add_incdir" = /usr/local/include ; then
7497 if test "$GCC" = yes
7499 cf_save_CPPFLAGS=$CPPFLAGS
7500 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7501 cat >conftest.$ac_ext <<_ACEOF
7502 #line 7502 "configure"
7503 #include "confdefs.h"
7513 rm -f conftest.$ac_objext
7514 if { (eval echo "$as_me:7514: \"$ac_compile\"") >&5
7515 (eval $ac_compile) 2>&5
7517 echo "$as_me:7517: \$? = $ac_status" >&5
7518 (exit $ac_status); } &&
7519 { ac_try='test -s conftest.$ac_objext'
7520 { (eval echo "$as_me:7520: \"$ac_try\"") >&5
7523 echo "$as_me:7523: \$? = $ac_status" >&5
7524 (exit $ac_status); }; }; then
7527 echo "$as_me: failed program was:" >&5
7528 cat conftest.$ac_ext >&5
7531 rm -f conftest.$ac_objext conftest.$ac_ext
7532 CPPFLAGS=$cf_save_CPPFLAGS
7537 if test "$cf_have_incdir" = no ; then
7538 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7540 echo "${as_me:-configure}:7540: testing adding $cf_add_incdir to include-path ..." 1>&5
7542 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7544 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7545 test "$cf_top_incdir" = "$cf_add_incdir" && break
7546 cf_add_incdir="$cf_top_incdir"
7562 cat >conftest.$ac_ext <<_ACEOF
7563 #line 7563 "configure"
7564 #include "confdefs.h"
7566 #include <$cf_header>
7571 #ifdef NCURSES_VERSION
7573 printf("%s\n", NCURSES_VERSION);
7586 rm -f conftest.$ac_objext
7587 if { (eval echo "$as_me:7587: \"$ac_compile\"") >&5
7588 (eval $ac_compile) 2>&5
7590 echo "$as_me:7590: \$? = $ac_status" >&5
7591 (exit $ac_status); } &&
7592 { ac_try='test -s conftest.$ac_objext'
7593 { (eval echo "$as_me:7593: \"$ac_try\"") >&5
7596 echo "$as_me:7596: \$? = $ac_status" >&5
7597 (exit $ac_status); }; }; then
7598 cf_cv_ncurses_h2=$cf_header
7601 echo "$as_me: failed program was:" >&5
7602 cat conftest.$ac_ext >&5
7605 rm -f conftest.$ac_objext conftest.$ac_ext
7607 if test "$cf_cv_ncurses_h2" != no ; then
7608 cf_cv_ncurses_h2=$cf_incdir/$cf_header
7609 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
7612 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
7614 CPPFLAGS="$cf_save2_CPPFLAGS"
7615 test "$cf_cv_ncurses_h2" != no && break
7617 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:7617: error: not found" >&5
7618 echo "$as_me: error: not found" >&2;}
7619 { (exit 1); exit 1; }; }
7622 echo "$as_me:7622: result: $cf_cv_ncurses_h2" >&5
7623 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
7625 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
7626 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
7627 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
7628 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
7631 if test -n "$cf_1st_incdir" ; then
7632 for cf_add_incdir in $cf_1st_incdir
7634 while test $cf_add_incdir != /usr/include
7636 if test -d $cf_add_incdir
7639 if test -n "$CFLAGS$CPPFLAGS" ; then
7640 # a loop is needed to ensure we can add subdirs of existing dirs
7641 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7642 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7643 cf_have_incdir=yes; break
7648 if test "$cf_have_incdir" = no ; then
7649 if test "$cf_add_incdir" = /usr/local/include ; then
7650 if test "$GCC" = yes
7652 cf_save_CPPFLAGS=$CPPFLAGS
7653 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7654 cat >conftest.$ac_ext <<_ACEOF
7655 #line 7655 "configure"
7656 #include "confdefs.h"
7666 rm -f conftest.$ac_objext
7667 if { (eval echo "$as_me:7667: \"$ac_compile\"") >&5
7668 (eval $ac_compile) 2>&5
7670 echo "$as_me:7670: \$? = $ac_status" >&5
7671 (exit $ac_status); } &&
7672 { ac_try='test -s conftest.$ac_objext'
7673 { (eval echo "$as_me:7673: \"$ac_try\"") >&5
7676 echo "$as_me:7676: \$? = $ac_status" >&5
7677 (exit $ac_status); }; }; then
7680 echo "$as_me: failed program was:" >&5
7681 cat conftest.$ac_ext >&5
7684 rm -f conftest.$ac_objext conftest.$ac_ext
7685 CPPFLAGS=$cf_save_CPPFLAGS
7690 if test "$cf_have_incdir" = no ; then
7691 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7693 echo "${as_me:-configure}:7693: testing adding $cf_add_incdir to include-path ..." 1>&5
7695 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7697 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7698 test "$cf_top_incdir" = "$cf_add_incdir" && break
7699 cf_add_incdir="$cf_top_incdir"
7712 # Set definitions to allow ifdef'ing for ncurses.h
7714 case $cf_cv_ncurses_header in
7717 cat >>confdefs.h <<\EOF
7718 #define HAVE_NCURSES_H 1
7724 case $cf_cv_ncurses_header in
7725 (ncurses/curses.h|ncurses/ncurses.h)
7727 cat >>confdefs.h <<\EOF
7728 #define HAVE_NCURSES_NCURSES_H 1
7732 (ncursesw/curses.h|ncursesw/ncurses.h)
7734 cat >>confdefs.h <<\EOF
7735 #define HAVE_NCURSESW_NCURSES_H 1
7741 echo "$as_me:7741: checking for terminfo header" >&5
7742 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7743 if test "${cf_cv_term_header+set}" = set; then
7744 echo $ECHO_N "(cached) $ECHO_C" >&6
7747 case ${cf_cv_ncurses_header} in
7748 (*/ncurses.h|*/ncursesw.h)
7749 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7752 cf_term_header=term.h
7756 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7758 cat >conftest.$ac_ext <<_ACEOF
7759 #line 7759 "configure"
7760 #include "confdefs.h"
7762 #include <${cf_cv_ncurses_header:-curses.h}>
7768 int x = auto_left_margin
7773 rm -f conftest.$ac_objext
7774 if { (eval echo "$as_me:7774: \"$ac_compile\"") >&5
7775 (eval $ac_compile) 2>&5
7777 echo "$as_me:7777: \$? = $ac_status" >&5
7778 (exit $ac_status); } &&
7779 { ac_try='test -s conftest.$ac_objext'
7780 { (eval echo "$as_me:7780: \"$ac_try\"") >&5
7783 echo "$as_me:7783: \$? = $ac_status" >&5
7784 (exit $ac_status); }; }; then
7786 cf_cv_term_header="$cf_test"
7788 echo "$as_me: failed program was:" >&5
7789 cat conftest.$ac_ext >&5
7791 cf_cv_term_header=unknown
7794 rm -f conftest.$ac_objext conftest.$ac_ext
7795 test "$cf_cv_term_header" != unknown && break
7799 echo "$as_me:7799: result: $cf_cv_term_header" >&5
7800 echo "${ECHO_T}$cf_cv_term_header" >&6
7802 # Set definitions to allow ifdef'ing to accommodate subdirectories
7804 case $cf_cv_term_header in
7807 cat >>confdefs.h <<\EOF
7808 #define HAVE_TERM_H 1
7814 case $cf_cv_term_header in
7817 cat >>confdefs.h <<\EOF
7818 #define HAVE_NCURSES_TERM_H 1
7824 cat >>confdefs.h <<\EOF
7825 #define HAVE_NCURSESW_TERM_H 1
7831 # some applications need this, but should check for NCURSES_VERSION
7833 cat >>confdefs.h <<\EOF
7837 echo "$as_me:7837: checking for ncurses version" >&5
7838 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
7839 if test "${cf_cv_ncurses_version+set}" = set; then
7840 echo $ECHO_N "(cached) $ECHO_C" >&6
7843 cf_cv_ncurses_version=no
7846 if test "$cross_compiling" = yes; then
7848 # This will not work if the preprocessor splits the line after the
7849 # Autoconf token. The 'unproto' program does that.
7850 cat > conftest.$ac_ext <<EOF
7851 #include <${cf_cv_ncurses_header:-curses.h}>
7853 #ifdef NCURSES_VERSION
7854 Autoconf NCURSES_VERSION
7862 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
7863 { (eval echo "$as_me:7863: \"$cf_try\"") >&5
7866 echo "$as_me:7866: \$? = $ac_status" >&5
7867 (exit $ac_status); }
7868 if test -f conftest.out ; then
7869 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
7870 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
7875 cat >conftest.$ac_ext <<_ACEOF
7876 #line 7876 "configure"
7877 #include "confdefs.h"
7879 #include <${cf_cv_ncurses_header:-curses.h}>
7883 FILE *fp = fopen("$cf_tempfile", "w");
7884 #ifdef NCURSES_VERSION
7885 # ifdef NCURSES_VERSION_PATCH
7886 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
7888 fprintf(fp, "%s\n", NCURSES_VERSION);
7892 fprintf(fp, "old\n");
7897 ${cf_cv_main_return:-return}(0);
7900 rm -f conftest$ac_exeext
7901 if { (eval echo "$as_me:7901: \"$ac_link\"") >&5
7902 (eval $ac_link) 2>&5
7904 echo "$as_me:7904: \$? = $ac_status" >&5
7905 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7906 { (eval echo "$as_me:7906: \"$ac_try\"") >&5
7909 echo "$as_me:7909: \$? = $ac_status" >&5
7910 (exit $ac_status); }; }; then
7912 cf_cv_ncurses_version=`cat $cf_tempfile`
7914 echo "$as_me: program exited with status $ac_status" >&5
7915 echo "$as_me: failed program was:" >&5
7916 cat conftest.$ac_ext >&5
7918 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7923 echo "$as_me:7923: result: $cf_cv_ncurses_version" >&5
7924 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
7925 test "$cf_cv_ncurses_version" = no ||
7926 cat >>confdefs.h <<\EOF
7930 cf_nculib_root=$cf_cv_screen
7931 # This works, except for the special case where we find gpm, but
7932 # ncurses is in a nonstandard location via $LIBS, and we really want
7935 cf_ncurses_SAVE="$LIBS"
7936 echo "$as_me:7936: checking for Gpm_Open in -lgpm" >&5
7937 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7938 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7939 echo $ECHO_N "(cached) $ECHO_C" >&6
7941 ac_check_lib_save_LIBS=$LIBS
7943 cat >conftest.$ac_ext <<_ACEOF
7944 #line 7944 "configure"
7945 #include "confdefs.h"
7947 /* Override any gcc2 internal prototype to avoid an error. */
7951 /* We use char because int might match the return type of a gcc2
7952 builtin and then its argument prototype would still apply. */
7962 rm -f conftest.$ac_objext conftest$ac_exeext
7963 if { (eval echo "$as_me:7963: \"$ac_link\"") >&5
7964 (eval $ac_link) 2>&5
7966 echo "$as_me:7966: \$? = $ac_status" >&5
7967 (exit $ac_status); } &&
7968 { ac_try='test -s conftest$ac_exeext'
7969 { (eval echo "$as_me:7969: \"$ac_try\"") >&5
7972 echo "$as_me:7972: \$? = $ac_status" >&5
7973 (exit $ac_status); }; }; then
7974 ac_cv_lib_gpm_Gpm_Open=yes
7976 echo "$as_me: failed program was:" >&5
7977 cat conftest.$ac_ext >&5
7978 ac_cv_lib_gpm_Gpm_Open=no
7980 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7981 LIBS=$ac_check_lib_save_LIBS
7983 echo "$as_me:7983: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7984 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7985 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
7986 echo "$as_me:7986: checking for initscr in -lgpm" >&5
7987 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
7988 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
7989 echo $ECHO_N "(cached) $ECHO_C" >&6
7991 ac_check_lib_save_LIBS=$LIBS
7993 cat >conftest.$ac_ext <<_ACEOF
7994 #line 7994 "configure"
7995 #include "confdefs.h"
7997 /* Override any gcc2 internal prototype to avoid an error. */
8001 /* We use char because int might match the return type of a gcc2
8002 builtin and then its argument prototype would still apply. */
8012 rm -f conftest.$ac_objext conftest$ac_exeext
8013 if { (eval echo "$as_me:8013: \"$ac_link\"") >&5
8014 (eval $ac_link) 2>&5
8016 echo "$as_me:8016: \$? = $ac_status" >&5
8017 (exit $ac_status); } &&
8018 { ac_try='test -s conftest$ac_exeext'
8019 { (eval echo "$as_me:8019: \"$ac_try\"") >&5
8022 echo "$as_me:8022: \$? = $ac_status" >&5
8023 (exit $ac_status); }; }; then
8024 ac_cv_lib_gpm_initscr=yes
8026 echo "$as_me: failed program was:" >&5
8027 cat conftest.$ac_ext >&5
8028 ac_cv_lib_gpm_initscr=no
8030 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8031 LIBS=$ac_check_lib_save_LIBS
8033 echo "$as_me:8033: result: $ac_cv_lib_gpm_initscr" >&5
8034 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8035 if test $ac_cv_lib_gpm_initscr = yes; then
8036 LIBS="$cf_ncurses_SAVE"
8038 cf_ncurses_LIBS="-lgpm"
8045 # This is only necessary if you are linking against an obsolete
8046 # version of ncurses (but it should do no harm, since it's static).
8047 if test "$cf_nculib_root" = ncurses ; then
8048 echo "$as_me:8048: checking for tgoto in -lmytinfo" >&5
8049 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8050 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8051 echo $ECHO_N "(cached) $ECHO_C" >&6
8053 ac_check_lib_save_LIBS=$LIBS
8054 LIBS="-lmytinfo $LIBS"
8055 cat >conftest.$ac_ext <<_ACEOF
8056 #line 8056 "configure"
8057 #include "confdefs.h"
8059 /* Override any gcc2 internal prototype to avoid an error. */
8063 /* We use char because int might match the return type of a gcc2
8064 builtin and then its argument prototype would still apply. */
8074 rm -f conftest.$ac_objext conftest$ac_exeext
8075 if { (eval echo "$as_me:8075: \"$ac_link\"") >&5
8076 (eval $ac_link) 2>&5
8078 echo "$as_me:8078: \$? = $ac_status" >&5
8079 (exit $ac_status); } &&
8080 { ac_try='test -s conftest$ac_exeext'
8081 { (eval echo "$as_me:8081: \"$ac_try\"") >&5
8084 echo "$as_me:8084: \$? = $ac_status" >&5
8085 (exit $ac_status); }; }; then
8086 ac_cv_lib_mytinfo_tgoto=yes
8088 echo "$as_me: failed program was:" >&5
8089 cat conftest.$ac_ext >&5
8090 ac_cv_lib_mytinfo_tgoto=no
8092 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8093 LIBS=$ac_check_lib_save_LIBS
8095 echo "$as_me:8095: result: $ac_cv_lib_mytinfo_tgoto" >&5
8096 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8097 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8098 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8105 cf_add_libs="$cf_ncurses_LIBS"
8106 # Filter out duplicates - this happens with badly-designed ".pc" files...
8107 for cf_add_1lib in $LIBS
8109 for cf_add_2lib in $cf_add_libs
8111 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8117 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8121 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8124 cf_add_libs="-l$cf_nculib_root"
8125 # Filter out duplicates - this happens with badly-designed ".pc" files...
8126 for cf_add_1lib in $LIBS
8128 for cf_add_2lib in $cf_add_libs
8130 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8136 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8142 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
8144 echo "$as_me:8144: checking for initscr" >&5
8145 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8146 if test "${ac_cv_func_initscr+set}" = set; then
8147 echo $ECHO_N "(cached) $ECHO_C" >&6
8149 cat >conftest.$ac_ext <<_ACEOF
8150 #line 8150 "configure"
8151 #include "confdefs.h"
8152 /* System header to define __stub macros and hopefully few prototypes,
8153 which can conflict with char initscr (); below. */
8155 /* Override any gcc2 internal prototype to avoid an error. */
8159 /* We use char because int might match the return type of a gcc2
8160 builtin and then its argument prototype would still apply. */
8167 /* The GNU C library defines this for functions which it implements
8168 to always fail with ENOSYS. Some functions are actually named
8169 something starting with __ and the normal name is an alias. */
8170 #if defined (__stub_initscr) || defined (__stub___initscr)
8173 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8180 rm -f conftest.$ac_objext conftest$ac_exeext
8181 if { (eval echo "$as_me:8181: \"$ac_link\"") >&5
8182 (eval $ac_link) 2>&5
8184 echo "$as_me:8184: \$? = $ac_status" >&5
8185 (exit $ac_status); } &&
8186 { ac_try='test -s conftest$ac_exeext'
8187 { (eval echo "$as_me:8187: \"$ac_try\"") >&5
8190 echo "$as_me:8190: \$? = $ac_status" >&5
8191 (exit $ac_status); }; }; then
8192 ac_cv_func_initscr=yes
8194 echo "$as_me: failed program was:" >&5
8195 cat conftest.$ac_ext >&5
8196 ac_cv_func_initscr=no
8198 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8200 echo "$as_me:8200: result: $ac_cv_func_initscr" >&5
8201 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8202 if test $ac_cv_func_initscr = yes; then
8203 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8206 cf_save_LIBS="$LIBS"
8207 echo "$as_me:8207: checking for initscr in -l$cf_nculib_root" >&5
8208 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8209 LIBS="-l$cf_nculib_root $LIBS"
8210 cat >conftest.$ac_ext <<_ACEOF
8211 #line 8211 "configure"
8212 #include "confdefs.h"
8213 #include <${cf_cv_ncurses_header:-curses.h}>
8222 rm -f conftest.$ac_objext conftest$ac_exeext
8223 if { (eval echo "$as_me:8223: \"$ac_link\"") >&5
8224 (eval $ac_link) 2>&5
8226 echo "$as_me:8226: \$? = $ac_status" >&5
8227 (exit $ac_status); } &&
8228 { ac_try='test -s conftest$ac_exeext'
8229 { (eval echo "$as_me:8229: \"$ac_try\"") >&5
8232 echo "$as_me:8232: \$? = $ac_status" >&5
8233 (exit $ac_status); }; }; then
8234 echo "$as_me:8234: result: yes" >&5
8235 echo "${ECHO_T}yes" >&6
8236 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8239 echo "$as_me: failed program was:" >&5
8240 cat conftest.$ac_ext >&5
8241 echo "$as_me:8241: result: no" >&5
8242 echo "${ECHO_T}no" >&6
8245 cf_library_path_list=""
8246 if test -n "${LDFLAGS}${LIBS}" ; then
8247 for cf_library_path in $LDFLAGS $LIBS
8249 case $cf_library_path in
8251 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8253 test "x$cf_library_path" != "xNONE" && \
8254 test -d "$cf_library_path" && \
8256 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8257 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
8258 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
8259 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
8260 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
8261 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"
8264 cf_library_path_list="$cf_library_path_list $cf_search"
8272 test "x$prefix" != "xNONE" && \
8273 test -d "$prefix" && \
8275 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8276 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
8277 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
8278 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
8279 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
8280 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
8283 for cf_subdir_prefix in \
8292 test "x$cf_subdir_prefix" != "x$prefix" && \
8293 test -d "$cf_subdir_prefix" && \
8294 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8295 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
8296 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
8297 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
8298 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
8299 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
8300 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"
8305 cf_search="$cf_library_path_list $cf_search"
8307 for cf_libdir in $cf_search
8309 echo "$as_me:8309: checking for -l$cf_nculib_root in $cf_libdir" >&5
8310 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
8311 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
8312 cat >conftest.$ac_ext <<_ACEOF
8313 #line 8313 "configure"
8314 #include "confdefs.h"
8315 #include <${cf_cv_ncurses_header:-curses.h}>
8324 rm -f conftest.$ac_objext conftest$ac_exeext
8325 if { (eval echo "$as_me:8325: \"$ac_link\"") >&5
8326 (eval $ac_link) 2>&5
8328 echo "$as_me:8328: \$? = $ac_status" >&5
8329 (exit $ac_status); } &&
8330 { ac_try='test -s conftest$ac_exeext'
8331 { (eval echo "$as_me:8331: \"$ac_try\"") >&5
8334 echo "$as_me:8334: \$? = $ac_status" >&5
8335 (exit $ac_status); }; }; then
8336 echo "$as_me:8336: result: yes" >&5
8337 echo "${ECHO_T}yes" >&6
8338 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8341 echo "$as_me: failed program was:" >&5
8342 cat conftest.$ac_ext >&5
8343 echo "$as_me:8343: result: no" >&5
8344 echo "${ECHO_T}no" >&6
8345 LIBS="$cf_save_LIBS"
8347 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8351 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8355 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
8357 if test $cf_found_library = no ; then
8358 { { echo "$as_me:8358: error: Cannot link $cf_nculib_root library" >&5
8359 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
8360 { (exit 1); exit 1; }; }
8365 if test -n "$cf_ncurses_LIBS" ; then
8366 echo "$as_me:8366: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
8367 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
8368 cf_ncurses_SAVE="$LIBS"
8369 for p in $cf_ncurses_LIBS ; do
8370 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
8371 if test "$q" != "$LIBS" ; then
8375 cat >conftest.$ac_ext <<_ACEOF
8376 #line 8376 "configure"
8377 #include "confdefs.h"
8378 #include <${cf_cv_ncurses_header:-curses.h}>
8382 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8387 rm -f conftest.$ac_objext conftest$ac_exeext
8388 if { (eval echo "$as_me:8388: \"$ac_link\"") >&5
8389 (eval $ac_link) 2>&5
8391 echo "$as_me:8391: \$? = $ac_status" >&5
8392 (exit $ac_status); } &&
8393 { ac_try='test -s conftest$ac_exeext'
8394 { (eval echo "$as_me:8394: \"$ac_try\"") >&5
8397 echo "$as_me:8397: \$? = $ac_status" >&5
8398 (exit $ac_status); }; }; then
8399 echo "$as_me:8399: result: yes" >&5
8400 echo "${ECHO_T}yes" >&6
8402 echo "$as_me: failed program was:" >&5
8403 cat conftest.$ac_ext >&5
8404 echo "$as_me:8404: result: no" >&5
8405 echo "${ECHO_T}no" >&6
8406 LIBS="$cf_ncurses_SAVE"
8408 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8411 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8413 cat >>confdefs.h <<EOF
8414 #define $cf_nculib_ROOT 1
8425 cf_ncuconfig_root=$cf_cv_screen
8426 cf_have_ncuconfig=no
8428 if test "x${PKG_CONFIG:=none}" != xnone; then
8429 echo "$as_me:8429: checking pkg-config for $cf_ncuconfig_root" >&5
8430 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
8431 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
8432 echo "$as_me:8432: result: yes" >&5
8433 echo "${ECHO_T}yes" >&6
8435 echo "$as_me:8435: checking if the $cf_ncuconfig_root package files work" >&5
8436 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
8437 cf_have_ncuconfig=unknown
8439 cf_save_CPPFLAGS="$CPPFLAGS"
8440 cf_save_LIBS="$LIBS"
8442 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
8444 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
8445 # Filter out duplicates - this happens with badly-designed ".pc" files...
8446 for cf_add_1lib in $LIBS
8448 for cf_add_2lib in $cf_add_libs
8450 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8456 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8460 cat >conftest.$ac_ext <<_ACEOF
8461 #line 8461 "configure"
8462 #include "confdefs.h"
8463 #include <${cf_cv_ncurses_header:-curses.h}>
8467 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8472 rm -f conftest.$ac_objext conftest$ac_exeext
8473 if { (eval echo "$as_me:8473: \"$ac_link\"") >&5
8474 (eval $ac_link) 2>&5
8476 echo "$as_me:8476: \$? = $ac_status" >&5
8477 (exit $ac_status); } &&
8478 { ac_try='test -s conftest$ac_exeext'
8479 { (eval echo "$as_me:8479: \"$ac_try\"") >&5
8482 echo "$as_me:8482: \$? = $ac_status" >&5
8483 (exit $ac_status); }; }; then
8484 if test "$cross_compiling" = yes; then
8485 cf_have_ncuconfig=maybe
8487 cat >conftest.$ac_ext <<_ACEOF
8488 #line 8488 "configure"
8489 #include "confdefs.h"
8490 #include <${cf_cv_ncurses_header:-curses.h}>
8492 { char *xx = curses_version(); return (xx == 0); }
8494 rm -f conftest$ac_exeext
8495 if { (eval echo "$as_me:8495: \"$ac_link\"") >&5
8496 (eval $ac_link) 2>&5
8498 echo "$as_me:8498: \$? = $ac_status" >&5
8499 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8500 { (eval echo "$as_me:8500: \"$ac_try\"") >&5
8503 echo "$as_me:8503: \$? = $ac_status" >&5
8504 (exit $ac_status); }; }; then
8505 cf_have_ncuconfig=yes
8507 echo "$as_me: program exited with status $ac_status" >&5
8508 echo "$as_me: failed program was:" >&5
8509 cat conftest.$ac_ext >&5
8510 cf_have_ncuconfig=no
8512 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8515 echo "$as_me: failed program was:" >&5
8516 cat conftest.$ac_ext >&5
8517 cf_have_ncuconfig=no
8519 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8520 echo "$as_me:8520: result: $cf_have_ncuconfig" >&5
8521 echo "${ECHO_T}$cf_have_ncuconfig" >&6
8522 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
8523 if test "$cf_have_ncuconfig" != "yes"
8525 CPPFLAGS="$cf_save_CPPFLAGS"
8526 LIBS="$cf_save_LIBS"
8527 NCURSES_CONFIG_PKG=none
8530 cat >>confdefs.h <<\EOF
8534 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
8536 echo "$as_me:8536: checking for terminfo header" >&5
8537 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8538 if test "${cf_cv_term_header+set}" = set; then
8539 echo $ECHO_N "(cached) $ECHO_C" >&6
8542 case ${cf_cv_ncurses_header} in
8543 (*/ncurses.h|*/ncursesw.h)
8544 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8547 cf_term_header=term.h
8551 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8553 cat >conftest.$ac_ext <<_ACEOF
8554 #line 8554 "configure"
8555 #include "confdefs.h"
8557 #include <${cf_cv_ncurses_header:-curses.h}>
8563 int x = auto_left_margin
8568 rm -f conftest.$ac_objext
8569 if { (eval echo "$as_me:8569: \"$ac_compile\"") >&5
8570 (eval $ac_compile) 2>&5
8572 echo "$as_me:8572: \$? = $ac_status" >&5
8573 (exit $ac_status); } &&
8574 { ac_try='test -s conftest.$ac_objext'
8575 { (eval echo "$as_me:8575: \"$ac_try\"") >&5
8578 echo "$as_me:8578: \$? = $ac_status" >&5
8579 (exit $ac_status); }; }; then
8581 cf_cv_term_header="$cf_test"
8583 echo "$as_me: failed program was:" >&5
8584 cat conftest.$ac_ext >&5
8586 cf_cv_term_header=unknown
8589 rm -f conftest.$ac_objext conftest.$ac_ext
8590 test "$cf_cv_term_header" != unknown && break
8594 echo "$as_me:8594: result: $cf_cv_term_header" >&5
8595 echo "${ECHO_T}$cf_cv_term_header" >&6
8597 # Set definitions to allow ifdef'ing to accommodate subdirectories
8599 case $cf_cv_term_header in
8602 cat >>confdefs.h <<\EOF
8603 #define HAVE_TERM_H 1
8609 case $cf_cv_term_header in
8612 cat >>confdefs.h <<\EOF
8613 #define HAVE_NCURSES_TERM_H 1
8619 cat >>confdefs.h <<\EOF
8620 #define HAVE_NCURSESW_TERM_H 1
8629 echo "$as_me:8629: result: no" >&5
8630 echo "${ECHO_T}no" >&6
8631 NCURSES_CONFIG_PKG=none
8634 NCURSES_CONFIG_PKG=none
8637 if test "x$cf_have_ncuconfig" = "xno"; then
8638 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
8640 if test -n "$ac_tool_prefix"; then
8641 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8643 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8644 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8645 echo "$as_me:8645: checking for $ac_word" >&5
8646 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8647 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8648 echo $ECHO_N "(cached) $ECHO_C" >&6
8650 if test -n "$NCURSES_CONFIG"; then
8651 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8653 ac_save_IFS=$IFS; IFS=$ac_path_separator
8655 for ac_dir in $ac_dummy; do
8657 test -z "$ac_dir" && ac_dir=.
8658 $as_executable_p "$ac_dir/$ac_word" || continue
8659 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8660 echo "$as_me:8660: found $ac_dir/$ac_word" >&5
8666 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8667 if test -n "$NCURSES_CONFIG"; then
8668 echo "$as_me:8668: result: $NCURSES_CONFIG" >&5
8669 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8671 echo "$as_me:8671: result: no" >&5
8672 echo "${ECHO_T}no" >&6
8675 test -n "$NCURSES_CONFIG" && break
8678 if test -z "$NCURSES_CONFIG"; then
8679 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8680 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8682 # Extract the first word of "$ac_prog", so it can be a program name with args.
8683 set dummy $ac_prog; ac_word=$2
8684 echo "$as_me:8684: checking for $ac_word" >&5
8685 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8686 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8687 echo $ECHO_N "(cached) $ECHO_C" >&6
8689 if test -n "$ac_ct_NCURSES_CONFIG"; then
8690 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8692 ac_save_IFS=$IFS; IFS=$ac_path_separator
8694 for ac_dir in $ac_dummy; do
8696 test -z "$ac_dir" && ac_dir=.
8697 $as_executable_p "$ac_dir/$ac_word" || continue
8698 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8699 echo "$as_me:8699: found $ac_dir/$ac_word" >&5
8705 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8706 if test -n "$ac_ct_NCURSES_CONFIG"; then
8707 echo "$as_me:8707: result: $ac_ct_NCURSES_CONFIG" >&5
8708 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8710 echo "$as_me:8710: result: no" >&5
8711 echo "${ECHO_T}no" >&6
8714 test -n "$ac_ct_NCURSES_CONFIG" && break
8716 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8718 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8721 if test "$NCURSES_CONFIG" != none ; then
8723 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
8725 cf_add_libs="`$NCURSES_CONFIG --libs`"
8726 # Filter out duplicates - this happens with badly-designed ".pc" files...
8727 for cf_add_1lib in $LIBS
8729 for cf_add_2lib in $cf_add_libs
8731 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8737 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8741 # even with config script, some packages use no-override for curses.h
8743 echo "$as_me:8743: checking if we have identified curses headers" >&5
8744 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8745 if test "${cf_cv_ncurses_header+set}" = set; then
8746 echo $ECHO_N "(cached) $ECHO_C" >&6
8749 cf_cv_ncurses_header=none
8751 ncurses.h $cf_cv_screen/ncurses.h \
8752 curses.h $cf_cv_screen/curses.h
8754 cat >conftest.$ac_ext <<_ACEOF
8755 #line 8755 "configure"
8756 #include "confdefs.h"
8757 #include <${cf_header}>
8761 initscr(); tgoto("?", 0,0)
8766 rm -f conftest.$ac_objext
8767 if { (eval echo "$as_me:8767: \"$ac_compile\"") >&5
8768 (eval $ac_compile) 2>&5
8770 echo "$as_me:8770: \$? = $ac_status" >&5
8771 (exit $ac_status); } &&
8772 { ac_try='test -s conftest.$ac_objext'
8773 { (eval echo "$as_me:8773: \"$ac_try\"") >&5
8776 echo "$as_me:8776: \$? = $ac_status" >&5
8777 (exit $ac_status); }; }; then
8778 cf_cv_ncurses_header=$cf_header; break
8780 echo "$as_me: failed program was:" >&5
8781 cat conftest.$ac_ext >&5
8783 rm -f conftest.$ac_objext conftest.$ac_ext
8787 echo "$as_me:8787: result: $cf_cv_ncurses_header" >&5
8788 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8790 if test "$cf_cv_ncurses_header" = none ; then
8791 { { echo "$as_me:8791: error: No curses header-files found" >&5
8792 echo "$as_me: error: No curses header-files found" >&2;}
8793 { (exit 1); exit 1; }; }
8796 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8798 for ac_header in $cf_cv_ncurses_header
8800 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8801 echo "$as_me:8801: checking for $ac_header" >&5
8802 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8803 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8804 echo $ECHO_N "(cached) $ECHO_C" >&6
8806 cat >conftest.$ac_ext <<_ACEOF
8807 #line 8807 "configure"
8808 #include "confdefs.h"
8809 #include <$ac_header>
8811 if { (eval echo "$as_me:8811: \"$ac_cpp conftest.$ac_ext\"") >&5
8812 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8814 egrep -v '^ *\+' conftest.er1 >conftest.err
8816 cat conftest.err >&5
8817 echo "$as_me:8817: \$? = $ac_status" >&5
8818 (exit $ac_status); } >/dev/null; then
8819 if test -s conftest.err; then
8820 ac_cpp_err=$ac_c_preproc_warn_flag
8827 if test -z "$ac_cpp_err"; then
8828 eval "$as_ac_Header=yes"
8830 echo "$as_me: failed program was:" >&5
8831 cat conftest.$ac_ext >&5
8832 eval "$as_ac_Header=no"
8834 rm -f conftest.err conftest.$ac_ext
8836 echo "$as_me:8836: result: `eval echo '${'$as_ac_Header'}'`" >&5
8837 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8838 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8839 cat >>confdefs.h <<EOF
8840 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8846 cat >>confdefs.h <<\EOF
8850 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8852 cat >>confdefs.h <<EOF
8853 #define $cf_nculib_ROOT 1
8856 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8860 cf_ncuhdr_root=$cf_cv_screen
8862 test -n "$cf_cv_curses_dir" && \
8863 test "$cf_cv_curses_dir" != "no" && { \
8865 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8866 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8868 while test $cf_add_incdir != /usr/include
8870 if test -d $cf_add_incdir
8873 if test -n "$CFLAGS$CPPFLAGS" ; then
8874 # a loop is needed to ensure we can add subdirs of existing dirs
8875 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8876 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8877 cf_have_incdir=yes; break
8882 if test "$cf_have_incdir" = no ; then
8883 if test "$cf_add_incdir" = /usr/local/include ; then
8884 if test "$GCC" = yes
8886 cf_save_CPPFLAGS=$CPPFLAGS
8887 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8888 cat >conftest.$ac_ext <<_ACEOF
8889 #line 8889 "configure"
8890 #include "confdefs.h"
8900 rm -f conftest.$ac_objext
8901 if { (eval echo "$as_me:8901: \"$ac_compile\"") >&5
8902 (eval $ac_compile) 2>&5
8904 echo "$as_me:8904: \$? = $ac_status" >&5
8905 (exit $ac_status); } &&
8906 { ac_try='test -s conftest.$ac_objext'
8907 { (eval echo "$as_me:8907: \"$ac_try\"") >&5
8910 echo "$as_me:8910: \$? = $ac_status" >&5
8911 (exit $ac_status); }; }; then
8914 echo "$as_me: failed program was:" >&5
8915 cat conftest.$ac_ext >&5
8918 rm -f conftest.$ac_objext conftest.$ac_ext
8919 CPPFLAGS=$cf_save_CPPFLAGS
8924 if test "$cf_have_incdir" = no ; then
8925 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8927 echo "${as_me:-configure}:8927: testing adding $cf_add_incdir to include-path ..." 1>&5
8929 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8931 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8932 test "$cf_top_incdir" = "$cf_add_incdir" && break
8933 cf_add_incdir="$cf_top_incdir"
8946 echo "$as_me:8946: checking for $cf_ncuhdr_root header in include-path" >&5
8947 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8948 if test "${cf_cv_ncurses_h+set}" = set; then
8949 echo $ECHO_N "(cached) $ECHO_C" >&6
8952 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8953 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8954 for cf_header in $cf_header_list
8957 cat >conftest.$ac_ext <<_ACEOF
8958 #line 8958 "configure"
8959 #include "confdefs.h"
8961 #include <$cf_header>
8966 #ifdef NCURSES_VERSION
8968 printf("%s\n", NCURSES_VERSION);
8981 rm -f conftest.$ac_objext
8982 if { (eval echo "$as_me:8982: \"$ac_compile\"") >&5
8983 (eval $ac_compile) 2>&5
8985 echo "$as_me:8985: \$? = $ac_status" >&5
8986 (exit $ac_status); } &&
8987 { ac_try='test -s conftest.$ac_objext'
8988 { (eval echo "$as_me:8988: \"$ac_try\"") >&5
8991 echo "$as_me:8991: \$? = $ac_status" >&5
8992 (exit $ac_status); }; }; then
8993 cf_cv_ncurses_h=$cf_header
8996 echo "$as_me: failed program was:" >&5
8997 cat conftest.$ac_ext >&5
9000 rm -f conftest.$ac_objext conftest.$ac_ext
9002 test "$cf_cv_ncurses_h" != no && break
9006 echo "$as_me:9006: result: $cf_cv_ncurses_h" >&5
9007 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
9009 if test "$cf_cv_ncurses_h" != no ; then
9010 cf_cv_ncurses_header=$cf_cv_ncurses_h
9013 echo "$as_me:9013: checking for $cf_ncuhdr_root include-path" >&5
9014 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
9015 if test "${cf_cv_ncurses_h2+set}" = set; then
9016 echo $ECHO_N "(cached) $ECHO_C" >&6
9019 test -n "$verbose" && echo
9023 # collect the current set of include-directories from compiler flags
9024 cf_header_path_list=""
9025 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9026 for cf_header_path in $CPPFLAGS $CFLAGS
9028 case $cf_header_path in
9030 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9032 test "x$cf_header_path" != "xNONE" && \
9033 test -d "$cf_header_path" && \
9035 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
9036 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
9037 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
9038 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
9039 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
9040 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"
9043 cf_header_path_list="$cf_header_path_list $cf_search"
9049 # add the variations for the package we are looking for
9053 test "x$prefix" != "xNONE" && \
9054 test -d "$prefix" && \
9056 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
9057 test -d $prefix/include && cf_search="$cf_search $prefix/include"
9058 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
9059 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
9060 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
9061 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9064 for cf_subdir_prefix in \
9073 test "x$cf_subdir_prefix" != "x$prefix" && \
9074 test -d "$cf_subdir_prefix" && \
9075 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9076 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
9077 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
9078 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
9079 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
9080 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
9081 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"
9086 test "$includedir" != NONE && \
9087 test "$includedir" != "/usr/include" && \
9088 test -d "$includedir" && {
9089 test -d $includedir && cf_search="$cf_search $includedir"
9090 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
9093 test "$oldincludedir" != NONE && \
9094 test "$oldincludedir" != "/usr/include" && \
9095 test -d "$oldincludedir" && {
9096 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
9097 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
9100 cf_search="$cf_search $cf_header_path_list"
9102 test -n "$verbose" && echo search path $cf_search
9103 cf_save2_CPPFLAGS="$CPPFLAGS"
9104 for cf_incdir in $cf_search
9107 if test -n "$cf_incdir" ; then
9108 for cf_add_incdir in $cf_incdir
9110 while test $cf_add_incdir != /usr/include
9112 if test -d $cf_add_incdir
9115 if test -n "$CFLAGS$CPPFLAGS" ; then
9116 # a loop is needed to ensure we can add subdirs of existing dirs
9117 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9118 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9119 cf_have_incdir=yes; break
9124 if test "$cf_have_incdir" = no ; then
9125 if test "$cf_add_incdir" = /usr/local/include ; then
9126 if test "$GCC" = yes
9128 cf_save_CPPFLAGS=$CPPFLAGS
9129 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9130 cat >conftest.$ac_ext <<_ACEOF
9131 #line 9131 "configure"
9132 #include "confdefs.h"
9142 rm -f conftest.$ac_objext
9143 if { (eval echo "$as_me:9143: \"$ac_compile\"") >&5
9144 (eval $ac_compile) 2>&5
9146 echo "$as_me:9146: \$? = $ac_status" >&5
9147 (exit $ac_status); } &&
9148 { ac_try='test -s conftest.$ac_objext'
9149 { (eval echo "$as_me:9149: \"$ac_try\"") >&5
9152 echo "$as_me:9152: \$? = $ac_status" >&5
9153 (exit $ac_status); }; }; then
9156 echo "$as_me: failed program was:" >&5
9157 cat conftest.$ac_ext >&5
9160 rm -f conftest.$ac_objext conftest.$ac_ext
9161 CPPFLAGS=$cf_save_CPPFLAGS
9166 if test "$cf_have_incdir" = no ; then
9167 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9169 echo "${as_me:-configure}:9169: testing adding $cf_add_incdir to include-path ..." 1>&5
9171 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9173 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9174 test "$cf_top_incdir" = "$cf_add_incdir" && break
9175 cf_add_incdir="$cf_top_incdir"
9191 cat >conftest.$ac_ext <<_ACEOF
9192 #line 9192 "configure"
9193 #include "confdefs.h"
9195 #include <$cf_header>
9200 #ifdef NCURSES_VERSION
9202 printf("%s\n", NCURSES_VERSION);
9215 rm -f conftest.$ac_objext
9216 if { (eval echo "$as_me:9216: \"$ac_compile\"") >&5
9217 (eval $ac_compile) 2>&5
9219 echo "$as_me:9219: \$? = $ac_status" >&5
9220 (exit $ac_status); } &&
9221 { ac_try='test -s conftest.$ac_objext'
9222 { (eval echo "$as_me:9222: \"$ac_try\"") >&5
9225 echo "$as_me:9225: \$? = $ac_status" >&5
9226 (exit $ac_status); }; }; then
9227 cf_cv_ncurses_h2=$cf_header
9230 echo "$as_me: failed program was:" >&5
9231 cat conftest.$ac_ext >&5
9234 rm -f conftest.$ac_objext conftest.$ac_ext
9236 if test "$cf_cv_ncurses_h2" != no ; then
9237 cf_cv_ncurses_h2=$cf_incdir/$cf_header
9238 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
9241 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
9243 CPPFLAGS="$cf_save2_CPPFLAGS"
9244 test "$cf_cv_ncurses_h2" != no && break
9246 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9246: error: not found" >&5
9247 echo "$as_me: error: not found" >&2;}
9248 { (exit 1); exit 1; }; }
9251 echo "$as_me:9251: result: $cf_cv_ncurses_h2" >&5
9252 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
9254 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
9255 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
9256 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
9257 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
9260 if test -n "$cf_1st_incdir" ; then
9261 for cf_add_incdir in $cf_1st_incdir
9263 while test $cf_add_incdir != /usr/include
9265 if test -d $cf_add_incdir
9268 if test -n "$CFLAGS$CPPFLAGS" ; then
9269 # a loop is needed to ensure we can add subdirs of existing dirs
9270 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9271 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9272 cf_have_incdir=yes; break
9277 if test "$cf_have_incdir" = no ; then
9278 if test "$cf_add_incdir" = /usr/local/include ; then
9279 if test "$GCC" = yes
9281 cf_save_CPPFLAGS=$CPPFLAGS
9282 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9283 cat >conftest.$ac_ext <<_ACEOF
9284 #line 9284 "configure"
9285 #include "confdefs.h"
9295 rm -f conftest.$ac_objext
9296 if { (eval echo "$as_me:9296: \"$ac_compile\"") >&5
9297 (eval $ac_compile) 2>&5
9299 echo "$as_me:9299: \$? = $ac_status" >&5
9300 (exit $ac_status); } &&
9301 { ac_try='test -s conftest.$ac_objext'
9302 { (eval echo "$as_me:9302: \"$ac_try\"") >&5
9305 echo "$as_me:9305: \$? = $ac_status" >&5
9306 (exit $ac_status); }; }; then
9309 echo "$as_me: failed program was:" >&5
9310 cat conftest.$ac_ext >&5
9313 rm -f conftest.$ac_objext conftest.$ac_ext
9314 CPPFLAGS=$cf_save_CPPFLAGS
9319 if test "$cf_have_incdir" = no ; then
9320 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9322 echo "${as_me:-configure}:9322: testing adding $cf_add_incdir to include-path ..." 1>&5
9324 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9326 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9327 test "$cf_top_incdir" = "$cf_add_incdir" && break
9328 cf_add_incdir="$cf_top_incdir"
9341 # Set definitions to allow ifdef'ing for ncurses.h
9343 case $cf_cv_ncurses_header in
9346 cat >>confdefs.h <<\EOF
9347 #define HAVE_NCURSES_H 1
9353 case $cf_cv_ncurses_header in
9354 (ncurses/curses.h|ncurses/ncurses.h)
9356 cat >>confdefs.h <<\EOF
9357 #define HAVE_NCURSES_NCURSES_H 1
9361 (ncursesw/curses.h|ncursesw/ncurses.h)
9363 cat >>confdefs.h <<\EOF
9364 #define HAVE_NCURSESW_NCURSES_H 1
9370 echo "$as_me:9370: checking for terminfo header" >&5
9371 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9372 if test "${cf_cv_term_header+set}" = set; then
9373 echo $ECHO_N "(cached) $ECHO_C" >&6
9376 case ${cf_cv_ncurses_header} in
9377 (*/ncurses.h|*/ncursesw.h)
9378 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9381 cf_term_header=term.h
9385 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9387 cat >conftest.$ac_ext <<_ACEOF
9388 #line 9388 "configure"
9389 #include "confdefs.h"
9391 #include <${cf_cv_ncurses_header:-curses.h}>
9397 int x = auto_left_margin
9402 rm -f conftest.$ac_objext
9403 if { (eval echo "$as_me:9403: \"$ac_compile\"") >&5
9404 (eval $ac_compile) 2>&5
9406 echo "$as_me:9406: \$? = $ac_status" >&5
9407 (exit $ac_status); } &&
9408 { ac_try='test -s conftest.$ac_objext'
9409 { (eval echo "$as_me:9409: \"$ac_try\"") >&5
9412 echo "$as_me:9412: \$? = $ac_status" >&5
9413 (exit $ac_status); }; }; then
9415 cf_cv_term_header="$cf_test"
9417 echo "$as_me: failed program was:" >&5
9418 cat conftest.$ac_ext >&5
9420 cf_cv_term_header=unknown
9423 rm -f conftest.$ac_objext conftest.$ac_ext
9424 test "$cf_cv_term_header" != unknown && break
9428 echo "$as_me:9428: result: $cf_cv_term_header" >&5
9429 echo "${ECHO_T}$cf_cv_term_header" >&6
9431 # Set definitions to allow ifdef'ing to accommodate subdirectories
9433 case $cf_cv_term_header in
9436 cat >>confdefs.h <<\EOF
9437 #define HAVE_TERM_H 1
9443 case $cf_cv_term_header in
9446 cat >>confdefs.h <<\EOF
9447 #define HAVE_NCURSES_TERM_H 1
9453 cat >>confdefs.h <<\EOF
9454 #define HAVE_NCURSESW_TERM_H 1
9460 # some applications need this, but should check for NCURSES_VERSION
9462 cat >>confdefs.h <<\EOF
9466 echo "$as_me:9466: checking for ncurses version" >&5
9467 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9468 if test "${cf_cv_ncurses_version+set}" = set; then
9469 echo $ECHO_N "(cached) $ECHO_C" >&6
9472 cf_cv_ncurses_version=no
9475 if test "$cross_compiling" = yes; then
9477 # This will not work if the preprocessor splits the line after the
9478 # Autoconf token. The 'unproto' program does that.
9479 cat > conftest.$ac_ext <<EOF
9480 #include <${cf_cv_ncurses_header:-curses.h}>
9482 #ifdef NCURSES_VERSION
9483 Autoconf NCURSES_VERSION
9491 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9492 { (eval echo "$as_me:9492: \"$cf_try\"") >&5
9495 echo "$as_me:9495: \$? = $ac_status" >&5
9496 (exit $ac_status); }
9497 if test -f conftest.out ; then
9498 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
9499 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9504 cat >conftest.$ac_ext <<_ACEOF
9505 #line 9505 "configure"
9506 #include "confdefs.h"
9508 #include <${cf_cv_ncurses_header:-curses.h}>
9512 FILE *fp = fopen("$cf_tempfile", "w");
9513 #ifdef NCURSES_VERSION
9514 # ifdef NCURSES_VERSION_PATCH
9515 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9517 fprintf(fp, "%s\n", NCURSES_VERSION);
9521 fprintf(fp, "old\n");
9526 ${cf_cv_main_return:-return}(0);
9529 rm -f conftest$ac_exeext
9530 if { (eval echo "$as_me:9530: \"$ac_link\"") >&5
9531 (eval $ac_link) 2>&5
9533 echo "$as_me:9533: \$? = $ac_status" >&5
9534 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9535 { (eval echo "$as_me:9535: \"$ac_try\"") >&5
9538 echo "$as_me:9538: \$? = $ac_status" >&5
9539 (exit $ac_status); }; }; then
9541 cf_cv_ncurses_version=`cat $cf_tempfile`
9543 echo "$as_me: program exited with status $ac_status" >&5
9544 echo "$as_me: failed program was:" >&5
9545 cat conftest.$ac_ext >&5
9547 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9552 echo "$as_me:9552: result: $cf_cv_ncurses_version" >&5
9553 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9554 test "$cf_cv_ncurses_version" = no ||
9555 cat >>confdefs.h <<\EOF
9559 cf_nculib_root=$cf_cv_screen
9560 # This works, except for the special case where we find gpm, but
9561 # ncurses is in a nonstandard location via $LIBS, and we really want
9564 cf_ncurses_SAVE="$LIBS"
9565 echo "$as_me:9565: checking for Gpm_Open in -lgpm" >&5
9566 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9567 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9568 echo $ECHO_N "(cached) $ECHO_C" >&6
9570 ac_check_lib_save_LIBS=$LIBS
9572 cat >conftest.$ac_ext <<_ACEOF
9573 #line 9573 "configure"
9574 #include "confdefs.h"
9576 /* Override any gcc2 internal prototype to avoid an error. */
9580 /* We use char because int might match the return type of a gcc2
9581 builtin and then its argument prototype would still apply. */
9591 rm -f conftest.$ac_objext conftest$ac_exeext
9592 if { (eval echo "$as_me:9592: \"$ac_link\"") >&5
9593 (eval $ac_link) 2>&5
9595 echo "$as_me:9595: \$? = $ac_status" >&5
9596 (exit $ac_status); } &&
9597 { ac_try='test -s conftest$ac_exeext'
9598 { (eval echo "$as_me:9598: \"$ac_try\"") >&5
9601 echo "$as_me:9601: \$? = $ac_status" >&5
9602 (exit $ac_status); }; }; then
9603 ac_cv_lib_gpm_Gpm_Open=yes
9605 echo "$as_me: failed program was:" >&5
9606 cat conftest.$ac_ext >&5
9607 ac_cv_lib_gpm_Gpm_Open=no
9609 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9610 LIBS=$ac_check_lib_save_LIBS
9612 echo "$as_me:9612: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9613 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9614 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
9615 echo "$as_me:9615: checking for initscr in -lgpm" >&5
9616 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9617 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9618 echo $ECHO_N "(cached) $ECHO_C" >&6
9620 ac_check_lib_save_LIBS=$LIBS
9622 cat >conftest.$ac_ext <<_ACEOF
9623 #line 9623 "configure"
9624 #include "confdefs.h"
9626 /* Override any gcc2 internal prototype to avoid an error. */
9630 /* We use char because int might match the return type of a gcc2
9631 builtin and then its argument prototype would still apply. */
9641 rm -f conftest.$ac_objext conftest$ac_exeext
9642 if { (eval echo "$as_me:9642: \"$ac_link\"") >&5
9643 (eval $ac_link) 2>&5
9645 echo "$as_me:9645: \$? = $ac_status" >&5
9646 (exit $ac_status); } &&
9647 { ac_try='test -s conftest$ac_exeext'
9648 { (eval echo "$as_me:9648: \"$ac_try\"") >&5
9651 echo "$as_me:9651: \$? = $ac_status" >&5
9652 (exit $ac_status); }; }; then
9653 ac_cv_lib_gpm_initscr=yes
9655 echo "$as_me: failed program was:" >&5
9656 cat conftest.$ac_ext >&5
9657 ac_cv_lib_gpm_initscr=no
9659 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9660 LIBS=$ac_check_lib_save_LIBS
9662 echo "$as_me:9662: result: $ac_cv_lib_gpm_initscr" >&5
9663 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9664 if test $ac_cv_lib_gpm_initscr = yes; then
9665 LIBS="$cf_ncurses_SAVE"
9667 cf_ncurses_LIBS="-lgpm"
9674 # This is only necessary if you are linking against an obsolete
9675 # version of ncurses (but it should do no harm, since it's static).
9676 if test "$cf_nculib_root" = ncurses ; then
9677 echo "$as_me:9677: checking for tgoto in -lmytinfo" >&5
9678 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9679 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9680 echo $ECHO_N "(cached) $ECHO_C" >&6
9682 ac_check_lib_save_LIBS=$LIBS
9683 LIBS="-lmytinfo $LIBS"
9684 cat >conftest.$ac_ext <<_ACEOF
9685 #line 9685 "configure"
9686 #include "confdefs.h"
9688 /* Override any gcc2 internal prototype to avoid an error. */
9692 /* We use char because int might match the return type of a gcc2
9693 builtin and then its argument prototype would still apply. */
9703 rm -f conftest.$ac_objext conftest$ac_exeext
9704 if { (eval echo "$as_me:9704: \"$ac_link\"") >&5
9705 (eval $ac_link) 2>&5
9707 echo "$as_me:9707: \$? = $ac_status" >&5
9708 (exit $ac_status); } &&
9709 { ac_try='test -s conftest$ac_exeext'
9710 { (eval echo "$as_me:9710: \"$ac_try\"") >&5
9713 echo "$as_me:9713: \$? = $ac_status" >&5
9714 (exit $ac_status); }; }; then
9715 ac_cv_lib_mytinfo_tgoto=yes
9717 echo "$as_me: failed program was:" >&5
9718 cat conftest.$ac_ext >&5
9719 ac_cv_lib_mytinfo_tgoto=no
9721 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9722 LIBS=$ac_check_lib_save_LIBS
9724 echo "$as_me:9724: result: $ac_cv_lib_mytinfo_tgoto" >&5
9725 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9726 if test $ac_cv_lib_mytinfo_tgoto = yes; then
9727 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9734 cf_add_libs="$cf_ncurses_LIBS"
9735 # Filter out duplicates - this happens with badly-designed ".pc" files...
9736 for cf_add_1lib in $LIBS
9738 for cf_add_2lib in $cf_add_libs
9740 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9746 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9750 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
9753 cf_add_libs="-l$cf_nculib_root"
9754 # Filter out duplicates - this happens with badly-designed ".pc" files...
9755 for cf_add_1lib in $LIBS
9757 for cf_add_2lib in $cf_add_libs
9759 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9765 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9771 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9773 echo "$as_me:9773: checking for initscr" >&5
9774 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9775 if test "${ac_cv_func_initscr+set}" = set; then
9776 echo $ECHO_N "(cached) $ECHO_C" >&6
9778 cat >conftest.$ac_ext <<_ACEOF
9779 #line 9779 "configure"
9780 #include "confdefs.h"
9781 /* System header to define __stub macros and hopefully few prototypes,
9782 which can conflict with char initscr (); below. */
9784 /* Override any gcc2 internal prototype to avoid an error. */
9788 /* We use char because int might match the return type of a gcc2
9789 builtin and then its argument prototype would still apply. */
9796 /* The GNU C library defines this for functions which it implements
9797 to always fail with ENOSYS. Some functions are actually named
9798 something starting with __ and the normal name is an alias. */
9799 #if defined (__stub_initscr) || defined (__stub___initscr)
9802 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9809 rm -f conftest.$ac_objext conftest$ac_exeext
9810 if { (eval echo "$as_me:9810: \"$ac_link\"") >&5
9811 (eval $ac_link) 2>&5
9813 echo "$as_me:9813: \$? = $ac_status" >&5
9814 (exit $ac_status); } &&
9815 { ac_try='test -s conftest$ac_exeext'
9816 { (eval echo "$as_me:9816: \"$ac_try\"") >&5
9819 echo "$as_me:9819: \$? = $ac_status" >&5
9820 (exit $ac_status); }; }; then
9821 ac_cv_func_initscr=yes
9823 echo "$as_me: failed program was:" >&5
9824 cat conftest.$ac_ext >&5
9825 ac_cv_func_initscr=no
9827 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9829 echo "$as_me:9829: result: $ac_cv_func_initscr" >&5
9830 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9831 if test $ac_cv_func_initscr = yes; then
9832 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9835 cf_save_LIBS="$LIBS"
9836 echo "$as_me:9836: checking for initscr in -l$cf_nculib_root" >&5
9837 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9838 LIBS="-l$cf_nculib_root $LIBS"
9839 cat >conftest.$ac_ext <<_ACEOF
9840 #line 9840 "configure"
9841 #include "confdefs.h"
9842 #include <${cf_cv_ncurses_header:-curses.h}>
9851 rm -f conftest.$ac_objext conftest$ac_exeext
9852 if { (eval echo "$as_me:9852: \"$ac_link\"") >&5
9853 (eval $ac_link) 2>&5
9855 echo "$as_me:9855: \$? = $ac_status" >&5
9856 (exit $ac_status); } &&
9857 { ac_try='test -s conftest$ac_exeext'
9858 { (eval echo "$as_me:9858: \"$ac_try\"") >&5
9861 echo "$as_me:9861: \$? = $ac_status" >&5
9862 (exit $ac_status); }; }; then
9863 echo "$as_me:9863: result: yes" >&5
9864 echo "${ECHO_T}yes" >&6
9865 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9868 echo "$as_me: failed program was:" >&5
9869 cat conftest.$ac_ext >&5
9870 echo "$as_me:9870: result: no" >&5
9871 echo "${ECHO_T}no" >&6
9874 cf_library_path_list=""
9875 if test -n "${LDFLAGS}${LIBS}" ; then
9876 for cf_library_path in $LDFLAGS $LIBS
9878 case $cf_library_path in
9880 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9882 test "x$cf_library_path" != "xNONE" && \
9883 test -d "$cf_library_path" && \
9885 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9886 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9887 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9888 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9889 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9890 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"
9893 cf_library_path_list="$cf_library_path_list $cf_search"
9901 test "x$prefix" != "xNONE" && \
9902 test -d "$prefix" && \
9904 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9905 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9906 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9907 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9908 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9909 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9912 for cf_subdir_prefix in \
9921 test "x$cf_subdir_prefix" != "x$prefix" && \
9922 test -d "$cf_subdir_prefix" && \
9923 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9924 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9925 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
9926 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9927 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9928 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9929 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"
9934 cf_search="$cf_library_path_list $cf_search"
9936 for cf_libdir in $cf_search
9938 echo "$as_me:9938: checking for -l$cf_nculib_root in $cf_libdir" >&5
9939 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9940 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9941 cat >conftest.$ac_ext <<_ACEOF
9942 #line 9942 "configure"
9943 #include "confdefs.h"
9944 #include <${cf_cv_ncurses_header:-curses.h}>
9953 rm -f conftest.$ac_objext conftest$ac_exeext
9954 if { (eval echo "$as_me:9954: \"$ac_link\"") >&5
9955 (eval $ac_link) 2>&5
9957 echo "$as_me:9957: \$? = $ac_status" >&5
9958 (exit $ac_status); } &&
9959 { ac_try='test -s conftest$ac_exeext'
9960 { (eval echo "$as_me:9960: \"$ac_try\"") >&5
9963 echo "$as_me:9963: \$? = $ac_status" >&5
9964 (exit $ac_status); }; }; then
9965 echo "$as_me:9965: result: yes" >&5
9966 echo "${ECHO_T}yes" >&6
9967 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9970 echo "$as_me: failed program was:" >&5
9971 cat conftest.$ac_ext >&5
9972 echo "$as_me:9972: result: no" >&5
9973 echo "${ECHO_T}no" >&6
9974 LIBS="$cf_save_LIBS"
9976 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9980 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9984 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9986 if test $cf_found_library = no ; then
9987 { { echo "$as_me:9987: error: Cannot link $cf_nculib_root library" >&5
9988 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9989 { (exit 1); exit 1; }; }
9994 if test -n "$cf_ncurses_LIBS" ; then
9995 echo "$as_me:9995: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9996 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9997 cf_ncurses_SAVE="$LIBS"
9998 for p in $cf_ncurses_LIBS ; do
9999 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
10000 if test "$q" != "$LIBS" ; then
10004 cat >conftest.$ac_ext <<_ACEOF
10005 #line 10005 "configure"
10006 #include "confdefs.h"
10007 #include <${cf_cv_ncurses_header:-curses.h}>
10011 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
10016 rm -f conftest.$ac_objext conftest$ac_exeext
10017 if { (eval echo "$as_me:10017: \"$ac_link\"") >&5
10018 (eval $ac_link) 2>&5
10020 echo "$as_me:10020: \$? = $ac_status" >&5
10021 (exit $ac_status); } &&
10022 { ac_try='test -s conftest$ac_exeext'
10023 { (eval echo "$as_me:10023: \"$ac_try\"") >&5
10024 (eval $ac_try) 2>&5
10026 echo "$as_me:10026: \$? = $ac_status" >&5
10027 (exit $ac_status); }; }; then
10028 echo "$as_me:10028: result: yes" >&5
10029 echo "${ECHO_T}yes" >&6
10031 echo "$as_me: failed program was:" >&5
10032 cat conftest.$ac_ext >&5
10033 echo "$as_me:10033: result: no" >&5
10034 echo "${ECHO_T}no" >&6
10035 LIBS="$cf_ncurses_SAVE"
10037 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10040 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10042 cat >>confdefs.h <<EOF
10043 #define $cf_nculib_ROOT 1
10048 NCURSES_CONFIG=none
10053 echo "$as_me:10053: checking for X" >&5
10054 echo $ECHO_N "checking for X... $ECHO_C" >&6
10056 # Check whether --with-x or --without-x was given.
10057 if test "${with_x+set}" = set; then
10061 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
10062 if test "x$with_x" = xno; then
10063 # The user explicitly disabled X.
10066 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
10067 # Both variables are already set.
10070 if test "${ac_cv_have_x+set}" = set; then
10071 echo $ECHO_N "(cached) $ECHO_C" >&6
10073 # One or both of the vars are not set, and there is no cached value.
10074 ac_x_includes=no ac_x_libraries=no
10075 rm -fr conftest.dir
10076 if mkdir conftest.dir; then
10078 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
10079 cat >Imakefile <<'EOF'
10081 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
10083 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
10084 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
10085 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
10086 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
10087 for ac_extension in a so sl dylib dll; do
10088 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
10089 test -f $ac_im_libdir/libX11.$ac_extension; then
10090 ac_im_usrlibdir=$ac_im_libdir; break
10093 # Screen out bogus values from the imake configuration. They are
10094 # bogus both because they are the default anyway, and because
10095 # using them would break gcc on systems where it needs fixed includes.
10096 case $ac_im_incroot in
10098 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
10100 case $ac_im_usrlibdir in
10101 /usr/lib | /lib) ;;
10102 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
10106 rm -fr conftest.dir
10109 # Standard set of common directories for X headers.
10110 # Check X11 before X11Rn because it is often a symlink to the current release.
10122 /usr/local/X11/include
10123 /usr/local/X11R6/include
10124 /usr/local/X11R5/include
10125 /usr/local/X11R4/include
10127 /usr/local/include/X11
10128 /usr/local/include/X11R6
10129 /usr/local/include/X11R5
10130 /usr/local/include/X11R4
10134 /usr/XFree86/include/X11
10138 /usr/unsupported/include
10139 /usr/athena/include
10140 /usr/local/x11r5/include
10141 /usr/lpp/Xamples/include
10143 /usr/openwin/include
10144 /usr/openwin/share/include'
10146 if test "$ac_x_includes" = no; then
10147 # Guess where to find include files, by looking for Intrinsic.h.
10148 # First, try using that file with no special directory specified.
10149 cat >conftest.$ac_ext <<_ACEOF
10150 #line 10150 "configure"
10151 #include "confdefs.h"
10152 #include <X11/Intrinsic.h>
10154 if { (eval echo "$as_me:10154: \"$ac_cpp conftest.$ac_ext\"") >&5
10155 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10157 egrep -v '^ *\+' conftest.er1 >conftest.err
10159 cat conftest.err >&5
10160 echo "$as_me:10160: \$? = $ac_status" >&5
10161 (exit $ac_status); } >/dev/null; then
10162 if test -s conftest.err; then
10163 ac_cpp_err=$ac_c_preproc_warn_flag
10170 if test -z "$ac_cpp_err"; then
10171 # We can compile using X headers with no special include directory.
10174 echo "$as_me: failed program was:" >&5
10175 cat conftest.$ac_ext >&5
10176 for ac_dir in $ac_x_header_dirs; do
10177 if test -r "$ac_dir/X11/Intrinsic.h"; then
10178 ac_x_includes=$ac_dir
10183 rm -f conftest.err conftest.$ac_ext
10184 fi # $ac_x_includes = no
10186 if test "$ac_x_libraries" = no; then
10187 # Check for the libraries.
10188 # See if we find them without any special options.
10189 # Don't add to $LIBS permanently.
10192 cat >conftest.$ac_ext <<_ACEOF
10193 #line 10193 "configure"
10194 #include "confdefs.h"
10195 #include <X11/Intrinsic.h>
10204 rm -f conftest.$ac_objext conftest$ac_exeext
10205 if { (eval echo "$as_me:10205: \"$ac_link\"") >&5
10206 (eval $ac_link) 2>&5
10208 echo "$as_me:10208: \$? = $ac_status" >&5
10209 (exit $ac_status); } &&
10210 { ac_try='test -s conftest$ac_exeext'
10211 { (eval echo "$as_me:10211: \"$ac_try\"") >&5
10212 (eval $ac_try) 2>&5
10214 echo "$as_me:10214: \$? = $ac_status" >&5
10215 (exit $ac_status); }; }; then
10217 # We can link X programs with no special library path.
10220 echo "$as_me: failed program was:" >&5
10221 cat conftest.$ac_ext >&5
10223 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
10225 # Don't even attempt the hair of trying to link an X program!
10226 for ac_extension in a so sl dylib dll; do
10227 if test -r $ac_dir/libXt.$ac_extension; then
10228 ac_x_libraries=$ac_dir
10234 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10235 fi # $ac_x_libraries = no
10237 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
10238 # Didn't find X anywhere. Cache the known absence of X.
10239 ac_cv_have_x="have_x=no"
10241 # Record where we found X for the cache.
10242 ac_cv_have_x="have_x=yes \
10243 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
10248 eval "$ac_cv_have_x"
10251 if test "$have_x" != yes; then
10252 echo "$as_me:10252: result: $have_x" >&5
10253 echo "${ECHO_T}$have_x" >&6
10256 # If each of the values was on the command line, it overrides each guess.
10257 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
10258 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
10259 # Update the cache value to reflect the command line values.
10260 ac_cv_have_x="have_x=yes \
10261 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
10262 echo "$as_me:10262: result: libraries $x_libraries, headers $x_includes" >&5
10263 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
10266 if test "$no_x" = yes; then
10267 # Not all programs may use this symbol, but it does not hurt to define it.
10269 cat >>confdefs.h <<\EOF
10270 #define X_DISPLAY_MISSING 1
10273 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
10275 if test -n "$x_includes"; then
10276 X_CFLAGS="$X_CFLAGS -I$x_includes"
10279 # It would also be nice to do this for all -L options, not just this one.
10280 if test -n "$x_libraries"; then
10281 X_LIBS="$X_LIBS -L$x_libraries"
10282 # For Solaris; some versions of Sun CC require a space after -R and
10283 # others require no space. Words are not sufficient . . . .
10284 case `(uname -sr) 2>/dev/null` in
10286 echo "$as_me:10286: checking whether -R must be followed by a space" >&5
10287 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
10288 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
10289 cat >conftest.$ac_ext <<_ACEOF
10290 #line 10290 "configure"
10291 #include "confdefs.h"
10301 rm -f conftest.$ac_objext conftest$ac_exeext
10302 if { (eval echo "$as_me:10302: \"$ac_link\"") >&5
10303 (eval $ac_link) 2>&5
10305 echo "$as_me:10305: \$? = $ac_status" >&5
10306 (exit $ac_status); } &&
10307 { ac_try='test -s conftest$ac_exeext'
10308 { (eval echo "$as_me:10308: \"$ac_try\"") >&5
10309 (eval $ac_try) 2>&5
10311 echo "$as_me:10311: \$? = $ac_status" >&5
10312 (exit $ac_status); }; }; then
10315 echo "$as_me: failed program was:" >&5
10316 cat conftest.$ac_ext >&5
10319 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10320 if test $ac_R_nospace = yes; then
10321 echo "$as_me:10321: result: no" >&5
10322 echo "${ECHO_T}no" >&6
10323 X_LIBS="$X_LIBS -R$x_libraries"
10325 LIBS="$ac_xsave_LIBS -R $x_libraries"
10326 cat >conftest.$ac_ext <<_ACEOF
10327 #line 10327 "configure"
10328 #include "confdefs.h"
10338 rm -f conftest.$ac_objext conftest$ac_exeext
10339 if { (eval echo "$as_me:10339: \"$ac_link\"") >&5
10340 (eval $ac_link) 2>&5
10342 echo "$as_me:10342: \$? = $ac_status" >&5
10343 (exit $ac_status); } &&
10344 { ac_try='test -s conftest$ac_exeext'
10345 { (eval echo "$as_me:10345: \"$ac_try\"") >&5
10346 (eval $ac_try) 2>&5
10348 echo "$as_me:10348: \$? = $ac_status" >&5
10349 (exit $ac_status); }; }; then
10352 echo "$as_me: failed program was:" >&5
10353 cat conftest.$ac_ext >&5
10356 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10357 if test $ac_R_space = yes; then
10358 echo "$as_me:10358: result: yes" >&5
10359 echo "${ECHO_T}yes" >&6
10360 X_LIBS="$X_LIBS -R $x_libraries"
10362 echo "$as_me:10362: result: neither works" >&5
10363 echo "${ECHO_T}neither works" >&6
10366 LIBS=$ac_xsave_LIBS
10370 # Check for system-dependent libraries X programs must link with.
10371 # Do this before checking for the system-independent R6 libraries
10372 # (-lICE), since we may need -lsocket or whatever for X linking.
10374 if test "$ISC" = yes; then
10375 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
10377 # Martyn Johnson says this is needed for Ultrix, if the X
10378 # libraries were built with DECnet support. And Karl Berry says
10379 # the Alpha needs dnet_stub (dnet does not exist).
10380 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
10381 cat >conftest.$ac_ext <<_ACEOF
10382 #line 10382 "configure"
10383 #include "confdefs.h"
10385 /* Override any gcc2 internal prototype to avoid an error. */
10389 /* We use char because int might match the return type of a gcc2
10390 builtin and then its argument prototype would still apply. */
10391 char XOpenDisplay ();
10400 rm -f conftest.$ac_objext conftest$ac_exeext
10401 if { (eval echo "$as_me:10401: \"$ac_link\"") >&5
10402 (eval $ac_link) 2>&5
10404 echo "$as_me:10404: \$? = $ac_status" >&5
10405 (exit $ac_status); } &&
10406 { ac_try='test -s conftest$ac_exeext'
10407 { (eval echo "$as_me:10407: \"$ac_try\"") >&5
10408 (eval $ac_try) 2>&5
10410 echo "$as_me:10410: \$? = $ac_status" >&5
10411 (exit $ac_status); }; }; then
10414 echo "$as_me: failed program was:" >&5
10415 cat conftest.$ac_ext >&5
10416 echo "$as_me:10416: checking for dnet_ntoa in -ldnet" >&5
10417 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
10418 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10419 echo $ECHO_N "(cached) $ECHO_C" >&6
10421 ac_check_lib_save_LIBS=$LIBS
10422 LIBS="-ldnet $LIBS"
10423 cat >conftest.$ac_ext <<_ACEOF
10424 #line 10424 "configure"
10425 #include "confdefs.h"
10427 /* Override any gcc2 internal prototype to avoid an error. */
10431 /* We use char because int might match the return type of a gcc2
10432 builtin and then its argument prototype would still apply. */
10442 rm -f conftest.$ac_objext conftest$ac_exeext
10443 if { (eval echo "$as_me:10443: \"$ac_link\"") >&5
10444 (eval $ac_link) 2>&5
10446 echo "$as_me:10446: \$? = $ac_status" >&5
10447 (exit $ac_status); } &&
10448 { ac_try='test -s conftest$ac_exeext'
10449 { (eval echo "$as_me:10449: \"$ac_try\"") >&5
10450 (eval $ac_try) 2>&5
10452 echo "$as_me:10452: \$? = $ac_status" >&5
10453 (exit $ac_status); }; }; then
10454 ac_cv_lib_dnet_dnet_ntoa=yes
10456 echo "$as_me: failed program was:" >&5
10457 cat conftest.$ac_ext >&5
10458 ac_cv_lib_dnet_dnet_ntoa=no
10460 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10461 LIBS=$ac_check_lib_save_LIBS
10463 echo "$as_me:10463: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10464 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
10465 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
10466 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
10469 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
10470 echo "$as_me:10470: checking for dnet_ntoa in -ldnet_stub" >&5
10471 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
10472 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
10473 echo $ECHO_N "(cached) $ECHO_C" >&6
10475 ac_check_lib_save_LIBS=$LIBS
10476 LIBS="-ldnet_stub $LIBS"
10477 cat >conftest.$ac_ext <<_ACEOF
10478 #line 10478 "configure"
10479 #include "confdefs.h"
10481 /* Override any gcc2 internal prototype to avoid an error. */
10485 /* We use char because int might match the return type of a gcc2
10486 builtin and then its argument prototype would still apply. */
10496 rm -f conftest.$ac_objext conftest$ac_exeext
10497 if { (eval echo "$as_me:10497: \"$ac_link\"") >&5
10498 (eval $ac_link) 2>&5
10500 echo "$as_me:10500: \$? = $ac_status" >&5
10501 (exit $ac_status); } &&
10502 { ac_try='test -s conftest$ac_exeext'
10503 { (eval echo "$as_me:10503: \"$ac_try\"") >&5
10504 (eval $ac_try) 2>&5
10506 echo "$as_me:10506: \$? = $ac_status" >&5
10507 (exit $ac_status); }; }; then
10508 ac_cv_lib_dnet_stub_dnet_ntoa=yes
10510 echo "$as_me: failed program was:" >&5
10511 cat conftest.$ac_ext >&5
10512 ac_cv_lib_dnet_stub_dnet_ntoa=no
10514 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10515 LIBS=$ac_check_lib_save_LIBS
10517 echo "$as_me:10517: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
10518 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
10519 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
10520 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
10525 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10526 LIBS="$ac_xsave_LIBS"
10528 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
10529 # to get the SysV transport functions.
10530 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
10532 # The nsl library prevents programs from opening the X display
10533 # on Irix 5.2, according to T.E. Dickey.
10534 # The functions gethostbyname, getservbyname, and inet_addr are
10535 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
10536 echo "$as_me:10536: checking for gethostbyname" >&5
10537 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
10538 if test "${ac_cv_func_gethostbyname+set}" = set; then
10539 echo $ECHO_N "(cached) $ECHO_C" >&6
10541 cat >conftest.$ac_ext <<_ACEOF
10542 #line 10542 "configure"
10543 #include "confdefs.h"
10544 /* System header to define __stub macros and hopefully few prototypes,
10545 which can conflict with char gethostbyname (); below. */
10546 #include <assert.h>
10547 /* Override any gcc2 internal prototype to avoid an error. */
10551 /* We use char because int might match the return type of a gcc2
10552 builtin and then its argument prototype would still apply. */
10553 char gethostbyname ();
10559 /* The GNU C library defines this for functions which it implements
10560 to always fail with ENOSYS. Some functions are actually named
10561 something starting with __ and the normal name is an alias. */
10562 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
10565 f = gethostbyname; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10572 rm -f conftest.$ac_objext conftest$ac_exeext
10573 if { (eval echo "$as_me:10573: \"$ac_link\"") >&5
10574 (eval $ac_link) 2>&5
10576 echo "$as_me:10576: \$? = $ac_status" >&5
10577 (exit $ac_status); } &&
10578 { ac_try='test -s conftest$ac_exeext'
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 ac_cv_func_gethostbyname=yes
10586 echo "$as_me: failed program was:" >&5
10587 cat conftest.$ac_ext >&5
10588 ac_cv_func_gethostbyname=no
10590 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10592 echo "$as_me:10592: result: $ac_cv_func_gethostbyname" >&5
10593 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
10595 if test $ac_cv_func_gethostbyname = no; then
10596 echo "$as_me:10596: checking for gethostbyname in -lnsl" >&5
10597 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
10598 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
10599 echo $ECHO_N "(cached) $ECHO_C" >&6
10601 ac_check_lib_save_LIBS=$LIBS
10603 cat >conftest.$ac_ext <<_ACEOF
10604 #line 10604 "configure"
10605 #include "confdefs.h"
10607 /* Override any gcc2 internal prototype to avoid an error. */
10611 /* We use char because int might match the return type of a gcc2
10612 builtin and then its argument prototype would still apply. */
10613 char gethostbyname ();
10622 rm -f conftest.$ac_objext conftest$ac_exeext
10623 if { (eval echo "$as_me:10623: \"$ac_link\"") >&5
10624 (eval $ac_link) 2>&5
10626 echo "$as_me:10626: \$? = $ac_status" >&5
10627 (exit $ac_status); } &&
10628 { ac_try='test -s conftest$ac_exeext'
10629 { (eval echo "$as_me:10629: \"$ac_try\"") >&5
10630 (eval $ac_try) 2>&5
10632 echo "$as_me:10632: \$? = $ac_status" >&5
10633 (exit $ac_status); }; }; then
10634 ac_cv_lib_nsl_gethostbyname=yes
10636 echo "$as_me: failed program was:" >&5
10637 cat conftest.$ac_ext >&5
10638 ac_cv_lib_nsl_gethostbyname=no
10640 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10641 LIBS=$ac_check_lib_save_LIBS
10643 echo "$as_me:10643: result: $ac_cv_lib_nsl_gethostbyname" >&5
10644 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
10645 if test $ac_cv_lib_nsl_gethostbyname = yes; then
10646 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
10649 if test $ac_cv_lib_nsl_gethostbyname = no; then
10650 echo "$as_me:10650: checking for gethostbyname in -lbsd" >&5
10651 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
10652 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
10653 echo $ECHO_N "(cached) $ECHO_C" >&6
10655 ac_check_lib_save_LIBS=$LIBS
10657 cat >conftest.$ac_ext <<_ACEOF
10658 #line 10658 "configure"
10659 #include "confdefs.h"
10661 /* Override any gcc2 internal prototype to avoid an error. */
10665 /* We use char because int might match the return type of a gcc2
10666 builtin and then its argument prototype would still apply. */
10667 char gethostbyname ();
10676 rm -f conftest.$ac_objext conftest$ac_exeext
10677 if { (eval echo "$as_me:10677: \"$ac_link\"") >&5
10678 (eval $ac_link) 2>&5
10680 echo "$as_me:10680: \$? = $ac_status" >&5
10681 (exit $ac_status); } &&
10682 { ac_try='test -s conftest$ac_exeext'
10683 { (eval echo "$as_me:10683: \"$ac_try\"") >&5
10684 (eval $ac_try) 2>&5
10686 echo "$as_me:10686: \$? = $ac_status" >&5
10687 (exit $ac_status); }; }; then
10688 ac_cv_lib_bsd_gethostbyname=yes
10690 echo "$as_me: failed program was:" >&5
10691 cat conftest.$ac_ext >&5
10692 ac_cv_lib_bsd_gethostbyname=no
10694 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10695 LIBS=$ac_check_lib_save_LIBS
10697 echo "$as_me:10697: result: $ac_cv_lib_bsd_gethostbyname" >&5
10698 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
10699 if test $ac_cv_lib_bsd_gethostbyname = yes; then
10700 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
10706 # lieder@skyler.mavd.honeywell.com says without -lsocket,
10707 # socket/setsockopt and other routines are undefined under SCO ODT
10708 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
10709 # on later versions), says Simon Leinen: it contains gethostby*
10710 # variants that don't use the nameserver (or something). -lsocket
10711 # must be given before -lnsl if both are needed. We assume that
10712 # if connect needs -lnsl, so does gethostbyname.
10713 echo "$as_me:10713: checking for connect" >&5
10714 echo $ECHO_N "checking for connect... $ECHO_C" >&6
10715 if test "${ac_cv_func_connect+set}" = set; then
10716 echo $ECHO_N "(cached) $ECHO_C" >&6
10718 cat >conftest.$ac_ext <<_ACEOF
10719 #line 10719 "configure"
10720 #include "confdefs.h"
10721 /* System header to define __stub macros and hopefully few prototypes,
10722 which can conflict with char connect (); below. */
10723 #include <assert.h>
10724 /* Override any gcc2 internal prototype to avoid an error. */
10728 /* We use char because int might match the return type of a gcc2
10729 builtin and then its argument prototype would still apply. */
10736 /* The GNU C library defines this for functions which it implements
10737 to always fail with ENOSYS. Some functions are actually named
10738 something starting with __ and the normal name is an alias. */
10739 #if defined (__stub_connect) || defined (__stub___connect)
10742 f = connect; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10749 rm -f conftest.$ac_objext conftest$ac_exeext
10750 if { (eval echo "$as_me:10750: \"$ac_link\"") >&5
10751 (eval $ac_link) 2>&5
10753 echo "$as_me:10753: \$? = $ac_status" >&5
10754 (exit $ac_status); } &&
10755 { ac_try='test -s conftest$ac_exeext'
10756 { (eval echo "$as_me:10756: \"$ac_try\"") >&5
10757 (eval $ac_try) 2>&5
10759 echo "$as_me:10759: \$? = $ac_status" >&5
10760 (exit $ac_status); }; }; then
10761 ac_cv_func_connect=yes
10763 echo "$as_me: failed program was:" >&5
10764 cat conftest.$ac_ext >&5
10765 ac_cv_func_connect=no
10767 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10769 echo "$as_me:10769: result: $ac_cv_func_connect" >&5
10770 echo "${ECHO_T}$ac_cv_func_connect" >&6
10772 if test $ac_cv_func_connect = no; then
10773 echo "$as_me:10773: checking for connect in -lsocket" >&5
10774 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
10775 if test "${ac_cv_lib_socket_connect+set}" = set; then
10776 echo $ECHO_N "(cached) $ECHO_C" >&6
10778 ac_check_lib_save_LIBS=$LIBS
10779 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
10780 cat >conftest.$ac_ext <<_ACEOF
10781 #line 10781 "configure"
10782 #include "confdefs.h"
10784 /* Override any gcc2 internal prototype to avoid an error. */
10788 /* We use char because int might match the return type of a gcc2
10789 builtin and then its argument prototype would still apply. */
10799 rm -f conftest.$ac_objext conftest$ac_exeext
10800 if { (eval echo "$as_me:10800: \"$ac_link\"") >&5
10801 (eval $ac_link) 2>&5
10803 echo "$as_me:10803: \$? = $ac_status" >&5
10804 (exit $ac_status); } &&
10805 { ac_try='test -s conftest$ac_exeext'
10806 { (eval echo "$as_me:10806: \"$ac_try\"") >&5
10807 (eval $ac_try) 2>&5
10809 echo "$as_me:10809: \$? = $ac_status" >&5
10810 (exit $ac_status); }; }; then
10811 ac_cv_lib_socket_connect=yes
10813 echo "$as_me: failed program was:" >&5
10814 cat conftest.$ac_ext >&5
10815 ac_cv_lib_socket_connect=no
10817 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10818 LIBS=$ac_check_lib_save_LIBS
10820 echo "$as_me:10820: result: $ac_cv_lib_socket_connect" >&5
10821 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
10822 if test $ac_cv_lib_socket_connect = yes; then
10823 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
10828 # Guillermo Gomez says -lposix is necessary on A/UX.
10829 echo "$as_me:10829: checking for remove" >&5
10830 echo $ECHO_N "checking for remove... $ECHO_C" >&6
10831 if test "${ac_cv_func_remove+set}" = set; then
10832 echo $ECHO_N "(cached) $ECHO_C" >&6
10834 cat >conftest.$ac_ext <<_ACEOF
10835 #line 10835 "configure"
10836 #include "confdefs.h"
10837 /* System header to define __stub macros and hopefully few prototypes,
10838 which can conflict with char remove (); below. */
10839 #include <assert.h>
10840 /* Override any gcc2 internal prototype to avoid an error. */
10844 /* We use char because int might match the return type of a gcc2
10845 builtin and then its argument prototype would still apply. */
10852 /* The GNU C library defines this for functions which it implements
10853 to always fail with ENOSYS. Some functions are actually named
10854 something starting with __ and the normal name is an alias. */
10855 #if defined (__stub_remove) || defined (__stub___remove)
10858 f = remove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10865 rm -f conftest.$ac_objext conftest$ac_exeext
10866 if { (eval echo "$as_me:10866: \"$ac_link\"") >&5
10867 (eval $ac_link) 2>&5
10869 echo "$as_me:10869: \$? = $ac_status" >&5
10870 (exit $ac_status); } &&
10871 { ac_try='test -s conftest$ac_exeext'
10872 { (eval echo "$as_me:10872: \"$ac_try\"") >&5
10873 (eval $ac_try) 2>&5
10875 echo "$as_me:10875: \$? = $ac_status" >&5
10876 (exit $ac_status); }; }; then
10877 ac_cv_func_remove=yes
10879 echo "$as_me: failed program was:" >&5
10880 cat conftest.$ac_ext >&5
10881 ac_cv_func_remove=no
10883 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10885 echo "$as_me:10885: result: $ac_cv_func_remove" >&5
10886 echo "${ECHO_T}$ac_cv_func_remove" >&6
10888 if test $ac_cv_func_remove = no; then
10889 echo "$as_me:10889: checking for remove in -lposix" >&5
10890 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
10891 if test "${ac_cv_lib_posix_remove+set}" = set; then
10892 echo $ECHO_N "(cached) $ECHO_C" >&6
10894 ac_check_lib_save_LIBS=$LIBS
10895 LIBS="-lposix $LIBS"
10896 cat >conftest.$ac_ext <<_ACEOF
10897 #line 10897 "configure"
10898 #include "confdefs.h"
10900 /* Override any gcc2 internal prototype to avoid an error. */
10904 /* We use char because int might match the return type of a gcc2
10905 builtin and then its argument prototype would still apply. */
10915 rm -f conftest.$ac_objext conftest$ac_exeext
10916 if { (eval echo "$as_me:10916: \"$ac_link\"") >&5
10917 (eval $ac_link) 2>&5
10919 echo "$as_me:10919: \$? = $ac_status" >&5
10920 (exit $ac_status); } &&
10921 { ac_try='test -s conftest$ac_exeext'
10922 { (eval echo "$as_me:10922: \"$ac_try\"") >&5
10923 (eval $ac_try) 2>&5
10925 echo "$as_me:10925: \$? = $ac_status" >&5
10926 (exit $ac_status); }; }; then
10927 ac_cv_lib_posix_remove=yes
10929 echo "$as_me: failed program was:" >&5
10930 cat conftest.$ac_ext >&5
10931 ac_cv_lib_posix_remove=no
10933 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10934 LIBS=$ac_check_lib_save_LIBS
10936 echo "$as_me:10936: result: $ac_cv_lib_posix_remove" >&5
10937 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
10938 if test $ac_cv_lib_posix_remove = yes; then
10939 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
10944 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
10945 echo "$as_me:10945: checking for shmat" >&5
10946 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
10947 if test "${ac_cv_func_shmat+set}" = set; then
10948 echo $ECHO_N "(cached) $ECHO_C" >&6
10950 cat >conftest.$ac_ext <<_ACEOF
10951 #line 10951 "configure"
10952 #include "confdefs.h"
10953 /* System header to define __stub macros and hopefully few prototypes,
10954 which can conflict with char shmat (); below. */
10955 #include <assert.h>
10956 /* Override any gcc2 internal prototype to avoid an error. */
10960 /* We use char because int might match the return type of a gcc2
10961 builtin and then its argument prototype would still apply. */
10968 /* The GNU C library defines this for functions which it implements
10969 to always fail with ENOSYS. Some functions are actually named
10970 something starting with __ and the normal name is an alias. */
10971 #if defined (__stub_shmat) || defined (__stub___shmat)
10974 f = shmat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10981 rm -f conftest.$ac_objext conftest$ac_exeext
10982 if { (eval echo "$as_me:10982: \"$ac_link\"") >&5
10983 (eval $ac_link) 2>&5
10985 echo "$as_me:10985: \$? = $ac_status" >&5
10986 (exit $ac_status); } &&
10987 { ac_try='test -s conftest$ac_exeext'
10988 { (eval echo "$as_me:10988: \"$ac_try\"") >&5
10989 (eval $ac_try) 2>&5
10991 echo "$as_me:10991: \$? = $ac_status" >&5
10992 (exit $ac_status); }; }; then
10993 ac_cv_func_shmat=yes
10995 echo "$as_me: failed program was:" >&5
10996 cat conftest.$ac_ext >&5
10997 ac_cv_func_shmat=no
10999 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11001 echo "$as_me:11001: result: $ac_cv_func_shmat" >&5
11002 echo "${ECHO_T}$ac_cv_func_shmat" >&6
11004 if test $ac_cv_func_shmat = no; then
11005 echo "$as_me:11005: checking for shmat in -lipc" >&5
11006 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
11007 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
11008 echo $ECHO_N "(cached) $ECHO_C" >&6
11010 ac_check_lib_save_LIBS=$LIBS
11012 cat >conftest.$ac_ext <<_ACEOF
11013 #line 11013 "configure"
11014 #include "confdefs.h"
11016 /* Override any gcc2 internal prototype to avoid an error. */
11020 /* We use char because int might match the return type of a gcc2
11021 builtin and then its argument prototype would still apply. */
11031 rm -f conftest.$ac_objext conftest$ac_exeext
11032 if { (eval echo "$as_me:11032: \"$ac_link\"") >&5
11033 (eval $ac_link) 2>&5
11035 echo "$as_me:11035: \$? = $ac_status" >&5
11036 (exit $ac_status); } &&
11037 { ac_try='test -s conftest$ac_exeext'
11038 { (eval echo "$as_me:11038: \"$ac_try\"") >&5
11039 (eval $ac_try) 2>&5
11041 echo "$as_me:11041: \$? = $ac_status" >&5
11042 (exit $ac_status); }; }; then
11043 ac_cv_lib_ipc_shmat=yes
11045 echo "$as_me: failed program was:" >&5
11046 cat conftest.$ac_ext >&5
11047 ac_cv_lib_ipc_shmat=no
11049 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11050 LIBS=$ac_check_lib_save_LIBS
11052 echo "$as_me:11052: result: $ac_cv_lib_ipc_shmat" >&5
11053 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
11054 if test $ac_cv_lib_ipc_shmat = yes; then
11055 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
11061 # Check for libraries that X11R6 Xt/Xaw programs need.
11062 ac_save_LDFLAGS=$LDFLAGS
11063 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
11064 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
11065 # check for ICE first), but we must link in the order -lSM -lICE or
11066 # we get undefined symbols. So assume we have SM if we have ICE.
11067 # These have to be linked with before -lX11, unlike the other
11068 # libraries we check for below, so use a different variable.
11069 # John Interrante, Karl Berry
11070 echo "$as_me:11070: checking for IceConnectionNumber in -lICE" >&5
11071 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
11072 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
11073 echo $ECHO_N "(cached) $ECHO_C" >&6
11075 ac_check_lib_save_LIBS=$LIBS
11076 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
11077 cat >conftest.$ac_ext <<_ACEOF
11078 #line 11078 "configure"
11079 #include "confdefs.h"
11081 /* Override any gcc2 internal prototype to avoid an error. */
11085 /* We use char because int might match the return type of a gcc2
11086 builtin and then its argument prototype would still apply. */
11087 char IceConnectionNumber ();
11091 IceConnectionNumber ();
11096 rm -f conftest.$ac_objext conftest$ac_exeext
11097 if { (eval echo "$as_me:11097: \"$ac_link\"") >&5
11098 (eval $ac_link) 2>&5
11100 echo "$as_me:11100: \$? = $ac_status" >&5
11101 (exit $ac_status); } &&
11102 { ac_try='test -s conftest$ac_exeext'
11103 { (eval echo "$as_me:11103: \"$ac_try\"") >&5
11104 (eval $ac_try) 2>&5
11106 echo "$as_me:11106: \$? = $ac_status" >&5
11107 (exit $ac_status); }; }; then
11108 ac_cv_lib_ICE_IceConnectionNumber=yes
11110 echo "$as_me: failed program was:" >&5
11111 cat conftest.$ac_ext >&5
11112 ac_cv_lib_ICE_IceConnectionNumber=no
11114 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11115 LIBS=$ac_check_lib_save_LIBS
11117 echo "$as_me:11117: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
11118 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
11119 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
11120 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
11123 LDFLAGS=$ac_save_LDFLAGS
11127 cf_x_athena=${cf_x_athena:-Xaw}
11129 echo "$as_me:11129: checking if you want to link with Xaw 3d library" >&5
11130 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
11133 # Check whether --with-Xaw3d or --without-Xaw3d was given.
11134 if test "${with_Xaw3d+set}" = set; then
11135 withval="$with_Xaw3d"
11138 if test "$withval" = yes ; then
11140 echo "$as_me:11140: result: yes" >&5
11141 echo "${ECHO_T}yes" >&6
11143 echo "$as_me:11143: result: no" >&5
11144 echo "${ECHO_T}no" >&6
11147 echo "$as_me:11147: checking if you want to link with Xaw 3d xft library" >&5
11148 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
11151 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
11152 if test "${with_Xaw3dxft+set}" = set; then
11153 withval="$with_Xaw3dxft"
11156 if test "$withval" = yes ; then
11157 cf_x_athena=Xaw3dxft
11158 echo "$as_me:11158: result: yes" >&5
11159 echo "${ECHO_T}yes" >&6
11161 echo "$as_me:11161: result: no" >&5
11162 echo "${ECHO_T}no" >&6
11165 echo "$as_me:11165: checking if you want to link with neXT Athena library" >&5
11166 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
11169 # Check whether --with-neXtaw or --without-neXtaw was given.
11170 if test "${with_neXtaw+set}" = set; then
11171 withval="$with_neXtaw"
11174 if test "$withval" = yes ; then
11176 echo "$as_me:11176: result: yes" >&5
11177 echo "${ECHO_T}yes" >&6
11179 echo "$as_me:11179: result: no" >&5
11180 echo "${ECHO_T}no" >&6
11183 echo "$as_me:11183: checking if you want to link with Athena-Plus library" >&5
11184 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
11187 # Check whether --with-XawPlus or --without-XawPlus was given.
11188 if test "${with_XawPlus+set}" = set; then
11189 withval="$with_XawPlus"
11192 if test "$withval" = yes ; then
11193 cf_x_athena=XawPlus
11194 echo "$as_me:11194: result: yes" >&5
11195 echo "${ECHO_T}yes" >&6
11197 echo "$as_me:11197: result: no" >&5
11198 echo "${ECHO_T}no" >&6
11203 if test "$PKG_CONFIG" != none ; then
11205 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
11206 for cf_athena_pkg in \
11209 ${cf_x_athena}-devel \
11210 lib${cf_x_athena} \
11211 lib${cf_x_athena}-devel
11214 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
11215 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
11217 echo "${as_me:-configure}:11217: testing found package $cf_athena_pkg ..." 1>&5
11219 cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
11220 cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
11221 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
11223 echo "${as_me:-configure}:11223: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11225 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
11227 echo "${as_me:-configure}:11227: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
11232 cf_new_extra_cppflags=
11234 for cf_add_cflags in $cf_pkgconfig_incs
11236 case $cf_fix_cppflags in
11238 case $cf_add_cflags in
11239 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11240 case $cf_add_cflags in
11242 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11244 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11245 && test -z "${cf_tst_cflags}" \
11246 && cf_fix_cppflags=yes
11248 if test $cf_fix_cppflags = yes ; then
11250 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11251 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11254 elif test "${cf_tst_cflags}" = "\"'" ; then
11256 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11257 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11263 case "$CPPFLAGS" in
11267 case $cf_add_cflags in
11269 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11271 CPPFLAGS=`echo "$CPPFLAGS" | \
11272 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11273 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11278 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11279 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11286 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11287 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11294 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11295 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11297 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11299 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11300 && test -z "${cf_tst_cflags}" \
11301 && cf_fix_cppflags=no
11306 if test -n "$cf_new_cflags" ; then
11308 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11309 CFLAGS="${CFLAGS}$cf_new_cflags"
11313 if test -n "$cf_new_cppflags" ; then
11315 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11316 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11320 if test -n "$cf_new_extra_cppflags" ; then
11322 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11323 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11327 cf_add_libs="$cf_pkgconfig_libs"
11328 # Filter out duplicates - this happens with badly-designed ".pc" files...
11329 for cf_add_1lib in $LIBS
11331 for cf_add_2lib in $cf_add_libs
11333 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11339 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11341 LIBS="$cf_add_libs"
11343 cf_x_athena_lib="$cf_pkgconfig_libs"
11345 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11347 cat >>confdefs.h <<EOF
11348 #define $cf_x_athena_LIBS 1
11351 for cf_trim_lib in Xmu Xt X11
11354 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
11355 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
11356 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
11358 echo "${as_me:-configure}:11358: testing ..trimmed $LIBS ..." 1>&5
11364 echo "$as_me:11364: checking for usable $cf_x_athena/Xmu package" >&5
11365 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
11366 if test "${cf_cv_xaw_compat+set}" = set; then
11367 echo $ECHO_N "(cached) $ECHO_C" >&6
11370 cat >conftest.$ac_ext <<_ACEOF
11371 #line 11371 "configure"
11372 #include "confdefs.h"
11374 #include <X11/Xmu/CharSet.h>
11380 int check = XmuCompareISOLatin1("big", "small")
11386 rm -f conftest.$ac_objext conftest$ac_exeext
11387 if { (eval echo "$as_me:11387: \"$ac_link\"") >&5
11388 (eval $ac_link) 2>&5
11390 echo "$as_me:11390: \$? = $ac_status" >&5
11391 (exit $ac_status); } &&
11392 { ac_try='test -s conftest$ac_exeext'
11393 { (eval echo "$as_me:11393: \"$ac_try\"") >&5
11394 (eval $ac_try) 2>&5
11396 echo "$as_me:11396: \$? = $ac_status" >&5
11397 (exit $ac_status); }; }; then
11398 cf_cv_xaw_compat=yes
11400 echo "$as_me: failed program was:" >&5
11401 cat conftest.$ac_ext >&5
11402 cf_cv_xaw_compat=no
11404 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11406 echo "$as_me:11406: result: $cf_cv_xaw_compat" >&5
11407 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
11409 if test "$cf_cv_xaw_compat" = no
11411 # workaround for broken ".pc" files...
11412 case "$cf_x_athena_lib" in
11416 test -n "$verbose" && echo " work around broken package" 1>&6
11418 echo "${as_me:-configure}:11418: testing work around broken package ..." 1>&5
11420 cf_save_xmu="$LIBS"
11421 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
11423 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
11424 test -n "$verbose" && echo " found package xmu" 1>&6
11426 echo "${as_me:-configure}:11426: testing found package xmu ..." 1>&5
11428 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
11429 cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`"
11430 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
11432 echo "${as_me:-configure}:11432: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11434 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
11436 echo "${as_me:-configure}:11436: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
11441 cf_new_extra_cppflags=
11443 for cf_add_cflags in $cf_pkgconfig_incs
11445 case $cf_fix_cppflags in
11447 case $cf_add_cflags in
11448 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11449 case $cf_add_cflags in
11451 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11453 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11454 && test -z "${cf_tst_cflags}" \
11455 && cf_fix_cppflags=yes
11457 if test $cf_fix_cppflags = yes ; then
11459 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11460 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11463 elif test "${cf_tst_cflags}" = "\"'" ; then
11465 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11466 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11472 case "$CPPFLAGS" in
11476 case $cf_add_cflags in
11478 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11480 CPPFLAGS=`echo "$CPPFLAGS" | \
11481 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11482 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11487 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11488 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11495 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11496 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11503 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11504 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11506 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11508 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11509 && test -z "${cf_tst_cflags}" \
11510 && cf_fix_cppflags=no
11515 if test -n "$cf_new_cflags" ; then
11517 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11518 CFLAGS="${CFLAGS}$cf_new_cflags"
11522 if test -n "$cf_new_cppflags" ; then
11524 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11525 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11529 if test -n "$cf_new_extra_cppflags" ; then
11531 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11532 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11536 cf_add_libs="$cf_pkgconfig_libs"
11537 # Filter out duplicates - this happens with badly-designed ".pc" files...
11538 for cf_add_1lib in $LIBS
11540 for cf_add_2lib in $cf_add_libs
11542 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11548 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11550 LIBS="$cf_add_libs"
11552 LIBS="$cf_save_xmu"
11554 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11556 echo "${as_me:-configure}:11556: testing ...before $LIBS ..." 1>&5
11558 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
11559 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11561 echo "${as_me:-configure}:11561: testing ...after $LIBS ..." 1>&5
11567 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11569 echo "${as_me:-configure}:11569: testing ...before $LIBS ..." 1>&5
11571 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
11572 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11574 echo "${as_me:-configure}:11574: testing ...after $LIBS ..." 1>&5
11578 for cf_trim_lib in Xmu Xt X11
11581 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
11582 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
11583 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
11585 echo "${as_me:-configure}:11585: testing ..trimmed $LIBS ..." 1>&5
11605 if test -z "$cf_x_athena_lib" ; then
11607 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
11608 test -n "$verbose" && echo " found package Xext" 1>&6
11610 echo "${as_me:-configure}:11610: testing found package Xext ..." 1>&5
11612 cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
11613 cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
11614 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
11616 echo "${as_me:-configure}:11616: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11618 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
11620 echo "${as_me:-configure}:11620: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
11625 cf_new_extra_cppflags=
11627 for cf_add_cflags in $cf_pkgconfig_incs
11629 case $cf_fix_cppflags in
11631 case $cf_add_cflags in
11632 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11633 case $cf_add_cflags in
11635 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11637 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11638 && test -z "${cf_tst_cflags}" \
11639 && cf_fix_cppflags=yes
11641 if test $cf_fix_cppflags = yes ; then
11643 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11644 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11647 elif test "${cf_tst_cflags}" = "\"'" ; then
11649 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11650 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11656 case "$CPPFLAGS" in
11660 case $cf_add_cflags in
11662 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11664 CPPFLAGS=`echo "$CPPFLAGS" | \
11665 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11666 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11671 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11672 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11679 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11680 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11687 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11688 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11690 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11692 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11693 && test -z "${cf_tst_cflags}" \
11694 && cf_fix_cppflags=no
11699 if test -n "$cf_new_cflags" ; then
11701 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11702 CFLAGS="${CFLAGS}$cf_new_cflags"
11706 if test -n "$cf_new_cppflags" ; then
11708 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11709 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11713 if test -n "$cf_new_extra_cppflags" ; then
11715 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11716 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11720 cf_add_libs="$cf_pkgconfig_libs"
11721 # Filter out duplicates - this happens with badly-designed ".pc" files...
11722 for cf_add_1lib in $LIBS
11724 for cf_add_2lib in $cf_add_libs
11726 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11732 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11734 LIBS="$cf_add_libs"
11741 echo "$as_me:11741: checking for XextCreateExtension in -lXext" >&5
11742 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
11743 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
11744 echo $ECHO_N "(cached) $ECHO_C" >&6
11746 ac_check_lib_save_LIBS=$LIBS
11747 LIBS="-lXext $LIBS"
11748 cat >conftest.$ac_ext <<_ACEOF
11749 #line 11749 "configure"
11750 #include "confdefs.h"
11752 /* Override any gcc2 internal prototype to avoid an error. */
11756 /* We use char because int might match the return type of a gcc2
11757 builtin and then its argument prototype would still apply. */
11758 char XextCreateExtension ();
11762 XextCreateExtension ();
11767 rm -f conftest.$ac_objext conftest$ac_exeext
11768 if { (eval echo "$as_me:11768: \"$ac_link\"") >&5
11769 (eval $ac_link) 2>&5
11771 echo "$as_me:11771: \$? = $ac_status" >&5
11772 (exit $ac_status); } &&
11773 { ac_try='test -s conftest$ac_exeext'
11774 { (eval echo "$as_me:11774: \"$ac_try\"") >&5
11775 (eval $ac_try) 2>&5
11777 echo "$as_me:11777: \$? = $ac_status" >&5
11778 (exit $ac_status); }; }; then
11779 ac_cv_lib_Xext_XextCreateExtension=yes
11781 echo "$as_me: failed program was:" >&5
11782 cat conftest.$ac_ext >&5
11783 ac_cv_lib_Xext_XextCreateExtension=no
11785 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11786 LIBS=$ac_check_lib_save_LIBS
11788 echo "$as_me:11788: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
11789 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
11790 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
11792 cf_add_libs="-lXext"
11793 # Filter out duplicates - this happens with badly-designed ".pc" files...
11794 for cf_add_1lib in $LIBS
11796 for cf_add_2lib in $cf_add_libs
11798 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11804 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11806 LIBS="$cf_add_libs"
11812 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
11813 # in some cases has installed dummy files in the former, other cases replaced
11814 # it with a link to the new location). This complicates the configure script.
11815 # Check for that pitfall, and recover using pkg-config
11817 # If none of these are set, the configuration is almost certainly broken.
11818 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
11821 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11822 test -n "$verbose" && echo " found package x11" 1>&6
11824 echo "${as_me:-configure}:11824: testing found package x11 ..." 1>&5
11826 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11827 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
11828 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11830 echo "${as_me:-configure}:11830: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11832 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11834 echo "${as_me:-configure}:11834: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11839 cf_new_extra_cppflags=
11841 for cf_add_cflags in $cf_pkgconfig_incs
11843 case $cf_fix_cppflags in
11845 case $cf_add_cflags in
11846 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11847 case $cf_add_cflags in
11849 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11851 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11852 && test -z "${cf_tst_cflags}" \
11853 && cf_fix_cppflags=yes
11855 if test $cf_fix_cppflags = yes ; then
11857 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11858 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11861 elif test "${cf_tst_cflags}" = "\"'" ; then
11863 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11864 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11870 case "$CPPFLAGS" in
11874 case $cf_add_cflags in
11876 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11878 CPPFLAGS=`echo "$CPPFLAGS" | \
11879 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11880 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11885 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11886 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11893 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11894 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11901 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11902 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11904 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11906 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11907 && test -z "${cf_tst_cflags}" \
11908 && cf_fix_cppflags=no
11913 if test -n "$cf_new_cflags" ; then
11915 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11916 CFLAGS="${CFLAGS}$cf_new_cflags"
11920 if test -n "$cf_new_cppflags" ; then
11922 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11923 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11927 if test -n "$cf_new_extra_cppflags" ; then
11929 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11930 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11934 cf_add_libs="$cf_pkgconfig_libs"
11935 # Filter out duplicates - this happens with badly-designed ".pc" files...
11936 for cf_add_1lib in $LIBS
11938 for cf_add_2lib in $cf_add_libs
11940 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11946 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11948 LIBS="$cf_add_libs"
11954 { echo "$as_me:11954: WARNING: unable to find X11 library" >&5
11955 echo "$as_me: WARNING: unable to find X11 library" >&2;}
11958 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11959 test -n "$verbose" && echo " found package ice" 1>&6
11961 echo "${as_me:-configure}:11961: testing found package ice ..." 1>&5
11963 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11964 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
11965 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11967 echo "${as_me:-configure}:11967: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11969 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
11971 echo "${as_me:-configure}:11971: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11976 cf_new_extra_cppflags=
11978 for cf_add_cflags in $cf_pkgconfig_incs
11980 case $cf_fix_cppflags in
11982 case $cf_add_cflags in
11983 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11984 case $cf_add_cflags in
11986 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11988 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11989 && test -z "${cf_tst_cflags}" \
11990 && cf_fix_cppflags=yes
11992 if test $cf_fix_cppflags = yes ; then
11994 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11995 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11998 elif test "${cf_tst_cflags}" = "\"'" ; then
12000 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12001 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12007 case "$CPPFLAGS" in
12011 case $cf_add_cflags in
12013 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12015 CPPFLAGS=`echo "$CPPFLAGS" | \
12016 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12017 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12022 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12023 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12030 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12031 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12038 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12039 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12041 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12043 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12044 && test -z "${cf_tst_cflags}" \
12045 && cf_fix_cppflags=no
12050 if test -n "$cf_new_cflags" ; then
12052 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12053 CFLAGS="${CFLAGS}$cf_new_cflags"
12057 if test -n "$cf_new_cppflags" ; then
12059 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12060 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12064 if test -n "$cf_new_extra_cppflags" ; then
12066 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12067 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12071 cf_add_libs="$cf_pkgconfig_libs"
12072 # Filter out duplicates - this happens with badly-designed ".pc" files...
12073 for cf_add_1lib in $LIBS
12075 for cf_add_2lib in $cf_add_libs
12077 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12083 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12085 LIBS="$cf_add_libs"
12091 { echo "$as_me:12091: WARNING: unable to find ICE library" >&5
12092 echo "$as_me: WARNING: unable to find ICE library" >&2;}
12095 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
12096 test -n "$verbose" && echo " found package sm" 1>&6
12098 echo "${as_me:-configure}:12098: testing found package sm ..." 1>&5
12100 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
12101 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
12102 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
12104 echo "${as_me:-configure}:12104: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12106 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
12108 echo "${as_me:-configure}:12108: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
12113 cf_new_extra_cppflags=
12115 for cf_add_cflags in $cf_pkgconfig_incs
12117 case $cf_fix_cppflags in
12119 case $cf_add_cflags in
12120 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12121 case $cf_add_cflags in
12123 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12125 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12126 && test -z "${cf_tst_cflags}" \
12127 && cf_fix_cppflags=yes
12129 if test $cf_fix_cppflags = yes ; then
12131 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12132 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12135 elif test "${cf_tst_cflags}" = "\"'" ; then
12137 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12138 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12144 case "$CPPFLAGS" in
12148 case $cf_add_cflags in
12150 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12152 CPPFLAGS=`echo "$CPPFLAGS" | \
12153 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12154 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12159 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12160 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12167 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12168 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12175 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12176 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12178 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12180 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12181 && test -z "${cf_tst_cflags}" \
12182 && cf_fix_cppflags=no
12187 if test -n "$cf_new_cflags" ; then
12189 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12190 CFLAGS="${CFLAGS}$cf_new_cflags"
12194 if test -n "$cf_new_cppflags" ; then
12196 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12197 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12201 if test -n "$cf_new_extra_cppflags" ; then
12203 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12204 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12208 cf_add_libs="$cf_pkgconfig_libs"
12209 # Filter out duplicates - this happens with badly-designed ".pc" files...
12210 for cf_add_1lib in $LIBS
12212 for cf_add_2lib in $cf_add_libs
12214 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12220 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12222 LIBS="$cf_add_libs"
12228 { echo "$as_me:12228: WARNING: unable to find SM library" >&5
12229 echo "$as_me: WARNING: unable to find SM library" >&2;}
12232 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
12233 test -n "$verbose" && echo " found package xt" 1>&6
12235 echo "${as_me:-configure}:12235: testing found package xt ..." 1>&5
12237 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
12238 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
12239 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
12241 echo "${as_me:-configure}:12241: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12243 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
12245 echo "${as_me:-configure}:12245: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
12250 cf_new_extra_cppflags=
12252 for cf_add_cflags in $cf_pkgconfig_incs
12254 case $cf_fix_cppflags in
12256 case $cf_add_cflags in
12257 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12258 case $cf_add_cflags in
12260 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12262 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12263 && test -z "${cf_tst_cflags}" \
12264 && cf_fix_cppflags=yes
12266 if test $cf_fix_cppflags = yes ; then
12268 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12269 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12272 elif test "${cf_tst_cflags}" = "\"'" ; then
12274 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12275 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12281 case "$CPPFLAGS" in
12285 case $cf_add_cflags in
12287 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12289 CPPFLAGS=`echo "$CPPFLAGS" | \
12290 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12291 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12296 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12297 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12304 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12305 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12312 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12313 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12315 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12317 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12318 && test -z "${cf_tst_cflags}" \
12319 && cf_fix_cppflags=no
12324 if test -n "$cf_new_cflags" ; then
12326 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12327 CFLAGS="${CFLAGS}$cf_new_cflags"
12331 if test -n "$cf_new_cppflags" ; then
12333 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12334 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12338 if test -n "$cf_new_extra_cppflags" ; then
12340 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12341 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12345 cf_add_libs="$cf_pkgconfig_libs"
12346 # Filter out duplicates - this happens with badly-designed ".pc" files...
12347 for cf_add_1lib in $LIBS
12349 for cf_add_2lib in $cf_add_libs
12351 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12357 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12359 LIBS="$cf_add_libs"
12365 { echo "$as_me:12365: WARNING: unable to find Xt library" >&5
12366 echo "$as_me: WARNING: unable to find Xt library" >&2;}
12373 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
12374 test -n "$verbose" && echo " found package xt" 1>&6
12376 echo "${as_me:-configure}:12376: testing found package xt ..." 1>&5
12378 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
12379 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
12380 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
12382 echo "${as_me:-configure}:12382: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12384 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
12386 echo "${as_me:-configure}:12386: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
12391 cf_new_extra_cppflags=
12393 for cf_add_cflags in $cf_pkgconfig_incs
12395 case $cf_fix_cppflags in
12397 case $cf_add_cflags in
12398 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12399 case $cf_add_cflags in
12401 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12403 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12404 && test -z "${cf_tst_cflags}" \
12405 && cf_fix_cppflags=yes
12407 if test $cf_fix_cppflags = yes ; then
12409 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12410 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12413 elif test "${cf_tst_cflags}" = "\"'" ; then
12415 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12416 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12422 case "$CPPFLAGS" in
12426 case $cf_add_cflags in
12428 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12430 CPPFLAGS=`echo "$CPPFLAGS" | \
12431 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12432 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12437 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12438 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12445 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12446 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12453 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12454 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12456 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12458 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12459 && test -z "${cf_tst_cflags}" \
12460 && cf_fix_cppflags=no
12465 if test -n "$cf_new_cflags" ; then
12467 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12468 CFLAGS="${CFLAGS}$cf_new_cflags"
12472 if test -n "$cf_new_cppflags" ; then
12474 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12475 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12479 if test -n "$cf_new_extra_cppflags" ; then
12481 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12482 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12486 cf_add_libs="$cf_pkgconfig_libs"
12487 # Filter out duplicates - this happens with badly-designed ".pc" files...
12488 for cf_add_1lib in $LIBS
12490 for cf_add_2lib in $cf_add_libs
12492 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12498 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12500 LIBS="$cf_add_libs"
12506 # we have an "xt" package, but it may omit Xt's dependency on X11
12507 echo "$as_me:12507: checking for usable X dependency" >&5
12508 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
12509 if test "${cf_cv_xt_x11_compat+set}" = set; then
12510 echo $ECHO_N "(cached) $ECHO_C" >&6
12513 cat >conftest.$ac_ext <<_ACEOF
12514 #line 12514 "configure"
12515 #include "confdefs.h"
12517 #include <X11/Xlib.h>
12523 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
12524 int rc2 = XClearWindow((Display*) 0, (Window) 0);
12525 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
12526 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
12532 rm -f conftest.$ac_objext conftest$ac_exeext
12533 if { (eval echo "$as_me:12533: \"$ac_link\"") >&5
12534 (eval $ac_link) 2>&5
12536 echo "$as_me:12536: \$? = $ac_status" >&5
12537 (exit $ac_status); } &&
12538 { ac_try='test -s conftest$ac_exeext'
12539 { (eval echo "$as_me:12539: \"$ac_try\"") >&5
12540 (eval $ac_try) 2>&5
12542 echo "$as_me:12542: \$? = $ac_status" >&5
12543 (exit $ac_status); }; }; then
12544 cf_cv_xt_x11_compat=yes
12546 echo "$as_me: failed program was:" >&5
12547 cat conftest.$ac_ext >&5
12548 cf_cv_xt_x11_compat=no
12550 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12552 echo "$as_me:12552: result: $cf_cv_xt_x11_compat" >&5
12553 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
12554 if test "$cf_cv_xt_x11_compat" = no
12556 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
12558 echo "${as_me:-configure}:12558: testing work around broken X11 dependency ..." 1>&5
12560 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
12562 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
12563 test -n "$verbose" && echo " found package x11" 1>&6
12565 echo "${as_me:-configure}:12565: testing found package x11 ..." 1>&5
12567 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
12568 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
12569 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
12571 echo "${as_me:-configure}:12571: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12573 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
12575 echo "${as_me:-configure}:12575: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
12580 cf_new_extra_cppflags=
12582 for cf_add_cflags in $cf_pkgconfig_incs
12584 case $cf_fix_cppflags in
12586 case $cf_add_cflags in
12587 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12588 case $cf_add_cflags in
12590 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12592 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12593 && test -z "${cf_tst_cflags}" \
12594 && cf_fix_cppflags=yes
12596 if test $cf_fix_cppflags = yes ; then
12598 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12599 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12602 elif test "${cf_tst_cflags}" = "\"'" ; then
12604 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12605 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12611 case "$CPPFLAGS" in
12615 case $cf_add_cflags in
12617 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12619 CPPFLAGS=`echo "$CPPFLAGS" | \
12620 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12621 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12626 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12627 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12634 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12635 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12642 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12643 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12645 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12647 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12648 && test -z "${cf_tst_cflags}" \
12649 && cf_fix_cppflags=no
12654 if test -n "$cf_new_cflags" ; then
12656 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12657 CFLAGS="${CFLAGS}$cf_new_cflags"
12661 if test -n "$cf_new_cppflags" ; then
12663 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12664 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12668 if test -n "$cf_new_extra_cppflags" ; then
12670 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12671 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12675 cf_add_libs="$cf_pkgconfig_libs"
12676 # Filter out duplicates - this happens with badly-designed ".pc" files...
12677 for cf_add_1lib in $LIBS
12679 for cf_add_2lib in $cf_add_libs
12681 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12687 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12689 LIBS="$cf_add_libs"
12696 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12698 echo "${as_me:-configure}:12698: testing ...before $LIBS ..." 1>&5
12700 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
12701 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12703 echo "${as_me:-configure}:12703: testing ...after $LIBS ..." 1>&5
12711 echo "$as_me:12711: checking for usable X Toolkit package" >&5
12712 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
12713 if test "${cf_cv_xt_ice_compat+set}" = set; then
12714 echo $ECHO_N "(cached) $ECHO_C" >&6
12717 cat >conftest.$ac_ext <<_ACEOF
12718 #line 12718 "configure"
12719 #include "confdefs.h"
12721 #include <X11/Shell.h>
12726 int num = IceConnectionNumber(0)
12732 rm -f conftest.$ac_objext conftest$ac_exeext
12733 if { (eval echo "$as_me:12733: \"$ac_link\"") >&5
12734 (eval $ac_link) 2>&5
12736 echo "$as_me:12736: \$? = $ac_status" >&5
12737 (exit $ac_status); } &&
12738 { ac_try='test -s conftest$ac_exeext'
12739 { (eval echo "$as_me:12739: \"$ac_try\"") >&5
12740 (eval $ac_try) 2>&5
12742 echo "$as_me:12742: \$? = $ac_status" >&5
12743 (exit $ac_status); }; }; then
12744 cf_cv_xt_ice_compat=yes
12746 echo "$as_me: failed program was:" >&5
12747 cat conftest.$ac_ext >&5
12748 cf_cv_xt_ice_compat=no
12750 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12752 echo "$as_me:12752: result: $cf_cv_xt_ice_compat" >&5
12753 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
12755 if test "$cf_cv_xt_ice_compat" = no
12757 # workaround for broken ".pc" files used for X Toolkit.
12758 case "x$X_PRE_LIBS" in
12764 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
12766 echo "${as_me:-configure}:12766: testing work around broken ICE dependency ..." 1>&5
12768 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
12769 test -n "$verbose" && echo " found package ice" 1>&6
12771 echo "${as_me:-configure}:12771: testing found package ice ..." 1>&5
12773 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
12774 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
12775 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
12777 echo "${as_me:-configure}:12777: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12779 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
12781 echo "${as_me:-configure}:12781: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
12786 cf_new_extra_cppflags=
12788 for cf_add_cflags in $cf_pkgconfig_incs
12790 case $cf_fix_cppflags in
12792 case $cf_add_cflags in
12793 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12794 case $cf_add_cflags in
12796 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12798 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12799 && test -z "${cf_tst_cflags}" \
12800 && cf_fix_cppflags=yes
12802 if test $cf_fix_cppflags = yes ; then
12804 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12805 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12808 elif test "${cf_tst_cflags}" = "\"'" ; then
12810 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12811 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12817 case "$CPPFLAGS" in
12821 case $cf_add_cflags in
12823 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12825 CPPFLAGS=`echo "$CPPFLAGS" | \
12826 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12827 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12832 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12833 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12840 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12841 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12848 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12849 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12851 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12853 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12854 && test -z "${cf_tst_cflags}" \
12855 && cf_fix_cppflags=no
12860 if test -n "$cf_new_cflags" ; then
12862 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12863 CFLAGS="${CFLAGS}$cf_new_cflags"
12867 if test -n "$cf_new_cppflags" ; then
12869 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12870 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12874 if test -n "$cf_new_extra_cppflags" ; then
12876 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12877 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12881 cf_add_libs="$cf_pkgconfig_libs"
12882 # Filter out duplicates - this happens with badly-designed ".pc" files...
12883 for cf_add_1lib in $LIBS
12885 for cf_add_2lib in $cf_add_libs
12887 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12893 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12895 LIBS="$cf_add_libs"
12897 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
12898 test -n "$verbose" && echo " found package sm" 1>&6
12900 echo "${as_me:-configure}:12900: testing found package sm ..." 1>&5
12902 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
12903 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
12904 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
12906 echo "${as_me:-configure}:12906: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12908 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
12910 echo "${as_me:-configure}:12910: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
12915 cf_new_extra_cppflags=
12917 for cf_add_cflags in $cf_pkgconfig_incs
12919 case $cf_fix_cppflags in
12921 case $cf_add_cflags in
12922 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12923 case $cf_add_cflags in
12925 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12927 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12928 && test -z "${cf_tst_cflags}" \
12929 && cf_fix_cppflags=yes
12931 if test $cf_fix_cppflags = yes ; then
12933 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12934 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12937 elif test "${cf_tst_cflags}" = "\"'" ; then
12939 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12940 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12946 case "$CPPFLAGS" in
12950 case $cf_add_cflags in
12952 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12954 CPPFLAGS=`echo "$CPPFLAGS" | \
12955 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12956 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12961 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12962 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12969 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12970 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12977 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12978 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12980 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12982 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12983 && test -z "${cf_tst_cflags}" \
12984 && cf_fix_cppflags=no
12989 if test -n "$cf_new_cflags" ; then
12991 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12992 CFLAGS="${CFLAGS}$cf_new_cflags"
12996 if test -n "$cf_new_cppflags" ; then
12998 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12999 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13003 if test -n "$cf_new_extra_cppflags" ; then
13005 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13006 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13010 cf_add_libs="$cf_pkgconfig_libs"
13011 # Filter out duplicates - this happens with badly-designed ".pc" files...
13012 for cf_add_1lib in $LIBS
13014 for cf_add_2lib in $cf_add_libs
13016 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13022 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13024 LIBS="$cf_add_libs"
13037 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13039 echo "${as_me:-configure}:13039: testing ...before $LIBS ..." 1>&5
13041 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
13042 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13044 echo "${as_me:-configure}:13044: testing ...after $LIBS ..." 1>&5
13060 LDFLAGS="$X_LIBS $LDFLAGS"
13062 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
13064 echo "${as_me:-configure}:13064: testing checking additions to CFLAGS ..." 1>&5
13066 cf_check_cflags="$CFLAGS"
13067 cf_check_cppflags="$CPPFLAGS"
13072 cf_new_extra_cppflags=
13074 for cf_add_cflags in $X_CFLAGS
13076 case $cf_fix_cppflags in
13078 case $cf_add_cflags in
13079 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13080 case $cf_add_cflags in
13082 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13084 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13085 && test -z "${cf_tst_cflags}" \
13086 && cf_fix_cppflags=yes
13088 if test $cf_fix_cppflags = yes ; then
13090 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13091 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13094 elif test "${cf_tst_cflags}" = "\"'" ; then
13096 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13097 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13103 case "$CPPFLAGS" in
13107 case $cf_add_cflags in
13109 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13111 CPPFLAGS=`echo "$CPPFLAGS" | \
13112 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13113 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13118 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13119 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13126 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13127 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13134 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13135 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13137 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13139 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13140 && test -z "${cf_tst_cflags}" \
13141 && cf_fix_cppflags=no
13146 if test -n "$cf_new_cflags" ; then
13147 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13149 echo "${as_me:-configure}:13149: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13151 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13152 CFLAGS="${CFLAGS}$cf_new_cflags"
13156 if test -n "$cf_new_cppflags" ; then
13157 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13159 echo "${as_me:-configure}:13159: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13161 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13162 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13166 if test -n "$cf_new_extra_cppflags" ; then
13167 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13169 echo "${as_me:-configure}:13169: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13171 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13172 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13176 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
13177 cat >conftest.$ac_ext <<_ACEOF
13178 #line 13178 "configure"
13179 #include "confdefs.h"
13184 printf("Hello world");
13189 rm -f conftest.$ac_objext conftest$ac_exeext
13190 if { (eval echo "$as_me:13190: \"$ac_link\"") >&5
13191 (eval $ac_link) 2>&5
13193 echo "$as_me:13193: \$? = $ac_status" >&5
13194 (exit $ac_status); } &&
13195 { ac_try='test -s conftest$ac_exeext'
13196 { (eval echo "$as_me:13196: \"$ac_try\"") >&5
13197 (eval $ac_try) 2>&5
13199 echo "$as_me:13199: \$? = $ac_status" >&5
13200 (exit $ac_status); }; }; then
13203 echo "$as_me: failed program was:" >&5
13204 cat conftest.$ac_ext >&5
13205 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
13207 echo "${as_me:-configure}:13207: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
13209 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
13210 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
13212 echo "${as_me:-configure}:13212: testing but keeping change to \$CPPFLAGS ..." 1>&5
13215 CFLAGS="$cf_check_flags"
13217 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13220 echo "$as_me:13220: checking for XOpenDisplay" >&5
13221 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
13222 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
13223 echo $ECHO_N "(cached) $ECHO_C" >&6
13225 cat >conftest.$ac_ext <<_ACEOF
13226 #line 13226 "configure"
13227 #include "confdefs.h"
13228 /* System header to define __stub macros and hopefully few prototypes,
13229 which can conflict with char XOpenDisplay (); below. */
13230 #include <assert.h>
13231 /* Override any gcc2 internal prototype to avoid an error. */
13235 /* We use char because int might match the return type of a gcc2
13236 builtin and then its argument prototype would still apply. */
13237 char XOpenDisplay ();
13243 /* The GNU C library defines this for functions which it implements
13244 to always fail with ENOSYS. Some functions are actually named
13245 something starting with __ and the normal name is an alias. */
13246 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
13249 f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13256 rm -f conftest.$ac_objext conftest$ac_exeext
13257 if { (eval echo "$as_me:13257: \"$ac_link\"") >&5
13258 (eval $ac_link) 2>&5
13260 echo "$as_me:13260: \$? = $ac_status" >&5
13261 (exit $ac_status); } &&
13262 { ac_try='test -s conftest$ac_exeext'
13263 { (eval echo "$as_me:13263: \"$ac_try\"") >&5
13264 (eval $ac_try) 2>&5
13266 echo "$as_me:13266: \$? = $ac_status" >&5
13267 (exit $ac_status); }; }; then
13268 ac_cv_func_XOpenDisplay=yes
13270 echo "$as_me: failed program was:" >&5
13271 cat conftest.$ac_ext >&5
13272 ac_cv_func_XOpenDisplay=no
13274 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13276 echo "$as_me:13276: result: $ac_cv_func_XOpenDisplay" >&5
13277 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
13278 if test $ac_cv_func_XOpenDisplay = yes; then
13282 echo "$as_me:13282: checking for XOpenDisplay in -lX11" >&5
13283 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
13284 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
13285 echo $ECHO_N "(cached) $ECHO_C" >&6
13287 ac_check_lib_save_LIBS=$LIBS
13288 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
13289 cat >conftest.$ac_ext <<_ACEOF
13290 #line 13290 "configure"
13291 #include "confdefs.h"
13293 /* Override any gcc2 internal prototype to avoid an error. */
13297 /* We use char because int might match the return type of a gcc2
13298 builtin and then its argument prototype would still apply. */
13299 char XOpenDisplay ();
13308 rm -f conftest.$ac_objext conftest$ac_exeext
13309 if { (eval echo "$as_me:13309: \"$ac_link\"") >&5
13310 (eval $ac_link) 2>&5
13312 echo "$as_me:13312: \$? = $ac_status" >&5
13313 (exit $ac_status); } &&
13314 { ac_try='test -s conftest$ac_exeext'
13315 { (eval echo "$as_me:13315: \"$ac_try\"") >&5
13316 (eval $ac_try) 2>&5
13318 echo "$as_me:13318: \$? = $ac_status" >&5
13319 (exit $ac_status); }; }; then
13320 ac_cv_lib_X11_XOpenDisplay=yes
13322 echo "$as_me: failed program was:" >&5
13323 cat conftest.$ac_ext >&5
13324 ac_cv_lib_X11_XOpenDisplay=no
13326 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13327 LIBS=$ac_check_lib_save_LIBS
13329 echo "$as_me:13329: result: $ac_cv_lib_X11_XOpenDisplay" >&5
13330 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
13331 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
13333 cf_add_libs="-lX11"
13334 # Filter out duplicates - this happens with badly-designed ".pc" files...
13335 for cf_add_1lib in $LIBS
13337 for cf_add_2lib in $cf_add_libs
13339 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13345 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13347 LIBS="$cf_add_libs"
13353 echo "$as_me:13353: checking for XtAppInitialize" >&5
13354 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
13355 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
13356 echo $ECHO_N "(cached) $ECHO_C" >&6
13358 cat >conftest.$ac_ext <<_ACEOF
13359 #line 13359 "configure"
13360 #include "confdefs.h"
13361 /* System header to define __stub macros and hopefully few prototypes,
13362 which can conflict with char XtAppInitialize (); below. */
13363 #include <assert.h>
13364 /* Override any gcc2 internal prototype to avoid an error. */
13368 /* We use char because int might match the return type of a gcc2
13369 builtin and then its argument prototype would still apply. */
13370 char XtAppInitialize ();
13376 /* The GNU C library defines this for functions which it implements
13377 to always fail with ENOSYS. Some functions are actually named
13378 something starting with __ and the normal name is an alias. */
13379 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
13382 f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13389 rm -f conftest.$ac_objext conftest$ac_exeext
13390 if { (eval echo "$as_me:13390: \"$ac_link\"") >&5
13391 (eval $ac_link) 2>&5
13393 echo "$as_me:13393: \$? = $ac_status" >&5
13394 (exit $ac_status); } &&
13395 { ac_try='test -s conftest$ac_exeext'
13396 { (eval echo "$as_me:13396: \"$ac_try\"") >&5
13397 (eval $ac_try) 2>&5
13399 echo "$as_me:13399: \$? = $ac_status" >&5
13400 (exit $ac_status); }; }; then
13401 ac_cv_func_XtAppInitialize=yes
13403 echo "$as_me: failed program was:" >&5
13404 cat conftest.$ac_ext >&5
13405 ac_cv_func_XtAppInitialize=no
13407 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13409 echo "$as_me:13409: result: $ac_cv_func_XtAppInitialize" >&5
13410 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
13411 if test $ac_cv_func_XtAppInitialize = yes; then
13415 echo "$as_me:13415: checking for XtAppInitialize in -lXt" >&5
13416 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
13417 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
13418 echo $ECHO_N "(cached) $ECHO_C" >&6
13420 ac_check_lib_save_LIBS=$LIBS
13421 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
13422 cat >conftest.$ac_ext <<_ACEOF
13423 #line 13423 "configure"
13424 #include "confdefs.h"
13426 /* Override any gcc2 internal prototype to avoid an error. */
13430 /* We use char because int might match the return type of a gcc2
13431 builtin and then its argument prototype would still apply. */
13432 char XtAppInitialize ();
13436 XtAppInitialize ();
13441 rm -f conftest.$ac_objext conftest$ac_exeext
13442 if { (eval echo "$as_me:13442: \"$ac_link\"") >&5
13443 (eval $ac_link) 2>&5
13445 echo "$as_me:13445: \$? = $ac_status" >&5
13446 (exit $ac_status); } &&
13447 { ac_try='test -s conftest$ac_exeext'
13448 { (eval echo "$as_me:13448: \"$ac_try\"") >&5
13449 (eval $ac_try) 2>&5
13451 echo "$as_me:13451: \$? = $ac_status" >&5
13452 (exit $ac_status); }; }; then
13453 ac_cv_lib_Xt_XtAppInitialize=yes
13455 echo "$as_me: failed program was:" >&5
13456 cat conftest.$ac_ext >&5
13457 ac_cv_lib_Xt_XtAppInitialize=no
13459 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13460 LIBS=$ac_check_lib_save_LIBS
13462 echo "$as_me:13462: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
13463 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
13464 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
13466 cat >>confdefs.h <<\EOF
13467 #define HAVE_LIBXT 1
13471 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
13478 if test $cf_have_X_LIBS = no ; then
13479 { echo "$as_me:13479: WARNING: Unable to successfully link X Toolkit library (-lXt) with
13480 test program. You will have to check and add the proper libraries by hand
13482 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
13483 test program. You will have to check and add the proper libraries by hand
13484 to makefile." >&2;}
13487 cf_x_athena_root=$cf_x_athena
13490 for cf_path in default \
13491 /usr/contrib/X11R6 \
13492 /usr/contrib/X11R5 \
13496 if test -z "$cf_x_athena_inc" ; then
13497 cf_save="$CPPFLAGS"
13498 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
13499 if test $cf_path != default ; then
13500 CPPFLAGS="$cf_save -I$cf_path/include"
13501 echo "$as_me:13501: checking for $cf_test in $cf_path" >&5
13502 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
13504 echo "$as_me:13504: checking for $cf_test" >&5
13505 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
13507 cat >conftest.$ac_ext <<_ACEOF
13508 #line 13508 "configure"
13509 #include "confdefs.h"
13511 #include <X11/Intrinsic.h>
13512 #include <$cf_test>
13521 rm -f conftest.$ac_objext
13522 if { (eval echo "$as_me:13522: \"$ac_compile\"") >&5
13523 (eval $ac_compile) 2>&5
13525 echo "$as_me:13525: \$? = $ac_status" >&5
13526 (exit $ac_status); } &&
13527 { ac_try='test -s conftest.$ac_objext'
13528 { (eval echo "$as_me:13528: \"$ac_try\"") >&5
13529 (eval $ac_try) 2>&5
13531 echo "$as_me:13531: \$? = $ac_status" >&5
13532 (exit $ac_status); }; }; then
13535 echo "$as_me: failed program was:" >&5
13536 cat conftest.$ac_ext >&5
13539 rm -f conftest.$ac_objext conftest.$ac_ext
13540 echo "$as_me:13540: result: $cf_result" >&5
13541 echo "${ECHO_T}$cf_result" >&6
13542 if test "$cf_result" = yes ; then
13543 cf_x_athena_inc=$cf_path
13546 CPPFLAGS="$cf_save"
13551 if test -z "$cf_x_athena_inc" ; then
13552 { echo "$as_me:13552: WARNING: Unable to successfully find Athena header files with test program" >&5
13553 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
13554 elif test "$cf_x_athena_inc" != default ; then
13555 CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
13558 cf_x_athena_root=$cf_x_athena
13561 for cf_path in default \
13562 /usr/contrib/X11R6 \
13563 /usr/contrib/X11R5 \
13568 ${cf_x_athena_root} \
13569 ${cf_x_athena_root}7 \
13570 ${cf_x_athena_root}6
13573 "-l$cf_lib -lXmu" \
13574 "-l$cf_lib -lXpm -lXmu" \
13575 "-l${cf_lib}_s -lXmu_s"
13577 if test -z "$cf_x_athena_lib" ; then
13579 cf_test=XawSimpleMenuAddGlobalActions
13580 if test $cf_path != default ; then
13582 cf_add_libs="-L$cf_path/lib $cf_libs"
13583 # Filter out duplicates - this happens with badly-designed ".pc" files...
13584 for cf_add_1lib in $LIBS
13586 for cf_add_2lib in $cf_add_libs
13588 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13594 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13596 LIBS="$cf_add_libs"
13598 echo "$as_me:13598: checking for $cf_libs in $cf_path" >&5
13599 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
13602 cf_add_libs="$cf_libs"
13603 # Filter out duplicates - this happens with badly-designed ".pc" files...
13604 for cf_add_1lib in $LIBS
13606 for cf_add_2lib in $cf_add_libs
13608 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13614 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13616 LIBS="$cf_add_libs"
13618 echo "$as_me:13618: checking for $cf_test in $cf_libs" >&5
13619 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
13621 cat >conftest.$ac_ext <<_ACEOF
13622 #line 13622 "configure"
13623 #include "confdefs.h"
13625 #include <X11/Intrinsic.h>
13626 #include <X11/$cf_x_athena_root/SimpleMenu.h>
13632 $cf_test((XtAppContext) 0)
13637 rm -f conftest.$ac_objext conftest$ac_exeext
13638 if { (eval echo "$as_me:13638: \"$ac_link\"") >&5
13639 (eval $ac_link) 2>&5
13641 echo "$as_me:13641: \$? = $ac_status" >&5
13642 (exit $ac_status); } &&
13643 { ac_try='test -s conftest$ac_exeext'
13644 { (eval echo "$as_me:13644: \"$ac_try\"") >&5
13645 (eval $ac_try) 2>&5
13647 echo "$as_me:13647: \$? = $ac_status" >&5
13648 (exit $ac_status); }; }; then
13651 echo "$as_me: failed program was:" >&5
13652 cat conftest.$ac_ext >&5
13655 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13656 echo "$as_me:13656: result: $cf_result" >&5
13657 echo "${ECHO_T}$cf_result" >&6
13658 if test "$cf_result" = yes ; then
13659 cf_x_athena_lib="$cf_libs"
13665 test -n "$cf_x_athena_lib" && break
13669 if test -z "$cf_x_athena_lib" ; then
13670 { { echo "$as_me:13670: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
13671 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
13672 { (exit 1); exit 1; }; }
13675 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13677 cat >>confdefs.h <<EOF
13678 #define $cf_x_athena_LIBS 1
13683 if test -n "$ac_tool_prefix"; then
13684 for ac_prog in xcurses-config
13686 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
13687 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
13688 echo "$as_me:13688: checking for $ac_word" >&5
13689 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13690 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
13691 echo $ECHO_N "(cached) $ECHO_C" >&6
13693 if test -n "$XCURSES_CONFIG"; then
13694 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
13696 ac_save_IFS=$IFS; IFS=$ac_path_separator
13698 for ac_dir in $ac_dummy; do
13700 test -z "$ac_dir" && ac_dir=.
13701 $as_executable_p "$ac_dir/$ac_word" || continue
13702 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
13703 echo "$as_me:13703: found $ac_dir/$ac_word" >&5
13709 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
13710 if test -n "$XCURSES_CONFIG"; then
13711 echo "$as_me:13711: result: $XCURSES_CONFIG" >&5
13712 echo "${ECHO_T}$XCURSES_CONFIG" >&6
13714 echo "$as_me:13714: result: no" >&5
13715 echo "${ECHO_T}no" >&6
13718 test -n "$XCURSES_CONFIG" && break
13721 if test -z "$XCURSES_CONFIG"; then
13722 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
13723 for ac_prog in xcurses-config
13725 # Extract the first word of "$ac_prog", so it can be a program name with args.
13726 set dummy $ac_prog; ac_word=$2
13727 echo "$as_me:13727: checking for $ac_word" >&5
13728 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13729 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
13730 echo $ECHO_N "(cached) $ECHO_C" >&6
13732 if test -n "$ac_ct_XCURSES_CONFIG"; then
13733 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
13735 ac_save_IFS=$IFS; IFS=$ac_path_separator
13737 for ac_dir in $ac_dummy; do
13739 test -z "$ac_dir" && ac_dir=.
13740 $as_executable_p "$ac_dir/$ac_word" || continue
13741 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
13742 echo "$as_me:13742: found $ac_dir/$ac_word" >&5
13748 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
13749 if test -n "$ac_ct_XCURSES_CONFIG"; then
13750 echo "$as_me:13750: result: $ac_ct_XCURSES_CONFIG" >&5
13751 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
13753 echo "$as_me:13753: result: no" >&5
13754 echo "${ECHO_T}no" >&6
13757 test -n "$ac_ct_XCURSES_CONFIG" && break
13759 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
13761 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
13764 if test "$XCURSES_CONFIG" != none ; then
13766 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
13768 cf_add_libs="`$XCURSES_CONFIG --libs`"
13769 # Filter out duplicates - this happens with badly-designed ".pc" files...
13770 for cf_add_1lib in $LIBS
13772 for cf_add_2lib in $cf_add_libs
13774 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13780 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13782 LIBS="$cf_add_libs"
13784 cf_cv_lib_XCurses=yes
13788 LDFLAGS="$LDFLAGS $X_LIBS"
13790 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
13792 echo "${as_me:-configure}:13792: testing checking additions to CFLAGS ..." 1>&5
13794 cf_check_cflags="$CFLAGS"
13795 cf_check_cppflags="$CPPFLAGS"
13800 cf_new_extra_cppflags=
13802 for cf_add_cflags in $X_CFLAGS
13804 case $cf_fix_cppflags in
13806 case $cf_add_cflags in
13807 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13808 case $cf_add_cflags in
13810 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13812 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13813 && test -z "${cf_tst_cflags}" \
13814 && cf_fix_cppflags=yes
13816 if test $cf_fix_cppflags = yes ; then
13818 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13819 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13822 elif test "${cf_tst_cflags}" = "\"'" ; then
13824 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13825 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13831 case "$CPPFLAGS" in
13835 case $cf_add_cflags in
13837 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13839 CPPFLAGS=`echo "$CPPFLAGS" | \
13840 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13841 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13846 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13847 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13854 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13855 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13862 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13863 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13865 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13867 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13868 && test -z "${cf_tst_cflags}" \
13869 && cf_fix_cppflags=no
13874 if test -n "$cf_new_cflags" ; then
13875 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13877 echo "${as_me:-configure}:13877: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13879 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13880 CFLAGS="${CFLAGS}$cf_new_cflags"
13884 if test -n "$cf_new_cppflags" ; then
13885 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13887 echo "${as_me:-configure}:13887: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13889 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13890 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13894 if test -n "$cf_new_extra_cppflags" ; then
13895 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13897 echo "${as_me:-configure}:13897: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13899 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13900 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13904 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
13905 cat >conftest.$ac_ext <<_ACEOF
13906 #line 13906 "configure"
13907 #include "confdefs.h"
13912 printf("Hello world");
13917 rm -f conftest.$ac_objext conftest$ac_exeext
13918 if { (eval echo "$as_me:13918: \"$ac_link\"") >&5
13919 (eval $ac_link) 2>&5
13921 echo "$as_me:13921: \$? = $ac_status" >&5
13922 (exit $ac_status); } &&
13923 { ac_try='test -s conftest$ac_exeext'
13924 { (eval echo "$as_me:13924: \"$ac_try\"") >&5
13925 (eval $ac_try) 2>&5
13927 echo "$as_me:13927: \$? = $ac_status" >&5
13928 (exit $ac_status); }; }; then
13931 echo "$as_me: failed program was:" >&5
13932 cat conftest.$ac_ext >&5
13933 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
13935 echo "${as_me:-configure}:13935: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
13937 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
13938 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
13940 echo "${as_me:-configure}:13940: testing but keeping change to \$CPPFLAGS ..." 1>&5
13943 CFLAGS="$cf_check_flags"
13945 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13948 echo "$as_me:13948: checking for XOpenDisplay in -lX11" >&5
13949 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
13950 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
13951 echo $ECHO_N "(cached) $ECHO_C" >&6
13953 ac_check_lib_save_LIBS=$LIBS
13954 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
13955 cat >conftest.$ac_ext <<_ACEOF
13956 #line 13956 "configure"
13957 #include "confdefs.h"
13959 /* Override any gcc2 internal prototype to avoid an error. */
13963 /* We use char because int might match the return type of a gcc2
13964 builtin and then its argument prototype would still apply. */
13965 char XOpenDisplay ();
13974 rm -f conftest.$ac_objext conftest$ac_exeext
13975 if { (eval echo "$as_me:13975: \"$ac_link\"") >&5
13976 (eval $ac_link) 2>&5
13978 echo "$as_me:13978: \$? = $ac_status" >&5
13979 (exit $ac_status); } &&
13980 { ac_try='test -s conftest$ac_exeext'
13981 { (eval echo "$as_me:13981: \"$ac_try\"") >&5
13982 (eval $ac_try) 2>&5
13984 echo "$as_me:13984: \$? = $ac_status" >&5
13985 (exit $ac_status); }; }; then
13986 ac_cv_lib_X11_XOpenDisplay=yes
13988 echo "$as_me: failed program was:" >&5
13989 cat conftest.$ac_ext >&5
13990 ac_cv_lib_X11_XOpenDisplay=no
13992 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13993 LIBS=$ac_check_lib_save_LIBS
13995 echo "$as_me:13995: result: $ac_cv_lib_X11_XOpenDisplay" >&5
13996 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
13997 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
13999 cf_add_libs="-lX11"
14000 # Filter out duplicates - this happens with badly-designed ".pc" files...
14001 for cf_add_1lib in $LIBS
14003 for cf_add_2lib in $cf_add_libs
14005 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14011 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14013 LIBS="$cf_add_libs"
14017 echo "$as_me:14017: checking for XCurses library" >&5
14018 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
14019 if test "${cf_cv_lib_XCurses+set}" = set; then
14020 echo $ECHO_N "(cached) $ECHO_C" >&6
14023 cf_add_libs="-lXCurses"
14024 # Filter out duplicates - this happens with badly-designed ".pc" files...
14025 for cf_add_1lib in $LIBS
14027 for cf_add_2lib in $cf_add_libs
14029 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14035 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14037 LIBS="$cf_add_libs"
14039 cat >conftest.$ac_ext <<_ACEOF
14040 #line 14040 "configure"
14041 #include "confdefs.h"
14043 #include <xcurses.h>
14044 char *XCursesProgramName = "test";
14054 rm -f conftest.$ac_objext conftest$ac_exeext
14055 if { (eval echo "$as_me:14055: \"$ac_link\"") >&5
14056 (eval $ac_link) 2>&5
14058 echo "$as_me:14058: \$? = $ac_status" >&5
14059 (exit $ac_status); } &&
14060 { ac_try='test -s conftest$ac_exeext'
14061 { (eval echo "$as_me:14061: \"$ac_try\"") >&5
14062 (eval $ac_try) 2>&5
14064 echo "$as_me:14064: \$? = $ac_status" >&5
14065 (exit $ac_status); }; }; then
14066 cf_cv_lib_XCurses=yes
14068 echo "$as_me: failed program was:" >&5
14069 cat conftest.$ac_ext >&5
14070 cf_cv_lib_XCurses=no
14072 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14075 echo "$as_me:14075: result: $cf_cv_lib_XCurses" >&5
14076 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
14080 if test $cf_cv_lib_XCurses = yes ; then
14082 cat >>confdefs.h <<\EOF
14086 cat >>confdefs.h <<\EOF
14090 echo "$as_me:14090: checking for xcurses.h" >&5
14091 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
14092 if test "${ac_cv_header_xcurses_h+set}" = set; then
14093 echo $ECHO_N "(cached) $ECHO_C" >&6
14095 cat >conftest.$ac_ext <<_ACEOF
14096 #line 14096 "configure"
14097 #include "confdefs.h"
14098 #include <xcurses.h>
14100 if { (eval echo "$as_me:14100: \"$ac_cpp conftest.$ac_ext\"") >&5
14101 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14103 egrep -v '^ *\+' conftest.er1 >conftest.err
14105 cat conftest.err >&5
14106 echo "$as_me:14106: \$? = $ac_status" >&5
14107 (exit $ac_status); } >/dev/null; then
14108 if test -s conftest.err; then
14109 ac_cpp_err=$ac_c_preproc_warn_flag
14116 if test -z "$ac_cpp_err"; then
14117 ac_cv_header_xcurses_h=yes
14119 echo "$as_me: failed program was:" >&5
14120 cat conftest.$ac_ext >&5
14121 ac_cv_header_xcurses_h=no
14123 rm -f conftest.err conftest.$ac_ext
14125 echo "$as_me:14125: result: $ac_cv_header_xcurses_h" >&5
14126 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
14127 if test $ac_cv_header_xcurses_h = yes; then
14129 cat >>confdefs.h <<\EOF
14130 #define HAVE_XCURSES 1
14136 { { echo "$as_me:14136: error: Cannot link with XCurses" >&5
14137 echo "$as_me: error: Cannot link with XCurses" >&2;}
14138 { (exit 1); exit 1; }; }
14143 { { echo "$as_me:14143: error: unexpected screen-value: $cf_cv_screen" >&5
14144 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
14145 { (exit 1); exit 1; }; }
14149 : ${cf_nculib_root:=$cf_cv_screen}
14150 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
14151 echo "$as_me:14151: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
14152 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
14153 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14154 echo $ECHO_N "(cached) $ECHO_C" >&6
14156 ac_check_lib_save_LIBS=$LIBS
14157 LIBS="-l$cf_nculib_root $LIBS"
14158 cat >conftest.$ac_ext <<_ACEOF
14159 #line 14159 "configure"
14160 #include "confdefs.h"
14162 /* Override any gcc2 internal prototype to avoid an error. */
14166 /* We use char because int might match the return type of a gcc2
14167 builtin and then its argument prototype would still apply. */
14168 char _nc_init_pthreads ();
14172 _nc_init_pthreads ();
14177 rm -f conftest.$ac_objext conftest$ac_exeext
14178 if { (eval echo "$as_me:14178: \"$ac_link\"") >&5
14179 (eval $ac_link) 2>&5
14181 echo "$as_me:14181: \$? = $ac_status" >&5
14182 (exit $ac_status); } &&
14183 { ac_try='test -s conftest$ac_exeext'
14184 { (eval echo "$as_me:14184: \"$ac_try\"") >&5
14185 (eval $ac_try) 2>&5
14187 echo "$as_me:14187: \$? = $ac_status" >&5
14188 (exit $ac_status); }; }; then
14189 eval "$as_ac_Lib=yes"
14191 echo "$as_me: failed program was:" >&5
14192 cat conftest.$ac_ext >&5
14193 eval "$as_ac_Lib=no"
14195 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14196 LIBS=$ac_check_lib_save_LIBS
14198 echo "$as_me:14198: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14199 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14200 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14201 cf_cv_ncurses_pthreads=yes
14203 cf_cv_ncurses_pthreads=no
14206 if test "$cf_cv_ncurses_pthreads" = yes
14209 cf_add_libs="-lpthread"
14210 # Filter out duplicates - this happens with badly-designed ".pc" files...
14211 for cf_add_1lib in $LIBS
14213 for cf_add_2lib in $cf_add_libs
14215 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14221 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14223 LIBS="$cf_add_libs"
14227 case $cf_cv_screen in
14229 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
14233 echo "$as_me:14233: checking for X11 rgb file" >&5
14234 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
14236 # Check whether --with-x11-rgb or --without-x11-rgb was given.
14237 if test "${with_x11_rgb+set}" = set; then
14238 withval="$with_x11_rgb"
14244 if test "x$RGB_PATH" = xauto
14246 RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
14248 /opt/local/share/X11/rgb.txt \
14249 /opt/X11/share/X11/rgb.txt \
14250 /usr/share/X11/rgb.txt \
14251 /usr/X11/share/X11/rgb.txt \
14252 /usr/X11/lib/X11/rgb.txt \
14253 /usr/lib/X11/rgb.txt \
14255 /usr/pkg/lib/X11/rgb.txt \
14256 /usr/X11R7/lib/X11/rgb.txt \
14257 /usr/X11R6/lib/X11/rgb.txt \
14258 /usr/X11R5/lib/X11/rgb.txt \
14259 /usr/X11R4/lib/X11/rgb.txt \
14260 /usr/local/lib/X11/rgb.txt \
14261 /usr/local/share/X11/rgb.txt \
14262 /usr/lib64/X11/rgb.txt
14264 if test -f "$cf_path" ; then
14265 RGB_PATH="$cf_path"
14272 if test "x$prefix" != xNONE; then
14273 cf_path_syntax="$prefix"
14275 cf_path_syntax="$ac_default_prefix"
14278 case ".$cf_path" in
14279 (.\$\(*\)*|.\'*\'*)
14283 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14285 (.\${*prefix}*|.\${*dir}*)
14286 eval cf_path="$cf_path"
14287 case ".$cf_path" in
14289 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
14294 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
14297 { { echo "$as_me:14297: error: expected a pathname, not \"$cf_path\"" >&5
14298 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
14299 { (exit 1); exit 1; }; }
14305 echo "$as_me:14305: result: $RGB_PATH" >&5
14306 echo "${ECHO_T}$RGB_PATH" >&6
14308 cat >>confdefs.h <<EOF
14309 #define RGB_PATH "$cf_path"
14313 if test "$RGB_PATH" = no
14320 case $cf_cv_screen in
14322 cf_default_panel=no
14325 cf_default_tinfo=no
14327 (xcurses|bsdcurses)
14328 cf_default_panel=no
14331 cf_default_tinfo=yes
14334 cf_default_panel=yes
14335 cf_default_form=yes
14336 cf_default_menu=yes
14337 cf_default_tinfo=yes
14338 case $cf_cv_screen in
14340 cf_curses_headers="nc_alloc.h nomacros.h term_entry.h"
14346 echo "$as_me:14346: checking if you want to check for panel functions" >&5
14347 echo $ECHO_N "checking if you want to check for panel functions... $ECHO_C" >&6
14349 # Check whether --enable-panel or --disable-panel was given.
14350 if test "${enable_panel+set}" = set; then
14351 enableval="$enable_panel"
14352 test "$enableval" != no && enableval=yes
14353 if test "$enableval" != "yes" ; then
14356 cf_enable_panel=$cf_default_panel
14360 cf_enable_panel=$cf_default_panel
14363 echo "$as_me:14363: result: $cf_enable_panel" >&5
14364 echo "${ECHO_T}$cf_enable_panel" >&6
14365 if test $cf_enable_panel = yes
14368 cf_have_curses_lib=no
14370 : ${NCURSES_CONFIG_PKG:=none}
14371 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
14373 elif test "x${PKG_CONFIG:=none}" != xnone; then
14374 echo "$as_me:14374: checking pkg-config for panel$cf_cv_libtype" >&5
14375 echo $ECHO_N "checking pkg-config for panel$cf_cv_libtype... $ECHO_C" >&6
14376 if "$PKG_CONFIG" --exists panel$cf_cv_libtype ; then
14377 echo "$as_me:14377: result: yes" >&5
14378 echo "${ECHO_T}yes" >&6
14380 echo "$as_me:14380: checking if the panel$cf_cv_libtype package files work" >&5
14381 echo $ECHO_N "checking if the panel$cf_cv_libtype package files work... $ECHO_C" >&6
14383 cf_save_CPPFLAGS="$CPPFLAGS"
14384 cf_save_LIBS="$LIBS"
14389 cf_new_extra_cppflags=
14391 for cf_add_cflags in `$PKG_CONFIG --cflags panel$cf_cv_libtype`
14393 case $cf_fix_cppflags in
14395 case $cf_add_cflags in
14396 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14397 case $cf_add_cflags in
14399 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14401 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14402 && test -z "${cf_tst_cflags}" \
14403 && cf_fix_cppflags=yes
14405 if test $cf_fix_cppflags = yes ; then
14407 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14408 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14411 elif test "${cf_tst_cflags}" = "\"'" ; then
14413 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14414 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14420 case "$CPPFLAGS" in
14424 case $cf_add_cflags in
14426 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14428 CPPFLAGS=`echo "$CPPFLAGS" | \
14429 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14430 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14435 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14436 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14443 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14444 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14451 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14452 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14454 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14456 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14457 && test -z "${cf_tst_cflags}" \
14458 && cf_fix_cppflags=no
14463 if test -n "$cf_new_cflags" ; then
14465 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14466 CFLAGS="${CFLAGS}$cf_new_cflags"
14470 if test -n "$cf_new_cppflags" ; then
14472 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14473 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14477 if test -n "$cf_new_extra_cppflags" ; then
14479 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14480 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14484 cf_add_libs="`$PKG_CONFIG --libs panel$cf_cv_libtype`"
14485 # Filter out duplicates - this happens with badly-designed ".pc" files...
14486 for cf_add_1lib in $LIBS
14488 for cf_add_2lib in $cf_add_libs
14490 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14496 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14498 LIBS="$cf_add_libs"
14500 cat >conftest.$ac_ext <<_ACEOF
14501 #line 14501 "configure"
14502 #include "confdefs.h"
14507 (void) new_panel ( 0 );
14512 rm -f conftest.$ac_objext conftest$ac_exeext
14513 if { (eval echo "$as_me:14513: \"$ac_link\"") >&5
14514 (eval $ac_link) 2>&5
14516 echo "$as_me:14516: \$? = $ac_status" >&5
14517 (exit $ac_status); } &&
14518 { ac_try='test -s conftest$ac_exeext'
14519 { (eval echo "$as_me:14519: \"$ac_try\"") >&5
14520 (eval $ac_try) 2>&5
14522 echo "$as_me:14522: \$? = $ac_status" >&5
14523 (exit $ac_status); }; }; then
14524 if test "$cross_compiling" = yes; then
14525 cf_have_curses_lib=maybe
14527 cat >conftest.$ac_ext <<_ACEOF
14528 #line 14528 "configure"
14529 #include "confdefs.h"
14532 { (void) new_panel ( 0 ); return 0; }
14534 rm -f conftest$ac_exeext
14535 if { (eval echo "$as_me:14535: \"$ac_link\"") >&5
14536 (eval $ac_link) 2>&5
14538 echo "$as_me:14538: \$? = $ac_status" >&5
14539 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14540 { (eval echo "$as_me:14540: \"$ac_try\"") >&5
14541 (eval $ac_try) 2>&5
14543 echo "$as_me:14543: \$? = $ac_status" >&5
14544 (exit $ac_status); }; }; then
14545 cf_have_curses_lib=yes
14547 echo "$as_me: program exited with status $ac_status" >&5
14548 echo "$as_me: failed program was:" >&5
14549 cat conftest.$ac_ext >&5
14550 cf_have_curses_lib=no
14552 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14555 echo "$as_me: failed program was:" >&5
14556 cat conftest.$ac_ext >&5
14557 cf_have_curses_lib=no
14559 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14560 echo "$as_me:14560: result: $cf_have_curses_lib" >&5
14561 echo "${ECHO_T}$cf_have_curses_lib" >&6
14562 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
14563 if test "$cf_have_curses_lib" != "yes"
14565 CPPFLAGS="$cf_save_CPPFLAGS"
14566 LIBS="$cf_save_LIBS"
14569 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14571 cat >>confdefs.h <<EOF
14572 #define $cf_upper 1
14578 if test "$cf_have_curses_lib" = no; then
14579 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
14580 echo "$as_me:14580: checking for new_panel in -lpanel$cf_cv_libtype" >&5
14581 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
14582 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14583 echo $ECHO_N "(cached) $ECHO_C" >&6
14585 ac_check_lib_save_LIBS=$LIBS
14586 LIBS="-lpanel$cf_cv_libtype $LIBS"
14587 cat >conftest.$ac_ext <<_ACEOF
14588 #line 14588 "configure"
14589 #include "confdefs.h"
14591 /* Override any gcc2 internal prototype to avoid an error. */
14595 /* We use char because int might match the return type of a gcc2
14596 builtin and then its argument prototype would still apply. */
14606 rm -f conftest.$ac_objext conftest$ac_exeext
14607 if { (eval echo "$as_me:14607: \"$ac_link\"") >&5
14608 (eval $ac_link) 2>&5
14610 echo "$as_me:14610: \$? = $ac_status" >&5
14611 (exit $ac_status); } &&
14612 { ac_try='test -s conftest$ac_exeext'
14613 { (eval echo "$as_me:14613: \"$ac_try\"") >&5
14614 (eval $ac_try) 2>&5
14616 echo "$as_me:14616: \$? = $ac_status" >&5
14617 (exit $ac_status); }; }; then
14618 eval "$as_ac_Lib=yes"
14620 echo "$as_me: failed program was:" >&5
14621 cat conftest.$ac_ext >&5
14622 eval "$as_ac_Lib=no"
14624 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14625 LIBS=$ac_check_lib_save_LIBS
14627 echo "$as_me:14627: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14628 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14629 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14631 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14633 cf_add_libs="-lpanel$cf_cv_libtype"
14634 # Filter out duplicates - this happens with badly-designed ".pc" files...
14635 for cf_add_1lib in $LIBS
14637 for cf_add_2lib in $cf_add_libs
14639 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14645 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14647 LIBS="$cf_add_libs"
14649 cat >>confdefs.h <<EOF
14650 #define $cf_upper 1
14657 cf_curses_headers="$cf_curses_headers panel.h"
14660 echo "$as_me:14660: checking if you want to check for menu functions" >&5
14661 echo $ECHO_N "checking if you want to check for menu functions... $ECHO_C" >&6
14663 # Check whether --enable-menu or --disable-menu was given.
14664 if test "${enable_menu+set}" = set; then
14665 enableval="$enable_menu"
14666 test "$enableval" != no && enableval=yes
14667 if test "$enableval" != "yes" ; then
14670 cf_enable_menu=$cf_default_menu
14674 cf_enable_menu=$cf_default_menu
14677 echo "$as_me:14677: result: $cf_enable_menu" >&5
14678 echo "${ECHO_T}$cf_enable_menu" >&6
14679 if test $cf_enable_menu = yes
14681 case $cf_cv_screen in
14686 echo "$as_me:14686: checking for NetBSD menu.h" >&5
14687 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
14688 if test "${cf_cv_netbsd_menu_h+set}" = set; then
14689 echo $ECHO_N "(cached) $ECHO_C" >&6
14692 cat >conftest.$ac_ext <<_ACEOF
14693 #line 14693 "configure"
14694 #include "confdefs.h"
14696 #include <${cf_cv_ncurses_header:-curses.h}>
14704 int y = menu->max_item_width;
14710 rm -f conftest.$ac_objext
14711 if { (eval echo "$as_me:14711: \"$ac_compile\"") >&5
14712 (eval $ac_compile) 2>&5
14714 echo "$as_me:14714: \$? = $ac_status" >&5
14715 (exit $ac_status); } &&
14716 { ac_try='test -s conftest.$ac_objext'
14717 { (eval echo "$as_me:14717: \"$ac_try\"") >&5
14718 (eval $ac_try) 2>&5
14720 echo "$as_me:14720: \$? = $ac_status" >&5
14721 (exit $ac_status); }; }; then
14722 cf_cv_netbsd_menu_h=yes
14725 echo "$as_me: failed program was:" >&5
14726 cat conftest.$ac_ext >&5
14727 cf_cv_netbsd_menu_h=no
14729 rm -f conftest.$ac_objext conftest.$ac_ext
14732 echo "$as_me:14732: result: $cf_cv_netbsd_menu_h" >&5
14733 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
14735 test "$cf_cv_netbsd_menu_h" = yes &&
14736 cat >>confdefs.h <<\EOF
14737 #define HAVE_NETBSD_MENU_H 1
14743 cf_have_curses_lib=no
14745 : ${NCURSES_CONFIG_PKG:=none}
14746 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
14748 elif test "x${PKG_CONFIG:=none}" != xnone; then
14749 echo "$as_me:14749: checking pkg-config for menu$cf_cv_libtype" >&5
14750 echo $ECHO_N "checking pkg-config for menu$cf_cv_libtype... $ECHO_C" >&6
14751 if "$PKG_CONFIG" --exists menu$cf_cv_libtype ; then
14752 echo "$as_me:14752: result: yes" >&5
14753 echo "${ECHO_T}yes" >&6
14755 echo "$as_me:14755: checking if the menu$cf_cv_libtype package files work" >&5
14756 echo $ECHO_N "checking if the menu$cf_cv_libtype package files work... $ECHO_C" >&6
14758 cf_save_CPPFLAGS="$CPPFLAGS"
14759 cf_save_LIBS="$LIBS"
14764 cf_new_extra_cppflags=
14766 for cf_add_cflags in `$PKG_CONFIG --cflags menu$cf_cv_libtype`
14768 case $cf_fix_cppflags in
14770 case $cf_add_cflags in
14771 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14772 case $cf_add_cflags in
14774 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14776 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14777 && test -z "${cf_tst_cflags}" \
14778 && cf_fix_cppflags=yes
14780 if test $cf_fix_cppflags = yes ; then
14782 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14783 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14786 elif test "${cf_tst_cflags}" = "\"'" ; then
14788 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14789 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14795 case "$CPPFLAGS" in
14799 case $cf_add_cflags in
14801 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14803 CPPFLAGS=`echo "$CPPFLAGS" | \
14804 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14805 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14810 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14811 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14818 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14819 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14826 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14827 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14829 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14831 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14832 && test -z "${cf_tst_cflags}" \
14833 && cf_fix_cppflags=no
14838 if test -n "$cf_new_cflags" ; then
14840 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14841 CFLAGS="${CFLAGS}$cf_new_cflags"
14845 if test -n "$cf_new_cppflags" ; then
14847 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14848 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14852 if test -n "$cf_new_extra_cppflags" ; then
14854 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14855 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14859 cf_add_libs="`$PKG_CONFIG --libs menu$cf_cv_libtype`"
14860 # Filter out duplicates - this happens with badly-designed ".pc" files...
14861 for cf_add_1lib in $LIBS
14863 for cf_add_2lib in $cf_add_libs
14865 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14871 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14873 LIBS="$cf_add_libs"
14875 cat >conftest.$ac_ext <<_ACEOF
14876 #line 14876 "configure"
14877 #include "confdefs.h"
14882 (void) menu_driver ( 0,0 );
14887 rm -f conftest.$ac_objext conftest$ac_exeext
14888 if { (eval echo "$as_me:14888: \"$ac_link\"") >&5
14889 (eval $ac_link) 2>&5
14891 echo "$as_me:14891: \$? = $ac_status" >&5
14892 (exit $ac_status); } &&
14893 { ac_try='test -s conftest$ac_exeext'
14894 { (eval echo "$as_me:14894: \"$ac_try\"") >&5
14895 (eval $ac_try) 2>&5
14897 echo "$as_me:14897: \$? = $ac_status" >&5
14898 (exit $ac_status); }; }; then
14899 if test "$cross_compiling" = yes; then
14900 cf_have_curses_lib=maybe
14902 cat >conftest.$ac_ext <<_ACEOF
14903 #line 14903 "configure"
14904 #include "confdefs.h"
14907 { (void) menu_driver ( 0,0 ); return 0; }
14909 rm -f conftest$ac_exeext
14910 if { (eval echo "$as_me:14910: \"$ac_link\"") >&5
14911 (eval $ac_link) 2>&5
14913 echo "$as_me:14913: \$? = $ac_status" >&5
14914 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14915 { (eval echo "$as_me:14915: \"$ac_try\"") >&5
14916 (eval $ac_try) 2>&5
14918 echo "$as_me:14918: \$? = $ac_status" >&5
14919 (exit $ac_status); }; }; then
14920 cf_have_curses_lib=yes
14922 echo "$as_me: program exited with status $ac_status" >&5
14923 echo "$as_me: failed program was:" >&5
14924 cat conftest.$ac_ext >&5
14925 cf_have_curses_lib=no
14927 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14930 echo "$as_me: failed program was:" >&5
14931 cat conftest.$ac_ext >&5
14932 cf_have_curses_lib=no
14934 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14935 echo "$as_me:14935: result: $cf_have_curses_lib" >&5
14936 echo "${ECHO_T}$cf_have_curses_lib" >&6
14937 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
14938 if test "$cf_have_curses_lib" != "yes"
14940 CPPFLAGS="$cf_save_CPPFLAGS"
14941 LIBS="$cf_save_LIBS"
14944 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14946 cat >>confdefs.h <<EOF
14947 #define $cf_upper 1
14953 if test "$cf_have_curses_lib" = no; then
14954 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
14955 echo "$as_me:14955: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
14956 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
14957 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14958 echo $ECHO_N "(cached) $ECHO_C" >&6
14960 ac_check_lib_save_LIBS=$LIBS
14961 LIBS="-lmenu$cf_cv_libtype $LIBS"
14962 cat >conftest.$ac_ext <<_ACEOF
14963 #line 14963 "configure"
14964 #include "confdefs.h"
14966 /* Override any gcc2 internal prototype to avoid an error. */
14970 /* We use char because int might match the return type of a gcc2
14971 builtin and then its argument prototype would still apply. */
14972 char menu_driver ();
14981 rm -f conftest.$ac_objext conftest$ac_exeext
14982 if { (eval echo "$as_me:14982: \"$ac_link\"") >&5
14983 (eval $ac_link) 2>&5
14985 echo "$as_me:14985: \$? = $ac_status" >&5
14986 (exit $ac_status); } &&
14987 { ac_try='test -s conftest$ac_exeext'
14988 { (eval echo "$as_me:14988: \"$ac_try\"") >&5
14989 (eval $ac_try) 2>&5
14991 echo "$as_me:14991: \$? = $ac_status" >&5
14992 (exit $ac_status); }; }; then
14993 eval "$as_ac_Lib=yes"
14995 echo "$as_me: failed program was:" >&5
14996 cat conftest.$ac_ext >&5
14997 eval "$as_ac_Lib=no"
14999 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15000 LIBS=$ac_check_lib_save_LIBS
15002 echo "$as_me:15002: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15003 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15004 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15006 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15008 cf_add_libs="-lmenu$cf_cv_libtype"
15009 # Filter out duplicates - this happens with badly-designed ".pc" files...
15010 for cf_add_1lib in $LIBS
15012 for cf_add_2lib in $cf_add_libs
15014 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15020 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15022 LIBS="$cf_add_libs"
15024 cat >>confdefs.h <<EOF
15025 #define $cf_upper 1
15032 cf_curses_headers="$cf_curses_headers menu.h"
15035 echo "$as_me:15035: checking if you want to check for form functions" >&5
15036 echo $ECHO_N "checking if you want to check for form functions... $ECHO_C" >&6
15038 # Check whether --enable-form or --disable-form was given.
15039 if test "${enable_form+set}" = set; then
15040 enableval="$enable_form"
15041 test "$enableval" != no && enableval=yes
15042 if test "$enableval" != "yes" ; then
15045 cf_enable_form=$cf_default_form
15049 cf_enable_form=$cf_default_form
15052 echo "$as_me:15052: result: $cf_enable_form" >&5
15053 echo "${ECHO_T}$cf_enable_form" >&6
15054 if test $cf_enable_form = yes
15056 case $cf_cv_screen in
15061 echo "$as_me:15061: checking for NetBSD form.h" >&5
15062 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
15063 if test "${cf_cv_netbsd_form_h+set}" = set; then
15064 echo $ECHO_N "(cached) $ECHO_C" >&6
15067 cat >conftest.$ac_ext <<_ACEOF
15068 #line 15068 "configure"
15069 #include "confdefs.h"
15071 #include <${cf_cv_ncurses_header:-curses.h}>
15079 int y = current_field(form)->cursor_ypos;
15080 int x = current_field(form)->cursor_xpos;
15086 rm -f conftest.$ac_objext
15087 if { (eval echo "$as_me:15087: \"$ac_compile\"") >&5
15088 (eval $ac_compile) 2>&5
15090 echo "$as_me:15090: \$? = $ac_status" >&5
15091 (exit $ac_status); } &&
15092 { ac_try='test -s conftest.$ac_objext'
15093 { (eval echo "$as_me:15093: \"$ac_try\"") >&5
15094 (eval $ac_try) 2>&5
15096 echo "$as_me:15096: \$? = $ac_status" >&5
15097 (exit $ac_status); }; }; then
15098 cf_cv_netbsd_form_h=yes
15101 echo "$as_me: failed program was:" >&5
15102 cat conftest.$ac_ext >&5
15103 cf_cv_netbsd_form_h=no
15105 rm -f conftest.$ac_objext conftest.$ac_ext
15108 echo "$as_me:15108: result: $cf_cv_netbsd_form_h" >&5
15109 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
15111 test "$cf_cv_netbsd_form_h" = yes &&
15112 cat >>confdefs.h <<\EOF
15113 #define HAVE_NETBSD_FORM_H 1
15119 cf_have_curses_lib=no
15121 : ${NCURSES_CONFIG_PKG:=none}
15122 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
15124 elif test "x${PKG_CONFIG:=none}" != xnone; then
15125 echo "$as_me:15125: checking pkg-config for form$cf_cv_libtype" >&5
15126 echo $ECHO_N "checking pkg-config for form$cf_cv_libtype... $ECHO_C" >&6
15127 if "$PKG_CONFIG" --exists form$cf_cv_libtype ; then
15128 echo "$as_me:15128: result: yes" >&5
15129 echo "${ECHO_T}yes" >&6
15131 echo "$as_me:15131: checking if the form$cf_cv_libtype package files work" >&5
15132 echo $ECHO_N "checking if the form$cf_cv_libtype package files work... $ECHO_C" >&6
15134 cf_save_CPPFLAGS="$CPPFLAGS"
15135 cf_save_LIBS="$LIBS"
15140 cf_new_extra_cppflags=
15142 for cf_add_cflags in `$PKG_CONFIG --cflags form$cf_cv_libtype`
15144 case $cf_fix_cppflags in
15146 case $cf_add_cflags in
15147 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15148 case $cf_add_cflags in
15150 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15152 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15153 && test -z "${cf_tst_cflags}" \
15154 && cf_fix_cppflags=yes
15156 if test $cf_fix_cppflags = yes ; then
15158 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15159 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15162 elif test "${cf_tst_cflags}" = "\"'" ; then
15164 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15165 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15171 case "$CPPFLAGS" in
15175 case $cf_add_cflags in
15177 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15179 CPPFLAGS=`echo "$CPPFLAGS" | \
15180 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15181 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15186 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15187 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15194 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15195 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15202 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15203 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15205 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15207 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15208 && test -z "${cf_tst_cflags}" \
15209 && cf_fix_cppflags=no
15214 if test -n "$cf_new_cflags" ; then
15216 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15217 CFLAGS="${CFLAGS}$cf_new_cflags"
15221 if test -n "$cf_new_cppflags" ; then
15223 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15224 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15228 if test -n "$cf_new_extra_cppflags" ; then
15230 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15231 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15235 cf_add_libs="`$PKG_CONFIG --libs form$cf_cv_libtype`"
15236 # Filter out duplicates - this happens with badly-designed ".pc" files...
15237 for cf_add_1lib in $LIBS
15239 for cf_add_2lib in $cf_add_libs
15241 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15247 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15249 LIBS="$cf_add_libs"
15251 cat >conftest.$ac_ext <<_ACEOF
15252 #line 15252 "configure"
15253 #include "confdefs.h"
15258 (void) form_driver ( 0,0 );
15263 rm -f conftest.$ac_objext conftest$ac_exeext
15264 if { (eval echo "$as_me:15264: \"$ac_link\"") >&5
15265 (eval $ac_link) 2>&5
15267 echo "$as_me:15267: \$? = $ac_status" >&5
15268 (exit $ac_status); } &&
15269 { ac_try='test -s conftest$ac_exeext'
15270 { (eval echo "$as_me:15270: \"$ac_try\"") >&5
15271 (eval $ac_try) 2>&5
15273 echo "$as_me:15273: \$? = $ac_status" >&5
15274 (exit $ac_status); }; }; then
15275 if test "$cross_compiling" = yes; then
15276 cf_have_curses_lib=maybe
15278 cat >conftest.$ac_ext <<_ACEOF
15279 #line 15279 "configure"
15280 #include "confdefs.h"
15283 { (void) form_driver ( 0,0 ); return 0; }
15285 rm -f conftest$ac_exeext
15286 if { (eval echo "$as_me:15286: \"$ac_link\"") >&5
15287 (eval $ac_link) 2>&5
15289 echo "$as_me:15289: \$? = $ac_status" >&5
15290 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15291 { (eval echo "$as_me:15291: \"$ac_try\"") >&5
15292 (eval $ac_try) 2>&5
15294 echo "$as_me:15294: \$? = $ac_status" >&5
15295 (exit $ac_status); }; }; then
15296 cf_have_curses_lib=yes
15298 echo "$as_me: program exited with status $ac_status" >&5
15299 echo "$as_me: failed program was:" >&5
15300 cat conftest.$ac_ext >&5
15301 cf_have_curses_lib=no
15303 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15306 echo "$as_me: failed program was:" >&5
15307 cat conftest.$ac_ext >&5
15308 cf_have_curses_lib=no
15310 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15311 echo "$as_me:15311: result: $cf_have_curses_lib" >&5
15312 echo "${ECHO_T}$cf_have_curses_lib" >&6
15313 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
15314 if test "$cf_have_curses_lib" != "yes"
15316 CPPFLAGS="$cf_save_CPPFLAGS"
15317 LIBS="$cf_save_LIBS"
15320 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15322 cat >>confdefs.h <<EOF
15323 #define $cf_upper 1
15329 if test "$cf_have_curses_lib" = no; then
15330 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
15331 echo "$as_me:15331: checking for form_driver in -lform$cf_cv_libtype" >&5
15332 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
15333 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15334 echo $ECHO_N "(cached) $ECHO_C" >&6
15336 ac_check_lib_save_LIBS=$LIBS
15337 LIBS="-lform$cf_cv_libtype $LIBS"
15338 cat >conftest.$ac_ext <<_ACEOF
15339 #line 15339 "configure"
15340 #include "confdefs.h"
15342 /* Override any gcc2 internal prototype to avoid an error. */
15346 /* We use char because int might match the return type of a gcc2
15347 builtin and then its argument prototype would still apply. */
15348 char form_driver ();
15357 rm -f conftest.$ac_objext conftest$ac_exeext
15358 if { (eval echo "$as_me:15358: \"$ac_link\"") >&5
15359 (eval $ac_link) 2>&5
15361 echo "$as_me:15361: \$? = $ac_status" >&5
15362 (exit $ac_status); } &&
15363 { ac_try='test -s conftest$ac_exeext'
15364 { (eval echo "$as_me:15364: \"$ac_try\"") >&5
15365 (eval $ac_try) 2>&5
15367 echo "$as_me:15367: \$? = $ac_status" >&5
15368 (exit $ac_status); }; }; then
15369 eval "$as_ac_Lib=yes"
15371 echo "$as_me: failed program was:" >&5
15372 cat conftest.$ac_ext >&5
15373 eval "$as_ac_Lib=no"
15375 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15376 LIBS=$ac_check_lib_save_LIBS
15378 echo "$as_me:15378: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15379 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15380 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15382 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15384 cf_add_libs="-lform$cf_cv_libtype"
15385 # Filter out duplicates - this happens with badly-designed ".pc" files...
15386 for cf_add_1lib in $LIBS
15388 for cf_add_2lib in $cf_add_libs
15390 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15396 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15398 LIBS="$cf_add_libs"
15400 cat >>confdefs.h <<EOF
15401 #define $cf_upper 1
15408 cf_curses_headers="$cf_curses_headers form.h"
15411 # look for curses-related headers
15413 for ac_header in $cf_curses_headers
15415 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15416 echo "$as_me:15416: checking for $ac_header" >&5
15417 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15418 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15419 echo $ECHO_N "(cached) $ECHO_C" >&6
15421 cat >conftest.$ac_ext <<_ACEOF
15422 #line 15422 "configure"
15423 #include "confdefs.h"
15424 #include <$ac_header>
15426 if { (eval echo "$as_me:15426: \"$ac_cpp conftest.$ac_ext\"") >&5
15427 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15429 egrep -v '^ *\+' conftest.er1 >conftest.err
15431 cat conftest.err >&5
15432 echo "$as_me:15432: \$? = $ac_status" >&5
15433 (exit $ac_status); } >/dev/null; then
15434 if test -s conftest.err; then
15435 ac_cpp_err=$ac_c_preproc_warn_flag
15442 if test -z "$ac_cpp_err"; then
15443 eval "$as_ac_Header=yes"
15445 echo "$as_me: failed program was:" >&5
15446 cat conftest.$ac_ext >&5
15447 eval "$as_ac_Header=no"
15449 rm -f conftest.err conftest.$ac_ext
15451 echo "$as_me:15451: result: `eval echo '${'$as_ac_Header'}'`" >&5
15452 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15453 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15454 cat >>confdefs.h <<EOF
15455 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15461 echo "$as_me:15461: checking for ANSI C header files" >&5
15462 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15463 if test "${ac_cv_header_stdc+set}" = set; then
15464 echo $ECHO_N "(cached) $ECHO_C" >&6
15466 cat >conftest.$ac_ext <<_ACEOF
15467 #line 15467 "configure"
15468 #include "confdefs.h"
15469 #include <stdlib.h>
15470 #include <stdarg.h>
15471 #include <string.h>
15475 if { (eval echo "$as_me:15475: \"$ac_cpp conftest.$ac_ext\"") >&5
15476 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15478 egrep -v '^ *\+' conftest.er1 >conftest.err
15480 cat conftest.err >&5
15481 echo "$as_me:15481: \$? = $ac_status" >&5
15482 (exit $ac_status); } >/dev/null; then
15483 if test -s conftest.err; then
15484 ac_cpp_err=$ac_c_preproc_warn_flag
15491 if test -z "$ac_cpp_err"; then
15492 ac_cv_header_stdc=yes
15494 echo "$as_me: failed program was:" >&5
15495 cat conftest.$ac_ext >&5
15496 ac_cv_header_stdc=no
15498 rm -f conftest.err conftest.$ac_ext
15500 if test $ac_cv_header_stdc = yes; then
15501 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15502 cat >conftest.$ac_ext <<_ACEOF
15503 #line 15503 "configure"
15504 #include "confdefs.h"
15505 #include <string.h>
15508 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15509 egrep "memchr" >/dev/null 2>&1; then
15512 ac_cv_header_stdc=no
15518 if test $ac_cv_header_stdc = yes; then
15519 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15520 cat >conftest.$ac_ext <<_ACEOF
15521 #line 15521 "configure"
15522 #include "confdefs.h"
15523 #include <stdlib.h>
15526 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15527 egrep "free" >/dev/null 2>&1; then
15530 ac_cv_header_stdc=no
15536 if test $ac_cv_header_stdc = yes; then
15537 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15538 if test "$cross_compiling" = yes; then
15541 cat >conftest.$ac_ext <<_ACEOF
15542 #line 15542 "configure"
15543 #include "confdefs.h"
15545 #if ((' ' & 0x0FF) == 0x020)
15546 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15547 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15549 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15550 || ('j' <= (c) && (c) <= 'r') \
15551 || ('s' <= (c) && (c) <= 'z'))
15552 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15555 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15560 for (i = 0; i < 256; i++)
15561 if (XOR (islower (i), ISLOWER (i))
15562 || toupper (i) != TOUPPER (i))
15563 $ac_main_return(2);
15564 $ac_main_return (0);
15567 rm -f conftest$ac_exeext
15568 if { (eval echo "$as_me:15568: \"$ac_link\"") >&5
15569 (eval $ac_link) 2>&5
15571 echo "$as_me:15571: \$? = $ac_status" >&5
15572 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15573 { (eval echo "$as_me:15573: \"$ac_try\"") >&5
15574 (eval $ac_try) 2>&5
15576 echo "$as_me:15576: \$? = $ac_status" >&5
15577 (exit $ac_status); }; }; then
15580 echo "$as_me: program exited with status $ac_status" >&5
15581 echo "$as_me: failed program was:" >&5
15582 cat conftest.$ac_ext >&5
15583 ac_cv_header_stdc=no
15585 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15589 echo "$as_me:15589: result: $ac_cv_header_stdc" >&5
15590 echo "${ECHO_T}$ac_cv_header_stdc" >&6
15591 if test $ac_cv_header_stdc = yes; then
15593 cat >>confdefs.h <<\EOF
15594 #define STDC_HEADERS 1
15599 echo "$as_me:15599: checking whether time.h and sys/time.h may both be included" >&5
15600 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15601 if test "${ac_cv_header_time+set}" = set; then
15602 echo $ECHO_N "(cached) $ECHO_C" >&6
15604 cat >conftest.$ac_ext <<_ACEOF
15605 #line 15605 "configure"
15606 #include "confdefs.h"
15607 #include <sys/types.h>
15608 #include <sys/time.h>
15614 if ((struct tm *) 0)
15620 rm -f conftest.$ac_objext
15621 if { (eval echo "$as_me:15621: \"$ac_compile\"") >&5
15622 (eval $ac_compile) 2>&5
15624 echo "$as_me:15624: \$? = $ac_status" >&5
15625 (exit $ac_status); } &&
15626 { ac_try='test -s conftest.$ac_objext'
15627 { (eval echo "$as_me:15627: \"$ac_try\"") >&5
15628 (eval $ac_try) 2>&5
15630 echo "$as_me:15630: \$? = $ac_status" >&5
15631 (exit $ac_status); }; }; then
15632 ac_cv_header_time=yes
15634 echo "$as_me: failed program was:" >&5
15635 cat conftest.$ac_ext >&5
15636 ac_cv_header_time=no
15638 rm -f conftest.$ac_objext conftest.$ac_ext
15640 echo "$as_me:15640: result: $ac_cv_header_time" >&5
15641 echo "${ECHO_T}$ac_cv_header_time" >&6
15642 if test $ac_cv_header_time = yes; then
15644 cat >>confdefs.h <<\EOF
15645 #define TIME_WITH_SYS_TIME 1
15663 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15664 echo "$as_me:15664: checking for $ac_header" >&5
15665 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15666 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15667 echo $ECHO_N "(cached) $ECHO_C" >&6
15669 cat >conftest.$ac_ext <<_ACEOF
15670 #line 15670 "configure"
15671 #include "confdefs.h"
15672 #include <$ac_header>
15674 if { (eval echo "$as_me:15674: \"$ac_cpp conftest.$ac_ext\"") >&5
15675 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15677 egrep -v '^ *\+' conftest.er1 >conftest.err
15679 cat conftest.err >&5
15680 echo "$as_me:15680: \$? = $ac_status" >&5
15681 (exit $ac_status); } >/dev/null; then
15682 if test -s conftest.err; then
15683 ac_cpp_err=$ac_c_preproc_warn_flag
15690 if test -z "$ac_cpp_err"; then
15691 eval "$as_ac_Header=yes"
15693 echo "$as_me: failed program was:" >&5
15694 cat conftest.$ac_ext >&5
15695 eval "$as_ac_Header=no"
15697 rm -f conftest.err conftest.$ac_ext
15699 echo "$as_me:15699: result: `eval echo '${'$as_ac_Header'}'`" >&5
15700 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15701 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15702 cat >>confdefs.h <<EOF
15703 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15709 for ac_header in unistd.h getopt.h
15711 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15712 echo "$as_me:15712: checking for $ac_header" >&5
15713 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15714 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15715 echo $ECHO_N "(cached) $ECHO_C" >&6
15717 cat >conftest.$ac_ext <<_ACEOF
15718 #line 15718 "configure"
15719 #include "confdefs.h"
15720 #include <$ac_header>
15722 if { (eval echo "$as_me:15722: \"$ac_cpp conftest.$ac_ext\"") >&5
15723 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15725 egrep -v '^ *\+' conftest.er1 >conftest.err
15727 cat conftest.err >&5
15728 echo "$as_me:15728: \$? = $ac_status" >&5
15729 (exit $ac_status); } >/dev/null; then
15730 if test -s conftest.err; then
15731 ac_cpp_err=$ac_c_preproc_warn_flag
15738 if test -z "$ac_cpp_err"; then
15739 eval "$as_ac_Header=yes"
15741 echo "$as_me: failed program was:" >&5
15742 cat conftest.$ac_ext >&5
15743 eval "$as_ac_Header=no"
15745 rm -f conftest.err conftest.$ac_ext
15747 echo "$as_me:15747: result: `eval echo '${'$as_ac_Header'}'`" >&5
15748 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15749 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15750 cat >>confdefs.h <<EOF
15751 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15757 echo "$as_me:15757: checking for header declaring getopt variables" >&5
15758 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15759 if test "${cf_cv_getopt_header+set}" = set; then
15760 echo $ECHO_N "(cached) $ECHO_C" >&6
15763 cf_cv_getopt_header=none
15764 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15766 cat >conftest.$ac_ext <<_ACEOF
15767 #line 15767 "configure"
15768 #include "confdefs.h"
15770 #include <$cf_header>
15774 int x = optind; char *y = optarg
15779 rm -f conftest.$ac_objext
15780 if { (eval echo "$as_me:15780: \"$ac_compile\"") >&5
15781 (eval $ac_compile) 2>&5
15783 echo "$as_me:15783: \$? = $ac_status" >&5
15784 (exit $ac_status); } &&
15785 { ac_try='test -s conftest.$ac_objext'
15786 { (eval echo "$as_me:15786: \"$ac_try\"") >&5
15787 (eval $ac_try) 2>&5
15789 echo "$as_me:15789: \$? = $ac_status" >&5
15790 (exit $ac_status); }; }; then
15791 cf_cv_getopt_header=$cf_header
15794 echo "$as_me: failed program was:" >&5
15795 cat conftest.$ac_ext >&5
15797 rm -f conftest.$ac_objext conftest.$ac_ext
15801 echo "$as_me:15801: result: $cf_cv_getopt_header" >&5
15802 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15803 if test $cf_cv_getopt_header != none ; then
15805 cat >>confdefs.h <<\EOF
15806 #define HAVE_GETOPT_HEADER 1
15810 if test $cf_cv_getopt_header = getopt.h ; then
15812 cat >>confdefs.h <<\EOF
15813 #define NEED_GETOPT_H 1
15825 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15826 echo "$as_me:15826: checking for $ac_func" >&5
15827 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15828 if eval "test \"\${$as_ac_var+set}\" = set"; then
15829 echo $ECHO_N "(cached) $ECHO_C" >&6
15831 cat >conftest.$ac_ext <<_ACEOF
15832 #line 15832 "configure"
15833 #include "confdefs.h"
15834 /* System header to define __stub macros and hopefully few prototypes,
15835 which can conflict with char $ac_func (); below. */
15836 #include <assert.h>
15837 /* Override any gcc2 internal prototype to avoid an error. */
15841 /* We use char because int might match the return type of a gcc2
15842 builtin and then its argument prototype would still apply. */
15849 /* The GNU C library defines this for functions which it implements
15850 to always fail with ENOSYS. Some functions are actually named
15851 something starting with __ and the normal name is an alias. */
15852 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15855 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15862 rm -f conftest.$ac_objext conftest$ac_exeext
15863 if { (eval echo "$as_me:15863: \"$ac_link\"") >&5
15864 (eval $ac_link) 2>&5
15866 echo "$as_me:15866: \$? = $ac_status" >&5
15867 (exit $ac_status); } &&
15868 { ac_try='test -s conftest$ac_exeext'
15869 { (eval echo "$as_me:15869: \"$ac_try\"") >&5
15870 (eval $ac_try) 2>&5
15872 echo "$as_me:15872: \$? = $ac_status" >&5
15873 (exit $ac_status); }; }; then
15874 eval "$as_ac_var=yes"
15876 echo "$as_me: failed program was:" >&5
15877 cat conftest.$ac_ext >&5
15878 eval "$as_ac_var=no"
15880 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15882 echo "$as_me:15882: result: `eval echo '${'$as_ac_var'}'`" >&5
15883 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15884 if test `eval echo '${'$as_ac_var'}'` = yes; then
15885 cat >>confdefs.h <<EOF
15886 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15892 # use a compile-check to work with ncurses*-config and subdirectory includes
15893 echo "$as_me:15893: checking if we can use termcap.h" >&5
15894 echo $ECHO_N "checking if we can use termcap.h... $ECHO_C" >&6
15895 if test "${cf_cv_have_termcap_h+set}" = set; then
15896 echo $ECHO_N "(cached) $ECHO_C" >&6
15899 cat >conftest.$ac_ext <<_ACEOF
15900 #line 15900 "configure"
15901 #include "confdefs.h"
15903 #include <curses.h>
15904 #include <termcap.h>
15914 rm -f conftest.$ac_objext
15915 if { (eval echo "$as_me:15915: \"$ac_compile\"") >&5
15916 (eval $ac_compile) 2>&5
15918 echo "$as_me:15918: \$? = $ac_status" >&5
15919 (exit $ac_status); } &&
15920 { ac_try='test -s conftest.$ac_objext'
15921 { (eval echo "$as_me:15921: \"$ac_try\"") >&5
15922 (eval $ac_try) 2>&5
15924 echo "$as_me:15924: \$? = $ac_status" >&5
15925 (exit $ac_status); }; }; then
15926 cf_cv_have_termcap_h=yes
15928 echo "$as_me: failed program was:" >&5
15929 cat conftest.$ac_ext >&5
15930 cf_cv_have_termcap_h=no
15932 rm -f conftest.$ac_objext conftest.$ac_ext
15934 echo "$as_me:15934: result: $cf_cv_have_termcap_h" >&5
15935 echo "${ECHO_T}$cf_cv_have_termcap_h" >&6
15936 test "x$cf_cv_have_termcap_h" = xyes && cat >>confdefs.h <<\EOF
15937 #define HAVE_TERMCAP_H 1
15940 if test "x$ac_cv_func_getopt" = xno; then
15941 { { echo "$as_me:15941: error: getopt is required for building programs" >&5
15942 echo "$as_me: error: getopt is required for building programs" >&2;}
15943 { (exit 1); exit 1; }; }
15946 if test "$cf_enable_widec" = yes; then
15959 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15960 echo "$as_me:15960: checking for $ac_func" >&5
15961 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15962 if eval "test \"\${$as_ac_var+set}\" = set"; then
15963 echo $ECHO_N "(cached) $ECHO_C" >&6
15965 cat >conftest.$ac_ext <<_ACEOF
15966 #line 15966 "configure"
15967 #include "confdefs.h"
15968 /* System header to define __stub macros and hopefully few prototypes,
15969 which can conflict with char $ac_func (); below. */
15970 #include <assert.h>
15971 /* Override any gcc2 internal prototype to avoid an error. */
15975 /* We use char because int might match the return type of a gcc2
15976 builtin and then its argument prototype would still apply. */
15983 /* The GNU C library defines this for functions which it implements
15984 to always fail with ENOSYS. Some functions are actually named
15985 something starting with __ and the normal name is an alias. */
15986 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15989 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15996 rm -f conftest.$ac_objext conftest$ac_exeext
15997 if { (eval echo "$as_me:15997: \"$ac_link\"") >&5
15998 (eval $ac_link) 2>&5
16000 echo "$as_me:16000: \$? = $ac_status" >&5
16001 (exit $ac_status); } &&
16002 { ac_try='test -s conftest$ac_exeext'
16003 { (eval echo "$as_me:16003: \"$ac_try\"") >&5
16004 (eval $ac_try) 2>&5
16006 echo "$as_me:16006: \$? = $ac_status" >&5
16007 (exit $ac_status); }; }; then
16008 eval "$as_ac_var=yes"
16010 echo "$as_me: failed program was:" >&5
16011 cat conftest.$ac_ext >&5
16012 eval "$as_ac_var=no"
16014 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16016 echo "$as_me:16016: result: `eval echo '${'$as_ac_var'}'`" >&5
16017 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16018 if test `eval echo '${'$as_ac_var'}'` = yes; then
16019 cat >>confdefs.h <<EOF
16020 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16028 echo "$as_me:16028: checking definition to turn on extended curses functions" >&5
16029 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
16030 if test "${cf_cv_need_xopen_extension+set}" = set; then
16031 echo $ECHO_N "(cached) $ECHO_C" >&6
16034 cf_cv_need_xopen_extension=unknown
16035 cat >conftest.$ac_ext <<_ACEOF
16036 #line 16036 "configure"
16037 #include "confdefs.h"
16039 #include <stdlib.h>
16040 #include <${cf_cv_ncurses_header:-curses.h}>
16045 #if defined(NCURSES_VERSION_PATCH)
16046 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
16050 #ifdef NCURSES_VERSION
16052 int check2 = curs_set((int)sizeof(check));
16054 long x = winnstr(stdscr, "", 0);
16056 getbegyx(stdscr, y1, x1)
16061 rm -f conftest.$ac_objext conftest$ac_exeext
16062 if { (eval echo "$as_me:16062: \"$ac_link\"") >&5
16063 (eval $ac_link) 2>&5
16065 echo "$as_me:16065: \$? = $ac_status" >&5
16066 (exit $ac_status); } &&
16067 { ac_try='test -s conftest$ac_exeext'
16068 { (eval echo "$as_me:16068: \"$ac_try\"") >&5
16069 (eval $ac_try) 2>&5
16071 echo "$as_me:16071: \$? = $ac_status" >&5
16072 (exit $ac_status); }; }; then
16073 cf_cv_need_xopen_extension=none
16075 echo "$as_me: failed program was:" >&5
16076 cat conftest.$ac_ext >&5
16078 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
16080 cat >conftest.$ac_ext <<_ACEOF
16081 #line 16081 "configure"
16082 #include "confdefs.h"
16084 #define $cf_try_xopen_extension 1
16085 #include <stdlib.h>
16086 #include <${cf_cv_ncurses_header:-curses.h}>
16091 #ifdef NCURSES_VERSION
16093 int check2 = curs_set((int)sizeof(check));
16095 long x = winnstr(stdscr, "", 0);
16097 getbegyx(stdscr, y1, x1)
16102 rm -f conftest.$ac_objext conftest$ac_exeext
16103 if { (eval echo "$as_me:16103: \"$ac_link\"") >&5
16104 (eval $ac_link) 2>&5
16106 echo "$as_me:16106: \$? = $ac_status" >&5
16107 (exit $ac_status); } &&
16108 { ac_try='test -s conftest$ac_exeext'
16109 { (eval echo "$as_me:16109: \"$ac_try\"") >&5
16110 (eval $ac_try) 2>&5
16112 echo "$as_me:16112: \$? = $ac_status" >&5
16113 (exit $ac_status); }; }; then
16114 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
16116 echo "$as_me: failed program was:" >&5
16117 cat conftest.$ac_ext >&5
16119 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16123 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16126 echo "$as_me:16126: result: $cf_cv_need_xopen_extension" >&5
16127 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
16129 case $cf_cv_need_xopen_extension in
16131 CPPFLAGS="$CPPFLAGS -D$cf_cv_need_xopen_extension"
16135 echo "$as_me:16135: checking for term.h" >&5
16136 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
16137 if test "${cf_cv_term_header+set}" = set; then
16138 echo $ECHO_N "(cached) $ECHO_C" >&6
16141 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
16142 # for <term.h> if we do not find the variant.
16144 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
16146 case ${cf_cv_ncurses_header:-curses.h} in
16148 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
16149 cf_header_list="$cf_header_item $cf_header_list"
16153 for cf_header in $cf_header_list
16155 cat >conftest.$ac_ext <<_ACEOF
16156 #line 16156 "configure"
16157 #include "confdefs.h"
16159 #include <${cf_cv_ncurses_header:-curses.h}>
16160 #include <${cf_header}>
16169 rm -f conftest.$ac_objext
16170 if { (eval echo "$as_me:16170: \"$ac_compile\"") >&5
16171 (eval $ac_compile) 2>&5
16173 echo "$as_me:16173: \$? = $ac_status" >&5
16174 (exit $ac_status); } &&
16175 { ac_try='test -s conftest.$ac_objext'
16176 { (eval echo "$as_me:16176: \"$ac_try\"") >&5
16177 (eval $ac_try) 2>&5
16179 echo "$as_me:16179: \$? = $ac_status" >&5
16180 (exit $ac_status); }; }; then
16181 cf_cv_term_header=$cf_header
16184 echo "$as_me: failed program was:" >&5
16185 cat conftest.$ac_ext >&5
16186 cf_cv_term_header=no
16188 rm -f conftest.$ac_objext conftest.$ac_ext
16191 case $cf_cv_term_header in
16193 # If curses is ncurses, some packagers still mess it up by trying to make
16194 # us use GNU termcap. This handles the most common case.
16195 for cf_header in ncurses/term.h ncursesw/term.h
16197 cat >conftest.$ac_ext <<_ACEOF
16198 #line 16198 "configure"
16199 #include "confdefs.h"
16201 #include <${cf_cv_ncurses_header:-curses.h}>
16202 #ifdef NCURSES_VERSION
16203 #include <${cf_header}>
16215 rm -f conftest.$ac_objext
16216 if { (eval echo "$as_me:16216: \"$ac_compile\"") >&5
16217 (eval $ac_compile) 2>&5
16219 echo "$as_me:16219: \$? = $ac_status" >&5
16220 (exit $ac_status); } &&
16221 { ac_try='test -s conftest.$ac_objext'
16222 { (eval echo "$as_me:16222: \"$ac_try\"") >&5
16223 (eval $ac_try) 2>&5
16225 echo "$as_me:16225: \$? = $ac_status" >&5
16226 (exit $ac_status); }; }; then
16227 cf_cv_term_header=$cf_header
16230 echo "$as_me: failed program was:" >&5
16231 cat conftest.$ac_ext >&5
16232 cf_cv_term_header=no
16234 rm -f conftest.$ac_objext conftest.$ac_ext
16240 echo "$as_me:16240: result: $cf_cv_term_header" >&5
16241 echo "${ECHO_T}$cf_cv_term_header" >&6
16243 case $cf_cv_term_header in
16246 cat >>confdefs.h <<\EOF
16247 #define HAVE_TERM_H 1
16253 cat >>confdefs.h <<\EOF
16254 #define HAVE_NCURSES_TERM_H 1
16260 cat >>confdefs.h <<\EOF
16261 #define HAVE_NCURSESW_TERM_H 1
16267 echo "$as_me:16267: checking for unctrl.h" >&5
16268 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
16269 if test "${cf_cv_unctrl_header+set}" = set; then
16270 echo $ECHO_N "(cached) $ECHO_C" >&6
16273 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
16274 # for <unctrl.h> if we do not find the variant.
16276 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
16278 case ${cf_cv_ncurses_header:-curses.h} in
16280 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
16281 cf_header_list="$cf_header_item $cf_header_list"
16285 for cf_header in $cf_header_list
16287 cat >conftest.$ac_ext <<_ACEOF
16288 #line 16288 "configure"
16289 #include "confdefs.h"
16291 #include <${cf_cv_ncurses_header:-curses.h}>
16292 #include <${cf_header}>
16301 rm -f conftest.$ac_objext
16302 if { (eval echo "$as_me:16302: \"$ac_compile\"") >&5
16303 (eval $ac_compile) 2>&5
16305 echo "$as_me:16305: \$? = $ac_status" >&5
16306 (exit $ac_status); } &&
16307 { ac_try='test -s conftest.$ac_objext'
16308 { (eval echo "$as_me:16308: \"$ac_try\"") >&5
16309 (eval $ac_try) 2>&5
16311 echo "$as_me:16311: \$? = $ac_status" >&5
16312 (exit $ac_status); }; }; then
16313 cf_cv_unctrl_header=$cf_header
16316 echo "$as_me: failed program was:" >&5
16317 cat conftest.$ac_ext >&5
16318 cf_cv_unctrl_header=no
16320 rm -f conftest.$ac_objext conftest.$ac_ext
16324 echo "$as_me:16324: result: $cf_cv_unctrl_header" >&5
16325 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
16327 case $cf_cv_unctrl_header in
16329 { echo "$as_me:16329: WARNING: unctrl.h header not found" >&5
16330 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
16334 case $cf_cv_unctrl_header in
16337 cat >>confdefs.h <<\EOF
16338 #define HAVE_UNCTRL_H 1
16344 cat >>confdefs.h <<\EOF
16345 #define HAVE_NCURSES_UNCTRL_H 1
16349 (ncursesw/unctrl.h)
16351 cat >>confdefs.h <<\EOF
16352 #define HAVE_NCURSESW_UNCTRL_H 1
16360 assume_default_colors \
16375 init_extended_color \
16383 reset_color_pairs \
16398 use_default_colors \
16400 use_extended_names \
16416 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16418 echo "$as_me:16418: checking for ${cf_func}" >&5
16419 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
16421 echo "${as_me:-configure}:16421: testing ${cf_func} ..." 1>&5
16423 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
16424 echo $ECHO_N "(cached) $ECHO_C" >&6
16427 eval cf_result='$ac_cv_func_'$cf_func
16428 if test ".$cf_result" != ".no"; then
16429 cat >conftest.$ac_ext <<_ACEOF
16430 #line 16430 "configure"
16431 #include "confdefs.h"
16433 #ifdef HAVE_XCURSES
16434 #include <xcurses.h>
16435 char * XCursesProgramName = "test";
16437 #include <${cf_cv_ncurses_header:-curses.h}>
16438 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16439 #include <ncursesw/term.h>
16440 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16441 #include <ncurses/term.h>
16442 #elif defined(HAVE_TERM_H)
16452 long foo = (long)(&${cf_func});
16453 fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
16454 if (foo + 1234L > 5678L)
16455 ${cf_cv_main_return:-return}(foo != 0);
16462 rm -f conftest.$ac_objext conftest$ac_exeext
16463 if { (eval echo "$as_me:16463: \"$ac_link\"") >&5
16464 (eval $ac_link) 2>&5
16466 echo "$as_me:16466: \$? = $ac_status" >&5
16467 (exit $ac_status); } &&
16468 { ac_try='test -s conftest$ac_exeext'
16469 { (eval echo "$as_me:16469: \"$ac_try\"") >&5
16470 (eval $ac_try) 2>&5
16472 echo "$as_me:16472: \$? = $ac_status" >&5
16473 (exit $ac_status); }; }; then
16476 echo "$as_me: failed program was:" >&5
16477 cat conftest.$ac_ext >&5
16480 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16482 eval 'cf_cv_func_'$cf_func'=$cf_result'
16486 # use the computed/retrieved cache-value:
16487 eval 'cf_result=$cf_cv_func_'$cf_func
16488 echo "$as_me:16488: result: $cf_result" >&5
16489 echo "${ECHO_T}$cf_result" >&6
16490 if test $cf_result != no; then
16491 cat >>confdefs.h <<EOF
16492 #define HAVE_${cf_tr_func} 1
16498 for cf_func in tputs
16501 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16503 echo "$as_me:16503: checking for ${cf_func}" >&5
16504 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
16506 echo "${as_me:-configure}:16506: testing ${cf_func} ..." 1>&5
16508 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
16509 echo $ECHO_N "(cached) $ECHO_C" >&6
16512 eval cf_result='$ac_cv_func_'$cf_func
16513 if test ".$cf_result" != ".no"; then
16514 cat >conftest.$ac_ext <<_ACEOF
16515 #line 16515 "configure"
16516 #include "confdefs.h"
16518 #ifdef HAVE_XCURSES
16519 #include <xcurses.h>
16520 char * XCursesProgramName = "test";
16522 #include <${cf_cv_ncurses_header:-curses.h}>
16523 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16524 #include <ncursesw/term.h>
16525 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16526 #include <ncurses/term.h>
16527 #elif defined(HAVE_TERM_H)
16537 long foo = (long)(&${cf_func});
16538 fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
16539 if (foo + 1234L > 5678L)
16540 ${cf_cv_main_return:-return}(foo != 0);
16547 rm -f conftest.$ac_objext conftest$ac_exeext
16548 if { (eval echo "$as_me:16548: \"$ac_link\"") >&5
16549 (eval $ac_link) 2>&5
16551 echo "$as_me:16551: \$? = $ac_status" >&5
16552 (exit $ac_status); } &&
16553 { ac_try='test -s conftest$ac_exeext'
16554 { (eval echo "$as_me:16554: \"$ac_try\"") >&5
16555 (eval $ac_try) 2>&5
16557 echo "$as_me:16557: \$? = $ac_status" >&5
16558 (exit $ac_status); }; }; then
16561 echo "$as_me: failed program was:" >&5
16562 cat conftest.$ac_ext >&5
16565 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16567 eval 'cf_cv_func_'$cf_func'=$cf_result'
16571 # use the computed/retrieved cache-value:
16572 eval 'cf_result=$cf_cv_func_'$cf_func
16573 echo "$as_me:16573: result: $cf_result" >&5
16574 echo "${ECHO_T}$cf_result" >&6
16575 if test $cf_result != no; then
16576 cat >>confdefs.h <<EOF
16577 #define HAVE_${cf_tr_func} 1
16583 if test x$cf_cv_func_tputs = xyes
16586 for cf_arg in int char
16588 for cf_ret in int void
16590 if test $cf_ret = void
16592 cf_return="/* nothing */"
16594 cf_return="return value"
16596 cat >conftest.$ac_ext <<_ACEOF
16597 #line 16597 "configure"
16598 #include "confdefs.h"
16600 #include <${cf_cv_ncurses_header:-curses.h}>
16601 #include <$cf_cv_term_header>
16603 static $cf_ret outc($cf_arg value) { $cf_return; }
16609 tputs("hello", 0, outc);
16610 ${cf_cv_main_return:-return}(0);
16616 rm -f conftest.$ac_objext
16617 if { (eval echo "$as_me:16617: \"$ac_compile\"") >&5
16618 (eval $ac_compile) 2>&5
16620 echo "$as_me:16620: \$? = $ac_status" >&5
16621 (exit $ac_status); } &&
16622 { ac_try='test -s conftest.$ac_objext'
16623 { (eval echo "$as_me:16623: \"$ac_try\"") >&5
16624 (eval $ac_try) 2>&5
16626 echo "$as_me:16626: \$? = $ac_status" >&5
16627 (exit $ac_status); }; }; then
16629 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
16631 echo "${as_me:-configure}:16631: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
16633 cat >>confdefs.h <<EOF
16634 #define TPUTS_ARG $cf_arg
16635 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
16636 #define TPUTS_RETURN(value) $cf_return
16642 echo "$as_me: failed program was:" >&5
16643 cat conftest.$ac_ext >&5
16645 rm -f conftest.$ac_objext conftest.$ac_ext
16647 test $cf_done = yes && break
16651 echo "$as_me:16651: checking for ncurses extended functions" >&5
16652 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
16653 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
16654 echo $ECHO_N "(cached) $ECHO_C" >&6
16657 cat >conftest.$ac_ext <<_ACEOF
16658 #line 16658 "configure"
16659 #include "confdefs.h"
16661 #include <${cf_cv_ncurses_header:-curses.h}>
16666 int x = NCURSES_EXT_FUNCS
16672 rm -f conftest.$ac_objext
16673 if { (eval echo "$as_me:16673: \"$ac_compile\"") >&5
16674 (eval $ac_compile) 2>&5
16676 echo "$as_me:16676: \$? = $ac_status" >&5
16677 (exit $ac_status); } &&
16678 { ac_try='test -s conftest.$ac_objext'
16679 { (eval echo "$as_me:16679: \"$ac_try\"") >&5
16680 (eval $ac_try) 2>&5
16682 echo "$as_me:16682: \$? = $ac_status" >&5
16683 (exit $ac_status); }; }; then
16684 cf_cv_ncurses_ext_funcs=defined
16686 echo "$as_me: failed program was:" >&5
16687 cat conftest.$ac_ext >&5
16689 cat >conftest.$ac_ext <<_ACEOF
16690 #line 16690 "configure"
16691 #include "confdefs.h"
16693 #include <${cf_cv_ncurses_header:-curses.h}>
16698 (void) assume_default_colors (0, 0);
16699 (void) curses_version ();
16700 (void) define_key (0, 0);
16701 (void) is_term_resized (0, 0);
16702 (void) key_defined (0);
16703 (void) keybound (0, 0);
16704 (void) keyok (0, 0);
16705 (void) resize_term (0, 0);
16706 (void) resizeterm (0, 0);
16707 (void) use_default_colors ();
16708 (void) use_extended_names (0);
16709 (void) wresize (0, 0, 0);
16714 rm -f conftest.$ac_objext conftest$ac_exeext
16715 if { (eval echo "$as_me:16715: \"$ac_link\"") >&5
16716 (eval $ac_link) 2>&5
16718 echo "$as_me:16718: \$? = $ac_status" >&5
16719 (exit $ac_status); } &&
16720 { ac_try='test -s conftest$ac_exeext'
16721 { (eval echo "$as_me:16721: \"$ac_try\"") >&5
16722 (eval $ac_try) 2>&5
16724 echo "$as_me:16724: \$? = $ac_status" >&5
16725 (exit $ac_status); }; }; then
16726 cf_cv_ncurses_ext_funcs=yes
16728 echo "$as_me: failed program was:" >&5
16729 cat conftest.$ac_ext >&5
16730 cf_cv_ncurses_ext_funcs=no
16732 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16735 rm -f conftest.$ac_objext conftest.$ac_ext
16738 echo "$as_me:16738: result: $cf_cv_ncurses_ext_funcs" >&5
16739 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
16740 test "$cf_cv_ncurses_ext_funcs" = yes &&
16741 cat >>confdefs.h <<\EOF
16742 #define NCURSES_EXT_FUNCS 1
16745 if test "$cf_enable_widec" = yes
16747 # workaround for systems with ncurses before 20111029, due to change of
16748 # feature test macro from _XPG5 to _XOPEN_SOURCE
16749 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
16752 echo "$as_me:16752: checking if _XPG5 should be defined to enable wide-characters" >&5
16753 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
16755 cat >conftest.$ac_ext <<_ACEOF
16756 #line 16756 "configure"
16757 #include "confdefs.h"
16759 #include <${cf_cv_ncurses_header:-curses.h}>
16768 rm -f conftest.$ac_objext
16769 if { (eval echo "$as_me:16769: \"$ac_compile\"") >&5
16770 (eval $ac_compile) 2>&5
16772 echo "$as_me:16772: \$? = $ac_status" >&5
16773 (exit $ac_status); } &&
16774 { ac_try='test -s conftest.$ac_objext'
16775 { (eval echo "$as_me:16775: \"$ac_try\"") >&5
16776 (eval $ac_try) 2>&5
16778 echo "$as_me:16778: \$? = $ac_status" >&5
16779 (exit $ac_status); }; }; then
16782 echo "$as_me: failed program was:" >&5
16783 cat conftest.$ac_ext >&5
16784 cf_save_cppflags="$CPPFLAGS"
16785 CPPFLAGS="$CPPFLAGS -D_XPG5"
16786 cat >conftest.$ac_ext <<_ACEOF
16787 #line 16787 "configure"
16788 #include "confdefs.h"
16790 #include <${cf_cv_ncurses_header:-curses.h}>
16799 rm -f conftest.$ac_objext
16800 if { (eval echo "$as_me:16800: \"$ac_compile\"") >&5
16801 (eval $ac_compile) 2>&5
16803 echo "$as_me:16803: \$? = $ac_status" >&5
16804 (exit $ac_status); } &&
16805 { ac_try='test -s conftest.$ac_objext'
16806 { (eval echo "$as_me:16806: \"$ac_try\"") >&5
16807 (eval $ac_try) 2>&5
16809 echo "$as_me:16809: \$? = $ac_status" >&5
16810 (exit $ac_status); }; }; then
16813 echo "$as_me: failed program was:" >&5
16814 cat conftest.$ac_ext >&5
16816 rm -f conftest.$ac_objext conftest.$ac_ext
16817 CPPFLAGS="$cf_save_cppflags"
16819 rm -f conftest.$ac_objext conftest.$ac_ext
16820 echo "$as_me:16820: result: $cf_define_xpg5" >&5
16821 echo "${ECHO_T}$cf_define_xpg5" >&6
16823 if test "$cf_define_xpg5" = yes
16825 CPPFLAGS="$CPPFLAGS -D_XPG5"
16829 echo "$as_me:16829: checking for wide-character functions" >&5
16830 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
16831 if test "${cf_cv_widechar_funcs+set}" = set; then
16832 echo $ECHO_N "(cached) $ECHO_C" >&6
16835 cat >conftest.$ac_ext <<_ACEOF
16836 #line 16836 "configure"
16837 #include "confdefs.h"
16839 #include <${cf_cv_ncurses_header:-curses.h}>
16844 static wchar_t src_wchar[2];
16845 static cchar_t dst_cchar;
16846 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
16852 rm -f conftest.$ac_objext conftest$ac_exeext
16853 if { (eval echo "$as_me:16853: \"$ac_link\"") >&5
16854 (eval $ac_link) 2>&5
16856 echo "$as_me:16856: \$? = $ac_status" >&5
16857 (exit $ac_status); } &&
16858 { ac_try='test -s conftest$ac_exeext'
16859 { (eval echo "$as_me:16859: \"$ac_try\"") >&5
16860 (eval $ac_try) 2>&5
16862 echo "$as_me:16862: \$? = $ac_status" >&5
16863 (exit $ac_status); }; }; then
16864 cf_cv_widechar_funcs=yes
16866 echo "$as_me: failed program was:" >&5
16867 cat conftest.$ac_ext >&5
16868 cf_cv_widechar_funcs=no
16870 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16873 echo "$as_me:16873: result: $cf_cv_widechar_funcs" >&5
16874 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
16875 if test "$cf_cv_widechar_funcs" != no ; then
16877 cat >>confdefs.h <<\EOF
16878 #define USE_WIDEC_SUPPORT 1
16882 cat >>confdefs.h <<\EOF
16883 #define USE_WIDEC_SUPPORT 0
16888 cat >>confdefs.h <<\EOF
16889 #define USE_WIDEC_SUPPORT 0
16894 echo "$as_me:16894: checking if $cf_cv_screen library uses pthreads" >&5
16895 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
16896 if test "${cf_cv_use_pthreads+set}" = set; then
16897 echo $ECHO_N "(cached) $ECHO_C" >&6
16900 cat >conftest.$ac_ext <<_ACEOF
16901 #line 16901 "configure"
16902 #include "confdefs.h"
16904 #include <${cf_cv_ncurses_header:-curses.h}>
16905 extern void _nc_init_pthreads(void);
16912 _nc_init_pthreads();
16918 rm -f conftest.$ac_objext conftest$ac_exeext
16919 if { (eval echo "$as_me:16919: \"$ac_link\"") >&5
16920 (eval $ac_link) 2>&5
16922 echo "$as_me:16922: \$? = $ac_status" >&5
16923 (exit $ac_status); } &&
16924 { ac_try='test -s conftest$ac_exeext'
16925 { (eval echo "$as_me:16925: \"$ac_try\"") >&5
16926 (eval $ac_try) 2>&5
16928 echo "$as_me:16928: \$? = $ac_status" >&5
16929 (exit $ac_status); }; }; then
16930 cf_cv_use_pthreads=yes
16932 echo "$as_me: failed program was:" >&5
16933 cat conftest.$ac_ext >&5
16934 cf_cv_use_pthreads=no
16936 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16939 echo "$as_me:16939: result: $cf_cv_use_pthreads" >&5
16940 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
16941 test $cf_cv_use_pthreads = yes && cat >>confdefs.h <<\EOF
16942 #define USE_PTHREADS 1
16945 echo "$as_me:16945: checking if sys/time.h works with sys/select.h" >&5
16946 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
16947 if test "${cf_cv_sys_time_select+set}" = set; then
16948 echo $ECHO_N "(cached) $ECHO_C" >&6
16951 cat >conftest.$ac_ext <<_ACEOF
16952 #line 16952 "configure"
16953 #include "confdefs.h"
16955 #include <sys/types.h>
16956 #ifdef HAVE_SYS_TIME_H
16957 #include <sys/time.h>
16959 #ifdef HAVE_SYS_SELECT_H
16960 #include <sys/select.h>
16971 rm -f conftest.$ac_objext
16972 if { (eval echo "$as_me:16972: \"$ac_compile\"") >&5
16973 (eval $ac_compile) 2>&5
16975 echo "$as_me:16975: \$? = $ac_status" >&5
16976 (exit $ac_status); } &&
16977 { ac_try='test -s conftest.$ac_objext'
16978 { (eval echo "$as_me:16978: \"$ac_try\"") >&5
16979 (eval $ac_try) 2>&5
16981 echo "$as_me:16981: \$? = $ac_status" >&5
16982 (exit $ac_status); }; }; then
16983 cf_cv_sys_time_select=yes
16985 echo "$as_me: failed program was:" >&5
16986 cat conftest.$ac_ext >&5
16987 cf_cv_sys_time_select=no
16989 rm -f conftest.$ac_objext conftest.$ac_ext
16993 echo "$as_me:16993: result: $cf_cv_sys_time_select" >&5
16994 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
16995 test "$cf_cv_sys_time_select" = yes &&
16996 cat >>confdefs.h <<\EOF
16997 #define HAVE_SYS_TIME_SELECT 1
17000 # special check for test/ditto.c
17002 echo "$as_me:17002: checking for openpty in -lutil" >&5
17003 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17004 if test "${ac_cv_lib_util_openpty+set}" = set; then
17005 echo $ECHO_N "(cached) $ECHO_C" >&6
17007 ac_check_lib_save_LIBS=$LIBS
17008 LIBS="-lutil $LIBS"
17009 cat >conftest.$ac_ext <<_ACEOF
17010 #line 17010 "configure"
17011 #include "confdefs.h"
17013 /* Override any gcc2 internal prototype to avoid an error. */
17017 /* We use char because int might match the return type of a gcc2
17018 builtin and then its argument prototype would still apply. */
17028 rm -f conftest.$ac_objext conftest$ac_exeext
17029 if { (eval echo "$as_me:17029: \"$ac_link\"") >&5
17030 (eval $ac_link) 2>&5
17032 echo "$as_me:17032: \$? = $ac_status" >&5
17033 (exit $ac_status); } &&
17034 { ac_try='test -s conftest$ac_exeext'
17035 { (eval echo "$as_me:17035: \"$ac_try\"") >&5
17036 (eval $ac_try) 2>&5
17038 echo "$as_me:17038: \$? = $ac_status" >&5
17039 (exit $ac_status); }; }; then
17040 ac_cv_lib_util_openpty=yes
17042 echo "$as_me: failed program was:" >&5
17043 cat conftest.$ac_ext >&5
17044 ac_cv_lib_util_openpty=no
17046 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17047 LIBS=$ac_check_lib_save_LIBS
17049 echo "$as_me:17049: result: $ac_cv_lib_util_openpty" >&5
17050 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17051 if test $ac_cv_lib_util_openpty = yes; then
17057 echo "$as_me:17057: checking for openpty header" >&5
17058 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17059 if test "${cf_cv_func_openpty+set}" = set; then
17060 echo $ECHO_N "(cached) $ECHO_C" >&6
17063 cf_save_LIBS="$LIBS"
17064 test $cf_cv_lib_util = yes && {
17065 cf_add_libs="-lutil"
17066 # Filter out duplicates - this happens with badly-designed ".pc" files...
17067 for cf_add_1lib in $LIBS
17069 for cf_add_2lib in $cf_add_libs
17071 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17077 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17079 LIBS="$cf_add_libs"
17081 for cf_header in pty.h libutil.h util.h
17083 cat >conftest.$ac_ext <<_ACEOF
17084 #line 17084 "configure"
17085 #include "confdefs.h"
17087 #include <$cf_header>
17093 int x = openpty((int *)0, (int *)0, (char *)0,
17094 (struct termios *)0, (struct winsize *)0);
17100 rm -f conftest.$ac_objext conftest$ac_exeext
17101 if { (eval echo "$as_me:17101: \"$ac_link\"") >&5
17102 (eval $ac_link) 2>&5
17104 echo "$as_me:17104: \$? = $ac_status" >&5
17105 (exit $ac_status); } &&
17106 { ac_try='test -s conftest$ac_exeext'
17107 { (eval echo "$as_me:17107: \"$ac_try\"") >&5
17108 (eval $ac_try) 2>&5
17110 echo "$as_me:17110: \$? = $ac_status" >&5
17111 (exit $ac_status); }; }; then
17113 cf_cv_func_openpty=$cf_header
17117 echo "$as_me: failed program was:" >&5
17118 cat conftest.$ac_ext >&5
17120 cf_cv_func_openpty=no
17123 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17125 LIBS="$cf_save_LIBS"
17128 echo "$as_me:17128: result: $cf_cv_func_openpty" >&5
17129 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17131 if test "$cf_cv_func_openpty" != no ; then
17133 cat >>confdefs.h <<EOF
17134 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17137 cat >>confdefs.h <<\EOF
17138 #define USE_XTERM_PTY 1
17141 if test "x$cf_cv_lib_util" = xyes ; then
17143 cf_add_libs="-lutil"
17144 # Filter out duplicates - this happens with badly-designed ".pc" files...
17145 for cf_add_1lib in $TEST_LIBS
17147 for cf_add_2lib in $cf_add_libs
17149 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17155 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17157 TEST_LIBS="$cf_add_libs"
17162 echo "$as_me:17162: checking for function curses_version" >&5
17163 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
17164 if test "${cf_cv_func_curses_version+set}" = set; then
17165 echo $ECHO_N "(cached) $ECHO_C" >&6
17168 if test "$cross_compiling" = yes; then
17169 cf_cv_func_curses_version=unknown
17171 cat >conftest.$ac_ext <<_ACEOF
17172 #line 17172 "configure"
17173 #include "confdefs.h"
17175 #include <${cf_cv_ncurses_header:-curses.h}>
17179 sprintf(temp, "%s\n", curses_version());
17180 ${cf_cv_main_return:-return}(0);
17184 rm -f conftest$ac_exeext
17185 if { (eval echo "$as_me:17185: \"$ac_link\"") >&5
17186 (eval $ac_link) 2>&5
17188 echo "$as_me:17188: \$? = $ac_status" >&5
17189 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17190 { (eval echo "$as_me:17190: \"$ac_try\"") >&5
17191 (eval $ac_try) 2>&5
17193 echo "$as_me:17193: \$? = $ac_status" >&5
17194 (exit $ac_status); }; }; then
17195 cf_cv_func_curses_version=yes
17198 echo "$as_me: program exited with status $ac_status" >&5
17199 echo "$as_me: failed program was:" >&5
17200 cat conftest.$ac_ext >&5
17201 cf_cv_func_curses_version=no
17204 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17208 echo "$as_me:17208: result: $cf_cv_func_curses_version" >&5
17209 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
17210 test "$cf_cv_func_curses_version" = yes &&
17211 cat >>confdefs.h <<\EOF
17212 #define HAVE_CURSES_VERSION 1
17215 echo "$as_me:17215: checking for alternate character set array" >&5
17216 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
17217 if test "${cf_cv_curses_acs_map+set}" = set; then
17218 echo $ECHO_N "(cached) $ECHO_C" >&6
17221 cf_cv_curses_acs_map=unknown
17222 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
17224 cat >conftest.$ac_ext <<_ACEOF
17225 #line 17225 "configure"
17226 #include "confdefs.h"
17228 #include <${cf_cv_ncurses_header:-curses.h}>
17234 $name['k'] = ACS_PLUS
17240 rm -f conftest.$ac_objext conftest$ac_exeext
17241 if { (eval echo "$as_me:17241: \"$ac_link\"") >&5
17242 (eval $ac_link) 2>&5
17244 echo "$as_me:17244: \$? = $ac_status" >&5
17245 (exit $ac_status); } &&
17246 { ac_try='test -s conftest$ac_exeext'
17247 { (eval echo "$as_me:17247: \"$ac_try\"") >&5
17248 (eval $ac_try) 2>&5
17250 echo "$as_me:17250: \$? = $ac_status" >&5
17251 (exit $ac_status); }; }; then
17252 cf_cv_curses_acs_map=$name; break
17254 echo "$as_me: failed program was:" >&5
17255 cat conftest.$ac_ext >&5
17257 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17261 echo "$as_me:17261: result: $cf_cv_curses_acs_map" >&5
17262 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
17264 test "$cf_cv_curses_acs_map" != unknown &&
17265 cat >>confdefs.h <<EOF
17266 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
17269 if test "$cf_enable_widec" = yes; then
17271 echo "$as_me:17271: checking for wide alternate character set array" >&5
17272 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
17273 if test "${cf_cv_curses_wacs_map+set}" = set; then
17274 echo $ECHO_N "(cached) $ECHO_C" >&6
17277 cf_cv_curses_wacs_map=unknown
17278 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
17280 cat >conftest.$ac_ext <<_ACEOF
17281 #line 17281 "configure"
17282 #include "confdefs.h"
17284 #ifndef _XOPEN_SOURCE_EXTENDED
17285 #define _XOPEN_SOURCE_EXTENDED
17287 #include <${cf_cv_ncurses_header:-curses.h}>
17291 void *foo = &($name['k'])
17296 rm -f conftest.$ac_objext conftest$ac_exeext
17297 if { (eval echo "$as_me:17297: \"$ac_link\"") >&5
17298 (eval $ac_link) 2>&5
17300 echo "$as_me:17300: \$? = $ac_status" >&5
17301 (exit $ac_status); } &&
17302 { ac_try='test -s conftest$ac_exeext'
17303 { (eval echo "$as_me:17303: \"$ac_try\"") >&5
17304 (eval $ac_try) 2>&5
17306 echo "$as_me:17306: \$? = $ac_status" >&5
17307 (exit $ac_status); }; }; then
17308 cf_cv_curses_wacs_map=$name
17311 echo "$as_me: failed program was:" >&5
17312 cat conftest.$ac_ext >&5
17314 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17317 echo "$as_me:17317: result: $cf_cv_curses_wacs_map" >&5
17318 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
17320 test "$cf_cv_curses_wacs_map" != unknown &&
17321 cat >>confdefs.h <<EOF
17322 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
17325 echo "$as_me:17325: checking for wide alternate character constants" >&5
17326 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
17327 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
17328 echo $ECHO_N "(cached) $ECHO_C" >&6
17331 cf_cv_curses_wacs_symbols=no
17332 if test "$cf_cv_curses_wacs_map" != unknown
17334 cat >conftest.$ac_ext <<_ACEOF
17335 #line 17335 "configure"
17336 #include "confdefs.h"
17338 #ifndef _XOPEN_SOURCE_EXTENDED
17339 #define _XOPEN_SOURCE_EXTENDED
17341 #include <${cf_cv_ncurses_header:-curses.h}>
17345 cchar_t *foo = WACS_PLUS;
17346 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
17351 rm -f conftest.$ac_objext conftest$ac_exeext
17352 if { (eval echo "$as_me:17352: \"$ac_link\"") >&5
17353 (eval $ac_link) 2>&5
17355 echo "$as_me:17355: \$? = $ac_status" >&5
17356 (exit $ac_status); } &&
17357 { ac_try='test -s conftest$ac_exeext'
17358 { (eval echo "$as_me:17358: \"$ac_try\"") >&5
17359 (eval $ac_try) 2>&5
17361 echo "$as_me:17361: \$? = $ac_status" >&5
17362 (exit $ac_status); }; }; then
17363 cf_cv_curses_wacs_symbols=yes
17365 echo "$as_me: failed program was:" >&5
17366 cat conftest.$ac_ext >&5
17368 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17370 cat >conftest.$ac_ext <<_ACEOF
17371 #line 17371 "configure"
17372 #include "confdefs.h"
17374 #ifndef _XOPEN_SOURCE_EXTENDED
17375 #define _XOPEN_SOURCE_EXTENDED
17377 #include <${cf_cv_ncurses_header:-curses.h}>
17381 cchar_t *foo = WACS_PLUS
17386 rm -f conftest.$ac_objext conftest$ac_exeext
17387 if { (eval echo "$as_me:17387: \"$ac_link\"") >&5
17388 (eval $ac_link) 2>&5
17390 echo "$as_me:17390: \$? = $ac_status" >&5
17391 (exit $ac_status); } &&
17392 { ac_try='test -s conftest$ac_exeext'
17393 { (eval echo "$as_me:17393: \"$ac_try\"") >&5
17394 (eval $ac_try) 2>&5
17396 echo "$as_me:17396: \$? = $ac_status" >&5
17397 (exit $ac_status); }; }; then
17398 cf_cv_curses_wacs_symbols=yes
17400 echo "$as_me: failed program was:" >&5
17401 cat conftest.$ac_ext >&5
17403 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17407 echo "$as_me:17407: result: $cf_cv_curses_wacs_symbols" >&5
17408 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
17410 test "$cf_cv_curses_wacs_symbols" != no &&
17411 cat >>confdefs.h <<\EOF
17412 #define CURSES_WACS_SYMBOLS 1
17417 echo "$as_me:17417: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
17418 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
17419 cat >conftest.$ac_ext <<_ACEOF
17420 #line 17420 "configure"
17421 #include "confdefs.h"
17423 #ifndef _XOPEN_SOURCE_EXTENDED
17424 #define _XOPEN_SOURCE_EXTENDED
17426 #include <${cf_cv_ncurses_header:-curses.h}>
17437 rm -f conftest.$ac_objext
17438 if { (eval echo "$as_me:17438: \"$ac_compile\"") >&5
17439 (eval $ac_compile) 2>&5
17441 echo "$as_me:17441: \$? = $ac_status" >&5
17442 (exit $ac_status); } &&
17443 { ac_try='test -s conftest.$ac_objext'
17444 { (eval echo "$as_me:17444: \"$ac_try\"") >&5
17445 (eval $ac_try) 2>&5
17447 echo "$as_me:17447: \$? = $ac_status" >&5
17448 (exit $ac_status); }; }; then
17451 echo "$as_me: failed program was:" >&5
17452 cat conftest.$ac_ext >&5
17455 rm -f conftest.$ac_objext conftest.$ac_ext
17456 echo "$as_me:17456: result: $cf_result" >&5
17457 echo "${ECHO_T}$cf_result" >&6
17458 if test $cf_result = yes ; then
17460 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17462 cat >>confdefs.h <<EOF
17463 #define $cf_result 1
17468 cat >>confdefs.h <<EOF
17469 #define attr_t long
17474 if test "$cf_enable_widec" = yes; then
17476 # This is needed on Tru64 5.0 to declare mbstate_t
17477 echo "$as_me:17477: checking if we must include wchar.h to declare mbstate_t" >&5
17478 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
17479 if test "${cf_cv_mbstate_t+set}" = set; then
17480 echo $ECHO_N "(cached) $ECHO_C" >&6
17483 cat >conftest.$ac_ext <<_ACEOF
17484 #line 17484 "configure"
17485 #include "confdefs.h"
17487 #include <stdlib.h>
17488 #include <stdarg.h>
17490 #ifdef HAVE_LIBUTF8_H
17491 #include <libutf8.h>
17501 rm -f conftest.$ac_objext
17502 if { (eval echo "$as_me:17502: \"$ac_compile\"") >&5
17503 (eval $ac_compile) 2>&5
17505 echo "$as_me:17505: \$? = $ac_status" >&5
17506 (exit $ac_status); } &&
17507 { ac_try='test -s conftest.$ac_objext'
17508 { (eval echo "$as_me:17508: \"$ac_try\"") >&5
17509 (eval $ac_try) 2>&5
17511 echo "$as_me:17511: \$? = $ac_status" >&5
17512 (exit $ac_status); }; }; then
17515 echo "$as_me: failed program was:" >&5
17516 cat conftest.$ac_ext >&5
17517 cat >conftest.$ac_ext <<_ACEOF
17518 #line 17518 "configure"
17519 #include "confdefs.h"
17521 #include <stdlib.h>
17522 #include <stdarg.h>
17525 #ifdef HAVE_LIBUTF8_H
17526 #include <libutf8.h>
17536 rm -f conftest.$ac_objext
17537 if { (eval echo "$as_me:17537: \"$ac_compile\"") >&5
17538 (eval $ac_compile) 2>&5
17540 echo "$as_me:17540: \$? = $ac_status" >&5
17541 (exit $ac_status); } &&
17542 { ac_try='test -s conftest.$ac_objext'
17543 { (eval echo "$as_me:17543: \"$ac_try\"") >&5
17544 (eval $ac_try) 2>&5
17546 echo "$as_me:17546: \$? = $ac_status" >&5
17547 (exit $ac_status); }; }; then
17548 cf_cv_mbstate_t=yes
17550 echo "$as_me: failed program was:" >&5
17551 cat conftest.$ac_ext >&5
17552 cf_cv_mbstate_t=unknown
17554 rm -f conftest.$ac_objext conftest.$ac_ext
17556 rm -f conftest.$ac_objext conftest.$ac_ext
17558 echo "$as_me:17558: result: $cf_cv_mbstate_t" >&5
17559 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
17561 if test "$cf_cv_mbstate_t" = yes ; then
17563 cat >>confdefs.h <<\EOF
17564 #define NEED_WCHAR_H 1
17570 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
17571 if test "$cf_cv_mbstate_t" = unknown ; then
17572 NCURSES_MBSTATE_T=1
17575 # if we find mbstate_t in either place, use substitution to provide a fallback.
17576 if test "$cf_cv_mbstate_t" != unknown ; then
17577 NCURSES_OK_MBSTATE_T=1
17580 # This is needed on Tru64 5.0 to declare wchar_t
17581 echo "$as_me:17581: checking if we must include wchar.h to declare wchar_t" >&5
17582 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
17583 if test "${cf_cv_wchar_t+set}" = set; then
17584 echo $ECHO_N "(cached) $ECHO_C" >&6
17587 cat >conftest.$ac_ext <<_ACEOF
17588 #line 17588 "configure"
17589 #include "confdefs.h"
17591 #include <stdlib.h>
17592 #include <stdarg.h>
17594 #ifdef HAVE_LIBUTF8_H
17595 #include <libutf8.h>
17605 rm -f conftest.$ac_objext
17606 if { (eval echo "$as_me:17606: \"$ac_compile\"") >&5
17607 (eval $ac_compile) 2>&5
17609 echo "$as_me:17609: \$? = $ac_status" >&5
17610 (exit $ac_status); } &&
17611 { ac_try='test -s conftest.$ac_objext'
17612 { (eval echo "$as_me:17612: \"$ac_try\"") >&5
17613 (eval $ac_try) 2>&5
17615 echo "$as_me:17615: \$? = $ac_status" >&5
17616 (exit $ac_status); }; }; then
17619 echo "$as_me: failed program was:" >&5
17620 cat conftest.$ac_ext >&5
17621 cat >conftest.$ac_ext <<_ACEOF
17622 #line 17622 "configure"
17623 #include "confdefs.h"
17625 #include <stdlib.h>
17626 #include <stdarg.h>
17629 #ifdef HAVE_LIBUTF8_H
17630 #include <libutf8.h>
17640 rm -f conftest.$ac_objext
17641 if { (eval echo "$as_me:17641: \"$ac_compile\"") >&5
17642 (eval $ac_compile) 2>&5
17644 echo "$as_me:17644: \$? = $ac_status" >&5
17645 (exit $ac_status); } &&
17646 { ac_try='test -s conftest.$ac_objext'
17647 { (eval echo "$as_me:17647: \"$ac_try\"") >&5
17648 (eval $ac_try) 2>&5
17650 echo "$as_me:17650: \$? = $ac_status" >&5
17651 (exit $ac_status); }; }; then
17654 echo "$as_me: failed program was:" >&5
17655 cat conftest.$ac_ext >&5
17656 cf_cv_wchar_t=unknown
17658 rm -f conftest.$ac_objext conftest.$ac_ext
17660 rm -f conftest.$ac_objext conftest.$ac_ext
17662 echo "$as_me:17662: result: $cf_cv_wchar_t" >&5
17663 echo "${ECHO_T}$cf_cv_wchar_t" >&6
17665 if test "$cf_cv_wchar_t" = yes ; then
17667 cat >>confdefs.h <<\EOF
17668 #define NEED_WCHAR_H 1
17674 # if we do not find wchar_t in either place, use substitution to provide a fallback.
17675 if test "$cf_cv_wchar_t" = unknown ; then
17679 # if we find wchar_t in either place, use substitution to provide a fallback.
17680 if test "$cf_cv_wchar_t" != unknown ; then
17681 NCURSES_OK_WCHAR_T=1
17684 # This is needed on Tru64 5.0 to declare wint_t
17685 echo "$as_me:17685: checking if we must include wchar.h to declare wint_t" >&5
17686 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
17687 if test "${cf_cv_wint_t+set}" = set; then
17688 echo $ECHO_N "(cached) $ECHO_C" >&6
17691 cat >conftest.$ac_ext <<_ACEOF
17692 #line 17692 "configure"
17693 #include "confdefs.h"
17695 #include <stdlib.h>
17696 #include <stdarg.h>
17698 #ifdef HAVE_LIBUTF8_H
17699 #include <libutf8.h>
17709 rm -f conftest.$ac_objext
17710 if { (eval echo "$as_me:17710: \"$ac_compile\"") >&5
17711 (eval $ac_compile) 2>&5
17713 echo "$as_me:17713: \$? = $ac_status" >&5
17714 (exit $ac_status); } &&
17715 { ac_try='test -s conftest.$ac_objext'
17716 { (eval echo "$as_me:17716: \"$ac_try\"") >&5
17717 (eval $ac_try) 2>&5
17719 echo "$as_me:17719: \$? = $ac_status" >&5
17720 (exit $ac_status); }; }; then
17723 echo "$as_me: failed program was:" >&5
17724 cat conftest.$ac_ext >&5
17725 cat >conftest.$ac_ext <<_ACEOF
17726 #line 17726 "configure"
17727 #include "confdefs.h"
17729 #include <stdlib.h>
17730 #include <stdarg.h>
17733 #ifdef HAVE_LIBUTF8_H
17734 #include <libutf8.h>
17744 rm -f conftest.$ac_objext
17745 if { (eval echo "$as_me:17745: \"$ac_compile\"") >&5
17746 (eval $ac_compile) 2>&5
17748 echo "$as_me:17748: \$? = $ac_status" >&5
17749 (exit $ac_status); } &&
17750 { ac_try='test -s conftest.$ac_objext'
17751 { (eval echo "$as_me:17751: \"$ac_try\"") >&5
17752 (eval $ac_try) 2>&5
17754 echo "$as_me:17754: \$? = $ac_status" >&5
17755 (exit $ac_status); }; }; then
17758 echo "$as_me: failed program was:" >&5
17759 cat conftest.$ac_ext >&5
17760 cf_cv_wint_t=unknown
17762 rm -f conftest.$ac_objext conftest.$ac_ext
17764 rm -f conftest.$ac_objext conftest.$ac_ext
17766 echo "$as_me:17766: result: $cf_cv_wint_t" >&5
17767 echo "${ECHO_T}$cf_cv_wint_t" >&6
17769 if test "$cf_cv_wint_t" = yes ; then
17771 cat >>confdefs.h <<\EOF
17772 #define NEED_WCHAR_H 1
17778 # if we do not find wint_t in either place, use substitution to provide a fallback.
17779 if test "$cf_cv_wint_t" = unknown ; then
17783 # if we find wint_t in either place, use substitution to provide a fallback.
17784 if test "$cf_cv_wint_t" != unknown ; then
17785 NCURSES_OK_WINT_T=1
17788 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
17790 echo "$as_me:17790: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
17791 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
17792 cat >conftest.$ac_ext <<_ACEOF
17793 #line 17793 "configure"
17794 #include "confdefs.h"
17796 #ifndef _XOPEN_SOURCE_EXTENDED
17797 #define _XOPEN_SOURCE_EXTENDED
17799 #include <${cf_cv_ncurses_header:-curses.h}>
17810 rm -f conftest.$ac_objext
17811 if { (eval echo "$as_me:17811: \"$ac_compile\"") >&5
17812 (eval $ac_compile) 2>&5
17814 echo "$as_me:17814: \$? = $ac_status" >&5
17815 (exit $ac_status); } &&
17816 { ac_try='test -s conftest.$ac_objext'
17817 { (eval echo "$as_me:17817: \"$ac_try\"") >&5
17818 (eval $ac_try) 2>&5
17820 echo "$as_me:17820: \$? = $ac_status" >&5
17821 (exit $ac_status); }; }; then
17824 echo "$as_me: failed program was:" >&5
17825 cat conftest.$ac_ext >&5
17828 rm -f conftest.$ac_objext conftest.$ac_ext
17829 echo "$as_me:17829: result: $cf_result" >&5
17830 echo "${ECHO_T}$cf_result" >&6
17831 if test $cf_result = yes ; then
17833 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17835 cat >>confdefs.h <<EOF
17836 #define $cf_result 1
17841 cat >>confdefs.h <<EOF
17842 #define mbstate_t long
17849 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
17851 echo "$as_me:17851: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
17852 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
17853 cat >conftest.$ac_ext <<_ACEOF
17854 #line 17854 "configure"
17855 #include "confdefs.h"
17857 #ifndef _XOPEN_SOURCE_EXTENDED
17858 #define _XOPEN_SOURCE_EXTENDED
17860 #include <${cf_cv_ncurses_header:-curses.h}>
17871 rm -f conftest.$ac_objext
17872 if { (eval echo "$as_me:17872: \"$ac_compile\"") >&5
17873 (eval $ac_compile) 2>&5
17875 echo "$as_me:17875: \$? = $ac_status" >&5
17876 (exit $ac_status); } &&
17877 { ac_try='test -s conftest.$ac_objext'
17878 { (eval echo "$as_me:17878: \"$ac_try\"") >&5
17879 (eval $ac_try) 2>&5
17881 echo "$as_me:17881: \$? = $ac_status" >&5
17882 (exit $ac_status); }; }; then
17885 echo "$as_me: failed program was:" >&5
17886 cat conftest.$ac_ext >&5
17889 rm -f conftest.$ac_objext conftest.$ac_ext
17890 echo "$as_me:17890: result: $cf_result" >&5
17891 echo "${ECHO_T}$cf_result" >&6
17892 if test $cf_result = yes ; then
17894 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17896 cat >>confdefs.h <<EOF
17897 #define $cf_result 1
17902 cat >>confdefs.h <<EOF
17903 #define wchar_t long
17910 if test "$NCURSES_OK_WINT_T" = 0 ; then
17912 echo "$as_me:17912: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
17913 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
17914 cat >conftest.$ac_ext <<_ACEOF
17915 #line 17915 "configure"
17916 #include "confdefs.h"
17918 #ifndef _XOPEN_SOURCE_EXTENDED
17919 #define _XOPEN_SOURCE_EXTENDED
17921 #include <${cf_cv_ncurses_header:-curses.h}>
17932 rm -f conftest.$ac_objext
17933 if { (eval echo "$as_me:17933: \"$ac_compile\"") >&5
17934 (eval $ac_compile) 2>&5
17936 echo "$as_me:17936: \$? = $ac_status" >&5
17937 (exit $ac_status); } &&
17938 { ac_try='test -s conftest.$ac_objext'
17939 { (eval echo "$as_me:17939: \"$ac_try\"") >&5
17940 (eval $ac_try) 2>&5
17942 echo "$as_me:17942: \$? = $ac_status" >&5
17943 (exit $ac_status); }; }; then
17946 echo "$as_me: failed program was:" >&5
17947 cat conftest.$ac_ext >&5
17950 rm -f conftest.$ac_objext conftest.$ac_ext
17951 echo "$as_me:17951: result: $cf_result" >&5
17952 echo "${ECHO_T}$cf_result" >&6
17953 if test $cf_result = yes ; then
17955 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17957 cat >>confdefs.h <<EOF
17958 #define $cf_result 1
17963 cat >>confdefs.h <<EOF
17964 #define wint_t long
17979 echo "$as_me:17979: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
17980 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
17982 cat >conftest.$ac_ext <<_ACEOF
17983 #line 17983 "configure"
17984 #include "confdefs.h"
17986 #ifdef HAVE_XCURSES
17987 #include <xcurses.h>
17988 char * XCursesProgramName = "test";
17990 #include <${cf_cv_ncurses_header:-curses.h}>
17991 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17992 #include <ncursesw/term.h>
17993 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17994 #include <ncurses/term.h>
17995 #elif defined(HAVE_TERM_H)
18004 void *foo = &($cf_data)
18010 rm -f conftest.$ac_objext
18011 if { (eval echo "$as_me:18011: \"$ac_compile\"") >&5
18012 (eval $ac_compile) 2>&5
18014 echo "$as_me:18014: \$? = $ac_status" >&5
18015 (exit $ac_status); } &&
18016 { ac_try='test -s conftest.$ac_objext'
18017 { (eval echo "$as_me:18017: \"$ac_try\"") >&5
18018 (eval $ac_try) 2>&5
18020 echo "$as_me:18020: \$? = $ac_status" >&5
18021 (exit $ac_status); }; }; then
18025 echo "$as_me: failed program was:" >&5
18026 cat conftest.$ac_ext >&5
18029 rm -f conftest.$ac_objext conftest.$ac_ext
18030 echo "$as_me:18030: result: $cf_result" >&5
18031 echo "${ECHO_T}$cf_result" >&6
18033 if test $cf_result = yes ; then
18035 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18037 cat >>confdefs.h <<EOF
18038 #define $cf_result 1
18042 echo "$as_me:18042: checking for data $cf_data in library" >&5
18043 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
18044 # BSD linkers insist on making weak linkage, but resolve at runtime.
18045 if test "$cross_compiling" = yes; then
18048 cat >conftest.$ac_ext <<_ACEOF
18049 #line 18049 "configure"
18050 #include "confdefs.h"
18052 #ifdef HAVE_XCURSES
18053 #include <xcurses.h>
18054 char * XCursesProgramName = "test";
18056 #include <${cf_cv_ncurses_header:-curses.h}>
18057 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
18058 #include <ncursesw/term.h>
18059 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
18060 #include <ncurses/term.h>
18061 #elif defined(HAVE_TERM_H)
18066 extern char $cf_data;
18072 void *foo = &($cf_data);
18073 fprintf(stderr, "testing linkage of $cf_data:%p\n", (void *)foo);
18074 ${cf_cv_main_return:-return}(foo == 0);
18081 rm -f conftest.$ac_objext conftest$ac_exeext
18082 if { (eval echo "$as_me:18082: \"$ac_link\"") >&5
18083 (eval $ac_link) 2>&5
18085 echo "$as_me:18085: \$? = $ac_status" >&5
18086 (exit $ac_status); } &&
18087 { ac_try='test -s conftest$ac_exeext'
18088 { (eval echo "$as_me:18088: \"$ac_try\"") >&5
18089 (eval $ac_try) 2>&5
18091 echo "$as_me:18091: \$? = $ac_status" >&5
18092 (exit $ac_status); }; }; then
18095 echo "$as_me: failed program was:" >&5
18096 cat conftest.$ac_ext >&5
18099 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18102 cat >conftest.$ac_ext <<_ACEOF
18103 #line 18103 "configure"
18104 #include "confdefs.h"
18106 #ifdef HAVE_XCURSES
18107 #include <xcurses.h>
18108 char * XCursesProgramName = "test";
18110 #include <${cf_cv_ncurses_header:-curses.h}>
18111 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
18112 #include <ncursesw/term.h>
18113 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
18114 #include <ncurses/term.h>
18115 #elif defined(HAVE_TERM_H)
18120 extern char $cf_data;
18123 void *foo = &($cf_data);
18124 fprintf(stderr, "testing linkage of $cf_data:%p\n", (void *)foo);
18125 ${cf_cv_main_return:-return}(foo == 0);
18128 rm -f conftest$ac_exeext
18129 if { (eval echo "$as_me:18129: \"$ac_link\"") >&5
18130 (eval $ac_link) 2>&5
18132 echo "$as_me:18132: \$? = $ac_status" >&5
18133 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18134 { (eval echo "$as_me:18134: \"$ac_try\"") >&5
18135 (eval $ac_try) 2>&5
18137 echo "$as_me:18137: \$? = $ac_status" >&5
18138 (exit $ac_status); }; }; then
18142 echo "$as_me: program exited with status $ac_status" >&5
18143 echo "$as_me: failed program was:" >&5
18144 cat conftest.$ac_ext >&5
18147 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18149 echo "$as_me:18149: result: $cf_result" >&5
18150 echo "${ECHO_T}$cf_result" >&6
18151 if test $cf_result = yes ; then
18153 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18155 cat >>confdefs.h <<EOF
18156 #define $cf_result 1
18159 # do not exit loop here, since we prefer system's declarations
18164 if ( test "$GCC" = yes || test "$GXX" = yes )
18166 echo "$as_me:18166: checking if you want to turn on gcc warnings" >&5
18167 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
18169 # Check whether --enable-warnings or --disable-warnings was given.
18170 if test "${enable_warnings+set}" = set; then
18171 enableval="$enable_warnings"
18172 test "$enableval" != yes && enableval=no
18173 if test "$enableval" != "no" ; then
18183 echo "$as_me:18183: result: $with_warnings" >&5
18184 echo "${ECHO_T}$with_warnings" >&6
18185 if test "$with_warnings" = "yes"
18188 if test "$GCC" = yes
18190 cat > conftest.i <<EOF
18192 #define GCC_PRINTF 0
18195 #define GCC_SCANF 0
18197 #ifndef GCC_NORETURN
18198 #define GCC_NORETURN /* nothing */
18201 #define GCC_UNUSED /* nothing */
18204 if test "$GCC" = yes
18206 { echo "$as_me:18206: checking for $CC __attribute__ directives..." >&5
18207 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
18208 cat > conftest.$ac_ext <<EOF
18209 #line 18209 "${as_me:-configure}"
18210 #include "confdefs.h"
18211 #include "conftest.h"
18212 #include "conftest.i"
18214 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
18216 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
18219 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
18221 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
18223 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
18224 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
18225 extern void foo(void) GCC_NORETURN;
18226 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
18228 cf_printf_attribute=no
18229 cf_scanf_attribute=no
18230 for cf_attribute in scanf printf unused noreturn
18233 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18235 cf_directive="__attribute__(($cf_attribute))"
18236 echo "checking for $CC $cf_directive" 1>&5
18238 case $cf_attribute in
18240 cf_printf_attribute=yes
18241 cat >conftest.h <<EOF
18242 #define GCC_$cf_ATTRIBUTE 1
18246 cf_scanf_attribute=yes
18247 cat >conftest.h <<EOF
18248 #define GCC_$cf_ATTRIBUTE 1
18252 cat >conftest.h <<EOF
18253 #define GCC_$cf_ATTRIBUTE $cf_directive
18258 if { (eval echo "$as_me:18258: \"$ac_compile\"") >&5
18259 (eval $ac_compile) 2>&5
18261 echo "$as_me:18261: \$? = $ac_status" >&5
18262 (exit $ac_status); }; then
18263 test -n "$verbose" && echo "$as_me:18263: result: ... $cf_attribute" >&5
18264 echo "${ECHO_T}... $cf_attribute" >&6
18265 cat conftest.h >>confdefs.h
18266 case $cf_attribute in
18269 cat >>confdefs.h <<EOF
18270 #define GCC_NORETURN $cf_directive
18275 cf_value='/* nothing */'
18276 if test "$cf_printf_attribute" != no ; then
18277 cf_value='__attribute__((format(printf,fmt,var)))'
18279 cat >>confdefs.h <<\EOF
18280 #define GCC_PRINTF 1
18285 cat >>confdefs.h <<EOF
18286 #define GCC_PRINTFLIKE(fmt,var) $cf_value
18291 cf_value='/* nothing */'
18292 if test "$cf_scanf_attribute" != no ; then
18293 cf_value='__attribute__((format(scanf,fmt,var)))'
18295 cat >>confdefs.h <<\EOF
18296 #define GCC_SCANF 1
18301 cat >>confdefs.h <<EOF
18302 #define GCC_SCANFLIKE(fmt,var) $cf_value
18308 cat >>confdefs.h <<EOF
18309 #define GCC_UNUSED $cf_directive
18317 fgrep define conftest.i >>confdefs.h
18324 if test "$GCC" = yes ; then
18327 echo "$as_me:18327: checking if this is really Intel C compiler" >&5
18328 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
18329 cf_save_CFLAGS="$CFLAGS"
18330 CFLAGS="$CFLAGS -no-gcc"
18331 cat >conftest.$ac_ext <<_ACEOF
18332 #line 18332 "configure"
18333 #include "confdefs.h"
18339 #ifdef __INTEL_COMPILER
18348 rm -f conftest.$ac_objext
18349 if { (eval echo "$as_me:18349: \"$ac_compile\"") >&5
18350 (eval $ac_compile) 2>&5
18352 echo "$as_me:18352: \$? = $ac_status" >&5
18353 (exit $ac_status); } &&
18354 { ac_try='test -s conftest.$ac_objext'
18355 { (eval echo "$as_me:18355: \"$ac_try\"") >&5
18356 (eval $ac_try) 2>&5
18358 echo "$as_me:18358: \$? = $ac_status" >&5
18359 (exit $ac_status); }; }; then
18361 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
18364 echo "$as_me: failed program was:" >&5
18365 cat conftest.$ac_ext >&5
18367 rm -f conftest.$ac_objext conftest.$ac_ext
18368 CFLAGS="$cf_save_CFLAGS"
18369 echo "$as_me:18369: result: $INTEL_COMPILER" >&5
18370 echo "${ECHO_T}$INTEL_COMPILER" >&6
18377 if test "$GCC" = yes ; then
18378 echo "$as_me:18378: checking if this is really Clang C compiler" >&5
18379 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
18380 cf_save_CFLAGS="$CFLAGS"
18381 CFLAGS="$CFLAGS -Qunused-arguments"
18382 cat >conftest.$ac_ext <<_ACEOF
18383 #line 18383 "configure"
18384 #include "confdefs.h"
18399 rm -f conftest.$ac_objext
18400 if { (eval echo "$as_me:18400: \"$ac_compile\"") >&5
18401 (eval $ac_compile) 2>&5
18403 echo "$as_me:18403: \$? = $ac_status" >&5
18404 (exit $ac_status); } &&
18405 { ac_try='test -s conftest.$ac_objext'
18406 { (eval echo "$as_me:18406: \"$ac_try\"") >&5
18407 (eval $ac_try) 2>&5
18409 echo "$as_me:18409: \$? = $ac_status" >&5
18410 (exit $ac_status); }; }; then
18412 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
18415 echo "$as_me: failed program was:" >&5
18416 cat conftest.$ac_ext >&5
18418 rm -f conftest.$ac_objext conftest.$ac_ext
18419 CFLAGS="$cf_save_CFLAGS"
18420 echo "$as_me:18420: result: $CLANG_COMPILER" >&5
18421 echo "${ECHO_T}$CLANG_COMPILER" >&6
18424 cat > conftest.$ac_ext <<EOF
18425 #line 18425 "${as_me:-configure}"
18426 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
18429 if test "$INTEL_COMPILER" = yes
18431 # The "-wdXXX" options suppress warnings:
18432 # remark #1419: external declaration in primary source file
18433 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
18434 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
18435 # remark #193: zero used for undefined preprocessing identifier
18436 # remark #593: variable "curs_sb_left_arrow" was set but never used
18437 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
18438 # remark #869: parameter "tw" was never referenced
18439 # remark #981: operands are evaluated in unspecified order
18440 # warning #279: controlling expression is constant
18442 { echo "$as_me:18442: checking for $CC warning options..." >&5
18443 echo "$as_me: checking for $CC warning options..." >&6;}
18444 cf_save_CFLAGS="$CFLAGS"
18445 EXTRA_CFLAGS="-Wall"
18457 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
18458 if { (eval echo "$as_me:18458: \"$ac_compile\"") >&5
18459 (eval $ac_compile) 2>&5
18461 echo "$as_me:18461: \$? = $ac_status" >&5
18462 (exit $ac_status); }; then
18463 test -n "$verbose" && echo "$as_me:18463: result: ... -$cf_opt" >&5
18464 echo "${ECHO_T}... -$cf_opt" >&6
18465 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
18468 CFLAGS="$cf_save_CFLAGS"
18470 elif test "$GCC" = yes
18472 { echo "$as_me:18472: checking for $CC warning options..." >&5
18473 echo "$as_me: checking for $CC warning options..." >&6;}
18474 cf_save_CFLAGS="$CFLAGS"
18477 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
18478 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
18479 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
18480 for cf_opt in W Wall \
18481 Wbad-function-cast \
18484 Wdeclaration-after-statement \
18487 Wmissing-declarations \
18488 Wmissing-prototypes \
18492 Wstrict-prototypes \
18493 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
18495 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
18496 if { (eval echo "$as_me:18496: \"$ac_compile\"") >&5
18497 (eval $ac_compile) 2>&5
18499 echo "$as_me:18499: \$? = $ac_status" >&5
18500 (exit $ac_status); }; then
18501 test -n "$verbose" && echo "$as_me:18501: result: ... -$cf_opt" >&5
18502 echo "${ECHO_T}... -$cf_opt" >&6
18505 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
18508 case $GCC_VERSION in
18510 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
18512 echo "${as_me:-configure}:18512: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
18518 case $GCC_VERSION in
18520 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
18522 echo "${as_me:-configure}:18522: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
18528 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
18531 CFLAGS="$cf_save_CFLAGS"
18538 echo "$as_me:18538: checking if you want to use dmalloc for testing" >&5
18539 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
18541 # Check whether --with-dmalloc or --without-dmalloc was given.
18542 if test "${with_dmalloc+set}" = set; then
18543 withval="$with_dmalloc"
18545 cat >>confdefs.h <<EOF
18546 #define USE_DMALLOC 1
18549 : ${with_cflags:=-g}
18550 : ${with_no_leaks:=yes}
18555 echo "$as_me:18555: result: ${with_dmalloc:-no}" >&5
18556 echo "${ECHO_T}${with_dmalloc:-no}" >&6
18558 case .$with_cflags in
18568 cf_new_extra_cppflags=
18570 for cf_add_cflags in -g
18572 case $cf_fix_cppflags in
18574 case $cf_add_cflags in
18575 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18576 case $cf_add_cflags in
18578 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18580 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18581 && test -z "${cf_tst_cflags}" \
18582 && cf_fix_cppflags=yes
18584 if test $cf_fix_cppflags = yes ; then
18586 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18587 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18590 elif test "${cf_tst_cflags}" = "\"'" ; then
18592 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18593 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18599 case "$CPPFLAGS" in
18603 case $cf_add_cflags in
18605 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18607 CPPFLAGS=`echo "$CPPFLAGS" | \
18608 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
18609 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
18614 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18615 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18622 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18623 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18630 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18631 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18633 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18635 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18636 && test -z "${cf_tst_cflags}" \
18637 && cf_fix_cppflags=no
18642 if test -n "$cf_new_cflags" ; then
18644 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18645 CFLAGS="${CFLAGS}$cf_new_cflags"
18649 if test -n "$cf_new_cppflags" ; then
18651 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18652 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18656 if test -n "$cf_new_extra_cppflags" ; then
18658 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18659 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18668 if test "$with_dmalloc" = yes ; then
18669 echo "$as_me:18669: checking for dmalloc.h" >&5
18670 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18671 if test "${ac_cv_header_dmalloc_h+set}" = set; then
18672 echo $ECHO_N "(cached) $ECHO_C" >&6
18674 cat >conftest.$ac_ext <<_ACEOF
18675 #line 18675 "configure"
18676 #include "confdefs.h"
18677 #include <dmalloc.h>
18679 if { (eval echo "$as_me:18679: \"$ac_cpp conftest.$ac_ext\"") >&5
18680 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18682 egrep -v '^ *\+' conftest.er1 >conftest.err
18684 cat conftest.err >&5
18685 echo "$as_me:18685: \$? = $ac_status" >&5
18686 (exit $ac_status); } >/dev/null; then
18687 if test -s conftest.err; then
18688 ac_cpp_err=$ac_c_preproc_warn_flag
18695 if test -z "$ac_cpp_err"; then
18696 ac_cv_header_dmalloc_h=yes
18698 echo "$as_me: failed program was:" >&5
18699 cat conftest.$ac_ext >&5
18700 ac_cv_header_dmalloc_h=no
18702 rm -f conftest.err conftest.$ac_ext
18704 echo "$as_me:18704: result: $ac_cv_header_dmalloc_h" >&5
18705 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18706 if test $ac_cv_header_dmalloc_h = yes; then
18708 echo "$as_me:18708: checking for dmalloc_debug in -ldmalloc" >&5
18709 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18710 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18711 echo $ECHO_N "(cached) $ECHO_C" >&6
18713 ac_check_lib_save_LIBS=$LIBS
18714 LIBS="-ldmalloc $LIBS"
18715 cat >conftest.$ac_ext <<_ACEOF
18716 #line 18716 "configure"
18717 #include "confdefs.h"
18719 /* Override any gcc2 internal prototype to avoid an error. */
18723 /* We use char because int might match the return type of a gcc2
18724 builtin and then its argument prototype would still apply. */
18725 char dmalloc_debug ();
18734 rm -f conftest.$ac_objext conftest$ac_exeext
18735 if { (eval echo "$as_me:18735: \"$ac_link\"") >&5
18736 (eval $ac_link) 2>&5
18738 echo "$as_me:18738: \$? = $ac_status" >&5
18739 (exit $ac_status); } &&
18740 { ac_try='test -s conftest$ac_exeext'
18741 { (eval echo "$as_me:18741: \"$ac_try\"") >&5
18742 (eval $ac_try) 2>&5
18744 echo "$as_me:18744: \$? = $ac_status" >&5
18745 (exit $ac_status); }; }; then
18746 ac_cv_lib_dmalloc_dmalloc_debug=yes
18748 echo "$as_me: failed program was:" >&5
18749 cat conftest.$ac_ext >&5
18750 ac_cv_lib_dmalloc_dmalloc_debug=no
18752 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18753 LIBS=$ac_check_lib_save_LIBS
18755 echo "$as_me:18755: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18756 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18757 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
18758 cat >>confdefs.h <<EOF
18759 #define HAVE_LIBDMALLOC 1
18762 LIBS="-ldmalloc $LIBS"
18770 echo "$as_me:18770: checking if you want to use dbmalloc for testing" >&5
18771 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18773 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18774 if test "${with_dbmalloc+set}" = set; then
18775 withval="$with_dbmalloc"
18777 cat >>confdefs.h <<EOF
18778 #define USE_DBMALLOC 1
18781 : ${with_cflags:=-g}
18782 : ${with_no_leaks:=yes}
18787 echo "$as_me:18787: result: ${with_dbmalloc:-no}" >&5
18788 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18790 case .$with_cflags in
18800 cf_new_extra_cppflags=
18802 for cf_add_cflags in -g
18804 case $cf_fix_cppflags in
18806 case $cf_add_cflags in
18807 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18808 case $cf_add_cflags in
18810 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18812 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18813 && test -z "${cf_tst_cflags}" \
18814 && cf_fix_cppflags=yes
18816 if test $cf_fix_cppflags = yes ; then
18818 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18819 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18822 elif test "${cf_tst_cflags}" = "\"'" ; then
18824 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18825 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18831 case "$CPPFLAGS" in
18835 case $cf_add_cflags in
18837 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18839 CPPFLAGS=`echo "$CPPFLAGS" | \
18840 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
18841 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
18846 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18847 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18854 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18855 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18862 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18863 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18865 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18867 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18868 && test -z "${cf_tst_cflags}" \
18869 && cf_fix_cppflags=no
18874 if test -n "$cf_new_cflags" ; then
18876 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18877 CFLAGS="${CFLAGS}$cf_new_cflags"
18881 if test -n "$cf_new_cppflags" ; then
18883 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18884 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18888 if test -n "$cf_new_extra_cppflags" ; then
18890 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18891 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18900 if test "$with_dbmalloc" = yes ; then
18901 echo "$as_me:18901: checking for dbmalloc.h" >&5
18902 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18903 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18904 echo $ECHO_N "(cached) $ECHO_C" >&6
18906 cat >conftest.$ac_ext <<_ACEOF
18907 #line 18907 "configure"
18908 #include "confdefs.h"
18909 #include <dbmalloc.h>
18911 if { (eval echo "$as_me:18911: \"$ac_cpp conftest.$ac_ext\"") >&5
18912 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18914 egrep -v '^ *\+' conftest.er1 >conftest.err
18916 cat conftest.err >&5
18917 echo "$as_me:18917: \$? = $ac_status" >&5
18918 (exit $ac_status); } >/dev/null; then
18919 if test -s conftest.err; then
18920 ac_cpp_err=$ac_c_preproc_warn_flag
18927 if test -z "$ac_cpp_err"; then
18928 ac_cv_header_dbmalloc_h=yes
18930 echo "$as_me: failed program was:" >&5
18931 cat conftest.$ac_ext >&5
18932 ac_cv_header_dbmalloc_h=no
18934 rm -f conftest.err conftest.$ac_ext
18936 echo "$as_me:18936: result: $ac_cv_header_dbmalloc_h" >&5
18937 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18938 if test $ac_cv_header_dbmalloc_h = yes; then
18940 echo "$as_me:18940: checking for debug_malloc in -ldbmalloc" >&5
18941 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18942 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18943 echo $ECHO_N "(cached) $ECHO_C" >&6
18945 ac_check_lib_save_LIBS=$LIBS
18946 LIBS="-ldbmalloc $LIBS"
18947 cat >conftest.$ac_ext <<_ACEOF
18948 #line 18948 "configure"
18949 #include "confdefs.h"
18951 /* Override any gcc2 internal prototype to avoid an error. */
18955 /* We use char because int might match the return type of a gcc2
18956 builtin and then its argument prototype would still apply. */
18957 char debug_malloc ();
18966 rm -f conftest.$ac_objext conftest$ac_exeext
18967 if { (eval echo "$as_me:18967: \"$ac_link\"") >&5
18968 (eval $ac_link) 2>&5
18970 echo "$as_me:18970: \$? = $ac_status" >&5
18971 (exit $ac_status); } &&
18972 { ac_try='test -s conftest$ac_exeext'
18973 { (eval echo "$as_me:18973: \"$ac_try\"") >&5
18974 (eval $ac_try) 2>&5
18976 echo "$as_me:18976: \$? = $ac_status" >&5
18977 (exit $ac_status); }; }; then
18978 ac_cv_lib_dbmalloc_debug_malloc=yes
18980 echo "$as_me: failed program was:" >&5
18981 cat conftest.$ac_ext >&5
18982 ac_cv_lib_dbmalloc_debug_malloc=no
18984 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18985 LIBS=$ac_check_lib_save_LIBS
18987 echo "$as_me:18987: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18988 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18989 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
18990 cat >>confdefs.h <<EOF
18991 #define HAVE_LIBDBMALLOC 1
18994 LIBS="-ldbmalloc $LIBS"
19002 echo "$as_me:19002: checking if you want to use valgrind for testing" >&5
19003 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
19005 # Check whether --with-valgrind or --without-valgrind was given.
19006 if test "${with_valgrind+set}" = set; then
19007 withval="$with_valgrind"
19009 cat >>confdefs.h <<EOF
19010 #define USE_VALGRIND 1
19013 : ${with_cflags:=-g}
19014 : ${with_no_leaks:=yes}
19019 echo "$as_me:19019: result: ${with_valgrind:-no}" >&5
19020 echo "${ECHO_T}${with_valgrind:-no}" >&6
19022 case .$with_cflags in
19032 cf_new_extra_cppflags=
19034 for cf_add_cflags in -g
19036 case $cf_fix_cppflags in
19038 case $cf_add_cflags in
19039 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19040 case $cf_add_cflags in
19042 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19044 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19045 && test -z "${cf_tst_cflags}" \
19046 && cf_fix_cppflags=yes
19048 if test $cf_fix_cppflags = yes ; then
19050 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19051 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19054 elif test "${cf_tst_cflags}" = "\"'" ; then
19056 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19057 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19063 case "$CPPFLAGS" in
19067 case $cf_add_cflags in
19069 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19071 CPPFLAGS=`echo "$CPPFLAGS" | \
19072 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
19073 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
19078 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19079 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19086 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19087 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19094 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19095 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19097 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19099 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19100 && test -z "${cf_tst_cflags}" \
19101 && cf_fix_cppflags=no
19106 if test -n "$cf_new_cflags" ; then
19108 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19109 CFLAGS="${CFLAGS}$cf_new_cflags"
19113 if test -n "$cf_new_cppflags" ; then
19115 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19116 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19120 if test -n "$cf_new_extra_cppflags" ; then
19122 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19123 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19132 echo "$as_me:19132: checking if you want to perform memory-leak testing" >&5
19133 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
19135 # Check whether --enable-leaks or --disable-leaks was given.
19136 if test "${enable_leaks+set}" = set; then
19137 enableval="$enable_leaks"
19138 if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
19140 : ${with_no_leaks:=no}
19142 echo "$as_me:19142: result: $with_no_leaks" >&5
19143 echo "${ECHO_T}$with_no_leaks" >&6
19145 if test "$with_no_leaks" = yes ; then
19147 cat >>confdefs.h <<\EOF
19151 cat >>confdefs.h <<\EOF
19152 #define YY_NO_LEAKS 1
19158 echo "$as_me:19158: checking for an rpath option" >&5
19159 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
19160 case $cf_cv_system_name in
19162 if test "$GCC" = yes; then
19163 LD_RPATH_OPT="-Wl,-rpath,"
19165 LD_RPATH_OPT="-rpath "
19168 (linux*|gnu*|k*bsd*-gnu|freebsd*)
19169 LD_RPATH_OPT="-Wl,-rpath,"
19171 (openbsd[2-9].*|mirbsd*)
19172 LD_RPATH_OPT="-Wl,-rpath,"
19175 LD_RPATH_OPT="-rpath "
19178 LD_RPATH_OPT="-Wl,-rpath,"
19181 LD_RPATH_OPT="-rpath "
19189 echo "$as_me:19189: result: $LD_RPATH_OPT" >&5
19190 echo "${ECHO_T}$LD_RPATH_OPT" >&6
19192 case "x$LD_RPATH_OPT" in
19194 echo "$as_me:19194: checking if we need a space after rpath option" >&5
19195 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
19196 cf_save_LIBS="$LIBS"
19198 cf_add_libs="${LD_RPATH_OPT}$libdir"
19199 # Filter out duplicates - this happens with badly-designed ".pc" files...
19200 for cf_add_1lib in $LIBS
19202 for cf_add_2lib in $cf_add_libs
19204 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19210 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19212 LIBS="$cf_add_libs"
19214 cat >conftest.$ac_ext <<_ACEOF
19215 #line 19215 "configure"
19216 #include "confdefs.h"
19226 rm -f conftest.$ac_objext conftest$ac_exeext
19227 if { (eval echo "$as_me:19227: \"$ac_link\"") >&5
19228 (eval $ac_link) 2>&5
19230 echo "$as_me:19230: \$? = $ac_status" >&5
19231 (exit $ac_status); } &&
19232 { ac_try='test -s conftest$ac_exeext'
19233 { (eval echo "$as_me:19233: \"$ac_try\"") >&5
19234 (eval $ac_try) 2>&5
19236 echo "$as_me:19236: \$? = $ac_status" >&5
19237 (exit $ac_status); }; }; then
19240 echo "$as_me: failed program was:" >&5
19241 cat conftest.$ac_ext >&5
19244 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19245 LIBS="$cf_save_LIBS"
19246 echo "$as_me:19246: result: $cf_rpath_space" >&5
19247 echo "${ECHO_T}$cf_rpath_space" >&6
19248 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
19252 echo "$as_me:19252: checking if rpath-hack should be disabled" >&5
19253 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
19255 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
19256 if test "${enable_rpath_hack+set}" = set; then
19257 enableval="$enable_rpath_hack"
19258 test "$enableval" != no && enableval=yes
19259 if test "$enableval" != "yes" ; then
19260 cf_disable_rpath_hack=yes
19262 cf_disable_rpath_hack=no
19266 cf_disable_rpath_hack=no
19269 echo "$as_me:19269: result: $cf_disable_rpath_hack" >&5
19270 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
19271 if test "$cf_disable_rpath_hack" = no ; then
19273 echo "$as_me:19273: checking for updated LDFLAGS" >&5
19274 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
19275 if test -n "$LD_RPATH_OPT" ; then
19276 echo "$as_me:19276: result: maybe" >&5
19277 echo "${ECHO_T}maybe" >&6
19281 # Extract the first word of "$ac_prog", so it can be a program name with args.
19282 set dummy $ac_prog; ac_word=$2
19283 echo "$as_me:19283: checking for $ac_word" >&5
19284 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19285 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
19286 echo $ECHO_N "(cached) $ECHO_C" >&6
19288 if test -n "$cf_ldd_prog"; then
19289 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
19291 ac_save_IFS=$IFS; IFS=$ac_path_separator
19293 for ac_dir in $ac_dummy; do
19295 test -z "$ac_dir" && ac_dir=.
19296 $as_executable_p "$ac_dir/$ac_word" || continue
19297 ac_cv_prog_cf_ldd_prog="$ac_prog"
19298 echo "$as_me:19298: found $ac_dir/$ac_word" >&5
19304 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
19305 if test -n "$cf_ldd_prog"; then
19306 echo "$as_me:19306: result: $cf_ldd_prog" >&5
19307 echo "${ECHO_T}$cf_ldd_prog" >&6
19309 echo "$as_me:19309: result: no" >&5
19310 echo "${ECHO_T}no" >&6
19313 test -n "$cf_ldd_prog" && break
19315 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
19317 cf_rpath_list="/usr/lib /lib"
19318 if test "$cf_ldd_prog" != no
19322 cat >conftest.$ac_ext <<_ACEOF
19323 #line 19323 "configure"
19324 #include "confdefs.h"
19334 rm -f conftest.$ac_objext conftest$ac_exeext
19335 if { (eval echo "$as_me:19335: \"$ac_link\"") >&5
19336 (eval $ac_link) 2>&5
19338 echo "$as_me:19338: \$? = $ac_status" >&5
19339 (exit $ac_status); } &&
19340 { ac_try='test -s conftest$ac_exeext'
19341 { (eval echo "$as_me:19341: \"$ac_try\"") >&5
19342 (eval $ac_try) 2>&5
19344 echo "$as_me:19344: \$? = $ac_status" >&5
19345 (exit $ac_status); }; }; then
19346 cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
19347 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
19349 echo "$as_me: failed program was:" >&5
19350 cat conftest.$ac_ext >&5
19352 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19354 # If we passed the link-test, but get a "not found" on a given library,
19355 # this could be due to inept reconfiguration of gcc to make it only
19356 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
19357 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
19358 # /usr/local libraries.
19359 if test -n "$cf_rpath_oops"
19361 for cf_rpath_src in $cf_rpath_oops
19363 for cf_rpath_dir in \
19368 if test -f $cf_rpath_dir/lib/$cf_rpath_src
19370 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
19372 echo "${as_me:-configure}:19372: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
19374 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
19382 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
19384 echo "${as_me:-configure}:19384: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
19386 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
19388 echo "${as_me:-configure}:19388: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
19391 for cf_rpath_src in $LDFLAGS
19393 case $cf_rpath_src in
19396 # check if this refers to a directory which we will ignore
19398 if test -n "$cf_rpath_list"
19400 for cf_rpath_item in $cf_rpath_list
19402 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
19410 if test "$cf_rpath_skip" = no
19412 # transform the option
19413 if test "$LD_RPATH_OPT" = "-R " ; then
19414 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
19416 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
19419 # if we have not already added this, add it now
19420 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
19421 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
19423 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
19425 echo "${as_me:-configure}:19425: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
19427 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
19432 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
19434 LDFLAGS=$cf_rpath_dst
19436 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
19438 echo "${as_me:-configure}:19438: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
19440 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
19442 echo "${as_me:-configure}:19442: testing ...checking LIBS $LIBS ..." 1>&5
19445 for cf_rpath_src in $LIBS
19447 case $cf_rpath_src in
19450 # check if this refers to a directory which we will ignore
19452 if test -n "$cf_rpath_list"
19454 for cf_rpath_item in $cf_rpath_list
19456 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
19464 if test "$cf_rpath_skip" = no
19466 # transform the option
19467 if test "$LD_RPATH_OPT" = "-R " ; then
19468 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
19470 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
19473 # if we have not already added this, add it now
19474 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
19475 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
19477 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
19479 echo "${as_me:-configure}:19479: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
19481 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
19486 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
19490 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
19492 echo "${as_me:-configure}:19492: testing ...checked LIBS $LIBS ..." 1>&5
19494 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
19496 echo "${as_me:-configure}:19496: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
19499 echo "$as_me:19499: result: no" >&5
19500 echo "${ECHO_T}no" >&6
19508 ac_config_files="$ac_config_files Makefile"
19509 ac_config_commands="$ac_config_commands default"
19510 cat >confcache <<\_ACEOF
19511 # This file is a shell script that caches the results of configure
19512 # tests run on this system so they can be shared between configure
19513 # scripts and configure runs, see configure's option --config-cache.
19514 # It is not useful on other systems. If it contains results you don't
19515 # want to keep, you may remove or edit it.
19517 # config.status only pays attention to the cache file if you give it
19518 # the --recheck option to rerun configure.
19520 # `ac_cv_env_foo' variables (set or unset) will be overriden when
19521 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19522 # following values.
19526 # The following way of writing the cache mishandles newlines in values,
19527 # but we know of no workaround that is simple, portable, and efficient.
19528 # So, don't put newlines in cache variables' values.
19529 # Ultrix sh set writes to stderr and can't be redirected directly,
19530 # and sets the high bit in the cache file unless we assign to the vars.
19533 case `(ac_space=' '; set | grep ac_space) 2>&1` in
19535 # `set' does not quote correctly, so add quotes (double-quote
19536 # substitution turns \\\\ into \\, and sed turns \\ into \).
19539 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19542 # `set' quotes correctly as required by POSIX, so do not add quotes.
19544 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
19551 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19553 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19555 if cmp -s $cache_file confcache; then :; else
19556 if test -w $cache_file; then
19557 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
19558 cat confcache >$cache_file
19560 echo "not updating unwritable cache $cache_file"
19565 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19566 # Let make expand exec_prefix.
19567 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19569 # VPATH may cause trouble with some makes, so we remove $(srcdir),
19570 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
19571 # trailing colons and then remove the whole line if VPATH becomes empty
19572 # (actually we leave an empty line to preserve line numbers).
19573 if test "x$srcdir" = x.; then
19574 ac_vpsub='/^[ ]*VPATH[ ]*=/{
19575 s/:*\$(srcdir):*/:/;
19576 s/:*\${srcdir}:*/:/;
19578 s/^\([^=]*=[ ]*\):*/\1/;
19584 DEFS=-DHAVE_CONFIG_H
19586 : ${CONFIG_STATUS=./config.status}
19587 ac_clean_files_save=$ac_clean_files
19588 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19589 { echo "$as_me:19589: creating $CONFIG_STATUS" >&5
19590 echo "$as_me: creating $CONFIG_STATUS" >&6;}
19591 cat >$CONFIG_STATUS <<_ACEOF
19593 # Generated automatically by configure.
19594 # Run this file to recreate the current configuration.
19595 # Compiler output produced by configure, useful for debugging
19596 # configure, is in config.log if it exists.
19599 SHELL=\${CONFIG_SHELL-$SHELL}
19600 ac_cs_invocation="\$0 \$@"
19604 cat >>$CONFIG_STATUS <<\_ACEOF
19605 # Be Bourne compatible
19606 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19609 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
19613 # Name of the executable.
19614 as_me=`echo "$0" |sed 's,.*[\\/],,'`
19616 if expr a : '\(a\)' >/dev/null 2>&1; then
19622 rm -f conf$$ conf$$.exe conf$$.file
19624 if ln -s conf$$.file conf$$ 2>/dev/null; then
19625 # We could just check for DJGPP; but this test a) works b) is more generic
19626 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19627 if test -f conf$$.exe; then
19628 # Don't use ln at all; we don't have any links
19633 elif ln conf$$.file conf$$ 2>/dev/null; then
19638 rm -f conf$$ conf$$.exe conf$$.file
19640 as_executable_p="test -f"
19642 # Support unset when possible.
19643 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
19650 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
19651 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
19652 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
19653 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
19654 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
19655 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
19656 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
19657 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
19660 # We need space, tab and new line, in precisely that order.
19666 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
19672 # Files that config.status was made for.
19673 if test -n "$ac_config_files"; then
19674 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19677 if test -n "$ac_config_headers"; then
19678 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19681 if test -n "$ac_config_links"; then
19682 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19685 if test -n "$ac_config_commands"; then
19686 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19689 cat >>$CONFIG_STATUS <<\EOF
19692 \`$as_me' instantiates files from templates according to the
19693 current configuration.
19695 Usage: $0 [OPTIONS] [FILE]...
19697 -h, --help print this help, then exit
19698 -V, --version print version number, then exit
19699 -d, --debug don't remove temporary files
19700 --recheck update $as_me by reconfiguring in the same conditions
19701 --file=FILE[:TEMPLATE]
19702 instantiate the configuration file FILE
19703 --header=FILE[:TEMPLATE]
19704 instantiate the configuration header FILE
19706 Configuration files:
19709 Configuration headers:
19712 Configuration commands:
19715 Report bugs to <dickey@invisible-island.net>."
19718 cat >>$CONFIG_STATUS <<EOF
19721 configured by $0, generated by GNU Autoconf 2.52.20170501,
19722 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19724 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
19725 Free Software Foundation, Inc.
19726 This config.status script is free software; the Free Software Foundation
19727 gives unlimited permission to copy, distribute and modify it."
19732 cat >>$CONFIG_STATUS <<\EOF
19733 # If no file are specified by the user, then we need to provide default
19734 # value. By we need to know if files were specified by the user.
19740 ac_option=`expr "x$1" : 'x\([^=]*\)='`
19741 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
19743 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
19747 *) # This is not an option, so the user has probably given explicit
19749 ac_need_defaults=false;;
19753 # Handling of the options.
19755 cat >>$CONFIG_STATUS <<EOF
19756 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19757 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
19758 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
19760 cat >>$CONFIG_STATUS <<\EOF
19761 --version | --vers* | -V )
19762 echo "$ac_cs_version"; exit 0 ;;
19764 # Conflict between --help and --header
19765 { { echo "$as_me:19765: error: ambiguous option: $1
19766 Try \`$0 --help' for more information." >&5
19767 echo "$as_me: error: ambiguous option: $1
19768 Try \`$0 --help' for more information." >&2;}
19769 { (exit 1); exit 1; }; };;
19770 --help | --hel | -h )
19771 echo "$ac_cs_usage"; exit 0 ;;
19772 --debug | --d* | -d )
19774 --file | --fil | --fi | --f )
19776 CONFIG_FILES="$CONFIG_FILES $1"
19777 ac_need_defaults=false;;
19778 --header | --heade | --head | --hea )
19780 CONFIG_HEADERS="$CONFIG_HEADERS $1"
19781 ac_need_defaults=false;;
19783 # This is an error.
19784 -*) { { echo "$as_me:19784: error: unrecognized option: $1
19785 Try \`$0 --help' for more information." >&5
19786 echo "$as_me: error: unrecognized option: $1
19787 Try \`$0 --help' for more information." >&2;}
19788 { (exit 1); exit 1; }; } ;;
19790 *) ac_config_targets="$ac_config_targets $1" ;;
19799 ## ----------------------- ##
19800 ## Running config.status. ##
19801 ## ----------------------- ##
19803 This file was extended by $as_me 2.52.20170501, executed with
19804 CONFIG_FILES = $CONFIG_FILES
19805 CONFIG_HEADERS = $CONFIG_HEADERS
19806 CONFIG_LINKS = $CONFIG_LINKS
19807 CONFIG_COMMANDS = $CONFIG_COMMANDS
19808 > $ac_cs_invocation
19809 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19814 cat >>$CONFIG_STATUS <<EOF
19816 # INIT-COMMANDS section.
19826 cat >>$CONFIG_STATUS <<\EOF
19827 for ac_config_target in $ac_config_targets
19829 case "$ac_config_target" in
19830 # Handling of arguments.
19831 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19832 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
19833 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
19834 *) { { echo "$as_me:19834: error: invalid argument: $ac_config_target" >&5
19835 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19836 { (exit 1); exit 1; }; };;
19840 # If the user did not use the arguments to specify the items to instantiate,
19841 # then the envvar interface is used. Set only those that are not.
19842 # We use the long form for the default assignment because of an extremely
19843 # bizarre bug on SunOS 4.1.3.
19844 if $ac_need_defaults; then
19845 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19846 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19847 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19850 # Create a temporary directory, and hook for its removal unless debugging.
19853 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19854 trap '{ (exit 1); exit 1; }' 1 2 13 15
19857 # Create a (secure) tmp directory for tmp files.
19860 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
19861 test -n "$tmp" && test -d "$tmp"
19864 tmp=$TMPDIR/cs$$-$RANDOM
19865 (umask 077 && mkdir $tmp)
19868 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
19869 { (exit 1); exit 1; }
19874 cat >>$CONFIG_STATUS <<EOF
19877 # CONFIG_FILES section.
19880 # No need to generate the scripts if there are no CONFIG_FILES.
19881 # This happens for instance when ./config.status config.h
19882 if test -n "\$CONFIG_FILES"; then
19883 # Protect against being on the right side of a sed subst in config.status.
19884 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19885 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19886 s,@SHELL@,$SHELL,;t t
19887 s,@exec_prefix@,$exec_prefix,;t t
19888 s,@prefix@,$prefix,;t t
19889 s,@program_transform_name@,$program_transform_name,;t t
19890 s,@bindir@,$bindir,;t t
19891 s,@sbindir@,$sbindir,;t t
19892 s,@libexecdir@,$libexecdir,;t t
19893 s,@datarootdir@,$datarootdir,;t t
19894 s,@datadir@,$datadir,;t t
19895 s,@sysconfdir@,$sysconfdir,;t t
19896 s,@sharedstatedir@,$sharedstatedir,;t t
19897 s,@localstatedir@,$localstatedir,;t t
19898 s,@libdir@,$libdir,;t t
19899 s,@includedir@,$includedir,;t t
19900 s,@oldincludedir@,$oldincludedir,;t t
19901 s,@infodir@,$infodir,;t t
19902 s,@mandir@,$mandir,;t t
19903 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19904 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19905 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19906 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19907 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19908 s,@build_alias@,$build_alias,;t t
19909 s,@host_alias@,$host_alias,;t t
19910 s,@target_alias@,$target_alias,;t t
19911 s,@ECHO_C@,$ECHO_C,;t t
19912 s,@ECHO_N@,$ECHO_N,;t t
19913 s,@ECHO_T@,$ECHO_T,;t t
19914 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19915 s,@DEFS@,$DEFS,;t t
19916 s,@LIBS@,$LIBS,;t t
19917 s,@build@,$build,;t t
19918 s,@build_cpu@,$build_cpu,;t t
19919 s,@build_vendor@,$build_vendor,;t t
19920 s,@build_os@,$build_os,;t t
19921 s,@host@,$host,;t t
19922 s,@host_cpu@,$host_cpu,;t t
19923 s,@host_vendor@,$host_vendor,;t t
19924 s,@host_os@,$host_os,;t t
19925 s,@SET_MAKE@,$SET_MAKE,;t t
19927 s,@CFLAGS@,$CFLAGS,;t t
19928 s,@LDFLAGS@,$LDFLAGS,;t t
19929 s,@CPPFLAGS@,$CPPFLAGS,;t t
19930 s,@ac_ct_CC@,$ac_ct_CC,;t t
19931 s,@EXEEXT@,$EXEEXT,;t t
19932 s,@OBJEXT@,$OBJEXT,;t t
19933 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
19936 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19937 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19938 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19939 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
19940 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
19941 s,@LINT@,$LINT,;t t
19942 s,@LINT_OPTS@,$LINT_OPTS,;t t
19943 s,@CTAGS@,$CTAGS,;t t
19944 s,@ETAGS@,$ETAGS,;t t
19945 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
19946 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
19947 s,@MATH_LIB@,$MATH_LIB,;t t
19948 s,@top_builddir@,$top_builddir,;t t
19949 s,@CC_G_OPT@,$CC_G_OPT,;t t
19950 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
19951 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
19952 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
19953 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
19955 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
19956 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
19957 s,@LD_MODEL@,$LD_MODEL,;t t
19958 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
19959 s,@LIBTOOL@,$LIBTOOL,;t t
19960 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
19961 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
19962 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
19963 s,@LIB_LINK@,$LIB_LINK,;t t
19964 s,@LINK_TESTS@,$LINK_TESTS,;t t
19965 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
19966 s,@PACKAGE@,$PACKAGE,;t t
19967 s,@PTHREAD@,$PTHREAD,;t t
19968 s,@TEST_ARGS@,$TEST_ARGS,;t t
19969 s,@TEST_DEPS@,$TEST_DEPS,;t t
19970 s,@TEST_LIBS@,$TEST_LIBS,;t t
19971 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
19972 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
19973 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
19974 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
19975 s,@includesubdir@,$includesubdir,;t t
19976 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
19977 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
19978 s,@ECHO_LT@,$ECHO_LT,;t t
19979 s,@ECHO_LD@,$ECHO_LD,;t t
19980 s,@RULE_CC@,$RULE_CC,;t t
19981 s,@SHOW_CC@,$SHOW_CC,;t t
19982 s,@ECHO_CC@,$ECHO_CC,;t t
19983 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
19984 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
19985 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
19986 s,@X_CFLAGS@,$X_CFLAGS,;t t
19987 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
19988 s,@X_LIBS@,$X_LIBS,;t t
19989 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
19990 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
19991 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
19992 s,@RGB_PATH@,$RGB_PATH,;t t
19993 s,@no_x11_rgb@,$no_x11_rgb,;t t
19994 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
19995 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
19996 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
20001 cat >>$CONFIG_STATUS <<\EOF
20002 # Split the substitutions into bite-sized pieces for seds with
20003 # small command number limits, like on Digital OSF/1 and HP-UX.
20004 ac_max_sed_lines=48
20005 ac_sed_frag=1 # Number of current file.
20006 ac_beg=1 # First line for current file.
20007 ac_end=$ac_max_sed_lines # Line after last line for current file.
20010 while $ac_more_lines; do
20011 if test $ac_beg -gt 1; then
20012 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20014 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20016 if test ! -s $tmp/subs.frag; then
20017 ac_more_lines=false
20019 # The purpose of the label and of the branching condition is to
20020 # speed up the sed processing (if there are no `@' at all, there
20021 # is no need to browse any of the substitutions).
20022 # These are the two extra sed commands mentioned above.
20024 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
20025 # It is possible to make a multiline substitution using escaped newlines.
20026 # Ensure that we do not split the substitution between script fragments.
20028 ac_END=`expr $ac_end + $ac_max_sed_lines`
20029 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
20030 if test -s $tmp/subs.next; then
20031 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
20032 if test ! -s $tmp/subs.edit; then
20033 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
20034 if test ! -s $tmp/subs.edit; then
20035 if test $ac_beg -gt 1; then
20036 ac_end=`expr $ac_end - 1`
20043 if test -z "$ac_sed_cmds"; then
20044 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
20046 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
20048 ac_sed_frag=`expr $ac_sed_frag + 1`
20050 ac_end=`expr $ac_end + $ac_max_sed_lines`
20053 if test -z "$ac_sed_cmds"; then
20056 fi # test -n "$CONFIG_FILES"
20059 cat >>$CONFIG_STATUS <<\EOF
20060 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
20061 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20063 - | *:- | *:-:* ) # input from stdin
20065 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20066 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20067 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20068 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20069 * ) ac_file_in=$ac_file.in ;;
20072 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
20073 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20074 X"$ac_file" : 'X\(//\)[^/]' \| \
20075 X"$ac_file" : 'X\(//\)$' \| \
20076 X"$ac_file" : 'X\(/\)' \| \
20077 . : '\(.\)' 2>/dev/null ||
20079 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20080 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20081 /^X\(\/\/\)$/{ s//\1/; q; }
20082 /^X\(\/\).*/{ s//\1/; q; }
20084 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
20085 { case "$ac_dir" in
20086 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
20090 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
20091 case $as_mkdir_dir in
20092 # Skip DOS drivespec
20093 ?:) as_incr_dir=$as_mkdir_dir ;;
20095 as_incr_dir=$as_incr_dir/$as_mkdir_dir
20096 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
20101 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
20102 # A "../" for each directory in $ac_dir_suffix.
20103 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
20105 ac_dir_suffix= ac_dots=
20110 if test -z "$ac_dots"; then
20113 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
20115 [\\/]* | ?:[\\/]* )
20116 ac_srcdir=$srcdir$ac_dir_suffix;
20117 ac_top_srcdir=$srcdir ;;
20118 *) # Relative path.
20119 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
20120 ac_top_srcdir=$ac_dots$srcdir ;;
20124 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20125 *) ac_INSTALL=$ac_dots$INSTALL ;;
20128 if test x"$ac_file" != x-; then
20129 { echo "$as_me:20129: creating $ac_file" >&5
20130 echo "$as_me: creating $ac_file" >&6;}
20133 # Let's still pretend it is `configure' which instantiates (i.e., don't
20134 # use $as_me), people would be surprised to read:
20135 # /* config.h. Generated automatically by config.status. */
20136 configure_input="Generated automatically from `echo $ac_file_in |
20137 sed 's,.*/,,'` by configure."
20139 # First look for the input files in the build tree, otherwise in the
20141 ac_file_inputs=`IFS=:
20142 for f in $ac_file_in; do
20144 -) echo $tmp/stdin ;;
20146 # Absolute (can't be DOS-style, as IFS=:)
20147 test -f "$f" || { { echo "$as_me:20147: error: cannot find input file: $f" >&5
20148 echo "$as_me: error: cannot find input file: $f" >&2;}
20149 { (exit 1); exit 1; }; }
20152 if test -f "$f"; then
20155 elif test -f "$srcdir/$f"; then
20160 { { echo "$as_me:20160: error: cannot find input file: $f" >&5
20161 echo "$as_me: error: cannot find input file: $f" >&2;}
20162 { (exit 1); exit 1; }; }
20165 done` || { (exit 1); exit 1; }
20167 cat >>$CONFIG_STATUS <<\EOF
20168 ac_warn_datarootdir=no
20169 if test x"$ac_file" != x-; then
20170 for ac_item in $ac_file_inputs
20172 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
20173 if test -n "$ac_seen"; then
20174 ac_used=`grep '@datarootdir@' $ac_item`
20175 if test -z "$ac_used"; then
20176 { echo "$as_me:20176: WARNING: datarootdir was used implicitly but not set:
20178 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
20180 ac_warn_datarootdir=yes
20183 ac_seen=`grep '${datarootdir}' $ac_item`
20184 if test -n "$ac_seen"; then
20185 { echo "$as_me:20185: WARNING: datarootdir was used explicitly but not set:
20187 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
20189 ac_warn_datarootdir=yes
20194 if test "x$ac_warn_datarootdir" = xyes; then
20195 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
20199 cat >>$CONFIG_STATUS <<EOF
20203 cat >>$CONFIG_STATUS <<\EOF
20205 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20206 s,@configure_input@,$configure_input,;t t
20207 s,@srcdir@,$ac_srcdir,;t t
20208 s,@top_srcdir@,$ac_top_srcdir,;t t
20209 s,@INSTALL@,$ac_INSTALL,;t t
20210 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
20212 if test x"$ac_file" != x-; then
20213 cp $tmp/out $ac_file
20215 for ac_name in prefix exec_prefix datarootdir
20217 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
20218 if test -n "$ac_seen"; then
20219 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
20220 if test -z "$ac_init"; then
20221 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
20222 { echo "$as_me:20222: WARNING: Variable $ac_name is used but was not set:
20224 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
20229 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
20230 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
20231 if test -s $tmp/out; then
20232 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
20233 { echo "$as_me:20233: WARNING: Some variables may not be substituted:
20235 echo "$as_me: WARNING: Some variables may not be substituted:
20245 cat >>$CONFIG_STATUS <<\EOF
20248 # CONFIG_HEADER section.
20251 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
20252 # NAME is the cpp macro being defined and VALUE is the value it is being given.
20254 # ac_d sets the value in "#define NAME VALUE" lines.
20255 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
20256 ac_dB='[ ].*$,\1#\2'
20259 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
20260 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
20261 ac_iB='\([ ]\),\1#\2define\3'
20264 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
20265 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
20266 ac_uB='$,\1#\2define\3'
20270 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
20271 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20273 - | *:- | *:-:* ) # input from stdin
20275 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20276 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20277 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20278 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20279 * ) ac_file_in=$ac_file.in ;;
20282 test x"$ac_file" != x- && { echo "$as_me:20282: creating $ac_file" >&5
20283 echo "$as_me: creating $ac_file" >&6;}
20285 # First look for the input files in the build tree, otherwise in the
20287 ac_file_inputs=`IFS=:
20288 for f in $ac_file_in; do
20290 -) echo $tmp/stdin ;;
20292 # Absolute (can't be DOS-style, as IFS=:)
20293 test -f "$f" || { { echo "$as_me:20293: error: cannot find input file: $f" >&5
20294 echo "$as_me: error: cannot find input file: $f" >&2;}
20295 { (exit 1); exit 1; }; }
20298 if test -f "$f"; then
20301 elif test -f "$srcdir/$f"; then
20306 { { echo "$as_me:20306: error: cannot find input file: $f" >&5
20307 echo "$as_me: error: cannot find input file: $f" >&2;}
20308 { (exit 1); exit 1; }; }
20311 done` || { (exit 1); exit 1; }
20312 # Remove the trailing spaces.
20313 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
20317 # Transform confdefs.h into a list of #define's. We won't use it as a sed
20318 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
20319 # be either 'cat' or 'sort'.
20320 cat confdefs.h | uniq >conftest.vals
20322 # Break up conftest.vals because some shells have a limit on
20323 # the size of here documents, and old seds have small limits too.
20325 rm -f conftest.tail
20326 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
20327 while grep . conftest.vals >/dev/null
20329 # Write chunks of a limited-size here document to conftest.frag.
20330 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
20331 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
20332 echo 'CEOF' >> $CONFIG_STATUS
20333 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
20334 rm -f conftest.vals
20335 mv conftest.tail conftest.vals
20337 rm -f conftest.vals
20339 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
20341 echo ' cat >> conftest.edit <<CEOF
20342 /@DEFS@/r conftest.frag
20345 sed -f conftest.edit $tmp/in > $tmp/out
20347 mv $tmp/out $tmp/in
20348 rm -f conftest.edit conftest.frag
20349 ' >> $CONFIG_STATUS
20351 cat >>$CONFIG_STATUS <<\EOF
20352 # Let's still pretend it is `configure' which instantiates (i.e., don't
20353 # use $as_me), people would be surprised to read:
20354 # /* config.h. Generated automatically by config.status. */
20355 if test x"$ac_file" = x-; then
20356 echo "/* Generated automatically by configure. */" >$tmp/config.h
20358 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
20360 cat $tmp/in >>$tmp/config.h
20362 if test x"$ac_file" != x-; then
20363 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
20364 { echo "$as_me:20364: $ac_file is unchanged" >&5
20365 echo "$as_me: $ac_file is unchanged" >&6;}
20367 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20368 X"$ac_file" : 'X\(//\)[^/]' \| \
20369 X"$ac_file" : 'X\(//\)$' \| \
20370 X"$ac_file" : 'X\(/\)' \| \
20371 . : '\(.\)' 2>/dev/null ||
20373 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20374 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20375 /^X\(\/\/\)$/{ s//\1/; q; }
20376 /^X\(\/\).*/{ s//\1/; q; }
20378 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
20379 { case "$ac_dir" in
20380 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
20384 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
20385 case $as_mkdir_dir in
20386 # Skip DOS drivespec
20387 ?:) as_incr_dir=$as_mkdir_dir ;;
20389 as_incr_dir=$as_incr_dir/$as_mkdir_dir
20390 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
20397 mv $tmp/config.h $ac_file
20401 rm -f $tmp/config.h
20405 cat >>$CONFIG_STATUS <<\EOF
20407 # CONFIG_COMMANDS section.
20409 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
20410 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
20411 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
20418 if test ! -d $srcdir/$cf_dir; then
20420 elif test -f $srcdir/$cf_dir/programs; then
20421 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
20425 cat >>Makefile <<TEST_EOF
20427 # These rules are generated so we do not rely on suffix rules, which do not
20428 # work consistently for different make-programs (the '\$(MODEL)/' confuses
20429 # some, and the '\$x' confuses others).
20432 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
20435 cat >>Makefile <<TEST_EOF
20437 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
20438 \$(srcdir)/test.priv.h \\
20441 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) -DMODULE_NAME="$N" \$(srcdir)/$N.c
20445 if test -f ../config.guess && test -f ../config.sub
20447 cat >>Makefile <<TEST_EOF
20449 # if we used CF_INHERIT for getting these files, we can remove them
20451 rm -f config.guess config.sub
20459 cat >>$CONFIG_STATUS <<\EOF
20461 { (exit 0); exit 0; }
20463 chmod +x $CONFIG_STATUS
20464 ac_clean_files=$ac_clean_files_save
20466 # configure is writing to config.log, and then calls config.status.
20467 # config.status does its own redirection, appending to config.log.
20468 # Unfortunately, on DOS this fails, as config.log is still kept open
20469 # by configure, so config.status won't be able to write to it; its
20470 # output is simply discarded. So we exec the FD to /dev/null,
20471 # effectively closing config.log, so it can be properly (re)opened and
20472 # appended to by config.status. When coming back to configure, we
20473 # need to make the FD available again.
20474 if test "$no_create" != yes; then
20477 $SHELL $CONFIG_STATUS || ac_cs_success=false
20479 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20480 # would make configure fail if this is the last instruction.
20481 $ac_cs_success || { (exit 1); exit 1; }