2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20121002.
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 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
651 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
654 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
655 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
658 --with-pkg-config{=path} enable/disable use of pkg-config
659 --disable-echo do not display "compiling" commands
660 Curses Version-dependent Options:
661 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
662 --disable-widec disable checks for wide-character functions
663 --with-curses-dir=DIR directory in which (n)curses is installed
664 --with-ncursesw use wide ncurses-libraries
665 --with-ncurses use ncurses-libraries
666 --with-pdcurses compile/link with pdcurses X11 library
667 --with-curses-colr compile/link with HPUX 10.x color-curses
668 --with-curses-5lib compile/link with SunOS 5lib curses
669 --with-Xaw3d link with Xaw 3d library
670 --with-Xaw3dxft link with Xaw 3d xft library
671 --with-neXtaw link with neXT Athena library
672 --with-XawPlus link with Athena-Plus library
673 --with-x use the X Window System
674 Testing/development Options:
675 --enable-warnings test: turn on gcc compiler warnings
676 --with-dmalloc test: use Gray Watson's dmalloc library
677 --with-dbmalloc test: use Conor Cahill's dbmalloc library
678 --with-valgrind test: use valgrind
679 --disable-leaks test: free permanent memory, analyze leaks
680 --disable-rpath-hack don't add rpath options for additional libraries
682 Some influential environment variables:
683 CC C compiler command
684 CFLAGS C compiler flags
685 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
686 nonstandard directory <lib dir>
687 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
688 headers in a nonstandard directory <include dir>
691 Use these variables to override the choices made by `configure' or to help
692 it to find libraries and programs with nonstandard names/locations.
697 if test "$ac_init_help" = "recursive"; then
698 # If there are subdirs, report their specific --help.
700 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
702 # A "../" for each directory in /$ac_subdir.
703 ac_dots=`echo $ac_subdir |
704 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
707 .) # No --srcdir option. We are building in place.
708 ac_sub_srcdir=$srcdir ;;
709 [\\/]* | ?:[\\/]* ) # Absolute path.
710 ac_sub_srcdir=$srcdir/$ac_subdir ;;
712 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
715 # Check for guested configure; otherwise get Cygnus style configure.
716 if test -f $ac_sub_srcdir/configure.gnu; then
718 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
719 elif test -f $ac_sub_srcdir/configure; then
721 $SHELL $ac_sub_srcdir/configure --help=recursive
722 elif test -f $ac_sub_srcdir/configure.ac ||
723 test -f $ac_sub_srcdir/configure.in; then
727 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
733 test -n "$ac_init_help" && exit 0
734 if $ac_init_version; then
737 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
738 Free Software Foundation, Inc.
739 This configure script is free software; the Free Software Foundation
740 gives unlimited permission to copy, distribute and modify it.
746 This file contains any messages produced by compilers while
747 running configure, to aid debugging if configure makes a mistake.
749 It was created by $as_me, which was
750 generated by GNU Autoconf 2.52.20121002. Invocation command line was
761 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
762 uname -m = `(uname -m) 2>/dev/null || echo unknown`
763 uname -r = `(uname -r) 2>/dev/null || echo unknown`
764 uname -s = `(uname -s) 2>/dev/null || echo unknown`
765 uname -v = `(uname -v) 2>/dev/null || echo unknown`
767 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
768 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
770 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
771 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
772 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
773 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
774 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
775 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
776 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
790 # Keep a trace of the command line.
791 # Strip out --no-create and --no-recursion so they do not pile up.
792 # Also quote any args containing shell meta-characters.
798 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
799 | --no-cr | --no-c) ;;
800 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
801 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
802 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
803 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
804 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
806 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
809 # Get rid of the leading space.
812 # When interrupted or exit'd, cleanup temporary files, and complete
813 # config.log. We remove comments because anyway the quotes in there
814 # would cause problems or look ugly.
816 # Save into config.log some information that might help in debugging.
818 echo "## ----------------- ##" >&5
819 echo "## Cache variables. ##" >&5
820 echo "## ----------------- ##" >&5
822 # The following way of writing the cache mishandles newlines in values,
825 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
828 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
829 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
833 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
837 sed "/^$/d" confdefs.h >conftest.log
838 if test -s conftest.log; then
840 echo "## ------------ ##" >&5
841 echo "## confdefs.h. ##" >&5
842 echo "## ------------ ##" >&5
847 test "$ac_signal" != 0 &&
848 echo "$as_me: caught signal $ac_signal" >&5
849 echo "$as_me: exit $exit_status" >&5
850 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
853 for ac_signal in 1 2 13 15; do
854 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
858 # confdefs.h avoids OS command line length limits that DEFS can exceed.
859 rm -rf conftest* confdefs.h
860 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
863 # Let the site file select an alternate cache file if it wants to.
864 # Prefer explicitly selected file to automatically selected ones.
865 if test -z "$CONFIG_SITE"; then
866 if test "x$prefix" != xNONE; then
867 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
869 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
872 for ac_site_file in $CONFIG_SITE; do
873 if test -r "$ac_site_file"; then
874 { echo "$as_me:874: loading site script $ac_site_file" >&5
875 echo "$as_me: loading site script $ac_site_file" >&6;}
876 cat "$ac_site_file" >&5
881 if test -r "$cache_file"; then
882 # Some versions of bash will fail to source /dev/null (special
883 # files actually), so we avoid doing that.
884 if test -f "$cache_file"; then
885 { echo "$as_me:885: loading cache $cache_file" >&5
886 echo "$as_me: loading cache $cache_file" >&6;}
888 [\\/]* | ?:[\\/]* ) . $cache_file;;
893 { echo "$as_me:893: creating cache $cache_file" >&5
894 echo "$as_me: creating cache $cache_file" >&6;}
898 # Check that the precious variables saved in the cache have kept the same
900 ac_cache_corrupted=false
901 for ac_var in `(set) 2>&1 |
902 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
903 eval ac_old_set=\$ac_cv_env_${ac_var}_set
904 eval ac_new_set=\$ac_env_${ac_var}_set
905 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
906 eval ac_new_val="\$ac_env_${ac_var}_value"
907 case $ac_old_set,$ac_new_set in
909 { echo "$as_me:909: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
910 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
911 ac_cache_corrupted=: ;;
913 { echo "$as_me:913: error: \`$ac_var' was not set in the previous run" >&5
914 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
915 ac_cache_corrupted=: ;;
918 if test "x$ac_old_val" != "x$ac_new_val"; then
919 { echo "$as_me:919: error: \`$ac_var' has changed since the previous run:" >&5
920 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
921 { echo "$as_me:921: former value: $ac_old_val" >&5
922 echo "$as_me: former value: $ac_old_val" >&2;}
923 { echo "$as_me:923: current value: $ac_new_val" >&5
924 echo "$as_me: current value: $ac_new_val" >&2;}
928 # Pass precious variables to config.status. It doesn't matter if
929 # we pass some twice (in addition to the command line arguments).
930 if test "$ac_new_set" = set; then
932 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
933 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
934 ac_configure_args="$ac_configure_args '$ac_arg'"
936 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
941 if $ac_cache_corrupted; then
942 { echo "$as_me:942: error: changes in the environment can compromise the build" >&5
943 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
944 { { echo "$as_me:944: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
945 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
946 { (exit 1); exit 1; }; }
950 ac_cpp='$CPP $CPPFLAGS'
951 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
952 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
953 ac_compiler_gnu=$ac_cv_c_compiler_gnu
954 ac_main_return=return
956 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
957 *c*,-n*) ECHO_N= ECHO_C='
959 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
960 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
962 echo "#! $SHELL" >conftest.sh
963 echo "exit 0" >>conftest.sh
965 if { (echo "$as_me:965: PATH=\".;.\"; conftest.sh") >&5
966 (PATH=".;."; conftest.sh) 2>&5
968 echo "$as_me:968: \$? = $ac_status" >&5
969 (exit $ac_status); }; then
970 ac_path_separator=';'
974 PATH_SEPARATOR="$ac_path_separator"
977 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
979 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
981 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
984 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
985 if test -f $ac_dir/install-sh; then
987 ac_install_sh="$ac_aux_dir/install-sh -c"
989 elif test -f $ac_dir/install.sh; then
991 ac_install_sh="$ac_aux_dir/install.sh -c"
993 elif test -f $ac_dir/shtool; then
995 ac_install_sh="$ac_aux_dir/shtool install -c"
999 if test -z "$ac_aux_dir"; then
1000 { { echo "$as_me:1000: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1001 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1002 { (exit 1); exit 1; }; }
1004 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1005 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1006 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1008 # Make sure we can run config.sub.
1009 $ac_config_sub sun4 >/dev/null 2>&1 ||
1010 { { echo "$as_me:1010: error: cannot run $ac_config_sub" >&5
1011 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1012 { (exit 1); exit 1; }; }
1014 echo "$as_me:1014: checking build system type" >&5
1015 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1016 if test "${ac_cv_build+set}" = set; then
1017 echo $ECHO_N "(cached) $ECHO_C" >&6
1019 ac_cv_build_alias=$build_alias
1020 test -z "$ac_cv_build_alias" &&
1021 ac_cv_build_alias=`$ac_config_guess`
1022 test -z "$ac_cv_build_alias" &&
1023 { { echo "$as_me:1023: error: cannot guess build type; you must specify one" >&5
1024 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1025 { (exit 1); exit 1; }; }
1026 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1027 { { echo "$as_me:1027: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1028 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1029 { (exit 1); exit 1; }; }
1032 echo "$as_me:1032: result: $ac_cv_build" >&5
1033 echo "${ECHO_T}$ac_cv_build" >&6
1035 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1036 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1037 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1039 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1040 echo "$as_me:1040: checking host system type" >&5
1041 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1042 if test "${ac_cv_host+set}" = set; then
1043 echo $ECHO_N "(cached) $ECHO_C" >&6
1045 ac_cv_host_alias=$host_alias
1046 test -z "$ac_cv_host_alias" &&
1047 ac_cv_host_alias=$ac_cv_build_alias
1048 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1049 { { echo "$as_me:1049: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1050 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1051 { (exit 1); exit 1; }; }
1054 echo "$as_me:1054: result: $ac_cv_host" >&5
1055 echo "${ECHO_T}$ac_cv_host" >&6
1057 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1058 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1059 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1061 system_name="$host_os"
1063 system_name="`(uname -s -r) 2>/dev/null`"
1064 if test -z "$system_name" ; then
1065 system_name="`(hostname) 2>/dev/null`"
1068 test -n "$system_name" &&
1069 cat >>confdefs.h <<EOF
1070 #define SYSTEM_NAME "$system_name"
1073 if test "${cf_cv_system_name+set}" = set; then
1074 echo $ECHO_N "(cached) $ECHO_C" >&6
1076 cf_cv_system_name="$system_name"
1079 test -z "$system_name" && system_name="$cf_cv_system_name"
1080 test -n "$cf_cv_system_name" && echo "$as_me:1080: result: Configuring for $cf_cv_system_name" >&5
1081 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1083 if test ".$system_name" != ".$cf_cv_system_name" ; then
1084 echo "$as_me:1084: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1085 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1086 { { echo "$as_me:1086: error: \"Please remove config.cache and try again.\"" >&5
1087 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1088 { (exit 1); exit 1; }; }
1091 test "$program_prefix" != NONE &&
1092 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1093 # Use a double $ so make ignores it.
1094 test "$program_suffix" != NONE &&
1095 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1096 # Double any \ or $. echo might interpret backslashes.
1097 # By default was `s,x,x', remove it if useless.
1098 cat <<\_ACEOF >conftest.sed
1099 s/[\\$]/&&/g;s/;s,x,x,$//
1101 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1104 echo "$as_me:1104: checking whether ${MAKE-make} sets \${MAKE}" >&5
1105 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1106 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1107 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1108 echo $ECHO_N "(cached) $ECHO_C" >&6
1110 cat >conftest.make <<\EOF
1112 @echo 'ac_maketemp="${MAKE}"'
1114 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1115 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1116 if test -n "$ac_maketemp"; then
1117 eval ac_cv_prog_make_${ac_make}_set=yes
1119 eval ac_cv_prog_make_${ac_make}_set=no
1123 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1124 echo "$as_me:1124: result: yes" >&5
1125 echo "${ECHO_T}yes" >&6
1128 echo "$as_me:1128: result: no" >&5
1129 echo "${ECHO_T}no" >&6
1130 SET_MAKE="MAKE=${MAKE-make}"
1134 ac_cpp='$CPP $CPPFLAGS'
1135 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1136 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1137 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1138 ac_main_return=return
1139 if test -n "$ac_tool_prefix"; then
1140 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1141 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1142 echo "$as_me:1142: checking for $ac_word" >&5
1143 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1144 if test "${ac_cv_prog_CC+set}" = set; then
1145 echo $ECHO_N "(cached) $ECHO_C" >&6
1147 if test -n "$CC"; then
1148 ac_cv_prog_CC="$CC" # Let the user override the test.
1150 ac_save_IFS=$IFS; IFS=$ac_path_separator
1152 for ac_dir in $ac_dummy; do
1154 test -z "$ac_dir" && ac_dir=.
1155 $as_executable_p "$ac_dir/$ac_word" || continue
1156 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1157 echo "$as_me:1157: found $ac_dir/$ac_word" >&5
1164 if test -n "$CC"; then
1165 echo "$as_me:1165: result: $CC" >&5
1166 echo "${ECHO_T}$CC" >&6
1168 echo "$as_me:1168: result: no" >&5
1169 echo "${ECHO_T}no" >&6
1173 if test -z "$ac_cv_prog_CC"; then
1175 # Extract the first word of "gcc", so it can be a program name with args.
1176 set dummy gcc; ac_word=$2
1177 echo "$as_me:1177: checking for $ac_word" >&5
1178 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1179 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1180 echo $ECHO_N "(cached) $ECHO_C" >&6
1182 if test -n "$ac_ct_CC"; then
1183 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1185 ac_save_IFS=$IFS; IFS=$ac_path_separator
1187 for ac_dir in $ac_dummy; do
1189 test -z "$ac_dir" && ac_dir=.
1190 $as_executable_p "$ac_dir/$ac_word" || continue
1191 ac_cv_prog_ac_ct_CC="gcc"
1192 echo "$as_me:1192: found $ac_dir/$ac_word" >&5
1198 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1199 if test -n "$ac_ct_CC"; then
1200 echo "$as_me:1200: result: $ac_ct_CC" >&5
1201 echo "${ECHO_T}$ac_ct_CC" >&6
1203 echo "$as_me:1203: result: no" >&5
1204 echo "${ECHO_T}no" >&6
1212 if test -z "$CC"; then
1213 if test -n "$ac_tool_prefix"; then
1214 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1215 set dummy ${ac_tool_prefix}cc; ac_word=$2
1216 echo "$as_me:1216: checking for $ac_word" >&5
1217 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1218 if test "${ac_cv_prog_CC+set}" = set; then
1219 echo $ECHO_N "(cached) $ECHO_C" >&6
1221 if test -n "$CC"; then
1222 ac_cv_prog_CC="$CC" # Let the user override the test.
1224 ac_save_IFS=$IFS; IFS=$ac_path_separator
1226 for ac_dir in $ac_dummy; do
1228 test -z "$ac_dir" && ac_dir=.
1229 $as_executable_p "$ac_dir/$ac_word" || continue
1230 ac_cv_prog_CC="${ac_tool_prefix}cc"
1231 echo "$as_me:1231: found $ac_dir/$ac_word" >&5
1238 if test -n "$CC"; then
1239 echo "$as_me:1239: result: $CC" >&5
1240 echo "${ECHO_T}$CC" >&6
1242 echo "$as_me:1242: result: no" >&5
1243 echo "${ECHO_T}no" >&6
1247 if test -z "$ac_cv_prog_CC"; then
1249 # Extract the first word of "cc", so it can be a program name with args.
1250 set dummy cc; ac_word=$2
1251 echo "$as_me:1251: checking for $ac_word" >&5
1252 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1253 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1254 echo $ECHO_N "(cached) $ECHO_C" >&6
1256 if test -n "$ac_ct_CC"; then
1257 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1259 ac_save_IFS=$IFS; IFS=$ac_path_separator
1261 for ac_dir in $ac_dummy; do
1263 test -z "$ac_dir" && ac_dir=.
1264 $as_executable_p "$ac_dir/$ac_word" || continue
1265 ac_cv_prog_ac_ct_CC="cc"
1266 echo "$as_me:1266: found $ac_dir/$ac_word" >&5
1272 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1273 if test -n "$ac_ct_CC"; then
1274 echo "$as_me:1274: result: $ac_ct_CC" >&5
1275 echo "${ECHO_T}$ac_ct_CC" >&6
1277 echo "$as_me:1277: result: no" >&5
1278 echo "${ECHO_T}no" >&6
1287 if test -z "$CC"; then
1288 # Extract the first word of "cc", so it can be a program name with args.
1289 set dummy cc; ac_word=$2
1290 echo "$as_me:1290: checking for $ac_word" >&5
1291 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1292 if test "${ac_cv_prog_CC+set}" = set; then
1293 echo $ECHO_N "(cached) $ECHO_C" >&6
1295 if test -n "$CC"; then
1296 ac_cv_prog_CC="$CC" # Let the user override the test.
1299 ac_save_IFS=$IFS; IFS=$ac_path_separator
1301 for ac_dir in $ac_dummy; do
1303 test -z "$ac_dir" && ac_dir=.
1304 $as_executable_p "$ac_dir/$ac_word" || continue
1305 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1306 ac_prog_rejected=yes
1310 echo "$as_me:1310: found $ac_dir/$ac_word" >&5
1314 if test $ac_prog_rejected = yes; then
1315 # We found a bogon in the path, so make sure we never use it.
1316 set dummy $ac_cv_prog_CC
1318 if test $# != 0; then
1319 # We chose a different compiler from the bogus one.
1320 # However, it has the same basename, so the bogon will be chosen
1321 # first if we set CC to just the basename; use the full file name.
1323 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1331 if test -n "$CC"; then
1332 echo "$as_me:1332: result: $CC" >&5
1333 echo "${ECHO_T}$CC" >&6
1335 echo "$as_me:1335: result: no" >&5
1336 echo "${ECHO_T}no" >&6
1340 if test -z "$CC"; then
1341 if test -n "$ac_tool_prefix"; then
1344 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1345 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1346 echo "$as_me:1346: checking for $ac_word" >&5
1347 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1348 if test "${ac_cv_prog_CC+set}" = set; then
1349 echo $ECHO_N "(cached) $ECHO_C" >&6
1351 if test -n "$CC"; then
1352 ac_cv_prog_CC="$CC" # Let the user override the test.
1354 ac_save_IFS=$IFS; IFS=$ac_path_separator
1356 for ac_dir in $ac_dummy; do
1358 test -z "$ac_dir" && ac_dir=.
1359 $as_executable_p "$ac_dir/$ac_word" || continue
1360 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1361 echo "$as_me:1361: found $ac_dir/$ac_word" >&5
1368 if test -n "$CC"; then
1369 echo "$as_me:1369: result: $CC" >&5
1370 echo "${ECHO_T}$CC" >&6
1372 echo "$as_me:1372: result: no" >&5
1373 echo "${ECHO_T}no" >&6
1376 test -n "$CC" && break
1379 if test -z "$CC"; then
1383 # Extract the first word of "$ac_prog", so it can be a program name with args.
1384 set dummy $ac_prog; ac_word=$2
1385 echo "$as_me:1385: checking for $ac_word" >&5
1386 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1387 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1388 echo $ECHO_N "(cached) $ECHO_C" >&6
1390 if test -n "$ac_ct_CC"; then
1391 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1393 ac_save_IFS=$IFS; IFS=$ac_path_separator
1395 for ac_dir in $ac_dummy; do
1397 test -z "$ac_dir" && ac_dir=.
1398 $as_executable_p "$ac_dir/$ac_word" || continue
1399 ac_cv_prog_ac_ct_CC="$ac_prog"
1400 echo "$as_me:1400: found $ac_dir/$ac_word" >&5
1406 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1407 if test -n "$ac_ct_CC"; then
1408 echo "$as_me:1408: result: $ac_ct_CC" >&5
1409 echo "${ECHO_T}$ac_ct_CC" >&6
1411 echo "$as_me:1411: result: no" >&5
1412 echo "${ECHO_T}no" >&6
1415 test -n "$ac_ct_CC" && break
1423 test -z "$CC" && { { echo "$as_me:1423: error: no acceptable cc found in \$PATH" >&5
1424 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1425 { (exit 1); exit 1; }; }
1427 # Provide some information about the compiler.
1428 echo "$as_me:1428:" \
1429 "checking for C compiler version" >&5
1430 ac_compiler=`set X $ac_compile; echo $2`
1431 { (eval echo "$as_me:1431: \"$ac_compiler --version </dev/null >&5\"") >&5
1432 (eval $ac_compiler --version </dev/null >&5) 2>&5
1434 echo "$as_me:1434: \$? = $ac_status" >&5
1435 (exit $ac_status); }
1436 { (eval echo "$as_me:1436: \"$ac_compiler -v </dev/null >&5\"") >&5
1437 (eval $ac_compiler -v </dev/null >&5) 2>&5
1439 echo "$as_me:1439: \$? = $ac_status" >&5
1440 (exit $ac_status); }
1441 { (eval echo "$as_me:1441: \"$ac_compiler -V </dev/null >&5\"") >&5
1442 (eval $ac_compiler -V </dev/null >&5) 2>&5
1444 echo "$as_me:1444: \$? = $ac_status" >&5
1445 (exit $ac_status); }
1447 cat >conftest.$ac_ext <<_ACEOF
1448 #line 1448 "configure"
1449 #include "confdefs.h"
1459 ac_clean_files_save=$ac_clean_files
1460 ac_clean_files="$ac_clean_files a.out a.exe"
1461 # Try to create an executable without -o first, disregard a.out.
1462 # It will help us diagnose broken compilers, and finding out an intuition
1464 echo "$as_me:1464: checking for C compiler default output" >&5
1465 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1466 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1467 if { (eval echo "$as_me:1467: \"$ac_link_default\"") >&5
1468 (eval $ac_link_default) 2>&5
1470 echo "$as_me:1470: \$? = $ac_status" >&5
1471 (exit $ac_status); }; then
1472 # Find the output, starting from the most likely. This scheme is
1473 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1475 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1476 ls a.out conftest 2>/dev/null;
1477 ls a.* conftest.* 2>/dev/null`; do
1479 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1480 a.out ) # We found the default executable, but exeext='' is most
1483 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1484 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1491 echo "$as_me: failed program was:" >&5
1492 cat conftest.$ac_ext >&5
1493 { { echo "$as_me:1493: error: C compiler cannot create executables" >&5
1494 echo "$as_me: error: C compiler cannot create executables" >&2;}
1495 { (exit 77); exit 77; }; }
1498 ac_exeext=$ac_cv_exeext
1499 echo "$as_me:1499: result: $ac_file" >&5
1500 echo "${ECHO_T}$ac_file" >&6
1502 # Check the compiler produces executables we can run. If not, either
1503 # the compiler is broken, or we cross compile.
1504 echo "$as_me:1504: checking whether the C compiler works" >&5
1505 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1506 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1507 # If not cross compiling, check that we can run a simple program.
1508 if test "$cross_compiling" != yes; then
1509 if { ac_try='./$ac_file'
1510 { (eval echo "$as_me:1510: \"$ac_try\"") >&5
1513 echo "$as_me:1513: \$? = $ac_status" >&5
1514 (exit $ac_status); }; }; then
1517 if test "$cross_compiling" = maybe; then
1520 { { echo "$as_me:1520: error: cannot run C compiled programs.
1521 If you meant to cross compile, use \`--host'." >&5
1522 echo "$as_me: error: cannot run C compiled programs.
1523 If you meant to cross compile, use \`--host'." >&2;}
1524 { (exit 1); exit 1; }; }
1528 echo "$as_me:1528: result: yes" >&5
1529 echo "${ECHO_T}yes" >&6
1531 rm -f a.out a.exe conftest$ac_cv_exeext
1532 ac_clean_files=$ac_clean_files_save
1533 # Check the compiler produces executables we can run. If not, either
1534 # the compiler is broken, or we cross compile.
1535 echo "$as_me:1535: checking whether we are cross compiling" >&5
1536 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1537 echo "$as_me:1537: result: $cross_compiling" >&5
1538 echo "${ECHO_T}$cross_compiling" >&6
1540 echo "$as_me:1540: checking for executable suffix" >&5
1541 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1542 if { (eval echo "$as_me:1542: \"$ac_link\"") >&5
1543 (eval $ac_link) 2>&5
1545 echo "$as_me:1545: \$? = $ac_status" >&5
1546 (exit $ac_status); }; then
1547 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1548 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1549 # work properly (i.e., refer to `conftest.exe'), while it won't with
1551 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1553 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1554 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1561 { { echo "$as_me:1561: error: cannot compute EXEEXT: cannot compile and link" >&5
1562 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1563 { (exit 1); exit 1; }; }
1566 rm -f conftest$ac_cv_exeext
1567 echo "$as_me:1567: result: $ac_cv_exeext" >&5
1568 echo "${ECHO_T}$ac_cv_exeext" >&6
1570 rm -f conftest.$ac_ext
1571 EXEEXT=$ac_cv_exeext
1573 echo "$as_me:1573: checking for object suffix" >&5
1574 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1575 if test "${ac_cv_objext+set}" = set; then
1576 echo $ECHO_N "(cached) $ECHO_C" >&6
1578 cat >conftest.$ac_ext <<_ACEOF
1579 #line 1579 "configure"
1580 #include "confdefs.h"
1590 rm -f conftest.o conftest.obj
1591 if { (eval echo "$as_me:1591: \"$ac_compile\"") >&5
1592 (eval $ac_compile) 2>&5
1594 echo "$as_me:1594: \$? = $ac_status" >&5
1595 (exit $ac_status); }; then
1596 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1598 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1599 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1604 echo "$as_me: failed program was:" >&5
1605 cat conftest.$ac_ext >&5
1606 { { echo "$as_me:1606: error: cannot compute OBJEXT: cannot compile" >&5
1607 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1608 { (exit 1); exit 1; }; }
1611 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1613 echo "$as_me:1613: result: $ac_cv_objext" >&5
1614 echo "${ECHO_T}$ac_cv_objext" >&6
1615 OBJEXT=$ac_cv_objext
1617 echo "$as_me:1617: checking whether we are using the GNU C compiler" >&5
1618 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1619 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1620 echo $ECHO_N "(cached) $ECHO_C" >&6
1622 cat >conftest.$ac_ext <<_ACEOF
1623 #line 1623 "configure"
1624 #include "confdefs.h"
1637 rm -f conftest.$ac_objext
1638 if { (eval echo "$as_me:1638: \"$ac_compile\"") >&5
1639 (eval $ac_compile) 2>&5
1641 echo "$as_me:1641: \$? = $ac_status" >&5
1642 (exit $ac_status); } &&
1643 { ac_try='test -s conftest.$ac_objext'
1644 { (eval echo "$as_me:1644: \"$ac_try\"") >&5
1647 echo "$as_me:1647: \$? = $ac_status" >&5
1648 (exit $ac_status); }; }; then
1651 echo "$as_me: failed program was:" >&5
1652 cat conftest.$ac_ext >&5
1655 rm -f conftest.$ac_objext conftest.$ac_ext
1656 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1659 echo "$as_me:1659: result: $ac_cv_c_compiler_gnu" >&5
1660 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1661 GCC=`test $ac_compiler_gnu = yes && echo yes`
1662 ac_test_CFLAGS=${CFLAGS+set}
1663 ac_save_CFLAGS=$CFLAGS
1665 echo "$as_me:1665: checking whether $CC accepts -g" >&5
1666 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1667 if test "${ac_cv_prog_cc_g+set}" = set; then
1668 echo $ECHO_N "(cached) $ECHO_C" >&6
1670 cat >conftest.$ac_ext <<_ACEOF
1671 #line 1671 "configure"
1672 #include "confdefs.h"
1682 rm -f conftest.$ac_objext
1683 if { (eval echo "$as_me:1683: \"$ac_compile\"") >&5
1684 (eval $ac_compile) 2>&5
1686 echo "$as_me:1686: \$? = $ac_status" >&5
1687 (exit $ac_status); } &&
1688 { ac_try='test -s conftest.$ac_objext'
1689 { (eval echo "$as_me:1689: \"$ac_try\"") >&5
1692 echo "$as_me:1692: \$? = $ac_status" >&5
1693 (exit $ac_status); }; }; then
1696 echo "$as_me: failed program was:" >&5
1697 cat conftest.$ac_ext >&5
1700 rm -f conftest.$ac_objext conftest.$ac_ext
1702 echo "$as_me:1702: result: $ac_cv_prog_cc_g" >&5
1703 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1704 if test "$ac_test_CFLAGS" = set; then
1705 CFLAGS=$ac_save_CFLAGS
1706 elif test $ac_cv_prog_cc_g = yes; then
1707 if test "$GCC" = yes; then
1713 if test "$GCC" = yes; then
1719 # Some people use a C++ compiler to compile C. Since we use `exit',
1720 # in C++ we need to declare it. In case someone uses the same compiler
1721 # for both compiling C and C++ we need to have the C++ compiler decide
1722 # the declaration of exit, since it's the most demanding environment.
1723 cat >conftest.$ac_ext <<_ACEOF
1728 rm -f conftest.$ac_objext
1729 if { (eval echo "$as_me:1729: \"$ac_compile\"") >&5
1730 (eval $ac_compile) 2>&5
1732 echo "$as_me:1732: \$? = $ac_status" >&5
1733 (exit $ac_status); } &&
1734 { ac_try='test -s conftest.$ac_objext'
1735 { (eval echo "$as_me:1735: \"$ac_try\"") >&5
1738 echo "$as_me:1738: \$? = $ac_status" >&5
1739 (exit $ac_status); }; }; then
1740 for ac_declaration in \
1742 '#include <stdlib.h>' \
1743 'extern "C" void std::exit (int) throw (); using std::exit;' \
1744 'extern "C" void std::exit (int); using std::exit;' \
1745 'extern "C" void exit (int) throw ();' \
1746 'extern "C" void exit (int);' \
1749 cat >conftest.$ac_ext <<_ACEOF
1750 #line 1750 "configure"
1751 #include "confdefs.h"
1762 rm -f conftest.$ac_objext
1763 if { (eval echo "$as_me:1763: \"$ac_compile\"") >&5
1764 (eval $ac_compile) 2>&5
1766 echo "$as_me:1766: \$? = $ac_status" >&5
1767 (exit $ac_status); } &&
1768 { ac_try='test -s conftest.$ac_objext'
1769 { (eval echo "$as_me:1769: \"$ac_try\"") >&5
1772 echo "$as_me:1772: \$? = $ac_status" >&5
1773 (exit $ac_status); }; }; then
1776 echo "$as_me: failed program was:" >&5
1777 cat conftest.$ac_ext >&5
1780 rm -f conftest.$ac_objext conftest.$ac_ext
1781 cat >conftest.$ac_ext <<_ACEOF
1782 #line 1782 "configure"
1783 #include "confdefs.h"
1793 rm -f conftest.$ac_objext
1794 if { (eval echo "$as_me:1794: \"$ac_compile\"") >&5
1795 (eval $ac_compile) 2>&5
1797 echo "$as_me:1797: \$? = $ac_status" >&5
1798 (exit $ac_status); } &&
1799 { ac_try='test -s conftest.$ac_objext'
1800 { (eval echo "$as_me:1800: \"$ac_try\"") >&5
1803 echo "$as_me:1803: \$? = $ac_status" >&5
1804 (exit $ac_status); }; }; then
1807 echo "$as_me: failed program was:" >&5
1808 cat conftest.$ac_ext >&5
1810 rm -f conftest.$ac_objext conftest.$ac_ext
1813 if test -n "$ac_declaration"; then
1814 echo '#ifdef __cplusplus' >>confdefs.h
1815 echo $ac_declaration >>confdefs.h
1816 echo '#endif' >>confdefs.h
1820 echo "$as_me: failed program was:" >&5
1821 cat conftest.$ac_ext >&5
1823 rm -f conftest.$ac_objext conftest.$ac_ext
1825 ac_cpp='$CPP $CPPFLAGS'
1826 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1827 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1828 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1829 ac_main_return=return
1832 if test "$GCC" = yes ; then
1833 echo "$as_me:1833: checking version of $CC" >&5
1834 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1835 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.].*//'`"
1836 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1837 echo "$as_me:1837: result: $GCC_VERSION" >&5
1838 echo "${ECHO_T}$GCC_VERSION" >&6
1841 echo "$as_me:1841: checking for $CC option to accept ANSI C" >&5
1842 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1843 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1844 echo $ECHO_N "(cached) $ECHO_C" >&6
1846 ac_cv_prog_cc_stdc=no
1848 cat >conftest.$ac_ext <<_ACEOF
1849 #line 1849 "configure"
1850 #include "confdefs.h"
1853 #include <sys/types.h>
1854 #include <sys/stat.h>
1855 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1856 struct buf { int x; };
1857 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1858 static char *e (p, i)
1864 static char *f (char * (*g) (char **, int), char **p, ...)
1869 s = g (p, va_arg (v,int));
1873 int test (int i, double x);
1874 struct s1 {int (*f) (int a);};
1875 struct s2 {int (*f) (double a);};
1876 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1882 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1887 # Don't try gcc -ansi; that turns off useful extensions and
1888 # breaks some systems' header files.
1889 # AIX -qlanglvl=ansi
1890 # Ultrix and OSF/1 -std1
1891 # HP-UX 10.20 and later -Ae
1892 # HP-UX older versions -Aa -D_HPUX_SOURCE
1893 # SVR4 -Xc -D__EXTENSIONS__
1894 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1896 CC="$ac_save_CC $ac_arg"
1897 rm -f conftest.$ac_objext
1898 if { (eval echo "$as_me:1898: \"$ac_compile\"") >&5
1899 (eval $ac_compile) 2>&5
1901 echo "$as_me:1901: \$? = $ac_status" >&5
1902 (exit $ac_status); } &&
1903 { ac_try='test -s conftest.$ac_objext'
1904 { (eval echo "$as_me:1904: \"$ac_try\"") >&5
1907 echo "$as_me:1907: \$? = $ac_status" >&5
1908 (exit $ac_status); }; }; then
1909 ac_cv_prog_cc_stdc=$ac_arg
1912 echo "$as_me: failed program was:" >&5
1913 cat conftest.$ac_ext >&5
1915 rm -f conftest.$ac_objext
1917 rm -f conftest.$ac_ext conftest.$ac_objext
1922 case "x$ac_cv_prog_cc_stdc" in
1924 echo "$as_me:1924: result: none needed" >&5
1925 echo "${ECHO_T}none needed" >&6 ;;
1927 echo "$as_me:1927: result: $ac_cv_prog_cc_stdc" >&5
1928 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1929 CC="$CC $ac_cv_prog_cc_stdc" ;;
1932 # This should have been defined by AC_PROG_CC
1935 echo "$as_me:1935: checking \$CC variable" >&5
1936 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1939 echo "$as_me:1939: result: broken" >&5
1940 echo "${ECHO_T}broken" >&6
1941 { echo "$as_me:1941: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1942 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1944 cf_flags=`echo "$CC" | sed -e 's/^[^ ]*[ ]//'`
1945 CC=`echo "$CC" | sed -e 's/[ ].*//'`
1950 cf_new_extra_cppflags=
1952 for cf_add_cflags in $cf_flags
1954 case $cf_fix_cppflags in
1956 case $cf_add_cflags in #(vi
1957 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1958 case $cf_add_cflags in
1960 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1962 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1963 && test -z "${cf_tst_cflags}" \
1964 && cf_fix_cppflags=yes
1966 if test $cf_fix_cppflags = yes ; then
1967 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1969 elif test "${cf_tst_cflags}" = "\"'" ; then
1970 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1976 *$cf_add_cflags) #(vi
1979 case $cf_add_cflags in #(vi
1981 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1983 CPPFLAGS=`echo "$CPPFLAGS" | \
1984 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1985 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1989 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1994 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1999 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2001 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2003 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2004 && test -z "${cf_tst_cflags}" \
2005 && cf_fix_cppflags=no
2010 if test -n "$cf_new_cflags" ; then
2012 CFLAGS="$CFLAGS $cf_new_cflags"
2015 if test -n "$cf_new_cppflags" ; then
2017 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2020 if test -n "$cf_new_extra_cppflags" ; then
2022 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2027 echo "$as_me:2027: result: ok" >&5
2028 echo "${ECHO_T}ok" >&6
2033 ac_cpp='$CPP $CPPFLAGS'
2034 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2035 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2036 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2037 ac_main_return=return
2038 echo "$as_me:2038: checking how to run the C preprocessor" >&5
2039 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2040 # On Suns, sometimes $CPP names a directory.
2041 if test -n "$CPP" && test -d "$CPP"; then
2044 if test -z "$CPP"; then
2045 if test "${ac_cv_prog_CPP+set}" = set; then
2046 echo $ECHO_N "(cached) $ECHO_C" >&6
2048 # Double quotes because CPP needs to be expanded
2049 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2052 for ac_c_preproc_warn_flag in '' yes
2054 # Use a header file that comes with gcc, so configuring glibc
2055 # with a fresh cross-compiler works.
2056 # On the NeXT, cc -E runs the code through the compiler's parser,
2057 # not just through cpp. "Syntax error" is here to catch this case.
2058 cat >conftest.$ac_ext <<_ACEOF
2059 #line 2059 "configure"
2060 #include "confdefs.h"
2064 if { (eval echo "$as_me:2064: \"$ac_cpp conftest.$ac_ext\"") >&5
2065 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2067 egrep -v '^ *\+' conftest.er1 >conftest.err
2069 cat conftest.err >&5
2070 echo "$as_me:2070: \$? = $ac_status" >&5
2071 (exit $ac_status); } >/dev/null; then
2072 if test -s conftest.err; then
2073 ac_cpp_err=$ac_c_preproc_warn_flag
2080 if test -z "$ac_cpp_err"; then
2083 echo "$as_me: failed program was:" >&5
2084 cat conftest.$ac_ext >&5
2085 # Broken: fails on valid input.
2088 rm -f conftest.err conftest.$ac_ext
2090 # OK, works on sane cases. Now check whether non-existent headers
2091 # can be detected and how.
2092 cat >conftest.$ac_ext <<_ACEOF
2093 #line 2093 "configure"
2094 #include "confdefs.h"
2095 #include <ac_nonexistent.h>
2097 if { (eval echo "$as_me:2097: \"$ac_cpp conftest.$ac_ext\"") >&5
2098 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2100 egrep -v '^ *\+' conftest.er1 >conftest.err
2102 cat conftest.err >&5
2103 echo "$as_me:2103: \$? = $ac_status" >&5
2104 (exit $ac_status); } >/dev/null; then
2105 if test -s conftest.err; then
2106 ac_cpp_err=$ac_c_preproc_warn_flag
2113 if test -z "$ac_cpp_err"; then
2114 # Broken: success on invalid input.
2117 echo "$as_me: failed program was:" >&5
2118 cat conftest.$ac_ext >&5
2119 # Passes both tests.
2123 rm -f conftest.err conftest.$ac_ext
2126 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2127 rm -f conftest.err conftest.$ac_ext
2128 if $ac_preproc_ok; then
2140 echo "$as_me:2140: result: $CPP" >&5
2141 echo "${ECHO_T}$CPP" >&6
2143 for ac_c_preproc_warn_flag in '' yes
2145 # Use a header file that comes with gcc, so configuring glibc
2146 # with a fresh cross-compiler works.
2147 # On the NeXT, cc -E runs the code through the compiler's parser,
2148 # not just through cpp. "Syntax error" is here to catch this case.
2149 cat >conftest.$ac_ext <<_ACEOF
2150 #line 2150 "configure"
2151 #include "confdefs.h"
2155 if { (eval echo "$as_me:2155: \"$ac_cpp conftest.$ac_ext\"") >&5
2156 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2158 egrep -v '^ *\+' conftest.er1 >conftest.err
2160 cat conftest.err >&5
2161 echo "$as_me:2161: \$? = $ac_status" >&5
2162 (exit $ac_status); } >/dev/null; then
2163 if test -s conftest.err; then
2164 ac_cpp_err=$ac_c_preproc_warn_flag
2171 if test -z "$ac_cpp_err"; then
2174 echo "$as_me: failed program was:" >&5
2175 cat conftest.$ac_ext >&5
2176 # Broken: fails on valid input.
2179 rm -f conftest.err conftest.$ac_ext
2181 # OK, works on sane cases. Now check whether non-existent headers
2182 # can be detected and how.
2183 cat >conftest.$ac_ext <<_ACEOF
2184 #line 2184 "configure"
2185 #include "confdefs.h"
2186 #include <ac_nonexistent.h>
2188 if { (eval echo "$as_me:2188: \"$ac_cpp conftest.$ac_ext\"") >&5
2189 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2191 egrep -v '^ *\+' conftest.er1 >conftest.err
2193 cat conftest.err >&5
2194 echo "$as_me:2194: \$? = $ac_status" >&5
2195 (exit $ac_status); } >/dev/null; then
2196 if test -s conftest.err; then
2197 ac_cpp_err=$ac_c_preproc_warn_flag
2204 if test -z "$ac_cpp_err"; then
2205 # Broken: success on invalid input.
2208 echo "$as_me: failed program was:" >&5
2209 cat conftest.$ac_ext >&5
2210 # Passes both tests.
2214 rm -f conftest.err conftest.$ac_ext
2217 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2218 rm -f conftest.err conftest.$ac_ext
2219 if $ac_preproc_ok; then
2222 { { echo "$as_me:2222: error: C preprocessor \"$CPP\" fails sanity check" >&5
2223 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2224 { (exit 1); exit 1; }; }
2228 ac_cpp='$CPP $CPPFLAGS'
2229 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2230 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2231 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2232 ac_main_return=return
2234 for ac_prog in mawk gawk nawk awk
2236 # Extract the first word of "$ac_prog", so it can be a program name with args.
2237 set dummy $ac_prog; ac_word=$2
2238 echo "$as_me:2238: checking for $ac_word" >&5
2239 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2240 if test "${ac_cv_prog_AWK+set}" = set; then
2241 echo $ECHO_N "(cached) $ECHO_C" >&6
2243 if test -n "$AWK"; then
2244 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2246 ac_save_IFS=$IFS; IFS=$ac_path_separator
2248 for ac_dir in $ac_dummy; do
2250 test -z "$ac_dir" && ac_dir=.
2251 $as_executable_p "$ac_dir/$ac_word" || continue
2252 ac_cv_prog_AWK="$ac_prog"
2253 echo "$as_me:2253: found $ac_dir/$ac_word" >&5
2260 if test -n "$AWK"; then
2261 echo "$as_me:2261: result: $AWK" >&5
2262 echo "${ECHO_T}$AWK" >&6
2264 echo "$as_me:2264: result: no" >&5
2265 echo "${ECHO_T}no" >&6
2268 test -n "$AWK" && break
2271 # Find a good install program. We prefer a C program (faster),
2272 # so one script is as good as another. But avoid the broken or
2273 # incompatible versions:
2274 # SysV /etc/install, /usr/sbin/install
2275 # SunOS /usr/etc/install
2276 # IRIX /sbin/install
2278 # AmigaOS /C/install, which installs bootblocks on floppy discs
2279 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2280 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2281 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2282 # ./install, which can be erroneously created by make from ./install.sh.
2283 echo "$as_me:2283: checking for a BSD compatible install" >&5
2284 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2285 if test -z "$INSTALL"; then
2286 if test "${ac_cv_path_install+set}" = set; then
2287 echo $ECHO_N "(cached) $ECHO_C" >&6
2289 ac_save_IFS=$IFS; IFS=$ac_path_separator
2290 for ac_dir in $PATH; do
2292 # Account for people who put trailing slashes in PATH elements.
2294 / | ./ | .// | /cC/* \
2295 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2298 # OSF1 and SCO ODT 3.0 have their own names for install.
2299 # Don't use installbsd from OSF since it installs stuff as root
2301 for ac_prog in ginstall scoinst install; do
2302 if $as_executable_p "$ac_dir/$ac_prog"; then
2303 if test $ac_prog = install &&
2304 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2305 # AIX install. It has an incompatible calling convention.
2307 elif test $ac_prog = install &&
2308 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2309 # program-specific install script used by HP pwplus--don't use.
2312 ac_cv_path_install="$ac_dir/$ac_prog -c"
2322 if test "${ac_cv_path_install+set}" = set; then
2323 INSTALL=$ac_cv_path_install
2325 # As a last resort, use the slow shell script. We don't cache a
2326 # path for INSTALL within a source directory, because that will
2327 # break other packages using the cache if that directory is
2328 # removed, or if the path is relative.
2329 INSTALL=$ac_install_sh
2332 echo "$as_me:2332: result: $INSTALL" >&5
2333 echo "${ECHO_T}$INSTALL" >&6
2335 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2336 # It thinks the first close brace ends the variable substitution.
2337 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2339 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2341 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2347 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2348 test -z "$cf_dir" && cf_dir=.
2349 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2353 for ac_prog in tdlint lint alint splint lclint
2355 # Extract the first word of "$ac_prog", so it can be a program name with args.
2356 set dummy $ac_prog; ac_word=$2
2357 echo "$as_me:2357: checking for $ac_word" >&5
2358 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2359 if test "${ac_cv_prog_LINT+set}" = set; then
2360 echo $ECHO_N "(cached) $ECHO_C" >&6
2362 if test -n "$LINT"; then
2363 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2365 ac_save_IFS=$IFS; IFS=$ac_path_separator
2367 for ac_dir in $ac_dummy; do
2369 test -z "$ac_dir" && ac_dir=.
2370 $as_executable_p "$ac_dir/$ac_word" || continue
2371 ac_cv_prog_LINT="$ac_prog"
2372 echo "$as_me:2372: found $ac_dir/$ac_word" >&5
2378 LINT=$ac_cv_prog_LINT
2379 if test -n "$LINT"; then
2380 echo "$as_me:2380: result: $LINT" >&5
2381 echo "${ECHO_T}$LINT" >&6
2383 echo "$as_me:2383: result: no" >&5
2384 echo "${ECHO_T}no" >&6
2387 test -n "$LINT" && break
2390 echo "$as_me:2390: checking if filesystem supports mixed-case filenames" >&5
2391 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2392 if test "${cf_cv_mixedcase+set}" = set; then
2393 echo $ECHO_N "(cached) $ECHO_C" >&6
2396 if test "$cross_compiling" = yes ; then
2397 case $target_alias in #(vi
2398 *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*) #(vi
2406 rm -f conftest CONFTEST
2408 if test -f CONFTEST ; then
2413 rm -f conftest CONFTEST
2417 echo "$as_me:2417: result: $cf_cv_mixedcase" >&5
2418 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2419 test "$cf_cv_mixedcase" = yes &&
2420 cat >>confdefs.h <<\EOF
2421 #define MIXEDCASE_FILENAMES 1
2424 for ac_prog in exctags ctags
2426 # Extract the first word of "$ac_prog", so it can be a program name with args.
2427 set dummy $ac_prog; ac_word=$2
2428 echo "$as_me:2428: checking for $ac_word" >&5
2429 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2430 if test "${ac_cv_prog_CTAGS+set}" = set; then
2431 echo $ECHO_N "(cached) $ECHO_C" >&6
2433 if test -n "$CTAGS"; then
2434 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2436 ac_save_IFS=$IFS; IFS=$ac_path_separator
2438 for ac_dir in $ac_dummy; do
2440 test -z "$ac_dir" && ac_dir=.
2441 $as_executable_p "$ac_dir/$ac_word" || continue
2442 ac_cv_prog_CTAGS="$ac_prog"
2443 echo "$as_me:2443: found $ac_dir/$ac_word" >&5
2449 CTAGS=$ac_cv_prog_CTAGS
2450 if test -n "$CTAGS"; then
2451 echo "$as_me:2451: result: $CTAGS" >&5
2452 echo "${ECHO_T}$CTAGS" >&6
2454 echo "$as_me:2454: result: no" >&5
2455 echo "${ECHO_T}no" >&6
2458 test -n "$CTAGS" && break
2461 for ac_prog in exetags etags
2463 # Extract the first word of "$ac_prog", so it can be a program name with args.
2464 set dummy $ac_prog; ac_word=$2
2465 echo "$as_me:2465: checking for $ac_word" >&5
2466 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2467 if test "${ac_cv_prog_ETAGS+set}" = set; then
2468 echo $ECHO_N "(cached) $ECHO_C" >&6
2470 if test -n "$ETAGS"; then
2471 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2473 ac_save_IFS=$IFS; IFS=$ac_path_separator
2475 for ac_dir in $ac_dummy; do
2477 test -z "$ac_dir" && ac_dir=.
2478 $as_executable_p "$ac_dir/$ac_word" || continue
2479 ac_cv_prog_ETAGS="$ac_prog"
2480 echo "$as_me:2480: found $ac_dir/$ac_word" >&5
2486 ETAGS=$ac_cv_prog_ETAGS
2487 if test -n "$ETAGS"; then
2488 echo "$as_me:2488: result: $ETAGS" >&5
2489 echo "${ECHO_T}$ETAGS" >&6
2491 echo "$as_me:2491: result: no" >&5
2492 echo "${ECHO_T}no" >&6
2495 test -n "$ETAGS" && break
2498 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2499 set dummy ${CTAGS:-ctags}; ac_word=$2
2500 echo "$as_me:2500: checking for $ac_word" >&5
2501 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2502 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2503 echo $ECHO_N "(cached) $ECHO_C" >&6
2505 if test -n "$MAKE_LOWER_TAGS"; then
2506 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2508 ac_save_IFS=$IFS; IFS=$ac_path_separator
2510 for ac_dir in $ac_dummy; do
2512 test -z "$ac_dir" && ac_dir=.
2513 $as_executable_p "$ac_dir/$ac_word" || continue
2514 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2515 echo "$as_me:2515: found $ac_dir/$ac_word" >&5
2519 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2522 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2523 if test -n "$MAKE_LOWER_TAGS"; then
2524 echo "$as_me:2524: result: $MAKE_LOWER_TAGS" >&5
2525 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2527 echo "$as_me:2527: result: no" >&5
2528 echo "${ECHO_T}no" >&6
2531 if test "$cf_cv_mixedcase" = yes ; then
2532 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2533 set dummy ${ETAGS:-etags}; ac_word=$2
2534 echo "$as_me:2534: checking for $ac_word" >&5
2535 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2536 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2537 echo $ECHO_N "(cached) $ECHO_C" >&6
2539 if test -n "$MAKE_UPPER_TAGS"; then
2540 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2542 ac_save_IFS=$IFS; IFS=$ac_path_separator
2544 for ac_dir in $ac_dummy; do
2546 test -z "$ac_dir" && ac_dir=.
2547 $as_executable_p "$ac_dir/$ac_word" || continue
2548 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2549 echo "$as_me:2549: found $ac_dir/$ac_word" >&5
2553 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2556 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2557 if test -n "$MAKE_UPPER_TAGS"; then
2558 echo "$as_me:2558: result: $MAKE_UPPER_TAGS" >&5
2559 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2561 echo "$as_me:2561: result: no" >&5
2562 echo "${ECHO_T}no" >&6
2569 if test "$MAKE_UPPER_TAGS" = yes ; then
2575 if test "$MAKE_LOWER_TAGS" = yes ; then
2581 echo "$as_me:2581: checking if -lm needed for math functions" >&5
2582 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
2583 if test "${cf_cv_need_libm+set}" = set; then
2584 echo $ECHO_N "(cached) $ECHO_C" >&6
2587 cat >conftest.$ac_ext <<_ACEOF
2588 #line 2588 "configure"
2589 #include "confdefs.h"
2597 double x = rand(); printf("result = %g\n", pow(sin(x),x))
2602 rm -f conftest.$ac_objext conftest$ac_exeext
2603 if { (eval echo "$as_me:2603: \"$ac_link\"") >&5
2604 (eval $ac_link) 2>&5
2606 echo "$as_me:2606: \$? = $ac_status" >&5
2607 (exit $ac_status); } &&
2608 { ac_try='test -s conftest$ac_exeext'
2609 { (eval echo "$as_me:2609: \"$ac_try\"") >&5
2612 echo "$as_me:2612: \$? = $ac_status" >&5
2613 (exit $ac_status); }; }; then
2616 echo "$as_me: failed program was:" >&5
2617 cat conftest.$ac_ext >&5
2620 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2622 echo "$as_me:2622: result: $cf_cv_need_libm" >&5
2623 echo "${ECHO_T}$cf_cv_need_libm" >&6
2624 if test "$cf_cv_need_libm" = yes
2632 CC_SHARED_OPTS=unknown
2633 CPPFLAGS="$CPPFLAGS"
2635 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
2636 DFT_UPR_MODEL="NORMAL"
2653 TINFO_LIBS='$(LIBS_CURSES)'
2654 cf_cv_abi_version=""
2655 cf_cv_rel_version=""
2661 if test "$GCC" = yes
2663 cat > conftest.i <<EOF
2665 #define GCC_PRINTF 0
2670 #ifndef GCC_NORETURN
2671 #define GCC_NORETURN /* nothing */
2674 #define GCC_UNUSED /* nothing */
2677 if test "$GCC" = yes
2679 { echo "$as_me:2679: checking for $CC __attribute__ directives..." >&5
2680 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
2681 cat > conftest.$ac_ext <<EOF
2682 #line 2682 "${as_me:-configure}"
2683 #include "confdefs.h"
2684 #include "conftest.h"
2685 #include "conftest.i"
2687 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2689 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2692 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
2694 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
2696 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2697 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2698 extern void foo(void) GCC_NORETURN;
2699 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2701 cf_printf_attribute=no
2702 cf_scanf_attribute=no
2703 for cf_attribute in scanf printf unused noreturn
2706 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2708 cf_directive="__attribute__(($cf_attribute))"
2709 echo "checking for $CC $cf_directive" 1>&5
2711 case $cf_attribute in #(vi
2713 cf_printf_attribute=yes
2714 cat >conftest.h <<EOF
2715 #define GCC_$cf_ATTRIBUTE 1
2719 cf_scanf_attribute=yes
2720 cat >conftest.h <<EOF
2721 #define GCC_$cf_ATTRIBUTE 1
2725 cat >conftest.h <<EOF
2726 #define GCC_$cf_ATTRIBUTE $cf_directive
2731 if { (eval echo "$as_me:2731: \"$ac_compile\"") >&5
2732 (eval $ac_compile) 2>&5
2734 echo "$as_me:2734: \$? = $ac_status" >&5
2735 (exit $ac_status); }; then
2736 test -n "$verbose" && echo "$as_me:2736: result: ... $cf_attribute" >&5
2737 echo "${ECHO_T}... $cf_attribute" >&6
2738 cat conftest.h >>confdefs.h
2739 case $cf_attribute in #(vi
2742 cat >>confdefs.h <<EOF
2743 #define GCC_NORETURN $cf_directive
2748 cf_value='/* nothing */'
2749 if test "$cf_printf_attribute" != no ; then
2750 cf_value='__attribute__((format(printf,fmt,var)))'
2752 cat >>confdefs.h <<\EOF
2753 #define GCC_PRINTF 1
2758 cat >>confdefs.h <<EOF
2759 #define GCC_PRINTFLIKE(fmt,var) $cf_value
2764 cf_value='/* nothing */'
2765 if test "$cf_scanf_attribute" != no ; then
2766 cf_value='__attribute__((format(scanf,fmt,var)))'
2768 cat >>confdefs.h <<\EOF
2774 cat >>confdefs.h <<EOF
2775 #define GCC_SCANFLIKE(fmt,var) $cf_value
2781 cat >>confdefs.h <<EOF
2782 #define GCC_UNUSED $cf_directive
2790 fgrep define conftest.i >>confdefs.h
2796 cf_POSIX_C_SOURCE=199506L
2799 case $host_os in #(vi
2801 cf_xopen_source="-D_ALL_SOURCE"
2807 cf_xopen_source="-D_APPLE_C_SOURCE"
2810 cf_xopen_source="-D_DARWIN_C_SOURCE"
2813 freebsd*|dragonfly*) #(vi
2814 # 5.x headers associate
2815 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2816 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2817 cf_POSIX_C_SOURCE=200112L
2819 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2822 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2825 cf_xopen_source="-D_HPUX_SOURCE"
2828 cf_xopen_source="-D_SGI_SOURCE"
2831 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
2833 echo "$as_me:2833: checking if we must define _GNU_SOURCE" >&5
2834 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2835 if test "${cf_cv_gnu_source+set}" = set; then
2836 echo $ECHO_N "(cached) $ECHO_C" >&6
2839 cat >conftest.$ac_ext <<_ACEOF
2840 #line 2840 "configure"
2841 #include "confdefs.h"
2842 #include <sys/types.h>
2847 #ifndef _XOPEN_SOURCE
2854 rm -f conftest.$ac_objext
2855 if { (eval echo "$as_me:2855: \"$ac_compile\"") >&5
2856 (eval $ac_compile) 2>&5
2858 echo "$as_me:2858: \$? = $ac_status" >&5
2859 (exit $ac_status); } &&
2860 { ac_try='test -s conftest.$ac_objext'
2861 { (eval echo "$as_me:2861: \"$ac_try\"") >&5
2864 echo "$as_me:2864: \$? = $ac_status" >&5
2865 (exit $ac_status); }; }; then
2868 echo "$as_me: failed program was:" >&5
2869 cat conftest.$ac_ext >&5
2871 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2872 cat >conftest.$ac_ext <<_ACEOF
2873 #line 2873 "configure"
2874 #include "confdefs.h"
2875 #include <sys/types.h>
2880 #ifdef _XOPEN_SOURCE
2887 rm -f conftest.$ac_objext
2888 if { (eval echo "$as_me:2888: \"$ac_compile\"") >&5
2889 (eval $ac_compile) 2>&5
2891 echo "$as_me:2891: \$? = $ac_status" >&5
2892 (exit $ac_status); } &&
2893 { ac_try='test -s conftest.$ac_objext'
2894 { (eval echo "$as_me:2894: \"$ac_try\"") >&5
2897 echo "$as_me:2897: \$? = $ac_status" >&5
2898 (exit $ac_status); }; }; then
2901 echo "$as_me: failed program was:" >&5
2902 cat conftest.$ac_ext >&5
2903 cf_cv_gnu_source=yes
2905 rm -f conftest.$ac_objext conftest.$ac_ext
2909 rm -f conftest.$ac_objext conftest.$ac_ext
2912 echo "$as_me:2912: result: $cf_cv_gnu_source" >&5
2913 echo "${ECHO_T}$cf_cv_gnu_source" >&6
2914 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2918 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
2921 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
2924 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
2926 cf_save_CFLAGS="$CFLAGS"
2927 cf_save_CPPFLAGS="$CPPFLAGS"
2929 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
2930 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
2931 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
2933 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
2934 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
2935 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
2937 echo "$as_me:2937: checking if we should define _POSIX_C_SOURCE" >&5
2938 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
2939 if test "${cf_cv_posix_c_source+set}" = set; then
2940 echo $ECHO_N "(cached) $ECHO_C" >&6
2943 echo "${as_me:-configure}:2943: testing if the symbol is already defined go no further ..." 1>&5
2945 cat >conftest.$ac_ext <<_ACEOF
2946 #line 2946 "configure"
2947 #include "confdefs.h"
2948 #include <sys/types.h>
2953 #ifndef _POSIX_C_SOURCE
2960 rm -f conftest.$ac_objext
2961 if { (eval echo "$as_me:2961: \"$ac_compile\"") >&5
2962 (eval $ac_compile) 2>&5
2964 echo "$as_me:2964: \$? = $ac_status" >&5
2965 (exit $ac_status); } &&
2966 { ac_try='test -s conftest.$ac_objext'
2967 { (eval echo "$as_me:2967: \"$ac_try\"") >&5
2970 echo "$as_me:2970: \$? = $ac_status" >&5
2971 (exit $ac_status); }; }; then
2972 cf_cv_posix_c_source=no
2974 echo "$as_me: failed program was:" >&5
2975 cat conftest.$ac_ext >&5
2976 cf_want_posix_source=no
2977 case .$cf_POSIX_C_SOURCE in #(vi
2979 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2982 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2983 cf_want_posix_source=yes
2986 cf_want_posix_source=yes
2989 if test "$cf_want_posix_source" = yes ; then
2990 cat >conftest.$ac_ext <<_ACEOF
2991 #line 2991 "configure"
2992 #include "confdefs.h"
2993 #include <sys/types.h>
2998 #ifdef _POSIX_SOURCE
3005 rm -f conftest.$ac_objext
3006 if { (eval echo "$as_me:3006: \"$ac_compile\"") >&5
3007 (eval $ac_compile) 2>&5
3009 echo "$as_me:3009: \$? = $ac_status" >&5
3010 (exit $ac_status); } &&
3011 { ac_try='test -s conftest.$ac_objext'
3012 { (eval echo "$as_me:3012: \"$ac_try\"") >&5
3015 echo "$as_me:3015: \$? = $ac_status" >&5
3016 (exit $ac_status); }; }; then
3019 echo "$as_me: failed program was:" >&5
3020 cat conftest.$ac_ext >&5
3021 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3023 rm -f conftest.$ac_objext conftest.$ac_ext
3026 echo "${as_me:-configure}:3026: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3028 CFLAGS="$cf_trim_CFLAGS"
3029 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3031 echo "${as_me:-configure}:3031: testing if the second compile does not leave our definition intact error ..." 1>&5
3033 cat >conftest.$ac_ext <<_ACEOF
3034 #line 3034 "configure"
3035 #include "confdefs.h"
3036 #include <sys/types.h>
3041 #ifndef _POSIX_C_SOURCE
3048 rm -f conftest.$ac_objext
3049 if { (eval echo "$as_me:3049: \"$ac_compile\"") >&5
3050 (eval $ac_compile) 2>&5
3052 echo "$as_me:3052: \$? = $ac_status" >&5
3053 (exit $ac_status); } &&
3054 { ac_try='test -s conftest.$ac_objext'
3055 { (eval echo "$as_me:3055: \"$ac_try\"") >&5
3058 echo "$as_me:3058: \$? = $ac_status" >&5
3059 (exit $ac_status); }; }; then
3062 echo "$as_me: failed program was:" >&5
3063 cat conftest.$ac_ext >&5
3064 cf_cv_posix_c_source=no
3066 rm -f conftest.$ac_objext conftest.$ac_ext
3067 CFLAGS="$cf_save_CFLAGS"
3068 CPPFLAGS="$cf_save_CPPFLAGS"
3071 rm -f conftest.$ac_objext conftest.$ac_ext
3074 echo "$as_me:3074: result: $cf_cv_posix_c_source" >&5
3075 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3077 if test "$cf_cv_posix_c_source" != no ; then
3078 CFLAGS="$cf_trim_CFLAGS"
3079 CPPFLAGS="$cf_trim_CPPFLAGS"
3084 cf_new_extra_cppflags=
3086 for cf_add_cflags in $cf_cv_posix_c_source
3088 case $cf_fix_cppflags in
3090 case $cf_add_cflags in #(vi
3091 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3092 case $cf_add_cflags in
3094 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3096 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3097 && test -z "${cf_tst_cflags}" \
3098 && cf_fix_cppflags=yes
3100 if test $cf_fix_cppflags = yes ; then
3101 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3103 elif test "${cf_tst_cflags}" = "\"'" ; then
3104 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3110 *$cf_add_cflags) #(vi
3113 case $cf_add_cflags in #(vi
3115 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3117 CPPFLAGS=`echo "$CPPFLAGS" | \
3118 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3119 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3123 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3128 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3133 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3135 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3137 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3138 && test -z "${cf_tst_cflags}" \
3139 && cf_fix_cppflags=no
3144 if test -n "$cf_new_cflags" ; then
3146 CFLAGS="$CFLAGS $cf_new_cflags"
3149 if test -n "$cf_new_cppflags" ; then
3151 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3154 if test -n "$cf_new_extra_cppflags" ; then
3156 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3163 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3166 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3167 cf_xopen_source="-D_BSD_SOURCE"
3171 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3174 cf_xopen_source="-D_OSF_SOURCE"
3177 cf_xopen_source="-D_QNX_SOURCE"
3180 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3183 cf_xopen_source="-D__EXTENSIONS__"
3184 cf_cv_xopen_source=broken
3186 sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
3192 echo "$as_me:3192: checking if we should define _XOPEN_SOURCE" >&5
3193 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3194 if test "${cf_cv_xopen_source+set}" = set; then
3195 echo $ECHO_N "(cached) $ECHO_C" >&6
3198 cat >conftest.$ac_ext <<_ACEOF
3199 #line 3199 "configure"
3200 #include "confdefs.h"
3204 #include <sys/types.h>
3210 #ifndef _XOPEN_SOURCE
3217 rm -f conftest.$ac_objext
3218 if { (eval echo "$as_me:3218: \"$ac_compile\"") >&5
3219 (eval $ac_compile) 2>&5
3221 echo "$as_me:3221: \$? = $ac_status" >&5
3222 (exit $ac_status); } &&
3223 { ac_try='test -s conftest.$ac_objext'
3224 { (eval echo "$as_me:3224: \"$ac_try\"") >&5
3227 echo "$as_me:3227: \$? = $ac_status" >&5
3228 (exit $ac_status); }; }; then
3229 cf_cv_xopen_source=no
3231 echo "$as_me: failed program was:" >&5
3232 cat conftest.$ac_ext >&5
3234 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3235 cat >conftest.$ac_ext <<_ACEOF
3236 #line 3236 "configure"
3237 #include "confdefs.h"
3241 #include <sys/types.h>
3247 #ifdef _XOPEN_SOURCE
3254 rm -f conftest.$ac_objext
3255 if { (eval echo "$as_me:3255: \"$ac_compile\"") >&5
3256 (eval $ac_compile) 2>&5
3258 echo "$as_me:3258: \$? = $ac_status" >&5
3259 (exit $ac_status); } &&
3260 { ac_try='test -s conftest.$ac_objext'
3261 { (eval echo "$as_me:3261: \"$ac_try\"") >&5
3264 echo "$as_me:3264: \$? = $ac_status" >&5
3265 (exit $ac_status); }; }; then
3266 cf_cv_xopen_source=no
3268 echo "$as_me: failed program was:" >&5
3269 cat conftest.$ac_ext >&5
3270 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3272 rm -f conftest.$ac_objext conftest.$ac_ext
3276 rm -f conftest.$ac_objext conftest.$ac_ext
3279 echo "$as_me:3279: result: $cf_cv_xopen_source" >&5
3280 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3282 if test "$cf_cv_xopen_source" != no ; then
3284 CFLAGS=`echo "$CFLAGS" | \
3285 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3286 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3288 CPPFLAGS=`echo "$CPPFLAGS" | \
3289 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3290 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3292 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3297 cf_new_extra_cppflags=
3299 for cf_add_cflags in $cf_temp_xopen_source
3301 case $cf_fix_cppflags in
3303 case $cf_add_cflags in #(vi
3304 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3305 case $cf_add_cflags in
3307 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3309 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3310 && test -z "${cf_tst_cflags}" \
3311 && cf_fix_cppflags=yes
3313 if test $cf_fix_cppflags = yes ; then
3314 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3316 elif test "${cf_tst_cflags}" = "\"'" ; then
3317 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3323 *$cf_add_cflags) #(vi
3326 case $cf_add_cflags in #(vi
3328 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3330 CPPFLAGS=`echo "$CPPFLAGS" | \
3331 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3332 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3336 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3341 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3346 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3348 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3350 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3351 && test -z "${cf_tst_cflags}" \
3352 && cf_fix_cppflags=no
3357 if test -n "$cf_new_cflags" ; then
3359 CFLAGS="$CFLAGS $cf_new_cflags"
3362 if test -n "$cf_new_cppflags" ; then
3364 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3367 if test -n "$cf_new_extra_cppflags" ; then
3369 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3374 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3376 cf_save_CFLAGS="$CFLAGS"
3377 cf_save_CPPFLAGS="$CPPFLAGS"
3379 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3380 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3381 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3383 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3384 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3385 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3387 echo "$as_me:3387: checking if we should define _POSIX_C_SOURCE" >&5
3388 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3389 if test "${cf_cv_posix_c_source+set}" = set; then
3390 echo $ECHO_N "(cached) $ECHO_C" >&6
3393 echo "${as_me:-configure}:3393: testing if the symbol is already defined go no further ..." 1>&5
3395 cat >conftest.$ac_ext <<_ACEOF
3396 #line 3396 "configure"
3397 #include "confdefs.h"
3398 #include <sys/types.h>
3403 #ifndef _POSIX_C_SOURCE
3410 rm -f conftest.$ac_objext
3411 if { (eval echo "$as_me:3411: \"$ac_compile\"") >&5
3412 (eval $ac_compile) 2>&5
3414 echo "$as_me:3414: \$? = $ac_status" >&5
3415 (exit $ac_status); } &&
3416 { ac_try='test -s conftest.$ac_objext'
3417 { (eval echo "$as_me:3417: \"$ac_try\"") >&5
3420 echo "$as_me:3420: \$? = $ac_status" >&5
3421 (exit $ac_status); }; }; then
3422 cf_cv_posix_c_source=no
3424 echo "$as_me: failed program was:" >&5
3425 cat conftest.$ac_ext >&5
3426 cf_want_posix_source=no
3427 case .$cf_POSIX_C_SOURCE in #(vi
3429 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3432 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3433 cf_want_posix_source=yes
3436 cf_want_posix_source=yes
3439 if test "$cf_want_posix_source" = yes ; then
3440 cat >conftest.$ac_ext <<_ACEOF
3441 #line 3441 "configure"
3442 #include "confdefs.h"
3443 #include <sys/types.h>
3448 #ifdef _POSIX_SOURCE
3455 rm -f conftest.$ac_objext
3456 if { (eval echo "$as_me:3456: \"$ac_compile\"") >&5
3457 (eval $ac_compile) 2>&5
3459 echo "$as_me:3459: \$? = $ac_status" >&5
3460 (exit $ac_status); } &&
3461 { ac_try='test -s conftest.$ac_objext'
3462 { (eval echo "$as_me:3462: \"$ac_try\"") >&5
3465 echo "$as_me:3465: \$? = $ac_status" >&5
3466 (exit $ac_status); }; }; then
3469 echo "$as_me: failed program was:" >&5
3470 cat conftest.$ac_ext >&5
3471 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3473 rm -f conftest.$ac_objext conftest.$ac_ext
3476 echo "${as_me:-configure}:3476: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3478 CFLAGS="$cf_trim_CFLAGS"
3479 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3481 echo "${as_me:-configure}:3481: testing if the second compile does not leave our definition intact error ..." 1>&5
3483 cat >conftest.$ac_ext <<_ACEOF
3484 #line 3484 "configure"
3485 #include "confdefs.h"
3486 #include <sys/types.h>
3491 #ifndef _POSIX_C_SOURCE
3498 rm -f conftest.$ac_objext
3499 if { (eval echo "$as_me:3499: \"$ac_compile\"") >&5
3500 (eval $ac_compile) 2>&5
3502 echo "$as_me:3502: \$? = $ac_status" >&5
3503 (exit $ac_status); } &&
3504 { ac_try='test -s conftest.$ac_objext'
3505 { (eval echo "$as_me:3505: \"$ac_try\"") >&5
3508 echo "$as_me:3508: \$? = $ac_status" >&5
3509 (exit $ac_status); }; }; then
3512 echo "$as_me: failed program was:" >&5
3513 cat conftest.$ac_ext >&5
3514 cf_cv_posix_c_source=no
3516 rm -f conftest.$ac_objext conftest.$ac_ext
3517 CFLAGS="$cf_save_CFLAGS"
3518 CPPFLAGS="$cf_save_CPPFLAGS"
3521 rm -f conftest.$ac_objext conftest.$ac_ext
3524 echo "$as_me:3524: result: $cf_cv_posix_c_source" >&5
3525 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3527 if test "$cf_cv_posix_c_source" != no ; then
3528 CFLAGS="$cf_trim_CFLAGS"
3529 CPPFLAGS="$cf_trim_CPPFLAGS"
3534 cf_new_extra_cppflags=
3536 for cf_add_cflags in $cf_cv_posix_c_source
3538 case $cf_fix_cppflags in
3540 case $cf_add_cflags in #(vi
3541 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3542 case $cf_add_cflags in
3544 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3546 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3547 && test -z "${cf_tst_cflags}" \
3548 && cf_fix_cppflags=yes
3550 if test $cf_fix_cppflags = yes ; then
3551 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3553 elif test "${cf_tst_cflags}" = "\"'" ; then
3554 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3560 *$cf_add_cflags) #(vi
3563 case $cf_add_cflags in #(vi
3565 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3567 CPPFLAGS=`echo "$CPPFLAGS" | \
3568 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3569 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3573 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3578 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3583 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3585 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3587 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3588 && test -z "${cf_tst_cflags}" \
3589 && cf_fix_cppflags=no
3594 if test -n "$cf_new_cflags" ; then
3596 CFLAGS="$CFLAGS $cf_new_cflags"
3599 if test -n "$cf_new_cppflags" ; then
3601 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3604 if test -n "$cf_new_extra_cppflags" ; then
3606 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3614 if test -n "$cf_xopen_source" ; then
3619 cf_new_extra_cppflags=
3621 for cf_add_cflags in $cf_xopen_source
3623 case $cf_fix_cppflags in
3625 case $cf_add_cflags in #(vi
3626 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3627 case $cf_add_cflags in
3629 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3631 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3632 && test -z "${cf_tst_cflags}" \
3633 && cf_fix_cppflags=yes
3635 if test $cf_fix_cppflags = yes ; then
3636 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3638 elif test "${cf_tst_cflags}" = "\"'" ; then
3639 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3645 *$cf_add_cflags) #(vi
3648 case $cf_add_cflags in #(vi
3650 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3652 CPPFLAGS=`echo "$CPPFLAGS" | \
3653 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3654 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3658 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3663 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3668 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3670 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3672 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3673 && test -z "${cf_tst_cflags}" \
3674 && cf_fix_cppflags=no
3679 if test -n "$cf_new_cflags" ; then
3680 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
3682 echo "${as_me:-configure}:3682: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
3684 CFLAGS="$CFLAGS $cf_new_cflags"
3687 if test -n "$cf_new_cppflags" ; then
3688 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
3690 echo "${as_me:-configure}:3690: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
3692 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3695 if test -n "$cf_new_extra_cppflags" ; then
3696 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
3698 echo "${as_me:-configure}:3698: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
3700 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3705 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
3706 echo "$as_me:3706: checking if _XOPEN_SOURCE really is set" >&5
3707 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
3708 cat >conftest.$ac_ext <<_ACEOF
3709 #line 3709 "configure"
3710 #include "confdefs.h"
3716 #ifndef _XOPEN_SOURCE
3723 rm -f conftest.$ac_objext
3724 if { (eval echo "$as_me:3724: \"$ac_compile\"") >&5
3725 (eval $ac_compile) 2>&5
3727 echo "$as_me:3727: \$? = $ac_status" >&5
3728 (exit $ac_status); } &&
3729 { ac_try='test -s conftest.$ac_objext'
3730 { (eval echo "$as_me:3730: \"$ac_try\"") >&5
3733 echo "$as_me:3733: \$? = $ac_status" >&5
3734 (exit $ac_status); }; }; then
3735 cf_XOPEN_SOURCE_set=yes
3737 echo "$as_me: failed program was:" >&5
3738 cat conftest.$ac_ext >&5
3739 cf_XOPEN_SOURCE_set=no
3741 rm -f conftest.$ac_objext conftest.$ac_ext
3742 echo "$as_me:3742: result: $cf_XOPEN_SOURCE_set" >&5
3743 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
3744 if test $cf_XOPEN_SOURCE_set = yes
3746 cat >conftest.$ac_ext <<_ACEOF
3747 #line 3747 "configure"
3748 #include "confdefs.h"
3754 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
3761 rm -f conftest.$ac_objext
3762 if { (eval echo "$as_me:3762: \"$ac_compile\"") >&5
3763 (eval $ac_compile) 2>&5
3765 echo "$as_me:3765: \$? = $ac_status" >&5
3766 (exit $ac_status); } &&
3767 { ac_try='test -s conftest.$ac_objext'
3768 { (eval echo "$as_me:3768: \"$ac_try\"") >&5
3771 echo "$as_me:3771: \$? = $ac_status" >&5
3772 (exit $ac_status); }; }; then
3773 cf_XOPEN_SOURCE_set_ok=yes
3775 echo "$as_me: failed program was:" >&5
3776 cat conftest.$ac_ext >&5
3777 cf_XOPEN_SOURCE_set_ok=no
3779 rm -f conftest.$ac_objext conftest.$ac_ext
3780 if test $cf_XOPEN_SOURCE_set_ok = no
3782 { echo "$as_me:3782: WARNING: _XOPEN_SOURCE is lower than requested" >&5
3783 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
3787 echo "$as_me:3787: checking if we should define _XOPEN_SOURCE" >&5
3788 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3789 if test "${cf_cv_xopen_source+set}" = set; then
3790 echo $ECHO_N "(cached) $ECHO_C" >&6
3793 cat >conftest.$ac_ext <<_ACEOF
3794 #line 3794 "configure"
3795 #include "confdefs.h"
3799 #include <sys/types.h>
3805 #ifndef _XOPEN_SOURCE
3812 rm -f conftest.$ac_objext
3813 if { (eval echo "$as_me:3813: \"$ac_compile\"") >&5
3814 (eval $ac_compile) 2>&5
3816 echo "$as_me:3816: \$? = $ac_status" >&5
3817 (exit $ac_status); } &&
3818 { ac_try='test -s conftest.$ac_objext'
3819 { (eval echo "$as_me:3819: \"$ac_try\"") >&5
3822 echo "$as_me:3822: \$? = $ac_status" >&5
3823 (exit $ac_status); }; }; then
3824 cf_cv_xopen_source=no
3826 echo "$as_me: failed program was:" >&5
3827 cat conftest.$ac_ext >&5
3829 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3830 cat >conftest.$ac_ext <<_ACEOF
3831 #line 3831 "configure"
3832 #include "confdefs.h"
3836 #include <sys/types.h>
3842 #ifdef _XOPEN_SOURCE
3849 rm -f conftest.$ac_objext
3850 if { (eval echo "$as_me:3850: \"$ac_compile\"") >&5
3851 (eval $ac_compile) 2>&5
3853 echo "$as_me:3853: \$? = $ac_status" >&5
3854 (exit $ac_status); } &&
3855 { ac_try='test -s conftest.$ac_objext'
3856 { (eval echo "$as_me:3856: \"$ac_try\"") >&5
3859 echo "$as_me:3859: \$? = $ac_status" >&5
3860 (exit $ac_status); }; }; then
3861 cf_cv_xopen_source=no
3863 echo "$as_me: failed program was:" >&5
3864 cat conftest.$ac_ext >&5
3865 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3867 rm -f conftest.$ac_objext conftest.$ac_ext
3871 rm -f conftest.$ac_objext conftest.$ac_ext
3874 echo "$as_me:3874: result: $cf_cv_xopen_source" >&5
3875 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3877 if test "$cf_cv_xopen_source" != no ; then
3879 CFLAGS=`echo "$CFLAGS" | \
3880 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3881 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3883 CPPFLAGS=`echo "$CPPFLAGS" | \
3884 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3885 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3887 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3892 cf_new_extra_cppflags=
3894 for cf_add_cflags in $cf_temp_xopen_source
3896 case $cf_fix_cppflags in
3898 case $cf_add_cflags in #(vi
3899 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3900 case $cf_add_cflags in
3902 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3904 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3905 && test -z "${cf_tst_cflags}" \
3906 && cf_fix_cppflags=yes
3908 if test $cf_fix_cppflags = yes ; then
3909 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3911 elif test "${cf_tst_cflags}" = "\"'" ; then
3912 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3918 *$cf_add_cflags) #(vi
3921 case $cf_add_cflags in #(vi
3923 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3925 CPPFLAGS=`echo "$CPPFLAGS" | \
3926 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3927 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3931 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3936 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3941 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3943 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3945 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3946 && test -z "${cf_tst_cflags}" \
3947 && cf_fix_cppflags=no
3952 if test -n "$cf_new_cflags" ; then
3954 CFLAGS="$CFLAGS $cf_new_cflags"
3957 if test -n "$cf_new_cppflags" ; then
3959 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3962 if test -n "$cf_new_extra_cppflags" ; then
3964 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3972 echo "$as_me:3972: checking for signal global datatype" >&5
3973 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
3974 if test "${cf_cv_sig_atomic_t+set}" = set; then
3975 echo $ECHO_N "(cached) $ECHO_C" >&6
3979 "volatile sig_atomic_t" \
3983 cat >conftest.$ac_ext <<_ACEOF
3984 #line 3984 "configure"
3985 #include "confdefs.h"
3987 #include <sys/types.h>
3993 static void handler(int sig)
4000 signal(SIGINT, handler);
4006 rm -f conftest.$ac_objext
4007 if { (eval echo "$as_me:4007: \"$ac_compile\"") >&5
4008 (eval $ac_compile) 2>&5
4010 echo "$as_me:4010: \$? = $ac_status" >&5
4011 (exit $ac_status); } &&
4012 { ac_try='test -s conftest.$ac_objext'
4013 { (eval echo "$as_me:4013: \"$ac_try\"") >&5
4016 echo "$as_me:4016: \$? = $ac_status" >&5
4017 (exit $ac_status); }; }; then
4018 cf_cv_sig_atomic_t=$cf_type
4020 echo "$as_me: failed program was:" >&5
4021 cat conftest.$ac_ext >&5
4022 cf_cv_sig_atomic_t=no
4024 rm -f conftest.$ac_objext conftest.$ac_ext
4025 test "$cf_cv_sig_atomic_t" != no && break
4030 echo "$as_me:4030: result: $cf_cv_sig_atomic_t" >&5
4031 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
4032 test "$cf_cv_sig_atomic_t" != no &&
4033 cat >>confdefs.h <<EOF
4034 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
4037 echo "$as_me:4037: checking if you want to use pkg-config" >&5
4038 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4040 # Check whether --with-pkg-config or --without-pkg-config was given.
4041 if test "${with_pkg_config+set}" = set; then
4042 withval="$with_pkg_config"
4043 cf_pkg_config=$withval
4047 echo "$as_me:4047: result: $cf_pkg_config" >&5
4048 echo "${ECHO_T}$cf_pkg_config" >&6
4050 case $cf_pkg_config in #(vi
4056 if test -n "$ac_tool_prefix"; then
4057 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4058 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4059 echo "$as_me:4059: checking for $ac_word" >&5
4060 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4061 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4062 echo $ECHO_N "(cached) $ECHO_C" >&6
4066 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4069 ac_save_IFS=$IFS; IFS=$ac_path_separator
4071 for ac_dir in $ac_dummy; do
4073 test -z "$ac_dir" && ac_dir=.
4074 if $as_executable_p "$ac_dir/$ac_word"; then
4075 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4076 echo "$as_me:4076: found $ac_dir/$ac_word" >&5
4084 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4086 if test -n "$PKG_CONFIG"; then
4087 echo "$as_me:4087: result: $PKG_CONFIG" >&5
4088 echo "${ECHO_T}$PKG_CONFIG" >&6
4090 echo "$as_me:4090: result: no" >&5
4091 echo "${ECHO_T}no" >&6
4095 if test -z "$ac_cv_path_PKG_CONFIG"; then
4096 ac_pt_PKG_CONFIG=$PKG_CONFIG
4097 # Extract the first word of "pkg-config", so it can be a program name with args.
4098 set dummy pkg-config; ac_word=$2
4099 echo "$as_me:4099: checking for $ac_word" >&5
4100 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4101 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4102 echo $ECHO_N "(cached) $ECHO_C" >&6
4104 case $ac_pt_PKG_CONFIG in
4106 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4109 ac_save_IFS=$IFS; IFS=$ac_path_separator
4111 for ac_dir in $ac_dummy; do
4113 test -z "$ac_dir" && ac_dir=.
4114 if $as_executable_p "$ac_dir/$ac_word"; then
4115 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4116 echo "$as_me:4116: found $ac_dir/$ac_word" >&5
4121 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4125 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4127 if test -n "$ac_pt_PKG_CONFIG"; then
4128 echo "$as_me:4128: result: $ac_pt_PKG_CONFIG" >&5
4129 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4131 echo "$as_me:4131: result: no" >&5
4132 echo "${ECHO_T}no" >&6
4135 PKG_CONFIG=$ac_pt_PKG_CONFIG
4137 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4146 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4147 if test "$PKG_CONFIG" != none ; then
4149 if test "x$prefix" != xNONE; then
4150 cf_path_syntax="$prefix"
4152 cf_path_syntax="$ac_default_prefix"
4155 case ".$PKG_CONFIG" in #(vi
4156 .\$\(*\)*|.\'*\'*) #(vi
4160 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4162 .\${*prefix}*|.\${*dir}*) #(vi
4163 eval PKG_CONFIG="$PKG_CONFIG"
4164 case ".$PKG_CONFIG" in #(vi
4166 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
4171 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
4174 { { echo "$as_me:4174: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4175 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4176 { (exit 1); exit 1; }; }
4182 echo "$as_me:4182: checking if you want to see long compiling messages" >&5
4183 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
4185 # Check whether --enable-echo or --disable-echo was given.
4186 if test "${enable_echo+set}" = set; then
4187 enableval="$enable_echo"
4188 test "$enableval" != no && enableval=yes
4189 if test "$enableval" != "yes" ; then
4192 ECHO_LD='@echo linking $@;'
4193 RULE_CC='@echo compiling $<'
4194 SHOW_CC='@echo compiling $@'
4216 echo "$as_me:4216: result: $enableval" >&5
4217 echo "${ECHO_T}$enableval" >&6
4219 echo "$as_me:4219: checking for ncurses wrap-prefix" >&5
4220 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
4222 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
4223 if test "${with_ncurses_wrap_prefix+set}" = set; then
4224 withval="$with_ncurses_wrap_prefix"
4225 NCURSES_WRAP_PREFIX=$withval
4227 NCURSES_WRAP_PREFIX=_nc_
4229 echo "$as_me:4229: result: $NCURSES_WRAP_PREFIX" >&5
4230 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
4232 echo "$as_me:4232: checking if you want to check for wide-character functions" >&5
4233 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
4235 # Check whether --enable-widec or --disable-widec was given.
4236 if test "${enable_widec+set}" = set; then
4237 enableval="$enable_widec"
4238 test "$enableval" != no && enableval=yes
4239 if test "$enableval" != "yes" ; then
4249 echo "$as_me:4249: result: $cf_enable_widec" >&5
4250 echo "${ECHO_T}$cf_enable_widec" >&6
4252 echo "$as_me:4252: checking for specific curses-directory" >&5
4253 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4255 # Check whether --with-curses-dir or --without-curses-dir was given.
4256 if test "${with_curses_dir+set}" = set; then
4257 withval="$with_curses_dir"
4258 cf_cv_curses_dir=$withval
4262 echo "$as_me:4262: result: $cf_cv_curses_dir" >&5
4263 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4265 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4268 if test "x$prefix" != xNONE; then
4269 cf_path_syntax="$prefix"
4271 cf_path_syntax="$ac_default_prefix"
4274 case ".$withval" in #(vi
4275 .\$\(*\)*|.\'*\'*) #(vi
4279 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4281 .\${*prefix}*|.\${*dir}*) #(vi
4282 eval withval="$withval"
4283 case ".$withval" in #(vi
4285 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4290 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4293 { { echo "$as_me:4293: error: expected a pathname, not \"$withval\"" >&5
4294 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4295 { (exit 1); exit 1; }; }
4299 if test -d "$cf_cv_curses_dir"
4302 if test -n "$cf_cv_curses_dir/include" ; then
4303 for cf_add_incdir in $cf_cv_curses_dir/include
4305 while test $cf_add_incdir != /usr/include
4307 if test -d $cf_add_incdir
4310 if test -n "$CFLAGS$CPPFLAGS" ; then
4311 # a loop is needed to ensure we can add subdirs of existing dirs
4312 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4313 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4314 cf_have_incdir=yes; break
4319 if test "$cf_have_incdir" = no ; then
4320 if test "$cf_add_incdir" = /usr/local/include ; then
4321 if test "$GCC" = yes
4323 cf_save_CPPFLAGS=$CPPFLAGS
4324 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4325 cat >conftest.$ac_ext <<_ACEOF
4326 #line 4326 "configure"
4327 #include "confdefs.h"
4337 rm -f conftest.$ac_objext
4338 if { (eval echo "$as_me:4338: \"$ac_compile\"") >&5
4339 (eval $ac_compile) 2>&5
4341 echo "$as_me:4341: \$? = $ac_status" >&5
4342 (exit $ac_status); } &&
4343 { ac_try='test -s conftest.$ac_objext'
4344 { (eval echo "$as_me:4344: \"$ac_try\"") >&5
4347 echo "$as_me:4347: \$? = $ac_status" >&5
4348 (exit $ac_status); }; }; then
4351 echo "$as_me: failed program was:" >&5
4352 cat conftest.$ac_ext >&5
4355 rm -f conftest.$ac_objext conftest.$ac_ext
4356 CPPFLAGS=$cf_save_CPPFLAGS
4361 if test "$cf_have_incdir" = no ; then
4362 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4364 echo "${as_me:-configure}:4364: testing adding $cf_add_incdir to include-path ..." 1>&5
4366 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4368 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4369 test "$cf_top_incdir" = "$cf_add_incdir" && break
4370 cf_add_incdir="$cf_top_incdir"
4379 if test -n "$cf_cv_curses_dir/lib" ; then
4380 for cf_add_libdir in $cf_cv_curses_dir/lib
4382 if test $cf_add_libdir = /usr/lib ; then
4384 elif test -d $cf_add_libdir
4387 if test -n "$LDFLAGS$LIBS" ; then
4388 # a loop is needed to ensure we can add subdirs of existing dirs
4389 for cf_test_libdir in $LDFLAGS $LIBS ; do
4390 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4391 cf_have_libdir=yes; break
4395 if test "$cf_have_libdir" = no ; then
4396 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4398 echo "${as_me:-configure}:4398: testing adding $cf_add_libdir to library-path ..." 1>&5
4400 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4411 echo "$as_me:4411: checking for specified curses library type" >&5
4412 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
4414 # Check whether --with-ncursesw or --without-ncursesw was given.
4415 if test "${with_ncursesw+set}" = set; then
4416 withval="$with_ncursesw"
4417 cf_cv_screen=ncursesw
4420 # Check whether --with-ncurses or --without-ncurses was given.
4421 if test "${with_ncurses+set}" = set; then
4422 withval="$with_ncurses"
4423 cf_cv_screen=ncurses
4426 # Check whether --with-pdcurses or --without-pdcurses was given.
4427 if test "${with_pdcurses+set}" = set; then
4428 withval="$with_pdcurses"
4429 cf_cv_screen=pdcurses
4432 # Check whether --with-curses-colr or --without-curses-colr was given.
4433 if test "${with_curses_colr+set}" = set; then
4434 withval="$with_curses_colr"
4435 cf_cv_screen=curses_colr
4438 # Check whether --with-curses-5lib or --without-curses-5lib was given.
4439 if test "${with_curses_5lib+set}" = set; then
4440 withval="$with_curses_5lib"
4441 cf_cv_screen=curses_5lib
4448 echo "$as_me:4448: result: $cf_cv_screen" >&5
4449 echo "${ECHO_T}$cf_cv_screen" >&6
4451 case $cf_cv_screen in #(vi
4452 curses|curses_*) #(vi
4454 echo "$as_me:4454: checking for extra include directories" >&5
4455 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
4456 if test "${cf_cv_curses_incdir+set}" = set; then
4457 echo $ECHO_N "(cached) $ECHO_C" >&6
4460 cf_cv_curses_incdir=no
4461 case $host_os in #(vi
4463 if test "x$cf_cv_screen" = "xcurses_colr"
4465 test -d /usr/include/curses_colr && \
4466 cf_cv_curses_incdir="-I/usr/include/curses_colr"
4470 if test "x$cf_cv_screen" = "xcurses_5lib"
4472 test -d /usr/5lib && \
4473 test -d /usr/5include && \
4474 cf_cv_curses_incdir="-I/usr/5include"
4480 echo "$as_me:4480: result: $cf_cv_curses_incdir" >&5
4481 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
4482 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
4484 echo "$as_me:4484: checking if we have identified curses headers" >&5
4485 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4486 if test "${cf_cv_ncurses_header+set}" = set; then
4487 echo $ECHO_N "(cached) $ECHO_C" >&6
4490 cf_cv_ncurses_header=none
4493 curses.h ncurses/ncurses.h ncurses/curses.h
4495 cat >conftest.$ac_ext <<_ACEOF
4496 #line 4496 "configure"
4497 #include "confdefs.h"
4498 #include <${cf_header}>
4502 initscr(); tgoto("?", 0,0)
4507 rm -f conftest.$ac_objext
4508 if { (eval echo "$as_me:4508: \"$ac_compile\"") >&5
4509 (eval $ac_compile) 2>&5
4511 echo "$as_me:4511: \$? = $ac_status" >&5
4512 (exit $ac_status); } &&
4513 { ac_try='test -s conftest.$ac_objext'
4514 { (eval echo "$as_me:4514: \"$ac_try\"") >&5
4517 echo "$as_me:4517: \$? = $ac_status" >&5
4518 (exit $ac_status); }; }; then
4519 cf_cv_ncurses_header=$cf_header; break
4521 echo "$as_me: failed program was:" >&5
4522 cat conftest.$ac_ext >&5
4524 rm -f conftest.$ac_objext conftest.$ac_ext
4528 echo "$as_me:4528: result: $cf_cv_ncurses_header" >&5
4529 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4531 if test "$cf_cv_ncurses_header" = none ; then
4532 { { echo "$as_me:4532: error: No curses header-files found" >&5
4533 echo "$as_me: error: No curses header-files found" >&2;}
4534 { (exit 1); exit 1; }; }
4537 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4539 for ac_header in $cf_cv_ncurses_header
4541 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4542 echo "$as_me:4542: checking for $ac_header" >&5
4543 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4544 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4545 echo $ECHO_N "(cached) $ECHO_C" >&6
4547 cat >conftest.$ac_ext <<_ACEOF
4548 #line 4548 "configure"
4549 #include "confdefs.h"
4550 #include <$ac_header>
4552 if { (eval echo "$as_me:4552: \"$ac_cpp conftest.$ac_ext\"") >&5
4553 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4555 egrep -v '^ *\+' conftest.er1 >conftest.err
4557 cat conftest.err >&5
4558 echo "$as_me:4558: \$? = $ac_status" >&5
4559 (exit $ac_status); } >/dev/null; then
4560 if test -s conftest.err; then
4561 ac_cpp_err=$ac_c_preproc_warn_flag
4568 if test -z "$ac_cpp_err"; then
4569 eval "$as_ac_Header=yes"
4571 echo "$as_me: failed program was:" >&5
4572 cat conftest.$ac_ext >&5
4573 eval "$as_ac_Header=no"
4575 rm -f conftest.err conftest.$ac_ext
4577 echo "$as_me:4577: result: `eval echo '${'$as_ac_Header'}'`" >&5
4578 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4579 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4580 cat >>confdefs.h <<EOF
4581 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4587 echo "$as_me:4587: checking for terminfo header" >&5
4588 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4589 if test "${cf_cv_term_header+set}" = set; then
4590 echo $ECHO_N "(cached) $ECHO_C" >&6
4593 case ${cf_cv_ncurses_header} in #(vi
4594 */ncurses.h|*/ncursesw.h) #(vi
4595 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4598 cf_term_header=term.h
4602 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4604 cat >conftest.$ac_ext <<_ACEOF
4605 #line 4605 "configure"
4606 #include "confdefs.h"
4608 #include <${cf_cv_ncurses_header:-curses.h}>
4614 int x = auto_left_margin
4619 rm -f conftest.$ac_objext
4620 if { (eval echo "$as_me:4620: \"$ac_compile\"") >&5
4621 (eval $ac_compile) 2>&5
4623 echo "$as_me:4623: \$? = $ac_status" >&5
4624 (exit $ac_status); } &&
4625 { ac_try='test -s conftest.$ac_objext'
4626 { (eval echo "$as_me:4626: \"$ac_try\"") >&5
4629 echo "$as_me:4629: \$? = $ac_status" >&5
4630 (exit $ac_status); }; }; then
4632 cf_cv_term_header="$cf_test"
4634 echo "$as_me: failed program was:" >&5
4635 cat conftest.$ac_ext >&5
4637 cf_cv_term_header=unknown
4640 rm -f conftest.$ac_objext conftest.$ac_ext
4641 test "$cf_cv_term_header" != unknown && break
4645 echo "$as_me:4645: result: $cf_cv_term_header" >&5
4646 echo "${ECHO_T}$cf_cv_term_header" >&6
4648 # Set definitions to allow ifdef'ing to accommodate subdirectories
4650 case $cf_cv_term_header in # (vi
4653 cat >>confdefs.h <<\EOF
4654 #define HAVE_TERM_H 1
4660 case $cf_cv_term_header in # (vi
4661 ncurses/term.h) #(vi
4663 cat >>confdefs.h <<\EOF
4664 #define HAVE_NCURSES_TERM_H 1
4670 cat >>confdefs.h <<\EOF
4671 #define HAVE_NCURSESW_TERM_H 1
4677 echo "$as_me:4677: checking for ncurses version" >&5
4678 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
4679 if test "${cf_cv_ncurses_version+set}" = set; then
4680 echo $ECHO_N "(cached) $ECHO_C" >&6
4683 cf_cv_ncurses_version=no
4686 if test "$cross_compiling" = yes; then
4688 # This will not work if the preprocessor splits the line after the
4689 # Autoconf token. The 'unproto' program does that.
4690 cat > conftest.$ac_ext <<EOF
4691 #include <${cf_cv_ncurses_header:-curses.h}>
4693 #ifdef NCURSES_VERSION
4694 Autoconf NCURSES_VERSION
4702 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4703 { (eval echo "$as_me:4703: \"$cf_try\"") >&5
4706 echo "$as_me:4706: \$? = $ac_status" >&5
4707 (exit $ac_status); }
4708 if test -f conftest.out ; then
4709 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4710 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4715 cat >conftest.$ac_ext <<_ACEOF
4716 #line 4716 "configure"
4717 #include "confdefs.h"
4719 #include <${cf_cv_ncurses_header:-curses.h}>
4723 FILE *fp = fopen("$cf_tempfile", "w");
4724 #ifdef NCURSES_VERSION
4725 # ifdef NCURSES_VERSION_PATCH
4726 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
4728 fprintf(fp, "%s\n", NCURSES_VERSION);
4732 fprintf(fp, "old\n");
4737 ${cf_cv_main_return:-return}(0);
4740 rm -f conftest$ac_exeext
4741 if { (eval echo "$as_me:4741: \"$ac_link\"") >&5
4742 (eval $ac_link) 2>&5
4744 echo "$as_me:4744: \$? = $ac_status" >&5
4745 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4746 { (eval echo "$as_me:4746: \"$ac_try\"") >&5
4749 echo "$as_me:4749: \$? = $ac_status" >&5
4750 (exit $ac_status); }; }; then
4752 cf_cv_ncurses_version=`cat $cf_tempfile`
4754 echo "$as_me: program exited with status $ac_status" >&5
4755 echo "$as_me: failed program was:" >&5
4756 cat conftest.$ac_ext >&5
4758 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4763 echo "$as_me:4763: result: $cf_cv_ncurses_version" >&5
4764 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
4765 test "$cf_cv_ncurses_version" = no ||
4766 cat >>confdefs.h <<\EOF
4770 echo "$as_me:4770: checking if we have identified curses libraries" >&5
4771 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
4772 cat >conftest.$ac_ext <<_ACEOF
4773 #line 4773 "configure"
4774 #include "confdefs.h"
4775 #include <${cf_cv_ncurses_header:-curses.h}>
4779 initscr(); tgoto("?", 0,0)
4784 rm -f conftest.$ac_objext conftest$ac_exeext
4785 if { (eval echo "$as_me:4785: \"$ac_link\"") >&5
4786 (eval $ac_link) 2>&5
4788 echo "$as_me:4788: \$? = $ac_status" >&5
4789 (exit $ac_status); } &&
4790 { ac_try='test -s conftest$ac_exeext'
4791 { (eval echo "$as_me:4791: \"$ac_try\"") >&5
4794 echo "$as_me:4794: \$? = $ac_status" >&5
4795 (exit $ac_status); }; }; then
4798 echo "$as_me: failed program was:" >&5
4799 cat conftest.$ac_ext >&5
4802 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4803 echo "$as_me:4803: result: $cf_result" >&5
4804 echo "${ECHO_T}$cf_result" >&6
4806 if test "$cf_result" = no ; then
4807 case $host_os in #(vi
4809 echo "$as_me:4809: checking for tgoto in -lmytinfo" >&5
4810 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
4811 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
4812 echo $ECHO_N "(cached) $ECHO_C" >&6
4814 ac_check_lib_save_LIBS=$LIBS
4815 LIBS="-lmytinfo $LIBS"
4816 cat >conftest.$ac_ext <<_ACEOF
4817 #line 4817 "configure"
4818 #include "confdefs.h"
4820 /* Override any gcc2 internal prototype to avoid an error. */
4824 /* We use char because int might match the return type of a gcc2
4825 builtin and then its argument prototype would still apply. */
4835 rm -f conftest.$ac_objext conftest$ac_exeext
4836 if { (eval echo "$as_me:4836: \"$ac_link\"") >&5
4837 (eval $ac_link) 2>&5
4839 echo "$as_me:4839: \$? = $ac_status" >&5
4840 (exit $ac_status); } &&
4841 { ac_try='test -s conftest$ac_exeext'
4842 { (eval echo "$as_me:4842: \"$ac_try\"") >&5
4845 echo "$as_me:4845: \$? = $ac_status" >&5
4846 (exit $ac_status); }; }; then
4847 ac_cv_lib_mytinfo_tgoto=yes
4849 echo "$as_me: failed program was:" >&5
4850 cat conftest.$ac_ext >&5
4851 ac_cv_lib_mytinfo_tgoto=no
4853 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4854 LIBS=$ac_check_lib_save_LIBS
4856 echo "$as_me:4856: result: $ac_cv_lib_mytinfo_tgoto" >&5
4857 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
4858 if test $ac_cv_lib_mytinfo_tgoto = yes; then
4860 cf_add_libs="-lmytinfo"
4861 # Filter out duplicates - this happens with badly-designed ".pc" files...
4862 for cf_add_1lib in $LIBS
4864 for cf_add_2lib in $cf_add_libs
4866 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4872 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4880 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
4881 # next (1998), and xcurses "newer" (2000). There is no header file for
4882 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
4883 # term.h) for cur_colr
4884 if test "x$cf_cv_screen" = "xcurses_colr"
4886 echo "$as_me:4886: checking for initscr in -lcur_colr" >&5
4887 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
4888 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
4889 echo $ECHO_N "(cached) $ECHO_C" >&6
4891 ac_check_lib_save_LIBS=$LIBS
4892 LIBS="-lcur_colr $LIBS"
4893 cat >conftest.$ac_ext <<_ACEOF
4894 #line 4894 "configure"
4895 #include "confdefs.h"
4897 /* Override any gcc2 internal prototype to avoid an error. */
4901 /* We use char because int might match the return type of a gcc2
4902 builtin and then its argument prototype would still apply. */
4912 rm -f conftest.$ac_objext conftest$ac_exeext
4913 if { (eval echo "$as_me:4913: \"$ac_link\"") >&5
4914 (eval $ac_link) 2>&5
4916 echo "$as_me:4916: \$? = $ac_status" >&5
4917 (exit $ac_status); } &&
4918 { ac_try='test -s conftest$ac_exeext'
4919 { (eval echo "$as_me:4919: \"$ac_try\"") >&5
4922 echo "$as_me:4922: \$? = $ac_status" >&5
4923 (exit $ac_status); }; }; then
4924 ac_cv_lib_cur_colr_initscr=yes
4926 echo "$as_me: failed program was:" >&5
4927 cat conftest.$ac_ext >&5
4928 ac_cv_lib_cur_colr_initscr=no
4930 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4931 LIBS=$ac_check_lib_save_LIBS
4933 echo "$as_me:4933: result: $ac_cv_lib_cur_colr_initscr" >&5
4934 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
4935 if test $ac_cv_lib_cur_colr_initscr = yes; then
4937 cf_add_libs="-lcur_colr"
4938 # Filter out duplicates - this happens with badly-designed ".pc" files...
4939 for cf_add_1lib in $LIBS
4941 for cf_add_2lib in $cf_add_libs
4943 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4949 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4953 ac_cv_func_initscr=yes
4957 echo "$as_me:4957: checking for initscr in -lHcurses" >&5
4958 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
4959 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
4960 echo $ECHO_N "(cached) $ECHO_C" >&6
4962 ac_check_lib_save_LIBS=$LIBS
4963 LIBS="-lHcurses $LIBS"
4964 cat >conftest.$ac_ext <<_ACEOF
4965 #line 4965 "configure"
4966 #include "confdefs.h"
4968 /* Override any gcc2 internal prototype to avoid an error. */
4972 /* We use char because int might match the return type of a gcc2
4973 builtin and then its argument prototype would still apply. */
4983 rm -f conftest.$ac_objext conftest$ac_exeext
4984 if { (eval echo "$as_me:4984: \"$ac_link\"") >&5
4985 (eval $ac_link) 2>&5
4987 echo "$as_me:4987: \$? = $ac_status" >&5
4988 (exit $ac_status); } &&
4989 { ac_try='test -s conftest$ac_exeext'
4990 { (eval echo "$as_me:4990: \"$ac_try\"") >&5
4993 echo "$as_me:4993: \$? = $ac_status" >&5
4994 (exit $ac_status); }; }; then
4995 ac_cv_lib_Hcurses_initscr=yes
4997 echo "$as_me: failed program was:" >&5
4998 cat conftest.$ac_ext >&5
4999 ac_cv_lib_Hcurses_initscr=no
5001 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5002 LIBS=$ac_check_lib_save_LIBS
5004 echo "$as_me:5004: result: $ac_cv_lib_Hcurses_initscr" >&5
5005 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
5006 if test $ac_cv_lib_Hcurses_initscr = yes; then
5008 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
5010 cf_add_libs="-lHcurses"
5011 # Filter out duplicates - this happens with badly-designed ".pc" files...
5012 for cf_add_1lib in $LIBS
5014 for cf_add_2lib in $cf_add_libs
5016 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5022 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5026 CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
5027 ac_cv_func_initscr=yes
5036 case `arch 2>/dev/null` in
5041 if test -n "/lib64" ; then
5042 for cf_add_libdir in /lib64
5044 if test $cf_add_libdir = /usr/lib ; then
5046 elif test -d $cf_add_libdir
5049 if test -n "$LDFLAGS$LIBS" ; then
5050 # a loop is needed to ensure we can add subdirs of existing dirs
5051 for cf_test_libdir in $LDFLAGS $LIBS ; do
5052 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5053 cf_have_libdir=yes; break
5057 if test "$cf_have_libdir" = no ; then
5058 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5060 echo "${as_me:-configure}:5060: testing adding $cf_add_libdir to library-path ..." 1>&5
5062 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5070 if test -n "/lib" ; then
5071 for cf_add_libdir in /lib
5073 if test $cf_add_libdir = /usr/lib ; then
5075 elif test -d $cf_add_libdir
5078 if test -n "$LDFLAGS$LIBS" ; then
5079 # a loop is needed to ensure we can add subdirs of existing dirs
5080 for cf_test_libdir in $LDFLAGS $LIBS ; do
5081 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5082 cf_have_libdir=yes; break
5086 if test "$cf_have_libdir" = no ; then
5087 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5089 echo "${as_me:-configure}:5089: testing adding $cf_add_libdir to library-path ..." 1>&5
5091 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5101 if test -n "/lib" ; then
5102 for cf_add_libdir in /lib
5104 if test $cf_add_libdir = /usr/lib ; then
5106 elif test -d $cf_add_libdir
5109 if test -n "$LDFLAGS$LIBS" ; then
5110 # a loop is needed to ensure we can add subdirs of existing dirs
5111 for cf_test_libdir in $LDFLAGS $LIBS ; do
5112 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5113 cf_have_libdir=yes; break
5117 if test "$cf_have_libdir" = no ; then
5118 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5120 echo "${as_me:-configure}:5120: testing adding $cf_add_libdir to library-path ..." 1>&5
5122 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5132 if test "x$cf_cv_screen" = "xcurses_5lib"
5134 if test -d /usr/5lib ; then
5136 if test -n "/usr/5lib" ; then
5137 for cf_add_libdir in /usr/5lib
5139 if test $cf_add_libdir = /usr/lib ; then
5141 elif test -d $cf_add_libdir
5144 if test -n "$LDFLAGS$LIBS" ; then
5145 # a loop is needed to ensure we can add subdirs of existing dirs
5146 for cf_test_libdir in $LDFLAGS $LIBS ; do
5147 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5148 cf_have_libdir=yes; break
5152 if test "$cf_have_libdir" = no ; then
5153 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5155 echo "${as_me:-configure}:5155: testing adding $cf_add_libdir to library-path ..." 1>&5
5157 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5163 cf_add_libs="-lcurses -ltermcap"
5164 # Filter out duplicates - this happens with badly-designed ".pc" files...
5165 for cf_add_1lib in $LIBS
5167 for cf_add_2lib in $cf_add_libs
5169 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5175 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5181 ac_cv_func_initscr=yes
5185 if test ".$ac_cv_func_initscr" != .yes ; then
5186 cf_save_LIBS="$LIBS"
5188 if test ".${cf_cv_ncurses_version:-no}" != .no
5190 cf_check_list="ncurses curses cursesX"
5192 cf_check_list="cursesX curses ncurses"
5195 # Check for library containing tgoto. Do this before curses library
5196 # because it may be needed to link the test-case for initscr.
5197 if test "x$cf_term_lib" = x
5199 echo "$as_me:5199: checking for tgoto" >&5
5200 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
5201 if test "${ac_cv_func_tgoto+set}" = set; then
5202 echo $ECHO_N "(cached) $ECHO_C" >&6
5204 cat >conftest.$ac_ext <<_ACEOF
5205 #line 5205 "configure"
5206 #include "confdefs.h"
5207 /* System header to define __stub macros and hopefully few prototypes,
5208 which can conflict with char tgoto (); below. */
5210 /* Override any gcc2 internal prototype to avoid an error. */
5214 /* We use char because int might match the return type of a gcc2
5215 builtin and then its argument prototype would still apply. */
5222 /* The GNU C library defines this for functions which it implements
5223 to always fail with ENOSYS. Some functions are actually named
5224 something starting with __ and the normal name is an alias. */
5225 #if defined (__stub_tgoto) || defined (__stub___tgoto)
5228 f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5235 rm -f conftest.$ac_objext conftest$ac_exeext
5236 if { (eval echo "$as_me:5236: \"$ac_link\"") >&5
5237 (eval $ac_link) 2>&5
5239 echo "$as_me:5239: \$? = $ac_status" >&5
5240 (exit $ac_status); } &&
5241 { ac_try='test -s conftest$ac_exeext'
5242 { (eval echo "$as_me:5242: \"$ac_try\"") >&5
5245 echo "$as_me:5245: \$? = $ac_status" >&5
5246 (exit $ac_status); }; }; then
5247 ac_cv_func_tgoto=yes
5249 echo "$as_me: failed program was:" >&5
5250 cat conftest.$ac_ext >&5
5253 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5255 echo "$as_me:5255: result: $ac_cv_func_tgoto" >&5
5256 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
5257 if test $ac_cv_func_tgoto = yes; then
5258 cf_term_lib=predefined
5261 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
5263 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
5264 echo "$as_me:5264: checking for tgoto in -l$cf_term_lib" >&5
5265 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
5266 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5267 echo $ECHO_N "(cached) $ECHO_C" >&6
5269 ac_check_lib_save_LIBS=$LIBS
5270 LIBS="-l$cf_term_lib $LIBS"
5271 cat >conftest.$ac_ext <<_ACEOF
5272 #line 5272 "configure"
5273 #include "confdefs.h"
5275 /* Override any gcc2 internal prototype to avoid an error. */
5279 /* We use char because int might match the return type of a gcc2
5280 builtin and then its argument prototype would still apply. */
5290 rm -f conftest.$ac_objext conftest$ac_exeext
5291 if { (eval echo "$as_me:5291: \"$ac_link\"") >&5
5292 (eval $ac_link) 2>&5
5294 echo "$as_me:5294: \$? = $ac_status" >&5
5295 (exit $ac_status); } &&
5296 { ac_try='test -s conftest$ac_exeext'
5297 { (eval echo "$as_me:5297: \"$ac_try\"") >&5
5300 echo "$as_me:5300: \$? = $ac_status" >&5
5301 (exit $ac_status); }; }; then
5302 eval "$as_ac_Lib=yes"
5304 echo "$as_me: failed program was:" >&5
5305 cat conftest.$ac_ext >&5
5306 eval "$as_ac_Lib=no"
5308 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5309 LIBS=$ac_check_lib_save_LIBS
5311 echo "$as_me:5311: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5312 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5313 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5323 # Check for library containing initscr
5324 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
5325 if test "x$cf_curs_lib" = x
5327 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
5329 as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
5330 echo "$as_me:5330: checking for initscr in -l$cf_curs_lib" >&5
5331 echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
5332 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5333 echo $ECHO_N "(cached) $ECHO_C" >&6
5335 ac_check_lib_save_LIBS=$LIBS
5336 LIBS="-l$cf_curs_lib $LIBS"
5337 cat >conftest.$ac_ext <<_ACEOF
5338 #line 5338 "configure"
5339 #include "confdefs.h"
5341 /* Override any gcc2 internal prototype to avoid an error. */
5345 /* We use char because int might match the return type of a gcc2
5346 builtin and then its argument prototype would still apply. */
5356 rm -f conftest.$ac_objext conftest$ac_exeext
5357 if { (eval echo "$as_me:5357: \"$ac_link\"") >&5
5358 (eval $ac_link) 2>&5
5360 echo "$as_me:5360: \$? = $ac_status" >&5
5361 (exit $ac_status); } &&
5362 { ac_try='test -s conftest$ac_exeext'
5363 { (eval echo "$as_me:5363: \"$ac_try\"") >&5
5366 echo "$as_me:5366: \$? = $ac_status" >&5
5367 (exit $ac_status); }; }; then
5368 eval "$as_ac_Lib=yes"
5370 echo "$as_me: failed program was:" >&5
5371 cat conftest.$ac_ext >&5
5372 eval "$as_ac_Lib=no"
5374 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5375 LIBS=$ac_check_lib_save_LIBS
5377 echo "$as_me:5377: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5378 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5379 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5385 test $cf_curs_lib = unknown && { { echo "$as_me:5385: error: no curses library found" >&5
5386 echo "$as_me: error: no curses library found" >&2;}
5387 { (exit 1); exit 1; }; }
5389 LIBS="-l$cf_curs_lib $cf_save_LIBS"
5390 if test "$cf_term_lib" = unknown ; then
5391 echo "$as_me:5391: checking if we can link with $cf_curs_lib library" >&5
5392 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
5393 cat >conftest.$ac_ext <<_ACEOF
5394 #line 5394 "configure"
5395 #include "confdefs.h"
5396 #include <${cf_cv_ncurses_header:-curses.h}>
5405 rm -f conftest.$ac_objext conftest$ac_exeext
5406 if { (eval echo "$as_me:5406: \"$ac_link\"") >&5
5407 (eval $ac_link) 2>&5
5409 echo "$as_me:5409: \$? = $ac_status" >&5
5410 (exit $ac_status); } &&
5411 { ac_try='test -s conftest$ac_exeext'
5412 { (eval echo "$as_me:5412: \"$ac_try\"") >&5
5415 echo "$as_me:5415: \$? = $ac_status" >&5
5416 (exit $ac_status); }; }; then
5419 echo "$as_me: failed program was:" >&5
5420 cat conftest.$ac_ext >&5
5423 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5424 echo "$as_me:5424: result: $cf_result" >&5
5425 echo "${ECHO_T}$cf_result" >&6
5426 test $cf_result = no && { { echo "$as_me:5426: error: Cannot link curses library" >&5
5427 echo "$as_me: error: Cannot link curses library" >&2;}
5428 { (exit 1); exit 1; }; }
5429 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
5431 elif test "$cf_term_lib" != predefined ; then
5432 echo "$as_me:5432: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
5433 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
5434 cat >conftest.$ac_ext <<_ACEOF
5435 #line 5435 "configure"
5436 #include "confdefs.h"
5437 #include <${cf_cv_ncurses_header:-curses.h}>
5441 initscr(); tgoto((char *)0, 0, 0);
5446 rm -f conftest.$ac_objext conftest$ac_exeext
5447 if { (eval echo "$as_me:5447: \"$ac_link\"") >&5
5448 (eval $ac_link) 2>&5
5450 echo "$as_me:5450: \$? = $ac_status" >&5
5451 (exit $ac_status); } &&
5452 { ac_try='test -s conftest$ac_exeext'
5453 { (eval echo "$as_me:5453: \"$ac_try\"") >&5
5456 echo "$as_me:5456: \$? = $ac_status" >&5
5457 (exit $ac_status); }; }; then
5460 echo "$as_me: failed program was:" >&5
5461 cat conftest.$ac_ext >&5
5463 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
5464 cat >conftest.$ac_ext <<_ACEOF
5465 #line 5465 "configure"
5466 #include "confdefs.h"
5467 #include <${cf_cv_ncurses_header:-curses.h}>
5476 rm -f conftest.$ac_objext conftest$ac_exeext
5477 if { (eval echo "$as_me:5477: \"$ac_link\"") >&5
5478 (eval $ac_link) 2>&5
5480 echo "$as_me:5480: \$? = $ac_status" >&5
5481 (exit $ac_status); } &&
5482 { ac_try='test -s conftest$ac_exeext'
5483 { (eval echo "$as_me:5483: \"$ac_try\"") >&5
5486 echo "$as_me:5486: \$? = $ac_status" >&5
5487 (exit $ac_status); }; }; then
5490 echo "$as_me: failed program was:" >&5
5491 cat conftest.$ac_ext >&5
5494 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5497 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5498 echo "$as_me:5498: result: $cf_result" >&5
5499 echo "${ECHO_T}$cf_result" >&6
5507 cf_ncuconfig_root=ncurses
5509 echo "Looking for ${cf_ncuconfig_root}-config"
5511 if test -n "$ac_tool_prefix"; then
5512 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5514 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5515 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5516 echo "$as_me:5516: checking for $ac_word" >&5
5517 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5518 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5519 echo $ECHO_N "(cached) $ECHO_C" >&6
5521 if test -n "$NCURSES_CONFIG"; then
5522 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5524 ac_save_IFS=$IFS; IFS=$ac_path_separator
5526 for ac_dir in $ac_dummy; do
5528 test -z "$ac_dir" && ac_dir=.
5529 $as_executable_p "$ac_dir/$ac_word" || continue
5530 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5531 echo "$as_me:5531: found $ac_dir/$ac_word" >&5
5537 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5538 if test -n "$NCURSES_CONFIG"; then
5539 echo "$as_me:5539: result: $NCURSES_CONFIG" >&5
5540 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5542 echo "$as_me:5542: result: no" >&5
5543 echo "${ECHO_T}no" >&6
5546 test -n "$NCURSES_CONFIG" && break
5549 if test -z "$NCURSES_CONFIG"; then
5550 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5551 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5553 # Extract the first word of "$ac_prog", so it can be a program name with args.
5554 set dummy $ac_prog; ac_word=$2
5555 echo "$as_me:5555: checking for $ac_word" >&5
5556 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5557 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5558 echo $ECHO_N "(cached) $ECHO_C" >&6
5560 if test -n "$ac_ct_NCURSES_CONFIG"; then
5561 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5563 ac_save_IFS=$IFS; IFS=$ac_path_separator
5565 for ac_dir in $ac_dummy; do
5567 test -z "$ac_dir" && ac_dir=.
5568 $as_executable_p "$ac_dir/$ac_word" || continue
5569 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5570 echo "$as_me:5570: found $ac_dir/$ac_word" >&5
5576 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5577 if test -n "$ac_ct_NCURSES_CONFIG"; then
5578 echo "$as_me:5578: result: $ac_ct_NCURSES_CONFIG" >&5
5579 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5581 echo "$as_me:5581: result: no" >&5
5582 echo "${ECHO_T}no" >&6
5585 test -n "$ac_ct_NCURSES_CONFIG" && break
5587 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5589 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5592 if test "$NCURSES_CONFIG" != none ; then
5594 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
5596 cf_add_libs="`$NCURSES_CONFIG --libs`"
5597 # Filter out duplicates - this happens with badly-designed ".pc" files...
5598 for cf_add_1lib in $LIBS
5600 for cf_add_2lib in $cf_add_libs
5602 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5608 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5612 # even with config script, some packages use no-override for curses.h
5614 echo "$as_me:5614: checking if we have identified curses headers" >&5
5615 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5616 if test "${cf_cv_ncurses_header+set}" = set; then
5617 echo $ECHO_N "(cached) $ECHO_C" >&6
5620 cf_cv_ncurses_header=none
5627 cat >conftest.$ac_ext <<_ACEOF
5628 #line 5628 "configure"
5629 #include "confdefs.h"
5630 #include <${cf_header}>
5634 initscr(); tgoto("?", 0,0)
5639 rm -f conftest.$ac_objext
5640 if { (eval echo "$as_me:5640: \"$ac_compile\"") >&5
5641 (eval $ac_compile) 2>&5
5643 echo "$as_me:5643: \$? = $ac_status" >&5
5644 (exit $ac_status); } &&
5645 { ac_try='test -s conftest.$ac_objext'
5646 { (eval echo "$as_me:5646: \"$ac_try\"") >&5
5649 echo "$as_me:5649: \$? = $ac_status" >&5
5650 (exit $ac_status); }; }; then
5651 cf_cv_ncurses_header=$cf_header; break
5653 echo "$as_me: failed program was:" >&5
5654 cat conftest.$ac_ext >&5
5656 rm -f conftest.$ac_objext conftest.$ac_ext
5660 echo "$as_me:5660: result: $cf_cv_ncurses_header" >&5
5661 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5663 if test "$cf_cv_ncurses_header" = none ; then
5664 { { echo "$as_me:5664: error: No curses header-files found" >&5
5665 echo "$as_me: error: No curses header-files found" >&2;}
5666 { (exit 1); exit 1; }; }
5669 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5671 for ac_header in $cf_cv_ncurses_header
5673 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5674 echo "$as_me:5674: checking for $ac_header" >&5
5675 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5676 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5677 echo $ECHO_N "(cached) $ECHO_C" >&6
5679 cat >conftest.$ac_ext <<_ACEOF
5680 #line 5680 "configure"
5681 #include "confdefs.h"
5682 #include <$ac_header>
5684 if { (eval echo "$as_me:5684: \"$ac_cpp conftest.$ac_ext\"") >&5
5685 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5687 egrep -v '^ *\+' conftest.er1 >conftest.err
5689 cat conftest.err >&5
5690 echo "$as_me:5690: \$? = $ac_status" >&5
5691 (exit $ac_status); } >/dev/null; then
5692 if test -s conftest.err; then
5693 ac_cpp_err=$ac_c_preproc_warn_flag
5700 if test -z "$ac_cpp_err"; then
5701 eval "$as_ac_Header=yes"
5703 echo "$as_me: failed program was:" >&5
5704 cat conftest.$ac_ext >&5
5705 eval "$as_ac_Header=no"
5707 rm -f conftest.err conftest.$ac_ext
5709 echo "$as_me:5709: result: `eval echo '${'$as_ac_Header'}'`" >&5
5710 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5711 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5712 cat >>confdefs.h <<EOF
5713 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5719 cat >>confdefs.h <<\EOF
5723 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5725 cat >>confdefs.h <<EOF
5726 #define $cf_nculib_ROOT 1
5729 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
5733 cf_ncuhdr_root=ncurses
5735 test -n "$cf_cv_curses_dir" && \
5736 test "$cf_cv_curses_dir" != "no" && { \
5738 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5739 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5741 while test $cf_add_incdir != /usr/include
5743 if test -d $cf_add_incdir
5746 if test -n "$CFLAGS$CPPFLAGS" ; then
5747 # a loop is needed to ensure we can add subdirs of existing dirs
5748 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5749 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5750 cf_have_incdir=yes; break
5755 if test "$cf_have_incdir" = no ; then
5756 if test "$cf_add_incdir" = /usr/local/include ; then
5757 if test "$GCC" = yes
5759 cf_save_CPPFLAGS=$CPPFLAGS
5760 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5761 cat >conftest.$ac_ext <<_ACEOF
5762 #line 5762 "configure"
5763 #include "confdefs.h"
5773 rm -f conftest.$ac_objext
5774 if { (eval echo "$as_me:5774: \"$ac_compile\"") >&5
5775 (eval $ac_compile) 2>&5
5777 echo "$as_me:5777: \$? = $ac_status" >&5
5778 (exit $ac_status); } &&
5779 { ac_try='test -s conftest.$ac_objext'
5780 { (eval echo "$as_me:5780: \"$ac_try\"") >&5
5783 echo "$as_me:5783: \$? = $ac_status" >&5
5784 (exit $ac_status); }; }; then
5787 echo "$as_me: failed program was:" >&5
5788 cat conftest.$ac_ext >&5
5791 rm -f conftest.$ac_objext conftest.$ac_ext
5792 CPPFLAGS=$cf_save_CPPFLAGS
5797 if test "$cf_have_incdir" = no ; then
5798 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5800 echo "${as_me:-configure}:5800: testing adding $cf_add_incdir to include-path ..." 1>&5
5802 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5804 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5805 test "$cf_top_incdir" = "$cf_add_incdir" && break
5806 cf_add_incdir="$cf_top_incdir"
5817 echo "$as_me:5817: checking for $cf_ncuhdr_root header in include-path" >&5
5818 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5819 if test "${cf_cv_ncurses_h+set}" = set; then
5820 echo $ECHO_N "(cached) $ECHO_C" >&6
5823 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5824 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
5825 for cf_header in $cf_header_list
5828 cat >conftest.$ac_ext <<_ACEOF
5829 #line 5829 "configure"
5830 #include "confdefs.h"
5832 #include <$cf_header>
5837 #ifdef NCURSES_VERSION
5839 printf("%s\n", NCURSES_VERSION);
5852 rm -f conftest.$ac_objext
5853 if { (eval echo "$as_me:5853: \"$ac_compile\"") >&5
5854 (eval $ac_compile) 2>&5
5856 echo "$as_me:5856: \$? = $ac_status" >&5
5857 (exit $ac_status); } &&
5858 { ac_try='test -s conftest.$ac_objext'
5859 { (eval echo "$as_me:5859: \"$ac_try\"") >&5
5862 echo "$as_me:5862: \$? = $ac_status" >&5
5863 (exit $ac_status); }; }; then
5864 cf_cv_ncurses_h=$cf_header
5867 echo "$as_me: failed program was:" >&5
5868 cat conftest.$ac_ext >&5
5871 rm -f conftest.$ac_objext conftest.$ac_ext
5873 test "$cf_cv_ncurses_h" != no && break
5877 echo "$as_me:5877: result: $cf_cv_ncurses_h" >&5
5878 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5880 if test "$cf_cv_ncurses_h" != no ; then
5881 cf_cv_ncurses_header=$cf_cv_ncurses_h
5884 echo "$as_me:5884: checking for $cf_ncuhdr_root include-path" >&5
5885 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5886 if test "${cf_cv_ncurses_h2+set}" = set; then
5887 echo $ECHO_N "(cached) $ECHO_C" >&6
5890 test -n "$verbose" && echo
5894 # collect the current set of include-directories from compiler flags
5895 cf_header_path_list=""
5896 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5897 for cf_header_path in $CPPFLAGS $CFLAGS
5899 case $cf_header_path in #(vi
5901 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5903 test "x$cf_header_path" != "xNONE" && \
5904 test -d "$cf_header_path" && \
5906 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5907 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5908 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5909 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5910 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5911 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"
5914 cf_header_path_list="$cf_header_path_list $cf_search"
5920 # add the variations for the package we are looking for
5924 test "x/usr" != "x$prefix" && \
5926 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
5927 test -n "$verbose" && echo " ... testing for include-directories under /usr"
5928 test -d /usr/include && cf_search="$cf_search /usr/include"
5929 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
5930 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
5931 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
5932 test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5935 test "x$prefix" != "xNONE" && \
5936 test -d "$prefix" && \
5938 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5939 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5940 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5941 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5942 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5943 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5946 test "x/usr/local" != "x$prefix" && \
5947 test -d "/usr/local" && \
5948 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
5949 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
5950 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
5951 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
5952 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
5953 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
5954 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5957 test "x/opt" != "x$prefix" && \
5959 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
5960 test -n "$verbose" && echo " ... testing for include-directories under /opt"
5961 test -d /opt/include && cf_search="$cf_search /opt/include"
5962 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
5963 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
5964 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
5965 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5968 test "x$HOME" != "x$prefix" && \
5969 test -d "$HOME" && \
5970 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
5971 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
5972 test -d $HOME/include && cf_search="$cf_search $HOME/include"
5973 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
5974 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
5975 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
5976 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5979 test "$includedir" != NONE && \
5980 test "$includedir" != "/usr/include" && \
5981 test -d "$includedir" && {
5982 test -d $includedir && cf_search="$cf_search $includedir"
5983 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5986 test "$oldincludedir" != NONE && \
5987 test "$oldincludedir" != "/usr/include" && \
5988 test -d "$oldincludedir" && {
5989 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5990 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5993 cf_search="$cf_search $cf_header_path_list"
5995 test -n "$verbose" && echo search path $cf_search
5996 cf_save2_CPPFLAGS="$CPPFLAGS"
5997 for cf_incdir in $cf_search
6000 if test -n "$cf_incdir" ; then
6001 for cf_add_incdir in $cf_incdir
6003 while test $cf_add_incdir != /usr/include
6005 if test -d $cf_add_incdir
6008 if test -n "$CFLAGS$CPPFLAGS" ; then
6009 # a loop is needed to ensure we can add subdirs of existing dirs
6010 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6011 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6012 cf_have_incdir=yes; break
6017 if test "$cf_have_incdir" = no ; then
6018 if test "$cf_add_incdir" = /usr/local/include ; then
6019 if test "$GCC" = yes
6021 cf_save_CPPFLAGS=$CPPFLAGS
6022 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6023 cat >conftest.$ac_ext <<_ACEOF
6024 #line 6024 "configure"
6025 #include "confdefs.h"
6035 rm -f conftest.$ac_objext
6036 if { (eval echo "$as_me:6036: \"$ac_compile\"") >&5
6037 (eval $ac_compile) 2>&5
6039 echo "$as_me:6039: \$? = $ac_status" >&5
6040 (exit $ac_status); } &&
6041 { ac_try='test -s conftest.$ac_objext'
6042 { (eval echo "$as_me:6042: \"$ac_try\"") >&5
6045 echo "$as_me:6045: \$? = $ac_status" >&5
6046 (exit $ac_status); }; }; then
6049 echo "$as_me: failed program was:" >&5
6050 cat conftest.$ac_ext >&5
6053 rm -f conftest.$ac_objext conftest.$ac_ext
6054 CPPFLAGS=$cf_save_CPPFLAGS
6059 if test "$cf_have_incdir" = no ; then
6060 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6062 echo "${as_me:-configure}:6062: testing adding $cf_add_incdir to include-path ..." 1>&5
6064 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6066 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6067 test "$cf_top_incdir" = "$cf_add_incdir" && break
6068 cf_add_incdir="$cf_top_incdir"
6082 cat >conftest.$ac_ext <<_ACEOF
6083 #line 6083 "configure"
6084 #include "confdefs.h"
6086 #include <$cf_header>
6091 #ifdef NCURSES_VERSION
6093 printf("%s\n", NCURSES_VERSION);
6106 rm -f conftest.$ac_objext
6107 if { (eval echo "$as_me:6107: \"$ac_compile\"") >&5
6108 (eval $ac_compile) 2>&5
6110 echo "$as_me:6110: \$? = $ac_status" >&5
6111 (exit $ac_status); } &&
6112 { ac_try='test -s conftest.$ac_objext'
6113 { (eval echo "$as_me:6113: \"$ac_try\"") >&5
6116 echo "$as_me:6116: \$? = $ac_status" >&5
6117 (exit $ac_status); }; }; then
6118 cf_cv_ncurses_h2=$cf_header
6121 echo "$as_me: failed program was:" >&5
6122 cat conftest.$ac_ext >&5
6125 rm -f conftest.$ac_objext conftest.$ac_ext
6127 if test "$cf_cv_ncurses_h2" != no ; then
6128 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6129 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
6132 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
6134 CPPFLAGS="$cf_save2_CPPFLAGS"
6135 test "$cf_cv_ncurses_h2" != no && break
6137 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6137: error: not found" >&5
6138 echo "$as_me: error: not found" >&2;}
6139 { (exit 1); exit 1; }; }
6142 echo "$as_me:6142: result: $cf_cv_ncurses_h2" >&5
6143 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6145 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6146 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6147 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6148 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6151 if test -n "$cf_1st_incdir" ; then
6152 for cf_add_incdir in $cf_1st_incdir
6154 while test $cf_add_incdir != /usr/include
6156 if test -d $cf_add_incdir
6159 if test -n "$CFLAGS$CPPFLAGS" ; then
6160 # a loop is needed to ensure we can add subdirs of existing dirs
6161 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6162 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6163 cf_have_incdir=yes; break
6168 if test "$cf_have_incdir" = no ; then
6169 if test "$cf_add_incdir" = /usr/local/include ; then
6170 if test "$GCC" = yes
6172 cf_save_CPPFLAGS=$CPPFLAGS
6173 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6174 cat >conftest.$ac_ext <<_ACEOF
6175 #line 6175 "configure"
6176 #include "confdefs.h"
6186 rm -f conftest.$ac_objext
6187 if { (eval echo "$as_me:6187: \"$ac_compile\"") >&5
6188 (eval $ac_compile) 2>&5
6190 echo "$as_me:6190: \$? = $ac_status" >&5
6191 (exit $ac_status); } &&
6192 { ac_try='test -s conftest.$ac_objext'
6193 { (eval echo "$as_me:6193: \"$ac_try\"") >&5
6196 echo "$as_me:6196: \$? = $ac_status" >&5
6197 (exit $ac_status); }; }; then
6200 echo "$as_me: failed program was:" >&5
6201 cat conftest.$ac_ext >&5
6204 rm -f conftest.$ac_objext conftest.$ac_ext
6205 CPPFLAGS=$cf_save_CPPFLAGS
6210 if test "$cf_have_incdir" = no ; then
6211 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6213 echo "${as_me:-configure}:6213: testing adding $cf_add_incdir to include-path ..." 1>&5
6215 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6217 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6218 test "$cf_top_incdir" = "$cf_add_incdir" && break
6219 cf_add_incdir="$cf_top_incdir"
6230 # Set definitions to allow ifdef'ing for ncurses.h
6232 case $cf_cv_ncurses_header in # (vi
6235 cat >>confdefs.h <<\EOF
6236 #define HAVE_NCURSES_H 1
6242 case $cf_cv_ncurses_header in # (vi
6243 ncurses/curses.h|ncurses/ncurses.h)
6245 cat >>confdefs.h <<\EOF
6246 #define HAVE_NCURSES_NCURSES_H 1
6250 ncursesw/curses.h|ncursesw/ncurses.h)
6252 cat >>confdefs.h <<\EOF
6253 #define HAVE_NCURSESW_NCURSES_H 1
6259 echo "$as_me:6259: checking for terminfo header" >&5
6260 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6261 if test "${cf_cv_term_header+set}" = set; then
6262 echo $ECHO_N "(cached) $ECHO_C" >&6
6265 case ${cf_cv_ncurses_header} in #(vi
6266 */ncurses.h|*/ncursesw.h) #(vi
6267 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6270 cf_term_header=term.h
6274 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6276 cat >conftest.$ac_ext <<_ACEOF
6277 #line 6277 "configure"
6278 #include "confdefs.h"
6280 #include <${cf_cv_ncurses_header:-curses.h}>
6286 int x = auto_left_margin
6291 rm -f conftest.$ac_objext
6292 if { (eval echo "$as_me:6292: \"$ac_compile\"") >&5
6293 (eval $ac_compile) 2>&5
6295 echo "$as_me:6295: \$? = $ac_status" >&5
6296 (exit $ac_status); } &&
6297 { ac_try='test -s conftest.$ac_objext'
6298 { (eval echo "$as_me:6298: \"$ac_try\"") >&5
6301 echo "$as_me:6301: \$? = $ac_status" >&5
6302 (exit $ac_status); }; }; then
6304 cf_cv_term_header="$cf_test"
6306 echo "$as_me: failed program was:" >&5
6307 cat conftest.$ac_ext >&5
6309 cf_cv_term_header=unknown
6312 rm -f conftest.$ac_objext conftest.$ac_ext
6313 test "$cf_cv_term_header" != unknown && break
6317 echo "$as_me:6317: result: $cf_cv_term_header" >&5
6318 echo "${ECHO_T}$cf_cv_term_header" >&6
6320 # Set definitions to allow ifdef'ing to accommodate subdirectories
6322 case $cf_cv_term_header in # (vi
6325 cat >>confdefs.h <<\EOF
6326 #define HAVE_TERM_H 1
6332 case $cf_cv_term_header in # (vi
6333 ncurses/term.h) #(vi
6335 cat >>confdefs.h <<\EOF
6336 #define HAVE_NCURSES_TERM_H 1
6342 cat >>confdefs.h <<\EOF
6343 #define HAVE_NCURSESW_TERM_H 1
6349 # some applications need this, but should check for NCURSES_VERSION
6351 cat >>confdefs.h <<\EOF
6355 echo "$as_me:6355: checking for ncurses version" >&5
6356 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6357 if test "${cf_cv_ncurses_version+set}" = set; then
6358 echo $ECHO_N "(cached) $ECHO_C" >&6
6361 cf_cv_ncurses_version=no
6364 if test "$cross_compiling" = yes; then
6366 # This will not work if the preprocessor splits the line after the
6367 # Autoconf token. The 'unproto' program does that.
6368 cat > conftest.$ac_ext <<EOF
6369 #include <${cf_cv_ncurses_header:-curses.h}>
6371 #ifdef NCURSES_VERSION
6372 Autoconf NCURSES_VERSION
6380 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6381 { (eval echo "$as_me:6381: \"$cf_try\"") >&5
6384 echo "$as_me:6384: \$? = $ac_status" >&5
6385 (exit $ac_status); }
6386 if test -f conftest.out ; then
6387 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6388 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6393 cat >conftest.$ac_ext <<_ACEOF
6394 #line 6394 "configure"
6395 #include "confdefs.h"
6397 #include <${cf_cv_ncurses_header:-curses.h}>
6401 FILE *fp = fopen("$cf_tempfile", "w");
6402 #ifdef NCURSES_VERSION
6403 # ifdef NCURSES_VERSION_PATCH
6404 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6406 fprintf(fp, "%s\n", NCURSES_VERSION);
6410 fprintf(fp, "old\n");
6415 ${cf_cv_main_return:-return}(0);
6418 rm -f conftest$ac_exeext
6419 if { (eval echo "$as_me:6419: \"$ac_link\"") >&5
6420 (eval $ac_link) 2>&5
6422 echo "$as_me:6422: \$? = $ac_status" >&5
6423 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6424 { (eval echo "$as_me:6424: \"$ac_try\"") >&5
6427 echo "$as_me:6427: \$? = $ac_status" >&5
6428 (exit $ac_status); }; }; then
6430 cf_cv_ncurses_version=`cat $cf_tempfile`
6432 echo "$as_me: program exited with status $ac_status" >&5
6433 echo "$as_me: failed program was:" >&5
6434 cat conftest.$ac_ext >&5
6436 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6441 echo "$as_me:6441: result: $cf_cv_ncurses_version" >&5
6442 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6443 test "$cf_cv_ncurses_version" = no ||
6444 cat >>confdefs.h <<\EOF
6448 cf_nculib_root=ncurses
6449 # This works, except for the special case where we find gpm, but
6450 # ncurses is in a nonstandard location via $LIBS, and we really want
6453 cf_ncurses_SAVE="$LIBS"
6454 echo "$as_me:6454: checking for Gpm_Open in -lgpm" >&5
6455 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6456 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6457 echo $ECHO_N "(cached) $ECHO_C" >&6
6459 ac_check_lib_save_LIBS=$LIBS
6461 cat >conftest.$ac_ext <<_ACEOF
6462 #line 6462 "configure"
6463 #include "confdefs.h"
6465 /* Override any gcc2 internal prototype to avoid an error. */
6469 /* We use char because int might match the return type of a gcc2
6470 builtin and then its argument prototype would still apply. */
6480 rm -f conftest.$ac_objext conftest$ac_exeext
6481 if { (eval echo "$as_me:6481: \"$ac_link\"") >&5
6482 (eval $ac_link) 2>&5
6484 echo "$as_me:6484: \$? = $ac_status" >&5
6485 (exit $ac_status); } &&
6486 { ac_try='test -s conftest$ac_exeext'
6487 { (eval echo "$as_me:6487: \"$ac_try\"") >&5
6490 echo "$as_me:6490: \$? = $ac_status" >&5
6491 (exit $ac_status); }; }; then
6492 ac_cv_lib_gpm_Gpm_Open=yes
6494 echo "$as_me: failed program was:" >&5
6495 cat conftest.$ac_ext >&5
6496 ac_cv_lib_gpm_Gpm_Open=no
6498 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6499 LIBS=$ac_check_lib_save_LIBS
6501 echo "$as_me:6501: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6502 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6503 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6504 echo "$as_me:6504: checking for initscr in -lgpm" >&5
6505 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6506 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6507 echo $ECHO_N "(cached) $ECHO_C" >&6
6509 ac_check_lib_save_LIBS=$LIBS
6511 cat >conftest.$ac_ext <<_ACEOF
6512 #line 6512 "configure"
6513 #include "confdefs.h"
6515 /* Override any gcc2 internal prototype to avoid an error. */
6519 /* We use char because int might match the return type of a gcc2
6520 builtin and then its argument prototype would still apply. */
6530 rm -f conftest.$ac_objext conftest$ac_exeext
6531 if { (eval echo "$as_me:6531: \"$ac_link\"") >&5
6532 (eval $ac_link) 2>&5
6534 echo "$as_me:6534: \$? = $ac_status" >&5
6535 (exit $ac_status); } &&
6536 { ac_try='test -s conftest$ac_exeext'
6537 { (eval echo "$as_me:6537: \"$ac_try\"") >&5
6540 echo "$as_me:6540: \$? = $ac_status" >&5
6541 (exit $ac_status); }; }; then
6542 ac_cv_lib_gpm_initscr=yes
6544 echo "$as_me: failed program was:" >&5
6545 cat conftest.$ac_ext >&5
6546 ac_cv_lib_gpm_initscr=no
6548 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6549 LIBS=$ac_check_lib_save_LIBS
6551 echo "$as_me:6551: result: $ac_cv_lib_gpm_initscr" >&5
6552 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6553 if test $ac_cv_lib_gpm_initscr = yes; then
6554 LIBS="$cf_ncurses_SAVE"
6556 cf_ncurses_LIBS="-lgpm"
6561 case $host_os in #(vi
6563 # This is only necessary if you are linking against an obsolete
6564 # version of ncurses (but it should do no harm, since it's static).
6565 if test "$cf_nculib_root" = ncurses ; then
6566 echo "$as_me:6566: checking for tgoto in -lmytinfo" >&5
6567 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6568 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6569 echo $ECHO_N "(cached) $ECHO_C" >&6
6571 ac_check_lib_save_LIBS=$LIBS
6572 LIBS="-lmytinfo $LIBS"
6573 cat >conftest.$ac_ext <<_ACEOF
6574 #line 6574 "configure"
6575 #include "confdefs.h"
6577 /* Override any gcc2 internal prototype to avoid an error. */
6581 /* We use char because int might match the return type of a gcc2
6582 builtin and then its argument prototype would still apply. */
6592 rm -f conftest.$ac_objext conftest$ac_exeext
6593 if { (eval echo "$as_me:6593: \"$ac_link\"") >&5
6594 (eval $ac_link) 2>&5
6596 echo "$as_me:6596: \$? = $ac_status" >&5
6597 (exit $ac_status); } &&
6598 { ac_try='test -s conftest$ac_exeext'
6599 { (eval echo "$as_me:6599: \"$ac_try\"") >&5
6602 echo "$as_me:6602: \$? = $ac_status" >&5
6603 (exit $ac_status); }; }; then
6604 ac_cv_lib_mytinfo_tgoto=yes
6606 echo "$as_me: failed program was:" >&5
6607 cat conftest.$ac_ext >&5
6608 ac_cv_lib_mytinfo_tgoto=no
6610 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6611 LIBS=$ac_check_lib_save_LIBS
6613 echo "$as_me:6613: result: $ac_cv_lib_mytinfo_tgoto" >&5
6614 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6615 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6616 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6623 cf_add_libs="$cf_ncurses_LIBS"
6624 # Filter out duplicates - this happens with badly-designed ".pc" files...
6625 for cf_add_1lib in $LIBS
6627 for cf_add_2lib in $cf_add_libs
6629 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6635 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6639 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
6642 cf_add_libs="-l$cf_nculib_root"
6643 # Filter out duplicates - this happens with badly-designed ".pc" files...
6644 for cf_add_1lib in $LIBS
6646 for cf_add_2lib in $cf_add_libs
6648 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6654 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6660 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
6662 echo "$as_me:6662: checking for initscr" >&5
6663 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6664 if test "${ac_cv_func_initscr+set}" = set; then
6665 echo $ECHO_N "(cached) $ECHO_C" >&6
6667 cat >conftest.$ac_ext <<_ACEOF
6668 #line 6668 "configure"
6669 #include "confdefs.h"
6670 /* System header to define __stub macros and hopefully few prototypes,
6671 which can conflict with char initscr (); below. */
6673 /* Override any gcc2 internal prototype to avoid an error. */
6677 /* We use char because int might match the return type of a gcc2
6678 builtin and then its argument prototype would still apply. */
6685 /* The GNU C library defines this for functions which it implements
6686 to always fail with ENOSYS. Some functions are actually named
6687 something starting with __ and the normal name is an alias. */
6688 #if defined (__stub_initscr) || defined (__stub___initscr)
6691 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6698 rm -f conftest.$ac_objext conftest$ac_exeext
6699 if { (eval echo "$as_me:6699: \"$ac_link\"") >&5
6700 (eval $ac_link) 2>&5
6702 echo "$as_me:6702: \$? = $ac_status" >&5
6703 (exit $ac_status); } &&
6704 { ac_try='test -s conftest$ac_exeext'
6705 { (eval echo "$as_me:6705: \"$ac_try\"") >&5
6708 echo "$as_me:6708: \$? = $ac_status" >&5
6709 (exit $ac_status); }; }; then
6710 ac_cv_func_initscr=yes
6712 echo "$as_me: failed program was:" >&5
6713 cat conftest.$ac_ext >&5
6714 ac_cv_func_initscr=no
6716 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6718 echo "$as_me:6718: result: $ac_cv_func_initscr" >&5
6719 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6720 if test $ac_cv_func_initscr = yes; then
6721 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6724 cf_save_LIBS="$LIBS"
6725 echo "$as_me:6725: checking for initscr in -l$cf_nculib_root" >&5
6726 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6727 LIBS="-l$cf_nculib_root $LIBS"
6728 cat >conftest.$ac_ext <<_ACEOF
6729 #line 6729 "configure"
6730 #include "confdefs.h"
6731 #include <${cf_cv_ncurses_header:-curses.h}>
6740 rm -f conftest.$ac_objext conftest$ac_exeext
6741 if { (eval echo "$as_me:6741: \"$ac_link\"") >&5
6742 (eval $ac_link) 2>&5
6744 echo "$as_me:6744: \$? = $ac_status" >&5
6745 (exit $ac_status); } &&
6746 { ac_try='test -s conftest$ac_exeext'
6747 { (eval echo "$as_me:6747: \"$ac_try\"") >&5
6750 echo "$as_me:6750: \$? = $ac_status" >&5
6751 (exit $ac_status); }; }; then
6752 echo "$as_me:6752: result: yes" >&5
6753 echo "${ECHO_T}yes" >&6
6754 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6757 echo "$as_me: failed program was:" >&5
6758 cat conftest.$ac_ext >&5
6759 echo "$as_me:6759: result: no" >&5
6760 echo "${ECHO_T}no" >&6
6763 cf_library_path_list=""
6764 if test -n "${LDFLAGS}${LIBS}" ; then
6765 for cf_library_path in $LDFLAGS $LIBS
6767 case $cf_library_path in #(vi
6769 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6771 test "x$cf_library_path" != "xNONE" && \
6772 test -d "$cf_library_path" && \
6774 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6775 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6776 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6777 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6778 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6779 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"
6782 cf_library_path_list="$cf_library_path_list $cf_search"
6790 test "x/usr" != "x$prefix" && \
6792 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
6793 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
6794 test -d /usr/lib && cf_search="$cf_search /usr/lib"
6795 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
6796 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
6797 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
6798 test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
6801 test "x$prefix" != "xNONE" && \
6802 test -d "$prefix" && \
6804 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6805 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6806 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6807 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6808 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6809 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6812 test "x/usr/local" != "x$prefix" && \
6813 test -d "/usr/local" && \
6814 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
6815 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
6816 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
6817 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
6818 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
6819 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
6820 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
6823 test "x/opt" != "x$prefix" && \
6825 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
6826 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
6827 test -d /opt/lib && cf_search="$cf_search /opt/lib"
6828 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
6829 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
6830 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
6831 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
6834 test "x$HOME" != "x$prefix" && \
6835 test -d "$HOME" && \
6836 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
6837 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
6838 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
6839 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
6840 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
6841 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
6842 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
6845 cf_search="$cf_library_path_list $cf_search"
6847 for cf_libdir in $cf_search
6849 echo "$as_me:6849: checking for -l$cf_nculib_root in $cf_libdir" >&5
6850 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6851 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6852 cat >conftest.$ac_ext <<_ACEOF
6853 #line 6853 "configure"
6854 #include "confdefs.h"
6855 #include <${cf_cv_ncurses_header:-curses.h}>
6864 rm -f conftest.$ac_objext conftest$ac_exeext
6865 if { (eval echo "$as_me:6865: \"$ac_link\"") >&5
6866 (eval $ac_link) 2>&5
6868 echo "$as_me:6868: \$? = $ac_status" >&5
6869 (exit $ac_status); } &&
6870 { ac_try='test -s 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 echo "$as_me:6876: result: yes" >&5
6877 echo "${ECHO_T}yes" >&6
6878 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6881 echo "$as_me: failed program was:" >&5
6882 cat conftest.$ac_ext >&5
6883 echo "$as_me:6883: result: no" >&5
6884 echo "${ECHO_T}no" >&6
6885 LIBS="$cf_save_LIBS"
6887 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6891 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6895 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
6897 if test $cf_found_library = no ; then
6898 { { echo "$as_me:6898: error: Cannot link $cf_nculib_root library" >&5
6899 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6900 { (exit 1); exit 1; }; }
6905 if test -n "$cf_ncurses_LIBS" ; then
6906 echo "$as_me:6906: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6907 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6908 cf_ncurses_SAVE="$LIBS"
6909 for p in $cf_ncurses_LIBS ; do
6910 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
6911 if test "$q" != "$LIBS" ; then
6915 cat >conftest.$ac_ext <<_ACEOF
6916 #line 6916 "configure"
6917 #include "confdefs.h"
6918 #include <${cf_cv_ncurses_header:-curses.h}>
6922 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6927 rm -f conftest.$ac_objext conftest$ac_exeext
6928 if { (eval echo "$as_me:6928: \"$ac_link\"") >&5
6929 (eval $ac_link) 2>&5
6931 echo "$as_me:6931: \$? = $ac_status" >&5
6932 (exit $ac_status); } &&
6933 { ac_try='test -s conftest$ac_exeext'
6934 { (eval echo "$as_me:6934: \"$ac_try\"") >&5
6937 echo "$as_me:6937: \$? = $ac_status" >&5
6938 (exit $ac_status); }; }; then
6939 echo "$as_me:6939: result: yes" >&5
6940 echo "${ECHO_T}yes" >&6
6942 echo "$as_me: failed program was:" >&5
6943 cat conftest.$ac_ext >&5
6944 echo "$as_me:6944: result: no" >&5
6945 echo "${ECHO_T}no" >&6
6946 LIBS="$cf_ncurses_SAVE"
6948 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6951 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6953 cat >>confdefs.h <<EOF
6954 #define $cf_nculib_ROOT 1
6962 echo "$as_me:6962: checking for multibyte character support" >&5
6963 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6964 if test "${cf_cv_utf8_lib+set}" = set; then
6965 echo $ECHO_N "(cached) $ECHO_C" >&6
6968 cf_save_LIBS="$LIBS"
6969 cat >conftest.$ac_ext <<_ACEOF
6970 #line 6970 "configure"
6971 #include "confdefs.h"
6982 rm -f conftest.$ac_objext conftest$ac_exeext
6983 if { (eval echo "$as_me:6983: \"$ac_link\"") >&5
6984 (eval $ac_link) 2>&5
6986 echo "$as_me:6986: \$? = $ac_status" >&5
6987 (exit $ac_status); } &&
6988 { ac_try='test -s conftest$ac_exeext'
6989 { (eval echo "$as_me:6989: \"$ac_try\"") >&5
6992 echo "$as_me:6992: \$? = $ac_status" >&5
6993 (exit $ac_status); }; }; then
6996 echo "$as_me: failed program was:" >&5
6997 cat conftest.$ac_ext >&5
6999 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7000 # will be set on completion of the AC_TRY_LINK below.
7001 cf_cv_header_path_utf8=
7002 cf_cv_library_path_utf8=
7004 echo "${as_me:-configure}:7004: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7006 cf_save_LIBS="$LIBS"
7008 cat >conftest.$ac_ext <<_ACEOF
7009 #line 7009 "configure"
7010 #include "confdefs.h"
7012 #include <libutf8.h>
7021 rm -f conftest.$ac_objext conftest$ac_exeext
7022 if { (eval echo "$as_me:7022: \"$ac_link\"") >&5
7023 (eval $ac_link) 2>&5
7025 echo "$as_me:7025: \$? = $ac_status" >&5
7026 (exit $ac_status); } &&
7027 { ac_try='test -s conftest$ac_exeext'
7028 { (eval echo "$as_me:7028: \"$ac_try\"") >&5
7031 echo "$as_me:7031: \$? = $ac_status" >&5
7032 (exit $ac_status); }; }; then
7034 cf_cv_find_linkage_utf8=yes
7035 cf_cv_header_path_utf8=/usr/include
7036 cf_cv_library_path_utf8=/usr/lib
7039 echo "$as_me: failed program was:" >&5
7040 cat conftest.$ac_ext >&5
7042 LIBS="-lutf8 $cf_save_LIBS"
7044 cat >conftest.$ac_ext <<_ACEOF
7045 #line 7045 "configure"
7046 #include "confdefs.h"
7048 #include <libutf8.h>
7057 rm -f conftest.$ac_objext conftest$ac_exeext
7058 if { (eval echo "$as_me:7058: \"$ac_link\"") >&5
7059 (eval $ac_link) 2>&5
7061 echo "$as_me:7061: \$? = $ac_status" >&5
7062 (exit $ac_status); } &&
7063 { ac_try='test -s conftest$ac_exeext'
7064 { (eval echo "$as_me:7064: \"$ac_try\"") >&5
7067 echo "$as_me:7067: \$? = $ac_status" >&5
7068 (exit $ac_status); }; }; then
7070 cf_cv_find_linkage_utf8=yes
7071 cf_cv_header_path_utf8=/usr/include
7072 cf_cv_library_path_utf8=/usr/lib
7073 cf_cv_library_file_utf8="-lutf8"
7076 echo "$as_me: failed program was:" >&5
7077 cat conftest.$ac_ext >&5
7079 cf_cv_find_linkage_utf8=no
7080 LIBS="$cf_save_LIBS"
7082 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
7084 echo "${as_me:-configure}:7084: testing find linkage for utf8 library ..." 1>&5
7086 echo "${as_me:-configure}:7086: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7088 cf_save_CPPFLAGS="$CPPFLAGS"
7089 cf_test_CPPFLAGS="$CPPFLAGS"
7093 # collect the current set of include-directories from compiler flags
7094 cf_header_path_list=""
7095 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7096 for cf_header_path in $CPPFLAGS $CFLAGS
7098 case $cf_header_path in #(vi
7100 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7102 test "x$cf_header_path" != "xNONE" && \
7103 test -d "$cf_header_path" && \
7105 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7106 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7107 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
7108 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
7109 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
7110 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7113 cf_header_path_list="$cf_header_path_list $cf_search"
7119 # add the variations for the package we are looking for
7123 test "x/usr" != "x$prefix" && \
7125 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
7126 test -n "$verbose" && echo " ... testing for include-directories under /usr"
7127 test -d /usr/include && cf_search="$cf_search /usr/include"
7128 test -d /usr/include/utf8 && cf_search="$cf_search /usr/include/utf8"
7129 test -d /usr/include/utf8/include && cf_search="$cf_search /usr/include/utf8/include"
7130 test -d /usr/utf8/include && cf_search="$cf_search /usr/utf8/include"
7131 test -d /usr/utf8/include/utf8 && cf_search="$cf_search /usr/utf8/include/utf8"
7134 test "x$prefix" != "xNONE" && \
7135 test -d "$prefix" && \
7137 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7138 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7139 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
7140 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
7141 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
7142 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
7145 test "x/usr/local" != "x$prefix" && \
7146 test -d "/usr/local" && \
7147 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
7148 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
7149 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
7150 test -d /usr/local/include/utf8 && cf_search="$cf_search /usr/local/include/utf8"
7151 test -d /usr/local/include/utf8/include && cf_search="$cf_search /usr/local/include/utf8/include"
7152 test -d /usr/local/utf8/include && cf_search="$cf_search /usr/local/utf8/include"
7153 test -d /usr/local/utf8/include/utf8 && cf_search="$cf_search /usr/local/utf8/include/utf8"
7156 test "x/opt" != "x$prefix" && \
7158 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
7159 test -n "$verbose" && echo " ... testing for include-directories under /opt"
7160 test -d /opt/include && cf_search="$cf_search /opt/include"
7161 test -d /opt/include/utf8 && cf_search="$cf_search /opt/include/utf8"
7162 test -d /opt/include/utf8/include && cf_search="$cf_search /opt/include/utf8/include"
7163 test -d /opt/utf8/include && cf_search="$cf_search /opt/utf8/include"
7164 test -d /opt/utf8/include/utf8 && cf_search="$cf_search /opt/utf8/include/utf8"
7167 test "x$HOME" != "x$prefix" && \
7168 test -d "$HOME" && \
7169 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
7170 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
7171 test -d $HOME/include && cf_search="$cf_search $HOME/include"
7172 test -d $HOME/include/utf8 && cf_search="$cf_search $HOME/include/utf8"
7173 test -d $HOME/include/utf8/include && cf_search="$cf_search $HOME/include/utf8/include"
7174 test -d $HOME/utf8/include && cf_search="$cf_search $HOME/utf8/include"
7175 test -d $HOME/utf8/include/utf8 && cf_search="$cf_search $HOME/utf8/include/utf8"
7178 test "$includedir" != NONE && \
7179 test "$includedir" != "/usr/include" && \
7180 test -d "$includedir" && {
7181 test -d $includedir && cf_search="$cf_search $includedir"
7182 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7185 test "$oldincludedir" != NONE && \
7186 test "$oldincludedir" != "/usr/include" && \
7187 test -d "$oldincludedir" && {
7188 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7189 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7192 cf_search="$cf_search $cf_header_path_list"
7194 for cf_cv_header_path_utf8 in $cf_search
7196 if test -d $cf_cv_header_path_utf8 ; then
7197 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
7199 echo "${as_me:-configure}:7199: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7201 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7202 cat >conftest.$ac_ext <<_ACEOF
7203 #line 7203 "configure"
7204 #include "confdefs.h"
7206 #include <libutf8.h>
7215 rm -f conftest.$ac_objext
7216 if { (eval echo "$as_me:7216: \"$ac_compile\"") >&5
7217 (eval $ac_compile) 2>&5
7219 echo "$as_me:7219: \$? = $ac_status" >&5
7220 (exit $ac_status); } &&
7221 { ac_try='test -s conftest.$ac_objext'
7222 { (eval echo "$as_me:7222: \"$ac_try\"") >&5
7225 echo "$as_me:7225: \$? = $ac_status" >&5
7226 (exit $ac_status); }; }; then
7228 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7230 echo "${as_me:-configure}:7230: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7232 cf_cv_find_linkage_utf8=maybe
7233 cf_test_CPPFLAGS="$CPPFLAGS"
7236 echo "$as_me: failed program was:" >&5
7237 cat conftest.$ac_ext >&5
7239 CPPFLAGS="$cf_save_CPPFLAGS"
7242 rm -f conftest.$ac_objext conftest.$ac_ext
7246 if test "$cf_cv_find_linkage_utf8" = maybe ; then
7248 echo "${as_me:-configure}:7248: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7250 cf_save_LIBS="$LIBS"
7251 cf_save_LDFLAGS="$LDFLAGS"
7253 if test "$cf_cv_find_linkage_utf8" != yes ; then
7256 cf_library_path_list=""
7257 if test -n "${LDFLAGS}${LIBS}" ; then
7258 for cf_library_path in $LDFLAGS $LIBS
7260 case $cf_library_path in #(vi
7262 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7264 test "x$cf_library_path" != "xNONE" && \
7265 test -d "$cf_library_path" && \
7267 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7268 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7269 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
7270 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7271 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
7272 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7275 cf_library_path_list="$cf_library_path_list $cf_search"
7283 test "x/usr" != "x$prefix" && \
7285 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
7286 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
7287 test -d /usr/lib && cf_search="$cf_search /usr/lib"
7288 test -d /usr/lib/utf8 && cf_search="$cf_search /usr/lib/utf8"
7289 test -d /usr/lib/utf8/lib && cf_search="$cf_search /usr/lib/utf8/lib"
7290 test -d /usr/utf8/lib && cf_search="$cf_search /usr/utf8/lib"
7291 test -d /usr/utf8/lib/utf8 && cf_search="$cf_search /usr/utf8/lib/utf8"
7294 test "x$prefix" != "xNONE" && \
7295 test -d "$prefix" && \
7297 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7298 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7299 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
7300 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
7301 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
7302 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
7305 test "x/usr/local" != "x$prefix" && \
7306 test -d "/usr/local" && \
7307 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
7308 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
7309 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
7310 test -d /usr/local/lib/utf8 && cf_search="$cf_search /usr/local/lib/utf8"
7311 test -d /usr/local/lib/utf8/lib && cf_search="$cf_search /usr/local/lib/utf8/lib"
7312 test -d /usr/local/utf8/lib && cf_search="$cf_search /usr/local/utf8/lib"
7313 test -d /usr/local/utf8/lib/utf8 && cf_search="$cf_search /usr/local/utf8/lib/utf8"
7316 test "x/opt" != "x$prefix" && \
7318 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
7319 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
7320 test -d /opt/lib && cf_search="$cf_search /opt/lib"
7321 test -d /opt/lib/utf8 && cf_search="$cf_search /opt/lib/utf8"
7322 test -d /opt/lib/utf8/lib && cf_search="$cf_search /opt/lib/utf8/lib"
7323 test -d /opt/utf8/lib && cf_search="$cf_search /opt/utf8/lib"
7324 test -d /opt/utf8/lib/utf8 && cf_search="$cf_search /opt/utf8/lib/utf8"
7327 test "x$HOME" != "x$prefix" && \
7328 test -d "$HOME" && \
7329 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
7330 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
7331 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
7332 test -d $HOME/lib/utf8 && cf_search="$cf_search $HOME/lib/utf8"
7333 test -d $HOME/lib/utf8/lib && cf_search="$cf_search $HOME/lib/utf8/lib"
7334 test -d $HOME/utf8/lib && cf_search="$cf_search $HOME/utf8/lib"
7335 test -d $HOME/utf8/lib/utf8 && cf_search="$cf_search $HOME/utf8/lib/utf8"
7338 cf_search="$cf_library_path_list $cf_search"
7340 for cf_cv_library_path_utf8 in $cf_search
7342 if test -d $cf_cv_library_path_utf8 ; then
7343 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7345 echo "${as_me:-configure}:7345: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7347 CPPFLAGS="$cf_test_CPPFLAGS"
7348 LIBS="-lutf8 $cf_save_LIBS"
7349 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7350 cat >conftest.$ac_ext <<_ACEOF
7351 #line 7351 "configure"
7352 #include "confdefs.h"
7354 #include <libutf8.h>
7363 rm -f conftest.$ac_objext conftest$ac_exeext
7364 if { (eval echo "$as_me:7364: \"$ac_link\"") >&5
7365 (eval $ac_link) 2>&5
7367 echo "$as_me:7367: \$? = $ac_status" >&5
7368 (exit $ac_status); } &&
7369 { ac_try='test -s conftest$ac_exeext'
7370 { (eval echo "$as_me:7370: \"$ac_try\"") >&5
7373 echo "$as_me:7373: \$? = $ac_status" >&5
7374 (exit $ac_status); }; }; then
7376 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7378 echo "${as_me:-configure}:7378: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7380 cf_cv_find_linkage_utf8=yes
7381 cf_cv_library_file_utf8="-lutf8"
7384 echo "$as_me: failed program was:" >&5
7385 cat conftest.$ac_ext >&5
7387 CPPFLAGS="$cf_save_CPPFLAGS"
7388 LIBS="$cf_save_LIBS"
7389 LDFLAGS="$cf_save_LDFLAGS"
7392 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7395 CPPFLAGS="$cf_save_CPPFLAGS"
7396 LDFLAGS="$cf_save_LDFLAGS"
7400 cf_cv_find_linkage_utf8=no
7404 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7407 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7409 LIBS="$cf_save_LIBS"
7411 if test "$cf_cv_find_linkage_utf8" = yes ; then
7412 cf_cv_utf8_lib=add-on
7418 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7420 echo "$as_me:7420: result: $cf_cv_utf8_lib" >&5
7421 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7423 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7425 if test "$cf_cv_utf8_lib" = "add-on" ; then
7427 cat >>confdefs.h <<\EOF
7428 #define HAVE_LIBUTF8_H 1
7431 if test -n "$cf_cv_header_path_utf8" ; then
7432 for cf_add_incdir in $cf_cv_header_path_utf8
7434 while test $cf_add_incdir != /usr/include
7436 if test -d $cf_add_incdir
7439 if test -n "$CFLAGS$CPPFLAGS" ; then
7440 # a loop is needed to ensure we can add subdirs of existing dirs
7441 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7442 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7443 cf_have_incdir=yes; break
7448 if test "$cf_have_incdir" = no ; then
7449 if test "$cf_add_incdir" = /usr/local/include ; then
7450 if test "$GCC" = yes
7452 cf_save_CPPFLAGS=$CPPFLAGS
7453 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7454 cat >conftest.$ac_ext <<_ACEOF
7455 #line 7455 "configure"
7456 #include "confdefs.h"
7466 rm -f conftest.$ac_objext
7467 if { (eval echo "$as_me:7467: \"$ac_compile\"") >&5
7468 (eval $ac_compile) 2>&5
7470 echo "$as_me:7470: \$? = $ac_status" >&5
7471 (exit $ac_status); } &&
7472 { ac_try='test -s conftest.$ac_objext'
7473 { (eval echo "$as_me:7473: \"$ac_try\"") >&5
7476 echo "$as_me:7476: \$? = $ac_status" >&5
7477 (exit $ac_status); }; }; then
7480 echo "$as_me: failed program was:" >&5
7481 cat conftest.$ac_ext >&5
7484 rm -f conftest.$ac_objext conftest.$ac_ext
7485 CPPFLAGS=$cf_save_CPPFLAGS
7490 if test "$cf_have_incdir" = no ; then
7491 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7493 echo "${as_me:-configure}:7493: testing adding $cf_add_incdir to include-path ..." 1>&5
7495 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7497 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7498 test "$cf_top_incdir" = "$cf_add_incdir" && break
7499 cf_add_incdir="$cf_top_incdir"
7508 if test -n "$cf_cv_library_path_utf8" ; then
7509 for cf_add_libdir in $cf_cv_library_path_utf8
7511 if test $cf_add_libdir = /usr/lib ; then
7513 elif test -d $cf_add_libdir
7516 if test -n "$LDFLAGS$LIBS" ; then
7517 # a loop is needed to ensure we can add subdirs of existing dirs
7518 for cf_test_libdir in $LDFLAGS $LIBS ; do
7519 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7520 cf_have_libdir=yes; break
7524 if test "$cf_have_libdir" = no ; then
7525 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7527 echo "${as_me:-configure}:7527: testing adding $cf_add_libdir to library-path ..." 1>&5
7529 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7535 cf_add_libs="$cf_cv_library_file_utf8"
7536 # Filter out duplicates - this happens with badly-designed ".pc" files...
7537 for cf_add_1lib in $LIBS
7539 for cf_add_2lib in $cf_add_libs
7541 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7547 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7553 cf_ncuconfig_root=ncursesw
7555 echo "Looking for ${cf_ncuconfig_root}-config"
7557 if test -n "$ac_tool_prefix"; then
7558 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7560 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7561 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7562 echo "$as_me:7562: checking for $ac_word" >&5
7563 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7564 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7565 echo $ECHO_N "(cached) $ECHO_C" >&6
7567 if test -n "$NCURSES_CONFIG"; then
7568 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7570 ac_save_IFS=$IFS; IFS=$ac_path_separator
7572 for ac_dir in $ac_dummy; do
7574 test -z "$ac_dir" && ac_dir=.
7575 $as_executable_p "$ac_dir/$ac_word" || continue
7576 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7577 echo "$as_me:7577: found $ac_dir/$ac_word" >&5
7583 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7584 if test -n "$NCURSES_CONFIG"; then
7585 echo "$as_me:7585: result: $NCURSES_CONFIG" >&5
7586 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7588 echo "$as_me:7588: result: no" >&5
7589 echo "${ECHO_T}no" >&6
7592 test -n "$NCURSES_CONFIG" && break
7595 if test -z "$NCURSES_CONFIG"; then
7596 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7597 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7599 # Extract the first word of "$ac_prog", so it can be a program name with args.
7600 set dummy $ac_prog; ac_word=$2
7601 echo "$as_me:7601: checking for $ac_word" >&5
7602 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7603 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7604 echo $ECHO_N "(cached) $ECHO_C" >&6
7606 if test -n "$ac_ct_NCURSES_CONFIG"; then
7607 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7609 ac_save_IFS=$IFS; IFS=$ac_path_separator
7611 for ac_dir in $ac_dummy; do
7613 test -z "$ac_dir" && ac_dir=.
7614 $as_executable_p "$ac_dir/$ac_word" || continue
7615 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7616 echo "$as_me:7616: found $ac_dir/$ac_word" >&5
7622 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7623 if test -n "$ac_ct_NCURSES_CONFIG"; then
7624 echo "$as_me:7624: result: $ac_ct_NCURSES_CONFIG" >&5
7625 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7627 echo "$as_me:7627: result: no" >&5
7628 echo "${ECHO_T}no" >&6
7631 test -n "$ac_ct_NCURSES_CONFIG" && break
7633 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7635 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7638 if test "$NCURSES_CONFIG" != none ; then
7640 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
7642 cf_add_libs="`$NCURSES_CONFIG --libs`"
7643 # Filter out duplicates - this happens with badly-designed ".pc" files...
7644 for cf_add_1lib in $LIBS
7646 for cf_add_2lib in $cf_add_libs
7648 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7654 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7658 # even with config script, some packages use no-override for curses.h
7660 echo "$as_me:7660: checking if we have identified curses headers" >&5
7661 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7662 if test "${cf_cv_ncurses_header+set}" = set; then
7663 echo $ECHO_N "(cached) $ECHO_C" >&6
7666 cf_cv_ncurses_header=none
7668 ncursesw/ncurses.h \
7673 cat >conftest.$ac_ext <<_ACEOF
7674 #line 7674 "configure"
7675 #include "confdefs.h"
7676 #include <${cf_header}>
7680 initscr(); tgoto("?", 0,0)
7685 rm -f conftest.$ac_objext
7686 if { (eval echo "$as_me:7686: \"$ac_compile\"") >&5
7687 (eval $ac_compile) 2>&5
7689 echo "$as_me:7689: \$? = $ac_status" >&5
7690 (exit $ac_status); } &&
7691 { ac_try='test -s conftest.$ac_objext'
7692 { (eval echo "$as_me:7692: \"$ac_try\"") >&5
7695 echo "$as_me:7695: \$? = $ac_status" >&5
7696 (exit $ac_status); }; }; then
7697 cf_cv_ncurses_header=$cf_header; break
7699 echo "$as_me: failed program was:" >&5
7700 cat conftest.$ac_ext >&5
7702 rm -f conftest.$ac_objext conftest.$ac_ext
7706 echo "$as_me:7706: result: $cf_cv_ncurses_header" >&5
7707 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7709 if test "$cf_cv_ncurses_header" = none ; then
7710 { { echo "$as_me:7710: error: No curses header-files found" >&5
7711 echo "$as_me: error: No curses header-files found" >&2;}
7712 { (exit 1); exit 1; }; }
7715 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7717 for ac_header in $cf_cv_ncurses_header
7719 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7720 echo "$as_me:7720: checking for $ac_header" >&5
7721 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7722 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7723 echo $ECHO_N "(cached) $ECHO_C" >&6
7725 cat >conftest.$ac_ext <<_ACEOF
7726 #line 7726 "configure"
7727 #include "confdefs.h"
7728 #include <$ac_header>
7730 if { (eval echo "$as_me:7730: \"$ac_cpp conftest.$ac_ext\"") >&5
7731 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7733 egrep -v '^ *\+' conftest.er1 >conftest.err
7735 cat conftest.err >&5
7736 echo "$as_me:7736: \$? = $ac_status" >&5
7737 (exit $ac_status); } >/dev/null; then
7738 if test -s conftest.err; then
7739 ac_cpp_err=$ac_c_preproc_warn_flag
7746 if test -z "$ac_cpp_err"; then
7747 eval "$as_ac_Header=yes"
7749 echo "$as_me: failed program was:" >&5
7750 cat conftest.$ac_ext >&5
7751 eval "$as_ac_Header=no"
7753 rm -f conftest.err conftest.$ac_ext
7755 echo "$as_me:7755: result: `eval echo '${'$as_ac_Header'}'`" >&5
7756 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7757 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7758 cat >>confdefs.h <<EOF
7759 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7765 cat >>confdefs.h <<\EOF
7769 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7771 cat >>confdefs.h <<EOF
7772 #define $cf_nculib_ROOT 1
7775 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7779 cf_ncuhdr_root=ncursesw
7781 test -n "$cf_cv_curses_dir" && \
7782 test "$cf_cv_curses_dir" != "no" && { \
7784 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7785 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7787 while test $cf_add_incdir != /usr/include
7789 if test -d $cf_add_incdir
7792 if test -n "$CFLAGS$CPPFLAGS" ; then
7793 # a loop is needed to ensure we can add subdirs of existing dirs
7794 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7795 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7796 cf_have_incdir=yes; break
7801 if test "$cf_have_incdir" = no ; then
7802 if test "$cf_add_incdir" = /usr/local/include ; then
7803 if test "$GCC" = yes
7805 cf_save_CPPFLAGS=$CPPFLAGS
7806 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7807 cat >conftest.$ac_ext <<_ACEOF
7808 #line 7808 "configure"
7809 #include "confdefs.h"
7819 rm -f conftest.$ac_objext
7820 if { (eval echo "$as_me:7820: \"$ac_compile\"") >&5
7821 (eval $ac_compile) 2>&5
7823 echo "$as_me:7823: \$? = $ac_status" >&5
7824 (exit $ac_status); } &&
7825 { ac_try='test -s conftest.$ac_objext'
7826 { (eval echo "$as_me:7826: \"$ac_try\"") >&5
7829 echo "$as_me:7829: \$? = $ac_status" >&5
7830 (exit $ac_status); }; }; then
7833 echo "$as_me: failed program was:" >&5
7834 cat conftest.$ac_ext >&5
7837 rm -f conftest.$ac_objext conftest.$ac_ext
7838 CPPFLAGS=$cf_save_CPPFLAGS
7843 if test "$cf_have_incdir" = no ; then
7844 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7846 echo "${as_me:-configure}:7846: testing adding $cf_add_incdir to include-path ..." 1>&5
7848 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7850 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7851 test "$cf_top_incdir" = "$cf_add_incdir" && break
7852 cf_add_incdir="$cf_top_incdir"
7863 echo "$as_me:7863: checking for $cf_ncuhdr_root header in include-path" >&5
7864 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
7865 if test "${cf_cv_ncurses_h+set}" = set; then
7866 echo $ECHO_N "(cached) $ECHO_C" >&6
7869 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
7870 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
7871 for cf_header in $cf_header_list
7874 cat >conftest.$ac_ext <<_ACEOF
7875 #line 7875 "configure"
7876 #include "confdefs.h"
7878 #define _XOPEN_SOURCE_EXTENDED
7879 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
7880 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
7882 #include <$cf_header>
7887 #ifdef NCURSES_VERSION
7893 printf("%s\n", NCURSES_VERSION);
7906 rm -f conftest.$ac_objext
7907 if { (eval echo "$as_me:7907: \"$ac_compile\"") >&5
7908 (eval $ac_compile) 2>&5
7910 echo "$as_me:7910: \$? = $ac_status" >&5
7911 (exit $ac_status); } &&
7912 { ac_try='test -s conftest.$ac_objext'
7913 { (eval echo "$as_me:7913: \"$ac_try\"") >&5
7916 echo "$as_me:7916: \$? = $ac_status" >&5
7917 (exit $ac_status); }; }; then
7918 cf_cv_ncurses_h=$cf_header
7921 echo "$as_me: failed program was:" >&5
7922 cat conftest.$ac_ext >&5
7925 rm -f conftest.$ac_objext conftest.$ac_ext
7927 test "$cf_cv_ncurses_h" != no && break
7931 echo "$as_me:7931: result: $cf_cv_ncurses_h" >&5
7932 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
7934 if test "$cf_cv_ncurses_h" != no ; then
7935 cf_cv_ncurses_header=$cf_cv_ncurses_h
7938 echo "$as_me:7938: checking for $cf_ncuhdr_root include-path" >&5
7939 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
7940 if test "${cf_cv_ncurses_h2+set}" = set; then
7941 echo $ECHO_N "(cached) $ECHO_C" >&6
7944 test -n "$verbose" && echo
7948 # collect the current set of include-directories from compiler flags
7949 cf_header_path_list=""
7950 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7951 for cf_header_path in $CPPFLAGS $CFLAGS
7953 case $cf_header_path in #(vi
7955 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7957 test "x$cf_header_path" != "xNONE" && \
7958 test -d "$cf_header_path" && \
7960 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7961 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7962 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
7963 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
7964 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
7965 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"
7968 cf_header_path_list="$cf_header_path_list $cf_search"
7974 # add the variations for the package we are looking for
7978 test "x/usr" != "x$prefix" && \
7980 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
7981 test -n "$verbose" && echo " ... testing for include-directories under /usr"
7982 test -d /usr/include && cf_search="$cf_search /usr/include"
7983 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
7984 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
7985 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
7986 test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7989 test "x$prefix" != "xNONE" && \
7990 test -d "$prefix" && \
7992 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7993 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7994 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
7995 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
7996 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
7997 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8000 test "x/usr/local" != "x$prefix" && \
8001 test -d "/usr/local" && \
8002 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
8003 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
8004 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
8005 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
8006 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
8007 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
8008 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8011 test "x/opt" != "x$prefix" && \
8013 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
8014 test -n "$verbose" && echo " ... testing for include-directories under /opt"
8015 test -d /opt/include && cf_search="$cf_search /opt/include"
8016 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
8017 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
8018 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
8019 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8022 test "x$HOME" != "x$prefix" && \
8023 test -d "$HOME" && \
8024 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
8025 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
8026 test -d $HOME/include && cf_search="$cf_search $HOME/include"
8027 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
8028 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
8029 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
8030 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8033 test "$includedir" != NONE && \
8034 test "$includedir" != "/usr/include" && \
8035 test -d "$includedir" && {
8036 test -d $includedir && cf_search="$cf_search $includedir"
8037 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8040 test "$oldincludedir" != NONE && \
8041 test "$oldincludedir" != "/usr/include" && \
8042 test -d "$oldincludedir" && {
8043 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8044 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8047 cf_search="$cf_search $cf_header_path_list"
8049 test -n "$verbose" && echo search path $cf_search
8050 cf_save2_CPPFLAGS="$CPPFLAGS"
8051 for cf_incdir in $cf_search
8054 if test -n "$cf_incdir" ; then
8055 for cf_add_incdir in $cf_incdir
8057 while test $cf_add_incdir != /usr/include
8059 if test -d $cf_add_incdir
8062 if test -n "$CFLAGS$CPPFLAGS" ; then
8063 # a loop is needed to ensure we can add subdirs of existing dirs
8064 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8065 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8066 cf_have_incdir=yes; break
8071 if test "$cf_have_incdir" = no ; then
8072 if test "$cf_add_incdir" = /usr/local/include ; then
8073 if test "$GCC" = yes
8075 cf_save_CPPFLAGS=$CPPFLAGS
8076 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8077 cat >conftest.$ac_ext <<_ACEOF
8078 #line 8078 "configure"
8079 #include "confdefs.h"
8089 rm -f conftest.$ac_objext
8090 if { (eval echo "$as_me:8090: \"$ac_compile\"") >&5
8091 (eval $ac_compile) 2>&5
8093 echo "$as_me:8093: \$? = $ac_status" >&5
8094 (exit $ac_status); } &&
8095 { ac_try='test -s conftest.$ac_objext'
8096 { (eval echo "$as_me:8096: \"$ac_try\"") >&5
8099 echo "$as_me:8099: \$? = $ac_status" >&5
8100 (exit $ac_status); }; }; then
8103 echo "$as_me: failed program was:" >&5
8104 cat conftest.$ac_ext >&5
8107 rm -f conftest.$ac_objext conftest.$ac_ext
8108 CPPFLAGS=$cf_save_CPPFLAGS
8113 if test "$cf_have_incdir" = no ; then
8114 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8116 echo "${as_me:-configure}:8116: testing adding $cf_add_incdir to include-path ..." 1>&5
8118 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8120 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8121 test "$cf_top_incdir" = "$cf_add_incdir" && break
8122 cf_add_incdir="$cf_top_incdir"
8136 cat >conftest.$ac_ext <<_ACEOF
8137 #line 8137 "configure"
8138 #include "confdefs.h"
8140 #include <$cf_header>
8145 #ifdef NCURSES_VERSION
8147 printf("%s\n", NCURSES_VERSION);
8160 rm -f conftest.$ac_objext
8161 if { (eval echo "$as_me:8161: \"$ac_compile\"") >&5
8162 (eval $ac_compile) 2>&5
8164 echo "$as_me:8164: \$? = $ac_status" >&5
8165 (exit $ac_status); } &&
8166 { ac_try='test -s conftest.$ac_objext'
8167 { (eval echo "$as_me:8167: \"$ac_try\"") >&5
8170 echo "$as_me:8170: \$? = $ac_status" >&5
8171 (exit $ac_status); }; }; then
8172 cf_cv_ncurses_h2=$cf_header
8175 echo "$as_me: failed program was:" >&5
8176 cat conftest.$ac_ext >&5
8179 rm -f conftest.$ac_objext conftest.$ac_ext
8181 if test "$cf_cv_ncurses_h2" != no ; then
8182 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8183 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8186 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8188 CPPFLAGS="$cf_save2_CPPFLAGS"
8189 test "$cf_cv_ncurses_h2" != no && break
8191 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8191: error: not found" >&5
8192 echo "$as_me: error: not found" >&2;}
8193 { (exit 1); exit 1; }; }
8196 echo "$as_me:8196: result: $cf_cv_ncurses_h2" >&5
8197 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8199 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8200 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8201 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8202 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8205 if test -n "$cf_1st_incdir" ; then
8206 for cf_add_incdir in $cf_1st_incdir
8208 while test $cf_add_incdir != /usr/include
8210 if test -d $cf_add_incdir
8213 if test -n "$CFLAGS$CPPFLAGS" ; then
8214 # a loop is needed to ensure we can add subdirs of existing dirs
8215 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8216 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8217 cf_have_incdir=yes; break
8222 if test "$cf_have_incdir" = no ; then
8223 if test "$cf_add_incdir" = /usr/local/include ; then
8224 if test "$GCC" = yes
8226 cf_save_CPPFLAGS=$CPPFLAGS
8227 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8228 cat >conftest.$ac_ext <<_ACEOF
8229 #line 8229 "configure"
8230 #include "confdefs.h"
8240 rm -f conftest.$ac_objext
8241 if { (eval echo "$as_me:8241: \"$ac_compile\"") >&5
8242 (eval $ac_compile) 2>&5
8244 echo "$as_me:8244: \$? = $ac_status" >&5
8245 (exit $ac_status); } &&
8246 { ac_try='test -s conftest.$ac_objext'
8247 { (eval echo "$as_me:8247: \"$ac_try\"") >&5
8250 echo "$as_me:8250: \$? = $ac_status" >&5
8251 (exit $ac_status); }; }; then
8254 echo "$as_me: failed program was:" >&5
8255 cat conftest.$ac_ext >&5
8258 rm -f conftest.$ac_objext conftest.$ac_ext
8259 CPPFLAGS=$cf_save_CPPFLAGS
8264 if test "$cf_have_incdir" = no ; then
8265 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8267 echo "${as_me:-configure}:8267: testing adding $cf_add_incdir to include-path ..." 1>&5
8269 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8271 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8272 test "$cf_top_incdir" = "$cf_add_incdir" && break
8273 cf_add_incdir="$cf_top_incdir"
8284 # Set definitions to allow ifdef'ing for ncurses.h
8286 case $cf_cv_ncurses_header in # (vi
8289 cat >>confdefs.h <<\EOF
8290 #define HAVE_NCURSES_H 1
8296 case $cf_cv_ncurses_header in # (vi
8297 ncurses/curses.h|ncurses/ncurses.h)
8299 cat >>confdefs.h <<\EOF
8300 #define HAVE_NCURSES_NCURSES_H 1
8304 ncursesw/curses.h|ncursesw/ncurses.h)
8306 cat >>confdefs.h <<\EOF
8307 #define HAVE_NCURSESW_NCURSES_H 1
8313 echo "$as_me:8313: checking for terminfo header" >&5
8314 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8315 if test "${cf_cv_term_header+set}" = set; then
8316 echo $ECHO_N "(cached) $ECHO_C" >&6
8319 case ${cf_cv_ncurses_header} in #(vi
8320 */ncurses.h|*/ncursesw.h) #(vi
8321 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8324 cf_term_header=term.h
8328 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8330 cat >conftest.$ac_ext <<_ACEOF
8331 #line 8331 "configure"
8332 #include "confdefs.h"
8334 #include <${cf_cv_ncurses_header:-curses.h}>
8340 int x = auto_left_margin
8345 rm -f conftest.$ac_objext
8346 if { (eval echo "$as_me:8346: \"$ac_compile\"") >&5
8347 (eval $ac_compile) 2>&5
8349 echo "$as_me:8349: \$? = $ac_status" >&5
8350 (exit $ac_status); } &&
8351 { ac_try='test -s conftest.$ac_objext'
8352 { (eval echo "$as_me:8352: \"$ac_try\"") >&5
8355 echo "$as_me:8355: \$? = $ac_status" >&5
8356 (exit $ac_status); }; }; then
8358 cf_cv_term_header="$cf_test"
8360 echo "$as_me: failed program was:" >&5
8361 cat conftest.$ac_ext >&5
8363 cf_cv_term_header=unknown
8366 rm -f conftest.$ac_objext conftest.$ac_ext
8367 test "$cf_cv_term_header" != unknown && break
8371 echo "$as_me:8371: result: $cf_cv_term_header" >&5
8372 echo "${ECHO_T}$cf_cv_term_header" >&6
8374 # Set definitions to allow ifdef'ing to accommodate subdirectories
8376 case $cf_cv_term_header in # (vi
8379 cat >>confdefs.h <<\EOF
8380 #define HAVE_TERM_H 1
8386 case $cf_cv_term_header in # (vi
8387 ncurses/term.h) #(vi
8389 cat >>confdefs.h <<\EOF
8390 #define HAVE_NCURSES_TERM_H 1
8396 cat >>confdefs.h <<\EOF
8397 #define HAVE_NCURSESW_TERM_H 1
8403 # some applications need this, but should check for NCURSES_VERSION
8405 cat >>confdefs.h <<\EOF
8409 echo "$as_me:8409: checking for ncurses version" >&5
8410 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8411 if test "${cf_cv_ncurses_version+set}" = set; then
8412 echo $ECHO_N "(cached) $ECHO_C" >&6
8415 cf_cv_ncurses_version=no
8418 if test "$cross_compiling" = yes; then
8420 # This will not work if the preprocessor splits the line after the
8421 # Autoconf token. The 'unproto' program does that.
8422 cat > conftest.$ac_ext <<EOF
8423 #include <${cf_cv_ncurses_header:-curses.h}>
8425 #ifdef NCURSES_VERSION
8426 Autoconf NCURSES_VERSION
8434 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8435 { (eval echo "$as_me:8435: \"$cf_try\"") >&5
8438 echo "$as_me:8438: \$? = $ac_status" >&5
8439 (exit $ac_status); }
8440 if test -f conftest.out ; then
8441 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8442 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8447 cat >conftest.$ac_ext <<_ACEOF
8448 #line 8448 "configure"
8449 #include "confdefs.h"
8451 #include <${cf_cv_ncurses_header:-curses.h}>
8455 FILE *fp = fopen("$cf_tempfile", "w");
8456 #ifdef NCURSES_VERSION
8457 # ifdef NCURSES_VERSION_PATCH
8458 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8460 fprintf(fp, "%s\n", NCURSES_VERSION);
8464 fprintf(fp, "old\n");
8469 ${cf_cv_main_return:-return}(0);
8472 rm -f 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); } && { ac_try='./conftest$ac_exeext'
8478 { (eval echo "$as_me:8478: \"$ac_try\"") >&5
8481 echo "$as_me:8481: \$? = $ac_status" >&5
8482 (exit $ac_status); }; }; then
8484 cf_cv_ncurses_version=`cat $cf_tempfile`
8486 echo "$as_me: program exited with status $ac_status" >&5
8487 echo "$as_me: failed program was:" >&5
8488 cat conftest.$ac_ext >&5
8490 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8495 echo "$as_me:8495: result: $cf_cv_ncurses_version" >&5
8496 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8497 test "$cf_cv_ncurses_version" = no ||
8498 cat >>confdefs.h <<\EOF
8502 cf_nculib_root=ncursesw
8503 # This works, except for the special case where we find gpm, but
8504 # ncurses is in a nonstandard location via $LIBS, and we really want
8507 cf_ncurses_SAVE="$LIBS"
8508 echo "$as_me:8508: checking for Gpm_Open in -lgpm" >&5
8509 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8510 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8511 echo $ECHO_N "(cached) $ECHO_C" >&6
8513 ac_check_lib_save_LIBS=$LIBS
8515 cat >conftest.$ac_ext <<_ACEOF
8516 #line 8516 "configure"
8517 #include "confdefs.h"
8519 /* Override any gcc2 internal prototype to avoid an error. */
8523 /* We use char because int might match the return type of a gcc2
8524 builtin and then its argument prototype would still apply. */
8534 rm -f conftest.$ac_objext conftest$ac_exeext
8535 if { (eval echo "$as_me:8535: \"$ac_link\"") >&5
8536 (eval $ac_link) 2>&5
8538 echo "$as_me:8538: \$? = $ac_status" >&5
8539 (exit $ac_status); } &&
8540 { ac_try='test -s conftest$ac_exeext'
8541 { (eval echo "$as_me:8541: \"$ac_try\"") >&5
8544 echo "$as_me:8544: \$? = $ac_status" >&5
8545 (exit $ac_status); }; }; then
8546 ac_cv_lib_gpm_Gpm_Open=yes
8548 echo "$as_me: failed program was:" >&5
8549 cat conftest.$ac_ext >&5
8550 ac_cv_lib_gpm_Gpm_Open=no
8552 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8553 LIBS=$ac_check_lib_save_LIBS
8555 echo "$as_me:8555: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8556 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8557 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8558 echo "$as_me:8558: checking for initscr in -lgpm" >&5
8559 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8560 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8561 echo $ECHO_N "(cached) $ECHO_C" >&6
8563 ac_check_lib_save_LIBS=$LIBS
8565 cat >conftest.$ac_ext <<_ACEOF
8566 #line 8566 "configure"
8567 #include "confdefs.h"
8569 /* Override any gcc2 internal prototype to avoid an error. */
8573 /* We use char because int might match the return type of a gcc2
8574 builtin and then its argument prototype would still apply. */
8584 rm -f conftest.$ac_objext conftest$ac_exeext
8585 if { (eval echo "$as_me:8585: \"$ac_link\"") >&5
8586 (eval $ac_link) 2>&5
8588 echo "$as_me:8588: \$? = $ac_status" >&5
8589 (exit $ac_status); } &&
8590 { ac_try='test -s conftest$ac_exeext'
8591 { (eval echo "$as_me:8591: \"$ac_try\"") >&5
8594 echo "$as_me:8594: \$? = $ac_status" >&5
8595 (exit $ac_status); }; }; then
8596 ac_cv_lib_gpm_initscr=yes
8598 echo "$as_me: failed program was:" >&5
8599 cat conftest.$ac_ext >&5
8600 ac_cv_lib_gpm_initscr=no
8602 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8603 LIBS=$ac_check_lib_save_LIBS
8605 echo "$as_me:8605: result: $ac_cv_lib_gpm_initscr" >&5
8606 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8607 if test $ac_cv_lib_gpm_initscr = yes; then
8608 LIBS="$cf_ncurses_SAVE"
8610 cf_ncurses_LIBS="-lgpm"
8615 case $host_os in #(vi
8617 # This is only necessary if you are linking against an obsolete
8618 # version of ncurses (but it should do no harm, since it's static).
8619 if test "$cf_nculib_root" = ncurses ; then
8620 echo "$as_me:8620: checking for tgoto in -lmytinfo" >&5
8621 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8622 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8623 echo $ECHO_N "(cached) $ECHO_C" >&6
8625 ac_check_lib_save_LIBS=$LIBS
8626 LIBS="-lmytinfo $LIBS"
8627 cat >conftest.$ac_ext <<_ACEOF
8628 #line 8628 "configure"
8629 #include "confdefs.h"
8631 /* Override any gcc2 internal prototype to avoid an error. */
8635 /* We use char because int might match the return type of a gcc2
8636 builtin and then its argument prototype would still apply. */
8646 rm -f conftest.$ac_objext conftest$ac_exeext
8647 if { (eval echo "$as_me:8647: \"$ac_link\"") >&5
8648 (eval $ac_link) 2>&5
8650 echo "$as_me:8650: \$? = $ac_status" >&5
8651 (exit $ac_status); } &&
8652 { ac_try='test -s conftest$ac_exeext'
8653 { (eval echo "$as_me:8653: \"$ac_try\"") >&5
8656 echo "$as_me:8656: \$? = $ac_status" >&5
8657 (exit $ac_status); }; }; then
8658 ac_cv_lib_mytinfo_tgoto=yes
8660 echo "$as_me: failed program was:" >&5
8661 cat conftest.$ac_ext >&5
8662 ac_cv_lib_mytinfo_tgoto=no
8664 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8665 LIBS=$ac_check_lib_save_LIBS
8667 echo "$as_me:8667: result: $ac_cv_lib_mytinfo_tgoto" >&5
8668 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8669 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8670 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8677 cf_add_libs="$cf_ncurses_LIBS"
8678 # Filter out duplicates - this happens with badly-designed ".pc" files...
8679 for cf_add_1lib in $LIBS
8681 for cf_add_2lib in $cf_add_libs
8683 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8689 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8693 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8696 cf_add_libs="-l$cf_nculib_root"
8697 # Filter out duplicates - this happens with badly-designed ".pc" files...
8698 for cf_add_1lib in $LIBS
8700 for cf_add_2lib in $cf_add_libs
8702 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8708 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8714 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
8716 echo "$as_me:8716: checking for initscr" >&5
8717 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8718 if test "${ac_cv_func_initscr+set}" = set; then
8719 echo $ECHO_N "(cached) $ECHO_C" >&6
8721 cat >conftest.$ac_ext <<_ACEOF
8722 #line 8722 "configure"
8723 #include "confdefs.h"
8724 /* System header to define __stub macros and hopefully few prototypes,
8725 which can conflict with char initscr (); below. */
8727 /* Override any gcc2 internal prototype to avoid an error. */
8731 /* We use char because int might match the return type of a gcc2
8732 builtin and then its argument prototype would still apply. */
8739 /* The GNU C library defines this for functions which it implements
8740 to always fail with ENOSYS. Some functions are actually named
8741 something starting with __ and the normal name is an alias. */
8742 #if defined (__stub_initscr) || defined (__stub___initscr)
8745 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8752 rm -f conftest.$ac_objext conftest$ac_exeext
8753 if { (eval echo "$as_me:8753: \"$ac_link\"") >&5
8754 (eval $ac_link) 2>&5
8756 echo "$as_me:8756: \$? = $ac_status" >&5
8757 (exit $ac_status); } &&
8758 { ac_try='test -s conftest$ac_exeext'
8759 { (eval echo "$as_me:8759: \"$ac_try\"") >&5
8762 echo "$as_me:8762: \$? = $ac_status" >&5
8763 (exit $ac_status); }; }; then
8764 ac_cv_func_initscr=yes
8766 echo "$as_me: failed program was:" >&5
8767 cat conftest.$ac_ext >&5
8768 ac_cv_func_initscr=no
8770 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8772 echo "$as_me:8772: result: $ac_cv_func_initscr" >&5
8773 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8774 if test $ac_cv_func_initscr = yes; then
8775 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8778 cf_save_LIBS="$LIBS"
8779 echo "$as_me:8779: checking for initscr in -l$cf_nculib_root" >&5
8780 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8781 LIBS="-l$cf_nculib_root $LIBS"
8782 cat >conftest.$ac_ext <<_ACEOF
8783 #line 8783 "configure"
8784 #include "confdefs.h"
8785 #include <${cf_cv_ncurses_header:-curses.h}>
8794 rm -f conftest.$ac_objext conftest$ac_exeext
8795 if { (eval echo "$as_me:8795: \"$ac_link\"") >&5
8796 (eval $ac_link) 2>&5
8798 echo "$as_me:8798: \$? = $ac_status" >&5
8799 (exit $ac_status); } &&
8800 { ac_try='test -s conftest$ac_exeext'
8801 { (eval echo "$as_me:8801: \"$ac_try\"") >&5
8804 echo "$as_me:8804: \$? = $ac_status" >&5
8805 (exit $ac_status); }; }; then
8806 echo "$as_me:8806: result: yes" >&5
8807 echo "${ECHO_T}yes" >&6
8808 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8811 echo "$as_me: failed program was:" >&5
8812 cat conftest.$ac_ext >&5
8813 echo "$as_me:8813: result: no" >&5
8814 echo "${ECHO_T}no" >&6
8817 cf_library_path_list=""
8818 if test -n "${LDFLAGS}${LIBS}" ; then
8819 for cf_library_path in $LDFLAGS $LIBS
8821 case $cf_library_path in #(vi
8823 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8825 test "x$cf_library_path" != "xNONE" && \
8826 test -d "$cf_library_path" && \
8828 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8829 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
8830 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
8831 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
8832 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
8833 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"
8836 cf_library_path_list="$cf_library_path_list $cf_search"
8844 test "x/usr" != "x$prefix" && \
8846 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
8847 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
8848 test -d /usr/lib && cf_search="$cf_search /usr/lib"
8849 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
8850 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
8851 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
8852 test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
8855 test "x$prefix" != "xNONE" && \
8856 test -d "$prefix" && \
8858 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8859 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
8860 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
8861 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
8862 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
8863 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
8866 test "x/usr/local" != "x$prefix" && \
8867 test -d "/usr/local" && \
8868 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
8869 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
8870 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
8871 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
8872 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
8873 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
8874 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
8877 test "x/opt" != "x$prefix" && \
8879 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
8880 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
8881 test -d /opt/lib && cf_search="$cf_search /opt/lib"
8882 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
8883 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
8884 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
8885 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
8888 test "x$HOME" != "x$prefix" && \
8889 test -d "$HOME" && \
8890 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
8891 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
8892 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
8893 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
8894 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
8895 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
8896 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
8899 cf_search="$cf_library_path_list $cf_search"
8901 for cf_libdir in $cf_search
8903 echo "$as_me:8903: checking for -l$cf_nculib_root in $cf_libdir" >&5
8904 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
8905 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
8906 cat >conftest.$ac_ext <<_ACEOF
8907 #line 8907 "configure"
8908 #include "confdefs.h"
8909 #include <${cf_cv_ncurses_header:-curses.h}>
8918 rm -f conftest.$ac_objext conftest$ac_exeext
8919 if { (eval echo "$as_me:8919: \"$ac_link\"") >&5
8920 (eval $ac_link) 2>&5
8922 echo "$as_me:8922: \$? = $ac_status" >&5
8923 (exit $ac_status); } &&
8924 { ac_try='test -s conftest$ac_exeext'
8925 { (eval echo "$as_me:8925: \"$ac_try\"") >&5
8928 echo "$as_me:8928: \$? = $ac_status" >&5
8929 (exit $ac_status); }; }; then
8930 echo "$as_me:8930: result: yes" >&5
8931 echo "${ECHO_T}yes" >&6
8932 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8935 echo "$as_me: failed program was:" >&5
8936 cat conftest.$ac_ext >&5
8937 echo "$as_me:8937: result: no" >&5
8938 echo "${ECHO_T}no" >&6
8939 LIBS="$cf_save_LIBS"
8941 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8945 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8949 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
8951 if test $cf_found_library = no ; then
8952 { { echo "$as_me:8952: error: Cannot link $cf_nculib_root library" >&5
8953 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
8954 { (exit 1); exit 1; }; }
8959 if test -n "$cf_ncurses_LIBS" ; then
8960 echo "$as_me:8960: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
8961 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
8962 cf_ncurses_SAVE="$LIBS"
8963 for p in $cf_ncurses_LIBS ; do
8964 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
8965 if test "$q" != "$LIBS" ; then
8969 cat >conftest.$ac_ext <<_ACEOF
8970 #line 8970 "configure"
8971 #include "confdefs.h"
8972 #include <${cf_cv_ncurses_header:-curses.h}>
8976 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8981 rm -f conftest.$ac_objext conftest$ac_exeext
8982 if { (eval echo "$as_me:8982: \"$ac_link\"") >&5
8983 (eval $ac_link) 2>&5
8985 echo "$as_me:8985: \$? = $ac_status" >&5
8986 (exit $ac_status); } &&
8987 { ac_try='test -s conftest$ac_exeext'
8988 { (eval echo "$as_me:8988: \"$ac_try\"") >&5
8991 echo "$as_me:8991: \$? = $ac_status" >&5
8992 (exit $ac_status); }; }; then
8993 echo "$as_me:8993: result: yes" >&5
8994 echo "${ECHO_T}yes" >&6
8996 echo "$as_me: failed program was:" >&5
8997 cat conftest.$ac_ext >&5
8998 echo "$as_me:8998: result: no" >&5
8999 echo "${ECHO_T}no" >&6
9000 LIBS="$cf_ncurses_SAVE"
9002 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9005 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9007 cat >>confdefs.h <<EOF
9008 #define $cf_nculib_ROOT 1
9015 echo "$as_me:9015: checking for X" >&5
9016 echo $ECHO_N "checking for X... $ECHO_C" >&6
9018 # Check whether --with-x or --without-x was given.
9019 if test "${with_x+set}" = set; then
9023 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9024 if test "x$with_x" = xno; then
9025 # The user explicitly disabled X.
9028 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9029 # Both variables are already set.
9032 if test "${ac_cv_have_x+set}" = set; then
9033 echo $ECHO_N "(cached) $ECHO_C" >&6
9035 # One or both of the vars are not set, and there is no cached value.
9036 ac_x_includes=no ac_x_libraries=no
9038 if mkdir conftest.dir; then
9040 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9041 cat >Imakefile <<'EOF'
9043 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9045 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9046 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9047 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9048 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9049 for ac_extension in a so sl dylib dll; do
9050 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9051 test -f $ac_im_libdir/libX11.$ac_extension; then
9052 ac_im_usrlibdir=$ac_im_libdir; break
9055 # Screen out bogus values from the imake configuration. They are
9056 # bogus both because they are the default anyway, and because
9057 # using them would break gcc on systems where it needs fixed includes.
9058 case $ac_im_incroot in
9060 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9062 case $ac_im_usrlibdir in
9064 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9071 # Standard set of common directories for X headers.
9072 # Check X11 before X11Rn because it is often a symlink to the current release.
9084 /usr/local/X11/include
9085 /usr/local/X11R6/include
9086 /usr/local/X11R5/include
9087 /usr/local/X11R4/include
9089 /usr/local/include/X11
9090 /usr/local/include/X11R6
9091 /usr/local/include/X11R5
9092 /usr/local/include/X11R4
9096 /usr/XFree86/include/X11
9100 /usr/unsupported/include
9102 /usr/local/x11r5/include
9103 /usr/lpp/Xamples/include
9105 /usr/openwin/include
9106 /usr/openwin/share/include'
9108 if test "$ac_x_includes" = no; then
9109 # Guess where to find include files, by looking for Intrinsic.h.
9110 # First, try using that file with no special directory specified.
9111 cat >conftest.$ac_ext <<_ACEOF
9112 #line 9112 "configure"
9113 #include "confdefs.h"
9114 #include <X11/Intrinsic.h>
9116 if { (eval echo "$as_me:9116: \"$ac_cpp conftest.$ac_ext\"") >&5
9117 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9119 egrep -v '^ *\+' conftest.er1 >conftest.err
9121 cat conftest.err >&5
9122 echo "$as_me:9122: \$? = $ac_status" >&5
9123 (exit $ac_status); } >/dev/null; then
9124 if test -s conftest.err; then
9125 ac_cpp_err=$ac_c_preproc_warn_flag
9132 if test -z "$ac_cpp_err"; then
9133 # We can compile using X headers with no special include directory.
9136 echo "$as_me: failed program was:" >&5
9137 cat conftest.$ac_ext >&5
9138 for ac_dir in $ac_x_header_dirs; do
9139 if test -r "$ac_dir/X11/Intrinsic.h"; then
9140 ac_x_includes=$ac_dir
9145 rm -f conftest.err conftest.$ac_ext
9146 fi # $ac_x_includes = no
9148 if test "$ac_x_libraries" = no; then
9149 # Check for the libraries.
9150 # See if we find them without any special options.
9151 # Don't add to $LIBS permanently.
9154 cat >conftest.$ac_ext <<_ACEOF
9155 #line 9155 "configure"
9156 #include "confdefs.h"
9157 #include <X11/Intrinsic.h>
9166 rm -f conftest.$ac_objext conftest$ac_exeext
9167 if { (eval echo "$as_me:9167: \"$ac_link\"") >&5
9168 (eval $ac_link) 2>&5
9170 echo "$as_me:9170: \$? = $ac_status" >&5
9171 (exit $ac_status); } &&
9172 { ac_try='test -s conftest$ac_exeext'
9173 { (eval echo "$as_me:9173: \"$ac_try\"") >&5
9176 echo "$as_me:9176: \$? = $ac_status" >&5
9177 (exit $ac_status); }; }; then
9179 # We can link X programs with no special library path.
9182 echo "$as_me: failed program was:" >&5
9183 cat conftest.$ac_ext >&5
9185 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9187 # Don't even attempt the hair of trying to link an X program!
9188 for ac_extension in a so sl dylib dll; do
9189 if test -r $ac_dir/libXt.$ac_extension; then
9190 ac_x_libraries=$ac_dir
9196 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9197 fi # $ac_x_libraries = no
9199 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
9200 # Didn't find X anywhere. Cache the known absence of X.
9201 ac_cv_have_x="have_x=no"
9203 # Record where we found X for the cache.
9204 ac_cv_have_x="have_x=yes \
9205 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9210 eval "$ac_cv_have_x"
9213 if test "$have_x" != yes; then
9214 echo "$as_me:9214: result: $have_x" >&5
9215 echo "${ECHO_T}$have_x" >&6
9218 # If each of the values was on the command line, it overrides each guess.
9219 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9220 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9221 # Update the cache value to reflect the command line values.
9222 ac_cv_have_x="have_x=yes \
9223 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9224 echo "$as_me:9224: result: libraries $x_libraries, headers $x_includes" >&5
9225 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
9228 if test "$no_x" = yes; then
9229 # Not all programs may use this symbol, but it does not hurt to define it.
9231 cat >>confdefs.h <<\EOF
9232 #define X_DISPLAY_MISSING 1
9235 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
9237 if test -n "$x_includes"; then
9238 X_CFLAGS="$X_CFLAGS -I$x_includes"
9241 # It would also be nice to do this for all -L options, not just this one.
9242 if test -n "$x_libraries"; then
9243 X_LIBS="$X_LIBS -L$x_libraries"
9244 # For Solaris; some versions of Sun CC require a space after -R and
9245 # others require no space. Words are not sufficient . . . .
9246 case `(uname -sr) 2>/dev/null` in
9248 echo "$as_me:9248: checking whether -R must be followed by a space" >&5
9249 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
9250 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
9251 cat >conftest.$ac_ext <<_ACEOF
9252 #line 9252 "configure"
9253 #include "confdefs.h"
9263 rm -f conftest.$ac_objext conftest$ac_exeext
9264 if { (eval echo "$as_me:9264: \"$ac_link\"") >&5
9265 (eval $ac_link) 2>&5
9267 echo "$as_me:9267: \$? = $ac_status" >&5
9268 (exit $ac_status); } &&
9269 { ac_try='test -s conftest$ac_exeext'
9270 { (eval echo "$as_me:9270: \"$ac_try\"") >&5
9273 echo "$as_me:9273: \$? = $ac_status" >&5
9274 (exit $ac_status); }; }; then
9277 echo "$as_me: failed program was:" >&5
9278 cat conftest.$ac_ext >&5
9281 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9282 if test $ac_R_nospace = yes; then
9283 echo "$as_me:9283: result: no" >&5
9284 echo "${ECHO_T}no" >&6
9285 X_LIBS="$X_LIBS -R$x_libraries"
9287 LIBS="$ac_xsave_LIBS -R $x_libraries"
9288 cat >conftest.$ac_ext <<_ACEOF
9289 #line 9289 "configure"
9290 #include "confdefs.h"
9300 rm -f conftest.$ac_objext conftest$ac_exeext
9301 if { (eval echo "$as_me:9301: \"$ac_link\"") >&5
9302 (eval $ac_link) 2>&5
9304 echo "$as_me:9304: \$? = $ac_status" >&5
9305 (exit $ac_status); } &&
9306 { ac_try='test -s conftest$ac_exeext'
9307 { (eval echo "$as_me:9307: \"$ac_try\"") >&5
9310 echo "$as_me:9310: \$? = $ac_status" >&5
9311 (exit $ac_status); }; }; then
9314 echo "$as_me: failed program was:" >&5
9315 cat conftest.$ac_ext >&5
9318 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9319 if test $ac_R_space = yes; then
9320 echo "$as_me:9320: result: yes" >&5
9321 echo "${ECHO_T}yes" >&6
9322 X_LIBS="$X_LIBS -R $x_libraries"
9324 echo "$as_me:9324: result: neither works" >&5
9325 echo "${ECHO_T}neither works" >&6
9332 # Check for system-dependent libraries X programs must link with.
9333 # Do this before checking for the system-independent R6 libraries
9334 # (-lICE), since we may need -lsocket or whatever for X linking.
9336 if test "$ISC" = yes; then
9337 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
9339 # Martyn Johnson says this is needed for Ultrix, if the X
9340 # libraries were built with DECnet support. And Karl Berry says
9341 # the Alpha needs dnet_stub (dnet does not exist).
9342 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
9343 cat >conftest.$ac_ext <<_ACEOF
9344 #line 9344 "configure"
9345 #include "confdefs.h"
9347 /* Override any gcc2 internal prototype to avoid an error. */
9351 /* We use char because int might match the return type of a gcc2
9352 builtin and then its argument prototype would still apply. */
9353 char XOpenDisplay ();
9362 rm -f conftest.$ac_objext conftest$ac_exeext
9363 if { (eval echo "$as_me:9363: \"$ac_link\"") >&5
9364 (eval $ac_link) 2>&5
9366 echo "$as_me:9366: \$? = $ac_status" >&5
9367 (exit $ac_status); } &&
9368 { ac_try='test -s conftest$ac_exeext'
9369 { (eval echo "$as_me:9369: \"$ac_try\"") >&5
9372 echo "$as_me:9372: \$? = $ac_status" >&5
9373 (exit $ac_status); }; }; then
9376 echo "$as_me: failed program was:" >&5
9377 cat conftest.$ac_ext >&5
9378 echo "$as_me:9378: checking for dnet_ntoa in -ldnet" >&5
9379 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
9380 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
9381 echo $ECHO_N "(cached) $ECHO_C" >&6
9383 ac_check_lib_save_LIBS=$LIBS
9385 cat >conftest.$ac_ext <<_ACEOF
9386 #line 9386 "configure"
9387 #include "confdefs.h"
9389 /* Override any gcc2 internal prototype to avoid an error. */
9393 /* We use char because int might match the return type of a gcc2
9394 builtin and then its argument prototype would still apply. */
9404 rm -f conftest.$ac_objext conftest$ac_exeext
9405 if { (eval echo "$as_me:9405: \"$ac_link\"") >&5
9406 (eval $ac_link) 2>&5
9408 echo "$as_me:9408: \$? = $ac_status" >&5
9409 (exit $ac_status); } &&
9410 { ac_try='test -s conftest$ac_exeext'
9411 { (eval echo "$as_me:9411: \"$ac_try\"") >&5
9414 echo "$as_me:9414: \$? = $ac_status" >&5
9415 (exit $ac_status); }; }; then
9416 ac_cv_lib_dnet_dnet_ntoa=yes
9418 echo "$as_me: failed program was:" >&5
9419 cat conftest.$ac_ext >&5
9420 ac_cv_lib_dnet_dnet_ntoa=no
9422 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9423 LIBS=$ac_check_lib_save_LIBS
9425 echo "$as_me:9425: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9426 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
9427 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
9428 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
9431 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
9432 echo "$as_me:9432: checking for dnet_ntoa in -ldnet_stub" >&5
9433 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
9434 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
9435 echo $ECHO_N "(cached) $ECHO_C" >&6
9437 ac_check_lib_save_LIBS=$LIBS
9438 LIBS="-ldnet_stub $LIBS"
9439 cat >conftest.$ac_ext <<_ACEOF
9440 #line 9440 "configure"
9441 #include "confdefs.h"
9443 /* Override any gcc2 internal prototype to avoid an error. */
9447 /* We use char because int might match the return type of a gcc2
9448 builtin and then its argument prototype would still apply. */
9458 rm -f conftest.$ac_objext conftest$ac_exeext
9459 if { (eval echo "$as_me:9459: \"$ac_link\"") >&5
9460 (eval $ac_link) 2>&5
9462 echo "$as_me:9462: \$? = $ac_status" >&5
9463 (exit $ac_status); } &&
9464 { ac_try='test -s conftest$ac_exeext'
9465 { (eval echo "$as_me:9465: \"$ac_try\"") >&5
9468 echo "$as_me:9468: \$? = $ac_status" >&5
9469 (exit $ac_status); }; }; then
9470 ac_cv_lib_dnet_stub_dnet_ntoa=yes
9472 echo "$as_me: failed program was:" >&5
9473 cat conftest.$ac_ext >&5
9474 ac_cv_lib_dnet_stub_dnet_ntoa=no
9476 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9477 LIBS=$ac_check_lib_save_LIBS
9479 echo "$as_me:9479: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9480 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
9481 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
9482 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
9487 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9488 LIBS="$ac_xsave_LIBS"
9490 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9491 # to get the SysV transport functions.
9492 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
9494 # The nsl library prevents programs from opening the X display
9495 # on Irix 5.2, according to T.E. Dickey.
9496 # The functions gethostbyname, getservbyname, and inet_addr are
9497 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
9498 echo "$as_me:9498: checking for gethostbyname" >&5
9499 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
9500 if test "${ac_cv_func_gethostbyname+set}" = set; then
9501 echo $ECHO_N "(cached) $ECHO_C" >&6
9503 cat >conftest.$ac_ext <<_ACEOF
9504 #line 9504 "configure"
9505 #include "confdefs.h"
9506 /* System header to define __stub macros and hopefully few prototypes,
9507 which can conflict with char gethostbyname (); below. */
9509 /* Override any gcc2 internal prototype to avoid an error. */
9513 /* We use char because int might match the return type of a gcc2
9514 builtin and then its argument prototype would still apply. */
9515 char gethostbyname ();
9521 /* The GNU C library defines this for functions which it implements
9522 to always fail with ENOSYS. Some functions are actually named
9523 something starting with __ and the normal name is an alias. */
9524 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
9527 f = gethostbyname; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9534 rm -f conftest.$ac_objext conftest$ac_exeext
9535 if { (eval echo "$as_me:9535: \"$ac_link\"") >&5
9536 (eval $ac_link) 2>&5
9538 echo "$as_me:9538: \$? = $ac_status" >&5
9539 (exit $ac_status); } &&
9540 { ac_try='test -s conftest$ac_exeext'
9541 { (eval echo "$as_me:9541: \"$ac_try\"") >&5
9544 echo "$as_me:9544: \$? = $ac_status" >&5
9545 (exit $ac_status); }; }; then
9546 ac_cv_func_gethostbyname=yes
9548 echo "$as_me: failed program was:" >&5
9549 cat conftest.$ac_ext >&5
9550 ac_cv_func_gethostbyname=no
9552 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9554 echo "$as_me:9554: result: $ac_cv_func_gethostbyname" >&5
9555 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
9557 if test $ac_cv_func_gethostbyname = no; then
9558 echo "$as_me:9558: checking for gethostbyname in -lnsl" >&5
9559 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
9560 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
9561 echo $ECHO_N "(cached) $ECHO_C" >&6
9563 ac_check_lib_save_LIBS=$LIBS
9565 cat >conftest.$ac_ext <<_ACEOF
9566 #line 9566 "configure"
9567 #include "confdefs.h"
9569 /* Override any gcc2 internal prototype to avoid an error. */
9573 /* We use char because int might match the return type of a gcc2
9574 builtin and then its argument prototype would still apply. */
9575 char gethostbyname ();
9584 rm -f conftest.$ac_objext conftest$ac_exeext
9585 if { (eval echo "$as_me:9585: \"$ac_link\"") >&5
9586 (eval $ac_link) 2>&5
9588 echo "$as_me:9588: \$? = $ac_status" >&5
9589 (exit $ac_status); } &&
9590 { ac_try='test -s conftest$ac_exeext'
9591 { (eval echo "$as_me:9591: \"$ac_try\"") >&5
9594 echo "$as_me:9594: \$? = $ac_status" >&5
9595 (exit $ac_status); }; }; then
9596 ac_cv_lib_nsl_gethostbyname=yes
9598 echo "$as_me: failed program was:" >&5
9599 cat conftest.$ac_ext >&5
9600 ac_cv_lib_nsl_gethostbyname=no
9602 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9603 LIBS=$ac_check_lib_save_LIBS
9605 echo "$as_me:9605: result: $ac_cv_lib_nsl_gethostbyname" >&5
9606 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
9607 if test $ac_cv_lib_nsl_gethostbyname = yes; then
9608 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
9611 if test $ac_cv_lib_nsl_gethostbyname = no; then
9612 echo "$as_me:9612: checking for gethostbyname in -lbsd" >&5
9613 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
9614 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
9615 echo $ECHO_N "(cached) $ECHO_C" >&6
9617 ac_check_lib_save_LIBS=$LIBS
9619 cat >conftest.$ac_ext <<_ACEOF
9620 #line 9620 "configure"
9621 #include "confdefs.h"
9623 /* Override any gcc2 internal prototype to avoid an error. */
9627 /* We use char because int might match the return type of a gcc2
9628 builtin and then its argument prototype would still apply. */
9629 char gethostbyname ();
9638 rm -f conftest.$ac_objext conftest$ac_exeext
9639 if { (eval echo "$as_me:9639: \"$ac_link\"") >&5
9640 (eval $ac_link) 2>&5
9642 echo "$as_me:9642: \$? = $ac_status" >&5
9643 (exit $ac_status); } &&
9644 { ac_try='test -s conftest$ac_exeext'
9645 { (eval echo "$as_me:9645: \"$ac_try\"") >&5
9648 echo "$as_me:9648: \$? = $ac_status" >&5
9649 (exit $ac_status); }; }; then
9650 ac_cv_lib_bsd_gethostbyname=yes
9652 echo "$as_me: failed program was:" >&5
9653 cat conftest.$ac_ext >&5
9654 ac_cv_lib_bsd_gethostbyname=no
9656 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9657 LIBS=$ac_check_lib_save_LIBS
9659 echo "$as_me:9659: result: $ac_cv_lib_bsd_gethostbyname" >&5
9660 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
9661 if test $ac_cv_lib_bsd_gethostbyname = yes; then
9662 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
9668 # lieder@skyler.mavd.honeywell.com says without -lsocket,
9669 # socket/setsockopt and other routines are undefined under SCO ODT
9670 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
9671 # on later versions), says Simon Leinen: it contains gethostby*
9672 # variants that don't use the nameserver (or something). -lsocket
9673 # must be given before -lnsl if both are needed. We assume that
9674 # if connect needs -lnsl, so does gethostbyname.
9675 echo "$as_me:9675: checking for connect" >&5
9676 echo $ECHO_N "checking for connect... $ECHO_C" >&6
9677 if test "${ac_cv_func_connect+set}" = set; then
9678 echo $ECHO_N "(cached) $ECHO_C" >&6
9680 cat >conftest.$ac_ext <<_ACEOF
9681 #line 9681 "configure"
9682 #include "confdefs.h"
9683 /* System header to define __stub macros and hopefully few prototypes,
9684 which can conflict with char connect (); below. */
9686 /* Override any gcc2 internal prototype to avoid an error. */
9690 /* We use char because int might match the return type of a gcc2
9691 builtin and then its argument prototype would still apply. */
9698 /* The GNU C library defines this for functions which it implements
9699 to always fail with ENOSYS. Some functions are actually named
9700 something starting with __ and the normal name is an alias. */
9701 #if defined (__stub_connect) || defined (__stub___connect)
9704 f = connect; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9711 rm -f conftest.$ac_objext conftest$ac_exeext
9712 if { (eval echo "$as_me:9712: \"$ac_link\"") >&5
9713 (eval $ac_link) 2>&5
9715 echo "$as_me:9715: \$? = $ac_status" >&5
9716 (exit $ac_status); } &&
9717 { ac_try='test -s conftest$ac_exeext'
9718 { (eval echo "$as_me:9718: \"$ac_try\"") >&5
9721 echo "$as_me:9721: \$? = $ac_status" >&5
9722 (exit $ac_status); }; }; then
9723 ac_cv_func_connect=yes
9725 echo "$as_me: failed program was:" >&5
9726 cat conftest.$ac_ext >&5
9727 ac_cv_func_connect=no
9729 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9731 echo "$as_me:9731: result: $ac_cv_func_connect" >&5
9732 echo "${ECHO_T}$ac_cv_func_connect" >&6
9734 if test $ac_cv_func_connect = no; then
9735 echo "$as_me:9735: checking for connect in -lsocket" >&5
9736 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
9737 if test "${ac_cv_lib_socket_connect+set}" = set; then
9738 echo $ECHO_N "(cached) $ECHO_C" >&6
9740 ac_check_lib_save_LIBS=$LIBS
9741 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
9742 cat >conftest.$ac_ext <<_ACEOF
9743 #line 9743 "configure"
9744 #include "confdefs.h"
9746 /* Override any gcc2 internal prototype to avoid an error. */
9750 /* We use char because int might match the return type of a gcc2
9751 builtin and then its argument prototype would still apply. */
9761 rm -f conftest.$ac_objext conftest$ac_exeext
9762 if { (eval echo "$as_me:9762: \"$ac_link\"") >&5
9763 (eval $ac_link) 2>&5
9765 echo "$as_me:9765: \$? = $ac_status" >&5
9766 (exit $ac_status); } &&
9767 { ac_try='test -s conftest$ac_exeext'
9768 { (eval echo "$as_me:9768: \"$ac_try\"") >&5
9771 echo "$as_me:9771: \$? = $ac_status" >&5
9772 (exit $ac_status); }; }; then
9773 ac_cv_lib_socket_connect=yes
9775 echo "$as_me: failed program was:" >&5
9776 cat conftest.$ac_ext >&5
9777 ac_cv_lib_socket_connect=no
9779 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9780 LIBS=$ac_check_lib_save_LIBS
9782 echo "$as_me:9782: result: $ac_cv_lib_socket_connect" >&5
9783 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
9784 if test $ac_cv_lib_socket_connect = yes; then
9785 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
9790 # Guillermo Gomez says -lposix is necessary on A/UX.
9791 echo "$as_me:9791: checking for remove" >&5
9792 echo $ECHO_N "checking for remove... $ECHO_C" >&6
9793 if test "${ac_cv_func_remove+set}" = set; then
9794 echo $ECHO_N "(cached) $ECHO_C" >&6
9796 cat >conftest.$ac_ext <<_ACEOF
9797 #line 9797 "configure"
9798 #include "confdefs.h"
9799 /* System header to define __stub macros and hopefully few prototypes,
9800 which can conflict with char remove (); below. */
9802 /* Override any gcc2 internal prototype to avoid an error. */
9806 /* We use char because int might match the return type of a gcc2
9807 builtin and then its argument prototype would still apply. */
9814 /* The GNU C library defines this for functions which it implements
9815 to always fail with ENOSYS. Some functions are actually named
9816 something starting with __ and the normal name is an alias. */
9817 #if defined (__stub_remove) || defined (__stub___remove)
9820 f = remove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9827 rm -f conftest.$ac_objext conftest$ac_exeext
9828 if { (eval echo "$as_me:9828: \"$ac_link\"") >&5
9829 (eval $ac_link) 2>&5
9831 echo "$as_me:9831: \$? = $ac_status" >&5
9832 (exit $ac_status); } &&
9833 { ac_try='test -s conftest$ac_exeext'
9834 { (eval echo "$as_me:9834: \"$ac_try\"") >&5
9837 echo "$as_me:9837: \$? = $ac_status" >&5
9838 (exit $ac_status); }; }; then
9839 ac_cv_func_remove=yes
9841 echo "$as_me: failed program was:" >&5
9842 cat conftest.$ac_ext >&5
9843 ac_cv_func_remove=no
9845 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9847 echo "$as_me:9847: result: $ac_cv_func_remove" >&5
9848 echo "${ECHO_T}$ac_cv_func_remove" >&6
9850 if test $ac_cv_func_remove = no; then
9851 echo "$as_me:9851: checking for remove in -lposix" >&5
9852 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
9853 if test "${ac_cv_lib_posix_remove+set}" = set; then
9854 echo $ECHO_N "(cached) $ECHO_C" >&6
9856 ac_check_lib_save_LIBS=$LIBS
9857 LIBS="-lposix $LIBS"
9858 cat >conftest.$ac_ext <<_ACEOF
9859 #line 9859 "configure"
9860 #include "confdefs.h"
9862 /* Override any gcc2 internal prototype to avoid an error. */
9866 /* We use char because int might match the return type of a gcc2
9867 builtin and then its argument prototype would still apply. */
9877 rm -f conftest.$ac_objext conftest$ac_exeext
9878 if { (eval echo "$as_me:9878: \"$ac_link\"") >&5
9879 (eval $ac_link) 2>&5
9881 echo "$as_me:9881: \$? = $ac_status" >&5
9882 (exit $ac_status); } &&
9883 { ac_try='test -s conftest$ac_exeext'
9884 { (eval echo "$as_me:9884: \"$ac_try\"") >&5
9887 echo "$as_me:9887: \$? = $ac_status" >&5
9888 (exit $ac_status); }; }; then
9889 ac_cv_lib_posix_remove=yes
9891 echo "$as_me: failed program was:" >&5
9892 cat conftest.$ac_ext >&5
9893 ac_cv_lib_posix_remove=no
9895 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9896 LIBS=$ac_check_lib_save_LIBS
9898 echo "$as_me:9898: result: $ac_cv_lib_posix_remove" >&5
9899 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
9900 if test $ac_cv_lib_posix_remove = yes; then
9901 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
9906 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
9907 echo "$as_me:9907: checking for shmat" >&5
9908 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
9909 if test "${ac_cv_func_shmat+set}" = set; then
9910 echo $ECHO_N "(cached) $ECHO_C" >&6
9912 cat >conftest.$ac_ext <<_ACEOF
9913 #line 9913 "configure"
9914 #include "confdefs.h"
9915 /* System header to define __stub macros and hopefully few prototypes,
9916 which can conflict with char shmat (); below. */
9918 /* Override any gcc2 internal prototype to avoid an error. */
9922 /* We use char because int might match the return type of a gcc2
9923 builtin and then its argument prototype would still apply. */
9930 /* The GNU C library defines this for functions which it implements
9931 to always fail with ENOSYS. Some functions are actually named
9932 something starting with __ and the normal name is an alias. */
9933 #if defined (__stub_shmat) || defined (__stub___shmat)
9936 f = shmat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9943 rm -f conftest.$ac_objext conftest$ac_exeext
9944 if { (eval echo "$as_me:9944: \"$ac_link\"") >&5
9945 (eval $ac_link) 2>&5
9947 echo "$as_me:9947: \$? = $ac_status" >&5
9948 (exit $ac_status); } &&
9949 { ac_try='test -s conftest$ac_exeext'
9950 { (eval echo "$as_me:9950: \"$ac_try\"") >&5
9953 echo "$as_me:9953: \$? = $ac_status" >&5
9954 (exit $ac_status); }; }; then
9955 ac_cv_func_shmat=yes
9957 echo "$as_me: failed program was:" >&5
9958 cat conftest.$ac_ext >&5
9961 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9963 echo "$as_me:9963: result: $ac_cv_func_shmat" >&5
9964 echo "${ECHO_T}$ac_cv_func_shmat" >&6
9966 if test $ac_cv_func_shmat = no; then
9967 echo "$as_me:9967: checking for shmat in -lipc" >&5
9968 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
9969 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
9970 echo $ECHO_N "(cached) $ECHO_C" >&6
9972 ac_check_lib_save_LIBS=$LIBS
9974 cat >conftest.$ac_ext <<_ACEOF
9975 #line 9975 "configure"
9976 #include "confdefs.h"
9978 /* Override any gcc2 internal prototype to avoid an error. */
9982 /* We use char because int might match the return type of a gcc2
9983 builtin and then its argument prototype would still apply. */
9993 rm -f conftest.$ac_objext conftest$ac_exeext
9994 if { (eval echo "$as_me:9994: \"$ac_link\"") >&5
9995 (eval $ac_link) 2>&5
9997 echo "$as_me:9997: \$? = $ac_status" >&5
9998 (exit $ac_status); } &&
9999 { ac_try='test -s conftest$ac_exeext'
10000 { (eval echo "$as_me:10000: \"$ac_try\"") >&5
10001 (eval $ac_try) 2>&5
10003 echo "$as_me:10003: \$? = $ac_status" >&5
10004 (exit $ac_status); }; }; then
10005 ac_cv_lib_ipc_shmat=yes
10007 echo "$as_me: failed program was:" >&5
10008 cat conftest.$ac_ext >&5
10009 ac_cv_lib_ipc_shmat=no
10011 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10012 LIBS=$ac_check_lib_save_LIBS
10014 echo "$as_me:10014: result: $ac_cv_lib_ipc_shmat" >&5
10015 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
10016 if test $ac_cv_lib_ipc_shmat = yes; then
10017 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
10023 # Check for libraries that X11R6 Xt/Xaw programs need.
10024 ac_save_LDFLAGS=$LDFLAGS
10025 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
10026 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
10027 # check for ICE first), but we must link in the order -lSM -lICE or
10028 # we get undefined symbols. So assume we have SM if we have ICE.
10029 # These have to be linked with before -lX11, unlike the other
10030 # libraries we check for below, so use a different variable.
10031 # John Interrante, Karl Berry
10032 echo "$as_me:10032: checking for IceConnectionNumber in -lICE" >&5
10033 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
10034 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
10035 echo $ECHO_N "(cached) $ECHO_C" >&6
10037 ac_check_lib_save_LIBS=$LIBS
10038 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
10039 cat >conftest.$ac_ext <<_ACEOF
10040 #line 10040 "configure"
10041 #include "confdefs.h"
10043 /* Override any gcc2 internal prototype to avoid an error. */
10047 /* We use char because int might match the return type of a gcc2
10048 builtin and then its argument prototype would still apply. */
10049 char IceConnectionNumber ();
10053 IceConnectionNumber ();
10058 rm -f conftest.$ac_objext conftest$ac_exeext
10059 if { (eval echo "$as_me:10059: \"$ac_link\"") >&5
10060 (eval $ac_link) 2>&5
10062 echo "$as_me:10062: \$? = $ac_status" >&5
10063 (exit $ac_status); } &&
10064 { ac_try='test -s conftest$ac_exeext'
10065 { (eval echo "$as_me:10065: \"$ac_try\"") >&5
10066 (eval $ac_try) 2>&5
10068 echo "$as_me:10068: \$? = $ac_status" >&5
10069 (exit $ac_status); }; }; then
10070 ac_cv_lib_ICE_IceConnectionNumber=yes
10072 echo "$as_me: failed program was:" >&5
10073 cat conftest.$ac_ext >&5
10074 ac_cv_lib_ICE_IceConnectionNumber=no
10076 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10077 LIBS=$ac_check_lib_save_LIBS
10079 echo "$as_me:10079: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
10080 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
10081 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
10082 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
10085 LDFLAGS=$ac_save_LDFLAGS
10089 cf_x_athena=${cf_x_athena:-Xaw}
10091 echo "$as_me:10091: checking if you want to link with Xaw 3d library" >&5
10092 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
10095 # Check whether --with-Xaw3d or --without-Xaw3d was given.
10096 if test "${with_Xaw3d+set}" = set; then
10097 withval="$with_Xaw3d"
10100 if test "$withval" = yes ; then
10102 echo "$as_me:10102: result: yes" >&5
10103 echo "${ECHO_T}yes" >&6
10105 echo "$as_me:10105: result: no" >&5
10106 echo "${ECHO_T}no" >&6
10109 echo "$as_me:10109: checking if you want to link with Xaw 3d xft library" >&5
10110 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
10113 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
10114 if test "${with_Xaw3dxft+set}" = set; then
10115 withval="$with_Xaw3dxft"
10118 if test "$withval" = yes ; then
10119 cf_x_athena=Xaw3dxft
10120 echo "$as_me:10120: result: yes" >&5
10121 echo "${ECHO_T}yes" >&6
10123 echo "$as_me:10123: result: no" >&5
10124 echo "${ECHO_T}no" >&6
10127 echo "$as_me:10127: checking if you want to link with neXT Athena library" >&5
10128 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
10131 # Check whether --with-neXtaw or --without-neXtaw was given.
10132 if test "${with_neXtaw+set}" = set; then
10133 withval="$with_neXtaw"
10136 if test "$withval" = yes ; then
10138 echo "$as_me:10138: result: yes" >&5
10139 echo "${ECHO_T}yes" >&6
10141 echo "$as_me:10141: result: no" >&5
10142 echo "${ECHO_T}no" >&6
10145 echo "$as_me:10145: checking if you want to link with Athena-Plus library" >&5
10146 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
10149 # Check whether --with-XawPlus or --without-XawPlus was given.
10150 if test "${with_XawPlus+set}" = set; then
10151 withval="$with_XawPlus"
10154 if test "$withval" = yes ; then
10155 cf_x_athena=XawPlus
10156 echo "$as_me:10156: result: yes" >&5
10157 echo "${ECHO_T}yes" >&6
10159 echo "$as_me:10159: result: no" >&5
10160 echo "${ECHO_T}no" >&6
10165 if test "$PKG_CONFIG" != none ; then
10167 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
10168 for cf_athena_pkg in \
10171 ${cf_x_athena}-devel \
10172 lib${cf_x_athena} \
10173 lib${cf_x_athena}-devel
10176 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
10177 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
10179 echo "${as_me:-configure}:10179: testing found package $cf_athena_pkg ..." 1>&5
10181 cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
10182 cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
10183 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
10185 echo "${as_me:-configure}:10185: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10187 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
10189 echo "${as_me:-configure}:10189: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
10194 cf_new_extra_cppflags=
10196 for cf_add_cflags in $cf_pkgconfig_incs
10198 case $cf_fix_cppflags in
10200 case $cf_add_cflags in #(vi
10201 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10202 case $cf_add_cflags in
10204 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10206 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10207 && test -z "${cf_tst_cflags}" \
10208 && cf_fix_cppflags=yes
10210 if test $cf_fix_cppflags = yes ; then
10211 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10213 elif test "${cf_tst_cflags}" = "\"'" ; then
10214 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10219 case "$CPPFLAGS" in
10220 *$cf_add_cflags) #(vi
10223 case $cf_add_cflags in #(vi
10225 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10227 CPPFLAGS=`echo "$CPPFLAGS" | \
10228 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10229 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10233 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10238 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10243 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10245 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10247 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10248 && test -z "${cf_tst_cflags}" \
10249 && cf_fix_cppflags=no
10254 if test -n "$cf_new_cflags" ; then
10256 CFLAGS="$CFLAGS $cf_new_cflags"
10259 if test -n "$cf_new_cppflags" ; then
10261 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10264 if test -n "$cf_new_extra_cppflags" ; then
10266 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10269 cf_add_libs="$cf_pkgconfig_libs"
10270 # Filter out duplicates - this happens with badly-designed ".pc" files...
10271 for cf_add_1lib in $LIBS
10273 for cf_add_2lib in $cf_add_libs
10275 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10281 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10283 LIBS="$cf_add_libs"
10285 cf_x_athena_lib="$cf_pkgconfig_libs"
10287 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10289 cat >>confdefs.h <<EOF
10290 #define $cf_x_athena_LIBS 1
10293 for cf_trim_lib in Xmu Xt X11
10296 *-l$cf_trim_lib\ *-l$cf_trim_lib*)
10297 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
10298 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
10300 echo "${as_me:-configure}:10300: testing ..trimmed $LIBS ..." 1>&5
10306 echo "$as_me:10306: checking for usable $cf_x_athena/Xmu package" >&5
10307 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
10308 if test "${cf_cv_xaw_compat+set}" = set; then
10309 echo $ECHO_N "(cached) $ECHO_C" >&6
10312 cat >conftest.$ac_ext <<_ACEOF
10313 #line 10313 "configure"
10314 #include "confdefs.h"
10316 #include <X11/Xmu/CharSet.h>
10322 int check = XmuCompareISOLatin1("big", "small")
10328 rm -f conftest.$ac_objext conftest$ac_exeext
10329 if { (eval echo "$as_me:10329: \"$ac_link\"") >&5
10330 (eval $ac_link) 2>&5
10332 echo "$as_me:10332: \$? = $ac_status" >&5
10333 (exit $ac_status); } &&
10334 { ac_try='test -s conftest$ac_exeext'
10335 { (eval echo "$as_me:10335: \"$ac_try\"") >&5
10336 (eval $ac_try) 2>&5
10338 echo "$as_me:10338: \$? = $ac_status" >&5
10339 (exit $ac_status); }; }; then
10340 cf_cv_xaw_compat=yes
10342 echo "$as_me: failed program was:" >&5
10343 cat conftest.$ac_ext >&5
10344 cf_cv_xaw_compat=no
10346 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10348 echo "$as_me:10348: result: $cf_cv_xaw_compat" >&5
10349 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
10351 if test "$cf_cv_xaw_compat" = no
10353 # workaround for broken ".pc" files...
10354 case "$cf_x_athena_lib" in #(vi
10358 test -n "$verbose" && echo " work around broken package" 1>&6
10360 echo "${as_me:-configure}:10360: testing work around broken package ..." 1>&5
10362 cf_save_xmu="$LIBS"
10363 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
10365 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
10366 test -n "$verbose" && echo " found package xmu" 1>&6
10368 echo "${as_me:-configure}:10368: testing found package xmu ..." 1>&5
10370 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
10371 cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`"
10372 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
10374 echo "${as_me:-configure}:10374: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10376 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
10378 echo "${as_me:-configure}:10378: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
10383 cf_new_extra_cppflags=
10385 for cf_add_cflags in $cf_pkgconfig_incs
10387 case $cf_fix_cppflags in
10389 case $cf_add_cflags in #(vi
10390 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10391 case $cf_add_cflags in
10393 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10395 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10396 && test -z "${cf_tst_cflags}" \
10397 && cf_fix_cppflags=yes
10399 if test $cf_fix_cppflags = yes ; then
10400 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10402 elif test "${cf_tst_cflags}" = "\"'" ; then
10403 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10408 case "$CPPFLAGS" in
10409 *$cf_add_cflags) #(vi
10412 case $cf_add_cflags in #(vi
10414 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10416 CPPFLAGS=`echo "$CPPFLAGS" | \
10417 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10418 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10422 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10427 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10432 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10434 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10436 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10437 && test -z "${cf_tst_cflags}" \
10438 && cf_fix_cppflags=no
10443 if test -n "$cf_new_cflags" ; then
10445 CFLAGS="$CFLAGS $cf_new_cflags"
10448 if test -n "$cf_new_cppflags" ; then
10450 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10453 if test -n "$cf_new_extra_cppflags" ; then
10455 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10458 cf_add_libs="$cf_pkgconfig_libs"
10459 # Filter out duplicates - this happens with badly-designed ".pc" files...
10460 for cf_add_1lib in $LIBS
10462 for cf_add_2lib in $cf_add_libs
10464 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10470 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10472 LIBS="$cf_add_libs"
10474 LIBS="$cf_save_xmu"
10476 test -n "$verbose" && echo " ...before $LIBS" 1>&6
10478 echo "${as_me:-configure}:10478: testing ...before $LIBS ..." 1>&5
10480 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
10481 test -n "$verbose" && echo " ...after $LIBS" 1>&6
10483 echo "${as_me:-configure}:10483: testing ...after $LIBS ..." 1>&5
10489 test -n "$verbose" && echo " ...before $LIBS" 1>&6
10491 echo "${as_me:-configure}:10491: testing ...before $LIBS ..." 1>&5
10493 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
10494 test -n "$verbose" && echo " ...after $LIBS" 1>&6
10496 echo "${as_me:-configure}:10496: testing ...after $LIBS ..." 1>&5
10500 for cf_trim_lib in Xmu Xt X11
10503 *-l$cf_trim_lib\ *-l$cf_trim_lib*)
10504 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
10505 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
10507 echo "${as_me:-configure}:10507: testing ..trimmed $LIBS ..." 1>&5
10527 if test -z "$cf_x_athena_lib" ; then
10529 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
10530 test -n "$verbose" && echo " found package Xext" 1>&6
10532 echo "${as_me:-configure}:10532: testing found package Xext ..." 1>&5
10534 cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
10535 cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
10536 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
10538 echo "${as_me:-configure}:10538: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10540 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
10542 echo "${as_me:-configure}:10542: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
10547 cf_new_extra_cppflags=
10549 for cf_add_cflags in $cf_pkgconfig_incs
10551 case $cf_fix_cppflags in
10553 case $cf_add_cflags in #(vi
10554 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10555 case $cf_add_cflags in
10557 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10559 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10560 && test -z "${cf_tst_cflags}" \
10561 && cf_fix_cppflags=yes
10563 if test $cf_fix_cppflags = yes ; then
10564 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10566 elif test "${cf_tst_cflags}" = "\"'" ; then
10567 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10572 case "$CPPFLAGS" in
10573 *$cf_add_cflags) #(vi
10576 case $cf_add_cflags in #(vi
10578 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10580 CPPFLAGS=`echo "$CPPFLAGS" | \
10581 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10582 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10586 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10591 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10596 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10598 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10600 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10601 && test -z "${cf_tst_cflags}" \
10602 && cf_fix_cppflags=no
10607 if test -n "$cf_new_cflags" ; then
10609 CFLAGS="$CFLAGS $cf_new_cflags"
10612 if test -n "$cf_new_cppflags" ; then
10614 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10617 if test -n "$cf_new_extra_cppflags" ; then
10619 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10622 cf_add_libs="$cf_pkgconfig_libs"
10623 # Filter out duplicates - this happens with badly-designed ".pc" files...
10624 for cf_add_1lib in $LIBS
10626 for cf_add_2lib in $cf_add_libs
10628 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10634 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10636 LIBS="$cf_add_libs"
10643 echo "$as_me:10643: checking for XextCreateExtension in -lXext" >&5
10644 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
10645 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
10646 echo $ECHO_N "(cached) $ECHO_C" >&6
10648 ac_check_lib_save_LIBS=$LIBS
10649 LIBS="-lXext $LIBS"
10650 cat >conftest.$ac_ext <<_ACEOF
10651 #line 10651 "configure"
10652 #include "confdefs.h"
10654 /* Override any gcc2 internal prototype to avoid an error. */
10658 /* We use char because int might match the return type of a gcc2
10659 builtin and then its argument prototype would still apply. */
10660 char XextCreateExtension ();
10664 XextCreateExtension ();
10669 rm -f conftest.$ac_objext conftest$ac_exeext
10670 if { (eval echo "$as_me:10670: \"$ac_link\"") >&5
10671 (eval $ac_link) 2>&5
10673 echo "$as_me:10673: \$? = $ac_status" >&5
10674 (exit $ac_status); } &&
10675 { ac_try='test -s conftest$ac_exeext'
10676 { (eval echo "$as_me:10676: \"$ac_try\"") >&5
10677 (eval $ac_try) 2>&5
10679 echo "$as_me:10679: \$? = $ac_status" >&5
10680 (exit $ac_status); }; }; then
10681 ac_cv_lib_Xext_XextCreateExtension=yes
10683 echo "$as_me: failed program was:" >&5
10684 cat conftest.$ac_ext >&5
10685 ac_cv_lib_Xext_XextCreateExtension=no
10687 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10688 LIBS=$ac_check_lib_save_LIBS
10690 echo "$as_me:10690: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
10691 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
10692 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
10694 cf_add_libs="-lXext"
10695 # Filter out duplicates - this happens with badly-designed ".pc" files...
10696 for cf_add_1lib in $LIBS
10698 for cf_add_2lib in $cf_add_libs
10700 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10706 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10708 LIBS="$cf_add_libs"
10714 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
10715 # in some cases has installed dummy files in the former, other cases replaced
10716 # it with a link to the new location). This complicates the configure script.
10717 # Check for that pitfall, and recover using pkg-config
10719 # If none of these are set, the configuration is almost certainly broken.
10720 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
10723 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
10724 test -n "$verbose" && echo " found package x11" 1>&6
10726 echo "${as_me:-configure}:10726: testing found package x11 ..." 1>&5
10728 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
10729 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
10730 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
10732 echo "${as_me:-configure}:10732: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10734 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
10736 echo "${as_me:-configure}:10736: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
10741 cf_new_extra_cppflags=
10743 for cf_add_cflags in $cf_pkgconfig_incs
10745 case $cf_fix_cppflags in
10747 case $cf_add_cflags in #(vi
10748 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10749 case $cf_add_cflags in
10751 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10753 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10754 && test -z "${cf_tst_cflags}" \
10755 && cf_fix_cppflags=yes
10757 if test $cf_fix_cppflags = yes ; then
10758 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10760 elif test "${cf_tst_cflags}" = "\"'" ; then
10761 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10766 case "$CPPFLAGS" in
10767 *$cf_add_cflags) #(vi
10770 case $cf_add_cflags in #(vi
10772 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10774 CPPFLAGS=`echo "$CPPFLAGS" | \
10775 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10776 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10780 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10785 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10790 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10792 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10794 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10795 && test -z "${cf_tst_cflags}" \
10796 && cf_fix_cppflags=no
10801 if test -n "$cf_new_cflags" ; then
10803 CFLAGS="$CFLAGS $cf_new_cflags"
10806 if test -n "$cf_new_cppflags" ; then
10808 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10811 if test -n "$cf_new_extra_cppflags" ; then
10813 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10816 cf_add_libs="$cf_pkgconfig_libs"
10817 # Filter out duplicates - this happens with badly-designed ".pc" files...
10818 for cf_add_1lib in $LIBS
10820 for cf_add_2lib in $cf_add_libs
10822 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10828 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10830 LIBS="$cf_add_libs"
10836 { echo "$as_me:10836: WARNING: unable to find X11 library" >&5
10837 echo "$as_me: WARNING: unable to find X11 library" >&2;}
10840 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
10841 test -n "$verbose" && echo " found package ice" 1>&6
10843 echo "${as_me:-configure}:10843: testing found package ice ..." 1>&5
10845 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
10846 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
10847 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
10849 echo "${as_me:-configure}:10849: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10851 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
10853 echo "${as_me:-configure}:10853: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
10858 cf_new_extra_cppflags=
10860 for cf_add_cflags in $cf_pkgconfig_incs
10862 case $cf_fix_cppflags in
10864 case $cf_add_cflags in #(vi
10865 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10866 case $cf_add_cflags in
10868 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10870 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10871 && test -z "${cf_tst_cflags}" \
10872 && cf_fix_cppflags=yes
10874 if test $cf_fix_cppflags = yes ; then
10875 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10877 elif test "${cf_tst_cflags}" = "\"'" ; then
10878 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10883 case "$CPPFLAGS" in
10884 *$cf_add_cflags) #(vi
10887 case $cf_add_cflags in #(vi
10889 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10891 CPPFLAGS=`echo "$CPPFLAGS" | \
10892 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10893 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10897 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10902 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10907 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10909 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10911 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10912 && test -z "${cf_tst_cflags}" \
10913 && cf_fix_cppflags=no
10918 if test -n "$cf_new_cflags" ; then
10920 CFLAGS="$CFLAGS $cf_new_cflags"
10923 if test -n "$cf_new_cppflags" ; then
10925 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10928 if test -n "$cf_new_extra_cppflags" ; then
10930 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10933 cf_add_libs="$cf_pkgconfig_libs"
10934 # Filter out duplicates - this happens with badly-designed ".pc" files...
10935 for cf_add_1lib in $LIBS
10937 for cf_add_2lib in $cf_add_libs
10939 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10945 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10947 LIBS="$cf_add_libs"
10953 { echo "$as_me:10953: WARNING: unable to find ICE library" >&5
10954 echo "$as_me: WARNING: unable to find ICE library" >&2;}
10957 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
10958 test -n "$verbose" && echo " found package sm" 1>&6
10960 echo "${as_me:-configure}:10960: testing found package sm ..." 1>&5
10962 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
10963 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
10964 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
10966 echo "${as_me:-configure}:10966: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10968 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
10970 echo "${as_me:-configure}:10970: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
10975 cf_new_extra_cppflags=
10977 for cf_add_cflags in $cf_pkgconfig_incs
10979 case $cf_fix_cppflags in
10981 case $cf_add_cflags in #(vi
10982 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10983 case $cf_add_cflags in
10985 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10987 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10988 && test -z "${cf_tst_cflags}" \
10989 && cf_fix_cppflags=yes
10991 if test $cf_fix_cppflags = yes ; then
10992 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10994 elif test "${cf_tst_cflags}" = "\"'" ; then
10995 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11000 case "$CPPFLAGS" in
11001 *$cf_add_cflags) #(vi
11004 case $cf_add_cflags in #(vi
11006 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11008 CPPFLAGS=`echo "$CPPFLAGS" | \
11009 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11010 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11014 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11019 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11024 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11026 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11028 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11029 && test -z "${cf_tst_cflags}" \
11030 && cf_fix_cppflags=no
11035 if test -n "$cf_new_cflags" ; then
11037 CFLAGS="$CFLAGS $cf_new_cflags"
11040 if test -n "$cf_new_cppflags" ; then
11042 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11045 if test -n "$cf_new_extra_cppflags" ; then
11047 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11050 cf_add_libs="$cf_pkgconfig_libs"
11051 # Filter out duplicates - this happens with badly-designed ".pc" files...
11052 for cf_add_1lib in $LIBS
11054 for cf_add_2lib in $cf_add_libs
11056 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11062 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11064 LIBS="$cf_add_libs"
11070 { echo "$as_me:11070: WARNING: unable to find SM library" >&5
11071 echo "$as_me: WARNING: unable to find SM library" >&2;}
11074 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11075 test -n "$verbose" && echo " found package xt" 1>&6
11077 echo "${as_me:-configure}:11077: testing found package xt ..." 1>&5
11079 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11080 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
11081 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11083 echo "${as_me:-configure}:11083: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11085 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
11087 echo "${as_me:-configure}:11087: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11092 cf_new_extra_cppflags=
11094 for cf_add_cflags in $cf_pkgconfig_incs
11096 case $cf_fix_cppflags in
11098 case $cf_add_cflags in #(vi
11099 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11100 case $cf_add_cflags in
11102 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11104 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11105 && test -z "${cf_tst_cflags}" \
11106 && cf_fix_cppflags=yes
11108 if test $cf_fix_cppflags = yes ; then
11109 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11111 elif test "${cf_tst_cflags}" = "\"'" ; then
11112 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11117 case "$CPPFLAGS" in
11118 *$cf_add_cflags) #(vi
11121 case $cf_add_cflags in #(vi
11123 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11125 CPPFLAGS=`echo "$CPPFLAGS" | \
11126 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11127 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11131 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11136 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11141 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11143 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11145 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11146 && test -z "${cf_tst_cflags}" \
11147 && cf_fix_cppflags=no
11152 if test -n "$cf_new_cflags" ; then
11154 CFLAGS="$CFLAGS $cf_new_cflags"
11157 if test -n "$cf_new_cppflags" ; then
11159 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11162 if test -n "$cf_new_extra_cppflags" ; then
11164 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11167 cf_add_libs="$cf_pkgconfig_libs"
11168 # Filter out duplicates - this happens with badly-designed ".pc" files...
11169 for cf_add_1lib in $LIBS
11171 for cf_add_2lib in $cf_add_libs
11173 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11179 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11181 LIBS="$cf_add_libs"
11187 { echo "$as_me:11187: WARNING: unable to find Xt library" >&5
11188 echo "$as_me: WARNING: unable to find Xt library" >&2;}
11195 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11196 test -n "$verbose" && echo " found package xt" 1>&6
11198 echo "${as_me:-configure}:11198: testing found package xt ..." 1>&5
11200 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11201 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
11202 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11204 echo "${as_me:-configure}:11204: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11206 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
11208 echo "${as_me:-configure}:11208: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11213 cf_new_extra_cppflags=
11215 for cf_add_cflags in $cf_pkgconfig_incs
11217 case $cf_fix_cppflags in
11219 case $cf_add_cflags in #(vi
11220 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11221 case $cf_add_cflags in
11223 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11225 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11226 && test -z "${cf_tst_cflags}" \
11227 && cf_fix_cppflags=yes
11229 if test $cf_fix_cppflags = yes ; then
11230 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11232 elif test "${cf_tst_cflags}" = "\"'" ; then
11233 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11238 case "$CPPFLAGS" in
11239 *$cf_add_cflags) #(vi
11242 case $cf_add_cflags in #(vi
11244 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11246 CPPFLAGS=`echo "$CPPFLAGS" | \
11247 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11248 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11252 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11257 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11262 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11264 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11266 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11267 && test -z "${cf_tst_cflags}" \
11268 && cf_fix_cppflags=no
11273 if test -n "$cf_new_cflags" ; then
11275 CFLAGS="$CFLAGS $cf_new_cflags"
11278 if test -n "$cf_new_cppflags" ; then
11280 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11283 if test -n "$cf_new_extra_cppflags" ; then
11285 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11288 cf_add_libs="$cf_pkgconfig_libs"
11289 # Filter out duplicates - this happens with badly-designed ".pc" files...
11290 for cf_add_1lib in $LIBS
11292 for cf_add_2lib in $cf_add_libs
11294 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11300 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11302 LIBS="$cf_add_libs"
11304 case "x$LIBS" in #(vi
11308 # we have an "xt" package, but it may omit Xt's dependency on X11
11309 echo "$as_me:11309: checking for usable X dependency" >&5
11310 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
11311 if test "${cf_cv_xt_x11_compat+set}" = set; then
11312 echo $ECHO_N "(cached) $ECHO_C" >&6
11315 cat >conftest.$ac_ext <<_ACEOF
11316 #line 11316 "configure"
11317 #include "confdefs.h"
11319 #include <X11/Xlib.h>
11325 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
11326 int rc2 = XClearWindow((Display*) 0, (Window) 0);
11327 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
11328 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
11334 rm -f conftest.$ac_objext conftest$ac_exeext
11335 if { (eval echo "$as_me:11335: \"$ac_link\"") >&5
11336 (eval $ac_link) 2>&5
11338 echo "$as_me:11338: \$? = $ac_status" >&5
11339 (exit $ac_status); } &&
11340 { ac_try='test -s conftest$ac_exeext'
11341 { (eval echo "$as_me:11341: \"$ac_try\"") >&5
11342 (eval $ac_try) 2>&5
11344 echo "$as_me:11344: \$? = $ac_status" >&5
11345 (exit $ac_status); }; }; then
11346 cf_cv_xt_x11_compat=yes
11348 echo "$as_me: failed program was:" >&5
11349 cat conftest.$ac_ext >&5
11350 cf_cv_xt_x11_compat=no
11352 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11354 echo "$as_me:11354: result: $cf_cv_xt_x11_compat" >&5
11355 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
11356 if test "$cf_cv_xt_x11_compat" = no
11358 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
11360 echo "${as_me:-configure}:11360: testing work around broken X11 dependency ..." 1>&5
11362 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
11364 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11365 test -n "$verbose" && echo " found package x11" 1>&6
11367 echo "${as_me:-configure}:11367: testing found package x11 ..." 1>&5
11369 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11370 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
11371 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11373 echo "${as_me:-configure}:11373: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11375 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11377 echo "${as_me:-configure}:11377: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11382 cf_new_extra_cppflags=
11384 for cf_add_cflags in $cf_pkgconfig_incs
11386 case $cf_fix_cppflags in
11388 case $cf_add_cflags in #(vi
11389 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11390 case $cf_add_cflags in
11392 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11394 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11395 && test -z "${cf_tst_cflags}" \
11396 && cf_fix_cppflags=yes
11398 if test $cf_fix_cppflags = yes ; then
11399 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11401 elif test "${cf_tst_cflags}" = "\"'" ; then
11402 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11407 case "$CPPFLAGS" in
11408 *$cf_add_cflags) #(vi
11411 case $cf_add_cflags in #(vi
11413 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11415 CPPFLAGS=`echo "$CPPFLAGS" | \
11416 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11417 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11421 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11426 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11431 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11433 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11435 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11436 && test -z "${cf_tst_cflags}" \
11437 && cf_fix_cppflags=no
11442 if test -n "$cf_new_cflags" ; then
11444 CFLAGS="$CFLAGS $cf_new_cflags"
11447 if test -n "$cf_new_cppflags" ; then
11449 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11452 if test -n "$cf_new_extra_cppflags" ; then
11454 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11457 cf_add_libs="$cf_pkgconfig_libs"
11458 # Filter out duplicates - this happens with badly-designed ".pc" files...
11459 for cf_add_1lib in $LIBS
11461 for cf_add_2lib in $cf_add_libs
11463 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11469 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11471 LIBS="$cf_add_libs"
11478 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11480 echo "${as_me:-configure}:11480: testing ...before $LIBS ..." 1>&5
11482 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
11483 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11485 echo "${as_me:-configure}:11485: testing ...after $LIBS ..." 1>&5
11493 echo "$as_me:11493: checking for usable X Toolkit package" >&5
11494 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
11495 if test "${cf_cv_xt_ice_compat+set}" = set; then
11496 echo $ECHO_N "(cached) $ECHO_C" >&6
11499 cat >conftest.$ac_ext <<_ACEOF
11500 #line 11500 "configure"
11501 #include "confdefs.h"
11503 #include <X11/Shell.h>
11508 int num = IceConnectionNumber(0)
11514 rm -f conftest.$ac_objext conftest$ac_exeext
11515 if { (eval echo "$as_me:11515: \"$ac_link\"") >&5
11516 (eval $ac_link) 2>&5
11518 echo "$as_me:11518: \$? = $ac_status" >&5
11519 (exit $ac_status); } &&
11520 { ac_try='test -s conftest$ac_exeext'
11521 { (eval echo "$as_me:11521: \"$ac_try\"") >&5
11522 (eval $ac_try) 2>&5
11524 echo "$as_me:11524: \$? = $ac_status" >&5
11525 (exit $ac_status); }; }; then
11526 cf_cv_xt_ice_compat=yes
11528 echo "$as_me: failed program was:" >&5
11529 cat conftest.$ac_ext >&5
11530 cf_cv_xt_ice_compat=no
11532 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11534 echo "$as_me:11534: result: $cf_cv_xt_ice_compat" >&5
11535 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
11537 if test "$cf_cv_xt_ice_compat" = no
11539 # workaround for broken ".pc" files used for X Toolkit.
11540 case "x$X_PRE_LIBS" in #(vi
11542 case "x$LIBS" in #(vi
11546 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
11548 echo "${as_me:-configure}:11548: testing work around broken ICE dependency ..." 1>&5
11550 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11551 test -n "$verbose" && echo " found package ice" 1>&6
11553 echo "${as_me:-configure}:11553: testing found package ice ..." 1>&5
11555 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11556 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
11557 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11559 echo "${as_me:-configure}:11559: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11561 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
11563 echo "${as_me:-configure}:11563: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11568 cf_new_extra_cppflags=
11570 for cf_add_cflags in $cf_pkgconfig_incs
11572 case $cf_fix_cppflags in
11574 case $cf_add_cflags in #(vi
11575 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11576 case $cf_add_cflags in
11578 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11580 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11581 && test -z "${cf_tst_cflags}" \
11582 && cf_fix_cppflags=yes
11584 if test $cf_fix_cppflags = yes ; then
11585 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11587 elif test "${cf_tst_cflags}" = "\"'" ; then
11588 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11593 case "$CPPFLAGS" in
11594 *$cf_add_cflags) #(vi
11597 case $cf_add_cflags in #(vi
11599 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11601 CPPFLAGS=`echo "$CPPFLAGS" | \
11602 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11603 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11607 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11612 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11617 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11619 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11621 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11622 && test -z "${cf_tst_cflags}" \
11623 && cf_fix_cppflags=no
11628 if test -n "$cf_new_cflags" ; then
11630 CFLAGS="$CFLAGS $cf_new_cflags"
11633 if test -n "$cf_new_cppflags" ; then
11635 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11638 if test -n "$cf_new_extra_cppflags" ; then
11640 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11643 cf_add_libs="$cf_pkgconfig_libs"
11644 # Filter out duplicates - this happens with badly-designed ".pc" files...
11645 for cf_add_1lib in $LIBS
11647 for cf_add_2lib in $cf_add_libs
11649 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11655 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11657 LIBS="$cf_add_libs"
11659 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
11660 test -n "$verbose" && echo " found package sm" 1>&6
11662 echo "${as_me:-configure}:11662: testing found package sm ..." 1>&5
11664 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
11665 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
11666 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11668 echo "${as_me:-configure}:11668: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11670 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
11672 echo "${as_me:-configure}:11672: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11677 cf_new_extra_cppflags=
11679 for cf_add_cflags in $cf_pkgconfig_incs
11681 case $cf_fix_cppflags in
11683 case $cf_add_cflags in #(vi
11684 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11685 case $cf_add_cflags in
11687 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11689 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11690 && test -z "${cf_tst_cflags}" \
11691 && cf_fix_cppflags=yes
11693 if test $cf_fix_cppflags = yes ; then
11694 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11696 elif test "${cf_tst_cflags}" = "\"'" ; then
11697 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11702 case "$CPPFLAGS" in
11703 *$cf_add_cflags) #(vi
11706 case $cf_add_cflags in #(vi
11708 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11710 CPPFLAGS=`echo "$CPPFLAGS" | \
11711 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11712 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11716 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11721 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11726 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11728 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11730 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11731 && test -z "${cf_tst_cflags}" \
11732 && cf_fix_cppflags=no
11737 if test -n "$cf_new_cflags" ; then
11739 CFLAGS="$CFLAGS $cf_new_cflags"
11742 if test -n "$cf_new_cppflags" ; then
11744 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11747 if test -n "$cf_new_extra_cppflags" ; then
11749 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11752 cf_add_libs="$cf_pkgconfig_libs"
11753 # Filter out duplicates - this happens with badly-designed ".pc" files...
11754 for cf_add_1lib in $LIBS
11756 for cf_add_2lib in $cf_add_libs
11758 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11764 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11766 LIBS="$cf_add_libs"
11779 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11781 echo "${as_me:-configure}:11781: testing ...before $LIBS ..." 1>&5
11783 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
11784 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11786 echo "${as_me:-configure}:11786: testing ...after $LIBS ..." 1>&5
11802 LDFLAGS="$X_LIBS $LDFLAGS"
11804 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
11806 echo "${as_me:-configure}:11806: testing checking additions to CFLAGS ..." 1>&5
11808 cf_check_cflags="$CFLAGS"
11809 cf_check_cppflags="$CPPFLAGS"
11814 cf_new_extra_cppflags=
11816 for cf_add_cflags in $X_CFLAGS
11818 case $cf_fix_cppflags in
11820 case $cf_add_cflags in #(vi
11821 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11822 case $cf_add_cflags in
11824 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11826 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11827 && test -z "${cf_tst_cflags}" \
11828 && cf_fix_cppflags=yes
11830 if test $cf_fix_cppflags = yes ; then
11831 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11833 elif test "${cf_tst_cflags}" = "\"'" ; then
11834 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11839 case "$CPPFLAGS" in
11840 *$cf_add_cflags) #(vi
11843 case $cf_add_cflags in #(vi
11845 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11847 CPPFLAGS=`echo "$CPPFLAGS" | \
11848 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11849 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11853 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11858 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11863 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11865 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11867 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11868 && test -z "${cf_tst_cflags}" \
11869 && cf_fix_cppflags=no
11874 if test -n "$cf_new_cflags" ; then
11875 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
11877 echo "${as_me:-configure}:11877: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11879 CFLAGS="$CFLAGS $cf_new_cflags"
11882 if test -n "$cf_new_cppflags" ; then
11883 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11885 echo "${as_me:-configure}:11885: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11887 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11890 if test -n "$cf_new_extra_cppflags" ; then
11891 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11893 echo "${as_me:-configure}:11893: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11895 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11898 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
11899 cat >conftest.$ac_ext <<_ACEOF
11900 #line 11900 "configure"
11901 #include "confdefs.h"
11906 printf("Hello world");
11911 rm -f conftest.$ac_objext conftest$ac_exeext
11912 if { (eval echo "$as_me:11912: \"$ac_link\"") >&5
11913 (eval $ac_link) 2>&5
11915 echo "$as_me:11915: \$? = $ac_status" >&5
11916 (exit $ac_status); } &&
11917 { ac_try='test -s conftest$ac_exeext'
11918 { (eval echo "$as_me:11918: \"$ac_try\"") >&5
11919 (eval $ac_try) 2>&5
11921 echo "$as_me:11921: \$? = $ac_status" >&5
11922 (exit $ac_status); }; }; then
11925 echo "$as_me: failed program was:" >&5
11926 cat conftest.$ac_ext >&5
11927 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
11929 echo "${as_me:-configure}:11929: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
11931 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
11932 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
11934 echo "${as_me:-configure}:11934: testing but keeping change to \$CPPFLAGS ..." 1>&5
11937 CFLAGS="$cf_check_flags"
11939 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11942 echo "$as_me:11942: checking for XOpenDisplay" >&5
11943 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
11944 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
11945 echo $ECHO_N "(cached) $ECHO_C" >&6
11947 cat >conftest.$ac_ext <<_ACEOF
11948 #line 11948 "configure"
11949 #include "confdefs.h"
11950 /* System header to define __stub macros and hopefully few prototypes,
11951 which can conflict with char XOpenDisplay (); below. */
11952 #include <assert.h>
11953 /* Override any gcc2 internal prototype to avoid an error. */
11957 /* We use char because int might match the return type of a gcc2
11958 builtin and then its argument prototype would still apply. */
11959 char XOpenDisplay ();
11965 /* The GNU C library defines this for functions which it implements
11966 to always fail with ENOSYS. Some functions are actually named
11967 something starting with __ and the normal name is an alias. */
11968 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
11971 f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11978 rm -f conftest.$ac_objext conftest$ac_exeext
11979 if { (eval echo "$as_me:11979: \"$ac_link\"") >&5
11980 (eval $ac_link) 2>&5
11982 echo "$as_me:11982: \$? = $ac_status" >&5
11983 (exit $ac_status); } &&
11984 { ac_try='test -s conftest$ac_exeext'
11985 { (eval echo "$as_me:11985: \"$ac_try\"") >&5
11986 (eval $ac_try) 2>&5
11988 echo "$as_me:11988: \$? = $ac_status" >&5
11989 (exit $ac_status); }; }; then
11990 ac_cv_func_XOpenDisplay=yes
11992 echo "$as_me: failed program was:" >&5
11993 cat conftest.$ac_ext >&5
11994 ac_cv_func_XOpenDisplay=no
11996 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11998 echo "$as_me:11998: result: $ac_cv_func_XOpenDisplay" >&5
11999 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
12000 if test $ac_cv_func_XOpenDisplay = yes; then
12004 echo "$as_me:12004: checking for XOpenDisplay in -lX11" >&5
12005 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12006 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12007 echo $ECHO_N "(cached) $ECHO_C" >&6
12009 ac_check_lib_save_LIBS=$LIBS
12010 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12011 cat >conftest.$ac_ext <<_ACEOF
12012 #line 12012 "configure"
12013 #include "confdefs.h"
12015 /* Override any gcc2 internal prototype to avoid an error. */
12019 /* We use char because int might match the return type of a gcc2
12020 builtin and then its argument prototype would still apply. */
12021 char XOpenDisplay ();
12030 rm -f conftest.$ac_objext conftest$ac_exeext
12031 if { (eval echo "$as_me:12031: \"$ac_link\"") >&5
12032 (eval $ac_link) 2>&5
12034 echo "$as_me:12034: \$? = $ac_status" >&5
12035 (exit $ac_status); } &&
12036 { ac_try='test -s conftest$ac_exeext'
12037 { (eval echo "$as_me:12037: \"$ac_try\"") >&5
12038 (eval $ac_try) 2>&5
12040 echo "$as_me:12040: \$? = $ac_status" >&5
12041 (exit $ac_status); }; }; then
12042 ac_cv_lib_X11_XOpenDisplay=yes
12044 echo "$as_me: failed program was:" >&5
12045 cat conftest.$ac_ext >&5
12046 ac_cv_lib_X11_XOpenDisplay=no
12048 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12049 LIBS=$ac_check_lib_save_LIBS
12051 echo "$as_me:12051: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12052 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12053 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12055 cf_add_libs="-lX11"
12056 # Filter out duplicates - this happens with badly-designed ".pc" files...
12057 for cf_add_1lib in $LIBS
12059 for cf_add_2lib in $cf_add_libs
12061 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12067 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12069 LIBS="$cf_add_libs"
12075 echo "$as_me:12075: checking for XtAppInitialize" >&5
12076 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
12077 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
12078 echo $ECHO_N "(cached) $ECHO_C" >&6
12080 cat >conftest.$ac_ext <<_ACEOF
12081 #line 12081 "configure"
12082 #include "confdefs.h"
12083 /* System header to define __stub macros and hopefully few prototypes,
12084 which can conflict with char XtAppInitialize (); below. */
12085 #include <assert.h>
12086 /* Override any gcc2 internal prototype to avoid an error. */
12090 /* We use char because int might match the return type of a gcc2
12091 builtin and then its argument prototype would still apply. */
12092 char XtAppInitialize ();
12098 /* The GNU C library defines this for functions which it implements
12099 to always fail with ENOSYS. Some functions are actually named
12100 something starting with __ and the normal name is an alias. */
12101 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
12104 f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12111 rm -f conftest.$ac_objext conftest$ac_exeext
12112 if { (eval echo "$as_me:12112: \"$ac_link\"") >&5
12113 (eval $ac_link) 2>&5
12115 echo "$as_me:12115: \$? = $ac_status" >&5
12116 (exit $ac_status); } &&
12117 { ac_try='test -s conftest$ac_exeext'
12118 { (eval echo "$as_me:12118: \"$ac_try\"") >&5
12119 (eval $ac_try) 2>&5
12121 echo "$as_me:12121: \$? = $ac_status" >&5
12122 (exit $ac_status); }; }; then
12123 ac_cv_func_XtAppInitialize=yes
12125 echo "$as_me: failed program was:" >&5
12126 cat conftest.$ac_ext >&5
12127 ac_cv_func_XtAppInitialize=no
12129 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12131 echo "$as_me:12131: result: $ac_cv_func_XtAppInitialize" >&5
12132 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
12133 if test $ac_cv_func_XtAppInitialize = yes; then
12137 echo "$as_me:12137: checking for XtAppInitialize in -lXt" >&5
12138 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
12139 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
12140 echo $ECHO_N "(cached) $ECHO_C" >&6
12142 ac_check_lib_save_LIBS=$LIBS
12143 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12144 cat >conftest.$ac_ext <<_ACEOF
12145 #line 12145 "configure"
12146 #include "confdefs.h"
12148 /* Override any gcc2 internal prototype to avoid an error. */
12152 /* We use char because int might match the return type of a gcc2
12153 builtin and then its argument prototype would still apply. */
12154 char XtAppInitialize ();
12158 XtAppInitialize ();
12163 rm -f conftest.$ac_objext conftest$ac_exeext
12164 if { (eval echo "$as_me:12164: \"$ac_link\"") >&5
12165 (eval $ac_link) 2>&5
12167 echo "$as_me:12167: \$? = $ac_status" >&5
12168 (exit $ac_status); } &&
12169 { ac_try='test -s conftest$ac_exeext'
12170 { (eval echo "$as_me:12170: \"$ac_try\"") >&5
12171 (eval $ac_try) 2>&5
12173 echo "$as_me:12173: \$? = $ac_status" >&5
12174 (exit $ac_status); }; }; then
12175 ac_cv_lib_Xt_XtAppInitialize=yes
12177 echo "$as_me: failed program was:" >&5
12178 cat conftest.$ac_ext >&5
12179 ac_cv_lib_Xt_XtAppInitialize=no
12181 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12182 LIBS=$ac_check_lib_save_LIBS
12184 echo "$as_me:12184: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
12185 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
12186 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
12188 cat >>confdefs.h <<\EOF
12189 #define HAVE_LIBXT 1
12193 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
12200 if test $cf_have_X_LIBS = no ; then
12201 { echo "$as_me:12201: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12202 test program. You will have to check and add the proper libraries by hand
12204 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12205 test program. You will have to check and add the proper libraries by hand
12206 to makefile." >&2;}
12209 cf_x_athena_root=$cf_x_athena
12212 for cf_path in default \
12213 /usr/contrib/X11R6 \
12214 /usr/contrib/X11R5 \
12218 if test -z "$cf_x_athena_inc" ; then
12219 cf_save="$CPPFLAGS"
12220 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
12221 if test $cf_path != default ; then
12222 CPPFLAGS="$cf_save -I$cf_path/include"
12223 echo "$as_me:12223: checking for $cf_test in $cf_path" >&5
12224 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
12226 echo "$as_me:12226: checking for $cf_test" >&5
12227 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
12229 cat >conftest.$ac_ext <<_ACEOF
12230 #line 12230 "configure"
12231 #include "confdefs.h"
12233 #include <X11/Intrinsic.h>
12234 #include <$cf_test>
12243 rm -f conftest.$ac_objext
12244 if { (eval echo "$as_me:12244: \"$ac_compile\"") >&5
12245 (eval $ac_compile) 2>&5
12247 echo "$as_me:12247: \$? = $ac_status" >&5
12248 (exit $ac_status); } &&
12249 { ac_try='test -s conftest.$ac_objext'
12250 { (eval echo "$as_me:12250: \"$ac_try\"") >&5
12251 (eval $ac_try) 2>&5
12253 echo "$as_me:12253: \$? = $ac_status" >&5
12254 (exit $ac_status); }; }; then
12257 echo "$as_me: failed program was:" >&5
12258 cat conftest.$ac_ext >&5
12261 rm -f conftest.$ac_objext conftest.$ac_ext
12262 echo "$as_me:12262: result: $cf_result" >&5
12263 echo "${ECHO_T}$cf_result" >&6
12264 if test "$cf_result" = yes ; then
12265 cf_x_athena_inc=$cf_path
12268 CPPFLAGS="$cf_save"
12273 if test -z "$cf_x_athena_inc" ; then
12274 { echo "$as_me:12274: WARNING: Unable to successfully find Athena header files with test program" >&5
12275 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
12276 elif test "$cf_x_athena_inc" != default ; then
12277 CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
12280 cf_x_athena_root=$cf_x_athena
12283 for cf_path in default \
12284 /usr/contrib/X11R6 \
12285 /usr/contrib/X11R5 \
12290 ${cf_x_athena_root} \
12291 ${cf_x_athena_root}7 \
12292 ${cf_x_athena_root}6
12295 "-l$cf_lib -lXmu" \
12296 "-l$cf_lib -lXpm -lXmu" \
12297 "-l${cf_lib}_s -lXmu_s"
12299 if test -z "$cf_x_athena_lib" ; then
12301 cf_test=XawSimpleMenuAddGlobalActions
12302 if test $cf_path != default ; then
12304 cf_add_libs="-L$cf_path/lib $cf_libs"
12305 # Filter out duplicates - this happens with badly-designed ".pc" files...
12306 for cf_add_1lib in $LIBS
12308 for cf_add_2lib in $cf_add_libs
12310 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12316 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12318 LIBS="$cf_add_libs"
12320 echo "$as_me:12320: checking for $cf_libs in $cf_path" >&5
12321 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
12324 cf_add_libs="$cf_libs"
12325 # Filter out duplicates - this happens with badly-designed ".pc" files...
12326 for cf_add_1lib in $LIBS
12328 for cf_add_2lib in $cf_add_libs
12330 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12336 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12338 LIBS="$cf_add_libs"
12340 echo "$as_me:12340: checking for $cf_test in $cf_libs" >&5
12341 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
12343 cat >conftest.$ac_ext <<_ACEOF
12344 #line 12344 "configure"
12345 #include "confdefs.h"
12347 #include <X11/Intrinsic.h>
12348 #include <X11/$cf_x_athena_root/SimpleMenu.h>
12354 $cf_test((XtAppContext) 0)
12359 rm -f conftest.$ac_objext conftest$ac_exeext
12360 if { (eval echo "$as_me:12360: \"$ac_link\"") >&5
12361 (eval $ac_link) 2>&5
12363 echo "$as_me:12363: \$? = $ac_status" >&5
12364 (exit $ac_status); } &&
12365 { ac_try='test -s conftest$ac_exeext'
12366 { (eval echo "$as_me:12366: \"$ac_try\"") >&5
12367 (eval $ac_try) 2>&5
12369 echo "$as_me:12369: \$? = $ac_status" >&5
12370 (exit $ac_status); }; }; then
12373 echo "$as_me: failed program was:" >&5
12374 cat conftest.$ac_ext >&5
12377 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12378 echo "$as_me:12378: result: $cf_result" >&5
12379 echo "${ECHO_T}$cf_result" >&6
12380 if test "$cf_result" = yes ; then
12381 cf_x_athena_lib="$cf_libs"
12387 test -n "$cf_x_athena_lib" && break
12391 if test -z "$cf_x_athena_lib" ; then
12392 { { echo "$as_me:12392: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
12393 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
12394 { (exit 1); exit 1; }; }
12397 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12399 cat >>confdefs.h <<EOF
12400 #define $cf_x_athena_LIBS 1
12405 if test -n "$ac_tool_prefix"; then
12406 for ac_prog in xcurses-config
12408 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12409 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12410 echo "$as_me:12410: checking for $ac_word" >&5
12411 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12412 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
12413 echo $ECHO_N "(cached) $ECHO_C" >&6
12415 if test -n "$XCURSES_CONFIG"; then
12416 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
12418 ac_save_IFS=$IFS; IFS=$ac_path_separator
12420 for ac_dir in $ac_dummy; do
12422 test -z "$ac_dir" && ac_dir=.
12423 $as_executable_p "$ac_dir/$ac_word" || continue
12424 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
12425 echo "$as_me:12425: found $ac_dir/$ac_word" >&5
12431 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
12432 if test -n "$XCURSES_CONFIG"; then
12433 echo "$as_me:12433: result: $XCURSES_CONFIG" >&5
12434 echo "${ECHO_T}$XCURSES_CONFIG" >&6
12436 echo "$as_me:12436: result: no" >&5
12437 echo "${ECHO_T}no" >&6
12440 test -n "$XCURSES_CONFIG" && break
12443 if test -z "$XCURSES_CONFIG"; then
12444 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
12445 for ac_prog in xcurses-config
12447 # Extract the first word of "$ac_prog", so it can be a program name with args.
12448 set dummy $ac_prog; ac_word=$2
12449 echo "$as_me:12449: checking for $ac_word" >&5
12450 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12451 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
12452 echo $ECHO_N "(cached) $ECHO_C" >&6
12454 if test -n "$ac_ct_XCURSES_CONFIG"; then
12455 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
12457 ac_save_IFS=$IFS; IFS=$ac_path_separator
12459 for ac_dir in $ac_dummy; do
12461 test -z "$ac_dir" && ac_dir=.
12462 $as_executable_p "$ac_dir/$ac_word" || continue
12463 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
12464 echo "$as_me:12464: found $ac_dir/$ac_word" >&5
12470 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
12471 if test -n "$ac_ct_XCURSES_CONFIG"; then
12472 echo "$as_me:12472: result: $ac_ct_XCURSES_CONFIG" >&5
12473 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
12475 echo "$as_me:12475: result: no" >&5
12476 echo "${ECHO_T}no" >&6
12479 test -n "$ac_ct_XCURSES_CONFIG" && break
12481 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
12483 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
12486 if test "$XCURSES_CONFIG" != none ; then
12488 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
12490 cf_add_libs="`$XCURSES_CONFIG --libs`"
12491 # Filter out duplicates - this happens with badly-designed ".pc" files...
12492 for cf_add_1lib in $LIBS
12494 for cf_add_2lib in $cf_add_libs
12496 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12502 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12504 LIBS="$cf_add_libs"
12506 cf_cv_lib_XCurses=yes
12510 LDFLAGS="$LDFLAGS $X_LIBS"
12512 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
12514 echo "${as_me:-configure}:12514: testing checking additions to CFLAGS ..." 1>&5
12516 cf_check_cflags="$CFLAGS"
12517 cf_check_cppflags="$CPPFLAGS"
12522 cf_new_extra_cppflags=
12524 for cf_add_cflags in $X_CFLAGS
12526 case $cf_fix_cppflags in
12528 case $cf_add_cflags in #(vi
12529 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12530 case $cf_add_cflags in
12532 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12534 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12535 && test -z "${cf_tst_cflags}" \
12536 && cf_fix_cppflags=yes
12538 if test $cf_fix_cppflags = yes ; then
12539 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12541 elif test "${cf_tst_cflags}" = "\"'" ; then
12542 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12547 case "$CPPFLAGS" in
12548 *$cf_add_cflags) #(vi
12551 case $cf_add_cflags in #(vi
12553 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12555 CPPFLAGS=`echo "$CPPFLAGS" | \
12556 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12557 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12561 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12566 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12571 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12573 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12575 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12576 && test -z "${cf_tst_cflags}" \
12577 && cf_fix_cppflags=no
12582 if test -n "$cf_new_cflags" ; then
12583 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12585 echo "${as_me:-configure}:12585: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12587 CFLAGS="$CFLAGS $cf_new_cflags"
12590 if test -n "$cf_new_cppflags" ; then
12591 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12593 echo "${as_me:-configure}:12593: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12595 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12598 if test -n "$cf_new_extra_cppflags" ; then
12599 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12601 echo "${as_me:-configure}:12601: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12603 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12606 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
12607 cat >conftest.$ac_ext <<_ACEOF
12608 #line 12608 "configure"
12609 #include "confdefs.h"
12614 printf("Hello world");
12619 rm -f conftest.$ac_objext conftest$ac_exeext
12620 if { (eval echo "$as_me:12620: \"$ac_link\"") >&5
12621 (eval $ac_link) 2>&5
12623 echo "$as_me:12623: \$? = $ac_status" >&5
12624 (exit $ac_status); } &&
12625 { ac_try='test -s conftest$ac_exeext'
12626 { (eval echo "$as_me:12626: \"$ac_try\"") >&5
12627 (eval $ac_try) 2>&5
12629 echo "$as_me:12629: \$? = $ac_status" >&5
12630 (exit $ac_status); }; }; then
12633 echo "$as_me: failed program was:" >&5
12634 cat conftest.$ac_ext >&5
12635 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
12637 echo "${as_me:-configure}:12637: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
12639 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
12640 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
12642 echo "${as_me:-configure}:12642: testing but keeping change to \$CPPFLAGS ..." 1>&5
12645 CFLAGS="$cf_check_flags"
12647 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12650 echo "$as_me:12650: checking for XOpenDisplay in -lX11" >&5
12651 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12652 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12653 echo $ECHO_N "(cached) $ECHO_C" >&6
12655 ac_check_lib_save_LIBS=$LIBS
12656 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12657 cat >conftest.$ac_ext <<_ACEOF
12658 #line 12658 "configure"
12659 #include "confdefs.h"
12661 /* Override any gcc2 internal prototype to avoid an error. */
12665 /* We use char because int might match the return type of a gcc2
12666 builtin and then its argument prototype would still apply. */
12667 char XOpenDisplay ();
12676 rm -f conftest.$ac_objext conftest$ac_exeext
12677 if { (eval echo "$as_me:12677: \"$ac_link\"") >&5
12678 (eval $ac_link) 2>&5
12680 echo "$as_me:12680: \$? = $ac_status" >&5
12681 (exit $ac_status); } &&
12682 { ac_try='test -s conftest$ac_exeext'
12683 { (eval echo "$as_me:12683: \"$ac_try\"") >&5
12684 (eval $ac_try) 2>&5
12686 echo "$as_me:12686: \$? = $ac_status" >&5
12687 (exit $ac_status); }; }; then
12688 ac_cv_lib_X11_XOpenDisplay=yes
12690 echo "$as_me: failed program was:" >&5
12691 cat conftest.$ac_ext >&5
12692 ac_cv_lib_X11_XOpenDisplay=no
12694 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12695 LIBS=$ac_check_lib_save_LIBS
12697 echo "$as_me:12697: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12698 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12699 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12701 cf_add_libs="-lX11"
12702 # Filter out duplicates - this happens with badly-designed ".pc" files...
12703 for cf_add_1lib in $LIBS
12705 for cf_add_2lib in $cf_add_libs
12707 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12713 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12715 LIBS="$cf_add_libs"
12719 echo "$as_me:12719: checking for XCurses library" >&5
12720 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
12721 if test "${cf_cv_lib_XCurses+set}" = set; then
12722 echo $ECHO_N "(cached) $ECHO_C" >&6
12725 cf_add_libs="-lXCurses"
12726 # Filter out duplicates - this happens with badly-designed ".pc" files...
12727 for cf_add_1lib in $LIBS
12729 for cf_add_2lib in $cf_add_libs
12731 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12737 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12739 LIBS="$cf_add_libs"
12741 cat >conftest.$ac_ext <<_ACEOF
12742 #line 12742 "configure"
12743 #include "confdefs.h"
12745 #include <xcurses.h>
12746 char *XCursesProgramName = "test";
12756 rm -f conftest.$ac_objext conftest$ac_exeext
12757 if { (eval echo "$as_me:12757: \"$ac_link\"") >&5
12758 (eval $ac_link) 2>&5
12760 echo "$as_me:12760: \$? = $ac_status" >&5
12761 (exit $ac_status); } &&
12762 { ac_try='test -s conftest$ac_exeext'
12763 { (eval echo "$as_me:12763: \"$ac_try\"") >&5
12764 (eval $ac_try) 2>&5
12766 echo "$as_me:12766: \$? = $ac_status" >&5
12767 (exit $ac_status); }; }; then
12768 cf_cv_lib_XCurses=yes
12770 echo "$as_me: failed program was:" >&5
12771 cat conftest.$ac_ext >&5
12772 cf_cv_lib_XCurses=no
12774 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12777 echo "$as_me:12777: result: $cf_cv_lib_XCurses" >&5
12778 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
12782 if test $cf_cv_lib_XCurses = yes ; then
12784 cat >>confdefs.h <<\EOF
12788 cat >>confdefs.h <<\EOF
12792 echo "$as_me:12792: checking for xcurses.h" >&5
12793 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
12794 if test "${ac_cv_header_xcurses_h+set}" = set; then
12795 echo $ECHO_N "(cached) $ECHO_C" >&6
12797 cat >conftest.$ac_ext <<_ACEOF
12798 #line 12798 "configure"
12799 #include "confdefs.h"
12800 #include <xcurses.h>
12802 if { (eval echo "$as_me:12802: \"$ac_cpp conftest.$ac_ext\"") >&5
12803 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12805 egrep -v '^ *\+' conftest.er1 >conftest.err
12807 cat conftest.err >&5
12808 echo "$as_me:12808: \$? = $ac_status" >&5
12809 (exit $ac_status); } >/dev/null; then
12810 if test -s conftest.err; then
12811 ac_cpp_err=$ac_c_preproc_warn_flag
12818 if test -z "$ac_cpp_err"; then
12819 ac_cv_header_xcurses_h=yes
12821 echo "$as_me: failed program was:" >&5
12822 cat conftest.$ac_ext >&5
12823 ac_cv_header_xcurses_h=no
12825 rm -f conftest.err conftest.$ac_ext
12827 echo "$as_me:12827: result: $ac_cv_header_xcurses_h" >&5
12828 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
12829 if test $ac_cv_header_xcurses_h = yes; then
12831 cat >>confdefs.h <<\EOF
12832 #define HAVE_XCURSES 1
12838 { { echo "$as_me:12838: error: Cannot link with XCurses" >&5
12839 echo "$as_me: error: Cannot link with XCurses" >&2;}
12840 { (exit 1); exit 1; }; }
12846 case $cf_cv_screen in
12849 echo "$as_me:12849: checking for NetBSD form.h" >&5
12850 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
12851 if test "${cf_cv_netbsd_form_h+set}" = set; then
12852 echo $ECHO_N "(cached) $ECHO_C" >&6
12855 cat >conftest.$ac_ext <<_ACEOF
12856 #line 12856 "configure"
12857 #include "confdefs.h"
12859 #include <${cf_cv_ncurses_header:-curses.h}>
12867 int y = current_field(form)->cursor_ypos;
12868 int x = current_field(form)->cursor_xpos;
12874 rm -f conftest.$ac_objext
12875 if { (eval echo "$as_me:12875: \"$ac_compile\"") >&5
12876 (eval $ac_compile) 2>&5
12878 echo "$as_me:12878: \$? = $ac_status" >&5
12879 (exit $ac_status); } &&
12880 { ac_try='test -s conftest.$ac_objext'
12881 { (eval echo "$as_me:12881: \"$ac_try\"") >&5
12882 (eval $ac_try) 2>&5
12884 echo "$as_me:12884: \$? = $ac_status" >&5
12885 (exit $ac_status); }; }; then
12886 cf_cv_netbsd_form_h=yes
12889 echo "$as_me: failed program was:" >&5
12890 cat conftest.$ac_ext >&5
12891 cf_cv_netbsd_form_h=no
12893 rm -f conftest.$ac_objext conftest.$ac_ext
12896 echo "$as_me:12896: result: $cf_cv_netbsd_form_h" >&5
12897 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
12899 test "$cf_cv_netbsd_form_h" = yes &&
12900 cat >>confdefs.h <<\EOF
12901 #define HAVE_NETBSD_FORM_H 1
12904 echo "$as_me:12904: checking for NetBSD menu.h" >&5
12905 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
12906 if test "${cf_cv_netbsd_menu_h+set}" = set; then
12907 echo $ECHO_N "(cached) $ECHO_C" >&6
12910 cat >conftest.$ac_ext <<_ACEOF
12911 #line 12911 "configure"
12912 #include "confdefs.h"
12914 #include <${cf_cv_ncurses_header:-curses.h}>
12922 int y = menu->max_item_width;
12928 rm -f conftest.$ac_objext
12929 if { (eval echo "$as_me:12929: \"$ac_compile\"") >&5
12930 (eval $ac_compile) 2>&5
12932 echo "$as_me:12932: \$? = $ac_status" >&5
12933 (exit $ac_status); } &&
12934 { ac_try='test -s conftest.$ac_objext'
12935 { (eval echo "$as_me:12935: \"$ac_try\"") >&5
12936 (eval $ac_try) 2>&5
12938 echo "$as_me:12938: \$? = $ac_status" >&5
12939 (exit $ac_status); }; }; then
12940 cf_cv_netbsd_menu_h=yes
12943 echo "$as_me: failed program was:" >&5
12944 cat conftest.$ac_ext >&5
12945 cf_cv_netbsd_menu_h=no
12947 rm -f conftest.$ac_objext conftest.$ac_ext
12950 echo "$as_me:12950: result: $cf_cv_netbsd_menu_h" >&5
12951 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
12953 test "$cf_cv_netbsd_menu_h" = yes &&
12954 cat >>confdefs.h <<\EOF
12955 #define HAVE_NETBSD_MENU_H 1
12964 case $cf_cv_screen in #(vi
12968 # look for curses-related libraries
12969 : ${cf_panel_lib:=panel}
12970 : ${cf_menu_lib:=menu}
12971 : ${cf_form_lib:=form}
12973 as_ac_Lib=`echo "ac_cv_lib_$cf_panel_lib$cf_cv_libtype''_new_panel" | $as_tr_sh`
12974 echo "$as_me:12974: checking for new_panel in -l$cf_panel_lib$cf_cv_libtype" >&5
12975 echo $ECHO_N "checking for new_panel in -l$cf_panel_lib$cf_cv_libtype... $ECHO_C" >&6
12976 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12977 echo $ECHO_N "(cached) $ECHO_C" >&6
12979 ac_check_lib_save_LIBS=$LIBS
12980 LIBS="-l$cf_panel_lib$cf_cv_libtype $LIBS"
12981 cat >conftest.$ac_ext <<_ACEOF
12982 #line 12982 "configure"
12983 #include "confdefs.h"
12985 /* Override any gcc2 internal prototype to avoid an error. */
12989 /* We use char because int might match the return type of a gcc2
12990 builtin and then its argument prototype would still apply. */
13000 rm -f conftest.$ac_objext conftest$ac_exeext
13001 if { (eval echo "$as_me:13001: \"$ac_link\"") >&5
13002 (eval $ac_link) 2>&5
13004 echo "$as_me:13004: \$? = $ac_status" >&5
13005 (exit $ac_status); } &&
13006 { ac_try='test -s conftest$ac_exeext'
13007 { (eval echo "$as_me:13007: \"$ac_try\"") >&5
13008 (eval $ac_try) 2>&5
13010 echo "$as_me:13010: \$? = $ac_status" >&5
13011 (exit $ac_status); }; }; then
13012 eval "$as_ac_Lib=yes"
13014 echo "$as_me: failed program was:" >&5
13015 cat conftest.$ac_ext >&5
13016 eval "$as_ac_Lib=no"
13018 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13019 LIBS=$ac_check_lib_save_LIBS
13021 echo "$as_me:13021: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13022 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13023 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13024 cat >>confdefs.h <<EOF
13025 #define `echo "HAVE_LIB$cf_panel_lib$cf_cv_libtype" | $as_tr_cpp` 1
13028 LIBS="-l$cf_panel_lib$cf_cv_libtype $LIBS"
13032 as_ac_Lib=`echo "ac_cv_lib_$cf_menu_lib$cf_cv_libtype''_menu_driver" | $as_tr_sh`
13033 echo "$as_me:13033: checking for menu_driver in -l$cf_menu_lib$cf_cv_libtype" >&5
13034 echo $ECHO_N "checking for menu_driver in -l$cf_menu_lib$cf_cv_libtype... $ECHO_C" >&6
13035 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13036 echo $ECHO_N "(cached) $ECHO_C" >&6
13038 ac_check_lib_save_LIBS=$LIBS
13039 LIBS="-l$cf_menu_lib$cf_cv_libtype $LIBS"
13040 cat >conftest.$ac_ext <<_ACEOF
13041 #line 13041 "configure"
13042 #include "confdefs.h"
13044 /* Override any gcc2 internal prototype to avoid an error. */
13048 /* We use char because int might match the return type of a gcc2
13049 builtin and then its argument prototype would still apply. */
13050 char menu_driver ();
13059 rm -f conftest.$ac_objext conftest$ac_exeext
13060 if { (eval echo "$as_me:13060: \"$ac_link\"") >&5
13061 (eval $ac_link) 2>&5
13063 echo "$as_me:13063: \$? = $ac_status" >&5
13064 (exit $ac_status); } &&
13065 { ac_try='test -s conftest$ac_exeext'
13066 { (eval echo "$as_me:13066: \"$ac_try\"") >&5
13067 (eval $ac_try) 2>&5
13069 echo "$as_me:13069: \$? = $ac_status" >&5
13070 (exit $ac_status); }; }; then
13071 eval "$as_ac_Lib=yes"
13073 echo "$as_me: failed program was:" >&5
13074 cat conftest.$ac_ext >&5
13075 eval "$as_ac_Lib=no"
13077 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13078 LIBS=$ac_check_lib_save_LIBS
13080 echo "$as_me:13080: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13081 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13082 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13083 cat >>confdefs.h <<EOF
13084 #define `echo "HAVE_LIB$cf_menu_lib$cf_cv_libtype" | $as_tr_cpp` 1
13087 LIBS="-l$cf_menu_lib$cf_cv_libtype $LIBS"
13091 as_ac_Lib=`echo "ac_cv_lib_$cf_form_lib$cf_cv_libtype''_form_driver" | $as_tr_sh`
13092 echo "$as_me:13092: checking for form_driver in -l$cf_form_lib$cf_cv_libtype" >&5
13093 echo $ECHO_N "checking for form_driver in -l$cf_form_lib$cf_cv_libtype... $ECHO_C" >&6
13094 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13095 echo $ECHO_N "(cached) $ECHO_C" >&6
13097 ac_check_lib_save_LIBS=$LIBS
13098 LIBS="-l$cf_form_lib$cf_cv_libtype $LIBS"
13099 cat >conftest.$ac_ext <<_ACEOF
13100 #line 13100 "configure"
13101 #include "confdefs.h"
13103 /* Override any gcc2 internal prototype to avoid an error. */
13107 /* We use char because int might match the return type of a gcc2
13108 builtin and then its argument prototype would still apply. */
13109 char form_driver ();
13118 rm -f conftest.$ac_objext conftest$ac_exeext
13119 if { (eval echo "$as_me:13119: \"$ac_link\"") >&5
13120 (eval $ac_link) 2>&5
13122 echo "$as_me:13122: \$? = $ac_status" >&5
13123 (exit $ac_status); } &&
13124 { ac_try='test -s conftest$ac_exeext'
13125 { (eval echo "$as_me:13125: \"$ac_try\"") >&5
13126 (eval $ac_try) 2>&5
13128 echo "$as_me:13128: \$? = $ac_status" >&5
13129 (exit $ac_status); }; }; then
13130 eval "$as_ac_Lib=yes"
13132 echo "$as_me: failed program was:" >&5
13133 cat conftest.$ac_ext >&5
13134 eval "$as_ac_Lib=no"
13136 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13137 LIBS=$ac_check_lib_save_LIBS
13139 echo "$as_me:13139: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13140 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13141 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13142 cat >>confdefs.h <<EOF
13143 #define `echo "HAVE_LIB$cf_form_lib$cf_cv_libtype" | $as_tr_cpp` 1
13146 LIBS="-l$cf_form_lib$cf_cv_libtype $LIBS"
13150 # look for curses-related headers
13161 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13162 echo "$as_me:13162: checking for $ac_header" >&5
13163 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13164 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13165 echo $ECHO_N "(cached) $ECHO_C" >&6
13167 cat >conftest.$ac_ext <<_ACEOF
13168 #line 13168 "configure"
13169 #include "confdefs.h"
13170 #include <$ac_header>
13172 if { (eval echo "$as_me:13172: \"$ac_cpp conftest.$ac_ext\"") >&5
13173 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13175 egrep -v '^ *\+' conftest.er1 >conftest.err
13177 cat conftest.err >&5
13178 echo "$as_me:13178: \$? = $ac_status" >&5
13179 (exit $ac_status); } >/dev/null; then
13180 if test -s conftest.err; then
13181 ac_cpp_err=$ac_c_preproc_warn_flag
13188 if test -z "$ac_cpp_err"; then
13189 eval "$as_ac_Header=yes"
13191 echo "$as_me: failed program was:" >&5
13192 cat conftest.$ac_ext >&5
13193 eval "$as_ac_Header=no"
13195 rm -f conftest.err conftest.$ac_ext
13197 echo "$as_me:13197: result: `eval echo '${'$as_ac_Header'}'`" >&5
13198 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13199 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13200 cat >>confdefs.h <<EOF
13201 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13210 echo "$as_me:13210: checking for ANSI C header files" >&5
13211 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13212 if test "${ac_cv_header_stdc+set}" = set; then
13213 echo $ECHO_N "(cached) $ECHO_C" >&6
13215 cat >conftest.$ac_ext <<_ACEOF
13216 #line 13216 "configure"
13217 #include "confdefs.h"
13218 #include <stdlib.h>
13219 #include <stdarg.h>
13220 #include <string.h>
13224 if { (eval echo "$as_me:13224: \"$ac_cpp conftest.$ac_ext\"") >&5
13225 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13227 egrep -v '^ *\+' conftest.er1 >conftest.err
13229 cat conftest.err >&5
13230 echo "$as_me:13230: \$? = $ac_status" >&5
13231 (exit $ac_status); } >/dev/null; then
13232 if test -s conftest.err; then
13233 ac_cpp_err=$ac_c_preproc_warn_flag
13240 if test -z "$ac_cpp_err"; then
13241 ac_cv_header_stdc=yes
13243 echo "$as_me: failed program was:" >&5
13244 cat conftest.$ac_ext >&5
13245 ac_cv_header_stdc=no
13247 rm -f conftest.err conftest.$ac_ext
13249 if test $ac_cv_header_stdc = yes; then
13250 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13251 cat >conftest.$ac_ext <<_ACEOF
13252 #line 13252 "configure"
13253 #include "confdefs.h"
13254 #include <string.h>
13257 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13258 egrep "memchr" >/dev/null 2>&1; then
13261 ac_cv_header_stdc=no
13267 if test $ac_cv_header_stdc = yes; then
13268 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13269 cat >conftest.$ac_ext <<_ACEOF
13270 #line 13270 "configure"
13271 #include "confdefs.h"
13272 #include <stdlib.h>
13275 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13276 egrep "free" >/dev/null 2>&1; then
13279 ac_cv_header_stdc=no
13285 if test $ac_cv_header_stdc = yes; then
13286 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13287 if test "$cross_compiling" = yes; then
13290 cat >conftest.$ac_ext <<_ACEOF
13291 #line 13291 "configure"
13292 #include "confdefs.h"
13294 #if ((' ' & 0x0FF) == 0x020)
13295 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13296 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13298 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13299 || ('j' <= (c) && (c) <= 'r') \
13300 || ('s' <= (c) && (c) <= 'z'))
13301 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13304 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13309 for (i = 0; i < 256; i++)
13310 if (XOR (islower (i), ISLOWER (i))
13311 || toupper (i) != TOUPPER (i))
13312 $ac_main_return(2);
13313 $ac_main_return (0);
13316 rm -f conftest$ac_exeext
13317 if { (eval echo "$as_me:13317: \"$ac_link\"") >&5
13318 (eval $ac_link) 2>&5
13320 echo "$as_me:13320: \$? = $ac_status" >&5
13321 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13322 { (eval echo "$as_me:13322: \"$ac_try\"") >&5
13323 (eval $ac_try) 2>&5
13325 echo "$as_me:13325: \$? = $ac_status" >&5
13326 (exit $ac_status); }; }; then
13329 echo "$as_me: program exited with status $ac_status" >&5
13330 echo "$as_me: failed program was:" >&5
13331 cat conftest.$ac_ext >&5
13332 ac_cv_header_stdc=no
13334 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13338 echo "$as_me:13338: result: $ac_cv_header_stdc" >&5
13339 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13340 if test $ac_cv_header_stdc = yes; then
13342 cat >>confdefs.h <<\EOF
13343 #define STDC_HEADERS 1
13348 echo "$as_me:13348: checking whether time.h and sys/time.h may both be included" >&5
13349 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13350 if test "${ac_cv_header_time+set}" = set; then
13351 echo $ECHO_N "(cached) $ECHO_C" >&6
13353 cat >conftest.$ac_ext <<_ACEOF
13354 #line 13354 "configure"
13355 #include "confdefs.h"
13356 #include <sys/types.h>
13357 #include <sys/time.h>
13363 if ((struct tm *) 0)
13369 rm -f conftest.$ac_objext
13370 if { (eval echo "$as_me:13370: \"$ac_compile\"") >&5
13371 (eval $ac_compile) 2>&5
13373 echo "$as_me:13373: \$? = $ac_status" >&5
13374 (exit $ac_status); } &&
13375 { ac_try='test -s conftest.$ac_objext'
13376 { (eval echo "$as_me:13376: \"$ac_try\"") >&5
13377 (eval $ac_try) 2>&5
13379 echo "$as_me:13379: \$? = $ac_status" >&5
13380 (exit $ac_status); }; }; then
13381 ac_cv_header_time=yes
13383 echo "$as_me: failed program was:" >&5
13384 cat conftest.$ac_ext >&5
13385 ac_cv_header_time=no
13387 rm -f conftest.$ac_objext conftest.$ac_ext
13389 echo "$as_me:13389: result: $ac_cv_header_time" >&5
13390 echo "${ECHO_T}$ac_cv_header_time" >&6
13391 if test $ac_cv_header_time = yes; then
13393 cat >>confdefs.h <<\EOF
13394 #define TIME_WITH_SYS_TIME 1
13411 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13412 echo "$as_me:13412: checking for $ac_header" >&5
13413 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13414 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13415 echo $ECHO_N "(cached) $ECHO_C" >&6
13417 cat >conftest.$ac_ext <<_ACEOF
13418 #line 13418 "configure"
13419 #include "confdefs.h"
13420 #include <$ac_header>
13422 if { (eval echo "$as_me:13422: \"$ac_cpp conftest.$ac_ext\"") >&5
13423 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13425 egrep -v '^ *\+' conftest.er1 >conftest.err
13427 cat conftest.err >&5
13428 echo "$as_me:13428: \$? = $ac_status" >&5
13429 (exit $ac_status); } >/dev/null; then
13430 if test -s conftest.err; then
13431 ac_cpp_err=$ac_c_preproc_warn_flag
13438 if test -z "$ac_cpp_err"; then
13439 eval "$as_ac_Header=yes"
13441 echo "$as_me: failed program was:" >&5
13442 cat conftest.$ac_ext >&5
13443 eval "$as_ac_Header=no"
13445 rm -f conftest.err conftest.$ac_ext
13447 echo "$as_me:13447: result: `eval echo '${'$as_ac_Header'}'`" >&5
13448 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13449 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13450 cat >>confdefs.h <<EOF
13451 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13457 for ac_header in unistd.h getopt.h
13459 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13460 echo "$as_me:13460: checking for $ac_header" >&5
13461 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13462 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13463 echo $ECHO_N "(cached) $ECHO_C" >&6
13465 cat >conftest.$ac_ext <<_ACEOF
13466 #line 13466 "configure"
13467 #include "confdefs.h"
13468 #include <$ac_header>
13470 if { (eval echo "$as_me:13470: \"$ac_cpp conftest.$ac_ext\"") >&5
13471 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13473 egrep -v '^ *\+' conftest.er1 >conftest.err
13475 cat conftest.err >&5
13476 echo "$as_me:13476: \$? = $ac_status" >&5
13477 (exit $ac_status); } >/dev/null; then
13478 if test -s conftest.err; then
13479 ac_cpp_err=$ac_c_preproc_warn_flag
13486 if test -z "$ac_cpp_err"; then
13487 eval "$as_ac_Header=yes"
13489 echo "$as_me: failed program was:" >&5
13490 cat conftest.$ac_ext >&5
13491 eval "$as_ac_Header=no"
13493 rm -f conftest.err conftest.$ac_ext
13495 echo "$as_me:13495: result: `eval echo '${'$as_ac_Header'}'`" >&5
13496 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13497 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13498 cat >>confdefs.h <<EOF
13499 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13505 echo "$as_me:13505: checking for header declaring getopt variables" >&5
13506 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
13507 if test "${cf_cv_getopt_header+set}" = set; then
13508 echo $ECHO_N "(cached) $ECHO_C" >&6
13511 cf_cv_getopt_header=none
13512 for cf_header in stdio.h stdlib.h unistd.h getopt.h
13514 cat >conftest.$ac_ext <<_ACEOF
13515 #line 13515 "configure"
13516 #include "confdefs.h"
13518 #include <$cf_header>
13522 int x = optind; char *y = optarg
13527 rm -f conftest.$ac_objext
13528 if { (eval echo "$as_me:13528: \"$ac_compile\"") >&5
13529 (eval $ac_compile) 2>&5
13531 echo "$as_me:13531: \$? = $ac_status" >&5
13532 (exit $ac_status); } &&
13533 { ac_try='test -s conftest.$ac_objext'
13534 { (eval echo "$as_me:13534: \"$ac_try\"") >&5
13535 (eval $ac_try) 2>&5
13537 echo "$as_me:13537: \$? = $ac_status" >&5
13538 (exit $ac_status); }; }; then
13539 cf_cv_getopt_header=$cf_header
13542 echo "$as_me: failed program was:" >&5
13543 cat conftest.$ac_ext >&5
13545 rm -f conftest.$ac_objext conftest.$ac_ext
13549 echo "$as_me:13549: result: $cf_cv_getopt_header" >&5
13550 echo "${ECHO_T}$cf_cv_getopt_header" >&6
13551 if test $cf_cv_getopt_header != none ; then
13553 cat >>confdefs.h <<\EOF
13554 #define HAVE_GETOPT_HEADER 1
13558 if test $cf_cv_getopt_header = getopt.h ; then
13560 cat >>confdefs.h <<\EOF
13561 #define NEED_GETOPT_H 1
13571 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13572 echo "$as_me:13572: checking for $ac_func" >&5
13573 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13574 if eval "test \"\${$as_ac_var+set}\" = set"; then
13575 echo $ECHO_N "(cached) $ECHO_C" >&6
13577 cat >conftest.$ac_ext <<_ACEOF
13578 #line 13578 "configure"
13579 #include "confdefs.h"
13580 /* System header to define __stub macros and hopefully few prototypes,
13581 which can conflict with char $ac_func (); below. */
13582 #include <assert.h>
13583 /* Override any gcc2 internal prototype to avoid an error. */
13587 /* We use char because int might match the return type of a gcc2
13588 builtin and then its argument prototype would still apply. */
13595 /* The GNU C library defines this for functions which it implements
13596 to always fail with ENOSYS. Some functions are actually named
13597 something starting with __ and the normal name is an alias. */
13598 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13601 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13608 rm -f conftest.$ac_objext conftest$ac_exeext
13609 if { (eval echo "$as_me:13609: \"$ac_link\"") >&5
13610 (eval $ac_link) 2>&5
13612 echo "$as_me:13612: \$? = $ac_status" >&5
13613 (exit $ac_status); } &&
13614 { ac_try='test -s conftest$ac_exeext'
13615 { (eval echo "$as_me:13615: \"$ac_try\"") >&5
13616 (eval $ac_try) 2>&5
13618 echo "$as_me:13618: \$? = $ac_status" >&5
13619 (exit $ac_status); }; }; then
13620 eval "$as_ac_var=yes"
13622 echo "$as_me: failed program was:" >&5
13623 cat conftest.$ac_ext >&5
13624 eval "$as_ac_var=no"
13626 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13628 echo "$as_me:13628: result: `eval echo '${'$as_ac_var'}'`" >&5
13629 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13630 if test `eval echo '${'$as_ac_var'}'` = yes; then
13631 cat >>confdefs.h <<EOF
13632 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13638 if test "x$ac_cv_func_getopt" = xno; then
13639 { { echo "$as_me:13639: error: getopt is required for building programs" >&5
13640 echo "$as_me: error: getopt is required for building programs" >&2;}
13641 { (exit 1); exit 1; }; }
13644 if test "$cf_enable_widec" = yes; then
13657 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13658 echo "$as_me:13658: checking for $ac_func" >&5
13659 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13660 if eval "test \"\${$as_ac_var+set}\" = set"; then
13661 echo $ECHO_N "(cached) $ECHO_C" >&6
13663 cat >conftest.$ac_ext <<_ACEOF
13664 #line 13664 "configure"
13665 #include "confdefs.h"
13666 /* System header to define __stub macros and hopefully few prototypes,
13667 which can conflict with char $ac_func (); below. */
13668 #include <assert.h>
13669 /* Override any gcc2 internal prototype to avoid an error. */
13673 /* We use char because int might match the return type of a gcc2
13674 builtin and then its argument prototype would still apply. */
13681 /* The GNU C library defines this for functions which it implements
13682 to always fail with ENOSYS. Some functions are actually named
13683 something starting with __ and the normal name is an alias. */
13684 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13687 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13694 rm -f conftest.$ac_objext conftest$ac_exeext
13695 if { (eval echo "$as_me:13695: \"$ac_link\"") >&5
13696 (eval $ac_link) 2>&5
13698 echo "$as_me:13698: \$? = $ac_status" >&5
13699 (exit $ac_status); } &&
13700 { ac_try='test -s conftest$ac_exeext'
13701 { (eval echo "$as_me:13701: \"$ac_try\"") >&5
13702 (eval $ac_try) 2>&5
13704 echo "$as_me:13704: \$? = $ac_status" >&5
13705 (exit $ac_status); }; }; then
13706 eval "$as_ac_var=yes"
13708 echo "$as_me: failed program was:" >&5
13709 cat conftest.$ac_ext >&5
13710 eval "$as_ac_var=no"
13712 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13714 echo "$as_me:13714: result: `eval echo '${'$as_ac_var'}'`" >&5
13715 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13716 if test `eval echo '${'$as_ac_var'}'` = yes; then
13717 cat >>confdefs.h <<EOF
13718 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13726 echo "$as_me:13726: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
13727 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
13728 if test "${cf_cv_need_xopen_extension+set}" = set; then
13729 echo $ECHO_N "(cached) $ECHO_C" >&6
13732 cat >conftest.$ac_ext <<_ACEOF
13733 #line 13733 "configure"
13734 #include "confdefs.h"
13736 #include <stdlib.h>
13737 #include <${cf_cv_ncurses_header:-curses.h}>
13742 #if defined(NCURSES_VERSION_PATCH)
13743 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
13747 long x = winnstr(stdscr, "", 0);
13749 getbegyx(stdscr, y1, x1)
13754 rm -f conftest.$ac_objext conftest$ac_exeext
13755 if { (eval echo "$as_me:13755: \"$ac_link\"") >&5
13756 (eval $ac_link) 2>&5
13758 echo "$as_me:13758: \$? = $ac_status" >&5
13759 (exit $ac_status); } &&
13760 { ac_try='test -s conftest$ac_exeext'
13761 { (eval echo "$as_me:13761: \"$ac_try\"") >&5
13762 (eval $ac_try) 2>&5
13764 echo "$as_me:13764: \$? = $ac_status" >&5
13765 (exit $ac_status); }; }; then
13766 cf_cv_need_xopen_extension=no
13768 echo "$as_me: failed program was:" >&5
13769 cat conftest.$ac_ext >&5
13770 cat >conftest.$ac_ext <<_ACEOF
13771 #line 13771 "configure"
13772 #include "confdefs.h"
13774 #define _XOPEN_SOURCE_EXTENDED
13775 #include <stdlib.h>
13776 #include <${cf_cv_ncurses_header:-curses.h}>
13781 #ifdef NCURSES_VERSION
13783 int check2 = curs_set((int)sizeof(check));
13785 long x = winnstr(stdscr, "", 0);
13787 getbegyx(stdscr, y1, x1)
13792 rm -f conftest.$ac_objext conftest$ac_exeext
13793 if { (eval echo "$as_me:13793: \"$ac_link\"") >&5
13794 (eval $ac_link) 2>&5
13796 echo "$as_me:13796: \$? = $ac_status" >&5
13797 (exit $ac_status); } &&
13798 { ac_try='test -s conftest$ac_exeext'
13799 { (eval echo "$as_me:13799: \"$ac_try\"") >&5
13800 (eval $ac_try) 2>&5
13802 echo "$as_me:13802: \$? = $ac_status" >&5
13803 (exit $ac_status); }; }; then
13804 cf_cv_need_xopen_extension=yes
13806 echo "$as_me: failed program was:" >&5
13807 cat conftest.$ac_ext >&5
13808 cf_cv_need_xopen_extension=unknown
13810 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13812 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13814 echo "$as_me:13814: result: $cf_cv_need_xopen_extension" >&5
13815 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
13816 test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
13818 echo "$as_me:13818: checking for term.h" >&5
13819 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
13820 if test "${cf_cv_term_header+set}" = set; then
13821 echo $ECHO_N "(cached) $ECHO_C" >&6
13824 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
13825 # for <term.h> if we do not find the variant.
13827 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
13829 case ${cf_cv_ncurses_header:-curses.h} in #(vi
13831 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
13832 cf_header_list="$cf_header_item $cf_header_list"
13836 for cf_header in $cf_header_list
13838 cat >conftest.$ac_ext <<_ACEOF
13839 #line 13839 "configure"
13840 #include "confdefs.h"
13842 #include <${cf_cv_ncurses_header:-curses.h}>
13843 #include <${cf_header}>
13852 rm -f conftest.$ac_objext
13853 if { (eval echo "$as_me:13853: \"$ac_compile\"") >&5
13854 (eval $ac_compile) 2>&5
13856 echo "$as_me:13856: \$? = $ac_status" >&5
13857 (exit $ac_status); } &&
13858 { ac_try='test -s conftest.$ac_objext'
13859 { (eval echo "$as_me:13859: \"$ac_try\"") >&5
13860 (eval $ac_try) 2>&5
13862 echo "$as_me:13862: \$? = $ac_status" >&5
13863 (exit $ac_status); }; }; then
13864 cf_cv_term_header=$cf_header
13867 echo "$as_me: failed program was:" >&5
13868 cat conftest.$ac_ext >&5
13869 cf_cv_term_header=no
13871 rm -f conftest.$ac_objext conftest.$ac_ext
13874 case $cf_cv_term_header in #(vi
13876 # If curses is ncurses, some packagers still mess it up by trying to make
13877 # us use GNU termcap. This handles the most common case.
13878 for cf_header in ncurses/term.h ncursesw/term.h
13880 cat >conftest.$ac_ext <<_ACEOF
13881 #line 13881 "configure"
13882 #include "confdefs.h"
13884 #include <${cf_cv_ncurses_header:-curses.h}>
13885 #ifdef NCURSES_VERSION
13886 #include <${cf_header}>
13898 rm -f conftest.$ac_objext
13899 if { (eval echo "$as_me:13899: \"$ac_compile\"") >&5
13900 (eval $ac_compile) 2>&5
13902 echo "$as_me:13902: \$? = $ac_status" >&5
13903 (exit $ac_status); } &&
13904 { ac_try='test -s conftest.$ac_objext'
13905 { (eval echo "$as_me:13905: \"$ac_try\"") >&5
13906 (eval $ac_try) 2>&5
13908 echo "$as_me:13908: \$? = $ac_status" >&5
13909 (exit $ac_status); }; }; then
13910 cf_cv_term_header=$cf_header
13913 echo "$as_me: failed program was:" >&5
13914 cat conftest.$ac_ext >&5
13915 cf_cv_term_header=no
13917 rm -f conftest.$ac_objext conftest.$ac_ext
13923 echo "$as_me:13923: result: $cf_cv_term_header" >&5
13924 echo "${ECHO_T}$cf_cv_term_header" >&6
13926 case $cf_cv_term_header in #(vi
13929 cat >>confdefs.h <<\EOF
13930 #define HAVE_TERM_H 1
13934 ncurses/term.h) #(vi
13936 cat >>confdefs.h <<\EOF
13937 #define HAVE_NCURSES_TERM_H 1
13943 cat >>confdefs.h <<\EOF
13944 #define HAVE_NCURSESW_TERM_H 1
13950 echo "$as_me:13950: checking for unctrl.h" >&5
13951 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
13952 if test "${cf_cv_unctrl_header+set}" = set; then
13953 echo $ECHO_N "(cached) $ECHO_C" >&6
13956 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
13957 # for <unctrl.h> if we do not find the variant.
13959 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
13961 case ${cf_cv_ncurses_header:-curses.h} in #(vi
13963 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
13964 cf_header_list="$cf_header_item $cf_header_list"
13968 for cf_header in $cf_header_list
13970 cat >conftest.$ac_ext <<_ACEOF
13971 #line 13971 "configure"
13972 #include "confdefs.h"
13974 #include <${cf_cv_ncurses_header:-curses.h}>
13975 #include <${cf_header}>
13984 rm -f conftest.$ac_objext
13985 if { (eval echo "$as_me:13985: \"$ac_compile\"") >&5
13986 (eval $ac_compile) 2>&5
13988 echo "$as_me:13988: \$? = $ac_status" >&5
13989 (exit $ac_status); } &&
13990 { ac_try='test -s conftest.$ac_objext'
13991 { (eval echo "$as_me:13991: \"$ac_try\"") >&5
13992 (eval $ac_try) 2>&5
13994 echo "$as_me:13994: \$? = $ac_status" >&5
13995 (exit $ac_status); }; }; then
13996 cf_cv_unctrl_header=$cf_header
13999 echo "$as_me: failed program was:" >&5
14000 cat conftest.$ac_ext >&5
14001 cf_cv_unctrl_header=no
14003 rm -f conftest.$ac_objext conftest.$ac_ext
14007 echo "$as_me:14007: result: $cf_cv_unctrl_header" >&5
14008 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
14010 case $cf_cv_unctrl_header in #(vi
14012 { echo "$as_me:14012: WARNING: unctrl.h header not found" >&5
14013 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
14017 case $cf_cv_unctrl_header in #(vi
14020 cat >>confdefs.h <<\EOF
14021 #define HAVE_UNCTRL_H 1
14025 ncurses/unctrl.h) #(vi
14027 cat >>confdefs.h <<\EOF
14028 #define HAVE_NCURSES_UNCTRL_H 1
14034 cat >>confdefs.h <<\EOF
14035 #define HAVE_NCURSESW_UNCTRL_H 1
14042 assume_default_colors \
14068 use_default_colors \
14070 use_extended_names \
14084 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14086 echo "$as_me:14086: checking for ${cf_func}" >&5
14087 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14089 echo "${as_me:-configure}:14089: testing ${cf_func} ..." 1>&5
14091 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14092 echo $ECHO_N "(cached) $ECHO_C" >&6
14095 eval cf_result='$ac_cv_func_'$cf_func
14096 if test ".$cf_result" != ".no"; then
14097 cat >conftest.$ac_ext <<_ACEOF
14098 #line 14098 "configure"
14099 #include "confdefs.h"
14101 #ifdef HAVE_XCURSES
14102 #include <xcurses.h>
14103 char * XCursesProgramName = "test";
14105 #include <${cf_cv_ncurses_header:-curses.h}>
14106 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14107 #include <ncursesw/term.h>
14108 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14109 #include <ncurses/term.h>
14110 #elif defined(HAVE_TERM_H)
14120 long foo = (long)(&${cf_func});
14121 fprintf(stderr, "testing linkage of $cf_func:%p\n", foo);
14122 if (foo + 1234 > 5678)
14123 ${cf_cv_main_return:-return}(foo);
14130 rm -f conftest.$ac_objext conftest$ac_exeext
14131 if { (eval echo "$as_me:14131: \"$ac_link\"") >&5
14132 (eval $ac_link) 2>&5
14134 echo "$as_me:14134: \$? = $ac_status" >&5
14135 (exit $ac_status); } &&
14136 { ac_try='test -s conftest$ac_exeext'
14137 { (eval echo "$as_me:14137: \"$ac_try\"") >&5
14138 (eval $ac_try) 2>&5
14140 echo "$as_me:14140: \$? = $ac_status" >&5
14141 (exit $ac_status); }; }; then
14144 echo "$as_me: failed program was:" >&5
14145 cat conftest.$ac_ext >&5
14148 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14150 eval 'cf_cv_func_'$cf_func'=$cf_result'
14154 # use the computed/retrieved cache-value:
14155 eval 'cf_result=$cf_cv_func_'$cf_func
14156 echo "$as_me:14156: result: $cf_result" >&5
14157 echo "${ECHO_T}$cf_result" >&6
14158 if test $cf_result != no; then
14159 cat >>confdefs.h <<EOF
14160 #define HAVE_${cf_tr_func} 1
14166 for cf_func in tputs
14169 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14171 echo "$as_me:14171: checking for ${cf_func}" >&5
14172 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14174 echo "${as_me:-configure}:14174: testing ${cf_func} ..." 1>&5
14176 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14177 echo $ECHO_N "(cached) $ECHO_C" >&6
14180 eval cf_result='$ac_cv_func_'$cf_func
14181 if test ".$cf_result" != ".no"; then
14182 cat >conftest.$ac_ext <<_ACEOF
14183 #line 14183 "configure"
14184 #include "confdefs.h"
14186 #ifdef HAVE_XCURSES
14187 #include <xcurses.h>
14188 char * XCursesProgramName = "test";
14190 #include <${cf_cv_ncurses_header:-curses.h}>
14191 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14192 #include <ncursesw/term.h>
14193 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14194 #include <ncurses/term.h>
14195 #elif defined(HAVE_TERM_H)
14205 long foo = (long)(&${cf_func});
14206 fprintf(stderr, "testing linkage of $cf_func:%p\n", foo);
14207 if (foo + 1234 > 5678)
14208 ${cf_cv_main_return:-return}(foo);
14215 rm -f conftest.$ac_objext conftest$ac_exeext
14216 if { (eval echo "$as_me:14216: \"$ac_link\"") >&5
14217 (eval $ac_link) 2>&5
14219 echo "$as_me:14219: \$? = $ac_status" >&5
14220 (exit $ac_status); } &&
14221 { ac_try='test -s conftest$ac_exeext'
14222 { (eval echo "$as_me:14222: \"$ac_try\"") >&5
14223 (eval $ac_try) 2>&5
14225 echo "$as_me:14225: \$? = $ac_status" >&5
14226 (exit $ac_status); }; }; then
14229 echo "$as_me: failed program was:" >&5
14230 cat conftest.$ac_ext >&5
14233 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14235 eval 'cf_cv_func_'$cf_func'=$cf_result'
14239 # use the computed/retrieved cache-value:
14240 eval 'cf_result=$cf_cv_func_'$cf_func
14241 echo "$as_me:14241: result: $cf_result" >&5
14242 echo "${ECHO_T}$cf_result" >&6
14243 if test $cf_result != no; then
14244 cat >>confdefs.h <<EOF
14245 #define HAVE_${cf_tr_func} 1
14251 if test x$cf_cv_func_tputs = xyes
14254 for cf_arg in int char
14256 for cf_ret in int void
14258 if test $cf_ret = void
14260 cf_return="/* nothing */"
14262 cf_return="return value"
14264 cat >conftest.$ac_ext <<_ACEOF
14265 #line 14265 "configure"
14266 #include "confdefs.h"
14268 #include <${cf_cv_ncurses_header:-curses.h}>
14269 #include <$cf_cv_term_header>
14271 static $cf_ret outc($cf_arg value) { $cf_return; }
14277 tputs("hello", 0, outc);
14278 ${cf_cv_main_return:-return}(0);
14284 rm -f conftest.$ac_objext
14285 if { (eval echo "$as_me:14285: \"$ac_compile\"") >&5
14286 (eval $ac_compile) 2>&5
14288 echo "$as_me:14288: \$? = $ac_status" >&5
14289 (exit $ac_status); } &&
14290 { ac_try='test -s conftest.$ac_objext'
14291 { (eval echo "$as_me:14291: \"$ac_try\"") >&5
14292 (eval $ac_try) 2>&5
14294 echo "$as_me:14294: \$? = $ac_status" >&5
14295 (exit $ac_status); }; }; then
14297 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
14299 echo "${as_me:-configure}:14299: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
14301 cat >>confdefs.h <<EOF
14302 #define TPUTS_ARG $cf_arg
14303 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
14304 #define TPUTS_RETURN(value) $cf_return
14310 echo "$as_me: failed program was:" >&5
14311 cat conftest.$ac_ext >&5
14313 rm -f conftest.$ac_objext conftest.$ac_ext
14315 test $cf_done = yes && break
14319 echo "$as_me:14319: checking for ncurses extended functions" >&5
14320 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
14321 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
14322 echo $ECHO_N "(cached) $ECHO_C" >&6
14325 cat >conftest.$ac_ext <<_ACEOF
14326 #line 14326 "configure"
14327 #include "confdefs.h"
14329 #include <${cf_cv_ncurses_header:-curses.h}>
14334 int x = NCURSES_EXT_FUNCS
14340 rm -f conftest.$ac_objext
14341 if { (eval echo "$as_me:14341: \"$ac_compile\"") >&5
14342 (eval $ac_compile) 2>&5
14344 echo "$as_me:14344: \$? = $ac_status" >&5
14345 (exit $ac_status); } &&
14346 { ac_try='test -s conftest.$ac_objext'
14347 { (eval echo "$as_me:14347: \"$ac_try\"") >&5
14348 (eval $ac_try) 2>&5
14350 echo "$as_me:14350: \$? = $ac_status" >&5
14351 (exit $ac_status); }; }; then
14352 cf_cv_ncurses_ext_funcs=defined
14354 echo "$as_me: failed program was:" >&5
14355 cat conftest.$ac_ext >&5
14357 cat >conftest.$ac_ext <<_ACEOF
14358 #line 14358 "configure"
14359 #include "confdefs.h"
14361 #include <${cf_cv_ncurses_header:-curses.h}>
14366 (void) assume_default_colors (0, 0);
14367 (void) curses_version ();
14368 (void) define_key (0, 0);
14369 (void) is_term_resized (0, 0);
14370 (void) key_defined (0);
14371 (void) keybound (0, 0);
14372 (void) keyok (0, 0);
14373 (void) resize_term (0, 0);
14374 (void) resizeterm (0, 0);
14375 (void) use_default_colors ();
14376 (void) use_extended_names (0);
14377 (void) wresize (0, 0, 0);
14382 rm -f conftest.$ac_objext conftest$ac_exeext
14383 if { (eval echo "$as_me:14383: \"$ac_link\"") >&5
14384 (eval $ac_link) 2>&5
14386 echo "$as_me:14386: \$? = $ac_status" >&5
14387 (exit $ac_status); } &&
14388 { ac_try='test -s conftest$ac_exeext'
14389 { (eval echo "$as_me:14389: \"$ac_try\"") >&5
14390 (eval $ac_try) 2>&5
14392 echo "$as_me:14392: \$? = $ac_status" >&5
14393 (exit $ac_status); }; }; then
14394 cf_cv_ncurses_ext_funcs=yes
14396 echo "$as_me: failed program was:" >&5
14397 cat conftest.$ac_ext >&5
14398 cf_cv_ncurses_ext_funcs=no
14400 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14403 rm -f conftest.$ac_objext conftest.$ac_ext
14406 echo "$as_me:14406: result: $cf_cv_ncurses_ext_funcs" >&5
14407 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
14408 test "$cf_cv_ncurses_ext_funcs" = yes &&
14409 cat >>confdefs.h <<\EOF
14410 #define NCURSES_EXT_FUNCS 1
14413 if test "$cf_enable_widec" = yes
14415 # workaround for systems with ncurses before 20111029, due to change of
14416 # feature test macro from _XPG5 to _XOPEN_SOURCE
14417 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
14420 echo "$as_me:14420: checking if _XPG5 should be defined to enable wide-characters" >&5
14421 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
14423 cat >conftest.$ac_ext <<_ACEOF
14424 #line 14424 "configure"
14425 #include "confdefs.h"
14427 #include <${cf_cv_ncurses_header:-curses.h}>
14436 rm -f conftest.$ac_objext
14437 if { (eval echo "$as_me:14437: \"$ac_compile\"") >&5
14438 (eval $ac_compile) 2>&5
14440 echo "$as_me:14440: \$? = $ac_status" >&5
14441 (exit $ac_status); } &&
14442 { ac_try='test -s conftest.$ac_objext'
14443 { (eval echo "$as_me:14443: \"$ac_try\"") >&5
14444 (eval $ac_try) 2>&5
14446 echo "$as_me:14446: \$? = $ac_status" >&5
14447 (exit $ac_status); }; }; then
14450 echo "$as_me: failed program was:" >&5
14451 cat conftest.$ac_ext >&5
14452 cf_save_cppflags="$CPPFLAGS"
14453 CPPFLAGS="$CPPFLAGS -D_XPG5"
14454 cat >conftest.$ac_ext <<_ACEOF
14455 #line 14455 "configure"
14456 #include "confdefs.h"
14458 #include <${cf_cv_ncurses_header:-curses.h}>
14467 rm -f conftest.$ac_objext
14468 if { (eval echo "$as_me:14468: \"$ac_compile\"") >&5
14469 (eval $ac_compile) 2>&5
14471 echo "$as_me:14471: \$? = $ac_status" >&5
14472 (exit $ac_status); } &&
14473 { ac_try='test -s conftest.$ac_objext'
14474 { (eval echo "$as_me:14474: \"$ac_try\"") >&5
14475 (eval $ac_try) 2>&5
14477 echo "$as_me:14477: \$? = $ac_status" >&5
14478 (exit $ac_status); }; }; then
14481 echo "$as_me: failed program was:" >&5
14482 cat conftest.$ac_ext >&5
14484 rm -f conftest.$ac_objext conftest.$ac_ext
14485 CPPFLAGS="$cf_save_cppflags"
14487 rm -f conftest.$ac_objext conftest.$ac_ext
14488 echo "$as_me:14488: result: $cf_define_xpg5" >&5
14489 echo "${ECHO_T}$cf_define_xpg5" >&6
14491 if test "$cf_define_xpg5" = yes
14493 CPPFLAGS="$CPPFLAGS -D_XPG5"
14497 echo "$as_me:14497: checking for wide-character functions" >&5
14498 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
14499 if test "${cf_cv_widechar_funcs+set}" = set; then
14500 echo $ECHO_N "(cached) $ECHO_C" >&6
14503 cat >conftest.$ac_ext <<_ACEOF
14504 #line 14504 "configure"
14505 #include "confdefs.h"
14507 #include <${cf_cv_ncurses_header:-curses.h}>
14512 static wchar_t src_wchar[2];
14513 static cchar_t dst_cchar;
14514 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
14520 rm -f conftest.$ac_objext conftest$ac_exeext
14521 if { (eval echo "$as_me:14521: \"$ac_link\"") >&5
14522 (eval $ac_link) 2>&5
14524 echo "$as_me:14524: \$? = $ac_status" >&5
14525 (exit $ac_status); } &&
14526 { ac_try='test -s conftest$ac_exeext'
14527 { (eval echo "$as_me:14527: \"$ac_try\"") >&5
14528 (eval $ac_try) 2>&5
14530 echo "$as_me:14530: \$? = $ac_status" >&5
14531 (exit $ac_status); }; }; then
14532 cf_cv_widechar_funcs=yes
14534 echo "$as_me: failed program was:" >&5
14535 cat conftest.$ac_ext >&5
14536 cf_cv_widechar_funcs=no
14538 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14541 echo "$as_me:14541: result: $cf_cv_widechar_funcs" >&5
14542 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
14543 if test "$cf_cv_widechar_funcs" != no ; then
14545 cat >>confdefs.h <<\EOF
14546 #define USE_WIDEC_SUPPORT 1
14550 cat >>confdefs.h <<\EOF
14551 #define USE_WIDEC_SUPPORT 0
14556 cat >>confdefs.h <<\EOF
14557 #define USE_WIDEC_SUPPORT 0
14562 echo "$as_me:14562: checking if sys/time.h works with sys/select.h" >&5
14563 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14564 if test "${cf_cv_sys_time_select+set}" = set; then
14565 echo $ECHO_N "(cached) $ECHO_C" >&6
14568 cat >conftest.$ac_ext <<_ACEOF
14569 #line 14569 "configure"
14570 #include "confdefs.h"
14572 #include <sys/types.h>
14573 #ifdef HAVE_SYS_TIME_H
14574 #include <sys/time.h>
14576 #ifdef HAVE_SYS_SELECT_H
14577 #include <sys/select.h>
14588 rm -f conftest.$ac_objext
14589 if { (eval echo "$as_me:14589: \"$ac_compile\"") >&5
14590 (eval $ac_compile) 2>&5
14592 echo "$as_me:14592: \$? = $ac_status" >&5
14593 (exit $ac_status); } &&
14594 { ac_try='test -s conftest.$ac_objext'
14595 { (eval echo "$as_me:14595: \"$ac_try\"") >&5
14596 (eval $ac_try) 2>&5
14598 echo "$as_me:14598: \$? = $ac_status" >&5
14599 (exit $ac_status); }; }; then
14600 cf_cv_sys_time_select=yes
14602 echo "$as_me: failed program was:" >&5
14603 cat conftest.$ac_ext >&5
14604 cf_cv_sys_time_select=no
14606 rm -f conftest.$ac_objext conftest.$ac_ext
14610 echo "$as_me:14610: result: $cf_cv_sys_time_select" >&5
14611 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14612 test "$cf_cv_sys_time_select" = yes &&
14613 cat >>confdefs.h <<\EOF
14614 #define HAVE_SYS_TIME_SELECT 1
14617 echo "$as_me:14617: checking for function curses_version" >&5
14618 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
14619 if test "${cf_cv_func_curses_version+set}" = set; then
14620 echo $ECHO_N "(cached) $ECHO_C" >&6
14623 if test "$cross_compiling" = yes; then
14624 cf_cv_func_curses_version=unknown
14626 cat >conftest.$ac_ext <<_ACEOF
14627 #line 14627 "configure"
14628 #include "confdefs.h"
14630 #include <${cf_cv_ncurses_header:-curses.h}>
14634 sprintf(temp, "%s\n", curses_version());
14635 ${cf_cv_main_return:-return}(0);
14639 rm -f conftest$ac_exeext
14640 if { (eval echo "$as_me:14640: \"$ac_link\"") >&5
14641 (eval $ac_link) 2>&5
14643 echo "$as_me:14643: \$? = $ac_status" >&5
14644 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14645 { (eval echo "$as_me:14645: \"$ac_try\"") >&5
14646 (eval $ac_try) 2>&5
14648 echo "$as_me:14648: \$? = $ac_status" >&5
14649 (exit $ac_status); }; }; then
14650 cf_cv_func_curses_version=yes
14653 echo "$as_me: program exited with status $ac_status" >&5
14654 echo "$as_me: failed program was:" >&5
14655 cat conftest.$ac_ext >&5
14656 cf_cv_func_curses_version=no
14659 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14663 echo "$as_me:14663: result: $cf_cv_func_curses_version" >&5
14664 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
14665 test "$cf_cv_func_curses_version" = yes &&
14666 cat >>confdefs.h <<\EOF
14667 #define HAVE_CURSES_VERSION 1
14670 echo "$as_me:14670: checking for alternate character set array" >&5
14671 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
14672 if test "${cf_cv_curses_acs_map+set}" = set; then
14673 echo $ECHO_N "(cached) $ECHO_C" >&6
14676 cf_cv_curses_acs_map=unknown
14677 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
14679 cat >conftest.$ac_ext <<_ACEOF
14680 #line 14680 "configure"
14681 #include "confdefs.h"
14683 #include <${cf_cv_ncurses_header:-curses.h}>
14689 $name['k'] = ACS_PLUS
14695 rm -f conftest.$ac_objext conftest$ac_exeext
14696 if { (eval echo "$as_me:14696: \"$ac_link\"") >&5
14697 (eval $ac_link) 2>&5
14699 echo "$as_me:14699: \$? = $ac_status" >&5
14700 (exit $ac_status); } &&
14701 { ac_try='test -s conftest$ac_exeext'
14702 { (eval echo "$as_me:14702: \"$ac_try\"") >&5
14703 (eval $ac_try) 2>&5
14705 echo "$as_me:14705: \$? = $ac_status" >&5
14706 (exit $ac_status); }; }; then
14707 cf_cv_curses_acs_map=$name; break
14709 echo "$as_me: failed program was:" >&5
14710 cat conftest.$ac_ext >&5
14712 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14716 echo "$as_me:14716: result: $cf_cv_curses_acs_map" >&5
14717 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
14719 test "$cf_cv_curses_acs_map" != unknown &&
14720 cat >>confdefs.h <<EOF
14721 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
14724 if test "$cf_enable_widec" = yes; then
14726 echo "$as_me:14726: checking for wide alternate character set array" >&5
14727 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
14728 if test "${cf_cv_curses_wacs_map+set}" = set; then
14729 echo $ECHO_N "(cached) $ECHO_C" >&6
14732 cf_cv_curses_wacs_map=unknown
14733 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
14735 cat >conftest.$ac_ext <<_ACEOF
14736 #line 14736 "configure"
14737 #include "confdefs.h"
14739 #ifndef _XOPEN_SOURCE_EXTENDED
14740 #define _XOPEN_SOURCE_EXTENDED
14742 #include <${cf_cv_ncurses_header:-curses.h}>
14746 void *foo = &($name['k'])
14751 rm -f conftest.$ac_objext conftest$ac_exeext
14752 if { (eval echo "$as_me:14752: \"$ac_link\"") >&5
14753 (eval $ac_link) 2>&5
14755 echo "$as_me:14755: \$? = $ac_status" >&5
14756 (exit $ac_status); } &&
14757 { ac_try='test -s conftest$ac_exeext'
14758 { (eval echo "$as_me:14758: \"$ac_try\"") >&5
14759 (eval $ac_try) 2>&5
14761 echo "$as_me:14761: \$? = $ac_status" >&5
14762 (exit $ac_status); }; }; then
14763 cf_cv_curses_wacs_map=$name
14766 echo "$as_me: failed program was:" >&5
14767 cat conftest.$ac_ext >&5
14769 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14772 echo "$as_me:14772: result: $cf_cv_curses_wacs_map" >&5
14773 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
14775 test "$cf_cv_curses_wacs_map" != unknown &&
14776 cat >>confdefs.h <<EOF
14777 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
14780 echo "$as_me:14780: checking for wide alternate character constants" >&5
14781 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
14782 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
14783 echo $ECHO_N "(cached) $ECHO_C" >&6
14786 cf_cv_curses_wacs_symbols=no
14787 if test "$cf_cv_curses_wacs_map" != unknown
14789 cat >conftest.$ac_ext <<_ACEOF
14790 #line 14790 "configure"
14791 #include "confdefs.h"
14793 #ifndef _XOPEN_SOURCE_EXTENDED
14794 #define _XOPEN_SOURCE_EXTENDED
14796 #include <${cf_cv_ncurses_header:-curses.h}>
14800 cchar_t *foo = WACS_PLUS;
14801 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
14806 rm -f conftest.$ac_objext conftest$ac_exeext
14807 if { (eval echo "$as_me:14807: \"$ac_link\"") >&5
14808 (eval $ac_link) 2>&5
14810 echo "$as_me:14810: \$? = $ac_status" >&5
14811 (exit $ac_status); } &&
14812 { ac_try='test -s conftest$ac_exeext'
14813 { (eval echo "$as_me:14813: \"$ac_try\"") >&5
14814 (eval $ac_try) 2>&5
14816 echo "$as_me:14816: \$? = $ac_status" >&5
14817 (exit $ac_status); }; }; then
14818 cf_cv_curses_wacs_symbols=yes
14820 echo "$as_me: failed program was:" >&5
14821 cat conftest.$ac_ext >&5
14823 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14825 cat >conftest.$ac_ext <<_ACEOF
14826 #line 14826 "configure"
14827 #include "confdefs.h"
14829 #ifndef _XOPEN_SOURCE_EXTENDED
14830 #define _XOPEN_SOURCE_EXTENDED
14832 #include <${cf_cv_ncurses_header:-curses.h}>
14836 cchar_t *foo = WACS_PLUS
14841 rm -f conftest.$ac_objext conftest$ac_exeext
14842 if { (eval echo "$as_me:14842: \"$ac_link\"") >&5
14843 (eval $ac_link) 2>&5
14845 echo "$as_me:14845: \$? = $ac_status" >&5
14846 (exit $ac_status); } &&
14847 { ac_try='test -s conftest$ac_exeext'
14848 { (eval echo "$as_me:14848: \"$ac_try\"") >&5
14849 (eval $ac_try) 2>&5
14851 echo "$as_me:14851: \$? = $ac_status" >&5
14852 (exit $ac_status); }; }; then
14853 cf_cv_curses_wacs_symbols=yes
14855 echo "$as_me: failed program was:" >&5
14856 cat conftest.$ac_ext >&5
14858 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14862 echo "$as_me:14862: result: $cf_cv_curses_wacs_symbols" >&5
14863 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
14865 test "$cf_cv_curses_wacs_symbols" != no &&
14866 cat >>confdefs.h <<\EOF
14867 #define CURSES_WACS_SYMBOLS 1
14872 echo "$as_me:14872: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
14873 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14874 cat >conftest.$ac_ext <<_ACEOF
14875 #line 14875 "configure"
14876 #include "confdefs.h"
14878 #ifndef _XOPEN_SOURCE_EXTENDED
14879 #define _XOPEN_SOURCE_EXTENDED
14881 #include <${cf_cv_ncurses_header:-curses.h}>
14892 rm -f conftest.$ac_objext
14893 if { (eval echo "$as_me:14893: \"$ac_compile\"") >&5
14894 (eval $ac_compile) 2>&5
14896 echo "$as_me:14896: \$? = $ac_status" >&5
14897 (exit $ac_status); } &&
14898 { ac_try='test -s conftest.$ac_objext'
14899 { (eval echo "$as_me:14899: \"$ac_try\"") >&5
14900 (eval $ac_try) 2>&5
14902 echo "$as_me:14902: \$? = $ac_status" >&5
14903 (exit $ac_status); }; }; then
14906 echo "$as_me: failed program was:" >&5
14907 cat conftest.$ac_ext >&5
14910 rm -f conftest.$ac_objext conftest.$ac_ext
14911 echo "$as_me:14911: result: $cf_result" >&5
14912 echo "${ECHO_T}$cf_result" >&6
14913 if test $cf_result = yes ; then
14915 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14917 cat >>confdefs.h <<EOF
14918 #define $cf_result 1
14923 cat >>confdefs.h <<EOF
14924 #define attr_t long
14929 if test "$cf_enable_widec" = yes; then
14931 # This is needed on Tru64 5.0 to declare mbstate_t
14932 echo "$as_me:14932: checking if we must include wchar.h to declare mbstate_t" >&5
14933 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
14934 if test "${cf_cv_mbstate_t+set}" = set; then
14935 echo $ECHO_N "(cached) $ECHO_C" >&6
14938 cat >conftest.$ac_ext <<_ACEOF
14939 #line 14939 "configure"
14940 #include "confdefs.h"
14942 #include <stdlib.h>
14943 #include <stdarg.h>
14945 #ifdef HAVE_LIBUTF8_H
14946 #include <libutf8.h>
14956 rm -f conftest.$ac_objext
14957 if { (eval echo "$as_me:14957: \"$ac_compile\"") >&5
14958 (eval $ac_compile) 2>&5
14960 echo "$as_me:14960: \$? = $ac_status" >&5
14961 (exit $ac_status); } &&
14962 { ac_try='test -s conftest.$ac_objext'
14963 { (eval echo "$as_me:14963: \"$ac_try\"") >&5
14964 (eval $ac_try) 2>&5
14966 echo "$as_me:14966: \$? = $ac_status" >&5
14967 (exit $ac_status); }; }; then
14970 echo "$as_me: failed program was:" >&5
14971 cat conftest.$ac_ext >&5
14972 cat >conftest.$ac_ext <<_ACEOF
14973 #line 14973 "configure"
14974 #include "confdefs.h"
14976 #include <stdlib.h>
14977 #include <stdarg.h>
14980 #ifdef HAVE_LIBUTF8_H
14981 #include <libutf8.h>
14991 rm -f conftest.$ac_objext
14992 if { (eval echo "$as_me:14992: \"$ac_compile\"") >&5
14993 (eval $ac_compile) 2>&5
14995 echo "$as_me:14995: \$? = $ac_status" >&5
14996 (exit $ac_status); } &&
14997 { ac_try='test -s conftest.$ac_objext'
14998 { (eval echo "$as_me:14998: \"$ac_try\"") >&5
14999 (eval $ac_try) 2>&5
15001 echo "$as_me:15001: \$? = $ac_status" >&5
15002 (exit $ac_status); }; }; then
15003 cf_cv_mbstate_t=yes
15005 echo "$as_me: failed program was:" >&5
15006 cat conftest.$ac_ext >&5
15007 cf_cv_mbstate_t=unknown
15009 rm -f conftest.$ac_objext conftest.$ac_ext
15011 rm -f conftest.$ac_objext conftest.$ac_ext
15013 echo "$as_me:15013: result: $cf_cv_mbstate_t" >&5
15014 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
15016 if test "$cf_cv_mbstate_t" = yes ; then
15018 cat >>confdefs.h <<\EOF
15019 #define NEED_WCHAR_H 1
15025 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
15026 if test "$cf_cv_mbstate_t" = unknown ; then
15027 NCURSES_MBSTATE_T=1
15030 # if we find mbstate_t in either place, use substitution to provide a fallback.
15031 if test "$cf_cv_mbstate_t" != unknown ; then
15032 NCURSES_OK_MBSTATE_T=1
15035 # This is needed on Tru64 5.0 to declare wchar_t
15036 echo "$as_me:15036: checking if we must include wchar.h to declare wchar_t" >&5
15037 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
15038 if test "${cf_cv_wchar_t+set}" = set; then
15039 echo $ECHO_N "(cached) $ECHO_C" >&6
15042 cat >conftest.$ac_ext <<_ACEOF
15043 #line 15043 "configure"
15044 #include "confdefs.h"
15046 #include <stdlib.h>
15047 #include <stdarg.h>
15049 #ifdef HAVE_LIBUTF8_H
15050 #include <libutf8.h>
15060 rm -f conftest.$ac_objext
15061 if { (eval echo "$as_me:15061: \"$ac_compile\"") >&5
15062 (eval $ac_compile) 2>&5
15064 echo "$as_me:15064: \$? = $ac_status" >&5
15065 (exit $ac_status); } &&
15066 { ac_try='test -s conftest.$ac_objext'
15067 { (eval echo "$as_me:15067: \"$ac_try\"") >&5
15068 (eval $ac_try) 2>&5
15070 echo "$as_me:15070: \$? = $ac_status" >&5
15071 (exit $ac_status); }; }; then
15074 echo "$as_me: failed program was:" >&5
15075 cat conftest.$ac_ext >&5
15076 cat >conftest.$ac_ext <<_ACEOF
15077 #line 15077 "configure"
15078 #include "confdefs.h"
15080 #include <stdlib.h>
15081 #include <stdarg.h>
15084 #ifdef HAVE_LIBUTF8_H
15085 #include <libutf8.h>
15095 rm -f conftest.$ac_objext
15096 if { (eval echo "$as_me:15096: \"$ac_compile\"") >&5
15097 (eval $ac_compile) 2>&5
15099 echo "$as_me:15099: \$? = $ac_status" >&5
15100 (exit $ac_status); } &&
15101 { ac_try='test -s conftest.$ac_objext'
15102 { (eval echo "$as_me:15102: \"$ac_try\"") >&5
15103 (eval $ac_try) 2>&5
15105 echo "$as_me:15105: \$? = $ac_status" >&5
15106 (exit $ac_status); }; }; then
15109 echo "$as_me: failed program was:" >&5
15110 cat conftest.$ac_ext >&5
15111 cf_cv_wchar_t=unknown
15113 rm -f conftest.$ac_objext conftest.$ac_ext
15115 rm -f conftest.$ac_objext conftest.$ac_ext
15117 echo "$as_me:15117: result: $cf_cv_wchar_t" >&5
15118 echo "${ECHO_T}$cf_cv_wchar_t" >&6
15120 if test "$cf_cv_wchar_t" = yes ; then
15122 cat >>confdefs.h <<\EOF
15123 #define NEED_WCHAR_H 1
15129 # if we do not find wchar_t in either place, use substitution to provide a fallback.
15130 if test "$cf_cv_wchar_t" = unknown ; then
15134 # if we find wchar_t in either place, use substitution to provide a fallback.
15135 if test "$cf_cv_wchar_t" != unknown ; then
15136 NCURSES_OK_WCHAR_T=1
15139 # This is needed on Tru64 5.0 to declare wint_t
15140 echo "$as_me:15140: checking if we must include wchar.h to declare wint_t" >&5
15141 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
15142 if test "${cf_cv_wint_t+set}" = set; then
15143 echo $ECHO_N "(cached) $ECHO_C" >&6
15146 cat >conftest.$ac_ext <<_ACEOF
15147 #line 15147 "configure"
15148 #include "confdefs.h"
15150 #include <stdlib.h>
15151 #include <stdarg.h>
15153 #ifdef HAVE_LIBUTF8_H
15154 #include <libutf8.h>
15164 rm -f conftest.$ac_objext
15165 if { (eval echo "$as_me:15165: \"$ac_compile\"") >&5
15166 (eval $ac_compile) 2>&5
15168 echo "$as_me:15168: \$? = $ac_status" >&5
15169 (exit $ac_status); } &&
15170 { ac_try='test -s conftest.$ac_objext'
15171 { (eval echo "$as_me:15171: \"$ac_try\"") >&5
15172 (eval $ac_try) 2>&5
15174 echo "$as_me:15174: \$? = $ac_status" >&5
15175 (exit $ac_status); }; }; then
15178 echo "$as_me: failed program was:" >&5
15179 cat conftest.$ac_ext >&5
15180 cat >conftest.$ac_ext <<_ACEOF
15181 #line 15181 "configure"
15182 #include "confdefs.h"
15184 #include <stdlib.h>
15185 #include <stdarg.h>
15188 #ifdef HAVE_LIBUTF8_H
15189 #include <libutf8.h>
15199 rm -f conftest.$ac_objext
15200 if { (eval echo "$as_me:15200: \"$ac_compile\"") >&5
15201 (eval $ac_compile) 2>&5
15203 echo "$as_me:15203: \$? = $ac_status" >&5
15204 (exit $ac_status); } &&
15205 { ac_try='test -s conftest.$ac_objext'
15206 { (eval echo "$as_me:15206: \"$ac_try\"") >&5
15207 (eval $ac_try) 2>&5
15209 echo "$as_me:15209: \$? = $ac_status" >&5
15210 (exit $ac_status); }; }; then
15213 echo "$as_me: failed program was:" >&5
15214 cat conftest.$ac_ext >&5
15215 cf_cv_wint_t=unknown
15217 rm -f conftest.$ac_objext conftest.$ac_ext
15219 rm -f conftest.$ac_objext conftest.$ac_ext
15221 echo "$as_me:15221: result: $cf_cv_wint_t" >&5
15222 echo "${ECHO_T}$cf_cv_wint_t" >&6
15224 if test "$cf_cv_wint_t" = yes ; then
15226 cat >>confdefs.h <<\EOF
15227 #define NEED_WCHAR_H 1
15233 # if we do not find wint_t in either place, use substitution to provide a fallback.
15234 if test "$cf_cv_wint_t" = unknown ; then
15238 # if we find wint_t in either place, use substitution to provide a fallback.
15239 if test "$cf_cv_wint_t" != unknown ; then
15240 NCURSES_OK_WINT_T=1
15243 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
15245 echo "$as_me:15245: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15246 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15247 cat >conftest.$ac_ext <<_ACEOF
15248 #line 15248 "configure"
15249 #include "confdefs.h"
15251 #ifndef _XOPEN_SOURCE_EXTENDED
15252 #define _XOPEN_SOURCE_EXTENDED
15254 #include <${cf_cv_ncurses_header:-curses.h}>
15265 rm -f conftest.$ac_objext
15266 if { (eval echo "$as_me:15266: \"$ac_compile\"") >&5
15267 (eval $ac_compile) 2>&5
15269 echo "$as_me:15269: \$? = $ac_status" >&5
15270 (exit $ac_status); } &&
15271 { ac_try='test -s conftest.$ac_objext'
15272 { (eval echo "$as_me:15272: \"$ac_try\"") >&5
15273 (eval $ac_try) 2>&5
15275 echo "$as_me:15275: \$? = $ac_status" >&5
15276 (exit $ac_status); }; }; then
15279 echo "$as_me: failed program was:" >&5
15280 cat conftest.$ac_ext >&5
15283 rm -f conftest.$ac_objext conftest.$ac_ext
15284 echo "$as_me:15284: result: $cf_result" >&5
15285 echo "${ECHO_T}$cf_result" >&6
15286 if test $cf_result = yes ; then
15288 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15290 cat >>confdefs.h <<EOF
15291 #define $cf_result 1
15296 cat >>confdefs.h <<EOF
15297 #define mbstate_t long
15304 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
15306 echo "$as_me:15306: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15307 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15308 cat >conftest.$ac_ext <<_ACEOF
15309 #line 15309 "configure"
15310 #include "confdefs.h"
15312 #ifndef _XOPEN_SOURCE_EXTENDED
15313 #define _XOPEN_SOURCE_EXTENDED
15315 #include <${cf_cv_ncurses_header:-curses.h}>
15326 rm -f conftest.$ac_objext
15327 if { (eval echo "$as_me:15327: \"$ac_compile\"") >&5
15328 (eval $ac_compile) 2>&5
15330 echo "$as_me:15330: \$? = $ac_status" >&5
15331 (exit $ac_status); } &&
15332 { ac_try='test -s conftest.$ac_objext'
15333 { (eval echo "$as_me:15333: \"$ac_try\"") >&5
15334 (eval $ac_try) 2>&5
15336 echo "$as_me:15336: \$? = $ac_status" >&5
15337 (exit $ac_status); }; }; then
15340 echo "$as_me: failed program was:" >&5
15341 cat conftest.$ac_ext >&5
15344 rm -f conftest.$ac_objext conftest.$ac_ext
15345 echo "$as_me:15345: result: $cf_result" >&5
15346 echo "${ECHO_T}$cf_result" >&6
15347 if test $cf_result = yes ; then
15349 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15351 cat >>confdefs.h <<EOF
15352 #define $cf_result 1
15357 cat >>confdefs.h <<EOF
15358 #define wchar_t long
15365 if test "$NCURSES_OK_WINT_T" = 0 ; then
15367 echo "$as_me:15367: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15368 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15369 cat >conftest.$ac_ext <<_ACEOF
15370 #line 15370 "configure"
15371 #include "confdefs.h"
15373 #ifndef _XOPEN_SOURCE_EXTENDED
15374 #define _XOPEN_SOURCE_EXTENDED
15376 #include <${cf_cv_ncurses_header:-curses.h}>
15387 rm -f conftest.$ac_objext
15388 if { (eval echo "$as_me:15388: \"$ac_compile\"") >&5
15389 (eval $ac_compile) 2>&5
15391 echo "$as_me:15391: \$? = $ac_status" >&5
15392 (exit $ac_status); } &&
15393 { ac_try='test -s conftest.$ac_objext'
15394 { (eval echo "$as_me:15394: \"$ac_try\"") >&5
15395 (eval $ac_try) 2>&5
15397 echo "$as_me:15397: \$? = $ac_status" >&5
15398 (exit $ac_status); }; }; then
15401 echo "$as_me: failed program was:" >&5
15402 cat conftest.$ac_ext >&5
15405 rm -f conftest.$ac_objext conftest.$ac_ext
15406 echo "$as_me:15406: result: $cf_result" >&5
15407 echo "${ECHO_T}$cf_result" >&6
15408 if test $cf_result = yes ; then
15410 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15412 cat >>confdefs.h <<EOF
15413 #define $cf_result 1
15418 cat >>confdefs.h <<EOF
15419 #define wint_t long
15427 echo "$as_me:15427: checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
15428 echo $ECHO_N "checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15430 cat >conftest.$ac_ext <<_ACEOF
15431 #line 15431 "configure"
15432 #include "confdefs.h"
15434 #ifdef HAVE_XCURSES
15435 #include <xcurses.h>
15436 char * XCursesProgramName = "test";
15438 #include <${cf_cv_ncurses_header:-curses.h}>
15439 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15440 #include <ncursesw/term.h>
15441 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15442 #include <ncurses/term.h>
15443 #elif defined(HAVE_TERM_H)
15452 void *foo = &(boolnames)
15458 rm -f conftest.$ac_objext
15459 if { (eval echo "$as_me:15459: \"$ac_compile\"") >&5
15460 (eval $ac_compile) 2>&5
15462 echo "$as_me:15462: \$? = $ac_status" >&5
15463 (exit $ac_status); } &&
15464 { ac_try='test -s conftest.$ac_objext'
15465 { (eval echo "$as_me:15465: \"$ac_try\"") >&5
15466 (eval $ac_try) 2>&5
15468 echo "$as_me:15468: \$? = $ac_status" >&5
15469 (exit $ac_status); }; }; then
15472 echo "$as_me: failed program was:" >&5
15473 cat conftest.$ac_ext >&5
15476 rm -f conftest.$ac_objext conftest.$ac_ext
15477 echo "$as_me:15477: result: $cf_result" >&5
15478 echo "${ECHO_T}$cf_result" >&6
15480 if test $cf_result = yes ; then
15482 cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15484 cat >>confdefs.h <<EOF
15485 #define $cf_result 1
15489 echo "$as_me:15489: checking for data boolnames in library" >&5
15490 echo $ECHO_N "checking for data boolnames in library... $ECHO_C" >&6
15491 # BSD linkers insist on making weak linkage, but resolve at runtime.
15492 if test "$cross_compiling" = yes; then
15495 cat >conftest.$ac_ext <<_ACEOF
15496 #line 15496 "configure"
15497 #include "confdefs.h"
15499 #ifdef HAVE_XCURSES
15500 #include <xcurses.h>
15501 char * XCursesProgramName = "test";
15503 #include <${cf_cv_ncurses_header:-curses.h}>
15504 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15505 #include <ncursesw/term.h>
15506 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15507 #include <ncurses/term.h>
15508 #elif defined(HAVE_TERM_H)
15513 extern char boolnames;
15519 void *foo = &(boolnames);
15520 fprintf(stderr, "testing linkage of boolnames:%p\n", foo);
15521 ${cf_cv_main_return:-return}(foo == 0);
15528 rm -f conftest.$ac_objext conftest$ac_exeext
15529 if { (eval echo "$as_me:15529: \"$ac_link\"") >&5
15530 (eval $ac_link) 2>&5
15532 echo "$as_me:15532: \$? = $ac_status" >&5
15533 (exit $ac_status); } &&
15534 { ac_try='test -s conftest$ac_exeext'
15535 { (eval echo "$as_me:15535: \"$ac_try\"") >&5
15536 (eval $ac_try) 2>&5
15538 echo "$as_me:15538: \$? = $ac_status" >&5
15539 (exit $ac_status); }; }; then
15542 echo "$as_me: failed program was:" >&5
15543 cat conftest.$ac_ext >&5
15546 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15549 cat >conftest.$ac_ext <<_ACEOF
15550 #line 15550 "configure"
15551 #include "confdefs.h"
15553 #ifdef HAVE_XCURSES
15554 #include <xcurses.h>
15555 char * XCursesProgramName = "test";
15557 #include <${cf_cv_ncurses_header:-curses.h}>
15558 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15559 #include <ncursesw/term.h>
15560 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15561 #include <ncurses/term.h>
15562 #elif defined(HAVE_TERM_H)
15567 extern char boolnames;
15570 void *foo = &(boolnames);
15571 fprintf(stderr, "testing linkage of boolnames:%p\n", foo);
15572 ${cf_cv_main_return:-return}(foo == 0);
15575 rm -f conftest$ac_exeext
15576 if { (eval echo "$as_me:15576: \"$ac_link\"") >&5
15577 (eval $ac_link) 2>&5
15579 echo "$as_me:15579: \$? = $ac_status" >&5
15580 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15581 { (eval echo "$as_me:15581: \"$ac_try\"") >&5
15582 (eval $ac_try) 2>&5
15584 echo "$as_me:15584: \$? = $ac_status" >&5
15585 (exit $ac_status); }; }; then
15588 echo "$as_me: program exited with status $ac_status" >&5
15589 echo "$as_me: failed program was:" >&5
15590 cat conftest.$ac_ext >&5
15593 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15595 echo "$as_me:15595: result: $cf_result" >&5
15596 echo "${ECHO_T}$cf_result" >&6
15597 if test $cf_result = yes ; then
15599 cf_result=`echo "decl_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15601 cat >>confdefs.h <<EOF
15602 #define $cf_result 1
15608 echo "$as_me:15608: checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
15609 echo $ECHO_N "checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15611 cat >conftest.$ac_ext <<_ACEOF
15612 #line 15612 "configure"
15613 #include "confdefs.h"
15615 #ifdef HAVE_XCURSES
15616 #include <xcurses.h>
15617 char * XCursesProgramName = "test";
15619 #include <${cf_cv_ncurses_header:-curses.h}>
15620 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15621 #include <ncursesw/term.h>
15622 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15623 #include <ncurses/term.h>
15624 #elif defined(HAVE_TERM_H)
15633 void *foo = &(boolfnames)
15639 rm -f conftest.$ac_objext
15640 if { (eval echo "$as_me:15640: \"$ac_compile\"") >&5
15641 (eval $ac_compile) 2>&5
15643 echo "$as_me:15643: \$? = $ac_status" >&5
15644 (exit $ac_status); } &&
15645 { ac_try='test -s conftest.$ac_objext'
15646 { (eval echo "$as_me:15646: \"$ac_try\"") >&5
15647 (eval $ac_try) 2>&5
15649 echo "$as_me:15649: \$? = $ac_status" >&5
15650 (exit $ac_status); }; }; then
15653 echo "$as_me: failed program was:" >&5
15654 cat conftest.$ac_ext >&5
15657 rm -f conftest.$ac_objext conftest.$ac_ext
15658 echo "$as_me:15658: result: $cf_result" >&5
15659 echo "${ECHO_T}$cf_result" >&6
15661 if test $cf_result = yes ; then
15663 cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15665 cat >>confdefs.h <<EOF
15666 #define $cf_result 1
15670 echo "$as_me:15670: checking for data boolfnames in library" >&5
15671 echo $ECHO_N "checking for data boolfnames in library... $ECHO_C" >&6
15672 # BSD linkers insist on making weak linkage, but resolve at runtime.
15673 if test "$cross_compiling" = yes; then
15676 cat >conftest.$ac_ext <<_ACEOF
15677 #line 15677 "configure"
15678 #include "confdefs.h"
15680 #ifdef HAVE_XCURSES
15681 #include <xcurses.h>
15682 char * XCursesProgramName = "test";
15684 #include <${cf_cv_ncurses_header:-curses.h}>
15685 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15686 #include <ncursesw/term.h>
15687 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15688 #include <ncurses/term.h>
15689 #elif defined(HAVE_TERM_H)
15694 extern char boolfnames;
15700 void *foo = &(boolfnames);
15701 fprintf(stderr, "testing linkage of boolfnames:%p\n", foo);
15702 ${cf_cv_main_return:-return}(foo == 0);
15709 rm -f conftest.$ac_objext conftest$ac_exeext
15710 if { (eval echo "$as_me:15710: \"$ac_link\"") >&5
15711 (eval $ac_link) 2>&5
15713 echo "$as_me:15713: \$? = $ac_status" >&5
15714 (exit $ac_status); } &&
15715 { ac_try='test -s conftest$ac_exeext'
15716 { (eval echo "$as_me:15716: \"$ac_try\"") >&5
15717 (eval $ac_try) 2>&5
15719 echo "$as_me:15719: \$? = $ac_status" >&5
15720 (exit $ac_status); }; }; then
15723 echo "$as_me: failed program was:" >&5
15724 cat conftest.$ac_ext >&5
15727 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15730 cat >conftest.$ac_ext <<_ACEOF
15731 #line 15731 "configure"
15732 #include "confdefs.h"
15734 #ifdef HAVE_XCURSES
15735 #include <xcurses.h>
15736 char * XCursesProgramName = "test";
15738 #include <${cf_cv_ncurses_header:-curses.h}>
15739 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15740 #include <ncursesw/term.h>
15741 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15742 #include <ncurses/term.h>
15743 #elif defined(HAVE_TERM_H)
15748 extern char boolfnames;
15751 void *foo = &(boolfnames);
15752 fprintf(stderr, "testing linkage of boolfnames:%p\n", foo);
15753 ${cf_cv_main_return:-return}(foo == 0);
15756 rm -f conftest$ac_exeext
15757 if { (eval echo "$as_me:15757: \"$ac_link\"") >&5
15758 (eval $ac_link) 2>&5
15760 echo "$as_me:15760: \$? = $ac_status" >&5
15761 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15762 { (eval echo "$as_me:15762: \"$ac_try\"") >&5
15763 (eval $ac_try) 2>&5
15765 echo "$as_me:15765: \$? = $ac_status" >&5
15766 (exit $ac_status); }; }; then
15769 echo "$as_me: program exited with status $ac_status" >&5
15770 echo "$as_me: failed program was:" >&5
15771 cat conftest.$ac_ext >&5
15774 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15776 echo "$as_me:15776: result: $cf_result" >&5
15777 echo "${ECHO_T}$cf_result" >&6
15778 if test $cf_result = yes ; then
15780 cf_result=`echo "decl_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15782 cat >>confdefs.h <<EOF
15783 #define $cf_result 1
15789 if ( test "$GCC" = yes || test "$GXX" = yes )
15791 echo "$as_me:15791: checking if you want to turn on gcc warnings" >&5
15792 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
15794 # Check whether --enable-warnings or --disable-warnings was given.
15795 if test "${enable_warnings+set}" = set; then
15796 enableval="$enable_warnings"
15797 test "$enableval" != yes && enableval=no
15798 if test "$enableval" != "no" ; then
15808 echo "$as_me:15808: result: $with_warnings" >&5
15809 echo "${ECHO_T}$with_warnings" >&6
15810 if test "$with_warnings" = "yes"
15813 if test "$GCC" = yes
15815 cat > conftest.i <<EOF
15817 #define GCC_PRINTF 0
15820 #define GCC_SCANF 0
15822 #ifndef GCC_NORETURN
15823 #define GCC_NORETURN /* nothing */
15826 #define GCC_UNUSED /* nothing */
15829 if test "$GCC" = yes
15831 { echo "$as_me:15831: checking for $CC __attribute__ directives..." >&5
15832 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15833 cat > conftest.$ac_ext <<EOF
15834 #line 15834 "${as_me:-configure}"
15835 #include "confdefs.h"
15836 #include "conftest.h"
15837 #include "conftest.i"
15839 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15841 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15844 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
15846 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
15848 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15849 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
15850 extern void foo(void) GCC_NORETURN;
15851 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
15853 cf_printf_attribute=no
15854 cf_scanf_attribute=no
15855 for cf_attribute in scanf printf unused noreturn
15858 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15860 cf_directive="__attribute__(($cf_attribute))"
15861 echo "checking for $CC $cf_directive" 1>&5
15863 case $cf_attribute in #(vi
15865 cf_printf_attribute=yes
15866 cat >conftest.h <<EOF
15867 #define GCC_$cf_ATTRIBUTE 1
15871 cf_scanf_attribute=yes
15872 cat >conftest.h <<EOF
15873 #define GCC_$cf_ATTRIBUTE 1
15877 cat >conftest.h <<EOF
15878 #define GCC_$cf_ATTRIBUTE $cf_directive
15883 if { (eval echo "$as_me:15883: \"$ac_compile\"") >&5
15884 (eval $ac_compile) 2>&5
15886 echo "$as_me:15886: \$? = $ac_status" >&5
15887 (exit $ac_status); }; then
15888 test -n "$verbose" && echo "$as_me:15888: result: ... $cf_attribute" >&5
15889 echo "${ECHO_T}... $cf_attribute" >&6
15890 cat conftest.h >>confdefs.h
15891 case $cf_attribute in #(vi
15894 cat >>confdefs.h <<EOF
15895 #define GCC_NORETURN $cf_directive
15900 cf_value='/* nothing */'
15901 if test "$cf_printf_attribute" != no ; then
15902 cf_value='__attribute__((format(printf,fmt,var)))'
15904 cat >>confdefs.h <<\EOF
15905 #define GCC_PRINTF 1
15910 cat >>confdefs.h <<EOF
15911 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15916 cf_value='/* nothing */'
15917 if test "$cf_scanf_attribute" != no ; then
15918 cf_value='__attribute__((format(scanf,fmt,var)))'
15920 cat >>confdefs.h <<\EOF
15921 #define GCC_SCANF 1
15926 cat >>confdefs.h <<EOF
15927 #define GCC_SCANFLIKE(fmt,var) $cf_value
15933 cat >>confdefs.h <<EOF
15934 #define GCC_UNUSED $cf_directive
15942 fgrep define conftest.i >>confdefs.h
15949 if test "$GCC" = yes ; then
15952 echo "$as_me:15952: checking if this is really Intel C compiler" >&5
15953 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
15954 cf_save_CFLAGS="$CFLAGS"
15955 CFLAGS="$CFLAGS -no-gcc"
15956 cat >conftest.$ac_ext <<_ACEOF
15957 #line 15957 "configure"
15958 #include "confdefs.h"
15964 #ifdef __INTEL_COMPILER
15973 rm -f conftest.$ac_objext
15974 if { (eval echo "$as_me:15974: \"$ac_compile\"") >&5
15975 (eval $ac_compile) 2>&5
15977 echo "$as_me:15977: \$? = $ac_status" >&5
15978 (exit $ac_status); } &&
15979 { ac_try='test -s conftest.$ac_objext'
15980 { (eval echo "$as_me:15980: \"$ac_try\"") >&5
15981 (eval $ac_try) 2>&5
15983 echo "$as_me:15983: \$? = $ac_status" >&5
15984 (exit $ac_status); }; }; then
15986 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
15989 echo "$as_me: failed program was:" >&5
15990 cat conftest.$ac_ext >&5
15992 rm -f conftest.$ac_objext conftest.$ac_ext
15993 CFLAGS="$cf_save_CFLAGS"
15994 echo "$as_me:15994: result: $INTEL_COMPILER" >&5
15995 echo "${ECHO_T}$INTEL_COMPILER" >&6
16002 if test "$GCC" = yes ; then
16003 echo "$as_me:16003: checking if this is really Clang C compiler" >&5
16004 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
16005 cf_save_CFLAGS="$CFLAGS"
16006 CFLAGS="$CFLAGS -Qunused-arguments"
16007 cat >conftest.$ac_ext <<_ACEOF
16008 #line 16008 "configure"
16009 #include "confdefs.h"
16024 rm -f conftest.$ac_objext
16025 if { (eval echo "$as_me:16025: \"$ac_compile\"") >&5
16026 (eval $ac_compile) 2>&5
16028 echo "$as_me:16028: \$? = $ac_status" >&5
16029 (exit $ac_status); } &&
16030 { ac_try='test -s conftest.$ac_objext'
16031 { (eval echo "$as_me:16031: \"$ac_try\"") >&5
16032 (eval $ac_try) 2>&5
16034 echo "$as_me:16034: \$? = $ac_status" >&5
16035 (exit $ac_status); }; }; then
16037 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
16040 echo "$as_me: failed program was:" >&5
16041 cat conftest.$ac_ext >&5
16043 rm -f conftest.$ac_objext conftest.$ac_ext
16044 CFLAGS="$cf_save_CFLAGS"
16045 echo "$as_me:16045: result: $CLANG_COMPILER" >&5
16046 echo "${ECHO_T}$CLANG_COMPILER" >&6
16049 cat > conftest.$ac_ext <<EOF
16050 #line 16050 "${as_me:-configure}"
16051 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16054 if test "$INTEL_COMPILER" = yes
16056 # The "-wdXXX" options suppress warnings:
16057 # remark #1419: external declaration in primary source file
16058 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16059 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16060 # remark #193: zero used for undefined preprocessing identifier
16061 # remark #593: variable "curs_sb_left_arrow" was set but never used
16062 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16063 # remark #869: parameter "tw" was never referenced
16064 # remark #981: operands are evaluated in unspecified order
16065 # warning #279: controlling expression is constant
16067 { echo "$as_me:16067: checking for $CC warning options..." >&5
16068 echo "$as_me: checking for $CC warning options..." >&6;}
16069 cf_save_CFLAGS="$CFLAGS"
16070 EXTRA_CFLAGS="-Wall"
16082 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16083 if { (eval echo "$as_me:16083: \"$ac_compile\"") >&5
16084 (eval $ac_compile) 2>&5
16086 echo "$as_me:16086: \$? = $ac_status" >&5
16087 (exit $ac_status); }; then
16088 test -n "$verbose" && echo "$as_me:16088: result: ... -$cf_opt" >&5
16089 echo "${ECHO_T}... -$cf_opt" >&6
16090 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16093 CFLAGS="$cf_save_CFLAGS"
16095 elif test "$GCC" = yes
16097 { echo "$as_me:16097: checking for $CC warning options..." >&5
16098 echo "$as_me: checking for $CC warning options..." >&6;}
16099 cf_save_CFLAGS="$CFLAGS"
16102 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16103 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16104 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16105 for cf_opt in W Wall \
16106 Wbad-function-cast \
16109 Wdeclaration-after-statement \
16112 Wmissing-declarations \
16113 Wmissing-prototypes \
16117 Wstrict-prototypes \
16118 Wundef $cf_gcc_warnings $cf_warn_CONST
16120 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16121 if { (eval echo "$as_me:16121: \"$ac_compile\"") >&5
16122 (eval $ac_compile) 2>&5
16124 echo "$as_me:16124: \$? = $ac_status" >&5
16125 (exit $ac_status); }; then
16126 test -n "$verbose" && echo "$as_me:16126: result: ... -$cf_opt" >&5
16127 echo "${ECHO_T}... -$cf_opt" >&6
16128 case $cf_opt in #(vi
16130 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
16133 case $GCC_VERSION in
16135 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
16137 echo "${as_me:-configure}:16137: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16142 Wpointer-arith) #(vi
16143 case $GCC_VERSION in
16145 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
16147 echo "${as_me:-configure}:16147: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16153 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16156 CFLAGS="$cf_save_CFLAGS"
16163 echo "$as_me:16163: checking if you want to use dmalloc for testing" >&5
16164 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
16166 # Check whether --with-dmalloc or --without-dmalloc was given.
16167 if test "${with_dmalloc+set}" = set; then
16168 withval="$with_dmalloc"
16170 cat >>confdefs.h <<EOF
16171 #define USE_DMALLOC 1
16174 : ${with_cflags:=-g}
16175 : ${with_no_leaks:=yes}
16180 echo "$as_me:16180: result: ${with_dmalloc:-no}" >&5
16181 echo "${ECHO_T}${with_dmalloc:-no}" >&6
16183 case .$with_cflags in #(vi
16185 case .$CFLAGS in #(vi
16193 cf_new_extra_cppflags=
16195 for cf_add_cflags in -g
16197 case $cf_fix_cppflags in
16199 case $cf_add_cflags in #(vi
16200 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
16201 case $cf_add_cflags in
16203 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16205 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16206 && test -z "${cf_tst_cflags}" \
16207 && cf_fix_cppflags=yes
16209 if test $cf_fix_cppflags = yes ; then
16210 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16212 elif test "${cf_tst_cflags}" = "\"'" ; then
16213 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16218 case "$CPPFLAGS" in
16219 *$cf_add_cflags) #(vi
16222 case $cf_add_cflags in #(vi
16224 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16226 CPPFLAGS=`echo "$CPPFLAGS" | \
16227 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16228 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16232 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16237 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16242 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16244 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16246 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16247 && test -z "${cf_tst_cflags}" \
16248 && cf_fix_cppflags=no
16253 if test -n "$cf_new_cflags" ; then
16255 CFLAGS="$CFLAGS $cf_new_cflags"
16258 if test -n "$cf_new_cppflags" ; then
16260 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
16263 if test -n "$cf_new_extra_cppflags" ; then
16265 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16273 if test "$with_dmalloc" = yes ; then
16274 echo "$as_me:16274: checking for dmalloc.h" >&5
16275 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
16276 if test "${ac_cv_header_dmalloc_h+set}" = set; then
16277 echo $ECHO_N "(cached) $ECHO_C" >&6
16279 cat >conftest.$ac_ext <<_ACEOF
16280 #line 16280 "configure"
16281 #include "confdefs.h"
16282 #include <dmalloc.h>
16284 if { (eval echo "$as_me:16284: \"$ac_cpp conftest.$ac_ext\"") >&5
16285 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16287 egrep -v '^ *\+' conftest.er1 >conftest.err
16289 cat conftest.err >&5
16290 echo "$as_me:16290: \$? = $ac_status" >&5
16291 (exit $ac_status); } >/dev/null; then
16292 if test -s conftest.err; then
16293 ac_cpp_err=$ac_c_preproc_warn_flag
16300 if test -z "$ac_cpp_err"; then
16301 ac_cv_header_dmalloc_h=yes
16303 echo "$as_me: failed program was:" >&5
16304 cat conftest.$ac_ext >&5
16305 ac_cv_header_dmalloc_h=no
16307 rm -f conftest.err conftest.$ac_ext
16309 echo "$as_me:16309: result: $ac_cv_header_dmalloc_h" >&5
16310 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
16311 if test $ac_cv_header_dmalloc_h = yes; then
16313 echo "$as_me:16313: checking for dmalloc_debug in -ldmalloc" >&5
16314 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
16315 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
16316 echo $ECHO_N "(cached) $ECHO_C" >&6
16318 ac_check_lib_save_LIBS=$LIBS
16319 LIBS="-ldmalloc $LIBS"
16320 cat >conftest.$ac_ext <<_ACEOF
16321 #line 16321 "configure"
16322 #include "confdefs.h"
16324 /* Override any gcc2 internal prototype to avoid an error. */
16328 /* We use char because int might match the return type of a gcc2
16329 builtin and then its argument prototype would still apply. */
16330 char dmalloc_debug ();
16339 rm -f conftest.$ac_objext conftest$ac_exeext
16340 if { (eval echo "$as_me:16340: \"$ac_link\"") >&5
16341 (eval $ac_link) 2>&5
16343 echo "$as_me:16343: \$? = $ac_status" >&5
16344 (exit $ac_status); } &&
16345 { ac_try='test -s conftest$ac_exeext'
16346 { (eval echo "$as_me:16346: \"$ac_try\"") >&5
16347 (eval $ac_try) 2>&5
16349 echo "$as_me:16349: \$? = $ac_status" >&5
16350 (exit $ac_status); }; }; then
16351 ac_cv_lib_dmalloc_dmalloc_debug=yes
16353 echo "$as_me: failed program was:" >&5
16354 cat conftest.$ac_ext >&5
16355 ac_cv_lib_dmalloc_dmalloc_debug=no
16357 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16358 LIBS=$ac_check_lib_save_LIBS
16360 echo "$as_me:16360: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
16361 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
16362 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
16363 cat >>confdefs.h <<EOF
16364 #define HAVE_LIBDMALLOC 1
16367 LIBS="-ldmalloc $LIBS"
16375 echo "$as_me:16375: checking if you want to use dbmalloc for testing" >&5
16376 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
16378 # Check whether --with-dbmalloc or --without-dbmalloc was given.
16379 if test "${with_dbmalloc+set}" = set; then
16380 withval="$with_dbmalloc"
16382 cat >>confdefs.h <<EOF
16383 #define USE_DBMALLOC 1
16386 : ${with_cflags:=-g}
16387 : ${with_no_leaks:=yes}
16392 echo "$as_me:16392: result: ${with_dbmalloc:-no}" >&5
16393 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
16395 case .$with_cflags in #(vi
16397 case .$CFLAGS in #(vi
16405 cf_new_extra_cppflags=
16407 for cf_add_cflags in -g
16409 case $cf_fix_cppflags in
16411 case $cf_add_cflags in #(vi
16412 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
16413 case $cf_add_cflags in
16415 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16417 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16418 && test -z "${cf_tst_cflags}" \
16419 && cf_fix_cppflags=yes
16421 if test $cf_fix_cppflags = yes ; then
16422 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16424 elif test "${cf_tst_cflags}" = "\"'" ; then
16425 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16430 case "$CPPFLAGS" in
16431 *$cf_add_cflags) #(vi
16434 case $cf_add_cflags in #(vi
16436 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16438 CPPFLAGS=`echo "$CPPFLAGS" | \
16439 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16440 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16444 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16449 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16454 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16456 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16458 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16459 && test -z "${cf_tst_cflags}" \
16460 && cf_fix_cppflags=no
16465 if test -n "$cf_new_cflags" ; then
16467 CFLAGS="$CFLAGS $cf_new_cflags"
16470 if test -n "$cf_new_cppflags" ; then
16472 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
16475 if test -n "$cf_new_extra_cppflags" ; then
16477 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16485 if test "$with_dbmalloc" = yes ; then
16486 echo "$as_me:16486: checking for dbmalloc.h" >&5
16487 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
16488 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
16489 echo $ECHO_N "(cached) $ECHO_C" >&6
16491 cat >conftest.$ac_ext <<_ACEOF
16492 #line 16492 "configure"
16493 #include "confdefs.h"
16494 #include <dbmalloc.h>
16496 if { (eval echo "$as_me:16496: \"$ac_cpp conftest.$ac_ext\"") >&5
16497 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16499 egrep -v '^ *\+' conftest.er1 >conftest.err
16501 cat conftest.err >&5
16502 echo "$as_me:16502: \$? = $ac_status" >&5
16503 (exit $ac_status); } >/dev/null; then
16504 if test -s conftest.err; then
16505 ac_cpp_err=$ac_c_preproc_warn_flag
16512 if test -z "$ac_cpp_err"; then
16513 ac_cv_header_dbmalloc_h=yes
16515 echo "$as_me: failed program was:" >&5
16516 cat conftest.$ac_ext >&5
16517 ac_cv_header_dbmalloc_h=no
16519 rm -f conftest.err conftest.$ac_ext
16521 echo "$as_me:16521: result: $ac_cv_header_dbmalloc_h" >&5
16522 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
16523 if test $ac_cv_header_dbmalloc_h = yes; then
16525 echo "$as_me:16525: checking for debug_malloc in -ldbmalloc" >&5
16526 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
16527 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
16528 echo $ECHO_N "(cached) $ECHO_C" >&6
16530 ac_check_lib_save_LIBS=$LIBS
16531 LIBS="-ldbmalloc $LIBS"
16532 cat >conftest.$ac_ext <<_ACEOF
16533 #line 16533 "configure"
16534 #include "confdefs.h"
16536 /* Override any gcc2 internal prototype to avoid an error. */
16540 /* We use char because int might match the return type of a gcc2
16541 builtin and then its argument prototype would still apply. */
16542 char debug_malloc ();
16551 rm -f conftest.$ac_objext conftest$ac_exeext
16552 if { (eval echo "$as_me:16552: \"$ac_link\"") >&5
16553 (eval $ac_link) 2>&5
16555 echo "$as_me:16555: \$? = $ac_status" >&5
16556 (exit $ac_status); } &&
16557 { ac_try='test -s conftest$ac_exeext'
16558 { (eval echo "$as_me:16558: \"$ac_try\"") >&5
16559 (eval $ac_try) 2>&5
16561 echo "$as_me:16561: \$? = $ac_status" >&5
16562 (exit $ac_status); }; }; then
16563 ac_cv_lib_dbmalloc_debug_malloc=yes
16565 echo "$as_me: failed program was:" >&5
16566 cat conftest.$ac_ext >&5
16567 ac_cv_lib_dbmalloc_debug_malloc=no
16569 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16570 LIBS=$ac_check_lib_save_LIBS
16572 echo "$as_me:16572: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
16573 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
16574 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
16575 cat >>confdefs.h <<EOF
16576 #define HAVE_LIBDBMALLOC 1
16579 LIBS="-ldbmalloc $LIBS"
16587 echo "$as_me:16587: checking if you want to use valgrind for testing" >&5
16588 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
16590 # Check whether --with-valgrind or --without-valgrind was given.
16591 if test "${with_valgrind+set}" = set; then
16592 withval="$with_valgrind"
16594 cat >>confdefs.h <<EOF
16595 #define USE_VALGRIND 1
16598 : ${with_cflags:=-g}
16599 : ${with_no_leaks:=yes}
16604 echo "$as_me:16604: result: ${with_valgrind:-no}" >&5
16605 echo "${ECHO_T}${with_valgrind:-no}" >&6
16607 case .$with_cflags in #(vi
16609 case .$CFLAGS in #(vi
16617 cf_new_extra_cppflags=
16619 for cf_add_cflags in -g
16621 case $cf_fix_cppflags in
16623 case $cf_add_cflags in #(vi
16624 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
16625 case $cf_add_cflags in
16627 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16629 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16630 && test -z "${cf_tst_cflags}" \
16631 && cf_fix_cppflags=yes
16633 if test $cf_fix_cppflags = yes ; then
16634 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16636 elif test "${cf_tst_cflags}" = "\"'" ; then
16637 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16642 case "$CPPFLAGS" in
16643 *$cf_add_cflags) #(vi
16646 case $cf_add_cflags in #(vi
16648 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16650 CPPFLAGS=`echo "$CPPFLAGS" | \
16651 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16652 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16656 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16661 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16666 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16668 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16670 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16671 && test -z "${cf_tst_cflags}" \
16672 && cf_fix_cppflags=no
16677 if test -n "$cf_new_cflags" ; then
16679 CFLAGS="$CFLAGS $cf_new_cflags"
16682 if test -n "$cf_new_cppflags" ; then
16684 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
16687 if test -n "$cf_new_extra_cppflags" ; then
16689 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16697 echo "$as_me:16697: checking if you want to perform memory-leak testing" >&5
16698 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
16700 # Check whether --enable-leaks or --disable-leaks was given.
16701 if test "${enable_leaks+set}" = set; then
16702 enableval="$enable_leaks"
16703 if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
16705 : ${with_no_leaks:=no}
16707 echo "$as_me:16707: result: $with_no_leaks" >&5
16708 echo "${ECHO_T}$with_no_leaks" >&6
16710 if test "$with_no_leaks" = yes ; then
16712 cat >>confdefs.h <<\EOF
16716 cat >>confdefs.h <<\EOF
16717 #define YY_NO_LEAKS 1
16723 echo "$as_me:16723: checking for an rpath option" >&5
16724 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
16725 case $cf_cv_system_name in #(vi
16727 if test "$GCC" = yes; then
16728 LD_RPATH_OPT="-Wl,-rpath,"
16730 LD_RPATH_OPT="-rpath "
16733 linux*|gnu*|k*bsd*-gnu) #(vi
16734 LD_RPATH_OPT="-Wl,-rpath,"
16736 openbsd[2-9].*|mirbsd*) #(vi
16737 LD_RPATH_OPT="-Wl,-rpath,"
16739 dragonfly*|freebsd*) #(vi
16740 LD_RPATH_OPT="-rpath "
16743 LD_RPATH_OPT="-Wl,-rpath,"
16746 LD_RPATH_OPT="-rpath "
16754 echo "$as_me:16754: result: $LD_RPATH_OPT" >&5
16755 echo "${ECHO_T}$LD_RPATH_OPT" >&6
16757 case "x$LD_RPATH_OPT" in #(vi
16759 echo "$as_me:16759: checking if we need a space after rpath option" >&5
16760 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
16761 cf_save_LIBS="$LIBS"
16763 cf_add_libs="${LD_RPATH_OPT}$libdir"
16764 # Filter out duplicates - this happens with badly-designed ".pc" files...
16765 for cf_add_1lib in $LIBS
16767 for cf_add_2lib in $cf_add_libs
16769 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16775 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16777 LIBS="$cf_add_libs"
16779 cat >conftest.$ac_ext <<_ACEOF
16780 #line 16780 "configure"
16781 #include "confdefs.h"
16791 rm -f conftest.$ac_objext conftest$ac_exeext
16792 if { (eval echo "$as_me:16792: \"$ac_link\"") >&5
16793 (eval $ac_link) 2>&5
16795 echo "$as_me:16795: \$? = $ac_status" >&5
16796 (exit $ac_status); } &&
16797 { ac_try='test -s conftest$ac_exeext'
16798 { (eval echo "$as_me:16798: \"$ac_try\"") >&5
16799 (eval $ac_try) 2>&5
16801 echo "$as_me:16801: \$? = $ac_status" >&5
16802 (exit $ac_status); }; }; then
16805 echo "$as_me: failed program was:" >&5
16806 cat conftest.$ac_ext >&5
16809 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16810 LIBS="$cf_save_LIBS"
16811 echo "$as_me:16811: result: $cf_rpath_space" >&5
16812 echo "${ECHO_T}$cf_rpath_space" >&6
16813 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
16817 echo "$as_me:16817: checking if rpath-hack should be disabled" >&5
16818 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
16820 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
16821 if test "${enable_rpath_hack+set}" = set; then
16822 enableval="$enable_rpath_hack"
16823 test "$enableval" != no && enableval=yes
16824 if test "$enableval" != "yes" ; then
16825 cf_disable_rpath_hack=yes
16827 cf_disable_rpath_hack=no
16831 cf_disable_rpath_hack=no
16834 echo "$as_me:16834: result: $cf_disable_rpath_hack" >&5
16835 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
16836 if test "$cf_disable_rpath_hack" = no ; then
16838 echo "$as_me:16838: checking for updated LDFLAGS" >&5
16839 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
16840 if test -n "$LD_RPATH_OPT" ; then
16841 echo "$as_me:16841: result: maybe" >&5
16842 echo "${ECHO_T}maybe" >&6
16846 # Extract the first word of "$ac_prog", so it can be a program name with args.
16847 set dummy $ac_prog; ac_word=$2
16848 echo "$as_me:16848: checking for $ac_word" >&5
16849 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16850 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
16851 echo $ECHO_N "(cached) $ECHO_C" >&6
16853 if test -n "$cf_ldd_prog"; then
16854 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
16856 ac_save_IFS=$IFS; IFS=$ac_path_separator
16858 for ac_dir in $ac_dummy; do
16860 test -z "$ac_dir" && ac_dir=.
16861 $as_executable_p "$ac_dir/$ac_word" || continue
16862 ac_cv_prog_cf_ldd_prog="$ac_prog"
16863 echo "$as_me:16863: found $ac_dir/$ac_word" >&5
16869 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
16870 if test -n "$cf_ldd_prog"; then
16871 echo "$as_me:16871: result: $cf_ldd_prog" >&5
16872 echo "${ECHO_T}$cf_ldd_prog" >&6
16874 echo "$as_me:16874: result: no" >&5
16875 echo "${ECHO_T}no" >&6
16878 test -n "$cf_ldd_prog" && break
16880 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
16882 cf_rpath_list="/usr/lib /lib"
16883 if test "$cf_ldd_prog" != no
16887 cat >conftest.$ac_ext <<_ACEOF
16888 #line 16888 "configure"
16889 #include "confdefs.h"
16899 rm -f conftest.$ac_objext conftest$ac_exeext
16900 if { (eval echo "$as_me:16900: \"$ac_link\"") >&5
16901 (eval $ac_link) 2>&5
16903 echo "$as_me:16903: \$? = $ac_status" >&5
16904 (exit $ac_status); } &&
16905 { ac_try='test -s conftest$ac_exeext'
16906 { (eval echo "$as_me:16906: \"$ac_try\"") >&5
16907 (eval $ac_try) 2>&5
16909 echo "$as_me:16909: \$? = $ac_status" >&5
16910 (exit $ac_status); }; }; then
16911 cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
16912 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
16914 echo "$as_me: failed program was:" >&5
16915 cat conftest.$ac_ext >&5
16917 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16919 # If we passed the link-test, but get a "not found" on a given library,
16920 # this could be due to inept reconfiguration of gcc to make it only
16921 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
16922 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
16923 # /usr/local libraries.
16924 if test -n "$cf_rpath_oops"
16926 for cf_rpath_src in $cf_rpath_oops
16928 for cf_rpath_dir in \
16933 if test -f $cf_rpath_dir/lib/$cf_rpath_src
16935 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
16937 echo "${as_me:-configure}:16937: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
16939 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
16947 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16949 echo "${as_me:-configure}:16949: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16951 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
16953 echo "${as_me:-configure}:16953: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
16956 for cf_rpath_src in $LDFLAGS
16958 case $cf_rpath_src in #(vi
16961 # check if this refers to a directory which we will ignore
16963 if test -n "$cf_rpath_list"
16965 for cf_rpath_item in $cf_rpath_list
16967 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
16975 if test "$cf_rpath_skip" = no
16977 # transform the option
16978 if test "$LD_RPATH_OPT" = "-R " ; then
16979 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
16981 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
16984 # if we have not already added this, add it now
16985 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
16986 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
16988 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
16990 echo "${as_me:-configure}:16990: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
16992 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
16997 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
16999 LDFLAGS=$cf_rpath_dst
17001 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
17003 echo "${as_me:-configure}:17003: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
17005 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
17007 echo "${as_me:-configure}:17007: testing ...checking LIBS $LIBS ..." 1>&5
17010 for cf_rpath_src in $LIBS
17012 case $cf_rpath_src in #(vi
17015 # check if this refers to a directory which we will ignore
17017 if test -n "$cf_rpath_list"
17019 for cf_rpath_item in $cf_rpath_list
17021 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
17029 if test "$cf_rpath_skip" = no
17031 # transform the option
17032 if test "$LD_RPATH_OPT" = "-R " ; then
17033 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
17035 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
17038 # if we have not already added this, add it now
17039 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
17040 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
17042 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
17044 echo "${as_me:-configure}:17044: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
17046 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
17051 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
17055 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
17057 echo "${as_me:-configure}:17057: testing ...checked LIBS $LIBS ..." 1>&5
17059 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
17061 echo "${as_me:-configure}:17061: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
17064 echo "$as_me:17064: result: no" >&5
17065 echo "${ECHO_T}no" >&6
17073 ac_config_files="$ac_config_files Makefile"
17074 ac_config_commands="$ac_config_commands default"
17075 cat >confcache <<\_ACEOF
17076 # This file is a shell script that caches the results of configure
17077 # tests run on this system so they can be shared between configure
17078 # scripts and configure runs, see configure's option --config-cache.
17079 # It is not useful on other systems. If it contains results you don't
17080 # want to keep, you may remove or edit it.
17082 # config.status only pays attention to the cache file if you give it
17083 # the --recheck option to rerun configure.
17085 # `ac_cv_env_foo' variables (set or unset) will be overriden when
17086 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17087 # following values.
17091 # The following way of writing the cache mishandles newlines in values,
17092 # but we know of no workaround that is simple, portable, and efficient.
17093 # So, don't put newlines in cache variables' values.
17094 # Ultrix sh set writes to stderr and can't be redirected directly,
17095 # and sets the high bit in the cache file unless we assign to the vars.
17098 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17100 # `set' does not quote correctly, so add quotes (double-quote
17101 # substitution turns \\\\ into \\, and sed turns \\ into \).
17104 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17107 # `set' quotes correctly as required by POSIX, so do not add quotes.
17109 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17116 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17118 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17120 if cmp -s $cache_file confcache; then :; else
17121 if test -w $cache_file; then
17122 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17123 cat confcache >$cache_file
17125 echo "not updating unwritable cache $cache_file"
17130 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17131 # Let make expand exec_prefix.
17132 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17134 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17135 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17136 # trailing colons and then remove the whole line if VPATH becomes empty
17137 # (actually we leave an empty line to preserve line numbers).
17138 if test "x$srcdir" = x.; then
17139 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17140 s/:*\$(srcdir):*/:/;
17141 s/:*\${srcdir}:*/:/;
17143 s/^\([^=]*=[ ]*\):*/\1/;
17149 DEFS=-DHAVE_CONFIG_H
17151 : ${CONFIG_STATUS=./config.status}
17152 ac_clean_files_save=$ac_clean_files
17153 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17154 { echo "$as_me:17154: creating $CONFIG_STATUS" >&5
17155 echo "$as_me: creating $CONFIG_STATUS" >&6;}
17156 cat >$CONFIG_STATUS <<_ACEOF
17158 # Generated automatically by configure.
17159 # Run this file to recreate the current configuration.
17160 # Compiler output produced by configure, useful for debugging
17161 # configure, is in config.log if it exists.
17164 SHELL=\${CONFIG_SHELL-$SHELL}
17165 ac_cs_invocation="\$0 \$@"
17169 cat >>$CONFIG_STATUS <<\_ACEOF
17170 # Be Bourne compatible
17171 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17174 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17178 # Name of the executable.
17179 as_me=`echo "$0" |sed 's,.*[\\/],,'`
17181 if expr a : '\(a\)' >/dev/null 2>&1; then
17187 rm -f conf$$ conf$$.exe conf$$.file
17189 if ln -s conf$$.file conf$$ 2>/dev/null; then
17190 # We could just check for DJGPP; but this test a) works b) is more generic
17191 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17192 if test -f conf$$.exe; then
17193 # Don't use ln at all; we don't have any links
17198 elif ln conf$$.file conf$$ 2>/dev/null; then
17203 rm -f conf$$ conf$$.exe conf$$.file
17205 as_executable_p="test -f"
17207 # Support unset when possible.
17208 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17215 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
17216 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
17217 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
17218 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
17219 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
17220 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
17221 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
17222 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
17225 # We need space, tab and new line, in precisely that order.
17231 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
17237 # Files that config.status was made for.
17238 if test -n "$ac_config_files"; then
17239 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17242 if test -n "$ac_config_headers"; then
17243 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17246 if test -n "$ac_config_links"; then
17247 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17250 if test -n "$ac_config_commands"; then
17251 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17254 cat >>$CONFIG_STATUS <<\EOF
17257 \`$as_me' instantiates files from templates according to the
17258 current configuration.
17260 Usage: $0 [OPTIONS] [FILE]...
17262 -h, --help print this help, then exit
17263 -V, --version print version number, then exit
17264 -d, --debug don't remove temporary files
17265 --recheck update $as_me by reconfiguring in the same conditions
17266 --file=FILE[:TEMPLATE]
17267 instantiate the configuration file FILE
17268 --header=FILE[:TEMPLATE]
17269 instantiate the configuration header FILE
17271 Configuration files:
17274 Configuration headers:
17277 Configuration commands:
17280 Report bugs to <dickey@invisible-island.net>."
17283 cat >>$CONFIG_STATUS <<EOF
17286 configured by $0, generated by GNU Autoconf 2.52.20121002,
17287 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17289 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17290 Free Software Foundation, Inc.
17291 This config.status script is free software; the Free Software Foundation
17292 gives unlimited permission to copy, distribute and modify it."
17297 cat >>$CONFIG_STATUS <<\EOF
17298 # If no file are specified by the user, then we need to provide default
17299 # value. By we need to know if files were specified by the user.
17305 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17306 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17308 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17312 *) # This is not an option, so the user has probably given explicit
17314 ac_need_defaults=false;;
17318 # Handling of the options.
17320 cat >>$CONFIG_STATUS <<EOF
17321 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17322 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17323 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17325 cat >>$CONFIG_STATUS <<\EOF
17326 --version | --vers* | -V )
17327 echo "$ac_cs_version"; exit 0 ;;
17329 # Conflict between --help and --header
17330 { { echo "$as_me:17330: error: ambiguous option: $1
17331 Try \`$0 --help' for more information." >&5
17332 echo "$as_me: error: ambiguous option: $1
17333 Try \`$0 --help' for more information." >&2;}
17334 { (exit 1); exit 1; }; };;
17335 --help | --hel | -h )
17336 echo "$ac_cs_usage"; exit 0 ;;
17337 --debug | --d* | -d )
17339 --file | --fil | --fi | --f )
17341 CONFIG_FILES="$CONFIG_FILES $1"
17342 ac_need_defaults=false;;
17343 --header | --heade | --head | --hea )
17345 CONFIG_HEADERS="$CONFIG_HEADERS $1"
17346 ac_need_defaults=false;;
17348 # This is an error.
17349 -*) { { echo "$as_me:17349: error: unrecognized option: $1
17350 Try \`$0 --help' for more information." >&5
17351 echo "$as_me: error: unrecognized option: $1
17352 Try \`$0 --help' for more information." >&2;}
17353 { (exit 1); exit 1; }; } ;;
17355 *) ac_config_targets="$ac_config_targets $1" ;;
17364 ## ----------------------- ##
17365 ## Running config.status. ##
17366 ## ----------------------- ##
17368 This file was extended by $as_me 2.52.20121002, executed with
17369 CONFIG_FILES = $CONFIG_FILES
17370 CONFIG_HEADERS = $CONFIG_HEADERS
17371 CONFIG_LINKS = $CONFIG_LINKS
17372 CONFIG_COMMANDS = $CONFIG_COMMANDS
17373 > $ac_cs_invocation
17374 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17379 cat >>$CONFIG_STATUS <<EOF
17381 # INIT-COMMANDS section.
17391 cat >>$CONFIG_STATUS <<\EOF
17392 for ac_config_target in $ac_config_targets
17394 case "$ac_config_target" in
17395 # Handling of arguments.
17396 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17397 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17398 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
17399 *) { { echo "$as_me:17399: error: invalid argument: $ac_config_target" >&5
17400 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17401 { (exit 1); exit 1; }; };;
17405 # If the user did not use the arguments to specify the items to instantiate,
17406 # then the envvar interface is used. Set only those that are not.
17407 # We use the long form for the default assignment because of an extremely
17408 # bizarre bug on SunOS 4.1.3.
17409 if $ac_need_defaults; then
17410 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17411 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17412 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17415 # Create a temporary directory, and hook for its removal unless debugging.
17418 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17419 trap '{ (exit 1); exit 1; }' 1 2 13 15
17422 # Create a (secure) tmp directory for tmp files.
17425 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17426 test -n "$tmp" && test -d "$tmp"
17429 tmp=$TMPDIR/cs$$-$RANDOM
17430 (umask 077 && mkdir $tmp)
17433 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17434 { (exit 1); exit 1; }
17439 cat >>$CONFIG_STATUS <<EOF
17442 # CONFIG_FILES section.
17445 # No need to generate the scripts if there are no CONFIG_FILES.
17446 # This happens for instance when ./config.status config.h
17447 if test -n "\$CONFIG_FILES"; then
17448 # Protect against being on the right side of a sed subst in config.status.
17449 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17450 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17451 s,@SHELL@,$SHELL,;t t
17452 s,@exec_prefix@,$exec_prefix,;t t
17453 s,@prefix@,$prefix,;t t
17454 s,@program_transform_name@,$program_transform_name,;t t
17455 s,@bindir@,$bindir,;t t
17456 s,@sbindir@,$sbindir,;t t
17457 s,@libexecdir@,$libexecdir,;t t
17458 s,@datarootdir@,$datarootdir,;t t
17459 s,@datadir@,$datadir,;t t
17460 s,@sysconfdir@,$sysconfdir,;t t
17461 s,@sharedstatedir@,$sharedstatedir,;t t
17462 s,@localstatedir@,$localstatedir,;t t
17463 s,@libdir@,$libdir,;t t
17464 s,@includedir@,$includedir,;t t
17465 s,@oldincludedir@,$oldincludedir,;t t
17466 s,@infodir@,$infodir,;t t
17467 s,@mandir@,$mandir,;t t
17468 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17469 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17470 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17471 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17472 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17473 s,@build_alias@,$build_alias,;t t
17474 s,@host_alias@,$host_alias,;t t
17475 s,@target_alias@,$target_alias,;t t
17476 s,@ECHO_C@,$ECHO_C,;t t
17477 s,@ECHO_N@,$ECHO_N,;t t
17478 s,@ECHO_T@,$ECHO_T,;t t
17479 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17480 s,@DEFS@,$DEFS,;t t
17481 s,@LIBS@,$LIBS,;t t
17482 s,@build@,$build,;t t
17483 s,@build_cpu@,$build_cpu,;t t
17484 s,@build_vendor@,$build_vendor,;t t
17485 s,@build_os@,$build_os,;t t
17486 s,@host@,$host,;t t
17487 s,@host_cpu@,$host_cpu,;t t
17488 s,@host_vendor@,$host_vendor,;t t
17489 s,@host_os@,$host_os,;t t
17490 s,@SET_MAKE@,$SET_MAKE,;t t
17492 s,@CFLAGS@,$CFLAGS,;t t
17493 s,@LDFLAGS@,$LDFLAGS,;t t
17494 s,@CPPFLAGS@,$CPPFLAGS,;t t
17495 s,@ac_ct_CC@,$ac_ct_CC,;t t
17496 s,@EXEEXT@,$EXEEXT,;t t
17497 s,@OBJEXT@,$OBJEXT,;t t
17498 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
17501 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17502 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17503 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17504 s,@LINT@,$LINT,;t t
17505 s,@LINT_OPTS@,$LINT_OPTS,;t t
17506 s,@CTAGS@,$CTAGS,;t t
17507 s,@ETAGS@,$ETAGS,;t t
17508 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
17509 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
17510 s,@MATH_LIB@,$MATH_LIB,;t t
17511 s,@top_builddir@,$top_builddir,;t t
17512 s,@CC_G_OPT@,$CC_G_OPT,;t t
17513 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
17514 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
17515 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
17516 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
17518 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
17519 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
17520 s,@LD_MODEL@,$LD_MODEL,;t t
17521 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
17522 s,@LIBTOOL@,$LIBTOOL,;t t
17523 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
17524 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
17525 s,@LIB_LINK@,$LIB_LINK,;t t
17526 s,@LINK_TESTS@,$LINK_TESTS,;t t
17527 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
17528 s,@PTHREAD@,$PTHREAD,;t t
17529 s,@TEST_ARGS@,$TEST_ARGS,;t t
17530 s,@TEST_DEPS@,$TEST_DEPS,;t t
17531 s,@TEST_LIBS@,$TEST_LIBS,;t t
17532 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
17533 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
17534 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
17535 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
17536 s,@includesubdir@,$includesubdir,;t t
17537 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
17538 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
17539 s,@ECHO_LT@,$ECHO_LT,;t t
17540 s,@ECHO_LD@,$ECHO_LD,;t t
17541 s,@RULE_CC@,$RULE_CC,;t t
17542 s,@SHOW_CC@,$SHOW_CC,;t t
17543 s,@ECHO_CC@,$ECHO_CC,;t t
17544 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
17545 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
17546 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
17547 s,@X_CFLAGS@,$X_CFLAGS,;t t
17548 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
17549 s,@X_LIBS@,$X_LIBS,;t t
17550 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
17551 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
17552 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
17553 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
17554 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
17555 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
17560 cat >>$CONFIG_STATUS <<\EOF
17561 # Split the substitutions into bite-sized pieces for seds with
17562 # small command number limits, like on Digital OSF/1 and HP-UX.
17563 ac_max_sed_lines=48
17564 ac_sed_frag=1 # Number of current file.
17565 ac_beg=1 # First line for current file.
17566 ac_end=$ac_max_sed_lines # Line after last line for current file.
17569 while $ac_more_lines; do
17570 if test $ac_beg -gt 1; then
17571 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17573 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17575 if test ! -s $tmp/subs.frag; then
17576 ac_more_lines=false
17578 # The purpose of the label and of the branching condition is to
17579 # speed up the sed processing (if there are no `@' at all, there
17580 # is no need to browse any of the substitutions).
17581 # These are the two extra sed commands mentioned above.
17583 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17584 if test -z "$ac_sed_cmds"; then
17585 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17587 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17589 ac_sed_frag=`expr $ac_sed_frag + 1`
17591 ac_end=`expr $ac_end + $ac_max_sed_lines`
17594 if test -z "$ac_sed_cmds"; then
17597 fi # test -n "$CONFIG_FILES"
17600 cat >>$CONFIG_STATUS <<\EOF
17601 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17602 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17604 - | *:- | *:-:* ) # input from stdin
17606 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17607 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17608 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17609 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17610 * ) ac_file_in=$ac_file.in ;;
17613 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17614 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17615 X"$ac_file" : 'X\(//\)[^/]' \| \
17616 X"$ac_file" : 'X\(//\)$' \| \
17617 X"$ac_file" : 'X\(/\)' \| \
17618 . : '\(.\)' 2>/dev/null ||
17620 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17621 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17622 /^X\(\/\/\)$/{ s//\1/; q; }
17623 /^X\(\/\).*/{ s//\1/; q; }
17625 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17626 { case "$ac_dir" in
17627 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17631 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17632 case $as_mkdir_dir in
17633 # Skip DOS drivespec
17634 ?:) as_incr_dir=$as_mkdir_dir ;;
17636 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17637 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17642 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
17643 # A "../" for each directory in $ac_dir_suffix.
17644 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
17646 ac_dir_suffix= ac_dots=
17651 if test -z "$ac_dots"; then
17654 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
17656 [\\/]* | ?:[\\/]* )
17657 ac_srcdir=$srcdir$ac_dir_suffix;
17658 ac_top_srcdir=$srcdir ;;
17659 *) # Relative path.
17660 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
17661 ac_top_srcdir=$ac_dots$srcdir ;;
17665 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17666 *) ac_INSTALL=$ac_dots$INSTALL ;;
17669 if test x"$ac_file" != x-; then
17670 { echo "$as_me:17670: creating $ac_file" >&5
17671 echo "$as_me: creating $ac_file" >&6;}
17674 # Let's still pretend it is `configure' which instantiates (i.e., don't
17675 # use $as_me), people would be surprised to read:
17676 # /* config.h. Generated automatically by config.status. */
17677 configure_input="Generated automatically from `echo $ac_file_in |
17678 sed 's,.*/,,'` by configure."
17680 # First look for the input files in the build tree, otherwise in the
17682 ac_file_inputs=`IFS=:
17683 for f in $ac_file_in; do
17685 -) echo $tmp/stdin ;;
17687 # Absolute (can't be DOS-style, as IFS=:)
17688 test -f "$f" || { { echo "$as_me:17688: error: cannot find input file: $f" >&5
17689 echo "$as_me: error: cannot find input file: $f" >&2;}
17690 { (exit 1); exit 1; }; }
17693 if test -f "$f"; then
17696 elif test -f "$srcdir/$f"; then
17701 { { echo "$as_me:17701: error: cannot find input file: $f" >&5
17702 echo "$as_me: error: cannot find input file: $f" >&2;}
17703 { (exit 1); exit 1; }; }
17706 done` || { (exit 1); exit 1; }
17708 cat >>$CONFIG_STATUS <<\EOF
17709 ac_warn_datarootdir=no
17710 if test x"$ac_file" != x-; then
17711 for ac_item in $ac_file_inputs
17713 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
17714 if test -n "$ac_seen"; then
17715 ac_used=`grep '@datarootdir@' $ac_item`
17716 if test -z "$ac_used"; then
17717 { echo "$as_me:17717: WARNING: datarootdir was used implicitly but not set:
17719 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
17721 ac_warn_datarootdir=yes
17724 ac_seen=`grep '${datarootdir}' $ac_item`
17725 if test -n "$ac_seen"; then
17726 { echo "$as_me:17726: WARNING: datarootdir was used explicitly but not set:
17728 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
17730 ac_warn_datarootdir=yes
17735 if test "x$ac_warn_datarootdir" = xyes; then
17736 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
17740 cat >>$CONFIG_STATUS <<EOF
17744 cat >>$CONFIG_STATUS <<\EOF
17746 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17747 s,@configure_input@,$configure_input,;t t
17748 s,@srcdir@,$ac_srcdir,;t t
17749 s,@top_srcdir@,$ac_top_srcdir,;t t
17750 s,@INSTALL@,$ac_INSTALL,;t t
17751 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17753 if test x"$ac_file" != x-; then
17754 cp $tmp/out $ac_file
17756 for ac_name in prefix exec_prefix datarootdir
17758 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
17759 if test -n "$ac_seen"; then
17760 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
17761 if test -z "$ac_init"; then
17762 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
17763 { echo "$as_me:17763: WARNING: Variable $ac_name is used but was not set:
17765 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
17770 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
17771 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
17772 if test -s $tmp/out; then
17773 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
17774 { echo "$as_me:17774: WARNING: Some variables may not be substituted:
17776 echo "$as_me: WARNING: Some variables may not be substituted:
17786 cat >>$CONFIG_STATUS <<\EOF
17789 # CONFIG_HEADER section.
17792 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17793 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17795 # ac_d sets the value in "#define NAME VALUE" lines.
17796 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17797 ac_dB='[ ].*$,\1#\2'
17800 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17801 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17802 ac_iB='\([ ]\),\1#\2define\3'
17805 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17806 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17807 ac_uB='$,\1#\2define\3'
17811 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
17812 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17814 - | *:- | *:-:* ) # input from stdin
17816 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17817 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17818 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17819 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17820 * ) ac_file_in=$ac_file.in ;;
17823 test x"$ac_file" != x- && { echo "$as_me:17823: creating $ac_file" >&5
17824 echo "$as_me: creating $ac_file" >&6;}
17826 # First look for the input files in the build tree, otherwise in the
17828 ac_file_inputs=`IFS=:
17829 for f in $ac_file_in; do
17831 -) echo $tmp/stdin ;;
17833 # Absolute (can't be DOS-style, as IFS=:)
17834 test -f "$f" || { { echo "$as_me:17834: error: cannot find input file: $f" >&5
17835 echo "$as_me: error: cannot find input file: $f" >&2;}
17836 { (exit 1); exit 1; }; }
17839 if test -f "$f"; then
17842 elif test -f "$srcdir/$f"; then
17847 { { echo "$as_me:17847: error: cannot find input file: $f" >&5
17848 echo "$as_me: error: cannot find input file: $f" >&2;}
17849 { (exit 1); exit 1; }; }
17852 done` || { (exit 1); exit 1; }
17853 # Remove the trailing spaces.
17854 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
17858 # Transform confdefs.h into a list of #define's. We won't use it as a sed
17859 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
17860 # be either 'cat' or 'sort'.
17861 cat confdefs.h | uniq >conftest.vals
17863 # Break up conftest.vals because some shells have a limit on
17864 # the size of here documents, and old seds have small limits too.
17866 rm -f conftest.tail
17867 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
17868 while grep . conftest.vals >/dev/null
17870 # Write chunks of a limited-size here document to conftest.frag.
17871 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
17872 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
17873 echo 'CEOF' >> $CONFIG_STATUS
17874 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17875 rm -f conftest.vals
17876 mv conftest.tail conftest.vals
17878 rm -f conftest.vals
17880 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
17882 echo ' cat >> conftest.edit <<CEOF
17883 /@DEFS@/r conftest.frag
17886 sed -f conftest.edit $tmp/in > $tmp/out
17888 mv $tmp/out $tmp/in
17889 rm -f conftest.edit conftest.frag
17890 ' >> $CONFIG_STATUS
17892 cat >>$CONFIG_STATUS <<\EOF
17893 # Let's still pretend it is `configure' which instantiates (i.e., don't
17894 # use $as_me), people would be surprised to read:
17895 # /* config.h. Generated automatically by config.status. */
17896 if test x"$ac_file" = x-; then
17897 echo "/* Generated automatically by configure. */" >$tmp/config.h
17899 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
17901 cat $tmp/in >>$tmp/config.h
17903 if test x"$ac_file" != x-; then
17904 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17905 { echo "$as_me:17905: $ac_file is unchanged" >&5
17906 echo "$as_me: $ac_file is unchanged" >&6;}
17908 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17909 X"$ac_file" : 'X\(//\)[^/]' \| \
17910 X"$ac_file" : 'X\(//\)$' \| \
17911 X"$ac_file" : 'X\(/\)' \| \
17912 . : '\(.\)' 2>/dev/null ||
17914 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17915 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17916 /^X\(\/\/\)$/{ s//\1/; q; }
17917 /^X\(\/\).*/{ s//\1/; q; }
17919 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17920 { case "$ac_dir" in
17921 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17925 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17926 case $as_mkdir_dir in
17927 # Skip DOS drivespec
17928 ?:) as_incr_dir=$as_mkdir_dir ;;
17930 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17931 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17938 mv $tmp/config.h $ac_file
17942 rm -f $tmp/config.h
17946 cat >>$CONFIG_STATUS <<\EOF
17948 # CONFIG_COMMANDS section.
17950 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17951 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17952 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17959 if test ! -d $srcdir/$cf_dir; then
17961 elif test -f $srcdir/$cf_dir/programs; then
17962 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
17966 cat >>Makefile <<TEST_EOF
17968 # These rules are generated so we do not rely on suffix rules, which do not
17969 # work consistently for different make-programs (the '\$(MODEL)/' confuses
17970 # some, and the '\$x' confuses others).
17973 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
17976 cat >>Makefile <<TEST_EOF
17978 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
17979 \$(srcdir)/test.priv.h \\
17982 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) \$(srcdir)/$N.c
17986 if test -f ../config.guess && test -f ../config.sub
17988 cat >>Makefile <<TEST_EOF
17990 # if we used CF_INHERIT for getting these files, we can remove them
17992 rm -f config.guess config.sub
18000 cat >>$CONFIG_STATUS <<\EOF
18002 { (exit 0); exit 0; }
18004 chmod +x $CONFIG_STATUS
18005 ac_clean_files=$ac_clean_files_save
18007 # configure is writing to config.log, and then calls config.status.
18008 # config.status does its own redirection, appending to config.log.
18009 # Unfortunately, on DOS this fails, as config.log is still kept open
18010 # by configure, so config.status won't be able to write to it; its
18011 # output is simply discarded. So we exec the FD to /dev/null,
18012 # effectively closing config.log, so it can be properly (re)opened and
18013 # appended to by config.status. When coming back to configure, we
18014 # need to make the FD available again.
18015 if test "$no_create" != yes; then
18018 $SHELL $CONFIG_STATUS || ac_cs_success=false
18020 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18021 # would make configure fail if this is the last instruction.
18022 $ac_cs_success || { (exit 1); exit 1; }