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
3188 echo "$as_me:3188: checking if we should define _XOPEN_SOURCE" >&5
3189 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3190 if test "${cf_cv_xopen_source+set}" = set; then
3191 echo $ECHO_N "(cached) $ECHO_C" >&6
3194 cat >conftest.$ac_ext <<_ACEOF
3195 #line 3195 "configure"
3196 #include "confdefs.h"
3200 #include <sys/types.h>
3206 #ifndef _XOPEN_SOURCE
3213 rm -f conftest.$ac_objext
3214 if { (eval echo "$as_me:3214: \"$ac_compile\"") >&5
3215 (eval $ac_compile) 2>&5
3217 echo "$as_me:3217: \$? = $ac_status" >&5
3218 (exit $ac_status); } &&
3219 { ac_try='test -s conftest.$ac_objext'
3220 { (eval echo "$as_me:3220: \"$ac_try\"") >&5
3223 echo "$as_me:3223: \$? = $ac_status" >&5
3224 (exit $ac_status); }; }; then
3225 cf_cv_xopen_source=no
3227 echo "$as_me: failed program was:" >&5
3228 cat conftest.$ac_ext >&5
3230 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3231 cat >conftest.$ac_ext <<_ACEOF
3232 #line 3232 "configure"
3233 #include "confdefs.h"
3237 #include <sys/types.h>
3243 #ifdef _XOPEN_SOURCE
3250 rm -f conftest.$ac_objext
3251 if { (eval echo "$as_me:3251: \"$ac_compile\"") >&5
3252 (eval $ac_compile) 2>&5
3254 echo "$as_me:3254: \$? = $ac_status" >&5
3255 (exit $ac_status); } &&
3256 { ac_try='test -s conftest.$ac_objext'
3257 { (eval echo "$as_me:3257: \"$ac_try\"") >&5
3260 echo "$as_me:3260: \$? = $ac_status" >&5
3261 (exit $ac_status); }; }; then
3262 cf_cv_xopen_source=no
3264 echo "$as_me: failed program was:" >&5
3265 cat conftest.$ac_ext >&5
3266 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3268 rm -f conftest.$ac_objext conftest.$ac_ext
3272 rm -f conftest.$ac_objext conftest.$ac_ext
3275 echo "$as_me:3275: result: $cf_cv_xopen_source" >&5
3276 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3278 if test "$cf_cv_xopen_source" != no ; then
3280 CFLAGS=`echo "$CFLAGS" | \
3281 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3282 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3284 CPPFLAGS=`echo "$CPPFLAGS" | \
3285 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3286 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3288 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3293 cf_new_extra_cppflags=
3295 for cf_add_cflags in $cf_temp_xopen_source
3297 case $cf_fix_cppflags in
3299 case $cf_add_cflags in #(vi
3300 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3301 case $cf_add_cflags in
3303 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3305 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3306 && test -z "${cf_tst_cflags}" \
3307 && cf_fix_cppflags=yes
3309 if test $cf_fix_cppflags = yes ; then
3310 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3312 elif test "${cf_tst_cflags}" = "\"'" ; then
3313 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3319 *$cf_add_cflags) #(vi
3322 case $cf_add_cflags in #(vi
3324 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3326 CPPFLAGS=`echo "$CPPFLAGS" | \
3327 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3328 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3332 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3337 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3342 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3344 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3346 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3347 && test -z "${cf_tst_cflags}" \
3348 && cf_fix_cppflags=no
3353 if test -n "$cf_new_cflags" ; then
3355 CFLAGS="$CFLAGS $cf_new_cflags"
3358 if test -n "$cf_new_cppflags" ; then
3360 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3363 if test -n "$cf_new_extra_cppflags" ; then
3365 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3370 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3372 cf_save_CFLAGS="$CFLAGS"
3373 cf_save_CPPFLAGS="$CPPFLAGS"
3375 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3376 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3377 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3379 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3380 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3381 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3383 echo "$as_me:3383: checking if we should define _POSIX_C_SOURCE" >&5
3384 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3385 if test "${cf_cv_posix_c_source+set}" = set; then
3386 echo $ECHO_N "(cached) $ECHO_C" >&6
3389 echo "${as_me:-configure}:3389: testing if the symbol is already defined go no further ..." 1>&5
3391 cat >conftest.$ac_ext <<_ACEOF
3392 #line 3392 "configure"
3393 #include "confdefs.h"
3394 #include <sys/types.h>
3399 #ifndef _POSIX_C_SOURCE
3406 rm -f conftest.$ac_objext
3407 if { (eval echo "$as_me:3407: \"$ac_compile\"") >&5
3408 (eval $ac_compile) 2>&5
3410 echo "$as_me:3410: \$? = $ac_status" >&5
3411 (exit $ac_status); } &&
3412 { ac_try='test -s conftest.$ac_objext'
3413 { (eval echo "$as_me:3413: \"$ac_try\"") >&5
3416 echo "$as_me:3416: \$? = $ac_status" >&5
3417 (exit $ac_status); }; }; then
3418 cf_cv_posix_c_source=no
3420 echo "$as_me: failed program was:" >&5
3421 cat conftest.$ac_ext >&5
3422 cf_want_posix_source=no
3423 case .$cf_POSIX_C_SOURCE in #(vi
3425 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3428 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3429 cf_want_posix_source=yes
3432 cf_want_posix_source=yes
3435 if test "$cf_want_posix_source" = yes ; then
3436 cat >conftest.$ac_ext <<_ACEOF
3437 #line 3437 "configure"
3438 #include "confdefs.h"
3439 #include <sys/types.h>
3444 #ifdef _POSIX_SOURCE
3451 rm -f conftest.$ac_objext
3452 if { (eval echo "$as_me:3452: \"$ac_compile\"") >&5
3453 (eval $ac_compile) 2>&5
3455 echo "$as_me:3455: \$? = $ac_status" >&5
3456 (exit $ac_status); } &&
3457 { ac_try='test -s conftest.$ac_objext'
3458 { (eval echo "$as_me:3458: \"$ac_try\"") >&5
3461 echo "$as_me:3461: \$? = $ac_status" >&5
3462 (exit $ac_status); }; }; then
3465 echo "$as_me: failed program was:" >&5
3466 cat conftest.$ac_ext >&5
3467 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3469 rm -f conftest.$ac_objext conftest.$ac_ext
3472 echo "${as_me:-configure}:3472: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3474 CFLAGS="$cf_trim_CFLAGS"
3475 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3477 echo "${as_me:-configure}:3477: testing if the second compile does not leave our definition intact error ..." 1>&5
3479 cat >conftest.$ac_ext <<_ACEOF
3480 #line 3480 "configure"
3481 #include "confdefs.h"
3482 #include <sys/types.h>
3487 #ifndef _POSIX_C_SOURCE
3494 rm -f conftest.$ac_objext
3495 if { (eval echo "$as_me:3495: \"$ac_compile\"") >&5
3496 (eval $ac_compile) 2>&5
3498 echo "$as_me:3498: \$? = $ac_status" >&5
3499 (exit $ac_status); } &&
3500 { ac_try='test -s conftest.$ac_objext'
3501 { (eval echo "$as_me:3501: \"$ac_try\"") >&5
3504 echo "$as_me:3504: \$? = $ac_status" >&5
3505 (exit $ac_status); }; }; then
3508 echo "$as_me: failed program was:" >&5
3509 cat conftest.$ac_ext >&5
3510 cf_cv_posix_c_source=no
3512 rm -f conftest.$ac_objext conftest.$ac_ext
3513 CFLAGS="$cf_save_CFLAGS"
3514 CPPFLAGS="$cf_save_CPPFLAGS"
3517 rm -f conftest.$ac_objext conftest.$ac_ext
3520 echo "$as_me:3520: result: $cf_cv_posix_c_source" >&5
3521 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3523 if test "$cf_cv_posix_c_source" != no ; then
3524 CFLAGS="$cf_trim_CFLAGS"
3525 CPPFLAGS="$cf_trim_CPPFLAGS"
3530 cf_new_extra_cppflags=
3532 for cf_add_cflags in $cf_cv_posix_c_source
3534 case $cf_fix_cppflags in
3536 case $cf_add_cflags in #(vi
3537 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3538 case $cf_add_cflags in
3540 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3542 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3543 && test -z "${cf_tst_cflags}" \
3544 && cf_fix_cppflags=yes
3546 if test $cf_fix_cppflags = yes ; then
3547 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3549 elif test "${cf_tst_cflags}" = "\"'" ; then
3550 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3556 *$cf_add_cflags) #(vi
3559 case $cf_add_cflags in #(vi
3561 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3563 CPPFLAGS=`echo "$CPPFLAGS" | \
3564 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3565 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3569 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3574 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3579 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3581 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3583 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3584 && test -z "${cf_tst_cflags}" \
3585 && cf_fix_cppflags=no
3590 if test -n "$cf_new_cflags" ; then
3592 CFLAGS="$CFLAGS $cf_new_cflags"
3595 if test -n "$cf_new_cppflags" ; then
3597 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3600 if test -n "$cf_new_extra_cppflags" ; then
3602 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3610 if test -n "$cf_xopen_source" ; then
3615 cf_new_extra_cppflags=
3617 for cf_add_cflags in $cf_xopen_source
3619 case $cf_fix_cppflags in
3621 case $cf_add_cflags in #(vi
3622 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3623 case $cf_add_cflags in
3625 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3627 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3628 && test -z "${cf_tst_cflags}" \
3629 && cf_fix_cppflags=yes
3631 if test $cf_fix_cppflags = yes ; then
3632 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3634 elif test "${cf_tst_cflags}" = "\"'" ; then
3635 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3641 *$cf_add_cflags) #(vi
3644 case $cf_add_cflags in #(vi
3646 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3648 CPPFLAGS=`echo "$CPPFLAGS" | \
3649 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3650 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3654 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3659 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3664 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3666 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3668 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3669 && test -z "${cf_tst_cflags}" \
3670 && cf_fix_cppflags=no
3675 if test -n "$cf_new_cflags" ; then
3676 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
3678 echo "${as_me:-configure}:3678: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
3680 CFLAGS="$CFLAGS $cf_new_cflags"
3683 if test -n "$cf_new_cppflags" ; then
3684 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
3686 echo "${as_me:-configure}:3686: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
3688 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3691 if test -n "$cf_new_extra_cppflags" ; then
3692 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
3694 echo "${as_me:-configure}:3694: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
3696 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3701 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
3702 echo "$as_me:3702: checking if _XOPEN_SOURCE really is set" >&5
3703 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
3704 cat >conftest.$ac_ext <<_ACEOF
3705 #line 3705 "configure"
3706 #include "confdefs.h"
3712 #ifndef _XOPEN_SOURCE
3719 rm -f conftest.$ac_objext
3720 if { (eval echo "$as_me:3720: \"$ac_compile\"") >&5
3721 (eval $ac_compile) 2>&5
3723 echo "$as_me:3723: \$? = $ac_status" >&5
3724 (exit $ac_status); } &&
3725 { ac_try='test -s conftest.$ac_objext'
3726 { (eval echo "$as_me:3726: \"$ac_try\"") >&5
3729 echo "$as_me:3729: \$? = $ac_status" >&5
3730 (exit $ac_status); }; }; then
3731 cf_XOPEN_SOURCE_set=yes
3733 echo "$as_me: failed program was:" >&5
3734 cat conftest.$ac_ext >&5
3735 cf_XOPEN_SOURCE_set=no
3737 rm -f conftest.$ac_objext conftest.$ac_ext
3738 echo "$as_me:3738: result: $cf_XOPEN_SOURCE_set" >&5
3739 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
3740 if test $cf_XOPEN_SOURCE_set = yes
3742 cat >conftest.$ac_ext <<_ACEOF
3743 #line 3743 "configure"
3744 #include "confdefs.h"
3750 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
3757 rm -f conftest.$ac_objext
3758 if { (eval echo "$as_me:3758: \"$ac_compile\"") >&5
3759 (eval $ac_compile) 2>&5
3761 echo "$as_me:3761: \$? = $ac_status" >&5
3762 (exit $ac_status); } &&
3763 { ac_try='test -s conftest.$ac_objext'
3764 { (eval echo "$as_me:3764: \"$ac_try\"") >&5
3767 echo "$as_me:3767: \$? = $ac_status" >&5
3768 (exit $ac_status); }; }; then
3769 cf_XOPEN_SOURCE_set_ok=yes
3771 echo "$as_me: failed program was:" >&5
3772 cat conftest.$ac_ext >&5
3773 cf_XOPEN_SOURCE_set_ok=no
3775 rm -f conftest.$ac_objext conftest.$ac_ext
3776 if test $cf_XOPEN_SOURCE_set_ok = no
3778 { echo "$as_me:3778: WARNING: _XOPEN_SOURCE is lower than requested" >&5
3779 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
3783 echo "$as_me:3783: checking if we should define _XOPEN_SOURCE" >&5
3784 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3785 if test "${cf_cv_xopen_source+set}" = set; then
3786 echo $ECHO_N "(cached) $ECHO_C" >&6
3789 cat >conftest.$ac_ext <<_ACEOF
3790 #line 3790 "configure"
3791 #include "confdefs.h"
3795 #include <sys/types.h>
3801 #ifndef _XOPEN_SOURCE
3808 rm -f conftest.$ac_objext
3809 if { (eval echo "$as_me:3809: \"$ac_compile\"") >&5
3810 (eval $ac_compile) 2>&5
3812 echo "$as_me:3812: \$? = $ac_status" >&5
3813 (exit $ac_status); } &&
3814 { ac_try='test -s conftest.$ac_objext'
3815 { (eval echo "$as_me:3815: \"$ac_try\"") >&5
3818 echo "$as_me:3818: \$? = $ac_status" >&5
3819 (exit $ac_status); }; }; then
3820 cf_cv_xopen_source=no
3822 echo "$as_me: failed program was:" >&5
3823 cat conftest.$ac_ext >&5
3825 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3826 cat >conftest.$ac_ext <<_ACEOF
3827 #line 3827 "configure"
3828 #include "confdefs.h"
3832 #include <sys/types.h>
3838 #ifdef _XOPEN_SOURCE
3845 rm -f conftest.$ac_objext
3846 if { (eval echo "$as_me:3846: \"$ac_compile\"") >&5
3847 (eval $ac_compile) 2>&5
3849 echo "$as_me:3849: \$? = $ac_status" >&5
3850 (exit $ac_status); } &&
3851 { ac_try='test -s conftest.$ac_objext'
3852 { (eval echo "$as_me:3852: \"$ac_try\"") >&5
3855 echo "$as_me:3855: \$? = $ac_status" >&5
3856 (exit $ac_status); }; }; then
3857 cf_cv_xopen_source=no
3859 echo "$as_me: failed program was:" >&5
3860 cat conftest.$ac_ext >&5
3861 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3863 rm -f conftest.$ac_objext conftest.$ac_ext
3867 rm -f conftest.$ac_objext conftest.$ac_ext
3870 echo "$as_me:3870: result: $cf_cv_xopen_source" >&5
3871 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3873 if test "$cf_cv_xopen_source" != no ; then
3875 CFLAGS=`echo "$CFLAGS" | \
3876 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3877 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3879 CPPFLAGS=`echo "$CPPFLAGS" | \
3880 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3881 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3883 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3888 cf_new_extra_cppflags=
3890 for cf_add_cflags in $cf_temp_xopen_source
3892 case $cf_fix_cppflags in
3894 case $cf_add_cflags in #(vi
3895 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3896 case $cf_add_cflags in
3898 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3900 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3901 && test -z "${cf_tst_cflags}" \
3902 && cf_fix_cppflags=yes
3904 if test $cf_fix_cppflags = yes ; then
3905 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3907 elif test "${cf_tst_cflags}" = "\"'" ; then
3908 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3914 *$cf_add_cflags) #(vi
3917 case $cf_add_cflags in #(vi
3919 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3921 CPPFLAGS=`echo "$CPPFLAGS" | \
3922 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3923 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3927 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3932 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3937 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3939 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3941 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3942 && test -z "${cf_tst_cflags}" \
3943 && cf_fix_cppflags=no
3948 if test -n "$cf_new_cflags" ; then
3950 CFLAGS="$CFLAGS $cf_new_cflags"
3953 if test -n "$cf_new_cppflags" ; then
3955 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3958 if test -n "$cf_new_extra_cppflags" ; then
3960 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3968 echo "$as_me:3968: checking for signal global datatype" >&5
3969 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
3970 if test "${cf_cv_sig_atomic_t+set}" = set; then
3971 echo $ECHO_N "(cached) $ECHO_C" >&6
3975 "volatile sig_atomic_t" \
3979 cat >conftest.$ac_ext <<_ACEOF
3980 #line 3980 "configure"
3981 #include "confdefs.h"
3983 #include <sys/types.h>
3989 static void handler(int sig)
3996 signal(SIGINT, handler);
4002 rm -f conftest.$ac_objext
4003 if { (eval echo "$as_me:4003: \"$ac_compile\"") >&5
4004 (eval $ac_compile) 2>&5
4006 echo "$as_me:4006: \$? = $ac_status" >&5
4007 (exit $ac_status); } &&
4008 { ac_try='test -s conftest.$ac_objext'
4009 { (eval echo "$as_me:4009: \"$ac_try\"") >&5
4012 echo "$as_me:4012: \$? = $ac_status" >&5
4013 (exit $ac_status); }; }; then
4014 cf_cv_sig_atomic_t=$cf_type
4016 echo "$as_me: failed program was:" >&5
4017 cat conftest.$ac_ext >&5
4018 cf_cv_sig_atomic_t=no
4020 rm -f conftest.$ac_objext conftest.$ac_ext
4021 test "$cf_cv_sig_atomic_t" != no && break
4026 echo "$as_me:4026: result: $cf_cv_sig_atomic_t" >&5
4027 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
4028 test "$cf_cv_sig_atomic_t" != no &&
4029 cat >>confdefs.h <<EOF
4030 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
4033 echo "$as_me:4033: checking if you want to use pkg-config" >&5
4034 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4036 # Check whether --with-pkg-config or --without-pkg-config was given.
4037 if test "${with_pkg_config+set}" = set; then
4038 withval="$with_pkg_config"
4039 cf_pkg_config=$withval
4043 echo "$as_me:4043: result: $cf_pkg_config" >&5
4044 echo "${ECHO_T}$cf_pkg_config" >&6
4046 case $cf_pkg_config in #(vi
4052 if test -n "$ac_tool_prefix"; then
4053 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4054 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4055 echo "$as_me:4055: checking for $ac_word" >&5
4056 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4057 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4058 echo $ECHO_N "(cached) $ECHO_C" >&6
4062 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4065 ac_save_IFS=$IFS; IFS=$ac_path_separator
4067 for ac_dir in $ac_dummy; do
4069 test -z "$ac_dir" && ac_dir=.
4070 if $as_executable_p "$ac_dir/$ac_word"; then
4071 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4072 echo "$as_me:4072: found $ac_dir/$ac_word" >&5
4080 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4082 if test -n "$PKG_CONFIG"; then
4083 echo "$as_me:4083: result: $PKG_CONFIG" >&5
4084 echo "${ECHO_T}$PKG_CONFIG" >&6
4086 echo "$as_me:4086: result: no" >&5
4087 echo "${ECHO_T}no" >&6
4091 if test -z "$ac_cv_path_PKG_CONFIG"; then
4092 ac_pt_PKG_CONFIG=$PKG_CONFIG
4093 # Extract the first word of "pkg-config", so it can be a program name with args.
4094 set dummy pkg-config; ac_word=$2
4095 echo "$as_me:4095: checking for $ac_word" >&5
4096 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4097 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4098 echo $ECHO_N "(cached) $ECHO_C" >&6
4100 case $ac_pt_PKG_CONFIG in
4102 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4105 ac_save_IFS=$IFS; IFS=$ac_path_separator
4107 for ac_dir in $ac_dummy; do
4109 test -z "$ac_dir" && ac_dir=.
4110 if $as_executable_p "$ac_dir/$ac_word"; then
4111 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4112 echo "$as_me:4112: found $ac_dir/$ac_word" >&5
4117 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4121 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4123 if test -n "$ac_pt_PKG_CONFIG"; then
4124 echo "$as_me:4124: result: $ac_pt_PKG_CONFIG" >&5
4125 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4127 echo "$as_me:4127: result: no" >&5
4128 echo "${ECHO_T}no" >&6
4131 PKG_CONFIG=$ac_pt_PKG_CONFIG
4133 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4142 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4143 if test "$PKG_CONFIG" != none ; then
4145 if test "x$prefix" != xNONE; then
4146 cf_path_syntax="$prefix"
4148 cf_path_syntax="$ac_default_prefix"
4151 case ".$PKG_CONFIG" in #(vi
4152 .\$\(*\)*|.\'*\'*) #(vi
4156 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4158 .\${*prefix}*|.\${*dir}*) #(vi
4159 eval PKG_CONFIG="$PKG_CONFIG"
4160 case ".$PKG_CONFIG" in #(vi
4162 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
4167 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
4170 { { echo "$as_me:4170: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4171 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4172 { (exit 1); exit 1; }; }
4178 echo "$as_me:4178: checking if you want to see long compiling messages" >&5
4179 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
4181 # Check whether --enable-echo or --disable-echo was given.
4182 if test "${enable_echo+set}" = set; then
4183 enableval="$enable_echo"
4184 test "$enableval" != no && enableval=yes
4185 if test "$enableval" != "yes" ; then
4188 ECHO_LD='@echo linking $@;'
4189 RULE_CC='@echo compiling $<'
4190 SHOW_CC='@echo compiling $@'
4212 echo "$as_me:4212: result: $enableval" >&5
4213 echo "${ECHO_T}$enableval" >&6
4215 echo "$as_me:4215: checking for ncurses wrap-prefix" >&5
4216 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
4218 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
4219 if test "${with_ncurses_wrap_prefix+set}" = set; then
4220 withval="$with_ncurses_wrap_prefix"
4221 NCURSES_WRAP_PREFIX=$withval
4223 NCURSES_WRAP_PREFIX=_nc_
4225 echo "$as_me:4225: result: $NCURSES_WRAP_PREFIX" >&5
4226 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
4228 echo "$as_me:4228: checking if you want to check for wide-character functions" >&5
4229 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
4231 # Check whether --enable-widec or --disable-widec was given.
4232 if test "${enable_widec+set}" = set; then
4233 enableval="$enable_widec"
4234 test "$enableval" != no && enableval=yes
4235 if test "$enableval" != "yes" ; then
4245 echo "$as_me:4245: result: $cf_enable_widec" >&5
4246 echo "${ECHO_T}$cf_enable_widec" >&6
4248 echo "$as_me:4248: checking for specific curses-directory" >&5
4249 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4251 # Check whether --with-curses-dir or --without-curses-dir was given.
4252 if test "${with_curses_dir+set}" = set; then
4253 withval="$with_curses_dir"
4254 cf_cv_curses_dir=$withval
4258 echo "$as_me:4258: result: $cf_cv_curses_dir" >&5
4259 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4261 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4264 if test "x$prefix" != xNONE; then
4265 cf_path_syntax="$prefix"
4267 cf_path_syntax="$ac_default_prefix"
4270 case ".$withval" in #(vi
4271 .\$\(*\)*|.\'*\'*) #(vi
4275 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4277 .\${*prefix}*|.\${*dir}*) #(vi
4278 eval withval="$withval"
4279 case ".$withval" in #(vi
4281 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4286 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4289 { { echo "$as_me:4289: error: expected a pathname, not \"$withval\"" >&5
4290 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4291 { (exit 1); exit 1; }; }
4295 if test -d "$cf_cv_curses_dir"
4298 if test -n "$cf_cv_curses_dir/include" ; then
4299 for cf_add_incdir in $cf_cv_curses_dir/include
4301 while test $cf_add_incdir != /usr/include
4303 if test -d $cf_add_incdir
4306 if test -n "$CFLAGS$CPPFLAGS" ; then
4307 # a loop is needed to ensure we can add subdirs of existing dirs
4308 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4309 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4310 cf_have_incdir=yes; break
4315 if test "$cf_have_incdir" = no ; then
4316 if test "$cf_add_incdir" = /usr/local/include ; then
4317 if test "$GCC" = yes
4319 cf_save_CPPFLAGS=$CPPFLAGS
4320 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4321 cat >conftest.$ac_ext <<_ACEOF
4322 #line 4322 "configure"
4323 #include "confdefs.h"
4333 rm -f conftest.$ac_objext
4334 if { (eval echo "$as_me:4334: \"$ac_compile\"") >&5
4335 (eval $ac_compile) 2>&5
4337 echo "$as_me:4337: \$? = $ac_status" >&5
4338 (exit $ac_status); } &&
4339 { ac_try='test -s conftest.$ac_objext'
4340 { (eval echo "$as_me:4340: \"$ac_try\"") >&5
4343 echo "$as_me:4343: \$? = $ac_status" >&5
4344 (exit $ac_status); }; }; then
4347 echo "$as_me: failed program was:" >&5
4348 cat conftest.$ac_ext >&5
4351 rm -f conftest.$ac_objext conftest.$ac_ext
4352 CPPFLAGS=$cf_save_CPPFLAGS
4357 if test "$cf_have_incdir" = no ; then
4358 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4360 echo "${as_me:-configure}:4360: testing adding $cf_add_incdir to include-path ..." 1>&5
4362 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4364 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4365 test "$cf_top_incdir" = "$cf_add_incdir" && break
4366 cf_add_incdir="$cf_top_incdir"
4375 if test -n "$cf_cv_curses_dir/lib" ; then
4376 for cf_add_libdir in $cf_cv_curses_dir/lib
4378 if test $cf_add_libdir = /usr/lib ; then
4380 elif test -d $cf_add_libdir
4383 if test -n "$LDFLAGS$LIBS" ; then
4384 # a loop is needed to ensure we can add subdirs of existing dirs
4385 for cf_test_libdir in $LDFLAGS $LIBS ; do
4386 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4387 cf_have_libdir=yes; break
4391 if test "$cf_have_libdir" = no ; then
4392 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4394 echo "${as_me:-configure}:4394: testing adding $cf_add_libdir to library-path ..." 1>&5
4396 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4407 echo "$as_me:4407: checking for specified curses library type" >&5
4408 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
4410 # Check whether --with-ncursesw or --without-ncursesw was given.
4411 if test "${with_ncursesw+set}" = set; then
4412 withval="$with_ncursesw"
4413 cf_cv_screen=ncursesw
4416 # Check whether --with-ncurses or --without-ncurses was given.
4417 if test "${with_ncurses+set}" = set; then
4418 withval="$with_ncurses"
4419 cf_cv_screen=ncurses
4422 # Check whether --with-pdcurses or --without-pdcurses was given.
4423 if test "${with_pdcurses+set}" = set; then
4424 withval="$with_pdcurses"
4425 cf_cv_screen=pdcurses
4428 # Check whether --with-curses-colr or --without-curses-colr was given.
4429 if test "${with_curses_colr+set}" = set; then
4430 withval="$with_curses_colr"
4431 cf_cv_screen=curses_colr
4434 # Check whether --with-curses-5lib or --without-curses-5lib was given.
4435 if test "${with_curses_5lib+set}" = set; then
4436 withval="$with_curses_5lib"
4437 cf_cv_screen=curses_5lib
4444 echo "$as_me:4444: result: $cf_cv_screen" >&5
4445 echo "${ECHO_T}$cf_cv_screen" >&6
4447 case $cf_cv_screen in #(vi
4448 curses|curses_*) #(vi
4450 echo "$as_me:4450: checking for extra include directories" >&5
4451 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
4452 if test "${cf_cv_curses_incdir+set}" = set; then
4453 echo $ECHO_N "(cached) $ECHO_C" >&6
4456 cf_cv_curses_incdir=no
4457 case $host_os in #(vi
4459 if test "x$cf_cv_screen" = "xcurses_colr"
4461 test -d /usr/include/curses_colr && \
4462 cf_cv_curses_incdir="-I/usr/include/curses_colr"
4466 if test "x$cf_cv_screen" = "xcurses_5lib"
4468 test -d /usr/5lib && \
4469 test -d /usr/5include && \
4470 cf_cv_curses_incdir="-I/usr/5include"
4476 echo "$as_me:4476: result: $cf_cv_curses_incdir" >&5
4477 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
4478 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
4480 echo "$as_me:4480: checking if we have identified curses headers" >&5
4481 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4482 if test "${cf_cv_ncurses_header+set}" = set; then
4483 echo $ECHO_N "(cached) $ECHO_C" >&6
4486 cf_cv_ncurses_header=none
4489 curses.h ncurses/ncurses.h ncurses/curses.h
4491 cat >conftest.$ac_ext <<_ACEOF
4492 #line 4492 "configure"
4493 #include "confdefs.h"
4494 #include <${cf_header}>
4498 initscr(); tgoto("?", 0,0)
4503 rm -f conftest.$ac_objext
4504 if { (eval echo "$as_me:4504: \"$ac_compile\"") >&5
4505 (eval $ac_compile) 2>&5
4507 echo "$as_me:4507: \$? = $ac_status" >&5
4508 (exit $ac_status); } &&
4509 { ac_try='test -s conftest.$ac_objext'
4510 { (eval echo "$as_me:4510: \"$ac_try\"") >&5
4513 echo "$as_me:4513: \$? = $ac_status" >&5
4514 (exit $ac_status); }; }; then
4515 cf_cv_ncurses_header=$cf_header; break
4517 echo "$as_me: failed program was:" >&5
4518 cat conftest.$ac_ext >&5
4520 rm -f conftest.$ac_objext conftest.$ac_ext
4524 echo "$as_me:4524: result: $cf_cv_ncurses_header" >&5
4525 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4527 if test "$cf_cv_ncurses_header" = none ; then
4528 { { echo "$as_me:4528: error: No curses header-files found" >&5
4529 echo "$as_me: error: No curses header-files found" >&2;}
4530 { (exit 1); exit 1; }; }
4533 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4535 for ac_header in $cf_cv_ncurses_header
4537 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4538 echo "$as_me:4538: checking for $ac_header" >&5
4539 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4540 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4541 echo $ECHO_N "(cached) $ECHO_C" >&6
4543 cat >conftest.$ac_ext <<_ACEOF
4544 #line 4544 "configure"
4545 #include "confdefs.h"
4546 #include <$ac_header>
4548 if { (eval echo "$as_me:4548: \"$ac_cpp conftest.$ac_ext\"") >&5
4549 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4551 egrep -v '^ *\+' conftest.er1 >conftest.err
4553 cat conftest.err >&5
4554 echo "$as_me:4554: \$? = $ac_status" >&5
4555 (exit $ac_status); } >/dev/null; then
4556 if test -s conftest.err; then
4557 ac_cpp_err=$ac_c_preproc_warn_flag
4564 if test -z "$ac_cpp_err"; then
4565 eval "$as_ac_Header=yes"
4567 echo "$as_me: failed program was:" >&5
4568 cat conftest.$ac_ext >&5
4569 eval "$as_ac_Header=no"
4571 rm -f conftest.err conftest.$ac_ext
4573 echo "$as_me:4573: result: `eval echo '${'$as_ac_Header'}'`" >&5
4574 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4575 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4576 cat >>confdefs.h <<EOF
4577 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4583 echo "$as_me:4583: checking for terminfo header" >&5
4584 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4585 if test "${cf_cv_term_header+set}" = set; then
4586 echo $ECHO_N "(cached) $ECHO_C" >&6
4589 case ${cf_cv_ncurses_header} in #(vi
4590 */ncurses.h|*/ncursesw.h) #(vi
4591 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4594 cf_term_header=term.h
4598 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4600 cat >conftest.$ac_ext <<_ACEOF
4601 #line 4601 "configure"
4602 #include "confdefs.h"
4604 #include <${cf_cv_ncurses_header:-curses.h}>
4610 int x = auto_left_margin
4615 rm -f conftest.$ac_objext
4616 if { (eval echo "$as_me:4616: \"$ac_compile\"") >&5
4617 (eval $ac_compile) 2>&5
4619 echo "$as_me:4619: \$? = $ac_status" >&5
4620 (exit $ac_status); } &&
4621 { ac_try='test -s conftest.$ac_objext'
4622 { (eval echo "$as_me:4622: \"$ac_try\"") >&5
4625 echo "$as_me:4625: \$? = $ac_status" >&5
4626 (exit $ac_status); }; }; then
4628 cf_cv_term_header="$cf_test"
4630 echo "$as_me: failed program was:" >&5
4631 cat conftest.$ac_ext >&5
4633 cf_cv_term_header=unknown
4636 rm -f conftest.$ac_objext conftest.$ac_ext
4637 test "$cf_cv_term_header" != unknown && break
4641 echo "$as_me:4641: result: $cf_cv_term_header" >&5
4642 echo "${ECHO_T}$cf_cv_term_header" >&6
4644 # Set definitions to allow ifdef'ing to accommodate subdirectories
4646 case $cf_cv_term_header in # (vi
4649 cat >>confdefs.h <<\EOF
4650 #define HAVE_TERM_H 1
4656 case $cf_cv_term_header in # (vi
4657 ncurses/term.h) #(vi
4659 cat >>confdefs.h <<\EOF
4660 #define HAVE_NCURSES_TERM_H 1
4666 cat >>confdefs.h <<\EOF
4667 #define HAVE_NCURSESW_TERM_H 1
4673 echo "$as_me:4673: checking for ncurses version" >&5
4674 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
4675 if test "${cf_cv_ncurses_version+set}" = set; then
4676 echo $ECHO_N "(cached) $ECHO_C" >&6
4679 cf_cv_ncurses_version=no
4682 if test "$cross_compiling" = yes; then
4684 # This will not work if the preprocessor splits the line after the
4685 # Autoconf token. The 'unproto' program does that.
4686 cat > conftest.$ac_ext <<EOF
4687 #include <${cf_cv_ncurses_header:-curses.h}>
4689 #ifdef NCURSES_VERSION
4690 Autoconf NCURSES_VERSION
4698 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4699 { (eval echo "$as_me:4699: \"$cf_try\"") >&5
4702 echo "$as_me:4702: \$? = $ac_status" >&5
4703 (exit $ac_status); }
4704 if test -f conftest.out ; then
4705 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4706 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4711 cat >conftest.$ac_ext <<_ACEOF
4712 #line 4712 "configure"
4713 #include "confdefs.h"
4715 #include <${cf_cv_ncurses_header:-curses.h}>
4719 FILE *fp = fopen("$cf_tempfile", "w");
4720 #ifdef NCURSES_VERSION
4721 # ifdef NCURSES_VERSION_PATCH
4722 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
4724 fprintf(fp, "%s\n", NCURSES_VERSION);
4728 fprintf(fp, "old\n");
4733 ${cf_cv_main_return:-return}(0);
4736 rm -f conftest$ac_exeext
4737 if { (eval echo "$as_me:4737: \"$ac_link\"") >&5
4738 (eval $ac_link) 2>&5
4740 echo "$as_me:4740: \$? = $ac_status" >&5
4741 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4742 { (eval echo "$as_me:4742: \"$ac_try\"") >&5
4745 echo "$as_me:4745: \$? = $ac_status" >&5
4746 (exit $ac_status); }; }; then
4748 cf_cv_ncurses_version=`cat $cf_tempfile`
4750 echo "$as_me: program exited with status $ac_status" >&5
4751 echo "$as_me: failed program was:" >&5
4752 cat conftest.$ac_ext >&5
4754 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4759 echo "$as_me:4759: result: $cf_cv_ncurses_version" >&5
4760 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
4761 test "$cf_cv_ncurses_version" = no ||
4762 cat >>confdefs.h <<\EOF
4766 echo "$as_me:4766: checking if we have identified curses libraries" >&5
4767 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
4768 cat >conftest.$ac_ext <<_ACEOF
4769 #line 4769 "configure"
4770 #include "confdefs.h"
4771 #include <${cf_cv_ncurses_header:-curses.h}>
4775 initscr(); tgoto("?", 0,0)
4780 rm -f conftest.$ac_objext conftest$ac_exeext
4781 if { (eval echo "$as_me:4781: \"$ac_link\"") >&5
4782 (eval $ac_link) 2>&5
4784 echo "$as_me:4784: \$? = $ac_status" >&5
4785 (exit $ac_status); } &&
4786 { ac_try='test -s conftest$ac_exeext'
4787 { (eval echo "$as_me:4787: \"$ac_try\"") >&5
4790 echo "$as_me:4790: \$? = $ac_status" >&5
4791 (exit $ac_status); }; }; then
4794 echo "$as_me: failed program was:" >&5
4795 cat conftest.$ac_ext >&5
4798 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4799 echo "$as_me:4799: result: $cf_result" >&5
4800 echo "${ECHO_T}$cf_result" >&6
4802 if test "$cf_result" = no ; then
4803 case $host_os in #(vi
4805 echo "$as_me:4805: checking for tgoto in -lmytinfo" >&5
4806 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
4807 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
4808 echo $ECHO_N "(cached) $ECHO_C" >&6
4810 ac_check_lib_save_LIBS=$LIBS
4811 LIBS="-lmytinfo $LIBS"
4812 cat >conftest.$ac_ext <<_ACEOF
4813 #line 4813 "configure"
4814 #include "confdefs.h"
4816 /* Override any gcc2 internal prototype to avoid an error. */
4820 /* We use char because int might match the return type of a gcc2
4821 builtin and then its argument prototype would still apply. */
4831 rm -f conftest.$ac_objext conftest$ac_exeext
4832 if { (eval echo "$as_me:4832: \"$ac_link\"") >&5
4833 (eval $ac_link) 2>&5
4835 echo "$as_me:4835: \$? = $ac_status" >&5
4836 (exit $ac_status); } &&
4837 { ac_try='test -s conftest$ac_exeext'
4838 { (eval echo "$as_me:4838: \"$ac_try\"") >&5
4841 echo "$as_me:4841: \$? = $ac_status" >&5
4842 (exit $ac_status); }; }; then
4843 ac_cv_lib_mytinfo_tgoto=yes
4845 echo "$as_me: failed program was:" >&5
4846 cat conftest.$ac_ext >&5
4847 ac_cv_lib_mytinfo_tgoto=no
4849 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4850 LIBS=$ac_check_lib_save_LIBS
4852 echo "$as_me:4852: result: $ac_cv_lib_mytinfo_tgoto" >&5
4853 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
4854 if test $ac_cv_lib_mytinfo_tgoto = yes; then
4856 cf_add_libs="-lmytinfo"
4857 # Filter out duplicates - this happens with badly-designed ".pc" files...
4858 for cf_add_1lib in $LIBS
4860 for cf_add_2lib in $cf_add_libs
4862 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4868 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4876 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
4877 # next (1998), and xcurses "newer" (2000). There is no header file for
4878 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
4879 # term.h) for cur_colr
4880 if test "x$cf_cv_screen" = "xcurses_colr"
4882 echo "$as_me:4882: checking for initscr in -lcur_colr" >&5
4883 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
4884 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
4885 echo $ECHO_N "(cached) $ECHO_C" >&6
4887 ac_check_lib_save_LIBS=$LIBS
4888 LIBS="-lcur_colr $LIBS"
4889 cat >conftest.$ac_ext <<_ACEOF
4890 #line 4890 "configure"
4891 #include "confdefs.h"
4893 /* Override any gcc2 internal prototype to avoid an error. */
4897 /* We use char because int might match the return type of a gcc2
4898 builtin and then its argument prototype would still apply. */
4908 rm -f conftest.$ac_objext conftest$ac_exeext
4909 if { (eval echo "$as_me:4909: \"$ac_link\"") >&5
4910 (eval $ac_link) 2>&5
4912 echo "$as_me:4912: \$? = $ac_status" >&5
4913 (exit $ac_status); } &&
4914 { ac_try='test -s conftest$ac_exeext'
4915 { (eval echo "$as_me:4915: \"$ac_try\"") >&5
4918 echo "$as_me:4918: \$? = $ac_status" >&5
4919 (exit $ac_status); }; }; then
4920 ac_cv_lib_cur_colr_initscr=yes
4922 echo "$as_me: failed program was:" >&5
4923 cat conftest.$ac_ext >&5
4924 ac_cv_lib_cur_colr_initscr=no
4926 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4927 LIBS=$ac_check_lib_save_LIBS
4929 echo "$as_me:4929: result: $ac_cv_lib_cur_colr_initscr" >&5
4930 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
4931 if test $ac_cv_lib_cur_colr_initscr = yes; then
4933 cf_add_libs="-lcur_colr"
4934 # Filter out duplicates - this happens with badly-designed ".pc" files...
4935 for cf_add_1lib in $LIBS
4937 for cf_add_2lib in $cf_add_libs
4939 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4945 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4949 ac_cv_func_initscr=yes
4953 echo "$as_me:4953: checking for initscr in -lHcurses" >&5
4954 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
4955 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
4956 echo $ECHO_N "(cached) $ECHO_C" >&6
4958 ac_check_lib_save_LIBS=$LIBS
4959 LIBS="-lHcurses $LIBS"
4960 cat >conftest.$ac_ext <<_ACEOF
4961 #line 4961 "configure"
4962 #include "confdefs.h"
4964 /* Override any gcc2 internal prototype to avoid an error. */
4968 /* We use char because int might match the return type of a gcc2
4969 builtin and then its argument prototype would still apply. */
4979 rm -f conftest.$ac_objext conftest$ac_exeext
4980 if { (eval echo "$as_me:4980: \"$ac_link\"") >&5
4981 (eval $ac_link) 2>&5
4983 echo "$as_me:4983: \$? = $ac_status" >&5
4984 (exit $ac_status); } &&
4985 { ac_try='test -s conftest$ac_exeext'
4986 { (eval echo "$as_me:4986: \"$ac_try\"") >&5
4989 echo "$as_me:4989: \$? = $ac_status" >&5
4990 (exit $ac_status); }; }; then
4991 ac_cv_lib_Hcurses_initscr=yes
4993 echo "$as_me: failed program was:" >&5
4994 cat conftest.$ac_ext >&5
4995 ac_cv_lib_Hcurses_initscr=no
4997 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4998 LIBS=$ac_check_lib_save_LIBS
5000 echo "$as_me:5000: result: $ac_cv_lib_Hcurses_initscr" >&5
5001 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
5002 if test $ac_cv_lib_Hcurses_initscr = yes; then
5004 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
5006 cf_add_libs="-lHcurses"
5007 # Filter out duplicates - this happens with badly-designed ".pc" files...
5008 for cf_add_1lib in $LIBS
5010 for cf_add_2lib in $cf_add_libs
5012 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5018 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5022 CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
5023 ac_cv_func_initscr=yes
5032 case `arch 2>/dev/null` in
5037 if test -n "/lib64" ; then
5038 for cf_add_libdir in /lib64
5040 if test $cf_add_libdir = /usr/lib ; then
5042 elif test -d $cf_add_libdir
5045 if test -n "$LDFLAGS$LIBS" ; then
5046 # a loop is needed to ensure we can add subdirs of existing dirs
5047 for cf_test_libdir in $LDFLAGS $LIBS ; do
5048 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5049 cf_have_libdir=yes; break
5053 if test "$cf_have_libdir" = no ; then
5054 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5056 echo "${as_me:-configure}:5056: testing adding $cf_add_libdir to library-path ..." 1>&5
5058 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5066 if test -n "/lib" ; then
5067 for cf_add_libdir in /lib
5069 if test $cf_add_libdir = /usr/lib ; then
5071 elif test -d $cf_add_libdir
5074 if test -n "$LDFLAGS$LIBS" ; then
5075 # a loop is needed to ensure we can add subdirs of existing dirs
5076 for cf_test_libdir in $LDFLAGS $LIBS ; do
5077 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5078 cf_have_libdir=yes; break
5082 if test "$cf_have_libdir" = no ; then
5083 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5085 echo "${as_me:-configure}:5085: testing adding $cf_add_libdir to library-path ..." 1>&5
5087 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5097 if test -n "/lib" ; then
5098 for cf_add_libdir in /lib
5100 if test $cf_add_libdir = /usr/lib ; then
5102 elif test -d $cf_add_libdir
5105 if test -n "$LDFLAGS$LIBS" ; then
5106 # a loop is needed to ensure we can add subdirs of existing dirs
5107 for cf_test_libdir in $LDFLAGS $LIBS ; do
5108 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5109 cf_have_libdir=yes; break
5113 if test "$cf_have_libdir" = no ; then
5114 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5116 echo "${as_me:-configure}:5116: testing adding $cf_add_libdir to library-path ..." 1>&5
5118 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5128 if test "x$cf_cv_screen" = "xcurses_5lib"
5130 if test -d /usr/5lib ; then
5132 if test -n "/usr/5lib" ; then
5133 for cf_add_libdir in /usr/5lib
5135 if test $cf_add_libdir = /usr/lib ; then
5137 elif test -d $cf_add_libdir
5140 if test -n "$LDFLAGS$LIBS" ; then
5141 # a loop is needed to ensure we can add subdirs of existing dirs
5142 for cf_test_libdir in $LDFLAGS $LIBS ; do
5143 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5144 cf_have_libdir=yes; break
5148 if test "$cf_have_libdir" = no ; then
5149 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5151 echo "${as_me:-configure}:5151: testing adding $cf_add_libdir to library-path ..." 1>&5
5153 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5159 cf_add_libs="-lcurses -ltermcap"
5160 # Filter out duplicates - this happens with badly-designed ".pc" files...
5161 for cf_add_1lib in $LIBS
5163 for cf_add_2lib in $cf_add_libs
5165 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5171 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5177 ac_cv_func_initscr=yes
5181 if test ".$ac_cv_func_initscr" != .yes ; then
5182 cf_save_LIBS="$LIBS"
5184 if test ".${cf_cv_ncurses_version:-no}" != .no
5186 cf_check_list="ncurses curses cursesX"
5188 cf_check_list="cursesX curses ncurses"
5191 # Check for library containing tgoto. Do this before curses library
5192 # because it may be needed to link the test-case for initscr.
5193 if test "x$cf_term_lib" = x
5195 echo "$as_me:5195: checking for tgoto" >&5
5196 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
5197 if test "${ac_cv_func_tgoto+set}" = set; then
5198 echo $ECHO_N "(cached) $ECHO_C" >&6
5200 cat >conftest.$ac_ext <<_ACEOF
5201 #line 5201 "configure"
5202 #include "confdefs.h"
5203 /* System header to define __stub macros and hopefully few prototypes,
5204 which can conflict with char tgoto (); below. */
5206 /* Override any gcc2 internal prototype to avoid an error. */
5210 /* We use char because int might match the return type of a gcc2
5211 builtin and then its argument prototype would still apply. */
5218 /* The GNU C library defines this for functions which it implements
5219 to always fail with ENOSYS. Some functions are actually named
5220 something starting with __ and the normal name is an alias. */
5221 #if defined (__stub_tgoto) || defined (__stub___tgoto)
5224 f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5231 rm -f conftest.$ac_objext conftest$ac_exeext
5232 if { (eval echo "$as_me:5232: \"$ac_link\"") >&5
5233 (eval $ac_link) 2>&5
5235 echo "$as_me:5235: \$? = $ac_status" >&5
5236 (exit $ac_status); } &&
5237 { ac_try='test -s conftest$ac_exeext'
5238 { (eval echo "$as_me:5238: \"$ac_try\"") >&5
5241 echo "$as_me:5241: \$? = $ac_status" >&5
5242 (exit $ac_status); }; }; then
5243 ac_cv_func_tgoto=yes
5245 echo "$as_me: failed program was:" >&5
5246 cat conftest.$ac_ext >&5
5249 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5251 echo "$as_me:5251: result: $ac_cv_func_tgoto" >&5
5252 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
5253 if test $ac_cv_func_tgoto = yes; then
5254 cf_term_lib=predefined
5257 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
5259 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
5260 echo "$as_me:5260: checking for tgoto in -l$cf_term_lib" >&5
5261 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
5262 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5263 echo $ECHO_N "(cached) $ECHO_C" >&6
5265 ac_check_lib_save_LIBS=$LIBS
5266 LIBS="-l$cf_term_lib $LIBS"
5267 cat >conftest.$ac_ext <<_ACEOF
5268 #line 5268 "configure"
5269 #include "confdefs.h"
5271 /* Override any gcc2 internal prototype to avoid an error. */
5275 /* We use char because int might match the return type of a gcc2
5276 builtin and then its argument prototype would still apply. */
5286 rm -f conftest.$ac_objext conftest$ac_exeext
5287 if { (eval echo "$as_me:5287: \"$ac_link\"") >&5
5288 (eval $ac_link) 2>&5
5290 echo "$as_me:5290: \$? = $ac_status" >&5
5291 (exit $ac_status); } &&
5292 { ac_try='test -s conftest$ac_exeext'
5293 { (eval echo "$as_me:5293: \"$ac_try\"") >&5
5296 echo "$as_me:5296: \$? = $ac_status" >&5
5297 (exit $ac_status); }; }; then
5298 eval "$as_ac_Lib=yes"
5300 echo "$as_me: failed program was:" >&5
5301 cat conftest.$ac_ext >&5
5302 eval "$as_ac_Lib=no"
5304 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5305 LIBS=$ac_check_lib_save_LIBS
5307 echo "$as_me:5307: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5308 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5309 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5319 # Check for library containing initscr
5320 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
5321 if test "x$cf_curs_lib" = x
5323 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
5325 as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
5326 echo "$as_me:5326: checking for initscr in -l$cf_curs_lib" >&5
5327 echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
5328 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5329 echo $ECHO_N "(cached) $ECHO_C" >&6
5331 ac_check_lib_save_LIBS=$LIBS
5332 LIBS="-l$cf_curs_lib $LIBS"
5333 cat >conftest.$ac_ext <<_ACEOF
5334 #line 5334 "configure"
5335 #include "confdefs.h"
5337 /* Override any gcc2 internal prototype to avoid an error. */
5341 /* We use char because int might match the return type of a gcc2
5342 builtin and then its argument prototype would still apply. */
5352 rm -f conftest.$ac_objext conftest$ac_exeext
5353 if { (eval echo "$as_me:5353: \"$ac_link\"") >&5
5354 (eval $ac_link) 2>&5
5356 echo "$as_me:5356: \$? = $ac_status" >&5
5357 (exit $ac_status); } &&
5358 { ac_try='test -s conftest$ac_exeext'
5359 { (eval echo "$as_me:5359: \"$ac_try\"") >&5
5362 echo "$as_me:5362: \$? = $ac_status" >&5
5363 (exit $ac_status); }; }; then
5364 eval "$as_ac_Lib=yes"
5366 echo "$as_me: failed program was:" >&5
5367 cat conftest.$ac_ext >&5
5368 eval "$as_ac_Lib=no"
5370 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5371 LIBS=$ac_check_lib_save_LIBS
5373 echo "$as_me:5373: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5374 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5375 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5381 test $cf_curs_lib = unknown && { { echo "$as_me:5381: error: no curses library found" >&5
5382 echo "$as_me: error: no curses library found" >&2;}
5383 { (exit 1); exit 1; }; }
5385 LIBS="-l$cf_curs_lib $cf_save_LIBS"
5386 if test "$cf_term_lib" = unknown ; then
5387 echo "$as_me:5387: checking if we can link with $cf_curs_lib library" >&5
5388 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
5389 cat >conftest.$ac_ext <<_ACEOF
5390 #line 5390 "configure"
5391 #include "confdefs.h"
5392 #include <${cf_cv_ncurses_header:-curses.h}>
5401 rm -f conftest.$ac_objext conftest$ac_exeext
5402 if { (eval echo "$as_me:5402: \"$ac_link\"") >&5
5403 (eval $ac_link) 2>&5
5405 echo "$as_me:5405: \$? = $ac_status" >&5
5406 (exit $ac_status); } &&
5407 { ac_try='test -s conftest$ac_exeext'
5408 { (eval echo "$as_me:5408: \"$ac_try\"") >&5
5411 echo "$as_me:5411: \$? = $ac_status" >&5
5412 (exit $ac_status); }; }; then
5415 echo "$as_me: failed program was:" >&5
5416 cat conftest.$ac_ext >&5
5419 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5420 echo "$as_me:5420: result: $cf_result" >&5
5421 echo "${ECHO_T}$cf_result" >&6
5422 test $cf_result = no && { { echo "$as_me:5422: error: Cannot link curses library" >&5
5423 echo "$as_me: error: Cannot link curses library" >&2;}
5424 { (exit 1); exit 1; }; }
5425 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
5427 elif test "$cf_term_lib" != predefined ; then
5428 echo "$as_me:5428: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
5429 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
5430 cat >conftest.$ac_ext <<_ACEOF
5431 #line 5431 "configure"
5432 #include "confdefs.h"
5433 #include <${cf_cv_ncurses_header:-curses.h}>
5437 initscr(); tgoto((char *)0, 0, 0);
5442 rm -f conftest.$ac_objext conftest$ac_exeext
5443 if { (eval echo "$as_me:5443: \"$ac_link\"") >&5
5444 (eval $ac_link) 2>&5
5446 echo "$as_me:5446: \$? = $ac_status" >&5
5447 (exit $ac_status); } &&
5448 { ac_try='test -s conftest$ac_exeext'
5449 { (eval echo "$as_me:5449: \"$ac_try\"") >&5
5452 echo "$as_me:5452: \$? = $ac_status" >&5
5453 (exit $ac_status); }; }; then
5456 echo "$as_me: failed program was:" >&5
5457 cat conftest.$ac_ext >&5
5459 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
5460 cat >conftest.$ac_ext <<_ACEOF
5461 #line 5461 "configure"
5462 #include "confdefs.h"
5463 #include <${cf_cv_ncurses_header:-curses.h}>
5472 rm -f conftest.$ac_objext conftest$ac_exeext
5473 if { (eval echo "$as_me:5473: \"$ac_link\"") >&5
5474 (eval $ac_link) 2>&5
5476 echo "$as_me:5476: \$? = $ac_status" >&5
5477 (exit $ac_status); } &&
5478 { ac_try='test -s conftest$ac_exeext'
5479 { (eval echo "$as_me:5479: \"$ac_try\"") >&5
5482 echo "$as_me:5482: \$? = $ac_status" >&5
5483 (exit $ac_status); }; }; then
5486 echo "$as_me: failed program was:" >&5
5487 cat conftest.$ac_ext >&5
5490 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5493 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5494 echo "$as_me:5494: result: $cf_result" >&5
5495 echo "${ECHO_T}$cf_result" >&6
5503 cf_ncuconfig_root=ncurses
5505 echo "Looking for ${cf_ncuconfig_root}-config"
5507 if test -n "$ac_tool_prefix"; then
5508 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5510 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5511 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5512 echo "$as_me:5512: checking for $ac_word" >&5
5513 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5514 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5515 echo $ECHO_N "(cached) $ECHO_C" >&6
5517 if test -n "$NCURSES_CONFIG"; then
5518 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5520 ac_save_IFS=$IFS; IFS=$ac_path_separator
5522 for ac_dir in $ac_dummy; do
5524 test -z "$ac_dir" && ac_dir=.
5525 $as_executable_p "$ac_dir/$ac_word" || continue
5526 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5527 echo "$as_me:5527: found $ac_dir/$ac_word" >&5
5533 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5534 if test -n "$NCURSES_CONFIG"; then
5535 echo "$as_me:5535: result: $NCURSES_CONFIG" >&5
5536 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5538 echo "$as_me:5538: result: no" >&5
5539 echo "${ECHO_T}no" >&6
5542 test -n "$NCURSES_CONFIG" && break
5545 if test -z "$NCURSES_CONFIG"; then
5546 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5547 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5549 # Extract the first word of "$ac_prog", so it can be a program name with args.
5550 set dummy $ac_prog; ac_word=$2
5551 echo "$as_me:5551: checking for $ac_word" >&5
5552 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5553 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5554 echo $ECHO_N "(cached) $ECHO_C" >&6
5556 if test -n "$ac_ct_NCURSES_CONFIG"; then
5557 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5559 ac_save_IFS=$IFS; IFS=$ac_path_separator
5561 for ac_dir in $ac_dummy; do
5563 test -z "$ac_dir" && ac_dir=.
5564 $as_executable_p "$ac_dir/$ac_word" || continue
5565 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5566 echo "$as_me:5566: found $ac_dir/$ac_word" >&5
5572 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5573 if test -n "$ac_ct_NCURSES_CONFIG"; then
5574 echo "$as_me:5574: result: $ac_ct_NCURSES_CONFIG" >&5
5575 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5577 echo "$as_me:5577: result: no" >&5
5578 echo "${ECHO_T}no" >&6
5581 test -n "$ac_ct_NCURSES_CONFIG" && break
5583 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5585 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5588 if test "$NCURSES_CONFIG" != none ; then
5590 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
5592 cf_add_libs="`$NCURSES_CONFIG --libs`"
5593 # Filter out duplicates - this happens with badly-designed ".pc" files...
5594 for cf_add_1lib in $LIBS
5596 for cf_add_2lib in $cf_add_libs
5598 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5604 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5608 # even with config script, some packages use no-override for curses.h
5610 echo "$as_me:5610: checking if we have identified curses headers" >&5
5611 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5612 if test "${cf_cv_ncurses_header+set}" = set; then
5613 echo $ECHO_N "(cached) $ECHO_C" >&6
5616 cf_cv_ncurses_header=none
5623 cat >conftest.$ac_ext <<_ACEOF
5624 #line 5624 "configure"
5625 #include "confdefs.h"
5626 #include <${cf_header}>
5630 initscr(); tgoto("?", 0,0)
5635 rm -f conftest.$ac_objext
5636 if { (eval echo "$as_me:5636: \"$ac_compile\"") >&5
5637 (eval $ac_compile) 2>&5
5639 echo "$as_me:5639: \$? = $ac_status" >&5
5640 (exit $ac_status); } &&
5641 { ac_try='test -s conftest.$ac_objext'
5642 { (eval echo "$as_me:5642: \"$ac_try\"") >&5
5645 echo "$as_me:5645: \$? = $ac_status" >&5
5646 (exit $ac_status); }; }; then
5647 cf_cv_ncurses_header=$cf_header; break
5649 echo "$as_me: failed program was:" >&5
5650 cat conftest.$ac_ext >&5
5652 rm -f conftest.$ac_objext conftest.$ac_ext
5656 echo "$as_me:5656: result: $cf_cv_ncurses_header" >&5
5657 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5659 if test "$cf_cv_ncurses_header" = none ; then
5660 { { echo "$as_me:5660: error: No curses header-files found" >&5
5661 echo "$as_me: error: No curses header-files found" >&2;}
5662 { (exit 1); exit 1; }; }
5665 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5667 for ac_header in $cf_cv_ncurses_header
5669 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5670 echo "$as_me:5670: checking for $ac_header" >&5
5671 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5672 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5673 echo $ECHO_N "(cached) $ECHO_C" >&6
5675 cat >conftest.$ac_ext <<_ACEOF
5676 #line 5676 "configure"
5677 #include "confdefs.h"
5678 #include <$ac_header>
5680 if { (eval echo "$as_me:5680: \"$ac_cpp conftest.$ac_ext\"") >&5
5681 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5683 egrep -v '^ *\+' conftest.er1 >conftest.err
5685 cat conftest.err >&5
5686 echo "$as_me:5686: \$? = $ac_status" >&5
5687 (exit $ac_status); } >/dev/null; then
5688 if test -s conftest.err; then
5689 ac_cpp_err=$ac_c_preproc_warn_flag
5696 if test -z "$ac_cpp_err"; then
5697 eval "$as_ac_Header=yes"
5699 echo "$as_me: failed program was:" >&5
5700 cat conftest.$ac_ext >&5
5701 eval "$as_ac_Header=no"
5703 rm -f conftest.err conftest.$ac_ext
5705 echo "$as_me:5705: result: `eval echo '${'$as_ac_Header'}'`" >&5
5706 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5707 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5708 cat >>confdefs.h <<EOF
5709 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5715 cat >>confdefs.h <<\EOF
5719 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5721 cat >>confdefs.h <<EOF
5722 #define $cf_nculib_ROOT 1
5725 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
5729 cf_ncuhdr_root=ncurses
5731 test -n "$cf_cv_curses_dir" && \
5732 test "$cf_cv_curses_dir" != "no" && { \
5734 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5735 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5737 while test $cf_add_incdir != /usr/include
5739 if test -d $cf_add_incdir
5742 if test -n "$CFLAGS$CPPFLAGS" ; then
5743 # a loop is needed to ensure we can add subdirs of existing dirs
5744 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5745 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5746 cf_have_incdir=yes; break
5751 if test "$cf_have_incdir" = no ; then
5752 if test "$cf_add_incdir" = /usr/local/include ; then
5753 if test "$GCC" = yes
5755 cf_save_CPPFLAGS=$CPPFLAGS
5756 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5757 cat >conftest.$ac_ext <<_ACEOF
5758 #line 5758 "configure"
5759 #include "confdefs.h"
5769 rm -f conftest.$ac_objext
5770 if { (eval echo "$as_me:5770: \"$ac_compile\"") >&5
5771 (eval $ac_compile) 2>&5
5773 echo "$as_me:5773: \$? = $ac_status" >&5
5774 (exit $ac_status); } &&
5775 { ac_try='test -s conftest.$ac_objext'
5776 { (eval echo "$as_me:5776: \"$ac_try\"") >&5
5779 echo "$as_me:5779: \$? = $ac_status" >&5
5780 (exit $ac_status); }; }; then
5783 echo "$as_me: failed program was:" >&5
5784 cat conftest.$ac_ext >&5
5787 rm -f conftest.$ac_objext conftest.$ac_ext
5788 CPPFLAGS=$cf_save_CPPFLAGS
5793 if test "$cf_have_incdir" = no ; then
5794 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5796 echo "${as_me:-configure}:5796: testing adding $cf_add_incdir to include-path ..." 1>&5
5798 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5800 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5801 test "$cf_top_incdir" = "$cf_add_incdir" && break
5802 cf_add_incdir="$cf_top_incdir"
5813 echo "$as_me:5813: checking for $cf_ncuhdr_root header in include-path" >&5
5814 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5815 if test "${cf_cv_ncurses_h+set}" = set; then
5816 echo $ECHO_N "(cached) $ECHO_C" >&6
5819 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5820 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
5821 for cf_header in $cf_header_list
5824 cat >conftest.$ac_ext <<_ACEOF
5825 #line 5825 "configure"
5826 #include "confdefs.h"
5828 #include <$cf_header>
5833 #ifdef NCURSES_VERSION
5835 printf("%s\n", NCURSES_VERSION);
5848 rm -f conftest.$ac_objext
5849 if { (eval echo "$as_me:5849: \"$ac_compile\"") >&5
5850 (eval $ac_compile) 2>&5
5852 echo "$as_me:5852: \$? = $ac_status" >&5
5853 (exit $ac_status); } &&
5854 { ac_try='test -s conftest.$ac_objext'
5855 { (eval echo "$as_me:5855: \"$ac_try\"") >&5
5858 echo "$as_me:5858: \$? = $ac_status" >&5
5859 (exit $ac_status); }; }; then
5860 cf_cv_ncurses_h=$cf_header
5863 echo "$as_me: failed program was:" >&5
5864 cat conftest.$ac_ext >&5
5867 rm -f conftest.$ac_objext conftest.$ac_ext
5869 test "$cf_cv_ncurses_h" != no && break
5873 echo "$as_me:5873: result: $cf_cv_ncurses_h" >&5
5874 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5876 if test "$cf_cv_ncurses_h" != no ; then
5877 cf_cv_ncurses_header=$cf_cv_ncurses_h
5880 echo "$as_me:5880: checking for $cf_ncuhdr_root include-path" >&5
5881 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5882 if test "${cf_cv_ncurses_h2+set}" = set; then
5883 echo $ECHO_N "(cached) $ECHO_C" >&6
5886 test -n "$verbose" && echo
5890 # collect the current set of include-directories from compiler flags
5891 cf_header_path_list=""
5892 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5893 for cf_header_path in $CPPFLAGS $CFLAGS
5895 case $cf_header_path in #(vi
5897 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5899 test "x$cf_header_path" != "xNONE" && \
5900 test -d "$cf_header_path" && \
5902 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5903 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5904 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5905 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5906 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5907 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"
5910 cf_header_path_list="$cf_header_path_list $cf_search"
5916 # add the variations for the package we are looking for
5920 test "x/usr" != "x$prefix" && \
5922 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
5923 test -n "$verbose" && echo " ... testing for include-directories under /usr"
5924 test -d /usr/include && cf_search="$cf_search /usr/include"
5925 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
5926 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
5927 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
5928 test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5931 test "x$prefix" != "xNONE" && \
5932 test -d "$prefix" && \
5934 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5935 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5936 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5937 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5938 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5939 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5942 test "x/usr/local" != "x$prefix" && \
5943 test -d "/usr/local" && \
5944 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
5945 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
5946 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
5947 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
5948 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
5949 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
5950 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5953 test "x/opt" != "x$prefix" && \
5955 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
5956 test -n "$verbose" && echo " ... testing for include-directories under /opt"
5957 test -d /opt/include && cf_search="$cf_search /opt/include"
5958 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
5959 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
5960 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
5961 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5964 test "x$HOME" != "x$prefix" && \
5965 test -d "$HOME" && \
5966 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
5967 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
5968 test -d $HOME/include && cf_search="$cf_search $HOME/include"
5969 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
5970 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
5971 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
5972 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5975 test "$includedir" != NONE && \
5976 test "$includedir" != "/usr/include" && \
5977 test -d "$includedir" && {
5978 test -d $includedir && cf_search="$cf_search $includedir"
5979 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5982 test "$oldincludedir" != NONE && \
5983 test "$oldincludedir" != "/usr/include" && \
5984 test -d "$oldincludedir" && {
5985 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5986 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5989 cf_search="$cf_search $cf_header_path_list"
5991 test -n "$verbose" && echo search path $cf_search
5992 cf_save2_CPPFLAGS="$CPPFLAGS"
5993 for cf_incdir in $cf_search
5996 if test -n "$cf_incdir" ; then
5997 for cf_add_incdir in $cf_incdir
5999 while test $cf_add_incdir != /usr/include
6001 if test -d $cf_add_incdir
6004 if test -n "$CFLAGS$CPPFLAGS" ; then
6005 # a loop is needed to ensure we can add subdirs of existing dirs
6006 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6007 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6008 cf_have_incdir=yes; break
6013 if test "$cf_have_incdir" = no ; then
6014 if test "$cf_add_incdir" = /usr/local/include ; then
6015 if test "$GCC" = yes
6017 cf_save_CPPFLAGS=$CPPFLAGS
6018 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6019 cat >conftest.$ac_ext <<_ACEOF
6020 #line 6020 "configure"
6021 #include "confdefs.h"
6031 rm -f conftest.$ac_objext
6032 if { (eval echo "$as_me:6032: \"$ac_compile\"") >&5
6033 (eval $ac_compile) 2>&5
6035 echo "$as_me:6035: \$? = $ac_status" >&5
6036 (exit $ac_status); } &&
6037 { ac_try='test -s conftest.$ac_objext'
6038 { (eval echo "$as_me:6038: \"$ac_try\"") >&5
6041 echo "$as_me:6041: \$? = $ac_status" >&5
6042 (exit $ac_status); }; }; then
6045 echo "$as_me: failed program was:" >&5
6046 cat conftest.$ac_ext >&5
6049 rm -f conftest.$ac_objext conftest.$ac_ext
6050 CPPFLAGS=$cf_save_CPPFLAGS
6055 if test "$cf_have_incdir" = no ; then
6056 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6058 echo "${as_me:-configure}:6058: testing adding $cf_add_incdir to include-path ..." 1>&5
6060 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6062 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6063 test "$cf_top_incdir" = "$cf_add_incdir" && break
6064 cf_add_incdir="$cf_top_incdir"
6078 cat >conftest.$ac_ext <<_ACEOF
6079 #line 6079 "configure"
6080 #include "confdefs.h"
6082 #include <$cf_header>
6087 #ifdef NCURSES_VERSION
6089 printf("%s\n", NCURSES_VERSION);
6102 rm -f conftest.$ac_objext
6103 if { (eval echo "$as_me:6103: \"$ac_compile\"") >&5
6104 (eval $ac_compile) 2>&5
6106 echo "$as_me:6106: \$? = $ac_status" >&5
6107 (exit $ac_status); } &&
6108 { ac_try='test -s conftest.$ac_objext'
6109 { (eval echo "$as_me:6109: \"$ac_try\"") >&5
6112 echo "$as_me:6112: \$? = $ac_status" >&5
6113 (exit $ac_status); }; }; then
6114 cf_cv_ncurses_h2=$cf_header
6117 echo "$as_me: failed program was:" >&5
6118 cat conftest.$ac_ext >&5
6121 rm -f conftest.$ac_objext conftest.$ac_ext
6123 if test "$cf_cv_ncurses_h2" != no ; then
6124 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6125 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
6128 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
6130 CPPFLAGS="$cf_save2_CPPFLAGS"
6131 test "$cf_cv_ncurses_h2" != no && break
6133 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6133: error: not found" >&5
6134 echo "$as_me: error: not found" >&2;}
6135 { (exit 1); exit 1; }; }
6138 echo "$as_me:6138: result: $cf_cv_ncurses_h2" >&5
6139 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6141 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6142 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6143 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6144 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6147 if test -n "$cf_1st_incdir" ; then
6148 for cf_add_incdir in $cf_1st_incdir
6150 while test $cf_add_incdir != /usr/include
6152 if test -d $cf_add_incdir
6155 if test -n "$CFLAGS$CPPFLAGS" ; then
6156 # a loop is needed to ensure we can add subdirs of existing dirs
6157 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6158 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6159 cf_have_incdir=yes; break
6164 if test "$cf_have_incdir" = no ; then
6165 if test "$cf_add_incdir" = /usr/local/include ; then
6166 if test "$GCC" = yes
6168 cf_save_CPPFLAGS=$CPPFLAGS
6169 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6170 cat >conftest.$ac_ext <<_ACEOF
6171 #line 6171 "configure"
6172 #include "confdefs.h"
6182 rm -f conftest.$ac_objext
6183 if { (eval echo "$as_me:6183: \"$ac_compile\"") >&5
6184 (eval $ac_compile) 2>&5
6186 echo "$as_me:6186: \$? = $ac_status" >&5
6187 (exit $ac_status); } &&
6188 { ac_try='test -s conftest.$ac_objext'
6189 { (eval echo "$as_me:6189: \"$ac_try\"") >&5
6192 echo "$as_me:6192: \$? = $ac_status" >&5
6193 (exit $ac_status); }; }; then
6196 echo "$as_me: failed program was:" >&5
6197 cat conftest.$ac_ext >&5
6200 rm -f conftest.$ac_objext conftest.$ac_ext
6201 CPPFLAGS=$cf_save_CPPFLAGS
6206 if test "$cf_have_incdir" = no ; then
6207 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6209 echo "${as_me:-configure}:6209: testing adding $cf_add_incdir to include-path ..." 1>&5
6211 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6213 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6214 test "$cf_top_incdir" = "$cf_add_incdir" && break
6215 cf_add_incdir="$cf_top_incdir"
6226 # Set definitions to allow ifdef'ing for ncurses.h
6228 case $cf_cv_ncurses_header in # (vi
6231 cat >>confdefs.h <<\EOF
6232 #define HAVE_NCURSES_H 1
6238 case $cf_cv_ncurses_header in # (vi
6239 ncurses/curses.h|ncurses/ncurses.h)
6241 cat >>confdefs.h <<\EOF
6242 #define HAVE_NCURSES_NCURSES_H 1
6246 ncursesw/curses.h|ncursesw/ncurses.h)
6248 cat >>confdefs.h <<\EOF
6249 #define HAVE_NCURSESW_NCURSES_H 1
6255 echo "$as_me:6255: checking for terminfo header" >&5
6256 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6257 if test "${cf_cv_term_header+set}" = set; then
6258 echo $ECHO_N "(cached) $ECHO_C" >&6
6261 case ${cf_cv_ncurses_header} in #(vi
6262 */ncurses.h|*/ncursesw.h) #(vi
6263 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6266 cf_term_header=term.h
6270 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6272 cat >conftest.$ac_ext <<_ACEOF
6273 #line 6273 "configure"
6274 #include "confdefs.h"
6276 #include <${cf_cv_ncurses_header:-curses.h}>
6282 int x = auto_left_margin
6287 rm -f conftest.$ac_objext
6288 if { (eval echo "$as_me:6288: \"$ac_compile\"") >&5
6289 (eval $ac_compile) 2>&5
6291 echo "$as_me:6291: \$? = $ac_status" >&5
6292 (exit $ac_status); } &&
6293 { ac_try='test -s conftest.$ac_objext'
6294 { (eval echo "$as_me:6294: \"$ac_try\"") >&5
6297 echo "$as_me:6297: \$? = $ac_status" >&5
6298 (exit $ac_status); }; }; then
6300 cf_cv_term_header="$cf_test"
6302 echo "$as_me: failed program was:" >&5
6303 cat conftest.$ac_ext >&5
6305 cf_cv_term_header=unknown
6308 rm -f conftest.$ac_objext conftest.$ac_ext
6309 test "$cf_cv_term_header" != unknown && break
6313 echo "$as_me:6313: result: $cf_cv_term_header" >&5
6314 echo "${ECHO_T}$cf_cv_term_header" >&6
6316 # Set definitions to allow ifdef'ing to accommodate subdirectories
6318 case $cf_cv_term_header in # (vi
6321 cat >>confdefs.h <<\EOF
6322 #define HAVE_TERM_H 1
6328 case $cf_cv_term_header in # (vi
6329 ncurses/term.h) #(vi
6331 cat >>confdefs.h <<\EOF
6332 #define HAVE_NCURSES_TERM_H 1
6338 cat >>confdefs.h <<\EOF
6339 #define HAVE_NCURSESW_TERM_H 1
6345 # some applications need this, but should check for NCURSES_VERSION
6347 cat >>confdefs.h <<\EOF
6351 echo "$as_me:6351: checking for ncurses version" >&5
6352 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6353 if test "${cf_cv_ncurses_version+set}" = set; then
6354 echo $ECHO_N "(cached) $ECHO_C" >&6
6357 cf_cv_ncurses_version=no
6360 if test "$cross_compiling" = yes; then
6362 # This will not work if the preprocessor splits the line after the
6363 # Autoconf token. The 'unproto' program does that.
6364 cat > conftest.$ac_ext <<EOF
6365 #include <${cf_cv_ncurses_header:-curses.h}>
6367 #ifdef NCURSES_VERSION
6368 Autoconf NCURSES_VERSION
6376 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6377 { (eval echo "$as_me:6377: \"$cf_try\"") >&5
6380 echo "$as_me:6380: \$? = $ac_status" >&5
6381 (exit $ac_status); }
6382 if test -f conftest.out ; then
6383 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6384 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6389 cat >conftest.$ac_ext <<_ACEOF
6390 #line 6390 "configure"
6391 #include "confdefs.h"
6393 #include <${cf_cv_ncurses_header:-curses.h}>
6397 FILE *fp = fopen("$cf_tempfile", "w");
6398 #ifdef NCURSES_VERSION
6399 # ifdef NCURSES_VERSION_PATCH
6400 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6402 fprintf(fp, "%s\n", NCURSES_VERSION);
6406 fprintf(fp, "old\n");
6411 ${cf_cv_main_return:-return}(0);
6414 rm -f conftest$ac_exeext
6415 if { (eval echo "$as_me:6415: \"$ac_link\"") >&5
6416 (eval $ac_link) 2>&5
6418 echo "$as_me:6418: \$? = $ac_status" >&5
6419 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6420 { (eval echo "$as_me:6420: \"$ac_try\"") >&5
6423 echo "$as_me:6423: \$? = $ac_status" >&5
6424 (exit $ac_status); }; }; then
6426 cf_cv_ncurses_version=`cat $cf_tempfile`
6428 echo "$as_me: program exited with status $ac_status" >&5
6429 echo "$as_me: failed program was:" >&5
6430 cat conftest.$ac_ext >&5
6432 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6437 echo "$as_me:6437: result: $cf_cv_ncurses_version" >&5
6438 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6439 test "$cf_cv_ncurses_version" = no ||
6440 cat >>confdefs.h <<\EOF
6444 cf_nculib_root=ncurses
6445 # This works, except for the special case where we find gpm, but
6446 # ncurses is in a nonstandard location via $LIBS, and we really want
6449 cf_ncurses_SAVE="$LIBS"
6450 echo "$as_me:6450: checking for Gpm_Open in -lgpm" >&5
6451 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6452 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6453 echo $ECHO_N "(cached) $ECHO_C" >&6
6455 ac_check_lib_save_LIBS=$LIBS
6457 cat >conftest.$ac_ext <<_ACEOF
6458 #line 6458 "configure"
6459 #include "confdefs.h"
6461 /* Override any gcc2 internal prototype to avoid an error. */
6465 /* We use char because int might match the return type of a gcc2
6466 builtin and then its argument prototype would still apply. */
6476 rm -f conftest.$ac_objext conftest$ac_exeext
6477 if { (eval echo "$as_me:6477: \"$ac_link\"") >&5
6478 (eval $ac_link) 2>&5
6480 echo "$as_me:6480: \$? = $ac_status" >&5
6481 (exit $ac_status); } &&
6482 { ac_try='test -s conftest$ac_exeext'
6483 { (eval echo "$as_me:6483: \"$ac_try\"") >&5
6486 echo "$as_me:6486: \$? = $ac_status" >&5
6487 (exit $ac_status); }; }; then
6488 ac_cv_lib_gpm_Gpm_Open=yes
6490 echo "$as_me: failed program was:" >&5
6491 cat conftest.$ac_ext >&5
6492 ac_cv_lib_gpm_Gpm_Open=no
6494 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6495 LIBS=$ac_check_lib_save_LIBS
6497 echo "$as_me:6497: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6498 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6499 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6500 echo "$as_me:6500: checking for initscr in -lgpm" >&5
6501 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6502 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6503 echo $ECHO_N "(cached) $ECHO_C" >&6
6505 ac_check_lib_save_LIBS=$LIBS
6507 cat >conftest.$ac_ext <<_ACEOF
6508 #line 6508 "configure"
6509 #include "confdefs.h"
6511 /* Override any gcc2 internal prototype to avoid an error. */
6515 /* We use char because int might match the return type of a gcc2
6516 builtin and then its argument prototype would still apply. */
6526 rm -f conftest.$ac_objext conftest$ac_exeext
6527 if { (eval echo "$as_me:6527: \"$ac_link\"") >&5
6528 (eval $ac_link) 2>&5
6530 echo "$as_me:6530: \$? = $ac_status" >&5
6531 (exit $ac_status); } &&
6532 { ac_try='test -s conftest$ac_exeext'
6533 { (eval echo "$as_me:6533: \"$ac_try\"") >&5
6536 echo "$as_me:6536: \$? = $ac_status" >&5
6537 (exit $ac_status); }; }; then
6538 ac_cv_lib_gpm_initscr=yes
6540 echo "$as_me: failed program was:" >&5
6541 cat conftest.$ac_ext >&5
6542 ac_cv_lib_gpm_initscr=no
6544 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6545 LIBS=$ac_check_lib_save_LIBS
6547 echo "$as_me:6547: result: $ac_cv_lib_gpm_initscr" >&5
6548 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6549 if test $ac_cv_lib_gpm_initscr = yes; then
6550 LIBS="$cf_ncurses_SAVE"
6552 cf_ncurses_LIBS="-lgpm"
6557 case $host_os in #(vi
6559 # This is only necessary if you are linking against an obsolete
6560 # version of ncurses (but it should do no harm, since it's static).
6561 if test "$cf_nculib_root" = ncurses ; then
6562 echo "$as_me:6562: checking for tgoto in -lmytinfo" >&5
6563 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6564 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6565 echo $ECHO_N "(cached) $ECHO_C" >&6
6567 ac_check_lib_save_LIBS=$LIBS
6568 LIBS="-lmytinfo $LIBS"
6569 cat >conftest.$ac_ext <<_ACEOF
6570 #line 6570 "configure"
6571 #include "confdefs.h"
6573 /* Override any gcc2 internal prototype to avoid an error. */
6577 /* We use char because int might match the return type of a gcc2
6578 builtin and then its argument prototype would still apply. */
6588 rm -f conftest.$ac_objext conftest$ac_exeext
6589 if { (eval echo "$as_me:6589: \"$ac_link\"") >&5
6590 (eval $ac_link) 2>&5
6592 echo "$as_me:6592: \$? = $ac_status" >&5
6593 (exit $ac_status); } &&
6594 { ac_try='test -s conftest$ac_exeext'
6595 { (eval echo "$as_me:6595: \"$ac_try\"") >&5
6598 echo "$as_me:6598: \$? = $ac_status" >&5
6599 (exit $ac_status); }; }; then
6600 ac_cv_lib_mytinfo_tgoto=yes
6602 echo "$as_me: failed program was:" >&5
6603 cat conftest.$ac_ext >&5
6604 ac_cv_lib_mytinfo_tgoto=no
6606 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6607 LIBS=$ac_check_lib_save_LIBS
6609 echo "$as_me:6609: result: $ac_cv_lib_mytinfo_tgoto" >&5
6610 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6611 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6612 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6619 cf_add_libs="$cf_ncurses_LIBS"
6620 # Filter out duplicates - this happens with badly-designed ".pc" files...
6621 for cf_add_1lib in $LIBS
6623 for cf_add_2lib in $cf_add_libs
6625 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6631 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6635 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
6638 cf_add_libs="-l$cf_nculib_root"
6639 # Filter out duplicates - this happens with badly-designed ".pc" files...
6640 for cf_add_1lib in $LIBS
6642 for cf_add_2lib in $cf_add_libs
6644 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6650 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6656 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
6658 echo "$as_me:6658: checking for initscr" >&5
6659 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6660 if test "${ac_cv_func_initscr+set}" = set; then
6661 echo $ECHO_N "(cached) $ECHO_C" >&6
6663 cat >conftest.$ac_ext <<_ACEOF
6664 #line 6664 "configure"
6665 #include "confdefs.h"
6666 /* System header to define __stub macros and hopefully few prototypes,
6667 which can conflict with char initscr (); below. */
6669 /* Override any gcc2 internal prototype to avoid an error. */
6673 /* We use char because int might match the return type of a gcc2
6674 builtin and then its argument prototype would still apply. */
6681 /* The GNU C library defines this for functions which it implements
6682 to always fail with ENOSYS. Some functions are actually named
6683 something starting with __ and the normal name is an alias. */
6684 #if defined (__stub_initscr) || defined (__stub___initscr)
6687 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6694 rm -f conftest.$ac_objext conftest$ac_exeext
6695 if { (eval echo "$as_me:6695: \"$ac_link\"") >&5
6696 (eval $ac_link) 2>&5
6698 echo "$as_me:6698: \$? = $ac_status" >&5
6699 (exit $ac_status); } &&
6700 { ac_try='test -s conftest$ac_exeext'
6701 { (eval echo "$as_me:6701: \"$ac_try\"") >&5
6704 echo "$as_me:6704: \$? = $ac_status" >&5
6705 (exit $ac_status); }; }; then
6706 ac_cv_func_initscr=yes
6708 echo "$as_me: failed program was:" >&5
6709 cat conftest.$ac_ext >&5
6710 ac_cv_func_initscr=no
6712 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6714 echo "$as_me:6714: result: $ac_cv_func_initscr" >&5
6715 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6716 if test $ac_cv_func_initscr = yes; then
6717 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6720 cf_save_LIBS="$LIBS"
6721 echo "$as_me:6721: checking for initscr in -l$cf_nculib_root" >&5
6722 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6723 LIBS="-l$cf_nculib_root $LIBS"
6724 cat >conftest.$ac_ext <<_ACEOF
6725 #line 6725 "configure"
6726 #include "confdefs.h"
6727 #include <${cf_cv_ncurses_header:-curses.h}>
6736 rm -f conftest.$ac_objext conftest$ac_exeext
6737 if { (eval echo "$as_me:6737: \"$ac_link\"") >&5
6738 (eval $ac_link) 2>&5
6740 echo "$as_me:6740: \$? = $ac_status" >&5
6741 (exit $ac_status); } &&
6742 { ac_try='test -s conftest$ac_exeext'
6743 { (eval echo "$as_me:6743: \"$ac_try\"") >&5
6746 echo "$as_me:6746: \$? = $ac_status" >&5
6747 (exit $ac_status); }; }; then
6748 echo "$as_me:6748: result: yes" >&5
6749 echo "${ECHO_T}yes" >&6
6750 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6753 echo "$as_me: failed program was:" >&5
6754 cat conftest.$ac_ext >&5
6755 echo "$as_me:6755: result: no" >&5
6756 echo "${ECHO_T}no" >&6
6759 cf_library_path_list=""
6760 if test -n "${LDFLAGS}${LIBS}" ; then
6761 for cf_library_path in $LDFLAGS $LIBS
6763 case $cf_library_path in #(vi
6765 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6767 test "x$cf_library_path" != "xNONE" && \
6768 test -d "$cf_library_path" && \
6770 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6771 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6772 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6773 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6774 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6775 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"
6778 cf_library_path_list="$cf_library_path_list $cf_search"
6786 test "x/usr" != "x$prefix" && \
6788 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
6789 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
6790 test -d /usr/lib && cf_search="$cf_search /usr/lib"
6791 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
6792 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
6793 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
6794 test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
6797 test "x$prefix" != "xNONE" && \
6798 test -d "$prefix" && \
6800 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6801 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6802 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6803 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6804 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6805 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6808 test "x/usr/local" != "x$prefix" && \
6809 test -d "/usr/local" && \
6810 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
6811 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
6812 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
6813 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
6814 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
6815 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
6816 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
6819 test "x/opt" != "x$prefix" && \
6821 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
6822 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
6823 test -d /opt/lib && cf_search="$cf_search /opt/lib"
6824 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
6825 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
6826 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
6827 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
6830 test "x$HOME" != "x$prefix" && \
6831 test -d "$HOME" && \
6832 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
6833 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
6834 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
6835 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
6836 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
6837 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
6838 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
6841 cf_search="$cf_library_path_list $cf_search"
6843 for cf_libdir in $cf_search
6845 echo "$as_me:6845: checking for -l$cf_nculib_root in $cf_libdir" >&5
6846 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6847 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6848 cat >conftest.$ac_ext <<_ACEOF
6849 #line 6849 "configure"
6850 #include "confdefs.h"
6851 #include <${cf_cv_ncurses_header:-curses.h}>
6860 rm -f conftest.$ac_objext conftest$ac_exeext
6861 if { (eval echo "$as_me:6861: \"$ac_link\"") >&5
6862 (eval $ac_link) 2>&5
6864 echo "$as_me:6864: \$? = $ac_status" >&5
6865 (exit $ac_status); } &&
6866 { ac_try='test -s conftest$ac_exeext'
6867 { (eval echo "$as_me:6867: \"$ac_try\"") >&5
6870 echo "$as_me:6870: \$? = $ac_status" >&5
6871 (exit $ac_status); }; }; then
6872 echo "$as_me:6872: result: yes" >&5
6873 echo "${ECHO_T}yes" >&6
6874 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6877 echo "$as_me: failed program was:" >&5
6878 cat conftest.$ac_ext >&5
6879 echo "$as_me:6879: result: no" >&5
6880 echo "${ECHO_T}no" >&6
6881 LIBS="$cf_save_LIBS"
6883 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6887 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6891 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
6893 if test $cf_found_library = no ; then
6894 { { echo "$as_me:6894: error: Cannot link $cf_nculib_root library" >&5
6895 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6896 { (exit 1); exit 1; }; }
6901 if test -n "$cf_ncurses_LIBS" ; then
6902 echo "$as_me:6902: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6903 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6904 cf_ncurses_SAVE="$LIBS"
6905 for p in $cf_ncurses_LIBS ; do
6906 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
6907 if test "$q" != "$LIBS" ; then
6911 cat >conftest.$ac_ext <<_ACEOF
6912 #line 6912 "configure"
6913 #include "confdefs.h"
6914 #include <${cf_cv_ncurses_header:-curses.h}>
6918 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6923 rm -f conftest.$ac_objext conftest$ac_exeext
6924 if { (eval echo "$as_me:6924: \"$ac_link\"") >&5
6925 (eval $ac_link) 2>&5
6927 echo "$as_me:6927: \$? = $ac_status" >&5
6928 (exit $ac_status); } &&
6929 { ac_try='test -s conftest$ac_exeext'
6930 { (eval echo "$as_me:6930: \"$ac_try\"") >&5
6933 echo "$as_me:6933: \$? = $ac_status" >&5
6934 (exit $ac_status); }; }; then
6935 echo "$as_me:6935: result: yes" >&5
6936 echo "${ECHO_T}yes" >&6
6938 echo "$as_me: failed program was:" >&5
6939 cat conftest.$ac_ext >&5
6940 echo "$as_me:6940: result: no" >&5
6941 echo "${ECHO_T}no" >&6
6942 LIBS="$cf_ncurses_SAVE"
6944 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6947 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6949 cat >>confdefs.h <<EOF
6950 #define $cf_nculib_ROOT 1
6958 echo "$as_me:6958: checking for multibyte character support" >&5
6959 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6960 if test "${cf_cv_utf8_lib+set}" = set; then
6961 echo $ECHO_N "(cached) $ECHO_C" >&6
6964 cf_save_LIBS="$LIBS"
6965 cat >conftest.$ac_ext <<_ACEOF
6966 #line 6966 "configure"
6967 #include "confdefs.h"
6978 rm -f conftest.$ac_objext conftest$ac_exeext
6979 if { (eval echo "$as_me:6979: \"$ac_link\"") >&5
6980 (eval $ac_link) 2>&5
6982 echo "$as_me:6982: \$? = $ac_status" >&5
6983 (exit $ac_status); } &&
6984 { ac_try='test -s conftest$ac_exeext'
6985 { (eval echo "$as_me:6985: \"$ac_try\"") >&5
6988 echo "$as_me:6988: \$? = $ac_status" >&5
6989 (exit $ac_status); }; }; then
6992 echo "$as_me: failed program was:" >&5
6993 cat conftest.$ac_ext >&5
6995 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6996 # will be set on completion of the AC_TRY_LINK below.
6997 cf_cv_header_path_utf8=
6998 cf_cv_library_path_utf8=
7000 echo "${as_me:-configure}:7000: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7002 cf_save_LIBS="$LIBS"
7004 cat >conftest.$ac_ext <<_ACEOF
7005 #line 7005 "configure"
7006 #include "confdefs.h"
7008 #include <libutf8.h>
7017 rm -f conftest.$ac_objext conftest$ac_exeext
7018 if { (eval echo "$as_me:7018: \"$ac_link\"") >&5
7019 (eval $ac_link) 2>&5
7021 echo "$as_me:7021: \$? = $ac_status" >&5
7022 (exit $ac_status); } &&
7023 { ac_try='test -s conftest$ac_exeext'
7024 { (eval echo "$as_me:7024: \"$ac_try\"") >&5
7027 echo "$as_me:7027: \$? = $ac_status" >&5
7028 (exit $ac_status); }; }; then
7030 cf_cv_find_linkage_utf8=yes
7031 cf_cv_header_path_utf8=/usr/include
7032 cf_cv_library_path_utf8=/usr/lib
7035 echo "$as_me: failed program was:" >&5
7036 cat conftest.$ac_ext >&5
7038 LIBS="-lutf8 $cf_save_LIBS"
7040 cat >conftest.$ac_ext <<_ACEOF
7041 #line 7041 "configure"
7042 #include "confdefs.h"
7044 #include <libutf8.h>
7053 rm -f conftest.$ac_objext conftest$ac_exeext
7054 if { (eval echo "$as_me:7054: \"$ac_link\"") >&5
7055 (eval $ac_link) 2>&5
7057 echo "$as_me:7057: \$? = $ac_status" >&5
7058 (exit $ac_status); } &&
7059 { ac_try='test -s conftest$ac_exeext'
7060 { (eval echo "$as_me:7060: \"$ac_try\"") >&5
7063 echo "$as_me:7063: \$? = $ac_status" >&5
7064 (exit $ac_status); }; }; then
7066 cf_cv_find_linkage_utf8=yes
7067 cf_cv_header_path_utf8=/usr/include
7068 cf_cv_library_path_utf8=/usr/lib
7069 cf_cv_library_file_utf8="-lutf8"
7072 echo "$as_me: failed program was:" >&5
7073 cat conftest.$ac_ext >&5
7075 cf_cv_find_linkage_utf8=no
7076 LIBS="$cf_save_LIBS"
7078 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
7080 echo "${as_me:-configure}:7080: testing find linkage for utf8 library ..." 1>&5
7082 echo "${as_me:-configure}:7082: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7084 cf_save_CPPFLAGS="$CPPFLAGS"
7085 cf_test_CPPFLAGS="$CPPFLAGS"
7089 # collect the current set of include-directories from compiler flags
7090 cf_header_path_list=""
7091 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7092 for cf_header_path in $CPPFLAGS $CFLAGS
7094 case $cf_header_path in #(vi
7096 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7098 test "x$cf_header_path" != "xNONE" && \
7099 test -d "$cf_header_path" && \
7101 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7102 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7103 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
7104 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
7105 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
7106 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7109 cf_header_path_list="$cf_header_path_list $cf_search"
7115 # add the variations for the package we are looking for
7119 test "x/usr" != "x$prefix" && \
7121 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
7122 test -n "$verbose" && echo " ... testing for include-directories under /usr"
7123 test -d /usr/include && cf_search="$cf_search /usr/include"
7124 test -d /usr/include/utf8 && cf_search="$cf_search /usr/include/utf8"
7125 test -d /usr/include/utf8/include && cf_search="$cf_search /usr/include/utf8/include"
7126 test -d /usr/utf8/include && cf_search="$cf_search /usr/utf8/include"
7127 test -d /usr/utf8/include/utf8 && cf_search="$cf_search /usr/utf8/include/utf8"
7130 test "x$prefix" != "xNONE" && \
7131 test -d "$prefix" && \
7133 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7134 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7135 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
7136 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
7137 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
7138 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
7141 test "x/usr/local" != "x$prefix" && \
7142 test -d "/usr/local" && \
7143 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
7144 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
7145 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
7146 test -d /usr/local/include/utf8 && cf_search="$cf_search /usr/local/include/utf8"
7147 test -d /usr/local/include/utf8/include && cf_search="$cf_search /usr/local/include/utf8/include"
7148 test -d /usr/local/utf8/include && cf_search="$cf_search /usr/local/utf8/include"
7149 test -d /usr/local/utf8/include/utf8 && cf_search="$cf_search /usr/local/utf8/include/utf8"
7152 test "x/opt" != "x$prefix" && \
7154 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
7155 test -n "$verbose" && echo " ... testing for include-directories under /opt"
7156 test -d /opt/include && cf_search="$cf_search /opt/include"
7157 test -d /opt/include/utf8 && cf_search="$cf_search /opt/include/utf8"
7158 test -d /opt/include/utf8/include && cf_search="$cf_search /opt/include/utf8/include"
7159 test -d /opt/utf8/include && cf_search="$cf_search /opt/utf8/include"
7160 test -d /opt/utf8/include/utf8 && cf_search="$cf_search /opt/utf8/include/utf8"
7163 test "x$HOME" != "x$prefix" && \
7164 test -d "$HOME" && \
7165 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
7166 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
7167 test -d $HOME/include && cf_search="$cf_search $HOME/include"
7168 test -d $HOME/include/utf8 && cf_search="$cf_search $HOME/include/utf8"
7169 test -d $HOME/include/utf8/include && cf_search="$cf_search $HOME/include/utf8/include"
7170 test -d $HOME/utf8/include && cf_search="$cf_search $HOME/utf8/include"
7171 test -d $HOME/utf8/include/utf8 && cf_search="$cf_search $HOME/utf8/include/utf8"
7174 test "$includedir" != NONE && \
7175 test "$includedir" != "/usr/include" && \
7176 test -d "$includedir" && {
7177 test -d $includedir && cf_search="$cf_search $includedir"
7178 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7181 test "$oldincludedir" != NONE && \
7182 test "$oldincludedir" != "/usr/include" && \
7183 test -d "$oldincludedir" && {
7184 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7185 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7188 cf_search="$cf_search $cf_header_path_list"
7190 for cf_cv_header_path_utf8 in $cf_search
7192 if test -d $cf_cv_header_path_utf8 ; then
7193 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
7195 echo "${as_me:-configure}:7195: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7197 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7198 cat >conftest.$ac_ext <<_ACEOF
7199 #line 7199 "configure"
7200 #include "confdefs.h"
7202 #include <libutf8.h>
7211 rm -f conftest.$ac_objext
7212 if { (eval echo "$as_me:7212: \"$ac_compile\"") >&5
7213 (eval $ac_compile) 2>&5
7215 echo "$as_me:7215: \$? = $ac_status" >&5
7216 (exit $ac_status); } &&
7217 { ac_try='test -s conftest.$ac_objext'
7218 { (eval echo "$as_me:7218: \"$ac_try\"") >&5
7221 echo "$as_me:7221: \$? = $ac_status" >&5
7222 (exit $ac_status); }; }; then
7224 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7226 echo "${as_me:-configure}:7226: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7228 cf_cv_find_linkage_utf8=maybe
7229 cf_test_CPPFLAGS="$CPPFLAGS"
7232 echo "$as_me: failed program was:" >&5
7233 cat conftest.$ac_ext >&5
7235 CPPFLAGS="$cf_save_CPPFLAGS"
7238 rm -f conftest.$ac_objext conftest.$ac_ext
7242 if test "$cf_cv_find_linkage_utf8" = maybe ; then
7244 echo "${as_me:-configure}:7244: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7246 cf_save_LIBS="$LIBS"
7247 cf_save_LDFLAGS="$LDFLAGS"
7249 if test "$cf_cv_find_linkage_utf8" != yes ; then
7252 cf_library_path_list=""
7253 if test -n "${LDFLAGS}${LIBS}" ; then
7254 for cf_library_path in $LDFLAGS $LIBS
7256 case $cf_library_path in #(vi
7258 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7260 test "x$cf_library_path" != "xNONE" && \
7261 test -d "$cf_library_path" && \
7263 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7264 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7265 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
7266 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7267 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
7268 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7271 cf_library_path_list="$cf_library_path_list $cf_search"
7279 test "x/usr" != "x$prefix" && \
7281 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
7282 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
7283 test -d /usr/lib && cf_search="$cf_search /usr/lib"
7284 test -d /usr/lib/utf8 && cf_search="$cf_search /usr/lib/utf8"
7285 test -d /usr/lib/utf8/lib && cf_search="$cf_search /usr/lib/utf8/lib"
7286 test -d /usr/utf8/lib && cf_search="$cf_search /usr/utf8/lib"
7287 test -d /usr/utf8/lib/utf8 && cf_search="$cf_search /usr/utf8/lib/utf8"
7290 test "x$prefix" != "xNONE" && \
7291 test -d "$prefix" && \
7293 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7294 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7295 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
7296 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
7297 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
7298 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
7301 test "x/usr/local" != "x$prefix" && \
7302 test -d "/usr/local" && \
7303 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
7304 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
7305 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
7306 test -d /usr/local/lib/utf8 && cf_search="$cf_search /usr/local/lib/utf8"
7307 test -d /usr/local/lib/utf8/lib && cf_search="$cf_search /usr/local/lib/utf8/lib"
7308 test -d /usr/local/utf8/lib && cf_search="$cf_search /usr/local/utf8/lib"
7309 test -d /usr/local/utf8/lib/utf8 && cf_search="$cf_search /usr/local/utf8/lib/utf8"
7312 test "x/opt" != "x$prefix" && \
7314 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
7315 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
7316 test -d /opt/lib && cf_search="$cf_search /opt/lib"
7317 test -d /opt/lib/utf8 && cf_search="$cf_search /opt/lib/utf8"
7318 test -d /opt/lib/utf8/lib && cf_search="$cf_search /opt/lib/utf8/lib"
7319 test -d /opt/utf8/lib && cf_search="$cf_search /opt/utf8/lib"
7320 test -d /opt/utf8/lib/utf8 && cf_search="$cf_search /opt/utf8/lib/utf8"
7323 test "x$HOME" != "x$prefix" && \
7324 test -d "$HOME" && \
7325 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
7326 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
7327 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
7328 test -d $HOME/lib/utf8 && cf_search="$cf_search $HOME/lib/utf8"
7329 test -d $HOME/lib/utf8/lib && cf_search="$cf_search $HOME/lib/utf8/lib"
7330 test -d $HOME/utf8/lib && cf_search="$cf_search $HOME/utf8/lib"
7331 test -d $HOME/utf8/lib/utf8 && cf_search="$cf_search $HOME/utf8/lib/utf8"
7334 cf_search="$cf_library_path_list $cf_search"
7336 for cf_cv_library_path_utf8 in $cf_search
7338 if test -d $cf_cv_library_path_utf8 ; then
7339 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7341 echo "${as_me:-configure}:7341: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7343 CPPFLAGS="$cf_test_CPPFLAGS"
7344 LIBS="-lutf8 $cf_save_LIBS"
7345 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7346 cat >conftest.$ac_ext <<_ACEOF
7347 #line 7347 "configure"
7348 #include "confdefs.h"
7350 #include <libutf8.h>
7359 rm -f conftest.$ac_objext conftest$ac_exeext
7360 if { (eval echo "$as_me:7360: \"$ac_link\"") >&5
7361 (eval $ac_link) 2>&5
7363 echo "$as_me:7363: \$? = $ac_status" >&5
7364 (exit $ac_status); } &&
7365 { ac_try='test -s conftest$ac_exeext'
7366 { (eval echo "$as_me:7366: \"$ac_try\"") >&5
7369 echo "$as_me:7369: \$? = $ac_status" >&5
7370 (exit $ac_status); }; }; then
7372 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7374 echo "${as_me:-configure}:7374: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7376 cf_cv_find_linkage_utf8=yes
7377 cf_cv_library_file_utf8="-lutf8"
7380 echo "$as_me: failed program was:" >&5
7381 cat conftest.$ac_ext >&5
7383 CPPFLAGS="$cf_save_CPPFLAGS"
7384 LIBS="$cf_save_LIBS"
7385 LDFLAGS="$cf_save_LDFLAGS"
7388 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7391 CPPFLAGS="$cf_save_CPPFLAGS"
7392 LDFLAGS="$cf_save_LDFLAGS"
7396 cf_cv_find_linkage_utf8=no
7400 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7403 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7405 LIBS="$cf_save_LIBS"
7407 if test "$cf_cv_find_linkage_utf8" = yes ; then
7408 cf_cv_utf8_lib=add-on
7414 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7416 echo "$as_me:7416: result: $cf_cv_utf8_lib" >&5
7417 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7419 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7421 if test "$cf_cv_utf8_lib" = "add-on" ; then
7423 cat >>confdefs.h <<\EOF
7424 #define HAVE_LIBUTF8_H 1
7427 if test -n "$cf_cv_header_path_utf8" ; then
7428 for cf_add_incdir in $cf_cv_header_path_utf8
7430 while test $cf_add_incdir != /usr/include
7432 if test -d $cf_add_incdir
7435 if test -n "$CFLAGS$CPPFLAGS" ; then
7436 # a loop is needed to ensure we can add subdirs of existing dirs
7437 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7438 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7439 cf_have_incdir=yes; break
7444 if test "$cf_have_incdir" = no ; then
7445 if test "$cf_add_incdir" = /usr/local/include ; then
7446 if test "$GCC" = yes
7448 cf_save_CPPFLAGS=$CPPFLAGS
7449 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7450 cat >conftest.$ac_ext <<_ACEOF
7451 #line 7451 "configure"
7452 #include "confdefs.h"
7462 rm -f conftest.$ac_objext
7463 if { (eval echo "$as_me:7463: \"$ac_compile\"") >&5
7464 (eval $ac_compile) 2>&5
7466 echo "$as_me:7466: \$? = $ac_status" >&5
7467 (exit $ac_status); } &&
7468 { ac_try='test -s conftest.$ac_objext'
7469 { (eval echo "$as_me:7469: \"$ac_try\"") >&5
7472 echo "$as_me:7472: \$? = $ac_status" >&5
7473 (exit $ac_status); }; }; then
7476 echo "$as_me: failed program was:" >&5
7477 cat conftest.$ac_ext >&5
7480 rm -f conftest.$ac_objext conftest.$ac_ext
7481 CPPFLAGS=$cf_save_CPPFLAGS
7486 if test "$cf_have_incdir" = no ; then
7487 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7489 echo "${as_me:-configure}:7489: testing adding $cf_add_incdir to include-path ..." 1>&5
7491 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7493 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7494 test "$cf_top_incdir" = "$cf_add_incdir" && break
7495 cf_add_incdir="$cf_top_incdir"
7504 if test -n "$cf_cv_library_path_utf8" ; then
7505 for cf_add_libdir in $cf_cv_library_path_utf8
7507 if test $cf_add_libdir = /usr/lib ; then
7509 elif test -d $cf_add_libdir
7512 if test -n "$LDFLAGS$LIBS" ; then
7513 # a loop is needed to ensure we can add subdirs of existing dirs
7514 for cf_test_libdir in $LDFLAGS $LIBS ; do
7515 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7516 cf_have_libdir=yes; break
7520 if test "$cf_have_libdir" = no ; then
7521 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7523 echo "${as_me:-configure}:7523: testing adding $cf_add_libdir to library-path ..." 1>&5
7525 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7531 cf_add_libs="$cf_cv_library_file_utf8"
7532 # Filter out duplicates - this happens with badly-designed ".pc" files...
7533 for cf_add_1lib in $LIBS
7535 for cf_add_2lib in $cf_add_libs
7537 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7543 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7549 cf_ncuconfig_root=ncursesw
7551 echo "Looking for ${cf_ncuconfig_root}-config"
7553 if test -n "$ac_tool_prefix"; then
7554 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7556 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7557 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7558 echo "$as_me:7558: checking for $ac_word" >&5
7559 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7560 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7561 echo $ECHO_N "(cached) $ECHO_C" >&6
7563 if test -n "$NCURSES_CONFIG"; then
7564 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7566 ac_save_IFS=$IFS; IFS=$ac_path_separator
7568 for ac_dir in $ac_dummy; do
7570 test -z "$ac_dir" && ac_dir=.
7571 $as_executable_p "$ac_dir/$ac_word" || continue
7572 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7573 echo "$as_me:7573: found $ac_dir/$ac_word" >&5
7579 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7580 if test -n "$NCURSES_CONFIG"; then
7581 echo "$as_me:7581: result: $NCURSES_CONFIG" >&5
7582 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7584 echo "$as_me:7584: result: no" >&5
7585 echo "${ECHO_T}no" >&6
7588 test -n "$NCURSES_CONFIG" && break
7591 if test -z "$NCURSES_CONFIG"; then
7592 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7593 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7595 # Extract the first word of "$ac_prog", so it can be a program name with args.
7596 set dummy $ac_prog; ac_word=$2
7597 echo "$as_me:7597: checking for $ac_word" >&5
7598 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7599 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7600 echo $ECHO_N "(cached) $ECHO_C" >&6
7602 if test -n "$ac_ct_NCURSES_CONFIG"; then
7603 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7605 ac_save_IFS=$IFS; IFS=$ac_path_separator
7607 for ac_dir in $ac_dummy; do
7609 test -z "$ac_dir" && ac_dir=.
7610 $as_executable_p "$ac_dir/$ac_word" || continue
7611 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7612 echo "$as_me:7612: found $ac_dir/$ac_word" >&5
7618 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7619 if test -n "$ac_ct_NCURSES_CONFIG"; then
7620 echo "$as_me:7620: result: $ac_ct_NCURSES_CONFIG" >&5
7621 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7623 echo "$as_me:7623: result: no" >&5
7624 echo "${ECHO_T}no" >&6
7627 test -n "$ac_ct_NCURSES_CONFIG" && break
7629 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7631 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7634 if test "$NCURSES_CONFIG" != none ; then
7636 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
7638 cf_add_libs="`$NCURSES_CONFIG --libs`"
7639 # Filter out duplicates - this happens with badly-designed ".pc" files...
7640 for cf_add_1lib in $LIBS
7642 for cf_add_2lib in $cf_add_libs
7644 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7650 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7654 # even with config script, some packages use no-override for curses.h
7656 echo "$as_me:7656: checking if we have identified curses headers" >&5
7657 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7658 if test "${cf_cv_ncurses_header+set}" = set; then
7659 echo $ECHO_N "(cached) $ECHO_C" >&6
7662 cf_cv_ncurses_header=none
7664 ncursesw/ncurses.h \
7669 cat >conftest.$ac_ext <<_ACEOF
7670 #line 7670 "configure"
7671 #include "confdefs.h"
7672 #include <${cf_header}>
7676 initscr(); tgoto("?", 0,0)
7681 rm -f conftest.$ac_objext
7682 if { (eval echo "$as_me:7682: \"$ac_compile\"") >&5
7683 (eval $ac_compile) 2>&5
7685 echo "$as_me:7685: \$? = $ac_status" >&5
7686 (exit $ac_status); } &&
7687 { ac_try='test -s conftest.$ac_objext'
7688 { (eval echo "$as_me:7688: \"$ac_try\"") >&5
7691 echo "$as_me:7691: \$? = $ac_status" >&5
7692 (exit $ac_status); }; }; then
7693 cf_cv_ncurses_header=$cf_header; break
7695 echo "$as_me: failed program was:" >&5
7696 cat conftest.$ac_ext >&5
7698 rm -f conftest.$ac_objext conftest.$ac_ext
7702 echo "$as_me:7702: result: $cf_cv_ncurses_header" >&5
7703 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7705 if test "$cf_cv_ncurses_header" = none ; then
7706 { { echo "$as_me:7706: error: No curses header-files found" >&5
7707 echo "$as_me: error: No curses header-files found" >&2;}
7708 { (exit 1); exit 1; }; }
7711 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7713 for ac_header in $cf_cv_ncurses_header
7715 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7716 echo "$as_me:7716: checking for $ac_header" >&5
7717 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7718 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7719 echo $ECHO_N "(cached) $ECHO_C" >&6
7721 cat >conftest.$ac_ext <<_ACEOF
7722 #line 7722 "configure"
7723 #include "confdefs.h"
7724 #include <$ac_header>
7726 if { (eval echo "$as_me:7726: \"$ac_cpp conftest.$ac_ext\"") >&5
7727 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7729 egrep -v '^ *\+' conftest.er1 >conftest.err
7731 cat conftest.err >&5
7732 echo "$as_me:7732: \$? = $ac_status" >&5
7733 (exit $ac_status); } >/dev/null; then
7734 if test -s conftest.err; then
7735 ac_cpp_err=$ac_c_preproc_warn_flag
7742 if test -z "$ac_cpp_err"; then
7743 eval "$as_ac_Header=yes"
7745 echo "$as_me: failed program was:" >&5
7746 cat conftest.$ac_ext >&5
7747 eval "$as_ac_Header=no"
7749 rm -f conftest.err conftest.$ac_ext
7751 echo "$as_me:7751: result: `eval echo '${'$as_ac_Header'}'`" >&5
7752 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7753 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7754 cat >>confdefs.h <<EOF
7755 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7761 cat >>confdefs.h <<\EOF
7765 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7767 cat >>confdefs.h <<EOF
7768 #define $cf_nculib_ROOT 1
7771 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7775 cf_ncuhdr_root=ncursesw
7777 test -n "$cf_cv_curses_dir" && \
7778 test "$cf_cv_curses_dir" != "no" && { \
7780 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7781 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7783 while test $cf_add_incdir != /usr/include
7785 if test -d $cf_add_incdir
7788 if test -n "$CFLAGS$CPPFLAGS" ; then
7789 # a loop is needed to ensure we can add subdirs of existing dirs
7790 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7791 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7792 cf_have_incdir=yes; break
7797 if test "$cf_have_incdir" = no ; then
7798 if test "$cf_add_incdir" = /usr/local/include ; then
7799 if test "$GCC" = yes
7801 cf_save_CPPFLAGS=$CPPFLAGS
7802 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7803 cat >conftest.$ac_ext <<_ACEOF
7804 #line 7804 "configure"
7805 #include "confdefs.h"
7815 rm -f conftest.$ac_objext
7816 if { (eval echo "$as_me:7816: \"$ac_compile\"") >&5
7817 (eval $ac_compile) 2>&5
7819 echo "$as_me:7819: \$? = $ac_status" >&5
7820 (exit $ac_status); } &&
7821 { ac_try='test -s conftest.$ac_objext'
7822 { (eval echo "$as_me:7822: \"$ac_try\"") >&5
7825 echo "$as_me:7825: \$? = $ac_status" >&5
7826 (exit $ac_status); }; }; then
7829 echo "$as_me: failed program was:" >&5
7830 cat conftest.$ac_ext >&5
7833 rm -f conftest.$ac_objext conftest.$ac_ext
7834 CPPFLAGS=$cf_save_CPPFLAGS
7839 if test "$cf_have_incdir" = no ; then
7840 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7842 echo "${as_me:-configure}:7842: testing adding $cf_add_incdir to include-path ..." 1>&5
7844 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7846 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7847 test "$cf_top_incdir" = "$cf_add_incdir" && break
7848 cf_add_incdir="$cf_top_incdir"
7859 echo "$as_me:7859: checking for $cf_ncuhdr_root header in include-path" >&5
7860 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
7861 if test "${cf_cv_ncurses_h+set}" = set; then
7862 echo $ECHO_N "(cached) $ECHO_C" >&6
7865 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
7866 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
7867 for cf_header in $cf_header_list
7870 cat >conftest.$ac_ext <<_ACEOF
7871 #line 7871 "configure"
7872 #include "confdefs.h"
7874 #define _XOPEN_SOURCE_EXTENDED
7875 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
7876 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
7878 #include <$cf_header>
7883 #ifdef NCURSES_VERSION
7889 printf("%s\n", NCURSES_VERSION);
7902 rm -f conftest.$ac_objext
7903 if { (eval echo "$as_me:7903: \"$ac_compile\"") >&5
7904 (eval $ac_compile) 2>&5
7906 echo "$as_me:7906: \$? = $ac_status" >&5
7907 (exit $ac_status); } &&
7908 { ac_try='test -s conftest.$ac_objext'
7909 { (eval echo "$as_me:7909: \"$ac_try\"") >&5
7912 echo "$as_me:7912: \$? = $ac_status" >&5
7913 (exit $ac_status); }; }; then
7914 cf_cv_ncurses_h=$cf_header
7917 echo "$as_me: failed program was:" >&5
7918 cat conftest.$ac_ext >&5
7921 rm -f conftest.$ac_objext conftest.$ac_ext
7923 test "$cf_cv_ncurses_h" != no && break
7927 echo "$as_me:7927: result: $cf_cv_ncurses_h" >&5
7928 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
7930 if test "$cf_cv_ncurses_h" != no ; then
7931 cf_cv_ncurses_header=$cf_cv_ncurses_h
7934 echo "$as_me:7934: checking for $cf_ncuhdr_root include-path" >&5
7935 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
7936 if test "${cf_cv_ncurses_h2+set}" = set; then
7937 echo $ECHO_N "(cached) $ECHO_C" >&6
7940 test -n "$verbose" && echo
7944 # collect the current set of include-directories from compiler flags
7945 cf_header_path_list=""
7946 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7947 for cf_header_path in $CPPFLAGS $CFLAGS
7949 case $cf_header_path in #(vi
7951 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7953 test "x$cf_header_path" != "xNONE" && \
7954 test -d "$cf_header_path" && \
7956 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7957 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7958 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
7959 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
7960 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
7961 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"
7964 cf_header_path_list="$cf_header_path_list $cf_search"
7970 # add the variations for the package we are looking for
7974 test "x/usr" != "x$prefix" && \
7976 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
7977 test -n "$verbose" && echo " ... testing for include-directories under /usr"
7978 test -d /usr/include && cf_search="$cf_search /usr/include"
7979 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
7980 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
7981 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
7982 test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7985 test "x$prefix" != "xNONE" && \
7986 test -d "$prefix" && \
7988 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7989 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7990 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
7991 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
7992 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
7993 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7996 test "x/usr/local" != "x$prefix" && \
7997 test -d "/usr/local" && \
7998 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
7999 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
8000 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
8001 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
8002 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
8003 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
8004 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8007 test "x/opt" != "x$prefix" && \
8009 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
8010 test -n "$verbose" && echo " ... testing for include-directories under /opt"
8011 test -d /opt/include && cf_search="$cf_search /opt/include"
8012 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
8013 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
8014 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
8015 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8018 test "x$HOME" != "x$prefix" && \
8019 test -d "$HOME" && \
8020 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
8021 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
8022 test -d $HOME/include && cf_search="$cf_search $HOME/include"
8023 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
8024 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
8025 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
8026 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8029 test "$includedir" != NONE && \
8030 test "$includedir" != "/usr/include" && \
8031 test -d "$includedir" && {
8032 test -d $includedir && cf_search="$cf_search $includedir"
8033 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8036 test "$oldincludedir" != NONE && \
8037 test "$oldincludedir" != "/usr/include" && \
8038 test -d "$oldincludedir" && {
8039 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8040 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8043 cf_search="$cf_search $cf_header_path_list"
8045 test -n "$verbose" && echo search path $cf_search
8046 cf_save2_CPPFLAGS="$CPPFLAGS"
8047 for cf_incdir in $cf_search
8050 if test -n "$cf_incdir" ; then
8051 for cf_add_incdir in $cf_incdir
8053 while test $cf_add_incdir != /usr/include
8055 if test -d $cf_add_incdir
8058 if test -n "$CFLAGS$CPPFLAGS" ; then
8059 # a loop is needed to ensure we can add subdirs of existing dirs
8060 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8061 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8062 cf_have_incdir=yes; break
8067 if test "$cf_have_incdir" = no ; then
8068 if test "$cf_add_incdir" = /usr/local/include ; then
8069 if test "$GCC" = yes
8071 cf_save_CPPFLAGS=$CPPFLAGS
8072 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8073 cat >conftest.$ac_ext <<_ACEOF
8074 #line 8074 "configure"
8075 #include "confdefs.h"
8085 rm -f conftest.$ac_objext
8086 if { (eval echo "$as_me:8086: \"$ac_compile\"") >&5
8087 (eval $ac_compile) 2>&5
8089 echo "$as_me:8089: \$? = $ac_status" >&5
8090 (exit $ac_status); } &&
8091 { ac_try='test -s conftest.$ac_objext'
8092 { (eval echo "$as_me:8092: \"$ac_try\"") >&5
8095 echo "$as_me:8095: \$? = $ac_status" >&5
8096 (exit $ac_status); }; }; then
8099 echo "$as_me: failed program was:" >&5
8100 cat conftest.$ac_ext >&5
8103 rm -f conftest.$ac_objext conftest.$ac_ext
8104 CPPFLAGS=$cf_save_CPPFLAGS
8109 if test "$cf_have_incdir" = no ; then
8110 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8112 echo "${as_me:-configure}:8112: testing adding $cf_add_incdir to include-path ..." 1>&5
8114 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8116 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8117 test "$cf_top_incdir" = "$cf_add_incdir" && break
8118 cf_add_incdir="$cf_top_incdir"
8132 cat >conftest.$ac_ext <<_ACEOF
8133 #line 8133 "configure"
8134 #include "confdefs.h"
8136 #include <$cf_header>
8141 #ifdef NCURSES_VERSION
8143 printf("%s\n", NCURSES_VERSION);
8156 rm -f conftest.$ac_objext
8157 if { (eval echo "$as_me:8157: \"$ac_compile\"") >&5
8158 (eval $ac_compile) 2>&5
8160 echo "$as_me:8160: \$? = $ac_status" >&5
8161 (exit $ac_status); } &&
8162 { ac_try='test -s conftest.$ac_objext'
8163 { (eval echo "$as_me:8163: \"$ac_try\"") >&5
8166 echo "$as_me:8166: \$? = $ac_status" >&5
8167 (exit $ac_status); }; }; then
8168 cf_cv_ncurses_h2=$cf_header
8171 echo "$as_me: failed program was:" >&5
8172 cat conftest.$ac_ext >&5
8175 rm -f conftest.$ac_objext conftest.$ac_ext
8177 if test "$cf_cv_ncurses_h2" != no ; then
8178 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8179 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8182 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8184 CPPFLAGS="$cf_save2_CPPFLAGS"
8185 test "$cf_cv_ncurses_h2" != no && break
8187 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8187: error: not found" >&5
8188 echo "$as_me: error: not found" >&2;}
8189 { (exit 1); exit 1; }; }
8192 echo "$as_me:8192: result: $cf_cv_ncurses_h2" >&5
8193 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8195 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8196 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8197 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8198 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8201 if test -n "$cf_1st_incdir" ; then
8202 for cf_add_incdir in $cf_1st_incdir
8204 while test $cf_add_incdir != /usr/include
8206 if test -d $cf_add_incdir
8209 if test -n "$CFLAGS$CPPFLAGS" ; then
8210 # a loop is needed to ensure we can add subdirs of existing dirs
8211 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8212 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8213 cf_have_incdir=yes; break
8218 if test "$cf_have_incdir" = no ; then
8219 if test "$cf_add_incdir" = /usr/local/include ; then
8220 if test "$GCC" = yes
8222 cf_save_CPPFLAGS=$CPPFLAGS
8223 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8224 cat >conftest.$ac_ext <<_ACEOF
8225 #line 8225 "configure"
8226 #include "confdefs.h"
8236 rm -f conftest.$ac_objext
8237 if { (eval echo "$as_me:8237: \"$ac_compile\"") >&5
8238 (eval $ac_compile) 2>&5
8240 echo "$as_me:8240: \$? = $ac_status" >&5
8241 (exit $ac_status); } &&
8242 { ac_try='test -s conftest.$ac_objext'
8243 { (eval echo "$as_me:8243: \"$ac_try\"") >&5
8246 echo "$as_me:8246: \$? = $ac_status" >&5
8247 (exit $ac_status); }; }; then
8250 echo "$as_me: failed program was:" >&5
8251 cat conftest.$ac_ext >&5
8254 rm -f conftest.$ac_objext conftest.$ac_ext
8255 CPPFLAGS=$cf_save_CPPFLAGS
8260 if test "$cf_have_incdir" = no ; then
8261 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8263 echo "${as_me:-configure}:8263: testing adding $cf_add_incdir to include-path ..." 1>&5
8265 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8267 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8268 test "$cf_top_incdir" = "$cf_add_incdir" && break
8269 cf_add_incdir="$cf_top_incdir"
8280 # Set definitions to allow ifdef'ing for ncurses.h
8282 case $cf_cv_ncurses_header in # (vi
8285 cat >>confdefs.h <<\EOF
8286 #define HAVE_NCURSES_H 1
8292 case $cf_cv_ncurses_header in # (vi
8293 ncurses/curses.h|ncurses/ncurses.h)
8295 cat >>confdefs.h <<\EOF
8296 #define HAVE_NCURSES_NCURSES_H 1
8300 ncursesw/curses.h|ncursesw/ncurses.h)
8302 cat >>confdefs.h <<\EOF
8303 #define HAVE_NCURSESW_NCURSES_H 1
8309 echo "$as_me:8309: checking for terminfo header" >&5
8310 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8311 if test "${cf_cv_term_header+set}" = set; then
8312 echo $ECHO_N "(cached) $ECHO_C" >&6
8315 case ${cf_cv_ncurses_header} in #(vi
8316 */ncurses.h|*/ncursesw.h) #(vi
8317 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8320 cf_term_header=term.h
8324 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8326 cat >conftest.$ac_ext <<_ACEOF
8327 #line 8327 "configure"
8328 #include "confdefs.h"
8330 #include <${cf_cv_ncurses_header:-curses.h}>
8336 int x = auto_left_margin
8341 rm -f conftest.$ac_objext
8342 if { (eval echo "$as_me:8342: \"$ac_compile\"") >&5
8343 (eval $ac_compile) 2>&5
8345 echo "$as_me:8345: \$? = $ac_status" >&5
8346 (exit $ac_status); } &&
8347 { ac_try='test -s conftest.$ac_objext'
8348 { (eval echo "$as_me:8348: \"$ac_try\"") >&5
8351 echo "$as_me:8351: \$? = $ac_status" >&5
8352 (exit $ac_status); }; }; then
8354 cf_cv_term_header="$cf_test"
8356 echo "$as_me: failed program was:" >&5
8357 cat conftest.$ac_ext >&5
8359 cf_cv_term_header=unknown
8362 rm -f conftest.$ac_objext conftest.$ac_ext
8363 test "$cf_cv_term_header" != unknown && break
8367 echo "$as_me:8367: result: $cf_cv_term_header" >&5
8368 echo "${ECHO_T}$cf_cv_term_header" >&6
8370 # Set definitions to allow ifdef'ing to accommodate subdirectories
8372 case $cf_cv_term_header in # (vi
8375 cat >>confdefs.h <<\EOF
8376 #define HAVE_TERM_H 1
8382 case $cf_cv_term_header in # (vi
8383 ncurses/term.h) #(vi
8385 cat >>confdefs.h <<\EOF
8386 #define HAVE_NCURSES_TERM_H 1
8392 cat >>confdefs.h <<\EOF
8393 #define HAVE_NCURSESW_TERM_H 1
8399 # some applications need this, but should check for NCURSES_VERSION
8401 cat >>confdefs.h <<\EOF
8405 echo "$as_me:8405: checking for ncurses version" >&5
8406 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8407 if test "${cf_cv_ncurses_version+set}" = set; then
8408 echo $ECHO_N "(cached) $ECHO_C" >&6
8411 cf_cv_ncurses_version=no
8414 if test "$cross_compiling" = yes; then
8416 # This will not work if the preprocessor splits the line after the
8417 # Autoconf token. The 'unproto' program does that.
8418 cat > conftest.$ac_ext <<EOF
8419 #include <${cf_cv_ncurses_header:-curses.h}>
8421 #ifdef NCURSES_VERSION
8422 Autoconf NCURSES_VERSION
8430 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8431 { (eval echo "$as_me:8431: \"$cf_try\"") >&5
8434 echo "$as_me:8434: \$? = $ac_status" >&5
8435 (exit $ac_status); }
8436 if test -f conftest.out ; then
8437 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8438 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8443 cat >conftest.$ac_ext <<_ACEOF
8444 #line 8444 "configure"
8445 #include "confdefs.h"
8447 #include <${cf_cv_ncurses_header:-curses.h}>
8451 FILE *fp = fopen("$cf_tempfile", "w");
8452 #ifdef NCURSES_VERSION
8453 # ifdef NCURSES_VERSION_PATCH
8454 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8456 fprintf(fp, "%s\n", NCURSES_VERSION);
8460 fprintf(fp, "old\n");
8465 ${cf_cv_main_return:-return}(0);
8468 rm -f conftest$ac_exeext
8469 if { (eval echo "$as_me:8469: \"$ac_link\"") >&5
8470 (eval $ac_link) 2>&5
8472 echo "$as_me:8472: \$? = $ac_status" >&5
8473 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8474 { (eval echo "$as_me:8474: \"$ac_try\"") >&5
8477 echo "$as_me:8477: \$? = $ac_status" >&5
8478 (exit $ac_status); }; }; then
8480 cf_cv_ncurses_version=`cat $cf_tempfile`
8482 echo "$as_me: program exited with status $ac_status" >&5
8483 echo "$as_me: failed program was:" >&5
8484 cat conftest.$ac_ext >&5
8486 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8491 echo "$as_me:8491: result: $cf_cv_ncurses_version" >&5
8492 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8493 test "$cf_cv_ncurses_version" = no ||
8494 cat >>confdefs.h <<\EOF
8498 cf_nculib_root=ncursesw
8499 # This works, except for the special case where we find gpm, but
8500 # ncurses is in a nonstandard location via $LIBS, and we really want
8503 cf_ncurses_SAVE="$LIBS"
8504 echo "$as_me:8504: checking for Gpm_Open in -lgpm" >&5
8505 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8506 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8507 echo $ECHO_N "(cached) $ECHO_C" >&6
8509 ac_check_lib_save_LIBS=$LIBS
8511 cat >conftest.$ac_ext <<_ACEOF
8512 #line 8512 "configure"
8513 #include "confdefs.h"
8515 /* Override any gcc2 internal prototype to avoid an error. */
8519 /* We use char because int might match the return type of a gcc2
8520 builtin and then its argument prototype would still apply. */
8530 rm -f conftest.$ac_objext conftest$ac_exeext
8531 if { (eval echo "$as_me:8531: \"$ac_link\"") >&5
8532 (eval $ac_link) 2>&5
8534 echo "$as_me:8534: \$? = $ac_status" >&5
8535 (exit $ac_status); } &&
8536 { ac_try='test -s conftest$ac_exeext'
8537 { (eval echo "$as_me:8537: \"$ac_try\"") >&5
8540 echo "$as_me:8540: \$? = $ac_status" >&5
8541 (exit $ac_status); }; }; then
8542 ac_cv_lib_gpm_Gpm_Open=yes
8544 echo "$as_me: failed program was:" >&5
8545 cat conftest.$ac_ext >&5
8546 ac_cv_lib_gpm_Gpm_Open=no
8548 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8549 LIBS=$ac_check_lib_save_LIBS
8551 echo "$as_me:8551: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8552 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8553 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8554 echo "$as_me:8554: checking for initscr in -lgpm" >&5
8555 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8556 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8557 echo $ECHO_N "(cached) $ECHO_C" >&6
8559 ac_check_lib_save_LIBS=$LIBS
8561 cat >conftest.$ac_ext <<_ACEOF
8562 #line 8562 "configure"
8563 #include "confdefs.h"
8565 /* Override any gcc2 internal prototype to avoid an error. */
8569 /* We use char because int might match the return type of a gcc2
8570 builtin and then its argument prototype would still apply. */
8580 rm -f conftest.$ac_objext conftest$ac_exeext
8581 if { (eval echo "$as_me:8581: \"$ac_link\"") >&5
8582 (eval $ac_link) 2>&5
8584 echo "$as_me:8584: \$? = $ac_status" >&5
8585 (exit $ac_status); } &&
8586 { ac_try='test -s conftest$ac_exeext'
8587 { (eval echo "$as_me:8587: \"$ac_try\"") >&5
8590 echo "$as_me:8590: \$? = $ac_status" >&5
8591 (exit $ac_status); }; }; then
8592 ac_cv_lib_gpm_initscr=yes
8594 echo "$as_me: failed program was:" >&5
8595 cat conftest.$ac_ext >&5
8596 ac_cv_lib_gpm_initscr=no
8598 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8599 LIBS=$ac_check_lib_save_LIBS
8601 echo "$as_me:8601: result: $ac_cv_lib_gpm_initscr" >&5
8602 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8603 if test $ac_cv_lib_gpm_initscr = yes; then
8604 LIBS="$cf_ncurses_SAVE"
8606 cf_ncurses_LIBS="-lgpm"
8611 case $host_os in #(vi
8613 # This is only necessary if you are linking against an obsolete
8614 # version of ncurses (but it should do no harm, since it's static).
8615 if test "$cf_nculib_root" = ncurses ; then
8616 echo "$as_me:8616: checking for tgoto in -lmytinfo" >&5
8617 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8618 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8619 echo $ECHO_N "(cached) $ECHO_C" >&6
8621 ac_check_lib_save_LIBS=$LIBS
8622 LIBS="-lmytinfo $LIBS"
8623 cat >conftest.$ac_ext <<_ACEOF
8624 #line 8624 "configure"
8625 #include "confdefs.h"
8627 /* Override any gcc2 internal prototype to avoid an error. */
8631 /* We use char because int might match the return type of a gcc2
8632 builtin and then its argument prototype would still apply. */
8642 rm -f conftest.$ac_objext conftest$ac_exeext
8643 if { (eval echo "$as_me:8643: \"$ac_link\"") >&5
8644 (eval $ac_link) 2>&5
8646 echo "$as_me:8646: \$? = $ac_status" >&5
8647 (exit $ac_status); } &&
8648 { ac_try='test -s conftest$ac_exeext'
8649 { (eval echo "$as_me:8649: \"$ac_try\"") >&5
8652 echo "$as_me:8652: \$? = $ac_status" >&5
8653 (exit $ac_status); }; }; then
8654 ac_cv_lib_mytinfo_tgoto=yes
8656 echo "$as_me: failed program was:" >&5
8657 cat conftest.$ac_ext >&5
8658 ac_cv_lib_mytinfo_tgoto=no
8660 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8661 LIBS=$ac_check_lib_save_LIBS
8663 echo "$as_me:8663: result: $ac_cv_lib_mytinfo_tgoto" >&5
8664 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8665 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8666 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8673 cf_add_libs="$cf_ncurses_LIBS"
8674 # Filter out duplicates - this happens with badly-designed ".pc" files...
8675 for cf_add_1lib in $LIBS
8677 for cf_add_2lib in $cf_add_libs
8679 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8685 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8689 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8692 cf_add_libs="-l$cf_nculib_root"
8693 # Filter out duplicates - this happens with badly-designed ".pc" files...
8694 for cf_add_1lib in $LIBS
8696 for cf_add_2lib in $cf_add_libs
8698 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8704 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8710 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
8712 echo "$as_me:8712: checking for initscr" >&5
8713 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8714 if test "${ac_cv_func_initscr+set}" = set; then
8715 echo $ECHO_N "(cached) $ECHO_C" >&6
8717 cat >conftest.$ac_ext <<_ACEOF
8718 #line 8718 "configure"
8719 #include "confdefs.h"
8720 /* System header to define __stub macros and hopefully few prototypes,
8721 which can conflict with char initscr (); below. */
8723 /* Override any gcc2 internal prototype to avoid an error. */
8727 /* We use char because int might match the return type of a gcc2
8728 builtin and then its argument prototype would still apply. */
8735 /* The GNU C library defines this for functions which it implements
8736 to always fail with ENOSYS. Some functions are actually named
8737 something starting with __ and the normal name is an alias. */
8738 #if defined (__stub_initscr) || defined (__stub___initscr)
8741 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8748 rm -f conftest.$ac_objext conftest$ac_exeext
8749 if { (eval echo "$as_me:8749: \"$ac_link\"") >&5
8750 (eval $ac_link) 2>&5
8752 echo "$as_me:8752: \$? = $ac_status" >&5
8753 (exit $ac_status); } &&
8754 { ac_try='test -s conftest$ac_exeext'
8755 { (eval echo "$as_me:8755: \"$ac_try\"") >&5
8758 echo "$as_me:8758: \$? = $ac_status" >&5
8759 (exit $ac_status); }; }; then
8760 ac_cv_func_initscr=yes
8762 echo "$as_me: failed program was:" >&5
8763 cat conftest.$ac_ext >&5
8764 ac_cv_func_initscr=no
8766 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8768 echo "$as_me:8768: result: $ac_cv_func_initscr" >&5
8769 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8770 if test $ac_cv_func_initscr = yes; then
8771 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8774 cf_save_LIBS="$LIBS"
8775 echo "$as_me:8775: checking for initscr in -l$cf_nculib_root" >&5
8776 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8777 LIBS="-l$cf_nculib_root $LIBS"
8778 cat >conftest.$ac_ext <<_ACEOF
8779 #line 8779 "configure"
8780 #include "confdefs.h"
8781 #include <${cf_cv_ncurses_header:-curses.h}>
8790 rm -f conftest.$ac_objext conftest$ac_exeext
8791 if { (eval echo "$as_me:8791: \"$ac_link\"") >&5
8792 (eval $ac_link) 2>&5
8794 echo "$as_me:8794: \$? = $ac_status" >&5
8795 (exit $ac_status); } &&
8796 { ac_try='test -s conftest$ac_exeext'
8797 { (eval echo "$as_me:8797: \"$ac_try\"") >&5
8800 echo "$as_me:8800: \$? = $ac_status" >&5
8801 (exit $ac_status); }; }; then
8802 echo "$as_me:8802: result: yes" >&5
8803 echo "${ECHO_T}yes" >&6
8804 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8807 echo "$as_me: failed program was:" >&5
8808 cat conftest.$ac_ext >&5
8809 echo "$as_me:8809: result: no" >&5
8810 echo "${ECHO_T}no" >&6
8813 cf_library_path_list=""
8814 if test -n "${LDFLAGS}${LIBS}" ; then
8815 for cf_library_path in $LDFLAGS $LIBS
8817 case $cf_library_path in #(vi
8819 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8821 test "x$cf_library_path" != "xNONE" && \
8822 test -d "$cf_library_path" && \
8824 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8825 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
8826 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
8827 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
8828 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
8829 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"
8832 cf_library_path_list="$cf_library_path_list $cf_search"
8840 test "x/usr" != "x$prefix" && \
8842 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
8843 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
8844 test -d /usr/lib && cf_search="$cf_search /usr/lib"
8845 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
8846 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
8847 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
8848 test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
8851 test "x$prefix" != "xNONE" && \
8852 test -d "$prefix" && \
8854 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8855 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
8856 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
8857 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
8858 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
8859 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
8862 test "x/usr/local" != "x$prefix" && \
8863 test -d "/usr/local" && \
8864 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
8865 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
8866 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
8867 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
8868 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
8869 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
8870 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
8873 test "x/opt" != "x$prefix" && \
8875 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
8876 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
8877 test -d /opt/lib && cf_search="$cf_search /opt/lib"
8878 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
8879 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
8880 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
8881 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
8884 test "x$HOME" != "x$prefix" && \
8885 test -d "$HOME" && \
8886 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
8887 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
8888 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
8889 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
8890 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
8891 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
8892 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
8895 cf_search="$cf_library_path_list $cf_search"
8897 for cf_libdir in $cf_search
8899 echo "$as_me:8899: checking for -l$cf_nculib_root in $cf_libdir" >&5
8900 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
8901 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
8902 cat >conftest.$ac_ext <<_ACEOF
8903 #line 8903 "configure"
8904 #include "confdefs.h"
8905 #include <${cf_cv_ncurses_header:-curses.h}>
8914 rm -f conftest.$ac_objext conftest$ac_exeext
8915 if { (eval echo "$as_me:8915: \"$ac_link\"") >&5
8916 (eval $ac_link) 2>&5
8918 echo "$as_me:8918: \$? = $ac_status" >&5
8919 (exit $ac_status); } &&
8920 { ac_try='test -s conftest$ac_exeext'
8921 { (eval echo "$as_me:8921: \"$ac_try\"") >&5
8924 echo "$as_me:8924: \$? = $ac_status" >&5
8925 (exit $ac_status); }; }; then
8926 echo "$as_me:8926: result: yes" >&5
8927 echo "${ECHO_T}yes" >&6
8928 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8931 echo "$as_me: failed program was:" >&5
8932 cat conftest.$ac_ext >&5
8933 echo "$as_me:8933: result: no" >&5
8934 echo "${ECHO_T}no" >&6
8935 LIBS="$cf_save_LIBS"
8937 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8941 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8945 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
8947 if test $cf_found_library = no ; then
8948 { { echo "$as_me:8948: error: Cannot link $cf_nculib_root library" >&5
8949 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
8950 { (exit 1); exit 1; }; }
8955 if test -n "$cf_ncurses_LIBS" ; then
8956 echo "$as_me:8956: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
8957 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
8958 cf_ncurses_SAVE="$LIBS"
8959 for p in $cf_ncurses_LIBS ; do
8960 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
8961 if test "$q" != "$LIBS" ; then
8965 cat >conftest.$ac_ext <<_ACEOF
8966 #line 8966 "configure"
8967 #include "confdefs.h"
8968 #include <${cf_cv_ncurses_header:-curses.h}>
8972 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8977 rm -f conftest.$ac_objext conftest$ac_exeext
8978 if { (eval echo "$as_me:8978: \"$ac_link\"") >&5
8979 (eval $ac_link) 2>&5
8981 echo "$as_me:8981: \$? = $ac_status" >&5
8982 (exit $ac_status); } &&
8983 { ac_try='test -s conftest$ac_exeext'
8984 { (eval echo "$as_me:8984: \"$ac_try\"") >&5
8987 echo "$as_me:8987: \$? = $ac_status" >&5
8988 (exit $ac_status); }; }; then
8989 echo "$as_me:8989: result: yes" >&5
8990 echo "${ECHO_T}yes" >&6
8992 echo "$as_me: failed program was:" >&5
8993 cat conftest.$ac_ext >&5
8994 echo "$as_me:8994: result: no" >&5
8995 echo "${ECHO_T}no" >&6
8996 LIBS="$cf_ncurses_SAVE"
8998 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9001 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9003 cat >>confdefs.h <<EOF
9004 #define $cf_nculib_ROOT 1
9011 echo "$as_me:9011: checking for X" >&5
9012 echo $ECHO_N "checking for X... $ECHO_C" >&6
9014 # Check whether --with-x or --without-x was given.
9015 if test "${with_x+set}" = set; then
9019 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9020 if test "x$with_x" = xno; then
9021 # The user explicitly disabled X.
9024 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9025 # Both variables are already set.
9028 if test "${ac_cv_have_x+set}" = set; then
9029 echo $ECHO_N "(cached) $ECHO_C" >&6
9031 # One or both of the vars are not set, and there is no cached value.
9032 ac_x_includes=no ac_x_libraries=no
9034 if mkdir conftest.dir; then
9036 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9037 cat >Imakefile <<'EOF'
9039 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9041 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9042 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9043 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9044 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9045 for ac_extension in a so sl dylib dll; do
9046 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9047 test -f $ac_im_libdir/libX11.$ac_extension; then
9048 ac_im_usrlibdir=$ac_im_libdir; break
9051 # Screen out bogus values from the imake configuration. They are
9052 # bogus both because they are the default anyway, and because
9053 # using them would break gcc on systems where it needs fixed includes.
9054 case $ac_im_incroot in
9056 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9058 case $ac_im_usrlibdir in
9060 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9067 # Standard set of common directories for X headers.
9068 # Check X11 before X11Rn because it is often a symlink to the current release.
9080 /usr/local/X11/include
9081 /usr/local/X11R6/include
9082 /usr/local/X11R5/include
9083 /usr/local/X11R4/include
9085 /usr/local/include/X11
9086 /usr/local/include/X11R6
9087 /usr/local/include/X11R5
9088 /usr/local/include/X11R4
9092 /usr/XFree86/include/X11
9096 /usr/unsupported/include
9098 /usr/local/x11r5/include
9099 /usr/lpp/Xamples/include
9101 /usr/openwin/include
9102 /usr/openwin/share/include'
9104 if test "$ac_x_includes" = no; then
9105 # Guess where to find include files, by looking for Intrinsic.h.
9106 # First, try using that file with no special directory specified.
9107 cat >conftest.$ac_ext <<_ACEOF
9108 #line 9108 "configure"
9109 #include "confdefs.h"
9110 #include <X11/Intrinsic.h>
9112 if { (eval echo "$as_me:9112: \"$ac_cpp conftest.$ac_ext\"") >&5
9113 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9115 egrep -v '^ *\+' conftest.er1 >conftest.err
9117 cat conftest.err >&5
9118 echo "$as_me:9118: \$? = $ac_status" >&5
9119 (exit $ac_status); } >/dev/null; then
9120 if test -s conftest.err; then
9121 ac_cpp_err=$ac_c_preproc_warn_flag
9128 if test -z "$ac_cpp_err"; then
9129 # We can compile using X headers with no special include directory.
9132 echo "$as_me: failed program was:" >&5
9133 cat conftest.$ac_ext >&5
9134 for ac_dir in $ac_x_header_dirs; do
9135 if test -r "$ac_dir/X11/Intrinsic.h"; then
9136 ac_x_includes=$ac_dir
9141 rm -f conftest.err conftest.$ac_ext
9142 fi # $ac_x_includes = no
9144 if test "$ac_x_libraries" = no; then
9145 # Check for the libraries.
9146 # See if we find them without any special options.
9147 # Don't add to $LIBS permanently.
9150 cat >conftest.$ac_ext <<_ACEOF
9151 #line 9151 "configure"
9152 #include "confdefs.h"
9153 #include <X11/Intrinsic.h>
9162 rm -f conftest.$ac_objext conftest$ac_exeext
9163 if { (eval echo "$as_me:9163: \"$ac_link\"") >&5
9164 (eval $ac_link) 2>&5
9166 echo "$as_me:9166: \$? = $ac_status" >&5
9167 (exit $ac_status); } &&
9168 { ac_try='test -s conftest$ac_exeext'
9169 { (eval echo "$as_me:9169: \"$ac_try\"") >&5
9172 echo "$as_me:9172: \$? = $ac_status" >&5
9173 (exit $ac_status); }; }; then
9175 # We can link X programs with no special library path.
9178 echo "$as_me: failed program was:" >&5
9179 cat conftest.$ac_ext >&5
9181 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9183 # Don't even attempt the hair of trying to link an X program!
9184 for ac_extension in a so sl dylib dll; do
9185 if test -r $ac_dir/libXt.$ac_extension; then
9186 ac_x_libraries=$ac_dir
9192 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9193 fi # $ac_x_libraries = no
9195 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
9196 # Didn't find X anywhere. Cache the known absence of X.
9197 ac_cv_have_x="have_x=no"
9199 # Record where we found X for the cache.
9200 ac_cv_have_x="have_x=yes \
9201 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9206 eval "$ac_cv_have_x"
9209 if test "$have_x" != yes; then
9210 echo "$as_me:9210: result: $have_x" >&5
9211 echo "${ECHO_T}$have_x" >&6
9214 # If each of the values was on the command line, it overrides each guess.
9215 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9216 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9217 # Update the cache value to reflect the command line values.
9218 ac_cv_have_x="have_x=yes \
9219 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9220 echo "$as_me:9220: result: libraries $x_libraries, headers $x_includes" >&5
9221 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
9224 if test "$no_x" = yes; then
9225 # Not all programs may use this symbol, but it does not hurt to define it.
9227 cat >>confdefs.h <<\EOF
9228 #define X_DISPLAY_MISSING 1
9231 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
9233 if test -n "$x_includes"; then
9234 X_CFLAGS="$X_CFLAGS -I$x_includes"
9237 # It would also be nice to do this for all -L options, not just this one.
9238 if test -n "$x_libraries"; then
9239 X_LIBS="$X_LIBS -L$x_libraries"
9240 # For Solaris; some versions of Sun CC require a space after -R and
9241 # others require no space. Words are not sufficient . . . .
9242 case `(uname -sr) 2>/dev/null` in
9244 echo "$as_me:9244: checking whether -R must be followed by a space" >&5
9245 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
9246 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
9247 cat >conftest.$ac_ext <<_ACEOF
9248 #line 9248 "configure"
9249 #include "confdefs.h"
9259 rm -f conftest.$ac_objext conftest$ac_exeext
9260 if { (eval echo "$as_me:9260: \"$ac_link\"") >&5
9261 (eval $ac_link) 2>&5
9263 echo "$as_me:9263: \$? = $ac_status" >&5
9264 (exit $ac_status); } &&
9265 { ac_try='test -s conftest$ac_exeext'
9266 { (eval echo "$as_me:9266: \"$ac_try\"") >&5
9269 echo "$as_me:9269: \$? = $ac_status" >&5
9270 (exit $ac_status); }; }; then
9273 echo "$as_me: failed program was:" >&5
9274 cat conftest.$ac_ext >&5
9277 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9278 if test $ac_R_nospace = yes; then
9279 echo "$as_me:9279: result: no" >&5
9280 echo "${ECHO_T}no" >&6
9281 X_LIBS="$X_LIBS -R$x_libraries"
9283 LIBS="$ac_xsave_LIBS -R $x_libraries"
9284 cat >conftest.$ac_ext <<_ACEOF
9285 #line 9285 "configure"
9286 #include "confdefs.h"
9296 rm -f conftest.$ac_objext conftest$ac_exeext
9297 if { (eval echo "$as_me:9297: \"$ac_link\"") >&5
9298 (eval $ac_link) 2>&5
9300 echo "$as_me:9300: \$? = $ac_status" >&5
9301 (exit $ac_status); } &&
9302 { ac_try='test -s conftest$ac_exeext'
9303 { (eval echo "$as_me:9303: \"$ac_try\"") >&5
9306 echo "$as_me:9306: \$? = $ac_status" >&5
9307 (exit $ac_status); }; }; then
9310 echo "$as_me: failed program was:" >&5
9311 cat conftest.$ac_ext >&5
9314 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9315 if test $ac_R_space = yes; then
9316 echo "$as_me:9316: result: yes" >&5
9317 echo "${ECHO_T}yes" >&6
9318 X_LIBS="$X_LIBS -R $x_libraries"
9320 echo "$as_me:9320: result: neither works" >&5
9321 echo "${ECHO_T}neither works" >&6
9328 # Check for system-dependent libraries X programs must link with.
9329 # Do this before checking for the system-independent R6 libraries
9330 # (-lICE), since we may need -lsocket or whatever for X linking.
9332 if test "$ISC" = yes; then
9333 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
9335 # Martyn Johnson says this is needed for Ultrix, if the X
9336 # libraries were built with DECnet support. And Karl Berry says
9337 # the Alpha needs dnet_stub (dnet does not exist).
9338 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
9339 cat >conftest.$ac_ext <<_ACEOF
9340 #line 9340 "configure"
9341 #include "confdefs.h"
9343 /* Override any gcc2 internal prototype to avoid an error. */
9347 /* We use char because int might match the return type of a gcc2
9348 builtin and then its argument prototype would still apply. */
9349 char XOpenDisplay ();
9358 rm -f conftest.$ac_objext conftest$ac_exeext
9359 if { (eval echo "$as_me:9359: \"$ac_link\"") >&5
9360 (eval $ac_link) 2>&5
9362 echo "$as_me:9362: \$? = $ac_status" >&5
9363 (exit $ac_status); } &&
9364 { ac_try='test -s conftest$ac_exeext'
9365 { (eval echo "$as_me:9365: \"$ac_try\"") >&5
9368 echo "$as_me:9368: \$? = $ac_status" >&5
9369 (exit $ac_status); }; }; then
9372 echo "$as_me: failed program was:" >&5
9373 cat conftest.$ac_ext >&5
9374 echo "$as_me:9374: checking for dnet_ntoa in -ldnet" >&5
9375 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
9376 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
9377 echo $ECHO_N "(cached) $ECHO_C" >&6
9379 ac_check_lib_save_LIBS=$LIBS
9381 cat >conftest.$ac_ext <<_ACEOF
9382 #line 9382 "configure"
9383 #include "confdefs.h"
9385 /* Override any gcc2 internal prototype to avoid an error. */
9389 /* We use char because int might match the return type of a gcc2
9390 builtin and then its argument prototype would still apply. */
9400 rm -f conftest.$ac_objext conftest$ac_exeext
9401 if { (eval echo "$as_me:9401: \"$ac_link\"") >&5
9402 (eval $ac_link) 2>&5
9404 echo "$as_me:9404: \$? = $ac_status" >&5
9405 (exit $ac_status); } &&
9406 { ac_try='test -s conftest$ac_exeext'
9407 { (eval echo "$as_me:9407: \"$ac_try\"") >&5
9410 echo "$as_me:9410: \$? = $ac_status" >&5
9411 (exit $ac_status); }; }; then
9412 ac_cv_lib_dnet_dnet_ntoa=yes
9414 echo "$as_me: failed program was:" >&5
9415 cat conftest.$ac_ext >&5
9416 ac_cv_lib_dnet_dnet_ntoa=no
9418 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9419 LIBS=$ac_check_lib_save_LIBS
9421 echo "$as_me:9421: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9422 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
9423 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
9424 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
9427 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
9428 echo "$as_me:9428: checking for dnet_ntoa in -ldnet_stub" >&5
9429 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
9430 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
9431 echo $ECHO_N "(cached) $ECHO_C" >&6
9433 ac_check_lib_save_LIBS=$LIBS
9434 LIBS="-ldnet_stub $LIBS"
9435 cat >conftest.$ac_ext <<_ACEOF
9436 #line 9436 "configure"
9437 #include "confdefs.h"
9439 /* Override any gcc2 internal prototype to avoid an error. */
9443 /* We use char because int might match the return type of a gcc2
9444 builtin and then its argument prototype would still apply. */
9454 rm -f conftest.$ac_objext conftest$ac_exeext
9455 if { (eval echo "$as_me:9455: \"$ac_link\"") >&5
9456 (eval $ac_link) 2>&5
9458 echo "$as_me:9458: \$? = $ac_status" >&5
9459 (exit $ac_status); } &&
9460 { ac_try='test -s conftest$ac_exeext'
9461 { (eval echo "$as_me:9461: \"$ac_try\"") >&5
9464 echo "$as_me:9464: \$? = $ac_status" >&5
9465 (exit $ac_status); }; }; then
9466 ac_cv_lib_dnet_stub_dnet_ntoa=yes
9468 echo "$as_me: failed program was:" >&5
9469 cat conftest.$ac_ext >&5
9470 ac_cv_lib_dnet_stub_dnet_ntoa=no
9472 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9473 LIBS=$ac_check_lib_save_LIBS
9475 echo "$as_me:9475: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9476 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
9477 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
9478 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
9483 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9484 LIBS="$ac_xsave_LIBS"
9486 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9487 # to get the SysV transport functions.
9488 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
9490 # The nsl library prevents programs from opening the X display
9491 # on Irix 5.2, according to T.E. Dickey.
9492 # The functions gethostbyname, getservbyname, and inet_addr are
9493 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
9494 echo "$as_me:9494: checking for gethostbyname" >&5
9495 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
9496 if test "${ac_cv_func_gethostbyname+set}" = set; then
9497 echo $ECHO_N "(cached) $ECHO_C" >&6
9499 cat >conftest.$ac_ext <<_ACEOF
9500 #line 9500 "configure"
9501 #include "confdefs.h"
9502 /* System header to define __stub macros and hopefully few prototypes,
9503 which can conflict with char gethostbyname (); below. */
9505 /* Override any gcc2 internal prototype to avoid an error. */
9509 /* We use char because int might match the return type of a gcc2
9510 builtin and then its argument prototype would still apply. */
9511 char gethostbyname ();
9517 /* The GNU C library defines this for functions which it implements
9518 to always fail with ENOSYS. Some functions are actually named
9519 something starting with __ and the normal name is an alias. */
9520 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
9523 f = gethostbyname; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9530 rm -f conftest.$ac_objext conftest$ac_exeext
9531 if { (eval echo "$as_me:9531: \"$ac_link\"") >&5
9532 (eval $ac_link) 2>&5
9534 echo "$as_me:9534: \$? = $ac_status" >&5
9535 (exit $ac_status); } &&
9536 { ac_try='test -s conftest$ac_exeext'
9537 { (eval echo "$as_me:9537: \"$ac_try\"") >&5
9540 echo "$as_me:9540: \$? = $ac_status" >&5
9541 (exit $ac_status); }; }; then
9542 ac_cv_func_gethostbyname=yes
9544 echo "$as_me: failed program was:" >&5
9545 cat conftest.$ac_ext >&5
9546 ac_cv_func_gethostbyname=no
9548 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9550 echo "$as_me:9550: result: $ac_cv_func_gethostbyname" >&5
9551 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
9553 if test $ac_cv_func_gethostbyname = no; then
9554 echo "$as_me:9554: checking for gethostbyname in -lnsl" >&5
9555 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
9556 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
9557 echo $ECHO_N "(cached) $ECHO_C" >&6
9559 ac_check_lib_save_LIBS=$LIBS
9561 cat >conftest.$ac_ext <<_ACEOF
9562 #line 9562 "configure"
9563 #include "confdefs.h"
9565 /* Override any gcc2 internal prototype to avoid an error. */
9569 /* We use char because int might match the return type of a gcc2
9570 builtin and then its argument prototype would still apply. */
9571 char gethostbyname ();
9580 rm -f conftest.$ac_objext conftest$ac_exeext
9581 if { (eval echo "$as_me:9581: \"$ac_link\"") >&5
9582 (eval $ac_link) 2>&5
9584 echo "$as_me:9584: \$? = $ac_status" >&5
9585 (exit $ac_status); } &&
9586 { ac_try='test -s conftest$ac_exeext'
9587 { (eval echo "$as_me:9587: \"$ac_try\"") >&5
9590 echo "$as_me:9590: \$? = $ac_status" >&5
9591 (exit $ac_status); }; }; then
9592 ac_cv_lib_nsl_gethostbyname=yes
9594 echo "$as_me: failed program was:" >&5
9595 cat conftest.$ac_ext >&5
9596 ac_cv_lib_nsl_gethostbyname=no
9598 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9599 LIBS=$ac_check_lib_save_LIBS
9601 echo "$as_me:9601: result: $ac_cv_lib_nsl_gethostbyname" >&5
9602 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
9603 if test $ac_cv_lib_nsl_gethostbyname = yes; then
9604 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
9607 if test $ac_cv_lib_nsl_gethostbyname = no; then
9608 echo "$as_me:9608: checking for gethostbyname in -lbsd" >&5
9609 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
9610 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
9611 echo $ECHO_N "(cached) $ECHO_C" >&6
9613 ac_check_lib_save_LIBS=$LIBS
9615 cat >conftest.$ac_ext <<_ACEOF
9616 #line 9616 "configure"
9617 #include "confdefs.h"
9619 /* Override any gcc2 internal prototype to avoid an error. */
9623 /* We use char because int might match the return type of a gcc2
9624 builtin and then its argument prototype would still apply. */
9625 char gethostbyname ();
9634 rm -f conftest.$ac_objext conftest$ac_exeext
9635 if { (eval echo "$as_me:9635: \"$ac_link\"") >&5
9636 (eval $ac_link) 2>&5
9638 echo "$as_me:9638: \$? = $ac_status" >&5
9639 (exit $ac_status); } &&
9640 { ac_try='test -s conftest$ac_exeext'
9641 { (eval echo "$as_me:9641: \"$ac_try\"") >&5
9644 echo "$as_me:9644: \$? = $ac_status" >&5
9645 (exit $ac_status); }; }; then
9646 ac_cv_lib_bsd_gethostbyname=yes
9648 echo "$as_me: failed program was:" >&5
9649 cat conftest.$ac_ext >&5
9650 ac_cv_lib_bsd_gethostbyname=no
9652 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9653 LIBS=$ac_check_lib_save_LIBS
9655 echo "$as_me:9655: result: $ac_cv_lib_bsd_gethostbyname" >&5
9656 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
9657 if test $ac_cv_lib_bsd_gethostbyname = yes; then
9658 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
9664 # lieder@skyler.mavd.honeywell.com says without -lsocket,
9665 # socket/setsockopt and other routines are undefined under SCO ODT
9666 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
9667 # on later versions), says Simon Leinen: it contains gethostby*
9668 # variants that don't use the nameserver (or something). -lsocket
9669 # must be given before -lnsl if both are needed. We assume that
9670 # if connect needs -lnsl, so does gethostbyname.
9671 echo "$as_me:9671: checking for connect" >&5
9672 echo $ECHO_N "checking for connect... $ECHO_C" >&6
9673 if test "${ac_cv_func_connect+set}" = set; then
9674 echo $ECHO_N "(cached) $ECHO_C" >&6
9676 cat >conftest.$ac_ext <<_ACEOF
9677 #line 9677 "configure"
9678 #include "confdefs.h"
9679 /* System header to define __stub macros and hopefully few prototypes,
9680 which can conflict with char connect (); below. */
9682 /* Override any gcc2 internal prototype to avoid an error. */
9686 /* We use char because int might match the return type of a gcc2
9687 builtin and then its argument prototype would still apply. */
9694 /* The GNU C library defines this for functions which it implements
9695 to always fail with ENOSYS. Some functions are actually named
9696 something starting with __ and the normal name is an alias. */
9697 #if defined (__stub_connect) || defined (__stub___connect)
9700 f = connect; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9707 rm -f conftest.$ac_objext conftest$ac_exeext
9708 if { (eval echo "$as_me:9708: \"$ac_link\"") >&5
9709 (eval $ac_link) 2>&5
9711 echo "$as_me:9711: \$? = $ac_status" >&5
9712 (exit $ac_status); } &&
9713 { ac_try='test -s conftest$ac_exeext'
9714 { (eval echo "$as_me:9714: \"$ac_try\"") >&5
9717 echo "$as_me:9717: \$? = $ac_status" >&5
9718 (exit $ac_status); }; }; then
9719 ac_cv_func_connect=yes
9721 echo "$as_me: failed program was:" >&5
9722 cat conftest.$ac_ext >&5
9723 ac_cv_func_connect=no
9725 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9727 echo "$as_me:9727: result: $ac_cv_func_connect" >&5
9728 echo "${ECHO_T}$ac_cv_func_connect" >&6
9730 if test $ac_cv_func_connect = no; then
9731 echo "$as_me:9731: checking for connect in -lsocket" >&5
9732 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
9733 if test "${ac_cv_lib_socket_connect+set}" = set; then
9734 echo $ECHO_N "(cached) $ECHO_C" >&6
9736 ac_check_lib_save_LIBS=$LIBS
9737 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
9738 cat >conftest.$ac_ext <<_ACEOF
9739 #line 9739 "configure"
9740 #include "confdefs.h"
9742 /* Override any gcc2 internal prototype to avoid an error. */
9746 /* We use char because int might match the return type of a gcc2
9747 builtin and then its argument prototype would still apply. */
9757 rm -f conftest.$ac_objext conftest$ac_exeext
9758 if { (eval echo "$as_me:9758: \"$ac_link\"") >&5
9759 (eval $ac_link) 2>&5
9761 echo "$as_me:9761: \$? = $ac_status" >&5
9762 (exit $ac_status); } &&
9763 { ac_try='test -s conftest$ac_exeext'
9764 { (eval echo "$as_me:9764: \"$ac_try\"") >&5
9767 echo "$as_me:9767: \$? = $ac_status" >&5
9768 (exit $ac_status); }; }; then
9769 ac_cv_lib_socket_connect=yes
9771 echo "$as_me: failed program was:" >&5
9772 cat conftest.$ac_ext >&5
9773 ac_cv_lib_socket_connect=no
9775 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9776 LIBS=$ac_check_lib_save_LIBS
9778 echo "$as_me:9778: result: $ac_cv_lib_socket_connect" >&5
9779 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
9780 if test $ac_cv_lib_socket_connect = yes; then
9781 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
9786 # Guillermo Gomez says -lposix is necessary on A/UX.
9787 echo "$as_me:9787: checking for remove" >&5
9788 echo $ECHO_N "checking for remove... $ECHO_C" >&6
9789 if test "${ac_cv_func_remove+set}" = set; then
9790 echo $ECHO_N "(cached) $ECHO_C" >&6
9792 cat >conftest.$ac_ext <<_ACEOF
9793 #line 9793 "configure"
9794 #include "confdefs.h"
9795 /* System header to define __stub macros and hopefully few prototypes,
9796 which can conflict with char remove (); below. */
9798 /* Override any gcc2 internal prototype to avoid an error. */
9802 /* We use char because int might match the return type of a gcc2
9803 builtin and then its argument prototype would still apply. */
9810 /* The GNU C library defines this for functions which it implements
9811 to always fail with ENOSYS. Some functions are actually named
9812 something starting with __ and the normal name is an alias. */
9813 #if defined (__stub_remove) || defined (__stub___remove)
9816 f = remove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9823 rm -f conftest.$ac_objext conftest$ac_exeext
9824 if { (eval echo "$as_me:9824: \"$ac_link\"") >&5
9825 (eval $ac_link) 2>&5
9827 echo "$as_me:9827: \$? = $ac_status" >&5
9828 (exit $ac_status); } &&
9829 { ac_try='test -s conftest$ac_exeext'
9830 { (eval echo "$as_me:9830: \"$ac_try\"") >&5
9833 echo "$as_me:9833: \$? = $ac_status" >&5
9834 (exit $ac_status); }; }; then
9835 ac_cv_func_remove=yes
9837 echo "$as_me: failed program was:" >&5
9838 cat conftest.$ac_ext >&5
9839 ac_cv_func_remove=no
9841 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9843 echo "$as_me:9843: result: $ac_cv_func_remove" >&5
9844 echo "${ECHO_T}$ac_cv_func_remove" >&6
9846 if test $ac_cv_func_remove = no; then
9847 echo "$as_me:9847: checking for remove in -lposix" >&5
9848 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
9849 if test "${ac_cv_lib_posix_remove+set}" = set; then
9850 echo $ECHO_N "(cached) $ECHO_C" >&6
9852 ac_check_lib_save_LIBS=$LIBS
9853 LIBS="-lposix $LIBS"
9854 cat >conftest.$ac_ext <<_ACEOF
9855 #line 9855 "configure"
9856 #include "confdefs.h"
9858 /* Override any gcc2 internal prototype to avoid an error. */
9862 /* We use char because int might match the return type of a gcc2
9863 builtin and then its argument prototype would still apply. */
9873 rm -f conftest.$ac_objext conftest$ac_exeext
9874 if { (eval echo "$as_me:9874: \"$ac_link\"") >&5
9875 (eval $ac_link) 2>&5
9877 echo "$as_me:9877: \$? = $ac_status" >&5
9878 (exit $ac_status); } &&
9879 { ac_try='test -s conftest$ac_exeext'
9880 { (eval echo "$as_me:9880: \"$ac_try\"") >&5
9883 echo "$as_me:9883: \$? = $ac_status" >&5
9884 (exit $ac_status); }; }; then
9885 ac_cv_lib_posix_remove=yes
9887 echo "$as_me: failed program was:" >&5
9888 cat conftest.$ac_ext >&5
9889 ac_cv_lib_posix_remove=no
9891 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9892 LIBS=$ac_check_lib_save_LIBS
9894 echo "$as_me:9894: result: $ac_cv_lib_posix_remove" >&5
9895 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
9896 if test $ac_cv_lib_posix_remove = yes; then
9897 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
9902 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
9903 echo "$as_me:9903: checking for shmat" >&5
9904 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
9905 if test "${ac_cv_func_shmat+set}" = set; then
9906 echo $ECHO_N "(cached) $ECHO_C" >&6
9908 cat >conftest.$ac_ext <<_ACEOF
9909 #line 9909 "configure"
9910 #include "confdefs.h"
9911 /* System header to define __stub macros and hopefully few prototypes,
9912 which can conflict with char shmat (); below. */
9914 /* Override any gcc2 internal prototype to avoid an error. */
9918 /* We use char because int might match the return type of a gcc2
9919 builtin and then its argument prototype would still apply. */
9926 /* The GNU C library defines this for functions which it implements
9927 to always fail with ENOSYS. Some functions are actually named
9928 something starting with __ and the normal name is an alias. */
9929 #if defined (__stub_shmat) || defined (__stub___shmat)
9932 f = shmat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9939 rm -f conftest.$ac_objext conftest$ac_exeext
9940 if { (eval echo "$as_me:9940: \"$ac_link\"") >&5
9941 (eval $ac_link) 2>&5
9943 echo "$as_me:9943: \$? = $ac_status" >&5
9944 (exit $ac_status); } &&
9945 { ac_try='test -s conftest$ac_exeext'
9946 { (eval echo "$as_me:9946: \"$ac_try\"") >&5
9949 echo "$as_me:9949: \$? = $ac_status" >&5
9950 (exit $ac_status); }; }; then
9951 ac_cv_func_shmat=yes
9953 echo "$as_me: failed program was:" >&5
9954 cat conftest.$ac_ext >&5
9957 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9959 echo "$as_me:9959: result: $ac_cv_func_shmat" >&5
9960 echo "${ECHO_T}$ac_cv_func_shmat" >&6
9962 if test $ac_cv_func_shmat = no; then
9963 echo "$as_me:9963: checking for shmat in -lipc" >&5
9964 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
9965 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
9966 echo $ECHO_N "(cached) $ECHO_C" >&6
9968 ac_check_lib_save_LIBS=$LIBS
9970 cat >conftest.$ac_ext <<_ACEOF
9971 #line 9971 "configure"
9972 #include "confdefs.h"
9974 /* Override any gcc2 internal prototype to avoid an error. */
9978 /* We use char because int might match the return type of a gcc2
9979 builtin and then its argument prototype would still apply. */
9989 rm -f conftest.$ac_objext conftest$ac_exeext
9990 if { (eval echo "$as_me:9990: \"$ac_link\"") >&5
9991 (eval $ac_link) 2>&5
9993 echo "$as_me:9993: \$? = $ac_status" >&5
9994 (exit $ac_status); } &&
9995 { ac_try='test -s conftest$ac_exeext'
9996 { (eval echo "$as_me:9996: \"$ac_try\"") >&5
9999 echo "$as_me:9999: \$? = $ac_status" >&5
10000 (exit $ac_status); }; }; then
10001 ac_cv_lib_ipc_shmat=yes
10003 echo "$as_me: failed program was:" >&5
10004 cat conftest.$ac_ext >&5
10005 ac_cv_lib_ipc_shmat=no
10007 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10008 LIBS=$ac_check_lib_save_LIBS
10010 echo "$as_me:10010: result: $ac_cv_lib_ipc_shmat" >&5
10011 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
10012 if test $ac_cv_lib_ipc_shmat = yes; then
10013 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
10019 # Check for libraries that X11R6 Xt/Xaw programs need.
10020 ac_save_LDFLAGS=$LDFLAGS
10021 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
10022 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
10023 # check for ICE first), but we must link in the order -lSM -lICE or
10024 # we get undefined symbols. So assume we have SM if we have ICE.
10025 # These have to be linked with before -lX11, unlike the other
10026 # libraries we check for below, so use a different variable.
10027 # John Interrante, Karl Berry
10028 echo "$as_me:10028: checking for IceConnectionNumber in -lICE" >&5
10029 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
10030 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
10031 echo $ECHO_N "(cached) $ECHO_C" >&6
10033 ac_check_lib_save_LIBS=$LIBS
10034 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
10035 cat >conftest.$ac_ext <<_ACEOF
10036 #line 10036 "configure"
10037 #include "confdefs.h"
10039 /* Override any gcc2 internal prototype to avoid an error. */
10043 /* We use char because int might match the return type of a gcc2
10044 builtin and then its argument prototype would still apply. */
10045 char IceConnectionNumber ();
10049 IceConnectionNumber ();
10054 rm -f conftest.$ac_objext conftest$ac_exeext
10055 if { (eval echo "$as_me:10055: \"$ac_link\"") >&5
10056 (eval $ac_link) 2>&5
10058 echo "$as_me:10058: \$? = $ac_status" >&5
10059 (exit $ac_status); } &&
10060 { ac_try='test -s conftest$ac_exeext'
10061 { (eval echo "$as_me:10061: \"$ac_try\"") >&5
10062 (eval $ac_try) 2>&5
10064 echo "$as_me:10064: \$? = $ac_status" >&5
10065 (exit $ac_status); }; }; then
10066 ac_cv_lib_ICE_IceConnectionNumber=yes
10068 echo "$as_me: failed program was:" >&5
10069 cat conftest.$ac_ext >&5
10070 ac_cv_lib_ICE_IceConnectionNumber=no
10072 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10073 LIBS=$ac_check_lib_save_LIBS
10075 echo "$as_me:10075: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
10076 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
10077 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
10078 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
10081 LDFLAGS=$ac_save_LDFLAGS
10085 cf_x_athena=${cf_x_athena:-Xaw}
10087 echo "$as_me:10087: checking if you want to link with Xaw 3d library" >&5
10088 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
10091 # Check whether --with-Xaw3d or --without-Xaw3d was given.
10092 if test "${with_Xaw3d+set}" = set; then
10093 withval="$with_Xaw3d"
10096 if test "$withval" = yes ; then
10098 echo "$as_me:10098: result: yes" >&5
10099 echo "${ECHO_T}yes" >&6
10101 echo "$as_me:10101: result: no" >&5
10102 echo "${ECHO_T}no" >&6
10105 echo "$as_me:10105: checking if you want to link with Xaw 3d xft library" >&5
10106 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
10109 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
10110 if test "${with_Xaw3dxft+set}" = set; then
10111 withval="$with_Xaw3dxft"
10114 if test "$withval" = yes ; then
10115 cf_x_athena=Xaw3dxft
10116 echo "$as_me:10116: result: yes" >&5
10117 echo "${ECHO_T}yes" >&6
10119 echo "$as_me:10119: result: no" >&5
10120 echo "${ECHO_T}no" >&6
10123 echo "$as_me:10123: checking if you want to link with neXT Athena library" >&5
10124 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
10127 # Check whether --with-neXtaw or --without-neXtaw was given.
10128 if test "${with_neXtaw+set}" = set; then
10129 withval="$with_neXtaw"
10132 if test "$withval" = yes ; then
10134 echo "$as_me:10134: result: yes" >&5
10135 echo "${ECHO_T}yes" >&6
10137 echo "$as_me:10137: result: no" >&5
10138 echo "${ECHO_T}no" >&6
10141 echo "$as_me:10141: checking if you want to link with Athena-Plus library" >&5
10142 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
10145 # Check whether --with-XawPlus or --without-XawPlus was given.
10146 if test "${with_XawPlus+set}" = set; then
10147 withval="$with_XawPlus"
10150 if test "$withval" = yes ; then
10151 cf_x_athena=XawPlus
10152 echo "$as_me:10152: result: yes" >&5
10153 echo "${ECHO_T}yes" >&6
10155 echo "$as_me:10155: result: no" >&5
10156 echo "${ECHO_T}no" >&6
10161 if test "$PKG_CONFIG" != none ; then
10163 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
10164 for cf_athena_pkg in \
10167 ${cf_x_athena}-devel \
10168 lib${cf_x_athena} \
10169 lib${cf_x_athena}-devel
10172 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
10173 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
10175 echo "${as_me:-configure}:10175: testing found package $cf_athena_pkg ..." 1>&5
10177 cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
10178 cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
10179 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
10181 echo "${as_me:-configure}:10181: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10183 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
10185 echo "${as_me:-configure}:10185: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
10190 cf_new_extra_cppflags=
10192 for cf_add_cflags in $cf_pkgconfig_incs
10194 case $cf_fix_cppflags in
10196 case $cf_add_cflags in #(vi
10197 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10198 case $cf_add_cflags in
10200 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10202 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10203 && test -z "${cf_tst_cflags}" \
10204 && cf_fix_cppflags=yes
10206 if test $cf_fix_cppflags = yes ; then
10207 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10209 elif test "${cf_tst_cflags}" = "\"'" ; then
10210 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10215 case "$CPPFLAGS" in
10216 *$cf_add_cflags) #(vi
10219 case $cf_add_cflags in #(vi
10221 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10223 CPPFLAGS=`echo "$CPPFLAGS" | \
10224 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10225 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10229 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10234 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10239 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10241 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10243 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10244 && test -z "${cf_tst_cflags}" \
10245 && cf_fix_cppflags=no
10250 if test -n "$cf_new_cflags" ; then
10252 CFLAGS="$CFLAGS $cf_new_cflags"
10255 if test -n "$cf_new_cppflags" ; then
10257 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10260 if test -n "$cf_new_extra_cppflags" ; then
10262 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10265 cf_add_libs="$cf_pkgconfig_libs"
10266 # Filter out duplicates - this happens with badly-designed ".pc" files...
10267 for cf_add_1lib in $LIBS
10269 for cf_add_2lib in $cf_add_libs
10271 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10277 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10279 LIBS="$cf_add_libs"
10281 cf_x_athena_lib="$cf_pkgconfig_libs"
10283 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10285 cat >>confdefs.h <<EOF
10286 #define $cf_x_athena_LIBS 1
10289 for cf_trim_lib in Xmu Xt X11
10292 *-l$cf_trim_lib\ *-l$cf_trim_lib*)
10293 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
10294 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
10296 echo "${as_me:-configure}:10296: testing ..trimmed $LIBS ..." 1>&5
10302 echo "$as_me:10302: checking for usable $cf_x_athena/Xmu package" >&5
10303 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
10304 if test "${cf_cv_xaw_compat+set}" = set; then
10305 echo $ECHO_N "(cached) $ECHO_C" >&6
10308 cat >conftest.$ac_ext <<_ACEOF
10309 #line 10309 "configure"
10310 #include "confdefs.h"
10312 #include <X11/Xmu/CharSet.h>
10318 int check = XmuCompareISOLatin1("big", "small")
10324 rm -f conftest.$ac_objext conftest$ac_exeext
10325 if { (eval echo "$as_me:10325: \"$ac_link\"") >&5
10326 (eval $ac_link) 2>&5
10328 echo "$as_me:10328: \$? = $ac_status" >&5
10329 (exit $ac_status); } &&
10330 { ac_try='test -s conftest$ac_exeext'
10331 { (eval echo "$as_me:10331: \"$ac_try\"") >&5
10332 (eval $ac_try) 2>&5
10334 echo "$as_me:10334: \$? = $ac_status" >&5
10335 (exit $ac_status); }; }; then
10336 cf_cv_xaw_compat=yes
10338 echo "$as_me: failed program was:" >&5
10339 cat conftest.$ac_ext >&5
10340 cf_cv_xaw_compat=no
10342 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10344 echo "$as_me:10344: result: $cf_cv_xaw_compat" >&5
10345 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
10347 if test "$cf_cv_xaw_compat" = no
10349 # workaround for broken ".pc" files...
10350 case "$cf_x_athena_lib" in #(vi
10354 test -n "$verbose" && echo " work around broken package" 1>&6
10356 echo "${as_me:-configure}:10356: testing work around broken package ..." 1>&5
10358 cf_save_xmu="$LIBS"
10359 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
10361 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
10362 test -n "$verbose" && echo " found package xmu" 1>&6
10364 echo "${as_me:-configure}:10364: testing found package xmu ..." 1>&5
10366 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
10367 cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`"
10368 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
10370 echo "${as_me:-configure}:10370: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10372 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
10374 echo "${as_me:-configure}:10374: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
10379 cf_new_extra_cppflags=
10381 for cf_add_cflags in $cf_pkgconfig_incs
10383 case $cf_fix_cppflags in
10385 case $cf_add_cflags in #(vi
10386 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10387 case $cf_add_cflags in
10389 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10391 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10392 && test -z "${cf_tst_cflags}" \
10393 && cf_fix_cppflags=yes
10395 if test $cf_fix_cppflags = yes ; then
10396 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10398 elif test "${cf_tst_cflags}" = "\"'" ; then
10399 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10404 case "$CPPFLAGS" in
10405 *$cf_add_cflags) #(vi
10408 case $cf_add_cflags in #(vi
10410 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10412 CPPFLAGS=`echo "$CPPFLAGS" | \
10413 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10414 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10418 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10423 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10428 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10430 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10432 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10433 && test -z "${cf_tst_cflags}" \
10434 && cf_fix_cppflags=no
10439 if test -n "$cf_new_cflags" ; then
10441 CFLAGS="$CFLAGS $cf_new_cflags"
10444 if test -n "$cf_new_cppflags" ; then
10446 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10449 if test -n "$cf_new_extra_cppflags" ; then
10451 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10454 cf_add_libs="$cf_pkgconfig_libs"
10455 # Filter out duplicates - this happens with badly-designed ".pc" files...
10456 for cf_add_1lib in $LIBS
10458 for cf_add_2lib in $cf_add_libs
10460 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10466 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10468 LIBS="$cf_add_libs"
10470 LIBS="$cf_save_xmu"
10472 test -n "$verbose" && echo " ...before $LIBS" 1>&6
10474 echo "${as_me:-configure}:10474: testing ...before $LIBS ..." 1>&5
10476 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
10477 test -n "$verbose" && echo " ...after $LIBS" 1>&6
10479 echo "${as_me:-configure}:10479: testing ...after $LIBS ..." 1>&5
10485 test -n "$verbose" && echo " ...before $LIBS" 1>&6
10487 echo "${as_me:-configure}:10487: testing ...before $LIBS ..." 1>&5
10489 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
10490 test -n "$verbose" && echo " ...after $LIBS" 1>&6
10492 echo "${as_me:-configure}:10492: testing ...after $LIBS ..." 1>&5
10496 for cf_trim_lib in Xmu Xt X11
10499 *-l$cf_trim_lib\ *-l$cf_trim_lib*)
10500 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
10501 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
10503 echo "${as_me:-configure}:10503: testing ..trimmed $LIBS ..." 1>&5
10523 if test -z "$cf_x_athena_lib" ; then
10525 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
10526 test -n "$verbose" && echo " found package Xext" 1>&6
10528 echo "${as_me:-configure}:10528: testing found package Xext ..." 1>&5
10530 cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
10531 cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
10532 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
10534 echo "${as_me:-configure}:10534: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10536 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
10538 echo "${as_me:-configure}:10538: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
10543 cf_new_extra_cppflags=
10545 for cf_add_cflags in $cf_pkgconfig_incs
10547 case $cf_fix_cppflags in
10549 case $cf_add_cflags in #(vi
10550 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10551 case $cf_add_cflags in
10553 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10555 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10556 && test -z "${cf_tst_cflags}" \
10557 && cf_fix_cppflags=yes
10559 if test $cf_fix_cppflags = yes ; then
10560 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10562 elif test "${cf_tst_cflags}" = "\"'" ; then
10563 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10568 case "$CPPFLAGS" in
10569 *$cf_add_cflags) #(vi
10572 case $cf_add_cflags in #(vi
10574 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10576 CPPFLAGS=`echo "$CPPFLAGS" | \
10577 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10578 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10582 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10587 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10592 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10594 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10596 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10597 && test -z "${cf_tst_cflags}" \
10598 && cf_fix_cppflags=no
10603 if test -n "$cf_new_cflags" ; then
10605 CFLAGS="$CFLAGS $cf_new_cflags"
10608 if test -n "$cf_new_cppflags" ; then
10610 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10613 if test -n "$cf_new_extra_cppflags" ; then
10615 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10618 cf_add_libs="$cf_pkgconfig_libs"
10619 # Filter out duplicates - this happens with badly-designed ".pc" files...
10620 for cf_add_1lib in $LIBS
10622 for cf_add_2lib in $cf_add_libs
10624 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10630 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10632 LIBS="$cf_add_libs"
10639 echo "$as_me:10639: checking for XextCreateExtension in -lXext" >&5
10640 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
10641 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
10642 echo $ECHO_N "(cached) $ECHO_C" >&6
10644 ac_check_lib_save_LIBS=$LIBS
10645 LIBS="-lXext $LIBS"
10646 cat >conftest.$ac_ext <<_ACEOF
10647 #line 10647 "configure"
10648 #include "confdefs.h"
10650 /* Override any gcc2 internal prototype to avoid an error. */
10654 /* We use char because int might match the return type of a gcc2
10655 builtin and then its argument prototype would still apply. */
10656 char XextCreateExtension ();
10660 XextCreateExtension ();
10665 rm -f conftest.$ac_objext conftest$ac_exeext
10666 if { (eval echo "$as_me:10666: \"$ac_link\"") >&5
10667 (eval $ac_link) 2>&5
10669 echo "$as_me:10669: \$? = $ac_status" >&5
10670 (exit $ac_status); } &&
10671 { ac_try='test -s conftest$ac_exeext'
10672 { (eval echo "$as_me:10672: \"$ac_try\"") >&5
10673 (eval $ac_try) 2>&5
10675 echo "$as_me:10675: \$? = $ac_status" >&5
10676 (exit $ac_status); }; }; then
10677 ac_cv_lib_Xext_XextCreateExtension=yes
10679 echo "$as_me: failed program was:" >&5
10680 cat conftest.$ac_ext >&5
10681 ac_cv_lib_Xext_XextCreateExtension=no
10683 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10684 LIBS=$ac_check_lib_save_LIBS
10686 echo "$as_me:10686: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
10687 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
10688 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
10690 cf_add_libs="-lXext"
10691 # Filter out duplicates - this happens with badly-designed ".pc" files...
10692 for cf_add_1lib in $LIBS
10694 for cf_add_2lib in $cf_add_libs
10696 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10702 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10704 LIBS="$cf_add_libs"
10710 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
10711 # in some cases has installed dummy files in the former, other cases replaced
10712 # it with a link to the new location). This complicates the configure script.
10713 # Check for that pitfall, and recover using pkg-config
10715 # If none of these are set, the configuration is almost certainly broken.
10716 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
10719 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
10720 test -n "$verbose" && echo " found package x11" 1>&6
10722 echo "${as_me:-configure}:10722: testing found package x11 ..." 1>&5
10724 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
10725 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
10726 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
10728 echo "${as_me:-configure}:10728: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10730 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
10732 echo "${as_me:-configure}:10732: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
10737 cf_new_extra_cppflags=
10739 for cf_add_cflags in $cf_pkgconfig_incs
10741 case $cf_fix_cppflags in
10743 case $cf_add_cflags in #(vi
10744 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10745 case $cf_add_cflags in
10747 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10749 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10750 && test -z "${cf_tst_cflags}" \
10751 && cf_fix_cppflags=yes
10753 if test $cf_fix_cppflags = yes ; then
10754 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10756 elif test "${cf_tst_cflags}" = "\"'" ; then
10757 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10762 case "$CPPFLAGS" in
10763 *$cf_add_cflags) #(vi
10766 case $cf_add_cflags in #(vi
10768 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10770 CPPFLAGS=`echo "$CPPFLAGS" | \
10771 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10772 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10776 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10781 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10786 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10788 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10790 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10791 && test -z "${cf_tst_cflags}" \
10792 && cf_fix_cppflags=no
10797 if test -n "$cf_new_cflags" ; then
10799 CFLAGS="$CFLAGS $cf_new_cflags"
10802 if test -n "$cf_new_cppflags" ; then
10804 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10807 if test -n "$cf_new_extra_cppflags" ; then
10809 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10812 cf_add_libs="$cf_pkgconfig_libs"
10813 # Filter out duplicates - this happens with badly-designed ".pc" files...
10814 for cf_add_1lib in $LIBS
10816 for cf_add_2lib in $cf_add_libs
10818 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10824 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10826 LIBS="$cf_add_libs"
10832 { echo "$as_me:10832: WARNING: unable to find X11 library" >&5
10833 echo "$as_me: WARNING: unable to find X11 library" >&2;}
10836 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
10837 test -n "$verbose" && echo " found package ice" 1>&6
10839 echo "${as_me:-configure}:10839: testing found package ice ..." 1>&5
10841 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
10842 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
10843 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
10845 echo "${as_me:-configure}:10845: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10847 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
10849 echo "${as_me:-configure}:10849: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
10854 cf_new_extra_cppflags=
10856 for cf_add_cflags in $cf_pkgconfig_incs
10858 case $cf_fix_cppflags in
10860 case $cf_add_cflags in #(vi
10861 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10862 case $cf_add_cflags in
10864 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10866 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10867 && test -z "${cf_tst_cflags}" \
10868 && cf_fix_cppflags=yes
10870 if test $cf_fix_cppflags = yes ; then
10871 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10873 elif test "${cf_tst_cflags}" = "\"'" ; then
10874 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10879 case "$CPPFLAGS" in
10880 *$cf_add_cflags) #(vi
10883 case $cf_add_cflags in #(vi
10885 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10887 CPPFLAGS=`echo "$CPPFLAGS" | \
10888 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10889 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10893 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10898 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10903 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10905 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10907 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10908 && test -z "${cf_tst_cflags}" \
10909 && cf_fix_cppflags=no
10914 if test -n "$cf_new_cflags" ; then
10916 CFLAGS="$CFLAGS $cf_new_cflags"
10919 if test -n "$cf_new_cppflags" ; then
10921 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10924 if test -n "$cf_new_extra_cppflags" ; then
10926 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10929 cf_add_libs="$cf_pkgconfig_libs"
10930 # Filter out duplicates - this happens with badly-designed ".pc" files...
10931 for cf_add_1lib in $LIBS
10933 for cf_add_2lib in $cf_add_libs
10935 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10941 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10943 LIBS="$cf_add_libs"
10949 { echo "$as_me:10949: WARNING: unable to find ICE library" >&5
10950 echo "$as_me: WARNING: unable to find ICE library" >&2;}
10953 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
10954 test -n "$verbose" && echo " found package sm" 1>&6
10956 echo "${as_me:-configure}:10956: testing found package sm ..." 1>&5
10958 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
10959 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
10960 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
10962 echo "${as_me:-configure}:10962: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10964 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
10966 echo "${as_me:-configure}:10966: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
10971 cf_new_extra_cppflags=
10973 for cf_add_cflags in $cf_pkgconfig_incs
10975 case $cf_fix_cppflags in
10977 case $cf_add_cflags in #(vi
10978 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10979 case $cf_add_cflags in
10981 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10983 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10984 && test -z "${cf_tst_cflags}" \
10985 && cf_fix_cppflags=yes
10987 if test $cf_fix_cppflags = yes ; then
10988 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10990 elif test "${cf_tst_cflags}" = "\"'" ; then
10991 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10996 case "$CPPFLAGS" in
10997 *$cf_add_cflags) #(vi
11000 case $cf_add_cflags in #(vi
11002 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11004 CPPFLAGS=`echo "$CPPFLAGS" | \
11005 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11006 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11010 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11015 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11020 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11022 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11024 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11025 && test -z "${cf_tst_cflags}" \
11026 && cf_fix_cppflags=no
11031 if test -n "$cf_new_cflags" ; then
11033 CFLAGS="$CFLAGS $cf_new_cflags"
11036 if test -n "$cf_new_cppflags" ; then
11038 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11041 if test -n "$cf_new_extra_cppflags" ; then
11043 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11046 cf_add_libs="$cf_pkgconfig_libs"
11047 # Filter out duplicates - this happens with badly-designed ".pc" files...
11048 for cf_add_1lib in $LIBS
11050 for cf_add_2lib in $cf_add_libs
11052 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11058 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11060 LIBS="$cf_add_libs"
11066 { echo "$as_me:11066: WARNING: unable to find SM library" >&5
11067 echo "$as_me: WARNING: unable to find SM library" >&2;}
11070 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11071 test -n "$verbose" && echo " found package xt" 1>&6
11073 echo "${as_me:-configure}:11073: testing found package xt ..." 1>&5
11075 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11076 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
11077 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11079 echo "${as_me:-configure}:11079: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11081 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
11083 echo "${as_me:-configure}:11083: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11088 cf_new_extra_cppflags=
11090 for cf_add_cflags in $cf_pkgconfig_incs
11092 case $cf_fix_cppflags in
11094 case $cf_add_cflags in #(vi
11095 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11096 case $cf_add_cflags in
11098 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11100 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11101 && test -z "${cf_tst_cflags}" \
11102 && cf_fix_cppflags=yes
11104 if test $cf_fix_cppflags = yes ; then
11105 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11107 elif test "${cf_tst_cflags}" = "\"'" ; then
11108 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11113 case "$CPPFLAGS" in
11114 *$cf_add_cflags) #(vi
11117 case $cf_add_cflags in #(vi
11119 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11121 CPPFLAGS=`echo "$CPPFLAGS" | \
11122 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11123 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11127 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11132 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11137 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11139 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11141 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11142 && test -z "${cf_tst_cflags}" \
11143 && cf_fix_cppflags=no
11148 if test -n "$cf_new_cflags" ; then
11150 CFLAGS="$CFLAGS $cf_new_cflags"
11153 if test -n "$cf_new_cppflags" ; then
11155 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11158 if test -n "$cf_new_extra_cppflags" ; then
11160 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11163 cf_add_libs="$cf_pkgconfig_libs"
11164 # Filter out duplicates - this happens with badly-designed ".pc" files...
11165 for cf_add_1lib in $LIBS
11167 for cf_add_2lib in $cf_add_libs
11169 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11175 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11177 LIBS="$cf_add_libs"
11183 { echo "$as_me:11183: WARNING: unable to find Xt library" >&5
11184 echo "$as_me: WARNING: unable to find Xt library" >&2;}
11191 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11192 test -n "$verbose" && echo " found package xt" 1>&6
11194 echo "${as_me:-configure}:11194: testing found package xt ..." 1>&5
11196 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11197 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
11198 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11200 echo "${as_me:-configure}:11200: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11202 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
11204 echo "${as_me:-configure}:11204: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11209 cf_new_extra_cppflags=
11211 for cf_add_cflags in $cf_pkgconfig_incs
11213 case $cf_fix_cppflags in
11215 case $cf_add_cflags in #(vi
11216 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11217 case $cf_add_cflags in
11219 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11221 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11222 && test -z "${cf_tst_cflags}" \
11223 && cf_fix_cppflags=yes
11225 if test $cf_fix_cppflags = yes ; then
11226 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11228 elif test "${cf_tst_cflags}" = "\"'" ; then
11229 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11234 case "$CPPFLAGS" in
11235 *$cf_add_cflags) #(vi
11238 case $cf_add_cflags in #(vi
11240 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11242 CPPFLAGS=`echo "$CPPFLAGS" | \
11243 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11244 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11248 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11253 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11258 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11260 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11262 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11263 && test -z "${cf_tst_cflags}" \
11264 && cf_fix_cppflags=no
11269 if test -n "$cf_new_cflags" ; then
11271 CFLAGS="$CFLAGS $cf_new_cflags"
11274 if test -n "$cf_new_cppflags" ; then
11276 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11279 if test -n "$cf_new_extra_cppflags" ; then
11281 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11284 cf_add_libs="$cf_pkgconfig_libs"
11285 # Filter out duplicates - this happens with badly-designed ".pc" files...
11286 for cf_add_1lib in $LIBS
11288 for cf_add_2lib in $cf_add_libs
11290 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11296 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11298 LIBS="$cf_add_libs"
11300 case "x$LIBS" in #(vi
11304 # we have an "xt" package, but it may omit Xt's dependency on X11
11305 echo "$as_me:11305: checking for usable X dependency" >&5
11306 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
11307 if test "${cf_cv_xt_x11_compat+set}" = set; then
11308 echo $ECHO_N "(cached) $ECHO_C" >&6
11311 cat >conftest.$ac_ext <<_ACEOF
11312 #line 11312 "configure"
11313 #include "confdefs.h"
11315 #include <X11/Xlib.h>
11321 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
11322 int rc2 = XClearWindow((Display*) 0, (Window) 0);
11323 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
11324 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
11330 rm -f conftest.$ac_objext conftest$ac_exeext
11331 if { (eval echo "$as_me:11331: \"$ac_link\"") >&5
11332 (eval $ac_link) 2>&5
11334 echo "$as_me:11334: \$? = $ac_status" >&5
11335 (exit $ac_status); } &&
11336 { ac_try='test -s conftest$ac_exeext'
11337 { (eval echo "$as_me:11337: \"$ac_try\"") >&5
11338 (eval $ac_try) 2>&5
11340 echo "$as_me:11340: \$? = $ac_status" >&5
11341 (exit $ac_status); }; }; then
11342 cf_cv_xt_x11_compat=yes
11344 echo "$as_me: failed program was:" >&5
11345 cat conftest.$ac_ext >&5
11346 cf_cv_xt_x11_compat=no
11348 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11350 echo "$as_me:11350: result: $cf_cv_xt_x11_compat" >&5
11351 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
11352 if test "$cf_cv_xt_x11_compat" = no
11354 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
11356 echo "${as_me:-configure}:11356: testing work around broken X11 dependency ..." 1>&5
11358 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
11360 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11361 test -n "$verbose" && echo " found package x11" 1>&6
11363 echo "${as_me:-configure}:11363: testing found package x11 ..." 1>&5
11365 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11366 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
11367 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11369 echo "${as_me:-configure}:11369: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11371 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11373 echo "${as_me:-configure}:11373: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11378 cf_new_extra_cppflags=
11380 for cf_add_cflags in $cf_pkgconfig_incs
11382 case $cf_fix_cppflags in
11384 case $cf_add_cflags in #(vi
11385 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11386 case $cf_add_cflags in
11388 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11390 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11391 && test -z "${cf_tst_cflags}" \
11392 && cf_fix_cppflags=yes
11394 if test $cf_fix_cppflags = yes ; then
11395 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11397 elif test "${cf_tst_cflags}" = "\"'" ; then
11398 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11403 case "$CPPFLAGS" in
11404 *$cf_add_cflags) #(vi
11407 case $cf_add_cflags in #(vi
11409 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11411 CPPFLAGS=`echo "$CPPFLAGS" | \
11412 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11413 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11417 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11422 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11427 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11429 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11431 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11432 && test -z "${cf_tst_cflags}" \
11433 && cf_fix_cppflags=no
11438 if test -n "$cf_new_cflags" ; then
11440 CFLAGS="$CFLAGS $cf_new_cflags"
11443 if test -n "$cf_new_cppflags" ; then
11445 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11448 if test -n "$cf_new_extra_cppflags" ; then
11450 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11453 cf_add_libs="$cf_pkgconfig_libs"
11454 # Filter out duplicates - this happens with badly-designed ".pc" files...
11455 for cf_add_1lib in $LIBS
11457 for cf_add_2lib in $cf_add_libs
11459 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11465 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11467 LIBS="$cf_add_libs"
11474 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11476 echo "${as_me:-configure}:11476: testing ...before $LIBS ..." 1>&5
11478 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
11479 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11481 echo "${as_me:-configure}:11481: testing ...after $LIBS ..." 1>&5
11489 echo "$as_me:11489: checking for usable X Toolkit package" >&5
11490 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
11491 if test "${cf_cv_xt_ice_compat+set}" = set; then
11492 echo $ECHO_N "(cached) $ECHO_C" >&6
11495 cat >conftest.$ac_ext <<_ACEOF
11496 #line 11496 "configure"
11497 #include "confdefs.h"
11499 #include <X11/Shell.h>
11504 int num = IceConnectionNumber(0)
11510 rm -f conftest.$ac_objext conftest$ac_exeext
11511 if { (eval echo "$as_me:11511: \"$ac_link\"") >&5
11512 (eval $ac_link) 2>&5
11514 echo "$as_me:11514: \$? = $ac_status" >&5
11515 (exit $ac_status); } &&
11516 { ac_try='test -s conftest$ac_exeext'
11517 { (eval echo "$as_me:11517: \"$ac_try\"") >&5
11518 (eval $ac_try) 2>&5
11520 echo "$as_me:11520: \$? = $ac_status" >&5
11521 (exit $ac_status); }; }; then
11522 cf_cv_xt_ice_compat=yes
11524 echo "$as_me: failed program was:" >&5
11525 cat conftest.$ac_ext >&5
11526 cf_cv_xt_ice_compat=no
11528 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11530 echo "$as_me:11530: result: $cf_cv_xt_ice_compat" >&5
11531 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
11533 if test "$cf_cv_xt_ice_compat" = no
11535 # workaround for broken ".pc" files used for X Toolkit.
11536 case "x$X_PRE_LIBS" in #(vi
11538 case "x$LIBS" in #(vi
11542 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
11544 echo "${as_me:-configure}:11544: testing work around broken ICE dependency ..." 1>&5
11546 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11547 test -n "$verbose" && echo " found package ice" 1>&6
11549 echo "${as_me:-configure}:11549: testing found package ice ..." 1>&5
11551 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11552 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
11553 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11555 echo "${as_me:-configure}:11555: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11557 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
11559 echo "${as_me:-configure}:11559: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11564 cf_new_extra_cppflags=
11566 for cf_add_cflags in $cf_pkgconfig_incs
11568 case $cf_fix_cppflags in
11570 case $cf_add_cflags in #(vi
11571 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11572 case $cf_add_cflags in
11574 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11576 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11577 && test -z "${cf_tst_cflags}" \
11578 && cf_fix_cppflags=yes
11580 if test $cf_fix_cppflags = yes ; then
11581 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11583 elif test "${cf_tst_cflags}" = "\"'" ; then
11584 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11589 case "$CPPFLAGS" in
11590 *$cf_add_cflags) #(vi
11593 case $cf_add_cflags in #(vi
11595 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11597 CPPFLAGS=`echo "$CPPFLAGS" | \
11598 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11599 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11603 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11608 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11613 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11615 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11617 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11618 && test -z "${cf_tst_cflags}" \
11619 && cf_fix_cppflags=no
11624 if test -n "$cf_new_cflags" ; then
11626 CFLAGS="$CFLAGS $cf_new_cflags"
11629 if test -n "$cf_new_cppflags" ; then
11631 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11634 if test -n "$cf_new_extra_cppflags" ; then
11636 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11639 cf_add_libs="$cf_pkgconfig_libs"
11640 # Filter out duplicates - this happens with badly-designed ".pc" files...
11641 for cf_add_1lib in $LIBS
11643 for cf_add_2lib in $cf_add_libs
11645 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11651 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11653 LIBS="$cf_add_libs"
11655 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
11656 test -n "$verbose" && echo " found package sm" 1>&6
11658 echo "${as_me:-configure}:11658: testing found package sm ..." 1>&5
11660 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
11661 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
11662 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11664 echo "${as_me:-configure}:11664: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11666 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
11668 echo "${as_me:-configure}:11668: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11673 cf_new_extra_cppflags=
11675 for cf_add_cflags in $cf_pkgconfig_incs
11677 case $cf_fix_cppflags in
11679 case $cf_add_cflags in #(vi
11680 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11681 case $cf_add_cflags in
11683 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11685 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11686 && test -z "${cf_tst_cflags}" \
11687 && cf_fix_cppflags=yes
11689 if test $cf_fix_cppflags = yes ; then
11690 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11692 elif test "${cf_tst_cflags}" = "\"'" ; then
11693 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11698 case "$CPPFLAGS" in
11699 *$cf_add_cflags) #(vi
11702 case $cf_add_cflags in #(vi
11704 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11706 CPPFLAGS=`echo "$CPPFLAGS" | \
11707 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11708 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11712 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11717 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11722 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11724 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11726 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11727 && test -z "${cf_tst_cflags}" \
11728 && cf_fix_cppflags=no
11733 if test -n "$cf_new_cflags" ; then
11735 CFLAGS="$CFLAGS $cf_new_cflags"
11738 if test -n "$cf_new_cppflags" ; then
11740 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11743 if test -n "$cf_new_extra_cppflags" ; then
11745 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11748 cf_add_libs="$cf_pkgconfig_libs"
11749 # Filter out duplicates - this happens with badly-designed ".pc" files...
11750 for cf_add_1lib in $LIBS
11752 for cf_add_2lib in $cf_add_libs
11754 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11760 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11762 LIBS="$cf_add_libs"
11775 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11777 echo "${as_me:-configure}:11777: testing ...before $LIBS ..." 1>&5
11779 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
11780 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11782 echo "${as_me:-configure}:11782: testing ...after $LIBS ..." 1>&5
11798 LDFLAGS="$X_LIBS $LDFLAGS"
11800 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
11802 echo "${as_me:-configure}:11802: testing checking additions to CFLAGS ..." 1>&5
11804 cf_check_cflags="$CFLAGS"
11805 cf_check_cppflags="$CPPFLAGS"
11810 cf_new_extra_cppflags=
11812 for cf_add_cflags in $X_CFLAGS
11814 case $cf_fix_cppflags in
11816 case $cf_add_cflags in #(vi
11817 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11818 case $cf_add_cflags in
11820 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11822 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11823 && test -z "${cf_tst_cflags}" \
11824 && cf_fix_cppflags=yes
11826 if test $cf_fix_cppflags = yes ; then
11827 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11829 elif test "${cf_tst_cflags}" = "\"'" ; then
11830 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11835 case "$CPPFLAGS" in
11836 *$cf_add_cflags) #(vi
11839 case $cf_add_cflags in #(vi
11841 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11843 CPPFLAGS=`echo "$CPPFLAGS" | \
11844 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11845 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11849 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11854 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11859 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11861 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11863 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11864 && test -z "${cf_tst_cflags}" \
11865 && cf_fix_cppflags=no
11870 if test -n "$cf_new_cflags" ; then
11871 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
11873 echo "${as_me:-configure}:11873: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11875 CFLAGS="$CFLAGS $cf_new_cflags"
11878 if test -n "$cf_new_cppflags" ; then
11879 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11881 echo "${as_me:-configure}:11881: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11883 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11886 if test -n "$cf_new_extra_cppflags" ; then
11887 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11889 echo "${as_me:-configure}:11889: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11891 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11894 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
11895 cat >conftest.$ac_ext <<_ACEOF
11896 #line 11896 "configure"
11897 #include "confdefs.h"
11902 printf("Hello world");
11907 rm -f conftest.$ac_objext conftest$ac_exeext
11908 if { (eval echo "$as_me:11908: \"$ac_link\"") >&5
11909 (eval $ac_link) 2>&5
11911 echo "$as_me:11911: \$? = $ac_status" >&5
11912 (exit $ac_status); } &&
11913 { ac_try='test -s conftest$ac_exeext'
11914 { (eval echo "$as_me:11914: \"$ac_try\"") >&5
11915 (eval $ac_try) 2>&5
11917 echo "$as_me:11917: \$? = $ac_status" >&5
11918 (exit $ac_status); }; }; then
11921 echo "$as_me: failed program was:" >&5
11922 cat conftest.$ac_ext >&5
11923 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
11925 echo "${as_me:-configure}:11925: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
11927 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
11928 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
11930 echo "${as_me:-configure}:11930: testing but keeping change to \$CPPFLAGS ..." 1>&5
11933 CFLAGS="$cf_check_flags"
11935 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11938 echo "$as_me:11938: checking for XOpenDisplay" >&5
11939 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
11940 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
11941 echo $ECHO_N "(cached) $ECHO_C" >&6
11943 cat >conftest.$ac_ext <<_ACEOF
11944 #line 11944 "configure"
11945 #include "confdefs.h"
11946 /* System header to define __stub macros and hopefully few prototypes,
11947 which can conflict with char XOpenDisplay (); below. */
11948 #include <assert.h>
11949 /* Override any gcc2 internal prototype to avoid an error. */
11953 /* We use char because int might match the return type of a gcc2
11954 builtin and then its argument prototype would still apply. */
11955 char XOpenDisplay ();
11961 /* The GNU C library defines this for functions which it implements
11962 to always fail with ENOSYS. Some functions are actually named
11963 something starting with __ and the normal name is an alias. */
11964 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
11967 f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11974 rm -f conftest.$ac_objext conftest$ac_exeext
11975 if { (eval echo "$as_me:11975: \"$ac_link\"") >&5
11976 (eval $ac_link) 2>&5
11978 echo "$as_me:11978: \$? = $ac_status" >&5
11979 (exit $ac_status); } &&
11980 { ac_try='test -s conftest$ac_exeext'
11981 { (eval echo "$as_me:11981: \"$ac_try\"") >&5
11982 (eval $ac_try) 2>&5
11984 echo "$as_me:11984: \$? = $ac_status" >&5
11985 (exit $ac_status); }; }; then
11986 ac_cv_func_XOpenDisplay=yes
11988 echo "$as_me: failed program was:" >&5
11989 cat conftest.$ac_ext >&5
11990 ac_cv_func_XOpenDisplay=no
11992 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11994 echo "$as_me:11994: result: $ac_cv_func_XOpenDisplay" >&5
11995 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
11996 if test $ac_cv_func_XOpenDisplay = yes; then
12000 echo "$as_me:12000: checking for XOpenDisplay in -lX11" >&5
12001 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12002 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12003 echo $ECHO_N "(cached) $ECHO_C" >&6
12005 ac_check_lib_save_LIBS=$LIBS
12006 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12007 cat >conftest.$ac_ext <<_ACEOF
12008 #line 12008 "configure"
12009 #include "confdefs.h"
12011 /* Override any gcc2 internal prototype to avoid an error. */
12015 /* We use char because int might match the return type of a gcc2
12016 builtin and then its argument prototype would still apply. */
12017 char XOpenDisplay ();
12026 rm -f conftest.$ac_objext conftest$ac_exeext
12027 if { (eval echo "$as_me:12027: \"$ac_link\"") >&5
12028 (eval $ac_link) 2>&5
12030 echo "$as_me:12030: \$? = $ac_status" >&5
12031 (exit $ac_status); } &&
12032 { ac_try='test -s conftest$ac_exeext'
12033 { (eval echo "$as_me:12033: \"$ac_try\"") >&5
12034 (eval $ac_try) 2>&5
12036 echo "$as_me:12036: \$? = $ac_status" >&5
12037 (exit $ac_status); }; }; then
12038 ac_cv_lib_X11_XOpenDisplay=yes
12040 echo "$as_me: failed program was:" >&5
12041 cat conftest.$ac_ext >&5
12042 ac_cv_lib_X11_XOpenDisplay=no
12044 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12045 LIBS=$ac_check_lib_save_LIBS
12047 echo "$as_me:12047: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12048 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12049 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12051 cf_add_libs="-lX11"
12052 # Filter out duplicates - this happens with badly-designed ".pc" files...
12053 for cf_add_1lib in $LIBS
12055 for cf_add_2lib in $cf_add_libs
12057 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12063 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12065 LIBS="$cf_add_libs"
12071 echo "$as_me:12071: checking for XtAppInitialize" >&5
12072 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
12073 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
12074 echo $ECHO_N "(cached) $ECHO_C" >&6
12076 cat >conftest.$ac_ext <<_ACEOF
12077 #line 12077 "configure"
12078 #include "confdefs.h"
12079 /* System header to define __stub macros and hopefully few prototypes,
12080 which can conflict with char XtAppInitialize (); below. */
12081 #include <assert.h>
12082 /* Override any gcc2 internal prototype to avoid an error. */
12086 /* We use char because int might match the return type of a gcc2
12087 builtin and then its argument prototype would still apply. */
12088 char XtAppInitialize ();
12094 /* The GNU C library defines this for functions which it implements
12095 to always fail with ENOSYS. Some functions are actually named
12096 something starting with __ and the normal name is an alias. */
12097 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
12100 f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12107 rm -f conftest.$ac_objext conftest$ac_exeext
12108 if { (eval echo "$as_me:12108: \"$ac_link\"") >&5
12109 (eval $ac_link) 2>&5
12111 echo "$as_me:12111: \$? = $ac_status" >&5
12112 (exit $ac_status); } &&
12113 { ac_try='test -s conftest$ac_exeext'
12114 { (eval echo "$as_me:12114: \"$ac_try\"") >&5
12115 (eval $ac_try) 2>&5
12117 echo "$as_me:12117: \$? = $ac_status" >&5
12118 (exit $ac_status); }; }; then
12119 ac_cv_func_XtAppInitialize=yes
12121 echo "$as_me: failed program was:" >&5
12122 cat conftest.$ac_ext >&5
12123 ac_cv_func_XtAppInitialize=no
12125 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12127 echo "$as_me:12127: result: $ac_cv_func_XtAppInitialize" >&5
12128 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
12129 if test $ac_cv_func_XtAppInitialize = yes; then
12133 echo "$as_me:12133: checking for XtAppInitialize in -lXt" >&5
12134 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
12135 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
12136 echo $ECHO_N "(cached) $ECHO_C" >&6
12138 ac_check_lib_save_LIBS=$LIBS
12139 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12140 cat >conftest.$ac_ext <<_ACEOF
12141 #line 12141 "configure"
12142 #include "confdefs.h"
12144 /* Override any gcc2 internal prototype to avoid an error. */
12148 /* We use char because int might match the return type of a gcc2
12149 builtin and then its argument prototype would still apply. */
12150 char XtAppInitialize ();
12154 XtAppInitialize ();
12159 rm -f conftest.$ac_objext conftest$ac_exeext
12160 if { (eval echo "$as_me:12160: \"$ac_link\"") >&5
12161 (eval $ac_link) 2>&5
12163 echo "$as_me:12163: \$? = $ac_status" >&5
12164 (exit $ac_status); } &&
12165 { ac_try='test -s conftest$ac_exeext'
12166 { (eval echo "$as_me:12166: \"$ac_try\"") >&5
12167 (eval $ac_try) 2>&5
12169 echo "$as_me:12169: \$? = $ac_status" >&5
12170 (exit $ac_status); }; }; then
12171 ac_cv_lib_Xt_XtAppInitialize=yes
12173 echo "$as_me: failed program was:" >&5
12174 cat conftest.$ac_ext >&5
12175 ac_cv_lib_Xt_XtAppInitialize=no
12177 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12178 LIBS=$ac_check_lib_save_LIBS
12180 echo "$as_me:12180: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
12181 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
12182 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
12184 cat >>confdefs.h <<\EOF
12185 #define HAVE_LIBXT 1
12189 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
12196 if test $cf_have_X_LIBS = no ; then
12197 { echo "$as_me:12197: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12198 test program. You will have to check and add the proper libraries by hand
12200 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12201 test program. You will have to check and add the proper libraries by hand
12202 to makefile." >&2;}
12205 cf_x_athena_root=$cf_x_athena
12208 for cf_path in default \
12209 /usr/contrib/X11R6 \
12210 /usr/contrib/X11R5 \
12214 if test -z "$cf_x_athena_inc" ; then
12215 cf_save="$CPPFLAGS"
12216 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
12217 if test $cf_path != default ; then
12218 CPPFLAGS="$cf_save -I$cf_path/include"
12219 echo "$as_me:12219: checking for $cf_test in $cf_path" >&5
12220 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
12222 echo "$as_me:12222: checking for $cf_test" >&5
12223 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
12225 cat >conftest.$ac_ext <<_ACEOF
12226 #line 12226 "configure"
12227 #include "confdefs.h"
12229 #include <X11/Intrinsic.h>
12230 #include <$cf_test>
12239 rm -f conftest.$ac_objext
12240 if { (eval echo "$as_me:12240: \"$ac_compile\"") >&5
12241 (eval $ac_compile) 2>&5
12243 echo "$as_me:12243: \$? = $ac_status" >&5
12244 (exit $ac_status); } &&
12245 { ac_try='test -s conftest.$ac_objext'
12246 { (eval echo "$as_me:12246: \"$ac_try\"") >&5
12247 (eval $ac_try) 2>&5
12249 echo "$as_me:12249: \$? = $ac_status" >&5
12250 (exit $ac_status); }; }; then
12253 echo "$as_me: failed program was:" >&5
12254 cat conftest.$ac_ext >&5
12257 rm -f conftest.$ac_objext conftest.$ac_ext
12258 echo "$as_me:12258: result: $cf_result" >&5
12259 echo "${ECHO_T}$cf_result" >&6
12260 if test "$cf_result" = yes ; then
12261 cf_x_athena_inc=$cf_path
12264 CPPFLAGS="$cf_save"
12269 if test -z "$cf_x_athena_inc" ; then
12270 { echo "$as_me:12270: WARNING: Unable to successfully find Athena header files with test program" >&5
12271 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
12272 elif test "$cf_x_athena_inc" != default ; then
12273 CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
12276 cf_x_athena_root=$cf_x_athena
12279 for cf_path in default \
12280 /usr/contrib/X11R6 \
12281 /usr/contrib/X11R5 \
12286 ${cf_x_athena_root} \
12287 ${cf_x_athena_root}7 \
12288 ${cf_x_athena_root}6
12291 "-l$cf_lib -lXmu" \
12292 "-l$cf_lib -lXpm -lXmu" \
12293 "-l${cf_lib}_s -lXmu_s"
12295 if test -z "$cf_x_athena_lib" ; then
12297 cf_test=XawSimpleMenuAddGlobalActions
12298 if test $cf_path != default ; then
12300 cf_add_libs="-L$cf_path/lib $cf_libs"
12301 # Filter out duplicates - this happens with badly-designed ".pc" files...
12302 for cf_add_1lib in $LIBS
12304 for cf_add_2lib in $cf_add_libs
12306 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12312 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12314 LIBS="$cf_add_libs"
12316 echo "$as_me:12316: checking for $cf_libs in $cf_path" >&5
12317 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
12320 cf_add_libs="$cf_libs"
12321 # Filter out duplicates - this happens with badly-designed ".pc" files...
12322 for cf_add_1lib in $LIBS
12324 for cf_add_2lib in $cf_add_libs
12326 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12332 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12334 LIBS="$cf_add_libs"
12336 echo "$as_me:12336: checking for $cf_test in $cf_libs" >&5
12337 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
12339 cat >conftest.$ac_ext <<_ACEOF
12340 #line 12340 "configure"
12341 #include "confdefs.h"
12343 #include <X11/Intrinsic.h>
12344 #include <X11/$cf_x_athena_root/SimpleMenu.h>
12350 $cf_test((XtAppContext) 0)
12355 rm -f conftest.$ac_objext conftest$ac_exeext
12356 if { (eval echo "$as_me:12356: \"$ac_link\"") >&5
12357 (eval $ac_link) 2>&5
12359 echo "$as_me:12359: \$? = $ac_status" >&5
12360 (exit $ac_status); } &&
12361 { ac_try='test -s conftest$ac_exeext'
12362 { (eval echo "$as_me:12362: \"$ac_try\"") >&5
12363 (eval $ac_try) 2>&5
12365 echo "$as_me:12365: \$? = $ac_status" >&5
12366 (exit $ac_status); }; }; then
12369 echo "$as_me: failed program was:" >&5
12370 cat conftest.$ac_ext >&5
12373 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12374 echo "$as_me:12374: result: $cf_result" >&5
12375 echo "${ECHO_T}$cf_result" >&6
12376 if test "$cf_result" = yes ; then
12377 cf_x_athena_lib="$cf_libs"
12383 test -n "$cf_x_athena_lib" && break
12387 if test -z "$cf_x_athena_lib" ; then
12388 { { echo "$as_me:12388: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
12389 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
12390 { (exit 1); exit 1; }; }
12393 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12395 cat >>confdefs.h <<EOF
12396 #define $cf_x_athena_LIBS 1
12401 if test -n "$ac_tool_prefix"; then
12402 for ac_prog in xcurses-config
12404 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12405 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12406 echo "$as_me:12406: checking for $ac_word" >&5
12407 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12408 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
12409 echo $ECHO_N "(cached) $ECHO_C" >&6
12411 if test -n "$XCURSES_CONFIG"; then
12412 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
12414 ac_save_IFS=$IFS; IFS=$ac_path_separator
12416 for ac_dir in $ac_dummy; do
12418 test -z "$ac_dir" && ac_dir=.
12419 $as_executable_p "$ac_dir/$ac_word" || continue
12420 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
12421 echo "$as_me:12421: found $ac_dir/$ac_word" >&5
12427 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
12428 if test -n "$XCURSES_CONFIG"; then
12429 echo "$as_me:12429: result: $XCURSES_CONFIG" >&5
12430 echo "${ECHO_T}$XCURSES_CONFIG" >&6
12432 echo "$as_me:12432: result: no" >&5
12433 echo "${ECHO_T}no" >&6
12436 test -n "$XCURSES_CONFIG" && break
12439 if test -z "$XCURSES_CONFIG"; then
12440 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
12441 for ac_prog in xcurses-config
12443 # Extract the first word of "$ac_prog", so it can be a program name with args.
12444 set dummy $ac_prog; ac_word=$2
12445 echo "$as_me:12445: checking for $ac_word" >&5
12446 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12447 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
12448 echo $ECHO_N "(cached) $ECHO_C" >&6
12450 if test -n "$ac_ct_XCURSES_CONFIG"; then
12451 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
12453 ac_save_IFS=$IFS; IFS=$ac_path_separator
12455 for ac_dir in $ac_dummy; do
12457 test -z "$ac_dir" && ac_dir=.
12458 $as_executable_p "$ac_dir/$ac_word" || continue
12459 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
12460 echo "$as_me:12460: found $ac_dir/$ac_word" >&5
12466 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
12467 if test -n "$ac_ct_XCURSES_CONFIG"; then
12468 echo "$as_me:12468: result: $ac_ct_XCURSES_CONFIG" >&5
12469 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
12471 echo "$as_me:12471: result: no" >&5
12472 echo "${ECHO_T}no" >&6
12475 test -n "$ac_ct_XCURSES_CONFIG" && break
12477 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
12479 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
12482 if test "$XCURSES_CONFIG" != none ; then
12484 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
12486 cf_add_libs="`$XCURSES_CONFIG --libs`"
12487 # Filter out duplicates - this happens with badly-designed ".pc" files...
12488 for cf_add_1lib in $LIBS
12490 for cf_add_2lib in $cf_add_libs
12492 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12498 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12500 LIBS="$cf_add_libs"
12502 cf_cv_lib_XCurses=yes
12506 LDFLAGS="$LDFLAGS $X_LIBS"
12508 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
12510 echo "${as_me:-configure}:12510: testing checking additions to CFLAGS ..." 1>&5
12512 cf_check_cflags="$CFLAGS"
12513 cf_check_cppflags="$CPPFLAGS"
12518 cf_new_extra_cppflags=
12520 for cf_add_cflags in $X_CFLAGS
12522 case $cf_fix_cppflags in
12524 case $cf_add_cflags in #(vi
12525 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12526 case $cf_add_cflags in
12528 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12530 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12531 && test -z "${cf_tst_cflags}" \
12532 && cf_fix_cppflags=yes
12534 if test $cf_fix_cppflags = yes ; then
12535 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12537 elif test "${cf_tst_cflags}" = "\"'" ; then
12538 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12543 case "$CPPFLAGS" in
12544 *$cf_add_cflags) #(vi
12547 case $cf_add_cflags in #(vi
12549 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12551 CPPFLAGS=`echo "$CPPFLAGS" | \
12552 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12553 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12557 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12562 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12567 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12569 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12571 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12572 && test -z "${cf_tst_cflags}" \
12573 && cf_fix_cppflags=no
12578 if test -n "$cf_new_cflags" ; then
12579 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12581 echo "${as_me:-configure}:12581: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12583 CFLAGS="$CFLAGS $cf_new_cflags"
12586 if test -n "$cf_new_cppflags" ; then
12587 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12589 echo "${as_me:-configure}:12589: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12591 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12594 if test -n "$cf_new_extra_cppflags" ; then
12595 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12597 echo "${as_me:-configure}:12597: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12599 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12602 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
12603 cat >conftest.$ac_ext <<_ACEOF
12604 #line 12604 "configure"
12605 #include "confdefs.h"
12610 printf("Hello world");
12615 rm -f conftest.$ac_objext conftest$ac_exeext
12616 if { (eval echo "$as_me:12616: \"$ac_link\"") >&5
12617 (eval $ac_link) 2>&5
12619 echo "$as_me:12619: \$? = $ac_status" >&5
12620 (exit $ac_status); } &&
12621 { ac_try='test -s conftest$ac_exeext'
12622 { (eval echo "$as_me:12622: \"$ac_try\"") >&5
12623 (eval $ac_try) 2>&5
12625 echo "$as_me:12625: \$? = $ac_status" >&5
12626 (exit $ac_status); }; }; then
12629 echo "$as_me: failed program was:" >&5
12630 cat conftest.$ac_ext >&5
12631 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
12633 echo "${as_me:-configure}:12633: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
12635 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
12636 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
12638 echo "${as_me:-configure}:12638: testing but keeping change to \$CPPFLAGS ..." 1>&5
12641 CFLAGS="$cf_check_flags"
12643 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12646 echo "$as_me:12646: checking for XOpenDisplay in -lX11" >&5
12647 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12648 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12649 echo $ECHO_N "(cached) $ECHO_C" >&6
12651 ac_check_lib_save_LIBS=$LIBS
12652 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12653 cat >conftest.$ac_ext <<_ACEOF
12654 #line 12654 "configure"
12655 #include "confdefs.h"
12657 /* Override any gcc2 internal prototype to avoid an error. */
12661 /* We use char because int might match the return type of a gcc2
12662 builtin and then its argument prototype would still apply. */
12663 char XOpenDisplay ();
12672 rm -f conftest.$ac_objext conftest$ac_exeext
12673 if { (eval echo "$as_me:12673: \"$ac_link\"") >&5
12674 (eval $ac_link) 2>&5
12676 echo "$as_me:12676: \$? = $ac_status" >&5
12677 (exit $ac_status); } &&
12678 { ac_try='test -s conftest$ac_exeext'
12679 { (eval echo "$as_me:12679: \"$ac_try\"") >&5
12680 (eval $ac_try) 2>&5
12682 echo "$as_me:12682: \$? = $ac_status" >&5
12683 (exit $ac_status); }; }; then
12684 ac_cv_lib_X11_XOpenDisplay=yes
12686 echo "$as_me: failed program was:" >&5
12687 cat conftest.$ac_ext >&5
12688 ac_cv_lib_X11_XOpenDisplay=no
12690 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12691 LIBS=$ac_check_lib_save_LIBS
12693 echo "$as_me:12693: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12694 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12695 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12697 cf_add_libs="-lX11"
12698 # Filter out duplicates - this happens with badly-designed ".pc" files...
12699 for cf_add_1lib in $LIBS
12701 for cf_add_2lib in $cf_add_libs
12703 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12709 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12711 LIBS="$cf_add_libs"
12715 echo "$as_me:12715: checking for XCurses library" >&5
12716 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
12717 if test "${cf_cv_lib_XCurses+set}" = set; then
12718 echo $ECHO_N "(cached) $ECHO_C" >&6
12721 cf_add_libs="-lXCurses"
12722 # Filter out duplicates - this happens with badly-designed ".pc" files...
12723 for cf_add_1lib in $LIBS
12725 for cf_add_2lib in $cf_add_libs
12727 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12733 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12735 LIBS="$cf_add_libs"
12737 cat >conftest.$ac_ext <<_ACEOF
12738 #line 12738 "configure"
12739 #include "confdefs.h"
12741 #include <xcurses.h>
12742 char *XCursesProgramName = "test";
12752 rm -f conftest.$ac_objext conftest$ac_exeext
12753 if { (eval echo "$as_me:12753: \"$ac_link\"") >&5
12754 (eval $ac_link) 2>&5
12756 echo "$as_me:12756: \$? = $ac_status" >&5
12757 (exit $ac_status); } &&
12758 { ac_try='test -s conftest$ac_exeext'
12759 { (eval echo "$as_me:12759: \"$ac_try\"") >&5
12760 (eval $ac_try) 2>&5
12762 echo "$as_me:12762: \$? = $ac_status" >&5
12763 (exit $ac_status); }; }; then
12764 cf_cv_lib_XCurses=yes
12766 echo "$as_me: failed program was:" >&5
12767 cat conftest.$ac_ext >&5
12768 cf_cv_lib_XCurses=no
12770 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12773 echo "$as_me:12773: result: $cf_cv_lib_XCurses" >&5
12774 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
12778 if test $cf_cv_lib_XCurses = yes ; then
12780 cat >>confdefs.h <<\EOF
12784 cat >>confdefs.h <<\EOF
12788 echo "$as_me:12788: checking for xcurses.h" >&5
12789 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
12790 if test "${ac_cv_header_xcurses_h+set}" = set; then
12791 echo $ECHO_N "(cached) $ECHO_C" >&6
12793 cat >conftest.$ac_ext <<_ACEOF
12794 #line 12794 "configure"
12795 #include "confdefs.h"
12796 #include <xcurses.h>
12798 if { (eval echo "$as_me:12798: \"$ac_cpp conftest.$ac_ext\"") >&5
12799 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12801 egrep -v '^ *\+' conftest.er1 >conftest.err
12803 cat conftest.err >&5
12804 echo "$as_me:12804: \$? = $ac_status" >&5
12805 (exit $ac_status); } >/dev/null; then
12806 if test -s conftest.err; then
12807 ac_cpp_err=$ac_c_preproc_warn_flag
12814 if test -z "$ac_cpp_err"; then
12815 ac_cv_header_xcurses_h=yes
12817 echo "$as_me: failed program was:" >&5
12818 cat conftest.$ac_ext >&5
12819 ac_cv_header_xcurses_h=no
12821 rm -f conftest.err conftest.$ac_ext
12823 echo "$as_me:12823: result: $ac_cv_header_xcurses_h" >&5
12824 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
12825 if test $ac_cv_header_xcurses_h = yes; then
12827 cat >>confdefs.h <<\EOF
12828 #define HAVE_XCURSES 1
12834 { { echo "$as_me:12834: error: Cannot link with XCurses" >&5
12835 echo "$as_me: error: Cannot link with XCurses" >&2;}
12836 { (exit 1); exit 1; }; }
12842 case $cf_cv_screen in
12845 echo "$as_me:12845: checking for NetBSD form.h" >&5
12846 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
12847 if test "${cf_cv_netbsd_form_h+set}" = set; then
12848 echo $ECHO_N "(cached) $ECHO_C" >&6
12851 cat >conftest.$ac_ext <<_ACEOF
12852 #line 12852 "configure"
12853 #include "confdefs.h"
12855 #include <${cf_cv_ncurses_header:-curses.h}>
12863 int y = current_field(form)->cursor_ypos;
12864 int x = current_field(form)->cursor_xpos;
12870 rm -f conftest.$ac_objext
12871 if { (eval echo "$as_me:12871: \"$ac_compile\"") >&5
12872 (eval $ac_compile) 2>&5
12874 echo "$as_me:12874: \$? = $ac_status" >&5
12875 (exit $ac_status); } &&
12876 { ac_try='test -s conftest.$ac_objext'
12877 { (eval echo "$as_me:12877: \"$ac_try\"") >&5
12878 (eval $ac_try) 2>&5
12880 echo "$as_me:12880: \$? = $ac_status" >&5
12881 (exit $ac_status); }; }; then
12882 cf_cv_netbsd_form_h=yes
12885 echo "$as_me: failed program was:" >&5
12886 cat conftest.$ac_ext >&5
12887 cf_cv_netbsd_form_h=no
12889 rm -f conftest.$ac_objext conftest.$ac_ext
12892 echo "$as_me:12892: result: $cf_cv_netbsd_form_h" >&5
12893 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
12895 test "$cf_cv_netbsd_form_h" = yes &&
12896 cat >>confdefs.h <<\EOF
12897 #define HAVE_NETBSD_FORM_H 1
12900 echo "$as_me:12900: checking for NetBSD menu.h" >&5
12901 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
12902 if test "${cf_cv_netbsd_menu_h+set}" = set; then
12903 echo $ECHO_N "(cached) $ECHO_C" >&6
12906 cat >conftest.$ac_ext <<_ACEOF
12907 #line 12907 "configure"
12908 #include "confdefs.h"
12910 #include <${cf_cv_ncurses_header:-curses.h}>
12918 int y = menu->max_item_width;
12924 rm -f conftest.$ac_objext
12925 if { (eval echo "$as_me:12925: \"$ac_compile\"") >&5
12926 (eval $ac_compile) 2>&5
12928 echo "$as_me:12928: \$? = $ac_status" >&5
12929 (exit $ac_status); } &&
12930 { ac_try='test -s conftest.$ac_objext'
12931 { (eval echo "$as_me:12931: \"$ac_try\"") >&5
12932 (eval $ac_try) 2>&5
12934 echo "$as_me:12934: \$? = $ac_status" >&5
12935 (exit $ac_status); }; }; then
12936 cf_cv_netbsd_menu_h=yes
12939 echo "$as_me: failed program was:" >&5
12940 cat conftest.$ac_ext >&5
12941 cf_cv_netbsd_menu_h=no
12943 rm -f conftest.$ac_objext conftest.$ac_ext
12946 echo "$as_me:12946: result: $cf_cv_netbsd_menu_h" >&5
12947 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
12949 test "$cf_cv_netbsd_menu_h" = yes &&
12950 cat >>confdefs.h <<\EOF
12951 #define HAVE_NETBSD_MENU_H 1
12960 case $cf_cv_screen in #(vi
12964 # look for curses-related libraries
12965 : ${cf_panel_lib:=panel}
12966 : ${cf_menu_lib:=menu}
12967 : ${cf_form_lib:=form}
12969 as_ac_Lib=`echo "ac_cv_lib_$cf_panel_lib$cf_cv_libtype''_new_panel" | $as_tr_sh`
12970 echo "$as_me:12970: checking for new_panel in -l$cf_panel_lib$cf_cv_libtype" >&5
12971 echo $ECHO_N "checking for new_panel in -l$cf_panel_lib$cf_cv_libtype... $ECHO_C" >&6
12972 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12973 echo $ECHO_N "(cached) $ECHO_C" >&6
12975 ac_check_lib_save_LIBS=$LIBS
12976 LIBS="-l$cf_panel_lib$cf_cv_libtype $LIBS"
12977 cat >conftest.$ac_ext <<_ACEOF
12978 #line 12978 "configure"
12979 #include "confdefs.h"
12981 /* Override any gcc2 internal prototype to avoid an error. */
12985 /* We use char because int might match the return type of a gcc2
12986 builtin and then its argument prototype would still apply. */
12996 rm -f conftest.$ac_objext conftest$ac_exeext
12997 if { (eval echo "$as_me:12997: \"$ac_link\"") >&5
12998 (eval $ac_link) 2>&5
13000 echo "$as_me:13000: \$? = $ac_status" >&5
13001 (exit $ac_status); } &&
13002 { ac_try='test -s conftest$ac_exeext'
13003 { (eval echo "$as_me:13003: \"$ac_try\"") >&5
13004 (eval $ac_try) 2>&5
13006 echo "$as_me:13006: \$? = $ac_status" >&5
13007 (exit $ac_status); }; }; then
13008 eval "$as_ac_Lib=yes"
13010 echo "$as_me: failed program was:" >&5
13011 cat conftest.$ac_ext >&5
13012 eval "$as_ac_Lib=no"
13014 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13015 LIBS=$ac_check_lib_save_LIBS
13017 echo "$as_me:13017: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13018 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13019 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13020 cat >>confdefs.h <<EOF
13021 #define `echo "HAVE_LIB$cf_panel_lib$cf_cv_libtype" | $as_tr_cpp` 1
13024 LIBS="-l$cf_panel_lib$cf_cv_libtype $LIBS"
13028 as_ac_Lib=`echo "ac_cv_lib_$cf_menu_lib$cf_cv_libtype''_menu_driver" | $as_tr_sh`
13029 echo "$as_me:13029: checking for menu_driver in -l$cf_menu_lib$cf_cv_libtype" >&5
13030 echo $ECHO_N "checking for menu_driver in -l$cf_menu_lib$cf_cv_libtype... $ECHO_C" >&6
13031 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13032 echo $ECHO_N "(cached) $ECHO_C" >&6
13034 ac_check_lib_save_LIBS=$LIBS
13035 LIBS="-l$cf_menu_lib$cf_cv_libtype $LIBS"
13036 cat >conftest.$ac_ext <<_ACEOF
13037 #line 13037 "configure"
13038 #include "confdefs.h"
13040 /* Override any gcc2 internal prototype to avoid an error. */
13044 /* We use char because int might match the return type of a gcc2
13045 builtin and then its argument prototype would still apply. */
13046 char menu_driver ();
13055 rm -f conftest.$ac_objext conftest$ac_exeext
13056 if { (eval echo "$as_me:13056: \"$ac_link\"") >&5
13057 (eval $ac_link) 2>&5
13059 echo "$as_me:13059: \$? = $ac_status" >&5
13060 (exit $ac_status); } &&
13061 { ac_try='test -s conftest$ac_exeext'
13062 { (eval echo "$as_me:13062: \"$ac_try\"") >&5
13063 (eval $ac_try) 2>&5
13065 echo "$as_me:13065: \$? = $ac_status" >&5
13066 (exit $ac_status); }; }; then
13067 eval "$as_ac_Lib=yes"
13069 echo "$as_me: failed program was:" >&5
13070 cat conftest.$ac_ext >&5
13071 eval "$as_ac_Lib=no"
13073 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13074 LIBS=$ac_check_lib_save_LIBS
13076 echo "$as_me:13076: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13077 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13078 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13079 cat >>confdefs.h <<EOF
13080 #define `echo "HAVE_LIB$cf_menu_lib$cf_cv_libtype" | $as_tr_cpp` 1
13083 LIBS="-l$cf_menu_lib$cf_cv_libtype $LIBS"
13087 as_ac_Lib=`echo "ac_cv_lib_$cf_form_lib$cf_cv_libtype''_form_driver" | $as_tr_sh`
13088 echo "$as_me:13088: checking for form_driver in -l$cf_form_lib$cf_cv_libtype" >&5
13089 echo $ECHO_N "checking for form_driver in -l$cf_form_lib$cf_cv_libtype... $ECHO_C" >&6
13090 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13091 echo $ECHO_N "(cached) $ECHO_C" >&6
13093 ac_check_lib_save_LIBS=$LIBS
13094 LIBS="-l$cf_form_lib$cf_cv_libtype $LIBS"
13095 cat >conftest.$ac_ext <<_ACEOF
13096 #line 13096 "configure"
13097 #include "confdefs.h"
13099 /* Override any gcc2 internal prototype to avoid an error. */
13103 /* We use char because int might match the return type of a gcc2
13104 builtin and then its argument prototype would still apply. */
13105 char form_driver ();
13114 rm -f conftest.$ac_objext conftest$ac_exeext
13115 if { (eval echo "$as_me:13115: \"$ac_link\"") >&5
13116 (eval $ac_link) 2>&5
13118 echo "$as_me:13118: \$? = $ac_status" >&5
13119 (exit $ac_status); } &&
13120 { ac_try='test -s conftest$ac_exeext'
13121 { (eval echo "$as_me:13121: \"$ac_try\"") >&5
13122 (eval $ac_try) 2>&5
13124 echo "$as_me:13124: \$? = $ac_status" >&5
13125 (exit $ac_status); }; }; then
13126 eval "$as_ac_Lib=yes"
13128 echo "$as_me: failed program was:" >&5
13129 cat conftest.$ac_ext >&5
13130 eval "$as_ac_Lib=no"
13132 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13133 LIBS=$ac_check_lib_save_LIBS
13135 echo "$as_me:13135: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13136 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13137 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13138 cat >>confdefs.h <<EOF
13139 #define `echo "HAVE_LIB$cf_form_lib$cf_cv_libtype" | $as_tr_cpp` 1
13142 LIBS="-l$cf_form_lib$cf_cv_libtype $LIBS"
13146 # look for curses-related headers
13157 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13158 echo "$as_me:13158: checking for $ac_header" >&5
13159 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13160 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13161 echo $ECHO_N "(cached) $ECHO_C" >&6
13163 cat >conftest.$ac_ext <<_ACEOF
13164 #line 13164 "configure"
13165 #include "confdefs.h"
13166 #include <$ac_header>
13168 if { (eval echo "$as_me:13168: \"$ac_cpp conftest.$ac_ext\"") >&5
13169 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13171 egrep -v '^ *\+' conftest.er1 >conftest.err
13173 cat conftest.err >&5
13174 echo "$as_me:13174: \$? = $ac_status" >&5
13175 (exit $ac_status); } >/dev/null; then
13176 if test -s conftest.err; then
13177 ac_cpp_err=$ac_c_preproc_warn_flag
13184 if test -z "$ac_cpp_err"; then
13185 eval "$as_ac_Header=yes"
13187 echo "$as_me: failed program was:" >&5
13188 cat conftest.$ac_ext >&5
13189 eval "$as_ac_Header=no"
13191 rm -f conftest.err conftest.$ac_ext
13193 echo "$as_me:13193: result: `eval echo '${'$as_ac_Header'}'`" >&5
13194 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13195 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13196 cat >>confdefs.h <<EOF
13197 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13206 echo "$as_me:13206: checking for ANSI C header files" >&5
13207 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13208 if test "${ac_cv_header_stdc+set}" = set; then
13209 echo $ECHO_N "(cached) $ECHO_C" >&6
13211 cat >conftest.$ac_ext <<_ACEOF
13212 #line 13212 "configure"
13213 #include "confdefs.h"
13214 #include <stdlib.h>
13215 #include <stdarg.h>
13216 #include <string.h>
13220 if { (eval echo "$as_me:13220: \"$ac_cpp conftest.$ac_ext\"") >&5
13221 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13223 egrep -v '^ *\+' conftest.er1 >conftest.err
13225 cat conftest.err >&5
13226 echo "$as_me:13226: \$? = $ac_status" >&5
13227 (exit $ac_status); } >/dev/null; then
13228 if test -s conftest.err; then
13229 ac_cpp_err=$ac_c_preproc_warn_flag
13236 if test -z "$ac_cpp_err"; then
13237 ac_cv_header_stdc=yes
13239 echo "$as_me: failed program was:" >&5
13240 cat conftest.$ac_ext >&5
13241 ac_cv_header_stdc=no
13243 rm -f conftest.err conftest.$ac_ext
13245 if test $ac_cv_header_stdc = yes; then
13246 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13247 cat >conftest.$ac_ext <<_ACEOF
13248 #line 13248 "configure"
13249 #include "confdefs.h"
13250 #include <string.h>
13253 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13254 egrep "memchr" >/dev/null 2>&1; then
13257 ac_cv_header_stdc=no
13263 if test $ac_cv_header_stdc = yes; then
13264 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13265 cat >conftest.$ac_ext <<_ACEOF
13266 #line 13266 "configure"
13267 #include "confdefs.h"
13268 #include <stdlib.h>
13271 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13272 egrep "free" >/dev/null 2>&1; then
13275 ac_cv_header_stdc=no
13281 if test $ac_cv_header_stdc = yes; then
13282 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13283 if test "$cross_compiling" = yes; then
13286 cat >conftest.$ac_ext <<_ACEOF
13287 #line 13287 "configure"
13288 #include "confdefs.h"
13290 #if ((' ' & 0x0FF) == 0x020)
13291 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13292 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13294 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13295 || ('j' <= (c) && (c) <= 'r') \
13296 || ('s' <= (c) && (c) <= 'z'))
13297 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13300 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13305 for (i = 0; i < 256; i++)
13306 if (XOR (islower (i), ISLOWER (i))
13307 || toupper (i) != TOUPPER (i))
13308 $ac_main_return(2);
13309 $ac_main_return (0);
13312 rm -f conftest$ac_exeext
13313 if { (eval echo "$as_me:13313: \"$ac_link\"") >&5
13314 (eval $ac_link) 2>&5
13316 echo "$as_me:13316: \$? = $ac_status" >&5
13317 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13318 { (eval echo "$as_me:13318: \"$ac_try\"") >&5
13319 (eval $ac_try) 2>&5
13321 echo "$as_me:13321: \$? = $ac_status" >&5
13322 (exit $ac_status); }; }; then
13325 echo "$as_me: program exited with status $ac_status" >&5
13326 echo "$as_me: failed program was:" >&5
13327 cat conftest.$ac_ext >&5
13328 ac_cv_header_stdc=no
13330 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13334 echo "$as_me:13334: result: $ac_cv_header_stdc" >&5
13335 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13336 if test $ac_cv_header_stdc = yes; then
13338 cat >>confdefs.h <<\EOF
13339 #define STDC_HEADERS 1
13344 echo "$as_me:13344: checking whether time.h and sys/time.h may both be included" >&5
13345 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13346 if test "${ac_cv_header_time+set}" = set; then
13347 echo $ECHO_N "(cached) $ECHO_C" >&6
13349 cat >conftest.$ac_ext <<_ACEOF
13350 #line 13350 "configure"
13351 #include "confdefs.h"
13352 #include <sys/types.h>
13353 #include <sys/time.h>
13359 if ((struct tm *) 0)
13365 rm -f conftest.$ac_objext
13366 if { (eval echo "$as_me:13366: \"$ac_compile\"") >&5
13367 (eval $ac_compile) 2>&5
13369 echo "$as_me:13369: \$? = $ac_status" >&5
13370 (exit $ac_status); } &&
13371 { ac_try='test -s conftest.$ac_objext'
13372 { (eval echo "$as_me:13372: \"$ac_try\"") >&5
13373 (eval $ac_try) 2>&5
13375 echo "$as_me:13375: \$? = $ac_status" >&5
13376 (exit $ac_status); }; }; then
13377 ac_cv_header_time=yes
13379 echo "$as_me: failed program was:" >&5
13380 cat conftest.$ac_ext >&5
13381 ac_cv_header_time=no
13383 rm -f conftest.$ac_objext conftest.$ac_ext
13385 echo "$as_me:13385: result: $ac_cv_header_time" >&5
13386 echo "${ECHO_T}$ac_cv_header_time" >&6
13387 if test $ac_cv_header_time = yes; then
13389 cat >>confdefs.h <<\EOF
13390 #define TIME_WITH_SYS_TIME 1
13407 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13408 echo "$as_me:13408: checking for $ac_header" >&5
13409 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13410 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13411 echo $ECHO_N "(cached) $ECHO_C" >&6
13413 cat >conftest.$ac_ext <<_ACEOF
13414 #line 13414 "configure"
13415 #include "confdefs.h"
13416 #include <$ac_header>
13418 if { (eval echo "$as_me:13418: \"$ac_cpp conftest.$ac_ext\"") >&5
13419 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13421 egrep -v '^ *\+' conftest.er1 >conftest.err
13423 cat conftest.err >&5
13424 echo "$as_me:13424: \$? = $ac_status" >&5
13425 (exit $ac_status); } >/dev/null; then
13426 if test -s conftest.err; then
13427 ac_cpp_err=$ac_c_preproc_warn_flag
13434 if test -z "$ac_cpp_err"; then
13435 eval "$as_ac_Header=yes"
13437 echo "$as_me: failed program was:" >&5
13438 cat conftest.$ac_ext >&5
13439 eval "$as_ac_Header=no"
13441 rm -f conftest.err conftest.$ac_ext
13443 echo "$as_me:13443: result: `eval echo '${'$as_ac_Header'}'`" >&5
13444 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13445 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13446 cat >>confdefs.h <<EOF
13447 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13453 for ac_header in unistd.h getopt.h
13455 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13456 echo "$as_me:13456: checking for $ac_header" >&5
13457 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13458 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13459 echo $ECHO_N "(cached) $ECHO_C" >&6
13461 cat >conftest.$ac_ext <<_ACEOF
13462 #line 13462 "configure"
13463 #include "confdefs.h"
13464 #include <$ac_header>
13466 if { (eval echo "$as_me:13466: \"$ac_cpp conftest.$ac_ext\"") >&5
13467 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13469 egrep -v '^ *\+' conftest.er1 >conftest.err
13471 cat conftest.err >&5
13472 echo "$as_me:13472: \$? = $ac_status" >&5
13473 (exit $ac_status); } >/dev/null; then
13474 if test -s conftest.err; then
13475 ac_cpp_err=$ac_c_preproc_warn_flag
13482 if test -z "$ac_cpp_err"; then
13483 eval "$as_ac_Header=yes"
13485 echo "$as_me: failed program was:" >&5
13486 cat conftest.$ac_ext >&5
13487 eval "$as_ac_Header=no"
13489 rm -f conftest.err conftest.$ac_ext
13491 echo "$as_me:13491: result: `eval echo '${'$as_ac_Header'}'`" >&5
13492 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13493 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13494 cat >>confdefs.h <<EOF
13495 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13501 echo "$as_me:13501: checking for header declaring getopt variables" >&5
13502 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
13503 if test "${cf_cv_getopt_header+set}" = set; then
13504 echo $ECHO_N "(cached) $ECHO_C" >&6
13507 cf_cv_getopt_header=none
13508 for cf_header in stdio.h stdlib.h unistd.h getopt.h
13510 cat >conftest.$ac_ext <<_ACEOF
13511 #line 13511 "configure"
13512 #include "confdefs.h"
13514 #include <$cf_header>
13518 int x = optind; char *y = optarg
13523 rm -f conftest.$ac_objext
13524 if { (eval echo "$as_me:13524: \"$ac_compile\"") >&5
13525 (eval $ac_compile) 2>&5
13527 echo "$as_me:13527: \$? = $ac_status" >&5
13528 (exit $ac_status); } &&
13529 { ac_try='test -s conftest.$ac_objext'
13530 { (eval echo "$as_me:13530: \"$ac_try\"") >&5
13531 (eval $ac_try) 2>&5
13533 echo "$as_me:13533: \$? = $ac_status" >&5
13534 (exit $ac_status); }; }; then
13535 cf_cv_getopt_header=$cf_header
13538 echo "$as_me: failed program was:" >&5
13539 cat conftest.$ac_ext >&5
13541 rm -f conftest.$ac_objext conftest.$ac_ext
13545 echo "$as_me:13545: result: $cf_cv_getopt_header" >&5
13546 echo "${ECHO_T}$cf_cv_getopt_header" >&6
13547 if test $cf_cv_getopt_header != none ; then
13549 cat >>confdefs.h <<\EOF
13550 #define HAVE_GETOPT_HEADER 1
13554 if test $cf_cv_getopt_header = getopt.h ; then
13556 cat >>confdefs.h <<\EOF
13557 #define NEED_GETOPT_H 1
13566 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13567 echo "$as_me:13567: checking for $ac_func" >&5
13568 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13569 if eval "test \"\${$as_ac_var+set}\" = set"; then
13570 echo $ECHO_N "(cached) $ECHO_C" >&6
13572 cat >conftest.$ac_ext <<_ACEOF
13573 #line 13573 "configure"
13574 #include "confdefs.h"
13575 /* System header to define __stub macros and hopefully few prototypes,
13576 which can conflict with char $ac_func (); below. */
13577 #include <assert.h>
13578 /* Override any gcc2 internal prototype to avoid an error. */
13582 /* We use char because int might match the return type of a gcc2
13583 builtin and then its argument prototype would still apply. */
13590 /* The GNU C library defines this for functions which it implements
13591 to always fail with ENOSYS. Some functions are actually named
13592 something starting with __ and the normal name is an alias. */
13593 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13596 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13603 rm -f conftest.$ac_objext conftest$ac_exeext
13604 if { (eval echo "$as_me:13604: \"$ac_link\"") >&5
13605 (eval $ac_link) 2>&5
13607 echo "$as_me:13607: \$? = $ac_status" >&5
13608 (exit $ac_status); } &&
13609 { ac_try='test -s conftest$ac_exeext'
13610 { (eval echo "$as_me:13610: \"$ac_try\"") >&5
13611 (eval $ac_try) 2>&5
13613 echo "$as_me:13613: \$? = $ac_status" >&5
13614 (exit $ac_status); }; }; then
13615 eval "$as_ac_var=yes"
13617 echo "$as_me: failed program was:" >&5
13618 cat conftest.$ac_ext >&5
13619 eval "$as_ac_var=no"
13621 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13623 echo "$as_me:13623: result: `eval echo '${'$as_ac_var'}'`" >&5
13624 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13625 if test `eval echo '${'$as_ac_var'}'` = yes; then
13626 cat >>confdefs.h <<EOF
13627 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13633 if test "$cf_enable_widec" = yes; then
13646 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13647 echo "$as_me:13647: checking for $ac_func" >&5
13648 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13649 if eval "test \"\${$as_ac_var+set}\" = set"; then
13650 echo $ECHO_N "(cached) $ECHO_C" >&6
13652 cat >conftest.$ac_ext <<_ACEOF
13653 #line 13653 "configure"
13654 #include "confdefs.h"
13655 /* System header to define __stub macros and hopefully few prototypes,
13656 which can conflict with char $ac_func (); below. */
13657 #include <assert.h>
13658 /* Override any gcc2 internal prototype to avoid an error. */
13662 /* We use char because int might match the return type of a gcc2
13663 builtin and then its argument prototype would still apply. */
13670 /* The GNU C library defines this for functions which it implements
13671 to always fail with ENOSYS. Some functions are actually named
13672 something starting with __ and the normal name is an alias. */
13673 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13676 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13683 rm -f conftest.$ac_objext conftest$ac_exeext
13684 if { (eval echo "$as_me:13684: \"$ac_link\"") >&5
13685 (eval $ac_link) 2>&5
13687 echo "$as_me:13687: \$? = $ac_status" >&5
13688 (exit $ac_status); } &&
13689 { ac_try='test -s conftest$ac_exeext'
13690 { (eval echo "$as_me:13690: \"$ac_try\"") >&5
13691 (eval $ac_try) 2>&5
13693 echo "$as_me:13693: \$? = $ac_status" >&5
13694 (exit $ac_status); }; }; then
13695 eval "$as_ac_var=yes"
13697 echo "$as_me: failed program was:" >&5
13698 cat conftest.$ac_ext >&5
13699 eval "$as_ac_var=no"
13701 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13703 echo "$as_me:13703: result: `eval echo '${'$as_ac_var'}'`" >&5
13704 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13705 if test `eval echo '${'$as_ac_var'}'` = yes; then
13706 cat >>confdefs.h <<EOF
13707 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13715 echo "$as_me:13715: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
13716 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
13717 if test "${cf_cv_need_xopen_extension+set}" = set; then
13718 echo $ECHO_N "(cached) $ECHO_C" >&6
13721 cat >conftest.$ac_ext <<_ACEOF
13722 #line 13722 "configure"
13723 #include "confdefs.h"
13725 #include <stdlib.h>
13726 #include <${cf_cv_ncurses_header:-curses.h}>
13731 #if defined(NCURSES_VERSION_PATCH)
13732 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
13736 long x = winnstr(stdscr, "", 0);
13738 getbegyx(stdscr, y1, x1)
13743 rm -f conftest.$ac_objext conftest$ac_exeext
13744 if { (eval echo "$as_me:13744: \"$ac_link\"") >&5
13745 (eval $ac_link) 2>&5
13747 echo "$as_me:13747: \$? = $ac_status" >&5
13748 (exit $ac_status); } &&
13749 { ac_try='test -s conftest$ac_exeext'
13750 { (eval echo "$as_me:13750: \"$ac_try\"") >&5
13751 (eval $ac_try) 2>&5
13753 echo "$as_me:13753: \$? = $ac_status" >&5
13754 (exit $ac_status); }; }; then
13755 cf_cv_need_xopen_extension=no
13757 echo "$as_me: failed program was:" >&5
13758 cat conftest.$ac_ext >&5
13759 cat >conftest.$ac_ext <<_ACEOF
13760 #line 13760 "configure"
13761 #include "confdefs.h"
13763 #define _XOPEN_SOURCE_EXTENDED
13764 #include <stdlib.h>
13765 #include <${cf_cv_ncurses_header:-curses.h}>
13770 #ifdef NCURSES_VERSION
13772 int check2 = curs_set((int)sizeof(check));
13774 long x = winnstr(stdscr, "", 0);
13776 getbegyx(stdscr, y1, x1)
13781 rm -f conftest.$ac_objext conftest$ac_exeext
13782 if { (eval echo "$as_me:13782: \"$ac_link\"") >&5
13783 (eval $ac_link) 2>&5
13785 echo "$as_me:13785: \$? = $ac_status" >&5
13786 (exit $ac_status); } &&
13787 { ac_try='test -s conftest$ac_exeext'
13788 { (eval echo "$as_me:13788: \"$ac_try\"") >&5
13789 (eval $ac_try) 2>&5
13791 echo "$as_me:13791: \$? = $ac_status" >&5
13792 (exit $ac_status); }; }; then
13793 cf_cv_need_xopen_extension=yes
13795 echo "$as_me: failed program was:" >&5
13796 cat conftest.$ac_ext >&5
13797 cf_cv_need_xopen_extension=unknown
13799 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13801 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13803 echo "$as_me:13803: result: $cf_cv_need_xopen_extension" >&5
13804 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
13805 test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
13807 echo "$as_me:13807: checking for term.h" >&5
13808 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
13809 if test "${cf_cv_term_header+set}" = set; then
13810 echo $ECHO_N "(cached) $ECHO_C" >&6
13813 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
13814 # for <term.h> if we do not find the variant.
13816 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
13818 case ${cf_cv_ncurses_header:-curses.h} in #(vi
13820 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
13821 cf_header_list="$cf_header_item $cf_header_list"
13825 for cf_header in $cf_header_list
13827 cat >conftest.$ac_ext <<_ACEOF
13828 #line 13828 "configure"
13829 #include "confdefs.h"
13831 #include <${cf_cv_ncurses_header:-curses.h}>
13832 #include <${cf_header}>
13841 rm -f conftest.$ac_objext
13842 if { (eval echo "$as_me:13842: \"$ac_compile\"") >&5
13843 (eval $ac_compile) 2>&5
13845 echo "$as_me:13845: \$? = $ac_status" >&5
13846 (exit $ac_status); } &&
13847 { ac_try='test -s conftest.$ac_objext'
13848 { (eval echo "$as_me:13848: \"$ac_try\"") >&5
13849 (eval $ac_try) 2>&5
13851 echo "$as_me:13851: \$? = $ac_status" >&5
13852 (exit $ac_status); }; }; then
13853 cf_cv_term_header=$cf_header
13856 echo "$as_me: failed program was:" >&5
13857 cat conftest.$ac_ext >&5
13858 cf_cv_term_header=no
13860 rm -f conftest.$ac_objext conftest.$ac_ext
13863 case $cf_cv_term_header in #(vi
13865 # If curses is ncurses, some packagers still mess it up by trying to make
13866 # us use GNU termcap. This handles the most common case.
13867 for cf_header in ncurses/term.h ncursesw/term.h
13869 cat >conftest.$ac_ext <<_ACEOF
13870 #line 13870 "configure"
13871 #include "confdefs.h"
13873 #include <${cf_cv_ncurses_header:-curses.h}>
13874 #ifdef NCURSES_VERSION
13875 #include <${cf_header}>
13887 rm -f conftest.$ac_objext
13888 if { (eval echo "$as_me:13888: \"$ac_compile\"") >&5
13889 (eval $ac_compile) 2>&5
13891 echo "$as_me:13891: \$? = $ac_status" >&5
13892 (exit $ac_status); } &&
13893 { ac_try='test -s conftest.$ac_objext'
13894 { (eval echo "$as_me:13894: \"$ac_try\"") >&5
13895 (eval $ac_try) 2>&5
13897 echo "$as_me:13897: \$? = $ac_status" >&5
13898 (exit $ac_status); }; }; then
13899 cf_cv_term_header=$cf_header
13902 echo "$as_me: failed program was:" >&5
13903 cat conftest.$ac_ext >&5
13904 cf_cv_term_header=no
13906 rm -f conftest.$ac_objext conftest.$ac_ext
13912 echo "$as_me:13912: result: $cf_cv_term_header" >&5
13913 echo "${ECHO_T}$cf_cv_term_header" >&6
13915 case $cf_cv_term_header in #(vi
13918 cat >>confdefs.h <<\EOF
13919 #define HAVE_TERM_H 1
13923 ncurses/term.h) #(vi
13925 cat >>confdefs.h <<\EOF
13926 #define HAVE_NCURSES_TERM_H 1
13932 cat >>confdefs.h <<\EOF
13933 #define HAVE_NCURSESW_TERM_H 1
13939 echo "$as_me:13939: checking for unctrl.h" >&5
13940 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
13941 if test "${cf_cv_unctrl_header+set}" = set; then
13942 echo $ECHO_N "(cached) $ECHO_C" >&6
13945 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
13946 # for <unctrl.h> if we do not find the variant.
13948 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
13950 case ${cf_cv_ncurses_header:-curses.h} in #(vi
13952 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
13953 cf_header_list="$cf_header_item $cf_header_list"
13957 for cf_header in $cf_header_list
13959 cat >conftest.$ac_ext <<_ACEOF
13960 #line 13960 "configure"
13961 #include "confdefs.h"
13963 #include <${cf_cv_ncurses_header:-curses.h}>
13964 #include <${cf_header}>
13973 rm -f conftest.$ac_objext
13974 if { (eval echo "$as_me:13974: \"$ac_compile\"") >&5
13975 (eval $ac_compile) 2>&5
13977 echo "$as_me:13977: \$? = $ac_status" >&5
13978 (exit $ac_status); } &&
13979 { ac_try='test -s conftest.$ac_objext'
13980 { (eval echo "$as_me:13980: \"$ac_try\"") >&5
13981 (eval $ac_try) 2>&5
13983 echo "$as_me:13983: \$? = $ac_status" >&5
13984 (exit $ac_status); }; }; then
13985 cf_cv_unctrl_header=$cf_header
13988 echo "$as_me: failed program was:" >&5
13989 cat conftest.$ac_ext >&5
13990 cf_cv_unctrl_header=no
13992 rm -f conftest.$ac_objext conftest.$ac_ext
13996 echo "$as_me:13996: result: $cf_cv_unctrl_header" >&5
13997 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
13999 case $cf_cv_unctrl_header in #(vi
14001 { echo "$as_me:14001: WARNING: unctrl.h header not found" >&5
14002 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
14006 case $cf_cv_unctrl_header in #(vi
14009 cat >>confdefs.h <<\EOF
14010 #define HAVE_UNCTRL_H 1
14014 ncurses/unctrl.h) #(vi
14016 cat >>confdefs.h <<\EOF
14017 #define HAVE_NCURSES_UNCTRL_H 1
14023 cat >>confdefs.h <<\EOF
14024 #define HAVE_NCURSESW_UNCTRL_H 1
14031 assume_default_colors \
14057 use_default_colors \
14072 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14074 echo "$as_me:14074: checking for ${cf_func}" >&5
14075 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14077 echo "${as_me:-configure}:14077: testing ${cf_func} ..." 1>&5
14079 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14080 echo $ECHO_N "(cached) $ECHO_C" >&6
14083 eval cf_result='$ac_cv_func_'$cf_func
14084 if test ".$cf_result" != ".no"; then
14085 cat >conftest.$ac_ext <<_ACEOF
14086 #line 14086 "configure"
14087 #include "confdefs.h"
14089 #ifdef HAVE_XCURSES
14090 #include <xcurses.h>
14091 char * XCursesProgramName = "test";
14093 #include <${cf_cv_ncurses_header:-curses.h}>
14094 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14095 #include <ncursesw/term.h>
14096 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14097 #include <ncurses/term.h>
14098 #elif defined(HAVE_TERM_H)
14108 long foo = (long)(&${cf_func});
14109 fprintf(stderr, "testing linkage of $cf_func:%p\n", foo);
14110 if (foo + 1234 > 5678)
14111 ${cf_cv_main_return:-return}(foo);
14118 rm -f conftest.$ac_objext conftest$ac_exeext
14119 if { (eval echo "$as_me:14119: \"$ac_link\"") >&5
14120 (eval $ac_link) 2>&5
14122 echo "$as_me:14122: \$? = $ac_status" >&5
14123 (exit $ac_status); } &&
14124 { ac_try='test -s conftest$ac_exeext'
14125 { (eval echo "$as_me:14125: \"$ac_try\"") >&5
14126 (eval $ac_try) 2>&5
14128 echo "$as_me:14128: \$? = $ac_status" >&5
14129 (exit $ac_status); }; }; then
14132 echo "$as_me: failed program was:" >&5
14133 cat conftest.$ac_ext >&5
14136 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14138 eval 'cf_cv_func_'$cf_func'=$cf_result'
14142 # use the computed/retrieved cache-value:
14143 eval 'cf_result=$cf_cv_func_'$cf_func
14144 echo "$as_me:14144: result: $cf_result" >&5
14145 echo "${ECHO_T}$cf_result" >&6
14146 if test $cf_result != no; then
14147 cat >>confdefs.h <<EOF
14148 #define HAVE_${cf_tr_func} 1
14154 for cf_func in tputs
14157 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14159 echo "$as_me:14159: checking for ${cf_func}" >&5
14160 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14162 echo "${as_me:-configure}:14162: testing ${cf_func} ..." 1>&5
14164 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14165 echo $ECHO_N "(cached) $ECHO_C" >&6
14168 eval cf_result='$ac_cv_func_'$cf_func
14169 if test ".$cf_result" != ".no"; then
14170 cat >conftest.$ac_ext <<_ACEOF
14171 #line 14171 "configure"
14172 #include "confdefs.h"
14174 #ifdef HAVE_XCURSES
14175 #include <xcurses.h>
14176 char * XCursesProgramName = "test";
14178 #include <${cf_cv_ncurses_header:-curses.h}>
14179 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14180 #include <ncursesw/term.h>
14181 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14182 #include <ncurses/term.h>
14183 #elif defined(HAVE_TERM_H)
14193 long foo = (long)(&${cf_func});
14194 fprintf(stderr, "testing linkage of $cf_func:%p\n", foo);
14195 if (foo + 1234 > 5678)
14196 ${cf_cv_main_return:-return}(foo);
14203 rm -f conftest.$ac_objext conftest$ac_exeext
14204 if { (eval echo "$as_me:14204: \"$ac_link\"") >&5
14205 (eval $ac_link) 2>&5
14207 echo "$as_me:14207: \$? = $ac_status" >&5
14208 (exit $ac_status); } &&
14209 { ac_try='test -s conftest$ac_exeext'
14210 { (eval echo "$as_me:14210: \"$ac_try\"") >&5
14211 (eval $ac_try) 2>&5
14213 echo "$as_me:14213: \$? = $ac_status" >&5
14214 (exit $ac_status); }; }; then
14217 echo "$as_me: failed program was:" >&5
14218 cat conftest.$ac_ext >&5
14221 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14223 eval 'cf_cv_func_'$cf_func'=$cf_result'
14227 # use the computed/retrieved cache-value:
14228 eval 'cf_result=$cf_cv_func_'$cf_func
14229 echo "$as_me:14229: result: $cf_result" >&5
14230 echo "${ECHO_T}$cf_result" >&6
14231 if test $cf_result != no; then
14232 cat >>confdefs.h <<EOF
14233 #define HAVE_${cf_tr_func} 1
14239 if test x$cf_cv_func_tputs = xyes
14242 for cf_arg in int char
14244 for cf_ret in int void
14246 if test $cf_ret = void
14248 cf_return="/* nothing */"
14250 cf_return="return value"
14252 cat >conftest.$ac_ext <<_ACEOF
14253 #line 14253 "configure"
14254 #include "confdefs.h"
14256 #include <${cf_cv_ncurses_header:-curses.h}>
14257 #include <$cf_cv_term_header>
14259 static $cf_ret outc($cf_arg value) { $cf_return; }
14265 tputs("hello", 0, outc);
14266 ${cf_cv_main_return:-return}(0);
14272 rm -f conftest.$ac_objext
14273 if { (eval echo "$as_me:14273: \"$ac_compile\"") >&5
14274 (eval $ac_compile) 2>&5
14276 echo "$as_me:14276: \$? = $ac_status" >&5
14277 (exit $ac_status); } &&
14278 { ac_try='test -s conftest.$ac_objext'
14279 { (eval echo "$as_me:14279: \"$ac_try\"") >&5
14280 (eval $ac_try) 2>&5
14282 echo "$as_me:14282: \$? = $ac_status" >&5
14283 (exit $ac_status); }; }; then
14285 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
14287 echo "${as_me:-configure}:14287: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
14289 cat >>confdefs.h <<EOF
14290 #define TPUTS_ARG $cf_arg
14291 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
14292 #define TPUTS_RETURN(value) $cf_return
14298 echo "$as_me: failed program was:" >&5
14299 cat conftest.$ac_ext >&5
14301 rm -f conftest.$ac_objext conftest.$ac_ext
14303 test $cf_done = yes && break
14307 echo "$as_me:14307: checking for ncurses extended functions" >&5
14308 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
14309 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
14310 echo $ECHO_N "(cached) $ECHO_C" >&6
14313 cat >conftest.$ac_ext <<_ACEOF
14314 #line 14314 "configure"
14315 #include "confdefs.h"
14317 #include <${cf_cv_ncurses_header:-curses.h}>
14322 int x = NCURSES_EXT_FUNCS
14328 rm -f conftest.$ac_objext
14329 if { (eval echo "$as_me:14329: \"$ac_compile\"") >&5
14330 (eval $ac_compile) 2>&5
14332 echo "$as_me:14332: \$? = $ac_status" >&5
14333 (exit $ac_status); } &&
14334 { ac_try='test -s conftest.$ac_objext'
14335 { (eval echo "$as_me:14335: \"$ac_try\"") >&5
14336 (eval $ac_try) 2>&5
14338 echo "$as_me:14338: \$? = $ac_status" >&5
14339 (exit $ac_status); }; }; then
14340 cf_cv_ncurses_ext_funcs=defined
14342 echo "$as_me: failed program was:" >&5
14343 cat conftest.$ac_ext >&5
14345 cat >conftest.$ac_ext <<_ACEOF
14346 #line 14346 "configure"
14347 #include "confdefs.h"
14349 #include <${cf_cv_ncurses_header:-curses.h}>
14354 (void) assume_default_colors (0, 0);
14355 (void) curses_version ();
14356 (void) define_key (0, 0);
14357 (void) is_term_resized (0, 0);
14358 (void) key_defined (0);
14359 (void) keybound (0, 0);
14360 (void) keyok (0, 0);
14361 (void) resize_term (0, 0);
14362 (void) resizeterm (0, 0);
14363 (void) use_default_colors ();
14364 (void) use_extended_names (0);
14365 (void) wresize (0, 0, 0);
14370 rm -f conftest.$ac_objext conftest$ac_exeext
14371 if { (eval echo "$as_me:14371: \"$ac_link\"") >&5
14372 (eval $ac_link) 2>&5
14374 echo "$as_me:14374: \$? = $ac_status" >&5
14375 (exit $ac_status); } &&
14376 { ac_try='test -s conftest$ac_exeext'
14377 { (eval echo "$as_me:14377: \"$ac_try\"") >&5
14378 (eval $ac_try) 2>&5
14380 echo "$as_me:14380: \$? = $ac_status" >&5
14381 (exit $ac_status); }; }; then
14382 cf_cv_ncurses_ext_funcs=yes
14384 echo "$as_me: failed program was:" >&5
14385 cat conftest.$ac_ext >&5
14386 cf_cv_ncurses_ext_funcs=no
14388 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14391 rm -f conftest.$ac_objext conftest.$ac_ext
14394 echo "$as_me:14394: result: $cf_cv_ncurses_ext_funcs" >&5
14395 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
14396 test "$cf_cv_ncurses_ext_funcs" = yes &&
14397 cat >>confdefs.h <<\EOF
14398 #define NCURSES_EXT_FUNCS 1
14401 if test "$cf_enable_widec" = yes
14403 # workaround for systems with ncurses before 20111029, due to change of
14404 # feature test macro from _XPG5 to _XOPEN_SOURCE
14405 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
14408 echo "$as_me:14408: checking if _XPG5 should be defined to enable wide-characters" >&5
14409 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
14411 cat >conftest.$ac_ext <<_ACEOF
14412 #line 14412 "configure"
14413 #include "confdefs.h"
14415 #include <${cf_cv_ncurses_header:-curses.h}>
14424 rm -f conftest.$ac_objext
14425 if { (eval echo "$as_me:14425: \"$ac_compile\"") >&5
14426 (eval $ac_compile) 2>&5
14428 echo "$as_me:14428: \$? = $ac_status" >&5
14429 (exit $ac_status); } &&
14430 { ac_try='test -s conftest.$ac_objext'
14431 { (eval echo "$as_me:14431: \"$ac_try\"") >&5
14432 (eval $ac_try) 2>&5
14434 echo "$as_me:14434: \$? = $ac_status" >&5
14435 (exit $ac_status); }; }; then
14438 echo "$as_me: failed program was:" >&5
14439 cat conftest.$ac_ext >&5
14440 cf_save_cppflags="$CPPFLAGS"
14441 CPPFLAGS="$CPPFLAGS -D_XPG5"
14442 cat >conftest.$ac_ext <<_ACEOF
14443 #line 14443 "configure"
14444 #include "confdefs.h"
14446 #include <${cf_cv_ncurses_header:-curses.h}>
14455 rm -f conftest.$ac_objext
14456 if { (eval echo "$as_me:14456: \"$ac_compile\"") >&5
14457 (eval $ac_compile) 2>&5
14459 echo "$as_me:14459: \$? = $ac_status" >&5
14460 (exit $ac_status); } &&
14461 { ac_try='test -s conftest.$ac_objext'
14462 { (eval echo "$as_me:14462: \"$ac_try\"") >&5
14463 (eval $ac_try) 2>&5
14465 echo "$as_me:14465: \$? = $ac_status" >&5
14466 (exit $ac_status); }; }; then
14469 echo "$as_me: failed program was:" >&5
14470 cat conftest.$ac_ext >&5
14472 rm -f conftest.$ac_objext conftest.$ac_ext
14473 CPPFLAGS="$cf_save_cppflags"
14475 rm -f conftest.$ac_objext conftest.$ac_ext
14476 echo "$as_me:14476: result: $cf_define_xpg5" >&5
14477 echo "${ECHO_T}$cf_define_xpg5" >&6
14479 if test "$cf_define_xpg5" = yes
14481 CPPFLAGS="$CPPFLAGS -D_XPG5"
14485 echo "$as_me:14485: checking for wide-character functions" >&5
14486 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
14487 if test "${cf_cv_widechar_funcs+set}" = set; then
14488 echo $ECHO_N "(cached) $ECHO_C" >&6
14491 cat >conftest.$ac_ext <<_ACEOF
14492 #line 14492 "configure"
14493 #include "confdefs.h"
14495 #include <${cf_cv_ncurses_header:-curses.h}>
14500 static wchar_t src_wchar[2];
14501 static cchar_t dst_cchar;
14502 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
14508 rm -f conftest.$ac_objext conftest$ac_exeext
14509 if { (eval echo "$as_me:14509: \"$ac_link\"") >&5
14510 (eval $ac_link) 2>&5
14512 echo "$as_me:14512: \$? = $ac_status" >&5
14513 (exit $ac_status); } &&
14514 { ac_try='test -s conftest$ac_exeext'
14515 { (eval echo "$as_me:14515: \"$ac_try\"") >&5
14516 (eval $ac_try) 2>&5
14518 echo "$as_me:14518: \$? = $ac_status" >&5
14519 (exit $ac_status); }; }; then
14520 cf_cv_widechar_funcs=yes
14522 echo "$as_me: failed program was:" >&5
14523 cat conftest.$ac_ext >&5
14524 cf_cv_widechar_funcs=no
14526 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14529 echo "$as_me:14529: result: $cf_cv_widechar_funcs" >&5
14530 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
14531 if test "$cf_cv_widechar_funcs" != no ; then
14533 cat >>confdefs.h <<\EOF
14534 #define USE_WIDEC_SUPPORT 1
14538 cat >>confdefs.h <<\EOF
14539 #define USE_WIDEC_SUPPORT 0
14544 cat >>confdefs.h <<\EOF
14545 #define USE_WIDEC_SUPPORT 0
14550 echo "$as_me:14550: checking if sys/time.h works with sys/select.h" >&5
14551 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14552 if test "${cf_cv_sys_time_select+set}" = set; then
14553 echo $ECHO_N "(cached) $ECHO_C" >&6
14556 cat >conftest.$ac_ext <<_ACEOF
14557 #line 14557 "configure"
14558 #include "confdefs.h"
14560 #include <sys/types.h>
14561 #ifdef HAVE_SYS_TIME_H
14562 #include <sys/time.h>
14564 #ifdef HAVE_SYS_SELECT_H
14565 #include <sys/select.h>
14576 rm -f conftest.$ac_objext
14577 if { (eval echo "$as_me:14577: \"$ac_compile\"") >&5
14578 (eval $ac_compile) 2>&5
14580 echo "$as_me:14580: \$? = $ac_status" >&5
14581 (exit $ac_status); } &&
14582 { ac_try='test -s conftest.$ac_objext'
14583 { (eval echo "$as_me:14583: \"$ac_try\"") >&5
14584 (eval $ac_try) 2>&5
14586 echo "$as_me:14586: \$? = $ac_status" >&5
14587 (exit $ac_status); }; }; then
14588 cf_cv_sys_time_select=yes
14590 echo "$as_me: failed program was:" >&5
14591 cat conftest.$ac_ext >&5
14592 cf_cv_sys_time_select=no
14594 rm -f conftest.$ac_objext conftest.$ac_ext
14598 echo "$as_me:14598: result: $cf_cv_sys_time_select" >&5
14599 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14600 test "$cf_cv_sys_time_select" = yes &&
14601 cat >>confdefs.h <<\EOF
14602 #define HAVE_SYS_TIME_SELECT 1
14605 echo "$as_me:14605: checking for function curses_version" >&5
14606 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
14607 if test "${cf_cv_func_curses_version+set}" = set; then
14608 echo $ECHO_N "(cached) $ECHO_C" >&6
14611 if test "$cross_compiling" = yes; then
14612 cf_cv_func_curses_version=unknown
14614 cat >conftest.$ac_ext <<_ACEOF
14615 #line 14615 "configure"
14616 #include "confdefs.h"
14618 #include <${cf_cv_ncurses_header:-curses.h}>
14622 sprintf(temp, "%s\n", curses_version());
14623 ${cf_cv_main_return:-return}(0);
14627 rm -f conftest$ac_exeext
14628 if { (eval echo "$as_me:14628: \"$ac_link\"") >&5
14629 (eval $ac_link) 2>&5
14631 echo "$as_me:14631: \$? = $ac_status" >&5
14632 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14633 { (eval echo "$as_me:14633: \"$ac_try\"") >&5
14634 (eval $ac_try) 2>&5
14636 echo "$as_me:14636: \$? = $ac_status" >&5
14637 (exit $ac_status); }; }; then
14638 cf_cv_func_curses_version=yes
14641 echo "$as_me: program exited with status $ac_status" >&5
14642 echo "$as_me: failed program was:" >&5
14643 cat conftest.$ac_ext >&5
14644 cf_cv_func_curses_version=no
14647 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14651 echo "$as_me:14651: result: $cf_cv_func_curses_version" >&5
14652 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
14653 test "$cf_cv_func_curses_version" = yes &&
14654 cat >>confdefs.h <<\EOF
14655 #define HAVE_CURSES_VERSION 1
14658 echo "$as_me:14658: checking for alternate character set array" >&5
14659 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
14660 if test "${cf_cv_curses_acs_map+set}" = set; then
14661 echo $ECHO_N "(cached) $ECHO_C" >&6
14664 cf_cv_curses_acs_map=unknown
14665 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
14667 cat >conftest.$ac_ext <<_ACEOF
14668 #line 14668 "configure"
14669 #include "confdefs.h"
14671 #include <${cf_cv_ncurses_header:-curses.h}>
14677 $name['k'] = ACS_PLUS
14683 rm -f conftest.$ac_objext conftest$ac_exeext
14684 if { (eval echo "$as_me:14684: \"$ac_link\"") >&5
14685 (eval $ac_link) 2>&5
14687 echo "$as_me:14687: \$? = $ac_status" >&5
14688 (exit $ac_status); } &&
14689 { ac_try='test -s conftest$ac_exeext'
14690 { (eval echo "$as_me:14690: \"$ac_try\"") >&5
14691 (eval $ac_try) 2>&5
14693 echo "$as_me:14693: \$? = $ac_status" >&5
14694 (exit $ac_status); }; }; then
14695 cf_cv_curses_acs_map=$name; break
14697 echo "$as_me: failed program was:" >&5
14698 cat conftest.$ac_ext >&5
14700 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14704 echo "$as_me:14704: result: $cf_cv_curses_acs_map" >&5
14705 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
14707 test "$cf_cv_curses_acs_map" != unknown &&
14708 cat >>confdefs.h <<EOF
14709 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
14712 if test "$cf_enable_widec" = yes; then
14714 echo "$as_me:14714: checking for wide alternate character set array" >&5
14715 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
14716 if test "${cf_cv_curses_wacs_map+set}" = set; then
14717 echo $ECHO_N "(cached) $ECHO_C" >&6
14720 cf_cv_curses_wacs_map=unknown
14721 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
14723 cat >conftest.$ac_ext <<_ACEOF
14724 #line 14724 "configure"
14725 #include "confdefs.h"
14727 #ifndef _XOPEN_SOURCE_EXTENDED
14728 #define _XOPEN_SOURCE_EXTENDED
14730 #include <${cf_cv_ncurses_header:-curses.h}>
14734 void *foo = &($name['k'])
14739 rm -f conftest.$ac_objext conftest$ac_exeext
14740 if { (eval echo "$as_me:14740: \"$ac_link\"") >&5
14741 (eval $ac_link) 2>&5
14743 echo "$as_me:14743: \$? = $ac_status" >&5
14744 (exit $ac_status); } &&
14745 { ac_try='test -s conftest$ac_exeext'
14746 { (eval echo "$as_me:14746: \"$ac_try\"") >&5
14747 (eval $ac_try) 2>&5
14749 echo "$as_me:14749: \$? = $ac_status" >&5
14750 (exit $ac_status); }; }; then
14751 cf_cv_curses_wacs_map=$name
14754 echo "$as_me: failed program was:" >&5
14755 cat conftest.$ac_ext >&5
14757 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14760 echo "$as_me:14760: result: $cf_cv_curses_wacs_map" >&5
14761 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
14763 test "$cf_cv_curses_wacs_map" != unknown &&
14764 cat >>confdefs.h <<EOF
14765 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
14768 echo "$as_me:14768: checking for wide alternate character constants" >&5
14769 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
14770 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
14771 echo $ECHO_N "(cached) $ECHO_C" >&6
14774 cf_cv_curses_wacs_symbols=no
14775 if test "$cf_cv_curses_wacs_map" != unknown
14777 cat >conftest.$ac_ext <<_ACEOF
14778 #line 14778 "configure"
14779 #include "confdefs.h"
14781 #ifndef _XOPEN_SOURCE_EXTENDED
14782 #define _XOPEN_SOURCE_EXTENDED
14784 #include <${cf_cv_ncurses_header:-curses.h}>
14788 cchar_t *foo = WACS_PLUS;
14789 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
14794 rm -f conftest.$ac_objext conftest$ac_exeext
14795 if { (eval echo "$as_me:14795: \"$ac_link\"") >&5
14796 (eval $ac_link) 2>&5
14798 echo "$as_me:14798: \$? = $ac_status" >&5
14799 (exit $ac_status); } &&
14800 { ac_try='test -s conftest$ac_exeext'
14801 { (eval echo "$as_me:14801: \"$ac_try\"") >&5
14802 (eval $ac_try) 2>&5
14804 echo "$as_me:14804: \$? = $ac_status" >&5
14805 (exit $ac_status); }; }; then
14806 cf_cv_curses_wacs_symbols=yes
14808 echo "$as_me: failed program was:" >&5
14809 cat conftest.$ac_ext >&5
14811 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14813 cat >conftest.$ac_ext <<_ACEOF
14814 #line 14814 "configure"
14815 #include "confdefs.h"
14817 #ifndef _XOPEN_SOURCE_EXTENDED
14818 #define _XOPEN_SOURCE_EXTENDED
14820 #include <${cf_cv_ncurses_header:-curses.h}>
14824 cchar_t *foo = WACS_PLUS
14829 rm -f conftest.$ac_objext conftest$ac_exeext
14830 if { (eval echo "$as_me:14830: \"$ac_link\"") >&5
14831 (eval $ac_link) 2>&5
14833 echo "$as_me:14833: \$? = $ac_status" >&5
14834 (exit $ac_status); } &&
14835 { ac_try='test -s conftest$ac_exeext'
14836 { (eval echo "$as_me:14836: \"$ac_try\"") >&5
14837 (eval $ac_try) 2>&5
14839 echo "$as_me:14839: \$? = $ac_status" >&5
14840 (exit $ac_status); }; }; then
14841 cf_cv_curses_wacs_symbols=yes
14843 echo "$as_me: failed program was:" >&5
14844 cat conftest.$ac_ext >&5
14846 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14850 echo "$as_me:14850: result: $cf_cv_curses_wacs_symbols" >&5
14851 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
14853 test "$cf_cv_curses_wacs_symbols" != no &&
14854 cat >>confdefs.h <<\EOF
14855 #define CURSES_WACS_SYMBOLS 1
14860 echo "$as_me:14860: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
14861 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14862 cat >conftest.$ac_ext <<_ACEOF
14863 #line 14863 "configure"
14864 #include "confdefs.h"
14866 #ifndef _XOPEN_SOURCE_EXTENDED
14867 #define _XOPEN_SOURCE_EXTENDED
14869 #include <${cf_cv_ncurses_header:-curses.h}>
14880 rm -f conftest.$ac_objext
14881 if { (eval echo "$as_me:14881: \"$ac_compile\"") >&5
14882 (eval $ac_compile) 2>&5
14884 echo "$as_me:14884: \$? = $ac_status" >&5
14885 (exit $ac_status); } &&
14886 { ac_try='test -s conftest.$ac_objext'
14887 { (eval echo "$as_me:14887: \"$ac_try\"") >&5
14888 (eval $ac_try) 2>&5
14890 echo "$as_me:14890: \$? = $ac_status" >&5
14891 (exit $ac_status); }; }; then
14894 echo "$as_me: failed program was:" >&5
14895 cat conftest.$ac_ext >&5
14898 rm -f conftest.$ac_objext conftest.$ac_ext
14899 echo "$as_me:14899: result: $cf_result" >&5
14900 echo "${ECHO_T}$cf_result" >&6
14901 if test $cf_result = yes ; then
14903 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14905 cat >>confdefs.h <<EOF
14906 #define $cf_result 1
14911 cat >>confdefs.h <<EOF
14912 #define attr_t long
14917 if test "$cf_enable_widec" = yes; then
14919 # This is needed on Tru64 5.0 to declare mbstate_t
14920 echo "$as_me:14920: checking if we must include wchar.h to declare mbstate_t" >&5
14921 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
14922 if test "${cf_cv_mbstate_t+set}" = set; then
14923 echo $ECHO_N "(cached) $ECHO_C" >&6
14926 cat >conftest.$ac_ext <<_ACEOF
14927 #line 14927 "configure"
14928 #include "confdefs.h"
14930 #include <stdlib.h>
14931 #include <stdarg.h>
14933 #ifdef HAVE_LIBUTF8_H
14934 #include <libutf8.h>
14944 rm -f conftest.$ac_objext
14945 if { (eval echo "$as_me:14945: \"$ac_compile\"") >&5
14946 (eval $ac_compile) 2>&5
14948 echo "$as_me:14948: \$? = $ac_status" >&5
14949 (exit $ac_status); } &&
14950 { ac_try='test -s conftest.$ac_objext'
14951 { (eval echo "$as_me:14951: \"$ac_try\"") >&5
14952 (eval $ac_try) 2>&5
14954 echo "$as_me:14954: \$? = $ac_status" >&5
14955 (exit $ac_status); }; }; then
14958 echo "$as_me: failed program was:" >&5
14959 cat conftest.$ac_ext >&5
14960 cat >conftest.$ac_ext <<_ACEOF
14961 #line 14961 "configure"
14962 #include "confdefs.h"
14964 #include <stdlib.h>
14965 #include <stdarg.h>
14968 #ifdef HAVE_LIBUTF8_H
14969 #include <libutf8.h>
14979 rm -f conftest.$ac_objext
14980 if { (eval echo "$as_me:14980: \"$ac_compile\"") >&5
14981 (eval $ac_compile) 2>&5
14983 echo "$as_me:14983: \$? = $ac_status" >&5
14984 (exit $ac_status); } &&
14985 { ac_try='test -s conftest.$ac_objext'
14986 { (eval echo "$as_me:14986: \"$ac_try\"") >&5
14987 (eval $ac_try) 2>&5
14989 echo "$as_me:14989: \$? = $ac_status" >&5
14990 (exit $ac_status); }; }; then
14991 cf_cv_mbstate_t=yes
14993 echo "$as_me: failed program was:" >&5
14994 cat conftest.$ac_ext >&5
14995 cf_cv_mbstate_t=unknown
14997 rm -f conftest.$ac_objext conftest.$ac_ext
14999 rm -f conftest.$ac_objext conftest.$ac_ext
15001 echo "$as_me:15001: result: $cf_cv_mbstate_t" >&5
15002 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
15004 if test "$cf_cv_mbstate_t" = yes ; then
15006 cat >>confdefs.h <<\EOF
15007 #define NEED_WCHAR_H 1
15013 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
15014 if test "$cf_cv_mbstate_t" = unknown ; then
15015 NCURSES_MBSTATE_T=1
15018 # if we find mbstate_t in either place, use substitution to provide a fallback.
15019 if test "$cf_cv_mbstate_t" != unknown ; then
15020 NCURSES_OK_MBSTATE_T=1
15023 # This is needed on Tru64 5.0 to declare wchar_t
15024 echo "$as_me:15024: checking if we must include wchar.h to declare wchar_t" >&5
15025 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
15026 if test "${cf_cv_wchar_t+set}" = set; then
15027 echo $ECHO_N "(cached) $ECHO_C" >&6
15030 cat >conftest.$ac_ext <<_ACEOF
15031 #line 15031 "configure"
15032 #include "confdefs.h"
15034 #include <stdlib.h>
15035 #include <stdarg.h>
15037 #ifdef HAVE_LIBUTF8_H
15038 #include <libutf8.h>
15048 rm -f conftest.$ac_objext
15049 if { (eval echo "$as_me:15049: \"$ac_compile\"") >&5
15050 (eval $ac_compile) 2>&5
15052 echo "$as_me:15052: \$? = $ac_status" >&5
15053 (exit $ac_status); } &&
15054 { ac_try='test -s conftest.$ac_objext'
15055 { (eval echo "$as_me:15055: \"$ac_try\"") >&5
15056 (eval $ac_try) 2>&5
15058 echo "$as_me:15058: \$? = $ac_status" >&5
15059 (exit $ac_status); }; }; then
15062 echo "$as_me: failed program was:" >&5
15063 cat conftest.$ac_ext >&5
15064 cat >conftest.$ac_ext <<_ACEOF
15065 #line 15065 "configure"
15066 #include "confdefs.h"
15068 #include <stdlib.h>
15069 #include <stdarg.h>
15072 #ifdef HAVE_LIBUTF8_H
15073 #include <libutf8.h>
15083 rm -f conftest.$ac_objext
15084 if { (eval echo "$as_me:15084: \"$ac_compile\"") >&5
15085 (eval $ac_compile) 2>&5
15087 echo "$as_me:15087: \$? = $ac_status" >&5
15088 (exit $ac_status); } &&
15089 { ac_try='test -s conftest.$ac_objext'
15090 { (eval echo "$as_me:15090: \"$ac_try\"") >&5
15091 (eval $ac_try) 2>&5
15093 echo "$as_me:15093: \$? = $ac_status" >&5
15094 (exit $ac_status); }; }; then
15097 echo "$as_me: failed program was:" >&5
15098 cat conftest.$ac_ext >&5
15099 cf_cv_wchar_t=unknown
15101 rm -f conftest.$ac_objext conftest.$ac_ext
15103 rm -f conftest.$ac_objext conftest.$ac_ext
15105 echo "$as_me:15105: result: $cf_cv_wchar_t" >&5
15106 echo "${ECHO_T}$cf_cv_wchar_t" >&6
15108 if test "$cf_cv_wchar_t" = yes ; then
15110 cat >>confdefs.h <<\EOF
15111 #define NEED_WCHAR_H 1
15117 # if we do not find wchar_t in either place, use substitution to provide a fallback.
15118 if test "$cf_cv_wchar_t" = unknown ; then
15122 # if we find wchar_t in either place, use substitution to provide a fallback.
15123 if test "$cf_cv_wchar_t" != unknown ; then
15124 NCURSES_OK_WCHAR_T=1
15127 # This is needed on Tru64 5.0 to declare wint_t
15128 echo "$as_me:15128: checking if we must include wchar.h to declare wint_t" >&5
15129 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
15130 if test "${cf_cv_wint_t+set}" = set; then
15131 echo $ECHO_N "(cached) $ECHO_C" >&6
15134 cat >conftest.$ac_ext <<_ACEOF
15135 #line 15135 "configure"
15136 #include "confdefs.h"
15138 #include <stdlib.h>
15139 #include <stdarg.h>
15141 #ifdef HAVE_LIBUTF8_H
15142 #include <libutf8.h>
15152 rm -f conftest.$ac_objext
15153 if { (eval echo "$as_me:15153: \"$ac_compile\"") >&5
15154 (eval $ac_compile) 2>&5
15156 echo "$as_me:15156: \$? = $ac_status" >&5
15157 (exit $ac_status); } &&
15158 { ac_try='test -s conftest.$ac_objext'
15159 { (eval echo "$as_me:15159: \"$ac_try\"") >&5
15160 (eval $ac_try) 2>&5
15162 echo "$as_me:15162: \$? = $ac_status" >&5
15163 (exit $ac_status); }; }; then
15166 echo "$as_me: failed program was:" >&5
15167 cat conftest.$ac_ext >&5
15168 cat >conftest.$ac_ext <<_ACEOF
15169 #line 15169 "configure"
15170 #include "confdefs.h"
15172 #include <stdlib.h>
15173 #include <stdarg.h>
15176 #ifdef HAVE_LIBUTF8_H
15177 #include <libutf8.h>
15187 rm -f conftest.$ac_objext
15188 if { (eval echo "$as_me:15188: \"$ac_compile\"") >&5
15189 (eval $ac_compile) 2>&5
15191 echo "$as_me:15191: \$? = $ac_status" >&5
15192 (exit $ac_status); } &&
15193 { ac_try='test -s conftest.$ac_objext'
15194 { (eval echo "$as_me:15194: \"$ac_try\"") >&5
15195 (eval $ac_try) 2>&5
15197 echo "$as_me:15197: \$? = $ac_status" >&5
15198 (exit $ac_status); }; }; then
15201 echo "$as_me: failed program was:" >&5
15202 cat conftest.$ac_ext >&5
15203 cf_cv_wint_t=unknown
15205 rm -f conftest.$ac_objext conftest.$ac_ext
15207 rm -f conftest.$ac_objext conftest.$ac_ext
15209 echo "$as_me:15209: result: $cf_cv_wint_t" >&5
15210 echo "${ECHO_T}$cf_cv_wint_t" >&6
15212 if test "$cf_cv_wint_t" = yes ; then
15214 cat >>confdefs.h <<\EOF
15215 #define NEED_WCHAR_H 1
15221 # if we do not find wint_t in either place, use substitution to provide a fallback.
15222 if test "$cf_cv_wint_t" = unknown ; then
15226 # if we find wint_t in either place, use substitution to provide a fallback.
15227 if test "$cf_cv_wint_t" != unknown ; then
15228 NCURSES_OK_WINT_T=1
15231 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
15233 echo "$as_me:15233: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15234 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15235 cat >conftest.$ac_ext <<_ACEOF
15236 #line 15236 "configure"
15237 #include "confdefs.h"
15239 #ifndef _XOPEN_SOURCE_EXTENDED
15240 #define _XOPEN_SOURCE_EXTENDED
15242 #include <${cf_cv_ncurses_header:-curses.h}>
15253 rm -f conftest.$ac_objext
15254 if { (eval echo "$as_me:15254: \"$ac_compile\"") >&5
15255 (eval $ac_compile) 2>&5
15257 echo "$as_me:15257: \$? = $ac_status" >&5
15258 (exit $ac_status); } &&
15259 { ac_try='test -s conftest.$ac_objext'
15260 { (eval echo "$as_me:15260: \"$ac_try\"") >&5
15261 (eval $ac_try) 2>&5
15263 echo "$as_me:15263: \$? = $ac_status" >&5
15264 (exit $ac_status); }; }; then
15267 echo "$as_me: failed program was:" >&5
15268 cat conftest.$ac_ext >&5
15271 rm -f conftest.$ac_objext conftest.$ac_ext
15272 echo "$as_me:15272: result: $cf_result" >&5
15273 echo "${ECHO_T}$cf_result" >&6
15274 if test $cf_result = yes ; then
15276 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15278 cat >>confdefs.h <<EOF
15279 #define $cf_result 1
15284 cat >>confdefs.h <<EOF
15285 #define mbstate_t long
15292 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
15294 echo "$as_me:15294: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15295 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15296 cat >conftest.$ac_ext <<_ACEOF
15297 #line 15297 "configure"
15298 #include "confdefs.h"
15300 #ifndef _XOPEN_SOURCE_EXTENDED
15301 #define _XOPEN_SOURCE_EXTENDED
15303 #include <${cf_cv_ncurses_header:-curses.h}>
15314 rm -f conftest.$ac_objext
15315 if { (eval echo "$as_me:15315: \"$ac_compile\"") >&5
15316 (eval $ac_compile) 2>&5
15318 echo "$as_me:15318: \$? = $ac_status" >&5
15319 (exit $ac_status); } &&
15320 { ac_try='test -s conftest.$ac_objext'
15321 { (eval echo "$as_me:15321: \"$ac_try\"") >&5
15322 (eval $ac_try) 2>&5
15324 echo "$as_me:15324: \$? = $ac_status" >&5
15325 (exit $ac_status); }; }; then
15328 echo "$as_me: failed program was:" >&5
15329 cat conftest.$ac_ext >&5
15332 rm -f conftest.$ac_objext conftest.$ac_ext
15333 echo "$as_me:15333: result: $cf_result" >&5
15334 echo "${ECHO_T}$cf_result" >&6
15335 if test $cf_result = yes ; then
15337 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15339 cat >>confdefs.h <<EOF
15340 #define $cf_result 1
15345 cat >>confdefs.h <<EOF
15346 #define wchar_t long
15353 if test "$NCURSES_OK_WINT_T" = 0 ; then
15355 echo "$as_me:15355: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15356 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15357 cat >conftest.$ac_ext <<_ACEOF
15358 #line 15358 "configure"
15359 #include "confdefs.h"
15361 #ifndef _XOPEN_SOURCE_EXTENDED
15362 #define _XOPEN_SOURCE_EXTENDED
15364 #include <${cf_cv_ncurses_header:-curses.h}>
15375 rm -f conftest.$ac_objext
15376 if { (eval echo "$as_me:15376: \"$ac_compile\"") >&5
15377 (eval $ac_compile) 2>&5
15379 echo "$as_me:15379: \$? = $ac_status" >&5
15380 (exit $ac_status); } &&
15381 { ac_try='test -s conftest.$ac_objext'
15382 { (eval echo "$as_me:15382: \"$ac_try\"") >&5
15383 (eval $ac_try) 2>&5
15385 echo "$as_me:15385: \$? = $ac_status" >&5
15386 (exit $ac_status); }; }; then
15389 echo "$as_me: failed program was:" >&5
15390 cat conftest.$ac_ext >&5
15393 rm -f conftest.$ac_objext conftest.$ac_ext
15394 echo "$as_me:15394: result: $cf_result" >&5
15395 echo "${ECHO_T}$cf_result" >&6
15396 if test $cf_result = yes ; then
15398 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15400 cat >>confdefs.h <<EOF
15401 #define $cf_result 1
15406 cat >>confdefs.h <<EOF
15407 #define wint_t long
15415 echo "$as_me:15415: checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
15416 echo $ECHO_N "checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15418 cat >conftest.$ac_ext <<_ACEOF
15419 #line 15419 "configure"
15420 #include "confdefs.h"
15422 #ifdef HAVE_XCURSES
15423 #include <xcurses.h>
15424 char * XCursesProgramName = "test";
15426 #include <${cf_cv_ncurses_header:-curses.h}>
15427 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15428 #include <ncursesw/term.h>
15429 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15430 #include <ncurses/term.h>
15431 #elif defined(HAVE_TERM_H)
15440 void *foo = &(boolnames)
15446 rm -f conftest.$ac_objext
15447 if { (eval echo "$as_me:15447: \"$ac_compile\"") >&5
15448 (eval $ac_compile) 2>&5
15450 echo "$as_me:15450: \$? = $ac_status" >&5
15451 (exit $ac_status); } &&
15452 { ac_try='test -s conftest.$ac_objext'
15453 { (eval echo "$as_me:15453: \"$ac_try\"") >&5
15454 (eval $ac_try) 2>&5
15456 echo "$as_me:15456: \$? = $ac_status" >&5
15457 (exit $ac_status); }; }; then
15460 echo "$as_me: failed program was:" >&5
15461 cat conftest.$ac_ext >&5
15464 rm -f conftest.$ac_objext conftest.$ac_ext
15465 echo "$as_me:15465: result: $cf_result" >&5
15466 echo "${ECHO_T}$cf_result" >&6
15468 if test $cf_result = yes ; then
15470 cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15472 cat >>confdefs.h <<EOF
15473 #define $cf_result 1
15477 echo "$as_me:15477: checking for data boolnames in library" >&5
15478 echo $ECHO_N "checking for data boolnames in library... $ECHO_C" >&6
15479 # BSD linkers insist on making weak linkage, but resolve at runtime.
15480 if test "$cross_compiling" = yes; then
15483 cat >conftest.$ac_ext <<_ACEOF
15484 #line 15484 "configure"
15485 #include "confdefs.h"
15487 #ifdef HAVE_XCURSES
15488 #include <xcurses.h>
15489 char * XCursesProgramName = "test";
15491 #include <${cf_cv_ncurses_header:-curses.h}>
15492 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15493 #include <ncursesw/term.h>
15494 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15495 #include <ncurses/term.h>
15496 #elif defined(HAVE_TERM_H)
15501 extern char boolnames;
15507 void *foo = &(boolnames);
15508 fprintf(stderr, "testing linkage of boolnames:%p\n", foo);
15509 ${cf_cv_main_return:-return}(foo == 0);
15516 rm -f conftest.$ac_objext conftest$ac_exeext
15517 if { (eval echo "$as_me:15517: \"$ac_link\"") >&5
15518 (eval $ac_link) 2>&5
15520 echo "$as_me:15520: \$? = $ac_status" >&5
15521 (exit $ac_status); } &&
15522 { ac_try='test -s conftest$ac_exeext'
15523 { (eval echo "$as_me:15523: \"$ac_try\"") >&5
15524 (eval $ac_try) 2>&5
15526 echo "$as_me:15526: \$? = $ac_status" >&5
15527 (exit $ac_status); }; }; then
15530 echo "$as_me: failed program was:" >&5
15531 cat conftest.$ac_ext >&5
15534 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15537 cat >conftest.$ac_ext <<_ACEOF
15538 #line 15538 "configure"
15539 #include "confdefs.h"
15541 #ifdef HAVE_XCURSES
15542 #include <xcurses.h>
15543 char * XCursesProgramName = "test";
15545 #include <${cf_cv_ncurses_header:-curses.h}>
15546 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15547 #include <ncursesw/term.h>
15548 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15549 #include <ncurses/term.h>
15550 #elif defined(HAVE_TERM_H)
15555 extern char boolnames;
15558 void *foo = &(boolnames);
15559 fprintf(stderr, "testing linkage of boolnames:%p\n", foo);
15560 ${cf_cv_main_return:-return}(foo == 0);
15563 rm -f conftest$ac_exeext
15564 if { (eval echo "$as_me:15564: \"$ac_link\"") >&5
15565 (eval $ac_link) 2>&5
15567 echo "$as_me:15567: \$? = $ac_status" >&5
15568 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15569 { (eval echo "$as_me:15569: \"$ac_try\"") >&5
15570 (eval $ac_try) 2>&5
15572 echo "$as_me:15572: \$? = $ac_status" >&5
15573 (exit $ac_status); }; }; then
15576 echo "$as_me: program exited with status $ac_status" >&5
15577 echo "$as_me: failed program was:" >&5
15578 cat conftest.$ac_ext >&5
15581 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15583 echo "$as_me:15583: result: $cf_result" >&5
15584 echo "${ECHO_T}$cf_result" >&6
15585 if test $cf_result = yes ; then
15587 cf_result=`echo "decl_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15589 cat >>confdefs.h <<EOF
15590 #define $cf_result 1
15596 echo "$as_me:15596: checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
15597 echo $ECHO_N "checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15599 cat >conftest.$ac_ext <<_ACEOF
15600 #line 15600 "configure"
15601 #include "confdefs.h"
15603 #ifdef HAVE_XCURSES
15604 #include <xcurses.h>
15605 char * XCursesProgramName = "test";
15607 #include <${cf_cv_ncurses_header:-curses.h}>
15608 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15609 #include <ncursesw/term.h>
15610 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15611 #include <ncurses/term.h>
15612 #elif defined(HAVE_TERM_H)
15621 void *foo = &(boolfnames)
15627 rm -f conftest.$ac_objext
15628 if { (eval echo "$as_me:15628: \"$ac_compile\"") >&5
15629 (eval $ac_compile) 2>&5
15631 echo "$as_me:15631: \$? = $ac_status" >&5
15632 (exit $ac_status); } &&
15633 { ac_try='test -s conftest.$ac_objext'
15634 { (eval echo "$as_me:15634: \"$ac_try\"") >&5
15635 (eval $ac_try) 2>&5
15637 echo "$as_me:15637: \$? = $ac_status" >&5
15638 (exit $ac_status); }; }; then
15641 echo "$as_me: failed program was:" >&5
15642 cat conftest.$ac_ext >&5
15645 rm -f conftest.$ac_objext conftest.$ac_ext
15646 echo "$as_me:15646: result: $cf_result" >&5
15647 echo "${ECHO_T}$cf_result" >&6
15649 if test $cf_result = yes ; then
15651 cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15653 cat >>confdefs.h <<EOF
15654 #define $cf_result 1
15658 echo "$as_me:15658: checking for data boolfnames in library" >&5
15659 echo $ECHO_N "checking for data boolfnames in library... $ECHO_C" >&6
15660 # BSD linkers insist on making weak linkage, but resolve at runtime.
15661 if test "$cross_compiling" = yes; then
15664 cat >conftest.$ac_ext <<_ACEOF
15665 #line 15665 "configure"
15666 #include "confdefs.h"
15668 #ifdef HAVE_XCURSES
15669 #include <xcurses.h>
15670 char * XCursesProgramName = "test";
15672 #include <${cf_cv_ncurses_header:-curses.h}>
15673 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15674 #include <ncursesw/term.h>
15675 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15676 #include <ncurses/term.h>
15677 #elif defined(HAVE_TERM_H)
15682 extern char boolfnames;
15688 void *foo = &(boolfnames);
15689 fprintf(stderr, "testing linkage of boolfnames:%p\n", foo);
15690 ${cf_cv_main_return:-return}(foo == 0);
15697 rm -f conftest.$ac_objext conftest$ac_exeext
15698 if { (eval echo "$as_me:15698: \"$ac_link\"") >&5
15699 (eval $ac_link) 2>&5
15701 echo "$as_me:15701: \$? = $ac_status" >&5
15702 (exit $ac_status); } &&
15703 { ac_try='test -s conftest$ac_exeext'
15704 { (eval echo "$as_me:15704: \"$ac_try\"") >&5
15705 (eval $ac_try) 2>&5
15707 echo "$as_me:15707: \$? = $ac_status" >&5
15708 (exit $ac_status); }; }; then
15711 echo "$as_me: failed program was:" >&5
15712 cat conftest.$ac_ext >&5
15715 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15718 cat >conftest.$ac_ext <<_ACEOF
15719 #line 15719 "configure"
15720 #include "confdefs.h"
15722 #ifdef HAVE_XCURSES
15723 #include <xcurses.h>
15724 char * XCursesProgramName = "test";
15726 #include <${cf_cv_ncurses_header:-curses.h}>
15727 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15728 #include <ncursesw/term.h>
15729 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15730 #include <ncurses/term.h>
15731 #elif defined(HAVE_TERM_H)
15736 extern char boolfnames;
15739 void *foo = &(boolfnames);
15740 fprintf(stderr, "testing linkage of boolfnames:%p\n", foo);
15741 ${cf_cv_main_return:-return}(foo == 0);
15744 rm -f conftest$ac_exeext
15745 if { (eval echo "$as_me:15745: \"$ac_link\"") >&5
15746 (eval $ac_link) 2>&5
15748 echo "$as_me:15748: \$? = $ac_status" >&5
15749 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15750 { (eval echo "$as_me:15750: \"$ac_try\"") >&5
15751 (eval $ac_try) 2>&5
15753 echo "$as_me:15753: \$? = $ac_status" >&5
15754 (exit $ac_status); }; }; then
15757 echo "$as_me: program exited with status $ac_status" >&5
15758 echo "$as_me: failed program was:" >&5
15759 cat conftest.$ac_ext >&5
15762 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15764 echo "$as_me:15764: result: $cf_result" >&5
15765 echo "${ECHO_T}$cf_result" >&6
15766 if test $cf_result = yes ; then
15768 cf_result=`echo "decl_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15770 cat >>confdefs.h <<EOF
15771 #define $cf_result 1
15777 if ( test "$GCC" = yes || test "$GXX" = yes )
15779 echo "$as_me:15779: checking if you want to turn on gcc warnings" >&5
15780 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
15782 # Check whether --enable-warnings or --disable-warnings was given.
15783 if test "${enable_warnings+set}" = set; then
15784 enableval="$enable_warnings"
15785 test "$enableval" != yes && enableval=no
15786 if test "$enableval" != "no" ; then
15796 echo "$as_me:15796: result: $with_warnings" >&5
15797 echo "${ECHO_T}$with_warnings" >&6
15798 if test "$with_warnings" = "yes"
15801 if test "$GCC" = yes
15803 cat > conftest.i <<EOF
15805 #define GCC_PRINTF 0
15808 #define GCC_SCANF 0
15810 #ifndef GCC_NORETURN
15811 #define GCC_NORETURN /* nothing */
15814 #define GCC_UNUSED /* nothing */
15817 if test "$GCC" = yes
15819 { echo "$as_me:15819: checking for $CC __attribute__ directives..." >&5
15820 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15821 cat > conftest.$ac_ext <<EOF
15822 #line 15822 "${as_me:-configure}"
15823 #include "confdefs.h"
15824 #include "conftest.h"
15825 #include "conftest.i"
15827 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15829 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15832 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
15834 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
15836 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15837 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
15838 extern void foo(void) GCC_NORETURN;
15839 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
15841 cf_printf_attribute=no
15842 cf_scanf_attribute=no
15843 for cf_attribute in scanf printf unused noreturn
15846 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15848 cf_directive="__attribute__(($cf_attribute))"
15849 echo "checking for $CC $cf_directive" 1>&5
15851 case $cf_attribute in #(vi
15853 cf_printf_attribute=yes
15854 cat >conftest.h <<EOF
15855 #define GCC_$cf_ATTRIBUTE 1
15859 cf_scanf_attribute=yes
15860 cat >conftest.h <<EOF
15861 #define GCC_$cf_ATTRIBUTE 1
15865 cat >conftest.h <<EOF
15866 #define GCC_$cf_ATTRIBUTE $cf_directive
15871 if { (eval echo "$as_me:15871: \"$ac_compile\"") >&5
15872 (eval $ac_compile) 2>&5
15874 echo "$as_me:15874: \$? = $ac_status" >&5
15875 (exit $ac_status); }; then
15876 test -n "$verbose" && echo "$as_me:15876: result: ... $cf_attribute" >&5
15877 echo "${ECHO_T}... $cf_attribute" >&6
15878 cat conftest.h >>confdefs.h
15879 case $cf_attribute in #(vi
15882 cat >>confdefs.h <<EOF
15883 #define GCC_NORETURN $cf_directive
15888 cf_value='/* nothing */'
15889 if test "$cf_printf_attribute" != no ; then
15890 cf_value='__attribute__((format(printf,fmt,var)))'
15892 cat >>confdefs.h <<\EOF
15893 #define GCC_PRINTF 1
15898 cat >>confdefs.h <<EOF
15899 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15904 cf_value='/* nothing */'
15905 if test "$cf_scanf_attribute" != no ; then
15906 cf_value='__attribute__((format(scanf,fmt,var)))'
15908 cat >>confdefs.h <<\EOF
15909 #define GCC_SCANF 1
15914 cat >>confdefs.h <<EOF
15915 #define GCC_SCANFLIKE(fmt,var) $cf_value
15921 cat >>confdefs.h <<EOF
15922 #define GCC_UNUSED $cf_directive
15930 fgrep define conftest.i >>confdefs.h
15937 if test "$GCC" = yes ; then
15940 echo "$as_me:15940: checking if this is really Intel C compiler" >&5
15941 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
15942 cf_save_CFLAGS="$CFLAGS"
15943 CFLAGS="$CFLAGS -no-gcc"
15944 cat >conftest.$ac_ext <<_ACEOF
15945 #line 15945 "configure"
15946 #include "confdefs.h"
15952 #ifdef __INTEL_COMPILER
15961 rm -f conftest.$ac_objext
15962 if { (eval echo "$as_me:15962: \"$ac_compile\"") >&5
15963 (eval $ac_compile) 2>&5
15965 echo "$as_me:15965: \$? = $ac_status" >&5
15966 (exit $ac_status); } &&
15967 { ac_try='test -s conftest.$ac_objext'
15968 { (eval echo "$as_me:15968: \"$ac_try\"") >&5
15969 (eval $ac_try) 2>&5
15971 echo "$as_me:15971: \$? = $ac_status" >&5
15972 (exit $ac_status); }; }; then
15974 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
15977 echo "$as_me: failed program was:" >&5
15978 cat conftest.$ac_ext >&5
15980 rm -f conftest.$ac_objext conftest.$ac_ext
15981 CFLAGS="$cf_save_CFLAGS"
15982 echo "$as_me:15982: result: $INTEL_COMPILER" >&5
15983 echo "${ECHO_T}$INTEL_COMPILER" >&6
15990 if test "$GCC" = yes ; then
15991 echo "$as_me:15991: checking if this is really Clang C compiler" >&5
15992 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
15993 cf_save_CFLAGS="$CFLAGS"
15994 CFLAGS="$CFLAGS -Qunused-arguments"
15995 cat >conftest.$ac_ext <<_ACEOF
15996 #line 15996 "configure"
15997 #include "confdefs.h"
16012 rm -f conftest.$ac_objext
16013 if { (eval echo "$as_me:16013: \"$ac_compile\"") >&5
16014 (eval $ac_compile) 2>&5
16016 echo "$as_me:16016: \$? = $ac_status" >&5
16017 (exit $ac_status); } &&
16018 { ac_try='test -s conftest.$ac_objext'
16019 { (eval echo "$as_me:16019: \"$ac_try\"") >&5
16020 (eval $ac_try) 2>&5
16022 echo "$as_me:16022: \$? = $ac_status" >&5
16023 (exit $ac_status); }; }; then
16025 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
16028 echo "$as_me: failed program was:" >&5
16029 cat conftest.$ac_ext >&5
16031 rm -f conftest.$ac_objext conftest.$ac_ext
16032 CFLAGS="$cf_save_CFLAGS"
16033 echo "$as_me:16033: result: $CLANG_COMPILER" >&5
16034 echo "${ECHO_T}$CLANG_COMPILER" >&6
16037 cat > conftest.$ac_ext <<EOF
16038 #line 16038 "${as_me:-configure}"
16039 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16042 if test "$INTEL_COMPILER" = yes
16044 # The "-wdXXX" options suppress warnings:
16045 # remark #1419: external declaration in primary source file
16046 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16047 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16048 # remark #193: zero used for undefined preprocessing identifier
16049 # remark #593: variable "curs_sb_left_arrow" was set but never used
16050 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16051 # remark #869: parameter "tw" was never referenced
16052 # remark #981: operands are evaluated in unspecified order
16053 # warning #279: controlling expression is constant
16055 { echo "$as_me:16055: checking for $CC warning options..." >&5
16056 echo "$as_me: checking for $CC warning options..." >&6;}
16057 cf_save_CFLAGS="$CFLAGS"
16058 EXTRA_CFLAGS="-Wall"
16070 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16071 if { (eval echo "$as_me:16071: \"$ac_compile\"") >&5
16072 (eval $ac_compile) 2>&5
16074 echo "$as_me:16074: \$? = $ac_status" >&5
16075 (exit $ac_status); }; then
16076 test -n "$verbose" && echo "$as_me:16076: result: ... -$cf_opt" >&5
16077 echo "${ECHO_T}... -$cf_opt" >&6
16078 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16081 CFLAGS="$cf_save_CFLAGS"
16083 elif test "$GCC" = yes
16085 { echo "$as_me:16085: checking for $CC warning options..." >&5
16086 echo "$as_me: checking for $CC warning options..." >&6;}
16087 cf_save_CFLAGS="$CFLAGS"
16090 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16091 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16092 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16093 for cf_opt in W Wall \
16094 Wbad-function-cast \
16097 Wdeclaration-after-statement \
16100 Wmissing-declarations \
16101 Wmissing-prototypes \
16105 Wstrict-prototypes \
16106 Wundef $cf_gcc_warnings $cf_warn_CONST
16108 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16109 if { (eval echo "$as_me:16109: \"$ac_compile\"") >&5
16110 (eval $ac_compile) 2>&5
16112 echo "$as_me:16112: \$? = $ac_status" >&5
16113 (exit $ac_status); }; then
16114 test -n "$verbose" && echo "$as_me:16114: result: ... -$cf_opt" >&5
16115 echo "${ECHO_T}... -$cf_opt" >&6
16116 case $cf_opt in #(vi
16118 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
16121 case $GCC_VERSION in
16123 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
16125 echo "${as_me:-configure}:16125: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16130 Wpointer-arith) #(vi
16131 case $GCC_VERSION in
16133 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
16135 echo "${as_me:-configure}:16135: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16141 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16144 CFLAGS="$cf_save_CFLAGS"
16151 echo "$as_me:16151: checking if you want to use dmalloc for testing" >&5
16152 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
16154 # Check whether --with-dmalloc or --without-dmalloc was given.
16155 if test "${with_dmalloc+set}" = set; then
16156 withval="$with_dmalloc"
16158 cat >>confdefs.h <<EOF
16159 #define USE_DMALLOC 1
16162 : ${with_cflags:=-g}
16163 : ${with_no_leaks:=yes}
16168 echo "$as_me:16168: result: ${with_dmalloc:-no}" >&5
16169 echo "${ECHO_T}${with_dmalloc:-no}" >&6
16171 case .$with_cflags in #(vi
16173 case .$CFLAGS in #(vi
16181 cf_new_extra_cppflags=
16183 for cf_add_cflags in -g
16185 case $cf_fix_cppflags in
16187 case $cf_add_cflags in #(vi
16188 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
16189 case $cf_add_cflags in
16191 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16193 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16194 && test -z "${cf_tst_cflags}" \
16195 && cf_fix_cppflags=yes
16197 if test $cf_fix_cppflags = yes ; then
16198 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16200 elif test "${cf_tst_cflags}" = "\"'" ; then
16201 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16206 case "$CPPFLAGS" in
16207 *$cf_add_cflags) #(vi
16210 case $cf_add_cflags in #(vi
16212 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16214 CPPFLAGS=`echo "$CPPFLAGS" | \
16215 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16216 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16220 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16225 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16230 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16232 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16234 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16235 && test -z "${cf_tst_cflags}" \
16236 && cf_fix_cppflags=no
16241 if test -n "$cf_new_cflags" ; then
16243 CFLAGS="$CFLAGS $cf_new_cflags"
16246 if test -n "$cf_new_cppflags" ; then
16248 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
16251 if test -n "$cf_new_extra_cppflags" ; then
16253 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16261 if test "$with_dmalloc" = yes ; then
16262 echo "$as_me:16262: checking for dmalloc.h" >&5
16263 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
16264 if test "${ac_cv_header_dmalloc_h+set}" = set; then
16265 echo $ECHO_N "(cached) $ECHO_C" >&6
16267 cat >conftest.$ac_ext <<_ACEOF
16268 #line 16268 "configure"
16269 #include "confdefs.h"
16270 #include <dmalloc.h>
16272 if { (eval echo "$as_me:16272: \"$ac_cpp conftest.$ac_ext\"") >&5
16273 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16275 egrep -v '^ *\+' conftest.er1 >conftest.err
16277 cat conftest.err >&5
16278 echo "$as_me:16278: \$? = $ac_status" >&5
16279 (exit $ac_status); } >/dev/null; then
16280 if test -s conftest.err; then
16281 ac_cpp_err=$ac_c_preproc_warn_flag
16288 if test -z "$ac_cpp_err"; then
16289 ac_cv_header_dmalloc_h=yes
16291 echo "$as_me: failed program was:" >&5
16292 cat conftest.$ac_ext >&5
16293 ac_cv_header_dmalloc_h=no
16295 rm -f conftest.err conftest.$ac_ext
16297 echo "$as_me:16297: result: $ac_cv_header_dmalloc_h" >&5
16298 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
16299 if test $ac_cv_header_dmalloc_h = yes; then
16301 echo "$as_me:16301: checking for dmalloc_debug in -ldmalloc" >&5
16302 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
16303 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
16304 echo $ECHO_N "(cached) $ECHO_C" >&6
16306 ac_check_lib_save_LIBS=$LIBS
16307 LIBS="-ldmalloc $LIBS"
16308 cat >conftest.$ac_ext <<_ACEOF
16309 #line 16309 "configure"
16310 #include "confdefs.h"
16312 /* Override any gcc2 internal prototype to avoid an error. */
16316 /* We use char because int might match the return type of a gcc2
16317 builtin and then its argument prototype would still apply. */
16318 char dmalloc_debug ();
16327 rm -f conftest.$ac_objext conftest$ac_exeext
16328 if { (eval echo "$as_me:16328: \"$ac_link\"") >&5
16329 (eval $ac_link) 2>&5
16331 echo "$as_me:16331: \$? = $ac_status" >&5
16332 (exit $ac_status); } &&
16333 { ac_try='test -s conftest$ac_exeext'
16334 { (eval echo "$as_me:16334: \"$ac_try\"") >&5
16335 (eval $ac_try) 2>&5
16337 echo "$as_me:16337: \$? = $ac_status" >&5
16338 (exit $ac_status); }; }; then
16339 ac_cv_lib_dmalloc_dmalloc_debug=yes
16341 echo "$as_me: failed program was:" >&5
16342 cat conftest.$ac_ext >&5
16343 ac_cv_lib_dmalloc_dmalloc_debug=no
16345 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16346 LIBS=$ac_check_lib_save_LIBS
16348 echo "$as_me:16348: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
16349 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
16350 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
16351 cat >>confdefs.h <<EOF
16352 #define HAVE_LIBDMALLOC 1
16355 LIBS="-ldmalloc $LIBS"
16363 echo "$as_me:16363: checking if you want to use dbmalloc for testing" >&5
16364 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
16366 # Check whether --with-dbmalloc or --without-dbmalloc was given.
16367 if test "${with_dbmalloc+set}" = set; then
16368 withval="$with_dbmalloc"
16370 cat >>confdefs.h <<EOF
16371 #define USE_DBMALLOC 1
16374 : ${with_cflags:=-g}
16375 : ${with_no_leaks:=yes}
16380 echo "$as_me:16380: result: ${with_dbmalloc:-no}" >&5
16381 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
16383 case .$with_cflags in #(vi
16385 case .$CFLAGS in #(vi
16393 cf_new_extra_cppflags=
16395 for cf_add_cflags in -g
16397 case $cf_fix_cppflags in
16399 case $cf_add_cflags in #(vi
16400 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
16401 case $cf_add_cflags in
16403 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16405 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16406 && test -z "${cf_tst_cflags}" \
16407 && cf_fix_cppflags=yes
16409 if test $cf_fix_cppflags = yes ; then
16410 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16412 elif test "${cf_tst_cflags}" = "\"'" ; then
16413 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16418 case "$CPPFLAGS" in
16419 *$cf_add_cflags) #(vi
16422 case $cf_add_cflags in #(vi
16424 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16426 CPPFLAGS=`echo "$CPPFLAGS" | \
16427 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16428 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16432 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16437 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16442 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16444 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16446 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16447 && test -z "${cf_tst_cflags}" \
16448 && cf_fix_cppflags=no
16453 if test -n "$cf_new_cflags" ; then
16455 CFLAGS="$CFLAGS $cf_new_cflags"
16458 if test -n "$cf_new_cppflags" ; then
16460 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
16463 if test -n "$cf_new_extra_cppflags" ; then
16465 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16473 if test "$with_dbmalloc" = yes ; then
16474 echo "$as_me:16474: checking for dbmalloc.h" >&5
16475 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
16476 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
16477 echo $ECHO_N "(cached) $ECHO_C" >&6
16479 cat >conftest.$ac_ext <<_ACEOF
16480 #line 16480 "configure"
16481 #include "confdefs.h"
16482 #include <dbmalloc.h>
16484 if { (eval echo "$as_me:16484: \"$ac_cpp conftest.$ac_ext\"") >&5
16485 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16487 egrep -v '^ *\+' conftest.er1 >conftest.err
16489 cat conftest.err >&5
16490 echo "$as_me:16490: \$? = $ac_status" >&5
16491 (exit $ac_status); } >/dev/null; then
16492 if test -s conftest.err; then
16493 ac_cpp_err=$ac_c_preproc_warn_flag
16500 if test -z "$ac_cpp_err"; then
16501 ac_cv_header_dbmalloc_h=yes
16503 echo "$as_me: failed program was:" >&5
16504 cat conftest.$ac_ext >&5
16505 ac_cv_header_dbmalloc_h=no
16507 rm -f conftest.err conftest.$ac_ext
16509 echo "$as_me:16509: result: $ac_cv_header_dbmalloc_h" >&5
16510 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
16511 if test $ac_cv_header_dbmalloc_h = yes; then
16513 echo "$as_me:16513: checking for debug_malloc in -ldbmalloc" >&5
16514 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
16515 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
16516 echo $ECHO_N "(cached) $ECHO_C" >&6
16518 ac_check_lib_save_LIBS=$LIBS
16519 LIBS="-ldbmalloc $LIBS"
16520 cat >conftest.$ac_ext <<_ACEOF
16521 #line 16521 "configure"
16522 #include "confdefs.h"
16524 /* Override any gcc2 internal prototype to avoid an error. */
16528 /* We use char because int might match the return type of a gcc2
16529 builtin and then its argument prototype would still apply. */
16530 char debug_malloc ();
16539 rm -f conftest.$ac_objext conftest$ac_exeext
16540 if { (eval echo "$as_me:16540: \"$ac_link\"") >&5
16541 (eval $ac_link) 2>&5
16543 echo "$as_me:16543: \$? = $ac_status" >&5
16544 (exit $ac_status); } &&
16545 { ac_try='test -s conftest$ac_exeext'
16546 { (eval echo "$as_me:16546: \"$ac_try\"") >&5
16547 (eval $ac_try) 2>&5
16549 echo "$as_me:16549: \$? = $ac_status" >&5
16550 (exit $ac_status); }; }; then
16551 ac_cv_lib_dbmalloc_debug_malloc=yes
16553 echo "$as_me: failed program was:" >&5
16554 cat conftest.$ac_ext >&5
16555 ac_cv_lib_dbmalloc_debug_malloc=no
16557 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16558 LIBS=$ac_check_lib_save_LIBS
16560 echo "$as_me:16560: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
16561 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
16562 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
16563 cat >>confdefs.h <<EOF
16564 #define HAVE_LIBDBMALLOC 1
16567 LIBS="-ldbmalloc $LIBS"
16575 echo "$as_me:16575: checking if you want to use valgrind for testing" >&5
16576 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
16578 # Check whether --with-valgrind or --without-valgrind was given.
16579 if test "${with_valgrind+set}" = set; then
16580 withval="$with_valgrind"
16582 cat >>confdefs.h <<EOF
16583 #define USE_VALGRIND 1
16586 : ${with_cflags:=-g}
16587 : ${with_no_leaks:=yes}
16592 echo "$as_me:16592: result: ${with_valgrind:-no}" >&5
16593 echo "${ECHO_T}${with_valgrind:-no}" >&6
16595 case .$with_cflags in #(vi
16597 case .$CFLAGS in #(vi
16605 cf_new_extra_cppflags=
16607 for cf_add_cflags in -g
16609 case $cf_fix_cppflags in
16611 case $cf_add_cflags in #(vi
16612 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
16613 case $cf_add_cflags in
16615 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16617 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16618 && test -z "${cf_tst_cflags}" \
16619 && cf_fix_cppflags=yes
16621 if test $cf_fix_cppflags = yes ; then
16622 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16624 elif test "${cf_tst_cflags}" = "\"'" ; then
16625 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16630 case "$CPPFLAGS" in
16631 *$cf_add_cflags) #(vi
16634 case $cf_add_cflags in #(vi
16636 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16638 CPPFLAGS=`echo "$CPPFLAGS" | \
16639 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16640 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16644 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16649 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16654 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16656 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16658 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16659 && test -z "${cf_tst_cflags}" \
16660 && cf_fix_cppflags=no
16665 if test -n "$cf_new_cflags" ; then
16667 CFLAGS="$CFLAGS $cf_new_cflags"
16670 if test -n "$cf_new_cppflags" ; then
16672 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
16675 if test -n "$cf_new_extra_cppflags" ; then
16677 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16685 echo "$as_me:16685: checking if you want to perform memory-leak testing" >&5
16686 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
16688 # Check whether --enable-leaks or --disable-leaks was given.
16689 if test "${enable_leaks+set}" = set; then
16690 enableval="$enable_leaks"
16691 if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
16693 : ${with_no_leaks:=no}
16695 echo "$as_me:16695: result: $with_no_leaks" >&5
16696 echo "${ECHO_T}$with_no_leaks" >&6
16698 if test "$with_no_leaks" = yes ; then
16700 cat >>confdefs.h <<\EOF
16704 cat >>confdefs.h <<\EOF
16705 #define YY_NO_LEAKS 1
16711 echo "$as_me:16711: checking for an rpath option" >&5
16712 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
16713 case $cf_cv_system_name in #(vi
16715 if test "$GCC" = yes; then
16716 LD_RPATH_OPT="-Wl,-rpath,"
16718 LD_RPATH_OPT="-rpath "
16721 linux*|gnu*|k*bsd*-gnu) #(vi
16722 LD_RPATH_OPT="-Wl,-rpath,"
16724 openbsd[2-9].*|mirbsd*) #(vi
16725 LD_RPATH_OPT="-Wl,-rpath,"
16727 dragonfly*|freebsd*) #(vi
16728 LD_RPATH_OPT="-rpath "
16731 LD_RPATH_OPT="-Wl,-rpath,"
16734 LD_RPATH_OPT="-rpath "
16742 echo "$as_me:16742: result: $LD_RPATH_OPT" >&5
16743 echo "${ECHO_T}$LD_RPATH_OPT" >&6
16745 case "x$LD_RPATH_OPT" in #(vi
16747 echo "$as_me:16747: checking if we need a space after rpath option" >&5
16748 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
16749 cf_save_LIBS="$LIBS"
16751 cf_add_libs="${LD_RPATH_OPT}$libdir"
16752 # Filter out duplicates - this happens with badly-designed ".pc" files...
16753 for cf_add_1lib in $LIBS
16755 for cf_add_2lib in $cf_add_libs
16757 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16763 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16765 LIBS="$cf_add_libs"
16767 cat >conftest.$ac_ext <<_ACEOF
16768 #line 16768 "configure"
16769 #include "confdefs.h"
16779 rm -f conftest.$ac_objext conftest$ac_exeext
16780 if { (eval echo "$as_me:16780: \"$ac_link\"") >&5
16781 (eval $ac_link) 2>&5
16783 echo "$as_me:16783: \$? = $ac_status" >&5
16784 (exit $ac_status); } &&
16785 { ac_try='test -s conftest$ac_exeext'
16786 { (eval echo "$as_me:16786: \"$ac_try\"") >&5
16787 (eval $ac_try) 2>&5
16789 echo "$as_me:16789: \$? = $ac_status" >&5
16790 (exit $ac_status); }; }; then
16793 echo "$as_me: failed program was:" >&5
16794 cat conftest.$ac_ext >&5
16797 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16798 LIBS="$cf_save_LIBS"
16799 echo "$as_me:16799: result: $cf_rpath_space" >&5
16800 echo "${ECHO_T}$cf_rpath_space" >&6
16801 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
16805 echo "$as_me:16805: checking if rpath-hack should be disabled" >&5
16806 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
16808 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
16809 if test "${enable_rpath_hack+set}" = set; then
16810 enableval="$enable_rpath_hack"
16811 test "$enableval" != no && enableval=yes
16812 if test "$enableval" != "yes" ; then
16813 cf_disable_rpath_hack=yes
16815 cf_disable_rpath_hack=no
16819 cf_disable_rpath_hack=no
16822 echo "$as_me:16822: result: $cf_disable_rpath_hack" >&5
16823 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
16824 if test "$cf_disable_rpath_hack" = no ; then
16826 echo "$as_me:16826: checking for updated LDFLAGS" >&5
16827 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
16828 if test -n "$LD_RPATH_OPT" ; then
16829 echo "$as_me:16829: result: maybe" >&5
16830 echo "${ECHO_T}maybe" >&6
16834 # Extract the first word of "$ac_prog", so it can be a program name with args.
16835 set dummy $ac_prog; ac_word=$2
16836 echo "$as_me:16836: checking for $ac_word" >&5
16837 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16838 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
16839 echo $ECHO_N "(cached) $ECHO_C" >&6
16841 if test -n "$cf_ldd_prog"; then
16842 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
16844 ac_save_IFS=$IFS; IFS=$ac_path_separator
16846 for ac_dir in $ac_dummy; do
16848 test -z "$ac_dir" && ac_dir=.
16849 $as_executable_p "$ac_dir/$ac_word" || continue
16850 ac_cv_prog_cf_ldd_prog="$ac_prog"
16851 echo "$as_me:16851: found $ac_dir/$ac_word" >&5
16857 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
16858 if test -n "$cf_ldd_prog"; then
16859 echo "$as_me:16859: result: $cf_ldd_prog" >&5
16860 echo "${ECHO_T}$cf_ldd_prog" >&6
16862 echo "$as_me:16862: result: no" >&5
16863 echo "${ECHO_T}no" >&6
16866 test -n "$cf_ldd_prog" && break
16868 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
16870 cf_rpath_list="/usr/lib /lib"
16871 if test "$cf_ldd_prog" != no
16875 cat >conftest.$ac_ext <<_ACEOF
16876 #line 16876 "configure"
16877 #include "confdefs.h"
16887 rm -f conftest.$ac_objext conftest$ac_exeext
16888 if { (eval echo "$as_me:16888: \"$ac_link\"") >&5
16889 (eval $ac_link) 2>&5
16891 echo "$as_me:16891: \$? = $ac_status" >&5
16892 (exit $ac_status); } &&
16893 { ac_try='test -s conftest$ac_exeext'
16894 { (eval echo "$as_me:16894: \"$ac_try\"") >&5
16895 (eval $ac_try) 2>&5
16897 echo "$as_me:16897: \$? = $ac_status" >&5
16898 (exit $ac_status); }; }; then
16899 cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
16900 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
16902 echo "$as_me: failed program was:" >&5
16903 cat conftest.$ac_ext >&5
16905 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16907 # If we passed the link-test, but get a "not found" on a given library,
16908 # this could be due to inept reconfiguration of gcc to make it only
16909 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
16910 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
16911 # /usr/local libraries.
16912 if test -n "$cf_rpath_oops"
16914 for cf_rpath_src in $cf_rpath_oops
16916 for cf_rpath_dir in \
16921 if test -f $cf_rpath_dir/lib/$cf_rpath_src
16923 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
16925 echo "${as_me:-configure}:16925: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
16927 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
16935 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16937 echo "${as_me:-configure}:16937: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16939 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
16941 echo "${as_me:-configure}:16941: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
16944 for cf_rpath_src in $LDFLAGS
16946 case $cf_rpath_src in #(vi
16949 # check if this refers to a directory which we will ignore
16951 if test -n "$cf_rpath_list"
16953 for cf_rpath_item in $cf_rpath_list
16955 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
16963 if test "$cf_rpath_skip" = no
16965 # transform the option
16966 if test "$LD_RPATH_OPT" = "-R " ; then
16967 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
16969 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
16972 # if we have not already added this, add it now
16973 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
16974 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
16976 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
16978 echo "${as_me:-configure}:16978: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
16980 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
16985 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
16987 LDFLAGS=$cf_rpath_dst
16989 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
16991 echo "${as_me:-configure}:16991: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
16993 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
16995 echo "${as_me:-configure}:16995: testing ...checking LIBS $LIBS ..." 1>&5
16998 for cf_rpath_src in $LIBS
17000 case $cf_rpath_src in #(vi
17003 # check if this refers to a directory which we will ignore
17005 if test -n "$cf_rpath_list"
17007 for cf_rpath_item in $cf_rpath_list
17009 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
17017 if test "$cf_rpath_skip" = no
17019 # transform the option
17020 if test "$LD_RPATH_OPT" = "-R " ; then
17021 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
17023 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
17026 # if we have not already added this, add it now
17027 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
17028 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
17030 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
17032 echo "${as_me:-configure}:17032: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
17034 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
17039 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
17043 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
17045 echo "${as_me:-configure}:17045: testing ...checked LIBS $LIBS ..." 1>&5
17047 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
17049 echo "${as_me:-configure}:17049: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
17052 echo "$as_me:17052: result: no" >&5
17053 echo "${ECHO_T}no" >&6
17061 ac_config_files="$ac_config_files Makefile"
17062 ac_config_commands="$ac_config_commands default"
17063 cat >confcache <<\_ACEOF
17064 # This file is a shell script that caches the results of configure
17065 # tests run on this system so they can be shared between configure
17066 # scripts and configure runs, see configure's option --config-cache.
17067 # It is not useful on other systems. If it contains results you don't
17068 # want to keep, you may remove or edit it.
17070 # config.status only pays attention to the cache file if you give it
17071 # the --recheck option to rerun configure.
17073 # `ac_cv_env_foo' variables (set or unset) will be overriden when
17074 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17075 # following values.
17079 # The following way of writing the cache mishandles newlines in values,
17080 # but we know of no workaround that is simple, portable, and efficient.
17081 # So, don't put newlines in cache variables' values.
17082 # Ultrix sh set writes to stderr and can't be redirected directly,
17083 # and sets the high bit in the cache file unless we assign to the vars.
17086 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17088 # `set' does not quote correctly, so add quotes (double-quote
17089 # substitution turns \\\\ into \\, and sed turns \\ into \).
17092 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17095 # `set' quotes correctly as required by POSIX, so do not add quotes.
17097 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17104 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17106 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17108 if cmp -s $cache_file confcache; then :; else
17109 if test -w $cache_file; then
17110 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17111 cat confcache >$cache_file
17113 echo "not updating unwritable cache $cache_file"
17118 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17119 # Let make expand exec_prefix.
17120 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17122 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17123 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17124 # trailing colons and then remove the whole line if VPATH becomes empty
17125 # (actually we leave an empty line to preserve line numbers).
17126 if test "x$srcdir" = x.; then
17127 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17128 s/:*\$(srcdir):*/:/;
17129 s/:*\${srcdir}:*/:/;
17131 s/^\([^=]*=[ ]*\):*/\1/;
17137 DEFS=-DHAVE_CONFIG_H
17139 : ${CONFIG_STATUS=./config.status}
17140 ac_clean_files_save=$ac_clean_files
17141 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17142 { echo "$as_me:17142: creating $CONFIG_STATUS" >&5
17143 echo "$as_me: creating $CONFIG_STATUS" >&6;}
17144 cat >$CONFIG_STATUS <<_ACEOF
17146 # Generated automatically by configure.
17147 # Run this file to recreate the current configuration.
17148 # Compiler output produced by configure, useful for debugging
17149 # configure, is in config.log if it exists.
17152 SHELL=\${CONFIG_SHELL-$SHELL}
17153 ac_cs_invocation="\$0 \$@"
17157 cat >>$CONFIG_STATUS <<\_ACEOF
17158 # Be Bourne compatible
17159 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17162 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17166 # Name of the executable.
17167 as_me=`echo "$0" |sed 's,.*[\\/],,'`
17169 if expr a : '\(a\)' >/dev/null 2>&1; then
17175 rm -f conf$$ conf$$.exe conf$$.file
17177 if ln -s conf$$.file conf$$ 2>/dev/null; then
17178 # We could just check for DJGPP; but this test a) works b) is more generic
17179 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17180 if test -f conf$$.exe; then
17181 # Don't use ln at all; we don't have any links
17186 elif ln conf$$.file conf$$ 2>/dev/null; then
17191 rm -f conf$$ conf$$.exe conf$$.file
17193 as_executable_p="test -f"
17195 # Support unset when possible.
17196 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17203 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
17204 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
17205 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
17206 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
17207 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
17208 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
17209 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
17210 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
17213 # We need space, tab and new line, in precisely that order.
17219 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
17225 # Files that config.status was made for.
17226 if test -n "$ac_config_files"; then
17227 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17230 if test -n "$ac_config_headers"; then
17231 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17234 if test -n "$ac_config_links"; then
17235 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17238 if test -n "$ac_config_commands"; then
17239 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17242 cat >>$CONFIG_STATUS <<\EOF
17245 \`$as_me' instantiates files from templates according to the
17246 current configuration.
17248 Usage: $0 [OPTIONS] [FILE]...
17250 -h, --help print this help, then exit
17251 -V, --version print version number, then exit
17252 -d, --debug don't remove temporary files
17253 --recheck update $as_me by reconfiguring in the same conditions
17254 --file=FILE[:TEMPLATE]
17255 instantiate the configuration file FILE
17256 --header=FILE[:TEMPLATE]
17257 instantiate the configuration header FILE
17259 Configuration files:
17262 Configuration headers:
17265 Configuration commands:
17268 Report bugs to <dickey@invisible-island.net>."
17271 cat >>$CONFIG_STATUS <<EOF
17274 configured by $0, generated by GNU Autoconf 2.52.20121002,
17275 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17277 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17278 Free Software Foundation, Inc.
17279 This config.status script is free software; the Free Software Foundation
17280 gives unlimited permission to copy, distribute and modify it."
17285 cat >>$CONFIG_STATUS <<\EOF
17286 # If no file are specified by the user, then we need to provide default
17287 # value. By we need to know if files were specified by the user.
17293 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17294 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17296 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17300 *) # This is not an option, so the user has probably given explicit
17302 ac_need_defaults=false;;
17306 # Handling of the options.
17308 cat >>$CONFIG_STATUS <<EOF
17309 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17310 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17311 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17313 cat >>$CONFIG_STATUS <<\EOF
17314 --version | --vers* | -V )
17315 echo "$ac_cs_version"; exit 0 ;;
17317 # Conflict between --help and --header
17318 { { echo "$as_me:17318: error: ambiguous option: $1
17319 Try \`$0 --help' for more information." >&5
17320 echo "$as_me: error: ambiguous option: $1
17321 Try \`$0 --help' for more information." >&2;}
17322 { (exit 1); exit 1; }; };;
17323 --help | --hel | -h )
17324 echo "$ac_cs_usage"; exit 0 ;;
17325 --debug | --d* | -d )
17327 --file | --fil | --fi | --f )
17329 CONFIG_FILES="$CONFIG_FILES $1"
17330 ac_need_defaults=false;;
17331 --header | --heade | --head | --hea )
17333 CONFIG_HEADERS="$CONFIG_HEADERS $1"
17334 ac_need_defaults=false;;
17336 # This is an error.
17337 -*) { { echo "$as_me:17337: error: unrecognized option: $1
17338 Try \`$0 --help' for more information." >&5
17339 echo "$as_me: error: unrecognized option: $1
17340 Try \`$0 --help' for more information." >&2;}
17341 { (exit 1); exit 1; }; } ;;
17343 *) ac_config_targets="$ac_config_targets $1" ;;
17352 ## ----------------------- ##
17353 ## Running config.status. ##
17354 ## ----------------------- ##
17356 This file was extended by $as_me 2.52.20121002, executed with
17357 CONFIG_FILES = $CONFIG_FILES
17358 CONFIG_HEADERS = $CONFIG_HEADERS
17359 CONFIG_LINKS = $CONFIG_LINKS
17360 CONFIG_COMMANDS = $CONFIG_COMMANDS
17361 > $ac_cs_invocation
17362 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17367 cat >>$CONFIG_STATUS <<EOF
17369 # INIT-COMMANDS section.
17379 cat >>$CONFIG_STATUS <<\EOF
17380 for ac_config_target in $ac_config_targets
17382 case "$ac_config_target" in
17383 # Handling of arguments.
17384 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17385 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17386 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
17387 *) { { echo "$as_me:17387: error: invalid argument: $ac_config_target" >&5
17388 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17389 { (exit 1); exit 1; }; };;
17393 # If the user did not use the arguments to specify the items to instantiate,
17394 # then the envvar interface is used. Set only those that are not.
17395 # We use the long form for the default assignment because of an extremely
17396 # bizarre bug on SunOS 4.1.3.
17397 if $ac_need_defaults; then
17398 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17399 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17400 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17403 # Create a temporary directory, and hook for its removal unless debugging.
17406 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17407 trap '{ (exit 1); exit 1; }' 1 2 13 15
17410 # Create a (secure) tmp directory for tmp files.
17413 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17414 test -n "$tmp" && test -d "$tmp"
17417 tmp=$TMPDIR/cs$$-$RANDOM
17418 (umask 077 && mkdir $tmp)
17421 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17422 { (exit 1); exit 1; }
17427 cat >>$CONFIG_STATUS <<EOF
17430 # CONFIG_FILES section.
17433 # No need to generate the scripts if there are no CONFIG_FILES.
17434 # This happens for instance when ./config.status config.h
17435 if test -n "\$CONFIG_FILES"; then
17436 # Protect against being on the right side of a sed subst in config.status.
17437 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17438 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17439 s,@SHELL@,$SHELL,;t t
17440 s,@exec_prefix@,$exec_prefix,;t t
17441 s,@prefix@,$prefix,;t t
17442 s,@program_transform_name@,$program_transform_name,;t t
17443 s,@bindir@,$bindir,;t t
17444 s,@sbindir@,$sbindir,;t t
17445 s,@libexecdir@,$libexecdir,;t t
17446 s,@datarootdir@,$datarootdir,;t t
17447 s,@datadir@,$datadir,;t t
17448 s,@sysconfdir@,$sysconfdir,;t t
17449 s,@sharedstatedir@,$sharedstatedir,;t t
17450 s,@localstatedir@,$localstatedir,;t t
17451 s,@libdir@,$libdir,;t t
17452 s,@includedir@,$includedir,;t t
17453 s,@oldincludedir@,$oldincludedir,;t t
17454 s,@infodir@,$infodir,;t t
17455 s,@mandir@,$mandir,;t t
17456 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17457 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17458 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17459 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17460 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17461 s,@build_alias@,$build_alias,;t t
17462 s,@host_alias@,$host_alias,;t t
17463 s,@target_alias@,$target_alias,;t t
17464 s,@ECHO_C@,$ECHO_C,;t t
17465 s,@ECHO_N@,$ECHO_N,;t t
17466 s,@ECHO_T@,$ECHO_T,;t t
17467 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17468 s,@DEFS@,$DEFS,;t t
17469 s,@LIBS@,$LIBS,;t t
17470 s,@build@,$build,;t t
17471 s,@build_cpu@,$build_cpu,;t t
17472 s,@build_vendor@,$build_vendor,;t t
17473 s,@build_os@,$build_os,;t t
17474 s,@host@,$host,;t t
17475 s,@host_cpu@,$host_cpu,;t t
17476 s,@host_vendor@,$host_vendor,;t t
17477 s,@host_os@,$host_os,;t t
17478 s,@SET_MAKE@,$SET_MAKE,;t t
17480 s,@CFLAGS@,$CFLAGS,;t t
17481 s,@LDFLAGS@,$LDFLAGS,;t t
17482 s,@CPPFLAGS@,$CPPFLAGS,;t t
17483 s,@ac_ct_CC@,$ac_ct_CC,;t t
17484 s,@EXEEXT@,$EXEEXT,;t t
17485 s,@OBJEXT@,$OBJEXT,;t t
17486 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
17489 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17490 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17491 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17492 s,@LINT@,$LINT,;t t
17493 s,@LINT_OPTS@,$LINT_OPTS,;t t
17494 s,@CTAGS@,$CTAGS,;t t
17495 s,@ETAGS@,$ETAGS,;t t
17496 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
17497 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
17498 s,@MATH_LIB@,$MATH_LIB,;t t
17499 s,@top_builddir@,$top_builddir,;t t
17500 s,@CC_G_OPT@,$CC_G_OPT,;t t
17501 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
17502 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
17503 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
17504 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
17506 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
17507 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
17508 s,@LD_MODEL@,$LD_MODEL,;t t
17509 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
17510 s,@LIBTOOL@,$LIBTOOL,;t t
17511 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
17512 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
17513 s,@LIB_LINK@,$LIB_LINK,;t t
17514 s,@LINK_TESTS@,$LINK_TESTS,;t t
17515 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
17516 s,@PTHREAD@,$PTHREAD,;t t
17517 s,@TEST_ARGS@,$TEST_ARGS,;t t
17518 s,@TEST_DEPS@,$TEST_DEPS,;t t
17519 s,@TEST_LIBS@,$TEST_LIBS,;t t
17520 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
17521 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
17522 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
17523 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
17524 s,@includesubdir@,$includesubdir,;t t
17525 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
17526 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
17527 s,@ECHO_LT@,$ECHO_LT,;t t
17528 s,@ECHO_LD@,$ECHO_LD,;t t
17529 s,@RULE_CC@,$RULE_CC,;t t
17530 s,@SHOW_CC@,$SHOW_CC,;t t
17531 s,@ECHO_CC@,$ECHO_CC,;t t
17532 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
17533 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
17534 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
17535 s,@X_CFLAGS@,$X_CFLAGS,;t t
17536 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
17537 s,@X_LIBS@,$X_LIBS,;t t
17538 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
17539 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
17540 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
17541 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
17542 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
17543 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
17548 cat >>$CONFIG_STATUS <<\EOF
17549 # Split the substitutions into bite-sized pieces for seds with
17550 # small command number limits, like on Digital OSF/1 and HP-UX.
17551 ac_max_sed_lines=48
17552 ac_sed_frag=1 # Number of current file.
17553 ac_beg=1 # First line for current file.
17554 ac_end=$ac_max_sed_lines # Line after last line for current file.
17557 while $ac_more_lines; do
17558 if test $ac_beg -gt 1; then
17559 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17561 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17563 if test ! -s $tmp/subs.frag; then
17564 ac_more_lines=false
17566 # The purpose of the label and of the branching condition is to
17567 # speed up the sed processing (if there are no `@' at all, there
17568 # is no need to browse any of the substitutions).
17569 # These are the two extra sed commands mentioned above.
17571 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17572 if test -z "$ac_sed_cmds"; then
17573 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17575 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17577 ac_sed_frag=`expr $ac_sed_frag + 1`
17579 ac_end=`expr $ac_end + $ac_max_sed_lines`
17582 if test -z "$ac_sed_cmds"; then
17585 fi # test -n "$CONFIG_FILES"
17588 cat >>$CONFIG_STATUS <<\EOF
17589 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17590 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17592 - | *:- | *:-:* ) # input from stdin
17594 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17595 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17596 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17597 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17598 * ) ac_file_in=$ac_file.in ;;
17601 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17602 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17603 X"$ac_file" : 'X\(//\)[^/]' \| \
17604 X"$ac_file" : 'X\(//\)$' \| \
17605 X"$ac_file" : 'X\(/\)' \| \
17606 . : '\(.\)' 2>/dev/null ||
17608 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17609 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17610 /^X\(\/\/\)$/{ s//\1/; q; }
17611 /^X\(\/\).*/{ s//\1/; q; }
17613 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17614 { case "$ac_dir" in
17615 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17619 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17620 case $as_mkdir_dir in
17621 # Skip DOS drivespec
17622 ?:) as_incr_dir=$as_mkdir_dir ;;
17624 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17625 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17630 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
17631 # A "../" for each directory in $ac_dir_suffix.
17632 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
17634 ac_dir_suffix= ac_dots=
17639 if test -z "$ac_dots"; then
17642 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
17644 [\\/]* | ?:[\\/]* )
17645 ac_srcdir=$srcdir$ac_dir_suffix;
17646 ac_top_srcdir=$srcdir ;;
17647 *) # Relative path.
17648 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
17649 ac_top_srcdir=$ac_dots$srcdir ;;
17653 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17654 *) ac_INSTALL=$ac_dots$INSTALL ;;
17657 if test x"$ac_file" != x-; then
17658 { echo "$as_me:17658: creating $ac_file" >&5
17659 echo "$as_me: creating $ac_file" >&6;}
17662 # Let's still pretend it is `configure' which instantiates (i.e., don't
17663 # use $as_me), people would be surprised to read:
17664 # /* config.h. Generated automatically by config.status. */
17665 configure_input="Generated automatically from `echo $ac_file_in |
17666 sed 's,.*/,,'` by configure."
17668 # First look for the input files in the build tree, otherwise in the
17670 ac_file_inputs=`IFS=:
17671 for f in $ac_file_in; do
17673 -) echo $tmp/stdin ;;
17675 # Absolute (can't be DOS-style, as IFS=:)
17676 test -f "$f" || { { echo "$as_me:17676: error: cannot find input file: $f" >&5
17677 echo "$as_me: error: cannot find input file: $f" >&2;}
17678 { (exit 1); exit 1; }; }
17681 if test -f "$f"; then
17684 elif test -f "$srcdir/$f"; then
17689 { { echo "$as_me:17689: error: cannot find input file: $f" >&5
17690 echo "$as_me: error: cannot find input file: $f" >&2;}
17691 { (exit 1); exit 1; }; }
17694 done` || { (exit 1); exit 1; }
17696 cat >>$CONFIG_STATUS <<\EOF
17697 ac_warn_datarootdir=no
17698 if test x"$ac_file" != x-; then
17699 for ac_item in $ac_file_inputs
17701 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
17702 if test -n "$ac_seen"; then
17703 ac_used=`grep '@datarootdir@' $ac_item`
17704 if test -z "$ac_used"; then
17705 { echo "$as_me:17705: WARNING: datarootdir was used implicitly but not set:
17707 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
17709 ac_warn_datarootdir=yes
17712 ac_seen=`grep '${datarootdir}' $ac_item`
17713 if test -n "$ac_seen"; then
17714 { echo "$as_me:17714: WARNING: datarootdir was used explicitly but not set:
17716 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
17718 ac_warn_datarootdir=yes
17723 if test "x$ac_warn_datarootdir" = xyes; then
17724 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
17728 cat >>$CONFIG_STATUS <<EOF
17732 cat >>$CONFIG_STATUS <<\EOF
17734 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17735 s,@configure_input@,$configure_input,;t t
17736 s,@srcdir@,$ac_srcdir,;t t
17737 s,@top_srcdir@,$ac_top_srcdir,;t t
17738 s,@INSTALL@,$ac_INSTALL,;t t
17739 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17741 if test x"$ac_file" != x-; then
17742 cp $tmp/out $ac_file
17744 for ac_name in prefix exec_prefix datarootdir
17746 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
17747 if test -n "$ac_seen"; then
17748 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
17749 if test -z "$ac_init"; then
17750 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
17751 { echo "$as_me:17751: WARNING: Variable $ac_name is used but was not set:
17753 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
17758 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
17759 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
17760 if test -s $tmp/out; then
17761 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
17762 { echo "$as_me:17762: WARNING: Some variables may not be substituted:
17764 echo "$as_me: WARNING: Some variables may not be substituted:
17774 cat >>$CONFIG_STATUS <<\EOF
17777 # CONFIG_HEADER section.
17780 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17781 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17783 # ac_d sets the value in "#define NAME VALUE" lines.
17784 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17785 ac_dB='[ ].*$,\1#\2'
17788 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17789 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17790 ac_iB='\([ ]\),\1#\2define\3'
17793 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17794 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17795 ac_uB='$,\1#\2define\3'
17799 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
17800 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17802 - | *:- | *:-:* ) # input from stdin
17804 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17805 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17806 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17807 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17808 * ) ac_file_in=$ac_file.in ;;
17811 test x"$ac_file" != x- && { echo "$as_me:17811: creating $ac_file" >&5
17812 echo "$as_me: creating $ac_file" >&6;}
17814 # First look for the input files in the build tree, otherwise in the
17816 ac_file_inputs=`IFS=:
17817 for f in $ac_file_in; do
17819 -) echo $tmp/stdin ;;
17821 # Absolute (can't be DOS-style, as IFS=:)
17822 test -f "$f" || { { echo "$as_me:17822: error: cannot find input file: $f" >&5
17823 echo "$as_me: error: cannot find input file: $f" >&2;}
17824 { (exit 1); exit 1; }; }
17827 if test -f "$f"; then
17830 elif test -f "$srcdir/$f"; then
17835 { { echo "$as_me:17835: error: cannot find input file: $f" >&5
17836 echo "$as_me: error: cannot find input file: $f" >&2;}
17837 { (exit 1); exit 1; }; }
17840 done` || { (exit 1); exit 1; }
17841 # Remove the trailing spaces.
17842 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
17846 # Transform confdefs.h into a list of #define's. We won't use it as a sed
17847 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
17848 # be either 'cat' or 'sort'.
17849 cat confdefs.h | uniq >conftest.vals
17851 # Break up conftest.vals because some shells have a limit on
17852 # the size of here documents, and old seds have small limits too.
17854 rm -f conftest.tail
17855 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
17856 while grep . conftest.vals >/dev/null
17858 # Write chunks of a limited-size here document to conftest.frag.
17859 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
17860 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
17861 echo 'CEOF' >> $CONFIG_STATUS
17862 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17863 rm -f conftest.vals
17864 mv conftest.tail conftest.vals
17866 rm -f conftest.vals
17868 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
17870 echo ' cat >> conftest.edit <<CEOF
17871 /@DEFS@/r conftest.frag
17874 sed -f conftest.edit $tmp/in > $tmp/out
17876 mv $tmp/out $tmp/in
17877 rm -f conftest.edit conftest.frag
17878 ' >> $CONFIG_STATUS
17880 cat >>$CONFIG_STATUS <<\EOF
17881 # Let's still pretend it is `configure' which instantiates (i.e., don't
17882 # use $as_me), people would be surprised to read:
17883 # /* config.h. Generated automatically by config.status. */
17884 if test x"$ac_file" = x-; then
17885 echo "/* Generated automatically by configure. */" >$tmp/config.h
17887 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
17889 cat $tmp/in >>$tmp/config.h
17891 if test x"$ac_file" != x-; then
17892 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17893 { echo "$as_me:17893: $ac_file is unchanged" >&5
17894 echo "$as_me: $ac_file is unchanged" >&6;}
17896 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17897 X"$ac_file" : 'X\(//\)[^/]' \| \
17898 X"$ac_file" : 'X\(//\)$' \| \
17899 X"$ac_file" : 'X\(/\)' \| \
17900 . : '\(.\)' 2>/dev/null ||
17902 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17903 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17904 /^X\(\/\/\)$/{ s//\1/; q; }
17905 /^X\(\/\).*/{ s//\1/; q; }
17907 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17908 { case "$ac_dir" in
17909 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17913 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17914 case $as_mkdir_dir in
17915 # Skip DOS drivespec
17916 ?:) as_incr_dir=$as_mkdir_dir ;;
17918 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17919 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17926 mv $tmp/config.h $ac_file
17930 rm -f $tmp/config.h
17934 cat >>$CONFIG_STATUS <<\EOF
17936 # CONFIG_COMMANDS section.
17938 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17939 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17940 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17947 if test ! -d $srcdir/$cf_dir; then
17949 elif test -f $srcdir/$cf_dir/programs; then
17950 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
17954 cat >>Makefile <<TEST_EOF
17956 # These rules are generated so we do not rely on suffix rules, which do not
17957 # work consistently for different make-programs (the '\$(MODEL)/' confuses
17958 # some, and the '\$x' confuses others).
17961 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
17964 cat >>Makefile <<TEST_EOF
17966 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
17967 \$(srcdir)/test.priv.h \\
17970 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) \$(srcdir)/$N.c
17974 if test -f ../config.guess && test -f ../config.sub
17976 cat >>Makefile <<TEST_EOF
17978 # if we used CF_INHERIT for getting these files, we can remove them
17980 rm -f config.guess config.sub
17988 cat >>$CONFIG_STATUS <<\EOF
17990 { (exit 0); exit 0; }
17992 chmod +x $CONFIG_STATUS
17993 ac_clean_files=$ac_clean_files_save
17995 # configure is writing to config.log, and then calls config.status.
17996 # config.status does its own redirection, appending to config.log.
17997 # Unfortunately, on DOS this fails, as config.log is still kept open
17998 # by configure, so config.status won't be able to write to it; its
17999 # output is simply discarded. So we exec the FD to /dev/null,
18000 # effectively closing config.log, so it can be properly (re)opened and
18001 # appended to by config.status. When coming back to configure, we
18002 # need to make the FD available again.
18003 if test "$no_create" != yes; then
18006 $SHELL $CONFIG_STATUS || ac_cs_success=false
18008 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18009 # would make configure fail if this is the last instruction.
18010 $ac_cs_success || { (exit 1); exit 1; }