2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20170501.
5 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
6 # Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
10 # Avoid depending upon Character Ranges.
11 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14 as_cr_digits='0123456789'
15 as_cr_alnum=$as_cr_Letters$as_cr_digits
17 # Sed expression to map a string onto a valid variable name.
18 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20 # Sed expression to map a string onto a valid CPP name.
21 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23 # Be Bourne compatible
24 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
31 # Name of the executable.
32 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34 if expr a : '\(a\)' >/dev/null 2>&1; then
40 rm -f conf$$ conf$$.exe conf$$.file
42 if ln -s conf$$.file conf$$ 2>/dev/null; then
43 # We could just check for DJGPP; but this test a) works b) is more generic
44 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45 if test -f conf$$.exe; then
46 # Don't use ln at all; we don't have any links
51 elif ln conf$$.file conf$$ 2>/dev/null; then
56 rm -f conf$$ conf$$.exe conf$$.file
58 as_executable_p="test -f"
60 # Support unset when possible.
61 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
68 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
69 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
70 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
71 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
72 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
73 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
74 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
75 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78 # We need space, tab and new line, in precisely that order.
84 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
88 # so uname gets run too.
89 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
96 ac_default_prefix=/usr/local
100 SHELL=${CONFIG_SHELL-/bin/sh}
102 # Maximum number of lines to put in a shell here document.
103 # This variable seems obsolete. It should probably be removed, and
104 # only ac_max_sed_lines should be used.
105 : ${ac_max_here_lines=38}
107 ac_unique_file="ncurses.c"
109 # Initialize some variables set by options.
111 ac_init_version=false
112 # The variables have the same names as the options, with
113 # dashes changed to underlines.
121 program_transform_name=s,x,x,
129 # Installation directory options.
130 # These are left unexpanded so users can "make install exec_prefix=/foo"
131 # and all the variables that are supposed to be based on exec_prefix
132 # by default will actually change.
133 # Use braces instead of parens because sh, perl, etc. also accept them.
134 bindir='${exec_prefix}/bin'
135 sbindir='${exec_prefix}/sbin'
136 libexecdir='${exec_prefix}/libexec'
137 datarootdir='${prefix}/share'
138 datadir='${datarootdir}'
139 sysconfdir='${prefix}/etc'
140 sharedstatedir='${prefix}/com'
141 localstatedir='${prefix}/var'
142 libdir='${exec_prefix}/lib'
143 includedir='${prefix}/include'
144 oldincludedir='/usr/include'
145 infodir='${datarootdir}/info'
146 mandir='${datarootdir}/man'
148 # Identity of this package.
158 # If the previous option needs an argument, assign it.
159 if test -n "$ac_prev"; then
160 eval "$ac_prev=\$ac_option"
165 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
167 # Accept the important Cygnus configure options, so we can diagnose typos.
171 -bindir | --bindir | --bindi | --bind | --bin | --bi)
173 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
176 -build | --build | --buil | --bui | --bu)
177 ac_prev=build_alias ;;
178 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
179 build_alias=$ac_optarg ;;
181 -cache-file | --cache-file | --cache-fil | --cache-fi \
182 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
183 ac_prev=cache_file ;;
184 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
185 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
186 cache_file=$ac_optarg ;;
189 cache_file=config.cache ;;
191 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
193 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
195 datadir=$ac_optarg ;;
197 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
198 | --dataroo | --dataro | --datar)
199 ac_prev=datarootdir ;;
200 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
201 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
202 datarootdir=$ac_optarg ;;
204 -disable-* | --disable-*)
205 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
206 # Reject names that are not valid shell variable names.
207 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
208 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
209 { (exit 1); exit 1; }; }
210 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
211 eval "enable_$ac_feature=no" ;;
213 -enable-* | --enable-*)
214 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
215 # Reject names that are not valid shell variable names.
216 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
217 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
218 { (exit 1); exit 1; }; }
219 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
221 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
224 eval "enable_$ac_feature='$ac_optarg'" ;;
226 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
227 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
228 | --exec | --exe | --ex)
229 ac_prev=exec_prefix ;;
230 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
231 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
232 | --exec=* | --exe=* | --ex=*)
233 exec_prefix=$ac_optarg ;;
235 -gas | --gas | --ga | --g)
236 # Obsolete; use --with-gas.
239 -help | --help | --hel | --he | -h)
241 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
242 ac_init_help=recursive ;;
243 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
244 ac_init_help=short ;;
246 -host | --host | --hos | --ho)
247 ac_prev=host_alias ;;
248 -host=* | --host=* | --hos=* | --ho=*)
249 host_alias=$ac_optarg ;;
251 -includedir | --includedir | --includedi | --included | --include \
252 | --includ | --inclu | --incl | --inc)
253 ac_prev=includedir ;;
254 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
255 | --includ=* | --inclu=* | --incl=* | --inc=*)
256 includedir=$ac_optarg ;;
258 -infodir | --infodir | --infodi | --infod | --info | --inf)
260 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
261 infodir=$ac_optarg ;;
263 -libdir | --libdir | --libdi | --libd)
265 -libdir=* | --libdir=* | --libdi=* | --libd=*)
268 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
269 | --libexe | --libex | --libe)
270 ac_prev=libexecdir ;;
271 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
272 | --libexe=* | --libex=* | --libe=*)
273 libexecdir=$ac_optarg ;;
275 -localstatedir | --localstatedir | --localstatedi | --localstated \
276 | --localstate | --localstat | --localsta | --localst \
277 | --locals | --local | --loca | --loc | --lo)
278 ac_prev=localstatedir ;;
279 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
280 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
281 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
282 localstatedir=$ac_optarg ;;
284 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
286 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
290 # Obsolete; use --without-fp.
293 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
297 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
298 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
301 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
302 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
303 | --oldin | --oldi | --old | --ol | --o)
304 ac_prev=oldincludedir ;;
305 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
306 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
307 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
308 oldincludedir=$ac_optarg ;;
310 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
312 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
315 -program-prefix | --program-prefix | --program-prefi | --program-pref \
316 | --program-pre | --program-pr | --program-p)
317 ac_prev=program_prefix ;;
318 -program-prefix=* | --program-prefix=* | --program-prefi=* \
319 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
320 program_prefix=$ac_optarg ;;
322 -program-suffix | --program-suffix | --program-suffi | --program-suff \
323 | --program-suf | --program-su | --program-s)
324 ac_prev=program_suffix ;;
325 -program-suffix=* | --program-suffix=* | --program-suffi=* \
326 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
327 program_suffix=$ac_optarg ;;
329 -program-transform-name | --program-transform-name \
330 | --program-transform-nam | --program-transform-na \
331 | --program-transform-n | --program-transform- \
332 | --program-transform | --program-transfor \
333 | --program-transfo | --program-transf \
334 | --program-trans | --program-tran \
335 | --progr-tra | --program-tr | --program-t)
336 ac_prev=program_transform_name ;;
337 -program-transform-name=* | --program-transform-name=* \
338 | --program-transform-nam=* | --program-transform-na=* \
339 | --program-transform-n=* | --program-transform-=* \
340 | --program-transform=* | --program-transfor=* \
341 | --program-transfo=* | --program-transf=* \
342 | --program-trans=* | --program-tran=* \
343 | --progr-tra=* | --program-tr=* | --program-t=*)
344 program_transform_name=$ac_optarg ;;
346 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
347 | -silent | --silent | --silen | --sile | --sil)
350 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
352 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
354 sbindir=$ac_optarg ;;
356 -sharedstatedir | --sharedstatedir | --sharedstatedi \
357 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
358 | --sharedst | --shareds | --shared | --share | --shar \
360 ac_prev=sharedstatedir ;;
361 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
362 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
363 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
365 sharedstatedir=$ac_optarg ;;
367 -site | --site | --sit)
369 -site=* | --site=* | --sit=*)
372 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
374 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
377 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
378 | --syscon | --sysco | --sysc | --sys | --sy)
379 ac_prev=sysconfdir ;;
380 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
381 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
382 sysconfdir=$ac_optarg ;;
384 -target | --target | --targe | --targ | --tar | --ta | --t)
385 ac_prev=target_alias ;;
386 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
387 target_alias=$ac_optarg ;;
389 -v | -verbose | --verbose | --verbos | --verbo | --verb)
392 -version | --version | --versio | --versi | --vers | -V)
396 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
397 # Reject names that are not valid shell variable names.
398 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399 { echo "$as_me: error: invalid package name: $ac_package" >&2
400 { (exit 1); exit 1; }; }
401 ac_package=`echo $ac_package| sed 's/-/_/g'`
403 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
406 eval "with_$ac_package='$ac_optarg'" ;;
408 -without-* | --without-*)
409 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
410 # Reject names that are not valid shell variable names.
411 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
412 { echo "$as_me: error: invalid package name: $ac_package" >&2
413 { (exit 1); exit 1; }; }
414 ac_package=`echo $ac_package | sed 's/-/_/g'`
415 eval "with_$ac_package=no" ;;
418 # Obsolete; use --with-x.
421 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
422 | --x-incl | --x-inc | --x-in | --x-i)
423 ac_prev=x_includes ;;
424 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
425 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
426 x_includes=$ac_optarg ;;
428 -x-libraries | --x-libraries | --x-librarie | --x-librari \
429 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
430 ac_prev=x_libraries ;;
431 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
432 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
433 x_libraries=$ac_optarg ;;
435 -*) { echo "$as_me: error: unrecognized option: $ac_option
436 Try \`$0 --help' for more information." >&2
437 { (exit 1); exit 1; }; }
441 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
442 # Reject names that are not valid shell variable names.
443 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
444 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
445 { (exit 1); exit 1; }; }
446 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
447 eval "$ac_envvar='$ac_optarg'"
451 # FIXME: should be removed in autoconf 3.0.
452 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
453 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
454 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
455 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
461 if test -n "$ac_prev"; then
462 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
463 { echo "$as_me: error: missing argument to $ac_option" >&2
464 { (exit 1); exit 1; }; }
467 # Be sure to have absolute paths.
468 for ac_var in exec_prefix prefix
470 eval ac_val=$`echo $ac_var`
472 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
473 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
474 { (exit 1); exit 1; }; };;
478 # Be sure to have absolute paths.
479 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
480 localstatedir libdir includedir oldincludedir infodir mandir
482 eval ac_val=$`echo $ac_var`
484 [\\/$]* | ?:[\\/]* ) ;;
485 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
486 { (exit 1); exit 1; }; };;
490 # There might be people who depend on the old broken behavior: `$host'
491 # used to hold the argument of --host etc.
496 # FIXME: should be removed in autoconf 3.0.
497 if test "x$host_alias" != x; then
498 if test "x$build_alias" = x; then
499 cross_compiling=maybe
500 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
501 If a cross compiler is detected then cross compile mode will be used." >&2
502 elif test "x$build_alias" != "x$host_alias"; then
508 test -n "$host_alias" && ac_tool_prefix=$host_alias-
510 test "$silent" = yes && exec 6>/dev/null
512 # Find the source files, if location was not specified.
513 if test -z "$srcdir"; then
514 ac_srcdir_defaulted=yes
515 # Try the directory containing this script, then its parent.
517 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
518 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
520 if test ! -r $srcdir/$ac_unique_file; then
524 ac_srcdir_defaulted=no
526 if test ! -r $srcdir/$ac_unique_file; then
527 if test "$ac_srcdir_defaulted" = yes; then
528 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
529 { (exit 1); exit 1; }; }
531 { echo "$as_me: error: cannot find sources in $srcdir" >&2
532 { (exit 1); exit 1; }; }
535 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
536 ac_env_build_alias_set=${build_alias+set}
537 ac_env_build_alias_value=$build_alias
538 ac_cv_env_build_alias_set=${build_alias+set}
539 ac_cv_env_build_alias_value=$build_alias
540 ac_env_host_alias_set=${host_alias+set}
541 ac_env_host_alias_value=$host_alias
542 ac_cv_env_host_alias_set=${host_alias+set}
543 ac_cv_env_host_alias_value=$host_alias
544 ac_env_target_alias_set=${target_alias+set}
545 ac_env_target_alias_value=$target_alias
546 ac_cv_env_target_alias_set=${target_alias+set}
547 ac_cv_env_target_alias_value=$target_alias
548 ac_env_CC_set=${CC+set}
550 ac_cv_env_CC_set=${CC+set}
551 ac_cv_env_CC_value=$CC
552 ac_env_CFLAGS_set=${CFLAGS+set}
553 ac_env_CFLAGS_value=$CFLAGS
554 ac_cv_env_CFLAGS_set=${CFLAGS+set}
555 ac_cv_env_CFLAGS_value=$CFLAGS
556 ac_env_LDFLAGS_set=${LDFLAGS+set}
557 ac_env_LDFLAGS_value=$LDFLAGS
558 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
559 ac_cv_env_LDFLAGS_value=$LDFLAGS
560 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
561 ac_env_CPPFLAGS_value=$CPPFLAGS
562 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
563 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
564 ac_env_CPP_set=${CPP+set}
565 ac_env_CPP_value=$CPP
566 ac_cv_env_CPP_set=${CPP+set}
567 ac_cv_env_CPP_value=$CPP
570 # Report the --help message.
572 if test "$ac_init_help" = "long"; then
573 # Omit some internal or obsolete options to make the list less imposing.
574 # This message is too long to be a string in the A/UX 3.1 sh.
576 \`configure' configures this package to adapt to many kinds of systems.
578 Usage: $0 [OPTION]... [VAR=VALUE]...
580 To assign environment variables (e.g., CC, CFLAGS...), specify them as
581 VAR=VALUE. See below for descriptions of some of the useful variables.
583 Defaults for the options are specified in brackets.
586 -h, --help display this help and exit
587 --help=short display options specific to this package
588 --help=recursive display the short help of all the included packages
589 -V, --version display version information and exit
590 -q, --quiet, --silent do not print \`checking...' messages
591 --cache-file=FILE cache test results in FILE [disabled]
592 -C, --config-cache alias for \`--cache-file=config.cache'
593 -n, --no-create do not create output files
594 --srcdir=DIR find the sources in DIR [configure dir or \`..']
599 Installation directories:
600 --prefix=PREFIX install architecture-independent files in PREFIX
602 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
605 By default, \`make install' will install all the files in
606 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
607 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
608 for instance \`--prefix=\$HOME'.
610 For better control, use the options below.
612 Fine tuning of the installation directories:
613 --bindir=DIR user executables [EPREFIX/bin]
614 --sbindir=DIR system admin executables [EPREFIX/sbin]
615 --libexecdir=DIR program executables [EPREFIX/libexec]
616 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
617 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
618 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
619 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
620 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
621 --libdir=DIR object code libraries [EPREFIX/lib]
622 --includedir=DIR C header files [PREFIX/include]
623 --oldincludedir=DIR C header files for non-gcc [/usr/include]
624 --infodir=DIR info documentation [DATAROOTDIR/info]
625 --mandir=DIR man documentation [DATAROOTDIR/man]
631 --program-prefix=PREFIX prepend PREFIX to installed program names
632 --program-suffix=SUFFIX append SUFFIX to installed program names
633 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
636 --x-includes=DIR X include files are in DIR
637 --x-libraries=DIR X library files are in DIR
640 --build=BUILD configure for building on BUILD [guessed]
641 --host=HOST build programs to run on HOST [BUILD]
645 if test -n "$ac_init_help"; then
650 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
651 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
654 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
655 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
658 --disable-stripping do not strip installed executables
659 --enable-string-hacks work around bogus compiler/loader warnings
660 --with-pkg-config{=path} enable/disable use of pkg-config
661 --disable-echo do not display "compiling" commands
662 Curses Version-dependent Options:
663 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
664 --disable-widec disable checks for wide-character functions
665 --with-curses-dir=DIR directory in which (n)curses is installed
666 --with-screen=XXX use specified curses-libraries
667 --with-ncursesw use wide ncurses-libraries
668 --with-ncurses use ncurses-libraries
669 --with-pdcurses compile/link with pdcurses X11 library
670 --with-curses-colr compile/link with HPUX 10.x color-curses
671 --with-curses-5lib compile/link with SunOS 5lib curses
672 --with-Xaw3d link with Xaw 3d library
673 --with-Xaw3dxft link with Xaw 3d xft library
674 --with-neXtaw link with neXT Athena library
675 --with-XawPlus link with Athena-Plus library
676 --with-x use the X Window System
677 --with-x11-rgb=FILE file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
678 --disable-panel disable checks for panel functions
679 --disable-menu disable checks for menu functions
680 --disable-form disable checks for form functions
681 Testing/development Options:
682 --enable-warnings test: turn on gcc compiler warnings
683 --with-dmalloc test: use Gray Watson's dmalloc library
684 --with-dbmalloc test: use Conor Cahill's dbmalloc library
685 --with-valgrind test: use valgrind
686 --disable-leaks test: free permanent memory, analyze leaks
687 --disable-rpath-hack don't add rpath options for additional libraries
689 Some influential environment variables:
690 CC C compiler command
691 CFLAGS C compiler flags
692 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
693 nonstandard directory <lib dir>
694 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
695 headers in a nonstandard directory <include dir>
698 Use these variables to override the choices made by `configure' or to help
699 it to find libraries and programs with nonstandard names/locations.
704 if test "$ac_init_help" = "recursive"; then
705 # If there are subdirs, report their specific --help.
707 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
709 # A "../" for each directory in /$ac_subdir.
710 ac_dots=`echo $ac_subdir |
711 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
714 .) # No --srcdir option. We are building in place.
715 ac_sub_srcdir=$srcdir ;;
716 [\\/]* | ?:[\\/]* ) # Absolute path.
717 ac_sub_srcdir=$srcdir/$ac_subdir ;;
719 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
722 # Check for guested configure; otherwise get Cygnus style configure.
723 if test -f $ac_sub_srcdir/configure.gnu; then
725 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
726 elif test -f $ac_sub_srcdir/configure; then
728 $SHELL $ac_sub_srcdir/configure --help=recursive
729 elif test -f $ac_sub_srcdir/configure.ac ||
730 test -f $ac_sub_srcdir/configure.in; then
734 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
740 test -n "$ac_init_help" && exit 0
741 if $ac_init_version; then
744 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
745 Free Software Foundation, Inc.
746 This configure script is free software; the Free Software Foundation
747 gives unlimited permission to copy, distribute and modify it.
753 This file contains any messages produced by compilers while
754 running configure, to aid debugging if configure makes a mistake.
756 It was created by $as_me, which was
757 generated by GNU Autoconf 2.52.20170501. Invocation command line was
768 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
769 uname -m = `(uname -m) 2>/dev/null || echo unknown`
770 uname -r = `(uname -r) 2>/dev/null || echo unknown`
771 uname -s = `(uname -s) 2>/dev/null || echo unknown`
772 uname -v = `(uname -v) 2>/dev/null || echo unknown`
774 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
775 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
777 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
778 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
779 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
780 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
781 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
782 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
783 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
797 # Keep a trace of the command line.
798 # Strip out --no-create and --no-recursion so they do not pile up.
799 # Also quote any args containing shell meta-characters.
805 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
806 | --no-cr | --no-c) ;;
807 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
808 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
809 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
810 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
811 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
813 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
816 # Get rid of the leading space.
819 # When interrupted or exit'd, cleanup temporary files, and complete
820 # config.log. We remove comments because anyway the quotes in there
821 # would cause problems or look ugly.
823 # Save into config.log some information that might help in debugging.
825 echo "## ----------------- ##" >&5
826 echo "## Cache variables. ##" >&5
827 echo "## ----------------- ##" >&5
829 # The following way of writing the cache mishandles newlines in values,
832 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
835 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
836 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
840 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
844 sed "/^$/d" confdefs.h >conftest.log
845 if test -s conftest.log; then
847 echo "## ------------ ##" >&5
848 echo "## confdefs.h. ##" >&5
849 echo "## ------------ ##" >&5
854 test "$ac_signal" != 0 &&
855 echo "$as_me: caught signal $ac_signal" >&5
856 echo "$as_me: exit $exit_status" >&5
857 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
860 for ac_signal in 1 2 13 15; do
861 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
865 # confdefs.h avoids OS command line length limits that DEFS can exceed.
866 rm -rf conftest* confdefs.h
867 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
870 # Let the site file select an alternate cache file if it wants to.
871 # Prefer explicitly selected file to automatically selected ones.
872 if test -z "$CONFIG_SITE"; then
873 if test "x$prefix" != xNONE; then
874 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
876 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
879 for ac_site_file in $CONFIG_SITE; do
880 if test -r "$ac_site_file"; then
881 { echo "$as_me:881: loading site script $ac_site_file" >&5
882 echo "$as_me: loading site script $ac_site_file" >&6;}
883 cat "$ac_site_file" >&5
888 if test -r "$cache_file"; then
889 # Some versions of bash will fail to source /dev/null (special
890 # files actually), so we avoid doing that.
891 if test -f "$cache_file"; then
892 { echo "$as_me:892: loading cache $cache_file" >&5
893 echo "$as_me: loading cache $cache_file" >&6;}
895 [\\/]* | ?:[\\/]* ) . $cache_file;;
900 { echo "$as_me:900: creating cache $cache_file" >&5
901 echo "$as_me: creating cache $cache_file" >&6;}
905 # Check that the precious variables saved in the cache have kept the same
907 ac_cache_corrupted=false
908 for ac_var in `(set) 2>&1 |
909 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
910 eval ac_old_set=\$ac_cv_env_${ac_var}_set
911 eval ac_new_set=\$ac_env_${ac_var}_set
912 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
913 eval ac_new_val="\$ac_env_${ac_var}_value"
914 case $ac_old_set,$ac_new_set in
916 { echo "$as_me:916: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
917 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
918 ac_cache_corrupted=: ;;
920 { echo "$as_me:920: error: \`$ac_var' was not set in the previous run" >&5
921 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
922 ac_cache_corrupted=: ;;
925 if test "x$ac_old_val" != "x$ac_new_val"; then
926 { echo "$as_me:926: error: \`$ac_var' has changed since the previous run:" >&5
927 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
928 { echo "$as_me:928: former value: $ac_old_val" >&5
929 echo "$as_me: former value: $ac_old_val" >&2;}
930 { echo "$as_me:930: current value: $ac_new_val" >&5
931 echo "$as_me: current value: $ac_new_val" >&2;}
935 # Pass precious variables to config.status. It doesn't matter if
936 # we pass some twice (in addition to the command line arguments).
937 if test "$ac_new_set" = set; then
939 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
940 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
941 ac_configure_args="$ac_configure_args '$ac_arg'"
943 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
948 if $ac_cache_corrupted; then
949 { echo "$as_me:949: error: changes in the environment can compromise the build" >&5
950 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
951 { { echo "$as_me:951: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
952 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
953 { (exit 1); exit 1; }; }
957 ac_cpp='$CPP $CPPFLAGS'
958 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
959 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
960 ac_compiler_gnu=$ac_cv_c_compiler_gnu
961 ac_main_return=return
963 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
964 *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
966 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
967 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
969 echo "#! $SHELL" >conftest.sh
970 echo "exit 0" >>conftest.sh
972 if { (echo "$as_me:972: PATH=\".;.\"; conftest.sh") >&5
973 (PATH=".;."; conftest.sh) 2>&5
975 echo "$as_me:975: \$? = $ac_status" >&5
976 (exit $ac_status); }; then
977 ac_path_separator=';'
981 PATH_SEPARATOR="$ac_path_separator"
984 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
986 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
988 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
991 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
992 if test -f $ac_dir/install-sh; then
994 ac_install_sh="$ac_aux_dir/install-sh -c"
996 elif test -f $ac_dir/install.sh; then
998 ac_install_sh="$ac_aux_dir/install.sh -c"
1000 elif test -f $ac_dir/shtool; then
1002 ac_install_sh="$ac_aux_dir/shtool install -c"
1006 if test -z "$ac_aux_dir"; then
1007 { { echo "$as_me:1007: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1008 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1009 { (exit 1); exit 1; }; }
1011 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1012 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1013 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1015 # Make sure we can run config.sub.
1016 $ac_config_sub sun4 >/dev/null 2>&1 ||
1017 { { echo "$as_me:1017: error: cannot run $ac_config_sub" >&5
1018 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1019 { (exit 1); exit 1; }; }
1021 echo "$as_me:1021: checking build system type" >&5
1022 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1023 if test "${ac_cv_build+set}" = set; then
1024 echo $ECHO_N "(cached) $ECHO_C" >&6
1026 ac_cv_build_alias=$build_alias
1027 test -z "$ac_cv_build_alias" &&
1028 ac_cv_build_alias=`$ac_config_guess`
1029 test -z "$ac_cv_build_alias" &&
1030 { { echo "$as_me:1030: error: cannot guess build type; you must specify one" >&5
1031 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1032 { (exit 1); exit 1; }; }
1033 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1034 { { echo "$as_me:1034: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1035 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1036 { (exit 1); exit 1; }; }
1039 echo "$as_me:1039: result: $ac_cv_build" >&5
1040 echo "${ECHO_T}$ac_cv_build" >&6
1042 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1043 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1044 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1046 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1047 echo "$as_me:1047: checking host system type" >&5
1048 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1049 if test "${ac_cv_host+set}" = set; then
1050 echo $ECHO_N "(cached) $ECHO_C" >&6
1052 ac_cv_host_alias=$host_alias
1053 test -z "$ac_cv_host_alias" &&
1054 ac_cv_host_alias=$ac_cv_build_alias
1055 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1056 { { echo "$as_me:1056: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1057 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1058 { (exit 1); exit 1; }; }
1061 echo "$as_me:1061: result: $ac_cv_host" >&5
1062 echo "${ECHO_T}$ac_cv_host" >&6
1064 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1065 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1066 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1068 system_name="$host_os"
1070 system_name="`(uname -s -r) 2>/dev/null`"
1071 if test -z "$system_name" ; then
1072 system_name="`(hostname) 2>/dev/null`"
1075 test -n "$system_name" &&
1076 cat >>confdefs.h <<EOF
1077 #define SYSTEM_NAME "$system_name"
1080 if test "${cf_cv_system_name+set}" = set; then
1081 echo $ECHO_N "(cached) $ECHO_C" >&6
1083 cf_cv_system_name="$system_name"
1086 test -z "$system_name" && system_name="$cf_cv_system_name"
1087 test -n "$cf_cv_system_name" && echo "$as_me:1087: result: Configuring for $cf_cv_system_name" >&5
1088 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1090 if test ".$system_name" != ".$cf_cv_system_name" ; then
1091 echo "$as_me:1091: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1092 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1093 { { echo "$as_me:1093: error: \"Please remove config.cache and try again.\"" >&5
1094 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1095 { (exit 1); exit 1; }; }
1098 test "$program_prefix" != NONE &&
1099 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1100 # Use a double $ so make ignores it.
1101 test "$program_suffix" != NONE &&
1102 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1103 # Double any \ or $. echo might interpret backslashes.
1104 # By default was `s,x,x', remove it if useless.
1105 cat <<\_ACEOF >conftest.sed
1106 s/[\\$]/&&/g;s/;s,x,x,$//
1108 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1111 echo "$as_me:1111: checking whether ${MAKE-make} sets \${MAKE}" >&5
1112 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1113 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1114 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1115 echo $ECHO_N "(cached) $ECHO_C" >&6
1117 cat >conftest.make <<\EOF
1119 @echo 'ac_maketemp="${MAKE}"'
1121 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1122 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1123 if test -n "$ac_maketemp"; then
1124 eval ac_cv_prog_make_${ac_make}_set=yes
1126 eval ac_cv_prog_make_${ac_make}_set=no
1130 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1131 echo "$as_me:1131: result: yes" >&5
1132 echo "${ECHO_T}yes" >&6
1135 echo "$as_me:1135: result: no" >&5
1136 echo "${ECHO_T}no" >&6
1137 SET_MAKE="MAKE=${MAKE-make}"
1141 ac_cpp='$CPP $CPPFLAGS'
1142 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1143 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1144 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1145 ac_main_return=return
1146 if test -n "$ac_tool_prefix"; then
1147 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1148 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1149 echo "$as_me:1149: checking for $ac_word" >&5
1150 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1151 if test "${ac_cv_prog_CC+set}" = set; then
1152 echo $ECHO_N "(cached) $ECHO_C" >&6
1154 if test -n "$CC"; then
1155 ac_cv_prog_CC="$CC" # Let the user override the test.
1157 ac_save_IFS=$IFS; IFS=$ac_path_separator
1159 for ac_dir in $ac_dummy; do
1161 test -z "$ac_dir" && ac_dir=.
1162 $as_executable_p "$ac_dir/$ac_word" || continue
1163 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1164 echo "$as_me:1164: found $ac_dir/$ac_word" >&5
1171 if test -n "$CC"; then
1172 echo "$as_me:1172: result: $CC" >&5
1173 echo "${ECHO_T}$CC" >&6
1175 echo "$as_me:1175: result: no" >&5
1176 echo "${ECHO_T}no" >&6
1180 if test -z "$ac_cv_prog_CC"; then
1182 # Extract the first word of "gcc", so it can be a program name with args.
1183 set dummy gcc; ac_word=$2
1184 echo "$as_me:1184: checking for $ac_word" >&5
1185 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1186 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1187 echo $ECHO_N "(cached) $ECHO_C" >&6
1189 if test -n "$ac_ct_CC"; then
1190 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1192 ac_save_IFS=$IFS; IFS=$ac_path_separator
1194 for ac_dir in $ac_dummy; do
1196 test -z "$ac_dir" && ac_dir=.
1197 $as_executable_p "$ac_dir/$ac_word" || continue
1198 ac_cv_prog_ac_ct_CC="gcc"
1199 echo "$as_me:1199: found $ac_dir/$ac_word" >&5
1205 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1206 if test -n "$ac_ct_CC"; then
1207 echo "$as_me:1207: result: $ac_ct_CC" >&5
1208 echo "${ECHO_T}$ac_ct_CC" >&6
1210 echo "$as_me:1210: result: no" >&5
1211 echo "${ECHO_T}no" >&6
1219 if test -z "$CC"; then
1220 if test -n "$ac_tool_prefix"; then
1221 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1222 set dummy ${ac_tool_prefix}cc; ac_word=$2
1223 echo "$as_me:1223: checking for $ac_word" >&5
1224 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1225 if test "${ac_cv_prog_CC+set}" = set; then
1226 echo $ECHO_N "(cached) $ECHO_C" >&6
1228 if test -n "$CC"; then
1229 ac_cv_prog_CC="$CC" # Let the user override the test.
1231 ac_save_IFS=$IFS; IFS=$ac_path_separator
1233 for ac_dir in $ac_dummy; do
1235 test -z "$ac_dir" && ac_dir=.
1236 $as_executable_p "$ac_dir/$ac_word" || continue
1237 ac_cv_prog_CC="${ac_tool_prefix}cc"
1238 echo "$as_me:1238: found $ac_dir/$ac_word" >&5
1245 if test -n "$CC"; then
1246 echo "$as_me:1246: result: $CC" >&5
1247 echo "${ECHO_T}$CC" >&6
1249 echo "$as_me:1249: result: no" >&5
1250 echo "${ECHO_T}no" >&6
1254 if test -z "$ac_cv_prog_CC"; then
1256 # Extract the first word of "cc", so it can be a program name with args.
1257 set dummy cc; ac_word=$2
1258 echo "$as_me:1258: checking for $ac_word" >&5
1259 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1260 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1261 echo $ECHO_N "(cached) $ECHO_C" >&6
1263 if test -n "$ac_ct_CC"; then
1264 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1266 ac_save_IFS=$IFS; IFS=$ac_path_separator
1268 for ac_dir in $ac_dummy; do
1270 test -z "$ac_dir" && ac_dir=.
1271 $as_executable_p "$ac_dir/$ac_word" || continue
1272 ac_cv_prog_ac_ct_CC="cc"
1273 echo "$as_me:1273: found $ac_dir/$ac_word" >&5
1279 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1280 if test -n "$ac_ct_CC"; then
1281 echo "$as_me:1281: result: $ac_ct_CC" >&5
1282 echo "${ECHO_T}$ac_ct_CC" >&6
1284 echo "$as_me:1284: result: no" >&5
1285 echo "${ECHO_T}no" >&6
1294 if test -z "$CC"; then
1295 # Extract the first word of "cc", so it can be a program name with args.
1296 set dummy cc; ac_word=$2
1297 echo "$as_me:1297: checking for $ac_word" >&5
1298 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1299 if test "${ac_cv_prog_CC+set}" = set; then
1300 echo $ECHO_N "(cached) $ECHO_C" >&6
1302 if test -n "$CC"; then
1303 ac_cv_prog_CC="$CC" # Let the user override the test.
1306 ac_save_IFS=$IFS; IFS=$ac_path_separator
1308 for ac_dir in $ac_dummy; do
1310 test -z "$ac_dir" && ac_dir=.
1311 $as_executable_p "$ac_dir/$ac_word" || continue
1312 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1313 ac_prog_rejected=yes
1317 echo "$as_me:1317: found $ac_dir/$ac_word" >&5
1321 if test $ac_prog_rejected = yes; then
1322 # We found a bogon in the path, so make sure we never use it.
1323 set dummy $ac_cv_prog_CC
1325 if test $# != 0; then
1326 # We chose a different compiler from the bogus one.
1327 # However, it has the same basename, so the bogon will be chosen
1328 # first if we set CC to just the basename; use the full file name.
1330 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1338 if test -n "$CC"; then
1339 echo "$as_me:1339: result: $CC" >&5
1340 echo "${ECHO_T}$CC" >&6
1342 echo "$as_me:1342: result: no" >&5
1343 echo "${ECHO_T}no" >&6
1347 if test -z "$CC"; then
1348 if test -n "$ac_tool_prefix"; then
1351 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1352 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1353 echo "$as_me:1353: checking for $ac_word" >&5
1354 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1355 if test "${ac_cv_prog_CC+set}" = set; then
1356 echo $ECHO_N "(cached) $ECHO_C" >&6
1358 if test -n "$CC"; then
1359 ac_cv_prog_CC="$CC" # Let the user override the test.
1361 ac_save_IFS=$IFS; IFS=$ac_path_separator
1363 for ac_dir in $ac_dummy; do
1365 test -z "$ac_dir" && ac_dir=.
1366 $as_executable_p "$ac_dir/$ac_word" || continue
1367 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1368 echo "$as_me:1368: found $ac_dir/$ac_word" >&5
1375 if test -n "$CC"; then
1376 echo "$as_me:1376: result: $CC" >&5
1377 echo "${ECHO_T}$CC" >&6
1379 echo "$as_me:1379: result: no" >&5
1380 echo "${ECHO_T}no" >&6
1383 test -n "$CC" && break
1386 if test -z "$CC"; then
1390 # Extract the first word of "$ac_prog", so it can be a program name with args.
1391 set dummy $ac_prog; ac_word=$2
1392 echo "$as_me:1392: checking for $ac_word" >&5
1393 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1394 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1395 echo $ECHO_N "(cached) $ECHO_C" >&6
1397 if test -n "$ac_ct_CC"; then
1398 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1400 ac_save_IFS=$IFS; IFS=$ac_path_separator
1402 for ac_dir in $ac_dummy; do
1404 test -z "$ac_dir" && ac_dir=.
1405 $as_executable_p "$ac_dir/$ac_word" || continue
1406 ac_cv_prog_ac_ct_CC="$ac_prog"
1407 echo "$as_me:1407: found $ac_dir/$ac_word" >&5
1413 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1414 if test -n "$ac_ct_CC"; then
1415 echo "$as_me:1415: result: $ac_ct_CC" >&5
1416 echo "${ECHO_T}$ac_ct_CC" >&6
1418 echo "$as_me:1418: result: no" >&5
1419 echo "${ECHO_T}no" >&6
1422 test -n "$ac_ct_CC" && break
1430 test -z "$CC" && { { echo "$as_me:1430: error: no acceptable cc found in \$PATH" >&5
1431 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1432 { (exit 1); exit 1; }; }
1434 # Provide some information about the compiler.
1435 echo "$as_me:1435:" \
1436 "checking for C compiler version" >&5
1437 ac_compiler=`set X $ac_compile; echo $2`
1438 { (eval echo "$as_me:1438: \"$ac_compiler --version </dev/null >&5\"") >&5
1439 (eval $ac_compiler --version </dev/null >&5) 2>&5
1441 echo "$as_me:1441: \$? = $ac_status" >&5
1442 (exit $ac_status); }
1443 { (eval echo "$as_me:1443: \"$ac_compiler -v </dev/null >&5\"") >&5
1444 (eval $ac_compiler -v </dev/null >&5) 2>&5
1446 echo "$as_me:1446: \$? = $ac_status" >&5
1447 (exit $ac_status); }
1448 { (eval echo "$as_me:1448: \"$ac_compiler -V </dev/null >&5\"") >&5
1449 (eval $ac_compiler -V </dev/null >&5) 2>&5
1451 echo "$as_me:1451: \$? = $ac_status" >&5
1452 (exit $ac_status); }
1454 cat >conftest.$ac_ext <<_ACEOF
1455 #line 1455 "configure"
1456 #include "confdefs.h"
1466 ac_clean_files_save=$ac_clean_files
1467 ac_clean_files="$ac_clean_files a.out a.exe"
1468 # Try to create an executable without -o first, disregard a.out.
1469 # It will help us diagnose broken compilers, and finding out an intuition
1471 echo "$as_me:1471: checking for C compiler default output" >&5
1472 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1473 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1474 if { (eval echo "$as_me:1474: \"$ac_link_default\"") >&5
1475 (eval $ac_link_default) 2>&5
1477 echo "$as_me:1477: \$? = $ac_status" >&5
1478 (exit $ac_status); }; then
1479 # Find the output, starting from the most likely. This scheme is
1480 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1482 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1483 ls a.out conftest 2>/dev/null;
1484 ls a.* conftest.* 2>/dev/null`; do
1486 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1487 a.out ) # We found the default executable, but exeext='' is most
1490 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1491 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1498 echo "$as_me: failed program was:" >&5
1499 cat conftest.$ac_ext >&5
1500 { { echo "$as_me:1500: error: C compiler cannot create executables" >&5
1501 echo "$as_me: error: C compiler cannot create executables" >&2;}
1502 { (exit 77); exit 77; }; }
1505 ac_exeext=$ac_cv_exeext
1506 echo "$as_me:1506: result: $ac_file" >&5
1507 echo "${ECHO_T}$ac_file" >&6
1509 # Check the compiler produces executables we can run. If not, either
1510 # the compiler is broken, or we cross compile.
1511 echo "$as_me:1511: checking whether the C compiler works" >&5
1512 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1513 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1514 # If not cross compiling, check that we can run a simple program.
1515 if test "$cross_compiling" != yes; then
1516 if { ac_try='./$ac_file'
1517 { (eval echo "$as_me:1517: \"$ac_try\"") >&5
1520 echo "$as_me:1520: \$? = $ac_status" >&5
1521 (exit $ac_status); }; }; then
1524 if test "$cross_compiling" = maybe; then
1527 { { echo "$as_me:1527: error: cannot run C compiled programs.
1528 If you meant to cross compile, use \`--host'." >&5
1529 echo "$as_me: error: cannot run C compiled programs.
1530 If you meant to cross compile, use \`--host'." >&2;}
1531 { (exit 1); exit 1; }; }
1535 echo "$as_me:1535: result: yes" >&5
1536 echo "${ECHO_T}yes" >&6
1538 rm -f a.out a.exe conftest$ac_cv_exeext
1539 ac_clean_files=$ac_clean_files_save
1540 # Check the compiler produces executables we can run. If not, either
1541 # the compiler is broken, or we cross compile.
1542 echo "$as_me:1542: checking whether we are cross compiling" >&5
1543 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1544 echo "$as_me:1544: result: $cross_compiling" >&5
1545 echo "${ECHO_T}$cross_compiling" >&6
1547 echo "$as_me:1547: checking for executable suffix" >&5
1548 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1549 if { (eval echo "$as_me:1549: \"$ac_link\"") >&5
1550 (eval $ac_link) 2>&5
1552 echo "$as_me:1552: \$? = $ac_status" >&5
1553 (exit $ac_status); }; then
1554 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1555 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1556 # work properly (i.e., refer to `conftest.exe'), while it won't with
1558 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1560 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1561 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1568 { { echo "$as_me:1568: error: cannot compute EXEEXT: cannot compile and link" >&5
1569 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1570 { (exit 1); exit 1; }; }
1573 rm -f conftest$ac_cv_exeext
1574 echo "$as_me:1574: result: $ac_cv_exeext" >&5
1575 echo "${ECHO_T}$ac_cv_exeext" >&6
1577 rm -f conftest.$ac_ext
1578 EXEEXT=$ac_cv_exeext
1580 echo "$as_me:1580: checking for object suffix" >&5
1581 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1582 if test "${ac_cv_objext+set}" = set; then
1583 echo $ECHO_N "(cached) $ECHO_C" >&6
1585 cat >conftest.$ac_ext <<_ACEOF
1586 #line 1586 "configure"
1587 #include "confdefs.h"
1597 rm -f conftest.o conftest.obj
1598 if { (eval echo "$as_me:1598: \"$ac_compile\"") >&5
1599 (eval $ac_compile) 2>&5
1601 echo "$as_me:1601: \$? = $ac_status" >&5
1602 (exit $ac_status); }; then
1603 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1605 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1606 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1611 echo "$as_me: failed program was:" >&5
1612 cat conftest.$ac_ext >&5
1613 { { echo "$as_me:1613: error: cannot compute OBJEXT: cannot compile" >&5
1614 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1615 { (exit 1); exit 1; }; }
1618 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1620 echo "$as_me:1620: result: $ac_cv_objext" >&5
1621 echo "${ECHO_T}$ac_cv_objext" >&6
1622 OBJEXT=$ac_cv_objext
1624 echo "$as_me:1624: checking whether we are using the GNU C compiler" >&5
1625 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1626 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1627 echo $ECHO_N "(cached) $ECHO_C" >&6
1629 cat >conftest.$ac_ext <<_ACEOF
1630 #line 1630 "configure"
1631 #include "confdefs.h"
1644 rm -f conftest.$ac_objext
1645 if { (eval echo "$as_me:1645: \"$ac_compile\"") >&5
1646 (eval $ac_compile) 2>&5
1648 echo "$as_me:1648: \$? = $ac_status" >&5
1649 (exit $ac_status); } &&
1650 { ac_try='test -s conftest.$ac_objext'
1651 { (eval echo "$as_me:1651: \"$ac_try\"") >&5
1654 echo "$as_me:1654: \$? = $ac_status" >&5
1655 (exit $ac_status); }; }; then
1658 echo "$as_me: failed program was:" >&5
1659 cat conftest.$ac_ext >&5
1662 rm -f conftest.$ac_objext conftest.$ac_ext
1663 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1666 echo "$as_me:1666: result: $ac_cv_c_compiler_gnu" >&5
1667 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1668 GCC=`test $ac_compiler_gnu = yes && echo yes`
1669 ac_test_CFLAGS=${CFLAGS+set}
1670 ac_save_CFLAGS=$CFLAGS
1672 echo "$as_me:1672: checking whether $CC accepts -g" >&5
1673 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1674 if test "${ac_cv_prog_cc_g+set}" = set; then
1675 echo $ECHO_N "(cached) $ECHO_C" >&6
1677 cat >conftest.$ac_ext <<_ACEOF
1678 #line 1678 "configure"
1679 #include "confdefs.h"
1689 rm -f conftest.$ac_objext
1690 if { (eval echo "$as_me:1690: \"$ac_compile\"") >&5
1691 (eval $ac_compile) 2>&5
1693 echo "$as_me:1693: \$? = $ac_status" >&5
1694 (exit $ac_status); } &&
1695 { ac_try='test -s conftest.$ac_objext'
1696 { (eval echo "$as_me:1696: \"$ac_try\"") >&5
1699 echo "$as_me:1699: \$? = $ac_status" >&5
1700 (exit $ac_status); }; }; then
1703 echo "$as_me: failed program was:" >&5
1704 cat conftest.$ac_ext >&5
1707 rm -f conftest.$ac_objext conftest.$ac_ext
1709 echo "$as_me:1709: result: $ac_cv_prog_cc_g" >&5
1710 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1711 if test "$ac_test_CFLAGS" = set; then
1712 CFLAGS=$ac_save_CFLAGS
1713 elif test $ac_cv_prog_cc_g = yes; then
1714 if test "$GCC" = yes; then
1720 if test "$GCC" = yes; then
1726 # Some people use a C++ compiler to compile C. Since we use `exit',
1727 # in C++ we need to declare it. In case someone uses the same compiler
1728 # for both compiling C and C++ we need to have the C++ compiler decide
1729 # the declaration of exit, since it's the most demanding environment.
1730 cat >conftest.$ac_ext <<_ACEOF
1735 rm -f conftest.$ac_objext
1736 if { (eval echo "$as_me:1736: \"$ac_compile\"") >&5
1737 (eval $ac_compile) 2>&5
1739 echo "$as_me:1739: \$? = $ac_status" >&5
1740 (exit $ac_status); } &&
1741 { ac_try='test -s conftest.$ac_objext'
1742 { (eval echo "$as_me:1742: \"$ac_try\"") >&5
1745 echo "$as_me:1745: \$? = $ac_status" >&5
1746 (exit $ac_status); }; }; then
1747 for ac_declaration in \
1749 '#include <stdlib.h>' \
1750 'extern "C" void std::exit (int) throw (); using std::exit;' \
1751 'extern "C" void std::exit (int); using std::exit;' \
1752 'extern "C" void exit (int) throw ();' \
1753 'extern "C" void exit (int);' \
1756 cat >conftest.$ac_ext <<_ACEOF
1757 #line 1757 "configure"
1758 #include "confdefs.h"
1769 rm -f conftest.$ac_objext
1770 if { (eval echo "$as_me:1770: \"$ac_compile\"") >&5
1771 (eval $ac_compile) 2>&5
1773 echo "$as_me:1773: \$? = $ac_status" >&5
1774 (exit $ac_status); } &&
1775 { ac_try='test -s conftest.$ac_objext'
1776 { (eval echo "$as_me:1776: \"$ac_try\"") >&5
1779 echo "$as_me:1779: \$? = $ac_status" >&5
1780 (exit $ac_status); }; }; then
1783 echo "$as_me: failed program was:" >&5
1784 cat conftest.$ac_ext >&5
1787 rm -f conftest.$ac_objext conftest.$ac_ext
1788 cat >conftest.$ac_ext <<_ACEOF
1789 #line 1789 "configure"
1790 #include "confdefs.h"
1800 rm -f conftest.$ac_objext
1801 if { (eval echo "$as_me:1801: \"$ac_compile\"") >&5
1802 (eval $ac_compile) 2>&5
1804 echo "$as_me:1804: \$? = $ac_status" >&5
1805 (exit $ac_status); } &&
1806 { ac_try='test -s conftest.$ac_objext'
1807 { (eval echo "$as_me:1807: \"$ac_try\"") >&5
1810 echo "$as_me:1810: \$? = $ac_status" >&5
1811 (exit $ac_status); }; }; then
1814 echo "$as_me: failed program was:" >&5
1815 cat conftest.$ac_ext >&5
1817 rm -f conftest.$ac_objext conftest.$ac_ext
1820 if test -n "$ac_declaration"; then
1821 echo '#ifdef __cplusplus' >>confdefs.h
1822 echo $ac_declaration >>confdefs.h
1823 echo '#endif' >>confdefs.h
1827 echo "$as_me: failed program was:" >&5
1828 cat conftest.$ac_ext >&5
1830 rm -f conftest.$ac_objext conftest.$ac_ext
1832 ac_cpp='$CPP $CPPFLAGS'
1833 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1834 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1835 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1836 ac_main_return=return
1839 if test "$GCC" = yes ; then
1840 echo "$as_me:1840: checking version of $CC" >&5
1841 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1842 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1843 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1844 echo "$as_me:1844: result: $GCC_VERSION" >&5
1845 echo "${ECHO_T}$GCC_VERSION" >&6
1848 echo "$as_me:1848: checking for $CC option to accept ANSI C" >&5
1849 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1850 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1851 echo $ECHO_N "(cached) $ECHO_C" >&6
1853 ac_cv_prog_cc_stdc=no
1855 cat >conftest.$ac_ext <<_ACEOF
1856 #line 1856 "configure"
1857 #include "confdefs.h"
1860 #include <sys/types.h>
1861 #include <sys/stat.h>
1862 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1863 struct buf { int x; };
1864 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1865 static char *e (p, i)
1871 static char *f (char * (*g) (char **, int), char **p, ...)
1876 s = g (p, va_arg (v,int));
1880 int test (int i, double x);
1881 struct s1 {int (*f) (int a);};
1882 struct s2 {int (*f) (double a);};
1883 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1889 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1894 # Don't try gcc -ansi; that turns off useful extensions and
1895 # breaks some systems' header files.
1896 # AIX -qlanglvl=ansi
1897 # Ultrix and OSF/1 -std1
1898 # HP-UX 10.20 and later -Ae
1899 # HP-UX older versions -Aa -D_HPUX_SOURCE
1900 # SVR4 -Xc -D__EXTENSIONS__
1901 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1903 CC="$ac_save_CC $ac_arg"
1904 rm -f conftest.$ac_objext
1905 if { (eval echo "$as_me:1905: \"$ac_compile\"") >&5
1906 (eval $ac_compile) 2>&5
1908 echo "$as_me:1908: \$? = $ac_status" >&5
1909 (exit $ac_status); } &&
1910 { ac_try='test -s conftest.$ac_objext'
1911 { (eval echo "$as_me:1911: \"$ac_try\"") >&5
1914 echo "$as_me:1914: \$? = $ac_status" >&5
1915 (exit $ac_status); }; }; then
1916 ac_cv_prog_cc_stdc=$ac_arg
1919 echo "$as_me: failed program was:" >&5
1920 cat conftest.$ac_ext >&5
1922 rm -f conftest.$ac_objext
1924 rm -f conftest.$ac_ext conftest.$ac_objext
1929 case "x$ac_cv_prog_cc_stdc" in
1931 echo "$as_me:1931: result: none needed" >&5
1932 echo "${ECHO_T}none needed" >&6 ;;
1934 echo "$as_me:1934: result: $ac_cv_prog_cc_stdc" >&5
1935 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1936 CC="$CC $ac_cv_prog_cc_stdc" ;;
1939 # This should have been defined by AC_PROG_CC
1942 echo "$as_me:1942: checking \$CC variable" >&5
1943 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1946 echo "$as_me:1946: result: broken" >&5
1947 echo "${ECHO_T}broken" >&6
1948 { echo "$as_me:1948: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1949 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1951 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
1952 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
1954 for cf_arg in $cf_flags
1962 cf_new_extra_cppflags=
1964 for cf_add_cflags in $cf_arg
1966 case $cf_fix_cppflags in
1968 case $cf_add_cflags in
1969 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1970 case $cf_add_cflags in
1972 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1974 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1975 && test -z "${cf_tst_cflags}" \
1976 && cf_fix_cppflags=yes
1978 if test $cf_fix_cppflags = yes ; then
1980 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1981 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1984 elif test "${cf_tst_cflags}" = "\"'" ; then
1986 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1987 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1997 case $cf_add_cflags in
1999 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2001 CPPFLAGS=`echo "$CPPFLAGS" | \
2002 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2003 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2008 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2009 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2016 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2017 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2024 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2025 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2027 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2029 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2030 && test -z "${cf_tst_cflags}" \
2031 && cf_fix_cppflags=no
2036 if test -n "$cf_new_cflags" ; then
2038 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2039 CFLAGS="${CFLAGS}$cf_new_cflags"
2043 if test -n "$cf_new_cppflags" ; then
2045 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2046 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2050 if test -n "$cf_new_extra_cppflags" ; then
2052 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2053 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2063 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2065 echo "${as_me:-configure}:2065: testing resulting CC: '$CC' ..." 1>&5
2067 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2069 echo "${as_me:-configure}:2069: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2071 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2073 echo "${as_me:-configure}:2073: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2077 echo "$as_me:2077: result: ok" >&5
2078 echo "${ECHO_T}ok" >&6
2082 echo "$as_me:2082: checking for inline" >&5
2083 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2084 if test "${ac_cv_c_inline+set}" = set; then
2085 echo $ECHO_N "(cached) $ECHO_C" >&6
2088 for ac_kw in inline __inline__ __inline; do
2089 cat >conftest.$ac_ext <<_ACEOF
2090 #line 2090 "configure"
2091 #include "confdefs.h"
2093 static $ac_kw int static_foo () {return 0; }
2094 $ac_kw int foo () {return 0; }
2098 rm -f conftest.$ac_objext
2099 if { (eval echo "$as_me:2099: \"$ac_compile\"") >&5
2100 (eval $ac_compile) 2>&5
2102 echo "$as_me:2102: \$? = $ac_status" >&5
2103 (exit $ac_status); } &&
2104 { ac_try='test -s conftest.$ac_objext'
2105 { (eval echo "$as_me:2105: \"$ac_try\"") >&5
2108 echo "$as_me:2108: \$? = $ac_status" >&5
2109 (exit $ac_status); }; }; then
2110 ac_cv_c_inline=$ac_kw; break
2112 echo "$as_me: failed program was:" >&5
2113 cat conftest.$ac_ext >&5
2115 rm -f conftest.$ac_objext conftest.$ac_ext
2119 echo "$as_me:2119: result: $ac_cv_c_inline" >&5
2120 echo "${ECHO_T}$ac_cv_c_inline" >&6
2121 case $ac_cv_c_inline in
2124 cat >>confdefs.h <<\EOF
2128 *) cat >>confdefs.h <<EOF
2129 #define inline $ac_cv_c_inline
2135 ac_cpp='$CPP $CPPFLAGS'
2136 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2137 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2138 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2139 ac_main_return=return
2140 echo "$as_me:2140: checking how to run the C preprocessor" >&5
2141 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2142 # On Suns, sometimes $CPP names a directory.
2143 if test -n "$CPP" && test -d "$CPP"; then
2146 if test -z "$CPP"; then
2147 if test "${ac_cv_prog_CPP+set}" = set; then
2148 echo $ECHO_N "(cached) $ECHO_C" >&6
2150 # Double quotes because CPP needs to be expanded
2151 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2154 for ac_c_preproc_warn_flag in '' yes
2156 # Use a header file that comes with gcc, so configuring glibc
2157 # with a fresh cross-compiler works.
2158 # On the NeXT, cc -E runs the code through the compiler's parser,
2159 # not just through cpp. "Syntax error" is here to catch this case.
2160 cat >conftest.$ac_ext <<_ACEOF
2161 #line 2161 "configure"
2162 #include "confdefs.h"
2166 if { (eval echo "$as_me:2166: \"$ac_cpp conftest.$ac_ext\"") >&5
2167 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2169 egrep -v '^ *\+' conftest.er1 >conftest.err
2171 cat conftest.err >&5
2172 echo "$as_me:2172: \$? = $ac_status" >&5
2173 (exit $ac_status); } >/dev/null; then
2174 if test -s conftest.err; then
2175 ac_cpp_err=$ac_c_preproc_warn_flag
2182 if test -z "$ac_cpp_err"; then
2185 echo "$as_me: failed program was:" >&5
2186 cat conftest.$ac_ext >&5
2187 # Broken: fails on valid input.
2190 rm -f conftest.err conftest.$ac_ext
2192 # OK, works on sane cases. Now check whether non-existent headers
2193 # can be detected and how.
2194 cat >conftest.$ac_ext <<_ACEOF
2195 #line 2195 "configure"
2196 #include "confdefs.h"
2197 #include <ac_nonexistent.h>
2199 if { (eval echo "$as_me:2199: \"$ac_cpp conftest.$ac_ext\"") >&5
2200 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2202 egrep -v '^ *\+' conftest.er1 >conftest.err
2204 cat conftest.err >&5
2205 echo "$as_me:2205: \$? = $ac_status" >&5
2206 (exit $ac_status); } >/dev/null; then
2207 if test -s conftest.err; then
2208 ac_cpp_err=$ac_c_preproc_warn_flag
2215 if test -z "$ac_cpp_err"; then
2216 # Broken: success on invalid input.
2219 echo "$as_me: failed program was:" >&5
2220 cat conftest.$ac_ext >&5
2221 # Passes both tests.
2225 rm -f conftest.err conftest.$ac_ext
2228 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2229 rm -f conftest.err conftest.$ac_ext
2230 if $ac_preproc_ok; then
2242 echo "$as_me:2242: result: $CPP" >&5
2243 echo "${ECHO_T}$CPP" >&6
2245 for ac_c_preproc_warn_flag in '' yes
2247 # Use a header file that comes with gcc, so configuring glibc
2248 # with a fresh cross-compiler works.
2249 # On the NeXT, cc -E runs the code through the compiler's parser,
2250 # not just through cpp. "Syntax error" is here to catch this case.
2251 cat >conftest.$ac_ext <<_ACEOF
2252 #line 2252 "configure"
2253 #include "confdefs.h"
2257 if { (eval echo "$as_me:2257: \"$ac_cpp conftest.$ac_ext\"") >&5
2258 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2260 egrep -v '^ *\+' conftest.er1 >conftest.err
2262 cat conftest.err >&5
2263 echo "$as_me:2263: \$? = $ac_status" >&5
2264 (exit $ac_status); } >/dev/null; then
2265 if test -s conftest.err; then
2266 ac_cpp_err=$ac_c_preproc_warn_flag
2273 if test -z "$ac_cpp_err"; then
2276 echo "$as_me: failed program was:" >&5
2277 cat conftest.$ac_ext >&5
2278 # Broken: fails on valid input.
2281 rm -f conftest.err conftest.$ac_ext
2283 # OK, works on sane cases. Now check whether non-existent headers
2284 # can be detected and how.
2285 cat >conftest.$ac_ext <<_ACEOF
2286 #line 2286 "configure"
2287 #include "confdefs.h"
2288 #include <ac_nonexistent.h>
2290 if { (eval echo "$as_me:2290: \"$ac_cpp conftest.$ac_ext\"") >&5
2291 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2293 egrep -v '^ *\+' conftest.er1 >conftest.err
2295 cat conftest.err >&5
2296 echo "$as_me:2296: \$? = $ac_status" >&5
2297 (exit $ac_status); } >/dev/null; then
2298 if test -s conftest.err; then
2299 ac_cpp_err=$ac_c_preproc_warn_flag
2306 if test -z "$ac_cpp_err"; then
2307 # Broken: success on invalid input.
2310 echo "$as_me: failed program was:" >&5
2311 cat conftest.$ac_ext >&5
2312 # Passes both tests.
2316 rm -f conftest.err conftest.$ac_ext
2319 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2320 rm -f conftest.err conftest.$ac_ext
2321 if $ac_preproc_ok; then
2324 { { echo "$as_me:2324: error: C preprocessor \"$CPP\" fails sanity check" >&5
2325 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2326 { (exit 1); exit 1; }; }
2330 ac_cpp='$CPP $CPPFLAGS'
2331 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2332 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2333 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2334 ac_main_return=return
2336 for ac_prog in mawk gawk nawk awk
2338 # Extract the first word of "$ac_prog", so it can be a program name with args.
2339 set dummy $ac_prog; ac_word=$2
2340 echo "$as_me:2340: checking for $ac_word" >&5
2341 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2342 if test "${ac_cv_prog_AWK+set}" = set; then
2343 echo $ECHO_N "(cached) $ECHO_C" >&6
2345 if test -n "$AWK"; then
2346 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2348 ac_save_IFS=$IFS; IFS=$ac_path_separator
2350 for ac_dir in $ac_dummy; do
2352 test -z "$ac_dir" && ac_dir=.
2353 $as_executable_p "$ac_dir/$ac_word" || continue
2354 ac_cv_prog_AWK="$ac_prog"
2355 echo "$as_me:2355: found $ac_dir/$ac_word" >&5
2362 if test -n "$AWK"; then
2363 echo "$as_me:2363: result: $AWK" >&5
2364 echo "${ECHO_T}$AWK" >&6
2366 echo "$as_me:2366: result: no" >&5
2367 echo "${ECHO_T}no" >&6
2370 test -n "$AWK" && break
2373 # Find a good install program. We prefer a C program (faster),
2374 # so one script is as good as another. But avoid the broken or
2375 # incompatible versions:
2376 # SysV /etc/install, /usr/sbin/install
2377 # SunOS /usr/etc/install
2378 # IRIX /sbin/install
2380 # AmigaOS /C/install, which installs bootblocks on floppy discs
2381 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2382 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2383 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2384 # ./install, which can be erroneously created by make from ./install.sh.
2385 echo "$as_me:2385: checking for a BSD compatible install" >&5
2386 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2387 if test -z "$INSTALL"; then
2388 if test "${ac_cv_path_install+set}" = set; then
2389 echo $ECHO_N "(cached) $ECHO_C" >&6
2391 ac_save_IFS=$IFS; IFS=$ac_path_separator
2392 for ac_dir in $PATH; do
2394 # Account for people who put trailing slashes in PATH elements.
2396 / | ./ | .// | /cC/* \
2397 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2400 # OSF1 and SCO ODT 3.0 have their own names for install.
2401 # Don't use installbsd from OSF since it installs stuff as root
2403 for ac_prog in ginstall scoinst install; do
2404 if $as_executable_p "$ac_dir/$ac_prog"; then
2405 if test $ac_prog = install &&
2406 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2407 # AIX install. It has an incompatible calling convention.
2409 elif test $ac_prog = install &&
2410 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2411 # program-specific install script used by HP pwplus--don't use.
2414 ac_cv_path_install="$ac_dir/$ac_prog -c"
2424 if test "${ac_cv_path_install+set}" = set; then
2425 INSTALL=$ac_cv_path_install
2427 # As a last resort, use the slow shell script. We don't cache a
2428 # path for INSTALL within a source directory, because that will
2429 # break other packages using the cache if that directory is
2430 # removed, or if the path is relative.
2431 INSTALL=$ac_install_sh
2434 echo "$as_me:2434: result: $INSTALL" >&5
2435 echo "${ECHO_T}$INSTALL" >&6
2437 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2438 # It thinks the first close brace ends the variable substitution.
2439 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2441 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2443 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2449 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2450 test -z "$cf_dir" && cf_dir=.
2451 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2455 echo "$as_me:2455: checking if you want to install stripped executables" >&5
2456 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2458 # Check whether --enable-stripping or --disable-stripping was given.
2459 if test "${enable_stripping+set}" = set; then
2460 enableval="$enable_stripping"
2461 test "$enableval" != no && enableval=yes
2462 if test "$enableval" != "yes" ; then
2472 echo "$as_me:2472: result: $with_stripping" >&5
2473 echo "${ECHO_T}$with_stripping" >&6
2475 if test "$with_stripping" = yes
2482 echo "$as_me:2482: checking if install needs to be told about ownership" >&5
2483 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
2484 case `$ac_config_guess` in
2493 echo "$as_me:2493: result: $with_install_o" >&5
2494 echo "${ECHO_T}$with_install_o" >&6
2495 if test "x$with_install_o" = xyes
2497 INSTALL_OPT_O=`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`
2502 for ac_prog in lint cppcheck splint
2504 # Extract the first word of "$ac_prog", so it can be a program name with args.
2505 set dummy $ac_prog; ac_word=$2
2506 echo "$as_me:2506: checking for $ac_word" >&5
2507 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2508 if test "${ac_cv_prog_LINT+set}" = set; then
2509 echo $ECHO_N "(cached) $ECHO_C" >&6
2511 if test -n "$LINT"; then
2512 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2514 ac_save_IFS=$IFS; IFS=$ac_path_separator
2516 for ac_dir in $ac_dummy; do
2518 test -z "$ac_dir" && ac_dir=.
2519 $as_executable_p "$ac_dir/$ac_word" || continue
2520 ac_cv_prog_LINT="$ac_prog"
2521 echo "$as_me:2521: found $ac_dir/$ac_word" >&5
2527 LINT=$ac_cv_prog_LINT
2528 if test -n "$LINT"; then
2529 echo "$as_me:2529: result: $LINT" >&5
2530 echo "${ECHO_T}$LINT" >&6
2532 echo "$as_me:2532: result: no" >&5
2533 echo "${ECHO_T}no" >&6
2536 test -n "$LINT" && break
2539 echo "$as_me:2539: checking if filesystem supports mixed-case filenames" >&5
2540 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2541 if test "${cf_cv_mixedcase+set}" = set; then
2542 echo $ECHO_N "(cached) $ECHO_C" >&6
2545 if test "$cross_compiling" = yes ; then
2546 case $target_alias in
2547 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2555 rm -f conftest CONFTEST
2557 if test -f CONFTEST ; then
2562 rm -f conftest CONFTEST
2566 echo "$as_me:2566: result: $cf_cv_mixedcase" >&5
2567 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2568 test "$cf_cv_mixedcase" = yes &&
2569 cat >>confdefs.h <<\EOF
2570 #define MIXEDCASE_FILENAMES 1
2573 for ac_prog in exctags ctags
2575 # Extract the first word of "$ac_prog", so it can be a program name with args.
2576 set dummy $ac_prog; ac_word=$2
2577 echo "$as_me:2577: checking for $ac_word" >&5
2578 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2579 if test "${ac_cv_prog_CTAGS+set}" = set; then
2580 echo $ECHO_N "(cached) $ECHO_C" >&6
2582 if test -n "$CTAGS"; then
2583 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2585 ac_save_IFS=$IFS; IFS=$ac_path_separator
2587 for ac_dir in $ac_dummy; do
2589 test -z "$ac_dir" && ac_dir=.
2590 $as_executable_p "$ac_dir/$ac_word" || continue
2591 ac_cv_prog_CTAGS="$ac_prog"
2592 echo "$as_me:2592: found $ac_dir/$ac_word" >&5
2598 CTAGS=$ac_cv_prog_CTAGS
2599 if test -n "$CTAGS"; then
2600 echo "$as_me:2600: result: $CTAGS" >&5
2601 echo "${ECHO_T}$CTAGS" >&6
2603 echo "$as_me:2603: result: no" >&5
2604 echo "${ECHO_T}no" >&6
2607 test -n "$CTAGS" && break
2610 for ac_prog in exetags etags
2612 # Extract the first word of "$ac_prog", so it can be a program name with args.
2613 set dummy $ac_prog; ac_word=$2
2614 echo "$as_me:2614: checking for $ac_word" >&5
2615 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2616 if test "${ac_cv_prog_ETAGS+set}" = set; then
2617 echo $ECHO_N "(cached) $ECHO_C" >&6
2619 if test -n "$ETAGS"; then
2620 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2622 ac_save_IFS=$IFS; IFS=$ac_path_separator
2624 for ac_dir in $ac_dummy; do
2626 test -z "$ac_dir" && ac_dir=.
2627 $as_executable_p "$ac_dir/$ac_word" || continue
2628 ac_cv_prog_ETAGS="$ac_prog"
2629 echo "$as_me:2629: found $ac_dir/$ac_word" >&5
2635 ETAGS=$ac_cv_prog_ETAGS
2636 if test -n "$ETAGS"; then
2637 echo "$as_me:2637: result: $ETAGS" >&5
2638 echo "${ECHO_T}$ETAGS" >&6
2640 echo "$as_me:2640: result: no" >&5
2641 echo "${ECHO_T}no" >&6
2644 test -n "$ETAGS" && break
2647 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2648 set dummy ${CTAGS:-ctags}; ac_word=$2
2649 echo "$as_me:2649: checking for $ac_word" >&5
2650 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2651 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2652 echo $ECHO_N "(cached) $ECHO_C" >&6
2654 if test -n "$MAKE_LOWER_TAGS"; then
2655 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2657 ac_save_IFS=$IFS; IFS=$ac_path_separator
2659 for ac_dir in $ac_dummy; do
2661 test -z "$ac_dir" && ac_dir=.
2662 $as_executable_p "$ac_dir/$ac_word" || continue
2663 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2664 echo "$as_me:2664: found $ac_dir/$ac_word" >&5
2668 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2671 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2672 if test -n "$MAKE_LOWER_TAGS"; then
2673 echo "$as_me:2673: result: $MAKE_LOWER_TAGS" >&5
2674 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2676 echo "$as_me:2676: result: no" >&5
2677 echo "${ECHO_T}no" >&6
2680 if test "$cf_cv_mixedcase" = yes ; then
2681 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2682 set dummy ${ETAGS:-etags}; ac_word=$2
2683 echo "$as_me:2683: checking for $ac_word" >&5
2684 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2685 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2686 echo $ECHO_N "(cached) $ECHO_C" >&6
2688 if test -n "$MAKE_UPPER_TAGS"; then
2689 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2691 ac_save_IFS=$IFS; IFS=$ac_path_separator
2693 for ac_dir in $ac_dummy; do
2695 test -z "$ac_dir" && ac_dir=.
2696 $as_executable_p "$ac_dir/$ac_word" || continue
2697 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2698 echo "$as_me:2698: found $ac_dir/$ac_word" >&5
2702 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2705 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2706 if test -n "$MAKE_UPPER_TAGS"; then
2707 echo "$as_me:2707: result: $MAKE_UPPER_TAGS" >&5
2708 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2710 echo "$as_me:2710: result: no" >&5
2711 echo "${ECHO_T}no" >&6
2718 if test "$MAKE_UPPER_TAGS" = yes ; then
2724 if test "$MAKE_LOWER_TAGS" = yes ; then
2730 echo "$as_me:2730: checking if -lm needed for math functions" >&5
2731 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
2732 if test "${cf_cv_need_libm+set}" = set; then
2733 echo $ECHO_N "(cached) $ECHO_C" >&6
2736 cat >conftest.$ac_ext <<_ACEOF
2737 #line 2737 "configure"
2738 #include "confdefs.h"
2747 double x = rand(); printf("result = %g\n", pow(sin(x),x))
2752 rm -f conftest.$ac_objext conftest$ac_exeext
2753 if { (eval echo "$as_me:2753: \"$ac_link\"") >&5
2754 (eval $ac_link) 2>&5
2756 echo "$as_me:2756: \$? = $ac_status" >&5
2757 (exit $ac_status); } &&
2758 { ac_try='test -s conftest$ac_exeext'
2759 { (eval echo "$as_me:2759: \"$ac_try\"") >&5
2762 echo "$as_me:2762: \$? = $ac_status" >&5
2763 (exit $ac_status); }; }; then
2766 echo "$as_me: failed program was:" >&5
2767 cat conftest.$ac_ext >&5
2770 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2772 echo "$as_me:2772: result: $cf_cv_need_libm" >&5
2773 echo "${ECHO_T}$cf_cv_need_libm" >&6
2774 if test "$cf_cv_need_libm" = yes
2782 CC_SHARED_OPTS=unknown
2783 CPPFLAGS="$CPPFLAGS"
2785 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
2786 DFT_UPR_MODEL="NORMAL"
2799 PACKAGE="ncurses-examples"
2805 TINFO_LIBS='$(LIBS_CURSES)'
2806 cf_cv_abi_version=""
2807 cf_cv_rel_version=""
2813 if test "$GCC" = yes
2815 cat > conftest.i <<EOF
2817 #define GCC_PRINTF 0
2822 #ifndef GCC_NORETURN
2823 #define GCC_NORETURN /* nothing */
2826 #define GCC_UNUSED /* nothing */
2829 if test "$GCC" = yes
2831 { echo "$as_me:2831: checking for $CC __attribute__ directives..." >&5
2832 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
2833 cat > conftest.$ac_ext <<EOF
2834 #line 2834 "${as_me:-configure}"
2835 #include "confdefs.h"
2836 #include "conftest.h"
2837 #include "conftest.i"
2839 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2841 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2844 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
2846 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
2848 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2849 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2850 extern void foo(void) GCC_NORETURN;
2851 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2853 cf_printf_attribute=no
2854 cf_scanf_attribute=no
2855 for cf_attribute in scanf printf unused noreturn
2858 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2860 cf_directive="__attribute__(($cf_attribute))"
2861 echo "checking for $CC $cf_directive" 1>&5
2863 case $cf_attribute in
2865 cf_printf_attribute=yes
2866 cat >conftest.h <<EOF
2867 #define GCC_$cf_ATTRIBUTE 1
2871 cf_scanf_attribute=yes
2872 cat >conftest.h <<EOF
2873 #define GCC_$cf_ATTRIBUTE 1
2877 cat >conftest.h <<EOF
2878 #define GCC_$cf_ATTRIBUTE $cf_directive
2883 if { (eval echo "$as_me:2883: \"$ac_compile\"") >&5
2884 (eval $ac_compile) 2>&5
2886 echo "$as_me:2886: \$? = $ac_status" >&5
2887 (exit $ac_status); }; then
2888 test -n "$verbose" && echo "$as_me:2888: result: ... $cf_attribute" >&5
2889 echo "${ECHO_T}... $cf_attribute" >&6
2890 cat conftest.h >>confdefs.h
2891 case $cf_attribute in
2894 cat >>confdefs.h <<EOF
2895 #define GCC_NORETURN $cf_directive
2900 cf_value='/* nothing */'
2901 if test "$cf_printf_attribute" != no ; then
2902 cf_value='__attribute__((format(printf,fmt,var)))'
2904 cat >>confdefs.h <<\EOF
2905 #define GCC_PRINTF 1
2910 cat >>confdefs.h <<EOF
2911 #define GCC_PRINTFLIKE(fmt,var) $cf_value
2916 cf_value='/* nothing */'
2917 if test "$cf_scanf_attribute" != no ; then
2918 cf_value='__attribute__((format(scanf,fmt,var)))'
2920 cat >>confdefs.h <<\EOF
2926 cat >>confdefs.h <<EOF
2927 #define GCC_SCANFLIKE(fmt,var) $cf_value
2933 cat >>confdefs.h <<EOF
2934 #define GCC_UNUSED $cf_directive
2942 fgrep define conftest.i >>confdefs.h
2947 echo "$as_me:2947: checking if you want to work around bogus compiler/loader warnings" >&5
2948 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
2950 # Check whether --enable-string-hacks or --disable-string-hacks was given.
2951 if test "${enable_string_hacks+set}" = set; then
2952 enableval="$enable_string_hacks"
2953 with_string_hacks=$enableval
2955 with_string_hacks=no
2957 echo "$as_me:2957: result: $with_string_hacks" >&5
2958 echo "${ECHO_T}$with_string_hacks" >&6
2960 if test "x$with_string_hacks" = "xyes"; then
2962 cat >>confdefs.h <<\EOF
2963 #define USE_STRING_HACKS 1
2966 { echo "$as_me:2966: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
2967 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
2968 echo "$as_me:2968: checking for strlcat" >&5
2969 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
2970 if test "${ac_cv_func_strlcat+set}" = set; then
2971 echo $ECHO_N "(cached) $ECHO_C" >&6
2973 cat >conftest.$ac_ext <<_ACEOF
2974 #line 2974 "configure"
2975 #include "confdefs.h"
2976 /* System header to define __stub macros and hopefully few prototypes,
2977 which can conflict with char strlcat (); below. */
2979 /* Override any gcc2 internal prototype to avoid an error. */
2983 /* We use char because int might match the return type of a gcc2
2984 builtin and then its argument prototype would still apply. */
2991 /* The GNU C library defines this for functions which it implements
2992 to always fail with ENOSYS. Some functions are actually named
2993 something starting with __ and the normal name is an alias. */
2994 #if defined (__stub_strlcat) || defined (__stub___strlcat)
2997 f = strlcat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
3004 rm -f conftest.$ac_objext conftest$ac_exeext
3005 if { (eval echo "$as_me:3005: \"$ac_link\"") >&5
3006 (eval $ac_link) 2>&5
3008 echo "$as_me:3008: \$? = $ac_status" >&5
3009 (exit $ac_status); } &&
3010 { ac_try='test -s conftest$ac_exeext'
3011 { (eval echo "$as_me:3011: \"$ac_try\"") >&5
3014 echo "$as_me:3014: \$? = $ac_status" >&5
3015 (exit $ac_status); }; }; then
3016 ac_cv_func_strlcat=yes
3018 echo "$as_me: failed program was:" >&5
3019 cat conftest.$ac_ext >&5
3020 ac_cv_func_strlcat=no
3022 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3024 echo "$as_me:3024: result: $ac_cv_func_strlcat" >&5
3025 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
3026 if test $ac_cv_func_strlcat = yes; then
3028 cat >>confdefs.h <<\EOF
3029 #define HAVE_STRLCAT 1
3034 echo "$as_me:3034: checking for strlcat in -lbsd" >&5
3035 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
3036 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
3037 echo $ECHO_N "(cached) $ECHO_C" >&6
3039 ac_check_lib_save_LIBS=$LIBS
3041 cat >conftest.$ac_ext <<_ACEOF
3042 #line 3042 "configure"
3043 #include "confdefs.h"
3045 /* Override any gcc2 internal prototype to avoid an error. */
3049 /* We use char because int might match the return type of a gcc2
3050 builtin and then its argument prototype would still apply. */
3060 rm -f conftest.$ac_objext conftest$ac_exeext
3061 if { (eval echo "$as_me:3061: \"$ac_link\"") >&5
3062 (eval $ac_link) 2>&5
3064 echo "$as_me:3064: \$? = $ac_status" >&5
3065 (exit $ac_status); } &&
3066 { ac_try='test -s conftest$ac_exeext'
3067 { (eval echo "$as_me:3067: \"$ac_try\"") >&5
3070 echo "$as_me:3070: \$? = $ac_status" >&5
3071 (exit $ac_status); }; }; then
3072 ac_cv_lib_bsd_strlcat=yes
3074 echo "$as_me: failed program was:" >&5
3075 cat conftest.$ac_ext >&5
3076 ac_cv_lib_bsd_strlcat=no
3078 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3079 LIBS=$ac_check_lib_save_LIBS
3081 echo "$as_me:3081: result: $ac_cv_lib_bsd_strlcat" >&5
3082 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
3083 if test $ac_cv_lib_bsd_strlcat = yes; then
3086 # Filter out duplicates - this happens with badly-designed ".pc" files...
3087 for cf_add_1lib in $LIBS
3089 for cf_add_2lib in $cf_add_libs
3091 if test "x$cf_add_1lib" = "x$cf_add_2lib"
3097 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
3101 for ac_header in bsd/string.h
3103 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3104 echo "$as_me:3104: checking for $ac_header" >&5
3105 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3106 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3107 echo $ECHO_N "(cached) $ECHO_C" >&6
3109 cat >conftest.$ac_ext <<_ACEOF
3110 #line 3110 "configure"
3111 #include "confdefs.h"
3112 #include <$ac_header>
3114 if { (eval echo "$as_me:3114: \"$ac_cpp conftest.$ac_ext\"") >&5
3115 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3117 egrep -v '^ *\+' conftest.er1 >conftest.err
3119 cat conftest.err >&5
3120 echo "$as_me:3120: \$? = $ac_status" >&5
3121 (exit $ac_status); } >/dev/null; then
3122 if test -s conftest.err; then
3123 ac_cpp_err=$ac_c_preproc_warn_flag
3130 if test -z "$ac_cpp_err"; then
3131 eval "$as_ac_Header=yes"
3133 echo "$as_me: failed program was:" >&5
3134 cat conftest.$ac_ext >&5
3135 eval "$as_ac_Header=no"
3137 rm -f conftest.err conftest.$ac_ext
3139 echo "$as_me:3139: result: `eval echo '${'$as_ac_Header'}'`" >&5
3140 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3141 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3142 cat >>confdefs.h <<EOF
3143 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3149 cat >>confdefs.h <<\EOF
3150 #define HAVE_STRLCAT 1
3157 for ac_func in strlcpy snprintf
3159 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3160 echo "$as_me:3160: checking for $ac_func" >&5
3161 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3162 if eval "test \"\${$as_ac_var+set}\" = set"; then
3163 echo $ECHO_N "(cached) $ECHO_C" >&6
3165 cat >conftest.$ac_ext <<_ACEOF
3166 #line 3166 "configure"
3167 #include "confdefs.h"
3168 /* System header to define __stub macros and hopefully few prototypes,
3169 which can conflict with char $ac_func (); below. */
3171 /* Override any gcc2 internal prototype to avoid an error. */
3175 /* We use char because int might match the return type of a gcc2
3176 builtin and then its argument prototype would still apply. */
3183 /* The GNU C library defines this for functions which it implements
3184 to always fail with ENOSYS. Some functions are actually named
3185 something starting with __ and the normal name is an alias. */
3186 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3189 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
3196 rm -f conftest.$ac_objext conftest$ac_exeext
3197 if { (eval echo "$as_me:3197: \"$ac_link\"") >&5
3198 (eval $ac_link) 2>&5
3200 echo "$as_me:3200: \$? = $ac_status" >&5
3201 (exit $ac_status); } &&
3202 { ac_try='test -s conftest$ac_exeext'
3203 { (eval echo "$as_me:3203: \"$ac_try\"") >&5
3206 echo "$as_me:3206: \$? = $ac_status" >&5
3207 (exit $ac_status); }; }; then
3208 eval "$as_ac_var=yes"
3210 echo "$as_me: failed program was:" >&5
3211 cat conftest.$ac_ext >&5
3212 eval "$as_ac_var=no"
3214 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3216 echo "$as_me:3216: result: `eval echo '${'$as_ac_var'}'`" >&5
3217 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
3218 if test `eval echo '${'$as_ac_var'}'` = yes; then
3219 cat >>confdefs.h <<EOF
3220 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3229 cf_POSIX_C_SOURCE=199506L
3234 cf_xopen_source="-D_ALL_SOURCE"
3240 cf_xopen_source="-D_APPLE_C_SOURCE"
3243 cf_xopen_source="-D_DARWIN_C_SOURCE"
3246 (freebsd*|dragonfly*)
3247 # 5.x headers associate
3248 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3249 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3250 cf_POSIX_C_SOURCE=200112L
3252 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3255 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3258 cf_xopen_source="-D_HPUX_SOURCE"
3261 cf_xopen_source="-D_SGI_SOURCE"
3264 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3266 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3268 echo "$as_me:3268: checking if this is the GNU C library" >&5
3269 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3270 if test "${cf_cv_gnu_library+set}" = set; then
3271 echo $ECHO_N "(cached) $ECHO_C" >&6
3274 cat >conftest.$ac_ext <<_ACEOF
3275 #line 3275 "configure"
3276 #include "confdefs.h"
3277 #include <sys/types.h>
3282 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3285 # error not GNU C library
3291 rm -f conftest.$ac_objext
3292 if { (eval echo "$as_me:3292: \"$ac_compile\"") >&5
3293 (eval $ac_compile) 2>&5
3295 echo "$as_me:3295: \$? = $ac_status" >&5
3296 (exit $ac_status); } &&
3297 { ac_try='test -s conftest.$ac_objext'
3298 { (eval echo "$as_me:3298: \"$ac_try\"") >&5
3301 echo "$as_me:3301: \$? = $ac_status" >&5
3302 (exit $ac_status); }; }; then
3303 cf_cv_gnu_library=yes
3305 echo "$as_me: failed program was:" >&5
3306 cat conftest.$ac_ext >&5
3307 cf_cv_gnu_library=no
3309 rm -f conftest.$ac_objext conftest.$ac_ext
3312 echo "$as_me:3312: result: $cf_cv_gnu_library" >&5
3313 echo "${ECHO_T}$cf_cv_gnu_library" >&6
3315 if test x$cf_cv_gnu_library = xyes; then
3317 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3318 # was changed to help a little...
3319 echo "$as_me:3319: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3320 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3321 if test "${cf_cv_gnu_library_219+set}" = set; then
3322 echo $ECHO_N "(cached) $ECHO_C" >&6
3327 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3328 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3330 cat >conftest.$ac_ext <<_ACEOF
3331 #line 3331 "configure"
3332 #include "confdefs.h"
3333 #include <sys/types.h>
3338 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
3341 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
3347 rm -f conftest.$ac_objext
3348 if { (eval echo "$as_me:3348: \"$ac_compile\"") >&5
3349 (eval $ac_compile) 2>&5
3351 echo "$as_me:3351: \$? = $ac_status" >&5
3352 (exit $ac_status); } &&
3353 { ac_try='test -s conftest.$ac_objext'
3354 { (eval echo "$as_me:3354: \"$ac_try\"") >&5
3357 echo "$as_me:3357: \$? = $ac_status" >&5
3358 (exit $ac_status); }; }; then
3359 cf_cv_gnu_library_219=yes
3361 echo "$as_me: failed program was:" >&5
3362 cat conftest.$ac_ext >&5
3363 cf_cv_gnu_library_219=no
3365 rm -f conftest.$ac_objext conftest.$ac_ext
3369 echo "$as_me:3369: result: $cf_cv_gnu_library_219" >&5
3370 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
3372 if test "x$cf_cv_gnu_library_219" = xyes; then
3374 echo "$as_me:3374: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
3375 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
3376 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
3377 echo $ECHO_N "(cached) $ECHO_C" >&6
3383 cf_new_extra_cppflags=
3385 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
3387 case $cf_fix_cppflags in
3389 case $cf_add_cflags in
3390 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3391 case $cf_add_cflags in
3393 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3395 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3396 && test -z "${cf_tst_cflags}" \
3397 && cf_fix_cppflags=yes
3399 if test $cf_fix_cppflags = yes ; then
3401 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3402 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3405 elif test "${cf_tst_cflags}" = "\"'" ; then
3407 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3408 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3418 case $cf_add_cflags in
3420 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3422 CPPFLAGS=`echo "$CPPFLAGS" | \
3423 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3424 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3429 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3430 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3437 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3438 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3445 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3446 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3448 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3450 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3451 && test -z "${cf_tst_cflags}" \
3452 && cf_fix_cppflags=no
3457 if test -n "$cf_new_cflags" ; then
3459 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3460 CFLAGS="${CFLAGS}$cf_new_cflags"
3464 if test -n "$cf_new_cppflags" ; then
3466 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3467 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3471 if test -n "$cf_new_extra_cppflags" ; then
3473 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3474 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3478 cat >conftest.$ac_ext <<_ACEOF
3479 #line 3479 "configure"
3480 #include "confdefs.h"
3483 #include <sys/types.h>
3489 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
3492 # error GNU C library is too old
3498 rm -f conftest.$ac_objext
3499 if { (eval echo "$as_me:3499: \"$ac_compile\"") >&5
3500 (eval $ac_compile) 2>&5
3502 echo "$as_me:3502: \$? = $ac_status" >&5
3503 (exit $ac_status); } &&
3504 { ac_try='test -s conftest.$ac_objext'
3505 { (eval echo "$as_me:3505: \"$ac_try\"") >&5
3508 echo "$as_me:3508: \$? = $ac_status" >&5
3509 (exit $ac_status); }; }; then
3510 cf_cv_gnu_dftsrc_219=yes
3512 echo "$as_me: failed program was:" >&5
3513 cat conftest.$ac_ext >&5
3514 cf_cv_gnu_dftsrc_219=no
3516 rm -f conftest.$ac_objext conftest.$ac_ext
3519 echo "$as_me:3519: result: $cf_cv_gnu_dftsrc_219" >&5
3520 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
3521 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
3523 cf_cv_gnu_dftsrc_219=maybe
3526 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
3528 echo "$as_me:3528: checking if we must define _GNU_SOURCE" >&5
3529 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3530 if test "${cf_cv_gnu_source+set}" = set; then
3531 echo $ECHO_N "(cached) $ECHO_C" >&6
3534 cat >conftest.$ac_ext <<_ACEOF
3535 #line 3535 "configure"
3536 #include "confdefs.h"
3537 #include <sys/types.h>
3542 #ifndef _XOPEN_SOURCE
3543 #error expected _XOPEN_SOURCE to be defined
3549 rm -f conftest.$ac_objext
3550 if { (eval echo "$as_me:3550: \"$ac_compile\"") >&5
3551 (eval $ac_compile) 2>&5
3553 echo "$as_me:3553: \$? = $ac_status" >&5
3554 (exit $ac_status); } &&
3555 { ac_try='test -s conftest.$ac_objext'
3556 { (eval echo "$as_me:3556: \"$ac_try\"") >&5
3559 echo "$as_me:3559: \$? = $ac_status" >&5
3560 (exit $ac_status); }; }; then
3563 echo "$as_me: failed program was:" >&5
3564 cat conftest.$ac_ext >&5
3570 cf_new_extra_cppflags=
3572 for cf_add_cflags in -D_GNU_SOURCE
3574 case $cf_fix_cppflags in
3576 case $cf_add_cflags in
3577 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3578 case $cf_add_cflags in
3580 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3582 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3583 && test -z "${cf_tst_cflags}" \
3584 && cf_fix_cppflags=yes
3586 if test $cf_fix_cppflags = yes ; then
3588 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3589 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3592 elif test "${cf_tst_cflags}" = "\"'" ; then
3594 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3595 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3605 case $cf_add_cflags in
3607 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3609 CPPFLAGS=`echo "$CPPFLAGS" | \
3610 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3611 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3616 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3617 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3624 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3625 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3632 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3633 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3635 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3637 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3638 && test -z "${cf_tst_cflags}" \
3639 && cf_fix_cppflags=no
3644 if test -n "$cf_new_cflags" ; then
3646 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3647 CFLAGS="${CFLAGS}$cf_new_cflags"
3651 if test -n "$cf_new_cppflags" ; then
3653 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3654 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3658 if test -n "$cf_new_extra_cppflags" ; then
3660 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3661 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3665 cat >conftest.$ac_ext <<_ACEOF
3666 #line 3666 "configure"
3667 #include "confdefs.h"
3668 #include <sys/types.h>
3673 #ifdef _XOPEN_SOURCE
3674 #error expected _XOPEN_SOURCE to be undefined
3680 rm -f conftest.$ac_objext
3681 if { (eval echo "$as_me:3681: \"$ac_compile\"") >&5
3682 (eval $ac_compile) 2>&5
3684 echo "$as_me:3684: \$? = $ac_status" >&5
3685 (exit $ac_status); } &&
3686 { ac_try='test -s conftest.$ac_objext'
3687 { (eval echo "$as_me:3687: \"$ac_try\"") >&5
3690 echo "$as_me:3690: \$? = $ac_status" >&5
3691 (exit $ac_status); }; }; then
3694 echo "$as_me: failed program was:" >&5
3695 cat conftest.$ac_ext >&5
3696 cf_cv_gnu_source=yes
3698 rm -f conftest.$ac_objext conftest.$ac_ext
3702 rm -f conftest.$ac_objext conftest.$ac_ext
3705 echo "$as_me:3705: result: $cf_cv_gnu_source" >&5
3706 echo "${ECHO_T}$cf_cv_gnu_source" >&6
3708 if test "$cf_cv_gnu_source" = yes
3710 echo "$as_me:3710: checking if we should also define _DEFAULT_SOURCE" >&5
3711 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
3712 if test "${cf_cv_default_source+set}" = set; then
3713 echo $ECHO_N "(cached) $ECHO_C" >&6
3716 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3717 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
3719 cat >conftest.$ac_ext <<_ACEOF
3720 #line 3720 "configure"
3721 #include "confdefs.h"
3722 #include <sys/types.h>
3727 #ifdef _DEFAULT_SOURCE
3728 #error expected _DEFAULT_SOURCE to be undefined
3734 rm -f conftest.$ac_objext
3735 if { (eval echo "$as_me:3735: \"$ac_compile\"") >&5
3736 (eval $ac_compile) 2>&5
3738 echo "$as_me:3738: \$? = $ac_status" >&5
3739 (exit $ac_status); } &&
3740 { ac_try='test -s conftest.$ac_objext'
3741 { (eval echo "$as_me:3741: \"$ac_try\"") >&5
3744 echo "$as_me:3744: \$? = $ac_status" >&5
3745 (exit $ac_status); }; }; then
3746 cf_cv_default_source=no
3748 echo "$as_me: failed program was:" >&5
3749 cat conftest.$ac_ext >&5
3750 cf_cv_default_source=yes
3752 rm -f conftest.$ac_objext conftest.$ac_ext
3755 echo "$as_me:3755: result: $cf_cv_default_source" >&5
3756 echo "${ECHO_T}$cf_cv_default_source" >&6
3757 if test "$cf_cv_default_source" = yes
3760 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3761 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3771 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
3774 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
3777 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3779 cf_save_CFLAGS="$CFLAGS"
3780 cf_save_CPPFLAGS="$CPPFLAGS"
3782 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3783 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3784 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3786 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3787 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3788 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3790 echo "$as_me:3790: checking if we should define _POSIX_C_SOURCE" >&5
3791 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3792 if test "${cf_cv_posix_c_source+set}" = set; then
3793 echo $ECHO_N "(cached) $ECHO_C" >&6
3796 echo "${as_me:-configure}:3796: testing if the symbol is already defined go no further ..." 1>&5
3798 cat >conftest.$ac_ext <<_ACEOF
3799 #line 3799 "configure"
3800 #include "confdefs.h"
3801 #include <sys/types.h>
3806 #ifndef _POSIX_C_SOURCE
3813 rm -f conftest.$ac_objext
3814 if { (eval echo "$as_me:3814: \"$ac_compile\"") >&5
3815 (eval $ac_compile) 2>&5
3817 echo "$as_me:3817: \$? = $ac_status" >&5
3818 (exit $ac_status); } &&
3819 { ac_try='test -s conftest.$ac_objext'
3820 { (eval echo "$as_me:3820: \"$ac_try\"") >&5
3823 echo "$as_me:3823: \$? = $ac_status" >&5
3824 (exit $ac_status); }; }; then
3825 cf_cv_posix_c_source=no
3827 echo "$as_me: failed program was:" >&5
3828 cat conftest.$ac_ext >&5
3829 cf_want_posix_source=no
3830 case .$cf_POSIX_C_SOURCE in
3832 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3835 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3836 cf_want_posix_source=yes
3839 cf_want_posix_source=yes
3842 if test "$cf_want_posix_source" = yes ; then
3843 cat >conftest.$ac_ext <<_ACEOF
3844 #line 3844 "configure"
3845 #include "confdefs.h"
3846 #include <sys/types.h>
3851 #ifdef _POSIX_SOURCE
3858 rm -f conftest.$ac_objext
3859 if { (eval echo "$as_me:3859: \"$ac_compile\"") >&5
3860 (eval $ac_compile) 2>&5
3862 echo "$as_me:3862: \$? = $ac_status" >&5
3863 (exit $ac_status); } &&
3864 { ac_try='test -s conftest.$ac_objext'
3865 { (eval echo "$as_me:3865: \"$ac_try\"") >&5
3868 echo "$as_me:3868: \$? = $ac_status" >&5
3869 (exit $ac_status); }; }; then
3872 echo "$as_me: failed program was:" >&5
3873 cat conftest.$ac_ext >&5
3874 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3876 rm -f conftest.$ac_objext conftest.$ac_ext
3879 echo "${as_me:-configure}:3879: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3881 CFLAGS="$cf_trim_CFLAGS"
3882 CPPFLAGS="$cf_trim_CPPFLAGS"
3884 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3885 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
3887 echo "${as_me:-configure}:3887: testing if the second compile does not leave our definition intact error ..." 1>&5
3889 cat >conftest.$ac_ext <<_ACEOF
3890 #line 3890 "configure"
3891 #include "confdefs.h"
3892 #include <sys/types.h>
3897 #ifndef _POSIX_C_SOURCE
3904 rm -f conftest.$ac_objext
3905 if { (eval echo "$as_me:3905: \"$ac_compile\"") >&5
3906 (eval $ac_compile) 2>&5
3908 echo "$as_me:3908: \$? = $ac_status" >&5
3909 (exit $ac_status); } &&
3910 { ac_try='test -s conftest.$ac_objext'
3911 { (eval echo "$as_me:3911: \"$ac_try\"") >&5
3914 echo "$as_me:3914: \$? = $ac_status" >&5
3915 (exit $ac_status); }; }; then
3918 echo "$as_me: failed program was:" >&5
3919 cat conftest.$ac_ext >&5
3920 cf_cv_posix_c_source=no
3922 rm -f conftest.$ac_objext conftest.$ac_ext
3923 CFLAGS="$cf_save_CFLAGS"
3924 CPPFLAGS="$cf_save_CPPFLAGS"
3927 rm -f conftest.$ac_objext conftest.$ac_ext
3930 echo "$as_me:3930: result: $cf_cv_posix_c_source" >&5
3931 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3933 if test "$cf_cv_posix_c_source" != no ; then
3934 CFLAGS="$cf_trim_CFLAGS"
3935 CPPFLAGS="$cf_trim_CPPFLAGS"
3940 cf_new_extra_cppflags=
3942 for cf_add_cflags in $cf_cv_posix_c_source
3944 case $cf_fix_cppflags in
3946 case $cf_add_cflags in
3947 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3948 case $cf_add_cflags in
3950 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3952 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3953 && test -z "${cf_tst_cflags}" \
3954 && cf_fix_cppflags=yes
3956 if test $cf_fix_cppflags = yes ; then
3958 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3959 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3962 elif test "${cf_tst_cflags}" = "\"'" ; then
3964 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3965 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3975 case $cf_add_cflags in
3977 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3979 CPPFLAGS=`echo "$CPPFLAGS" | \
3980 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3981 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3986 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3987 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3994 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3995 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4002 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4003 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4005 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4007 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4008 && test -z "${cf_tst_cflags}" \
4009 && cf_fix_cppflags=no
4014 if test -n "$cf_new_cflags" ; then
4016 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4017 CFLAGS="${CFLAGS}$cf_new_cflags"
4021 if test -n "$cf_new_cppflags" ; then
4023 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4024 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4028 if test -n "$cf_new_extra_cppflags" ; then
4030 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4031 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4039 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4042 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
4043 cf_xopen_source="-D_BSD_SOURCE"
4047 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
4050 cf_xopen_source="-D_OSF_SOURCE"
4053 cf_xopen_source="-D_QNX_SOURCE"
4056 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
4059 cf_xopen_source="-D__EXTENSIONS__"
4060 cf_cv_xopen_source=broken
4062 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
4068 echo "$as_me:4068: checking if we should define _XOPEN_SOURCE" >&5
4069 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4070 if test "${cf_cv_xopen_source+set}" = set; then
4071 echo $ECHO_N "(cached) $ECHO_C" >&6
4074 cat >conftest.$ac_ext <<_ACEOF
4075 #line 4075 "configure"
4076 #include "confdefs.h"
4080 #include <sys/types.h>
4086 #ifndef _XOPEN_SOURCE
4093 rm -f conftest.$ac_objext
4094 if { (eval echo "$as_me:4094: \"$ac_compile\"") >&5
4095 (eval $ac_compile) 2>&5
4097 echo "$as_me:4097: \$? = $ac_status" >&5
4098 (exit $ac_status); } &&
4099 { ac_try='test -s conftest.$ac_objext'
4100 { (eval echo "$as_me:4100: \"$ac_try\"") >&5
4103 echo "$as_me:4103: \$? = $ac_status" >&5
4104 (exit $ac_status); }; }; then
4105 cf_cv_xopen_source=no
4107 echo "$as_me: failed program was:" >&5
4108 cat conftest.$ac_ext >&5
4111 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4112 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4114 cat >conftest.$ac_ext <<_ACEOF
4115 #line 4115 "configure"
4116 #include "confdefs.h"
4120 #include <sys/types.h>
4126 #ifdef _XOPEN_SOURCE
4133 rm -f conftest.$ac_objext
4134 if { (eval echo "$as_me:4134: \"$ac_compile\"") >&5
4135 (eval $ac_compile) 2>&5
4137 echo "$as_me:4137: \$? = $ac_status" >&5
4138 (exit $ac_status); } &&
4139 { ac_try='test -s conftest.$ac_objext'
4140 { (eval echo "$as_me:4140: \"$ac_try\"") >&5
4143 echo "$as_me:4143: \$? = $ac_status" >&5
4144 (exit $ac_status); }; }; then
4145 cf_cv_xopen_source=no
4147 echo "$as_me: failed program was:" >&5
4148 cat conftest.$ac_ext >&5
4149 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4151 rm -f conftest.$ac_objext conftest.$ac_ext
4155 rm -f conftest.$ac_objext conftest.$ac_ext
4158 echo "$as_me:4158: result: $cf_cv_xopen_source" >&5
4159 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4161 if test "$cf_cv_xopen_source" != no ; then
4163 CFLAGS=`echo "$CFLAGS" | \
4164 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4165 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4167 CPPFLAGS=`echo "$CPPFLAGS" | \
4168 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4169 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4171 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4176 cf_new_extra_cppflags=
4178 for cf_add_cflags in $cf_temp_xopen_source
4180 case $cf_fix_cppflags in
4182 case $cf_add_cflags in
4183 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4184 case $cf_add_cflags in
4186 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4188 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4189 && test -z "${cf_tst_cflags}" \
4190 && cf_fix_cppflags=yes
4192 if test $cf_fix_cppflags = yes ; then
4194 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4195 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4198 elif test "${cf_tst_cflags}" = "\"'" ; then
4200 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4201 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4211 case $cf_add_cflags in
4213 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4215 CPPFLAGS=`echo "$CPPFLAGS" | \
4216 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4217 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4222 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4223 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4230 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4231 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4238 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4239 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4241 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4243 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4244 && test -z "${cf_tst_cflags}" \
4245 && cf_fix_cppflags=no
4250 if test -n "$cf_new_cflags" ; then
4252 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4253 CFLAGS="${CFLAGS}$cf_new_cflags"
4257 if test -n "$cf_new_cppflags" ; then
4259 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4260 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4264 if test -n "$cf_new_extra_cppflags" ; then
4266 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4267 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4273 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4275 cf_save_CFLAGS="$CFLAGS"
4276 cf_save_CPPFLAGS="$CPPFLAGS"
4278 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4279 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4280 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4282 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4283 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4284 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4286 echo "$as_me:4286: checking if we should define _POSIX_C_SOURCE" >&5
4287 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4288 if test "${cf_cv_posix_c_source+set}" = set; then
4289 echo $ECHO_N "(cached) $ECHO_C" >&6
4292 echo "${as_me:-configure}:4292: testing if the symbol is already defined go no further ..." 1>&5
4294 cat >conftest.$ac_ext <<_ACEOF
4295 #line 4295 "configure"
4296 #include "confdefs.h"
4297 #include <sys/types.h>
4302 #ifndef _POSIX_C_SOURCE
4309 rm -f conftest.$ac_objext
4310 if { (eval echo "$as_me:4310: \"$ac_compile\"") >&5
4311 (eval $ac_compile) 2>&5
4313 echo "$as_me:4313: \$? = $ac_status" >&5
4314 (exit $ac_status); } &&
4315 { ac_try='test -s conftest.$ac_objext'
4316 { (eval echo "$as_me:4316: \"$ac_try\"") >&5
4319 echo "$as_me:4319: \$? = $ac_status" >&5
4320 (exit $ac_status); }; }; then
4321 cf_cv_posix_c_source=no
4323 echo "$as_me: failed program was:" >&5
4324 cat conftest.$ac_ext >&5
4325 cf_want_posix_source=no
4326 case .$cf_POSIX_C_SOURCE in
4328 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4331 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4332 cf_want_posix_source=yes
4335 cf_want_posix_source=yes
4338 if test "$cf_want_posix_source" = yes ; then
4339 cat >conftest.$ac_ext <<_ACEOF
4340 #line 4340 "configure"
4341 #include "confdefs.h"
4342 #include <sys/types.h>
4347 #ifdef _POSIX_SOURCE
4354 rm -f conftest.$ac_objext
4355 if { (eval echo "$as_me:4355: \"$ac_compile\"") >&5
4356 (eval $ac_compile) 2>&5
4358 echo "$as_me:4358: \$? = $ac_status" >&5
4359 (exit $ac_status); } &&
4360 { ac_try='test -s conftest.$ac_objext'
4361 { (eval echo "$as_me:4361: \"$ac_try\"") >&5
4364 echo "$as_me:4364: \$? = $ac_status" >&5
4365 (exit $ac_status); }; }; then
4368 echo "$as_me: failed program was:" >&5
4369 cat conftest.$ac_ext >&5
4370 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4372 rm -f conftest.$ac_objext conftest.$ac_ext
4375 echo "${as_me:-configure}:4375: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4377 CFLAGS="$cf_trim_CFLAGS"
4378 CPPFLAGS="$cf_trim_CPPFLAGS"
4380 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4381 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4383 echo "${as_me:-configure}:4383: testing if the second compile does not leave our definition intact error ..." 1>&5
4385 cat >conftest.$ac_ext <<_ACEOF
4386 #line 4386 "configure"
4387 #include "confdefs.h"
4388 #include <sys/types.h>
4393 #ifndef _POSIX_C_SOURCE
4400 rm -f conftest.$ac_objext
4401 if { (eval echo "$as_me:4401: \"$ac_compile\"") >&5
4402 (eval $ac_compile) 2>&5
4404 echo "$as_me:4404: \$? = $ac_status" >&5
4405 (exit $ac_status); } &&
4406 { ac_try='test -s conftest.$ac_objext'
4407 { (eval echo "$as_me:4407: \"$ac_try\"") >&5
4410 echo "$as_me:4410: \$? = $ac_status" >&5
4411 (exit $ac_status); }; }; then
4414 echo "$as_me: failed program was:" >&5
4415 cat conftest.$ac_ext >&5
4416 cf_cv_posix_c_source=no
4418 rm -f conftest.$ac_objext conftest.$ac_ext
4419 CFLAGS="$cf_save_CFLAGS"
4420 CPPFLAGS="$cf_save_CPPFLAGS"
4423 rm -f conftest.$ac_objext conftest.$ac_ext
4426 echo "$as_me:4426: result: $cf_cv_posix_c_source" >&5
4427 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4429 if test "$cf_cv_posix_c_source" != no ; then
4430 CFLAGS="$cf_trim_CFLAGS"
4431 CPPFLAGS="$cf_trim_CPPFLAGS"
4436 cf_new_extra_cppflags=
4438 for cf_add_cflags in $cf_cv_posix_c_source
4440 case $cf_fix_cppflags in
4442 case $cf_add_cflags in
4443 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4444 case $cf_add_cflags in
4446 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4448 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4449 && test -z "${cf_tst_cflags}" \
4450 && cf_fix_cppflags=yes
4452 if test $cf_fix_cppflags = yes ; then
4454 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4455 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4458 elif test "${cf_tst_cflags}" = "\"'" ; then
4460 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4461 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4471 case $cf_add_cflags in
4473 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4475 CPPFLAGS=`echo "$CPPFLAGS" | \
4476 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4477 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4482 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4483 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4490 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4491 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4498 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4499 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4501 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4503 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4504 && test -z "${cf_tst_cflags}" \
4505 && cf_fix_cppflags=no
4510 if test -n "$cf_new_cflags" ; then
4512 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4513 CFLAGS="${CFLAGS}$cf_new_cflags"
4517 if test -n "$cf_new_cppflags" ; then
4519 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4520 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4524 if test -n "$cf_new_extra_cppflags" ; then
4526 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4527 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4536 if test -n "$cf_xopen_source" ; then
4541 cf_new_extra_cppflags=
4543 for cf_add_cflags in $cf_xopen_source
4545 case $cf_fix_cppflags in
4547 case $cf_add_cflags in
4548 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4549 case $cf_add_cflags in
4551 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4553 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4554 && test -z "${cf_tst_cflags}" \
4555 && cf_fix_cppflags=yes
4557 if test $cf_fix_cppflags = yes ; then
4559 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4560 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4563 elif test "${cf_tst_cflags}" = "\"'" ; then
4565 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4566 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4576 case $cf_add_cflags in
4578 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4580 CPPFLAGS=`echo "$CPPFLAGS" | \
4581 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4582 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4587 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4588 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4595 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4596 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4603 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4604 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4606 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4608 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4609 && test -z "${cf_tst_cflags}" \
4610 && cf_fix_cppflags=no
4615 if test -n "$cf_new_cflags" ; then
4616 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
4618 echo "${as_me:-configure}:4618: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
4620 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4621 CFLAGS="${CFLAGS}$cf_new_cflags"
4625 if test -n "$cf_new_cppflags" ; then
4626 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
4628 echo "${as_me:-configure}:4628: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
4630 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4631 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4635 if test -n "$cf_new_extra_cppflags" ; then
4636 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
4638 echo "${as_me:-configure}:4638: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
4640 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4641 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4647 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
4648 echo "$as_me:4648: checking if _XOPEN_SOURCE really is set" >&5
4649 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
4650 cat >conftest.$ac_ext <<_ACEOF
4651 #line 4651 "configure"
4652 #include "confdefs.h"
4658 #ifndef _XOPEN_SOURCE
4665 rm -f conftest.$ac_objext
4666 if { (eval echo "$as_me:4666: \"$ac_compile\"") >&5
4667 (eval $ac_compile) 2>&5
4669 echo "$as_me:4669: \$? = $ac_status" >&5
4670 (exit $ac_status); } &&
4671 { ac_try='test -s conftest.$ac_objext'
4672 { (eval echo "$as_me:4672: \"$ac_try\"") >&5
4675 echo "$as_me:4675: \$? = $ac_status" >&5
4676 (exit $ac_status); }; }; then
4677 cf_XOPEN_SOURCE_set=yes
4679 echo "$as_me: failed program was:" >&5
4680 cat conftest.$ac_ext >&5
4681 cf_XOPEN_SOURCE_set=no
4683 rm -f conftest.$ac_objext conftest.$ac_ext
4684 echo "$as_me:4684: result: $cf_XOPEN_SOURCE_set" >&5
4685 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
4686 if test $cf_XOPEN_SOURCE_set = yes
4688 cat >conftest.$ac_ext <<_ACEOF
4689 #line 4689 "configure"
4690 #include "confdefs.h"
4696 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
4703 rm -f conftest.$ac_objext
4704 if { (eval echo "$as_me:4704: \"$ac_compile\"") >&5
4705 (eval $ac_compile) 2>&5
4707 echo "$as_me:4707: \$? = $ac_status" >&5
4708 (exit $ac_status); } &&
4709 { ac_try='test -s conftest.$ac_objext'
4710 { (eval echo "$as_me:4710: \"$ac_try\"") >&5
4713 echo "$as_me:4713: \$? = $ac_status" >&5
4714 (exit $ac_status); }; }; then
4715 cf_XOPEN_SOURCE_set_ok=yes
4717 echo "$as_me: failed program was:" >&5
4718 cat conftest.$ac_ext >&5
4719 cf_XOPEN_SOURCE_set_ok=no
4721 rm -f conftest.$ac_objext conftest.$ac_ext
4722 if test $cf_XOPEN_SOURCE_set_ok = no
4724 { echo "$as_me:4724: WARNING: _XOPEN_SOURCE is lower than requested" >&5
4725 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
4729 echo "$as_me:4729: checking if we should define _XOPEN_SOURCE" >&5
4730 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4731 if test "${cf_cv_xopen_source+set}" = set; then
4732 echo $ECHO_N "(cached) $ECHO_C" >&6
4735 cat >conftest.$ac_ext <<_ACEOF
4736 #line 4736 "configure"
4737 #include "confdefs.h"
4741 #include <sys/types.h>
4747 #ifndef _XOPEN_SOURCE
4754 rm -f conftest.$ac_objext
4755 if { (eval echo "$as_me:4755: \"$ac_compile\"") >&5
4756 (eval $ac_compile) 2>&5
4758 echo "$as_me:4758: \$? = $ac_status" >&5
4759 (exit $ac_status); } &&
4760 { ac_try='test -s conftest.$ac_objext'
4761 { (eval echo "$as_me:4761: \"$ac_try\"") >&5
4764 echo "$as_me:4764: \$? = $ac_status" >&5
4765 (exit $ac_status); }; }; then
4766 cf_cv_xopen_source=no
4768 echo "$as_me: failed program was:" >&5
4769 cat conftest.$ac_ext >&5
4772 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4773 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4775 cat >conftest.$ac_ext <<_ACEOF
4776 #line 4776 "configure"
4777 #include "confdefs.h"
4781 #include <sys/types.h>
4787 #ifdef _XOPEN_SOURCE
4794 rm -f conftest.$ac_objext
4795 if { (eval echo "$as_me:4795: \"$ac_compile\"") >&5
4796 (eval $ac_compile) 2>&5
4798 echo "$as_me:4798: \$? = $ac_status" >&5
4799 (exit $ac_status); } &&
4800 { ac_try='test -s conftest.$ac_objext'
4801 { (eval echo "$as_me:4801: \"$ac_try\"") >&5
4804 echo "$as_me:4804: \$? = $ac_status" >&5
4805 (exit $ac_status); }; }; then
4806 cf_cv_xopen_source=no
4808 echo "$as_me: failed program was:" >&5
4809 cat conftest.$ac_ext >&5
4810 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4812 rm -f conftest.$ac_objext conftest.$ac_ext
4816 rm -f conftest.$ac_objext conftest.$ac_ext
4819 echo "$as_me:4819: result: $cf_cv_xopen_source" >&5
4820 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4822 if test "$cf_cv_xopen_source" != no ; then
4824 CFLAGS=`echo "$CFLAGS" | \
4825 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4826 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4828 CPPFLAGS=`echo "$CPPFLAGS" | \
4829 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4830 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4832 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4837 cf_new_extra_cppflags=
4839 for cf_add_cflags in $cf_temp_xopen_source
4841 case $cf_fix_cppflags in
4843 case $cf_add_cflags in
4844 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4845 case $cf_add_cflags in
4847 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4849 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4850 && test -z "${cf_tst_cflags}" \
4851 && cf_fix_cppflags=yes
4853 if test $cf_fix_cppflags = yes ; then
4855 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4856 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4859 elif test "${cf_tst_cflags}" = "\"'" ; then
4861 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4862 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4872 case $cf_add_cflags in
4874 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4876 CPPFLAGS=`echo "$CPPFLAGS" | \
4877 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4878 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4883 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4884 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4891 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4892 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4899 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4900 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4902 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4904 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4905 && test -z "${cf_tst_cflags}" \
4906 && cf_fix_cppflags=no
4911 if test -n "$cf_new_cflags" ; then
4913 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4914 CFLAGS="${CFLAGS}$cf_new_cflags"
4918 if test -n "$cf_new_cppflags" ; then
4920 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4921 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4925 if test -n "$cf_new_extra_cppflags" ; then
4927 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4928 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4937 echo "$as_me:4937: checking for signal global datatype" >&5
4938 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
4939 if test "${cf_cv_sig_atomic_t+set}" = set; then
4940 echo $ECHO_N "(cached) $ECHO_C" >&6
4944 "volatile sig_atomic_t" \
4948 cat >conftest.$ac_ext <<_ACEOF
4949 #line 4949 "configure"
4950 #include "confdefs.h"
4952 #include <sys/types.h>
4958 static void handler(int sig)
4965 signal(SIGINT, handler);
4971 rm -f conftest.$ac_objext
4972 if { (eval echo "$as_me:4972: \"$ac_compile\"") >&5
4973 (eval $ac_compile) 2>&5
4975 echo "$as_me:4975: \$? = $ac_status" >&5
4976 (exit $ac_status); } &&
4977 { ac_try='test -s conftest.$ac_objext'
4978 { (eval echo "$as_me:4978: \"$ac_try\"") >&5
4981 echo "$as_me:4981: \$? = $ac_status" >&5
4982 (exit $ac_status); }; }; then
4983 cf_cv_sig_atomic_t=$cf_type
4985 echo "$as_me: failed program was:" >&5
4986 cat conftest.$ac_ext >&5
4987 cf_cv_sig_atomic_t=no
4989 rm -f conftest.$ac_objext conftest.$ac_ext
4990 test "$cf_cv_sig_atomic_t" != no && break
4995 echo "$as_me:4995: result: $cf_cv_sig_atomic_t" >&5
4996 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
4997 test "$cf_cv_sig_atomic_t" != no &&
4998 cat >>confdefs.h <<EOF
4999 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
5002 # Work around breakage on OS X
5004 echo "$as_me:5004: checking if SIGWINCH is defined" >&5
5005 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
5006 if test "${cf_cv_define_sigwinch+set}" = set; then
5007 echo $ECHO_N "(cached) $ECHO_C" >&6
5010 cat >conftest.$ac_ext <<_ACEOF
5011 #line 5011 "configure"
5012 #include "confdefs.h"
5014 #include <sys/types.h>
5015 #include <sys/signal.h>
5025 rm -f conftest.$ac_objext
5026 if { (eval echo "$as_me:5026: \"$ac_compile\"") >&5
5027 (eval $ac_compile) 2>&5
5029 echo "$as_me:5029: \$? = $ac_status" >&5
5030 (exit $ac_status); } &&
5031 { ac_try='test -s conftest.$ac_objext'
5032 { (eval echo "$as_me:5032: \"$ac_try\"") >&5
5035 echo "$as_me:5035: \$? = $ac_status" >&5
5036 (exit $ac_status); }; }; then
5037 cf_cv_define_sigwinch=yes
5039 echo "$as_me: failed program was:" >&5
5040 cat conftest.$ac_ext >&5
5041 cat >conftest.$ac_ext <<_ACEOF
5042 #line 5042 "configure"
5043 #include "confdefs.h"
5045 #undef _XOPEN_SOURCE
5046 #undef _POSIX_SOURCE
5047 #undef _POSIX_C_SOURCE
5048 #include <sys/types.h>
5049 #include <sys/signal.h>
5059 rm -f conftest.$ac_objext
5060 if { (eval echo "$as_me:5060: \"$ac_compile\"") >&5
5061 (eval $ac_compile) 2>&5
5063 echo "$as_me:5063: \$? = $ac_status" >&5
5064 (exit $ac_status); } &&
5065 { ac_try='test -s conftest.$ac_objext'
5066 { (eval echo "$as_me:5066: \"$ac_try\"") >&5
5069 echo "$as_me:5069: \$? = $ac_status" >&5
5070 (exit $ac_status); }; }; then
5071 cf_cv_define_sigwinch=maybe
5073 echo "$as_me: failed program was:" >&5
5074 cat conftest.$ac_ext >&5
5075 cf_cv_define_sigwinch=no
5077 rm -f conftest.$ac_objext conftest.$ac_ext
5080 rm -f conftest.$ac_objext conftest.$ac_ext
5083 echo "$as_me:5083: result: $cf_cv_define_sigwinch" >&5
5084 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
5086 if test "$cf_cv_define_sigwinch" = maybe ; then
5087 echo "$as_me:5087: checking for actual SIGWINCH definition" >&5
5088 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
5089 if test "${cf_cv_fixup_sigwinch+set}" = set; then
5090 echo $ECHO_N "(cached) $ECHO_C" >&6
5093 cf_cv_fixup_sigwinch=unknown
5095 while test $cf_sigwinch != 1
5097 cat >conftest.$ac_ext <<_ACEOF
5098 #line 5098 "configure"
5099 #include "confdefs.h"
5101 #undef _XOPEN_SOURCE
5102 #undef _POSIX_SOURCE
5103 #undef _POSIX_C_SOURCE
5104 #include <sys/types.h>
5105 #include <sys/signal.h>
5111 #if SIGWINCH != $cf_sigwinch
5119 rm -f conftest.$ac_objext
5120 if { (eval echo "$as_me:5120: \"$ac_compile\"") >&5
5121 (eval $ac_compile) 2>&5
5123 echo "$as_me:5123: \$? = $ac_status" >&5
5124 (exit $ac_status); } &&
5125 { ac_try='test -s conftest.$ac_objext'
5126 { (eval echo "$as_me:5126: \"$ac_try\"") >&5
5129 echo "$as_me:5129: \$? = $ac_status" >&5
5130 (exit $ac_status); }; }; then
5131 cf_cv_fixup_sigwinch=$cf_sigwinch
5134 echo "$as_me: failed program was:" >&5
5135 cat conftest.$ac_ext >&5
5137 rm -f conftest.$ac_objext conftest.$ac_ext
5139 cf_sigwinch=`expr $cf_sigwinch - 1`
5143 echo "$as_me:5143: result: $cf_cv_fixup_sigwinch" >&5
5144 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
5146 if test "$cf_cv_fixup_sigwinch" != unknown ; then
5147 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
5151 # Checks for CODESET support.
5153 echo "$as_me:5153: checking for nl_langinfo and CODESET" >&5
5154 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
5155 if test "${am_cv_langinfo_codeset+set}" = set; then
5156 echo $ECHO_N "(cached) $ECHO_C" >&6
5158 cat >conftest.$ac_ext <<_ACEOF
5159 #line 5159 "configure"
5160 #include "confdefs.h"
5161 #include <langinfo.h>
5165 char* cs = nl_langinfo(CODESET);
5170 rm -f conftest.$ac_objext conftest$ac_exeext
5171 if { (eval echo "$as_me:5171: \"$ac_link\"") >&5
5172 (eval $ac_link) 2>&5
5174 echo "$as_me:5174: \$? = $ac_status" >&5
5175 (exit $ac_status); } &&
5176 { ac_try='test -s conftest$ac_exeext'
5177 { (eval echo "$as_me:5177: \"$ac_try\"") >&5
5180 echo "$as_me:5180: \$? = $ac_status" >&5
5181 (exit $ac_status); }; }; then
5182 am_cv_langinfo_codeset=yes
5184 echo "$as_me: failed program was:" >&5
5185 cat conftest.$ac_ext >&5
5186 am_cv_langinfo_codeset=no
5188 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5191 echo "$as_me:5191: result: $am_cv_langinfo_codeset" >&5
5192 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
5193 if test $am_cv_langinfo_codeset = yes; then
5195 cat >>confdefs.h <<\EOF
5196 #define HAVE_LANGINFO_CODESET 1
5201 echo "$as_me:5201: checking if you want to use pkg-config" >&5
5202 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
5204 # Check whether --with-pkg-config or --without-pkg-config was given.
5205 if test "${with_pkg_config+set}" = set; then
5206 withval="$with_pkg_config"
5207 cf_pkg_config=$withval
5211 echo "$as_me:5211: result: $cf_pkg_config" >&5
5212 echo "${ECHO_T}$cf_pkg_config" >&6
5214 case $cf_pkg_config in
5220 if test -n "$ac_tool_prefix"; then
5221 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5222 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5223 echo "$as_me:5223: checking for $ac_word" >&5
5224 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5225 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
5226 echo $ECHO_N "(cached) $ECHO_C" >&6
5230 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5233 ac_save_IFS=$IFS; IFS=$ac_path_separator
5235 for ac_dir in $ac_dummy; do
5237 test -z "$ac_dir" && ac_dir=.
5238 if $as_executable_p "$ac_dir/$ac_word"; then
5239 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
5240 echo "$as_me:5240: found $ac_dir/$ac_word" >&5
5248 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5250 if test -n "$PKG_CONFIG"; then
5251 echo "$as_me:5251: result: $PKG_CONFIG" >&5
5252 echo "${ECHO_T}$PKG_CONFIG" >&6
5254 echo "$as_me:5254: result: no" >&5
5255 echo "${ECHO_T}no" >&6
5259 if test -z "$ac_cv_path_PKG_CONFIG"; then
5260 ac_pt_PKG_CONFIG=$PKG_CONFIG
5261 # Extract the first word of "pkg-config", so it can be a program name with args.
5262 set dummy pkg-config; ac_word=$2
5263 echo "$as_me:5263: checking for $ac_word" >&5
5264 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5265 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
5266 echo $ECHO_N "(cached) $ECHO_C" >&6
5268 case $ac_pt_PKG_CONFIG in
5270 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5273 ac_save_IFS=$IFS; IFS=$ac_path_separator
5275 for ac_dir in $ac_dummy; do
5277 test -z "$ac_dir" && ac_dir=.
5278 if $as_executable_p "$ac_dir/$ac_word"; then
5279 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
5280 echo "$as_me:5280: found $ac_dir/$ac_word" >&5
5285 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
5289 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5291 if test -n "$ac_pt_PKG_CONFIG"; then
5292 echo "$as_me:5292: result: $ac_pt_PKG_CONFIG" >&5
5293 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
5295 echo "$as_me:5295: result: no" >&5
5296 echo "${ECHO_T}no" >&6
5299 PKG_CONFIG=$ac_pt_PKG_CONFIG
5301 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5310 test -z "$PKG_CONFIG" && PKG_CONFIG=none
5311 if test "$PKG_CONFIG" != none ; then
5313 if test "x$prefix" != xNONE; then
5314 cf_path_syntax="$prefix"
5316 cf_path_syntax="$ac_default_prefix"
5319 case ".$PKG_CONFIG" in
5324 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5326 (.\${*prefix}*|.\${*dir}*)
5327 eval PKG_CONFIG="$PKG_CONFIG"
5328 case ".$PKG_CONFIG" in
5330 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5335 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5338 { { echo "$as_me:5338: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
5339 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
5340 { (exit 1); exit 1; }; }
5344 elif test "x$cf_pkg_config" != xno ; then
5345 { echo "$as_me:5345: WARNING: pkg-config is not installed" >&5
5346 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
5349 echo "$as_me:5349: checking if you want to see long compiling messages" >&5
5350 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
5352 # Check whether --enable-echo or --disable-echo was given.
5353 if test "${enable_echo+set}" = set; then
5354 enableval="$enable_echo"
5355 test "$enableval" != no && enableval=yes
5356 if test "$enableval" != "yes" ; then
5359 ECHO_LD='@echo linking $@;'
5360 RULE_CC='@echo compiling $<'
5361 SHOW_CC='@echo compiling $@'
5383 echo "$as_me:5383: result: $enableval" >&5
5384 echo "${ECHO_T}$enableval" >&6
5386 echo "$as_me:5386: checking for ncurses wrap-prefix" >&5
5387 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
5389 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
5390 if test "${with_ncurses_wrap_prefix+set}" = set; then
5391 withval="$with_ncurses_wrap_prefix"
5392 NCURSES_WRAP_PREFIX=$withval
5394 NCURSES_WRAP_PREFIX=_nc_
5396 echo "$as_me:5396: result: $NCURSES_WRAP_PREFIX" >&5
5397 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
5399 echo "$as_me:5399: checking if you want to check for wide-character functions" >&5
5400 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
5402 # Check whether --enable-widec or --disable-widec was given.
5403 if test "${enable_widec+set}" = set; then
5404 enableval="$enable_widec"
5405 test "$enableval" != no && enableval=yes
5406 if test "$enableval" != "yes" ; then
5416 echo "$as_me:5416: result: $cf_enable_widec" >&5
5417 echo "${ECHO_T}$cf_enable_widec" >&6
5419 echo "$as_me:5419: checking for specific curses-directory" >&5
5420 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
5422 # Check whether --with-curses-dir or --without-curses-dir was given.
5423 if test "${with_curses_dir+set}" = set; then
5424 withval="$with_curses_dir"
5425 cf_cv_curses_dir=$withval
5429 echo "$as_me:5429: result: $cf_cv_curses_dir" >&5
5430 echo "${ECHO_T}$cf_cv_curses_dir" >&6
5432 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5435 if test "x$prefix" != xNONE; then
5436 cf_path_syntax="$prefix"
5438 cf_path_syntax="$ac_default_prefix"
5446 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5448 (.\${*prefix}*|.\${*dir}*)
5449 eval withval="$withval"
5452 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5457 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5460 { { echo "$as_me:5460: error: expected a pathname, not \"$withval\"" >&5
5461 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5462 { (exit 1); exit 1; }; }
5466 if test -d "$cf_cv_curses_dir"
5469 if test -n "$cf_cv_curses_dir/include" ; then
5470 for cf_add_incdir in $cf_cv_curses_dir/include
5472 while test $cf_add_incdir != /usr/include
5474 if test -d $cf_add_incdir
5477 if test -n "$CFLAGS$CPPFLAGS" ; then
5478 # a loop is needed to ensure we can add subdirs of existing dirs
5479 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5480 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5481 cf_have_incdir=yes; break
5486 if test "$cf_have_incdir" = no ; then
5487 if test "$cf_add_incdir" = /usr/local/include ; then
5488 if test "$GCC" = yes
5490 cf_save_CPPFLAGS=$CPPFLAGS
5492 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5493 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5495 cat >conftest.$ac_ext <<_ACEOF
5496 #line 5496 "configure"
5497 #include "confdefs.h"
5507 rm -f conftest.$ac_objext
5508 if { (eval echo "$as_me:5508: \"$ac_compile\"") >&5
5509 (eval $ac_compile) 2>&5
5511 echo "$as_me:5511: \$? = $ac_status" >&5
5512 (exit $ac_status); } &&
5513 { ac_try='test -s conftest.$ac_objext'
5514 { (eval echo "$as_me:5514: \"$ac_try\"") >&5
5517 echo "$as_me:5517: \$? = $ac_status" >&5
5518 (exit $ac_status); }; }; then
5521 echo "$as_me: failed program was:" >&5
5522 cat conftest.$ac_ext >&5
5525 rm -f conftest.$ac_objext conftest.$ac_ext
5526 CPPFLAGS=$cf_save_CPPFLAGS
5531 if test "$cf_have_incdir" = no ; then
5532 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5534 echo "${as_me:-configure}:5534: testing adding $cf_add_incdir to include-path ..." 1>&5
5536 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5538 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5539 test "$cf_top_incdir" = "$cf_add_incdir" && break
5540 cf_add_incdir="$cf_top_incdir"
5551 if test -n "$cf_cv_curses_dir/lib" ; then
5552 for cf_add_libdir in $cf_cv_curses_dir/lib
5554 if test $cf_add_libdir = /usr/lib ; then
5556 elif test -d $cf_add_libdir
5559 if test -n "$LDFLAGS$LIBS" ; then
5560 # a loop is needed to ensure we can add subdirs of existing dirs
5561 for cf_test_libdir in $LDFLAGS $LIBS ; do
5562 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5563 cf_have_libdir=yes; break
5567 if test "$cf_have_libdir" = no ; then
5568 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5570 echo "${as_me:-configure}:5570: testing adding $cf_add_libdir to library-path ..." 1>&5
5572 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5583 echo "$as_me:5583: checking for specified curses library type" >&5
5584 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
5586 # Check whether --with-screen or --without-screen was given.
5587 if test "${with_screen+set}" = set; then
5588 withval="$with_screen"
5589 cf_cv_screen=$withval
5592 # Check whether --with-ncursesw or --without-ncursesw was given.
5593 if test "${with_ncursesw+set}" = set; then
5594 withval="$with_ncursesw"
5595 cf_cv_screen=ncursesw
5598 # Check whether --with-ncurses or --without-ncurses was given.
5599 if test "${with_ncurses+set}" = set; then
5600 withval="$with_ncurses"
5601 cf_cv_screen=ncurses
5604 # Check whether --with-pdcurses or --without-pdcurses was given.
5605 if test "${with_pdcurses+set}" = set; then
5606 withval="$with_pdcurses"
5607 cf_cv_screen=pdcurses
5610 # Check whether --with-curses-colr or --without-curses-colr was given.
5611 if test "${with_curses_colr+set}" = set; then
5612 withval="$with_curses_colr"
5613 cf_cv_screen=curses_colr
5616 # Check whether --with-curses-5lib or --without-curses-5lib was given.
5617 if test "${with_curses_5lib+set}" = set; then
5618 withval="$with_curses_5lib"
5619 cf_cv_screen=curses_5lib
5627 echo "$as_me:5627: result: $cf_cv_screen" >&5
5628 echo "${ECHO_T}$cf_cv_screen" >&6
5630 case $cf_cv_screen in
5633 echo "$as_me:5633: checking for extra include directories" >&5
5634 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
5635 if test "${cf_cv_curses_incdir+set}" = set; then
5636 echo $ECHO_N "(cached) $ECHO_C" >&6
5639 cf_cv_curses_incdir=no
5642 if test "x$cf_cv_screen" = "xcurses_colr"
5644 test -d /usr/include/curses_colr && \
5645 cf_cv_curses_incdir="-I/usr/include/curses_colr"
5649 if test "x$cf_cv_screen" = "xcurses_5lib"
5651 test -d /usr/5lib && \
5652 test -d /usr/5include && \
5653 cf_cv_curses_incdir="-I/usr/5include"
5659 echo "$as_me:5659: result: $cf_cv_curses_incdir" >&5
5660 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
5661 if test "$cf_cv_curses_incdir" != no
5664 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5665 CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
5669 echo "$as_me:5669: checking if we have identified curses headers" >&5
5670 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5671 if test "${cf_cv_ncurses_header+set}" = set; then
5672 echo $ECHO_N "(cached) $ECHO_C" >&6
5675 cf_cv_ncurses_header=none
5678 curses.h ncurses/ncurses.h ncurses/curses.h
5680 cat >conftest.$ac_ext <<_ACEOF
5681 #line 5681 "configure"
5682 #include "confdefs.h"
5683 #include <${cf_header}>
5687 initscr(); tgoto("?", 0,0)
5692 rm -f conftest.$ac_objext
5693 if { (eval echo "$as_me:5693: \"$ac_compile\"") >&5
5694 (eval $ac_compile) 2>&5
5696 echo "$as_me:5696: \$? = $ac_status" >&5
5697 (exit $ac_status); } &&
5698 { ac_try='test -s conftest.$ac_objext'
5699 { (eval echo "$as_me:5699: \"$ac_try\"") >&5
5702 echo "$as_me:5702: \$? = $ac_status" >&5
5703 (exit $ac_status); }; }; then
5704 cf_cv_ncurses_header=$cf_header; break
5706 echo "$as_me: failed program was:" >&5
5707 cat conftest.$ac_ext >&5
5709 rm -f conftest.$ac_objext conftest.$ac_ext
5713 echo "$as_me:5713: result: $cf_cv_ncurses_header" >&5
5714 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5716 if test "$cf_cv_ncurses_header" = none ; then
5717 { { echo "$as_me:5717: error: No curses header-files found" >&5
5718 echo "$as_me: error: No curses header-files found" >&2;}
5719 { (exit 1); exit 1; }; }
5722 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5724 for ac_header in $cf_cv_ncurses_header
5726 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5727 echo "$as_me:5727: checking for $ac_header" >&5
5728 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5729 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5730 echo $ECHO_N "(cached) $ECHO_C" >&6
5732 cat >conftest.$ac_ext <<_ACEOF
5733 #line 5733 "configure"
5734 #include "confdefs.h"
5735 #include <$ac_header>
5737 if { (eval echo "$as_me:5737: \"$ac_cpp conftest.$ac_ext\"") >&5
5738 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5740 egrep -v '^ *\+' conftest.er1 >conftest.err
5742 cat conftest.err >&5
5743 echo "$as_me:5743: \$? = $ac_status" >&5
5744 (exit $ac_status); } >/dev/null; then
5745 if test -s conftest.err; then
5746 ac_cpp_err=$ac_c_preproc_warn_flag
5753 if test -z "$ac_cpp_err"; then
5754 eval "$as_ac_Header=yes"
5756 echo "$as_me: failed program was:" >&5
5757 cat conftest.$ac_ext >&5
5758 eval "$as_ac_Header=no"
5760 rm -f conftest.err conftest.$ac_ext
5762 echo "$as_me:5762: result: `eval echo '${'$as_ac_Header'}'`" >&5
5763 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5764 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5765 cat >>confdefs.h <<EOF
5766 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5772 echo "$as_me:5772: checking for terminfo header" >&5
5773 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5774 if test "${cf_cv_term_header+set}" = set; then
5775 echo $ECHO_N "(cached) $ECHO_C" >&6
5778 case ${cf_cv_ncurses_header} in
5779 (*/ncurses.h|*/ncursesw.h)
5780 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5783 cf_term_header=term.h
5787 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5789 cat >conftest.$ac_ext <<_ACEOF
5790 #line 5790 "configure"
5791 #include "confdefs.h"
5793 #include <${cf_cv_ncurses_header:-curses.h}>
5799 int x = auto_left_margin
5804 rm -f conftest.$ac_objext
5805 if { (eval echo "$as_me:5805: \"$ac_compile\"") >&5
5806 (eval $ac_compile) 2>&5
5808 echo "$as_me:5808: \$? = $ac_status" >&5
5809 (exit $ac_status); } &&
5810 { ac_try='test -s conftest.$ac_objext'
5811 { (eval echo "$as_me:5811: \"$ac_try\"") >&5
5814 echo "$as_me:5814: \$? = $ac_status" >&5
5815 (exit $ac_status); }; }; then
5817 cf_cv_term_header="$cf_test"
5819 echo "$as_me: failed program was:" >&5
5820 cat conftest.$ac_ext >&5
5822 cf_cv_term_header=unknown
5825 rm -f conftest.$ac_objext conftest.$ac_ext
5826 test "$cf_cv_term_header" != unknown && break
5830 echo "$as_me:5830: result: $cf_cv_term_header" >&5
5831 echo "${ECHO_T}$cf_cv_term_header" >&6
5833 # Set definitions to allow ifdef'ing to accommodate subdirectories
5835 case $cf_cv_term_header in
5838 cat >>confdefs.h <<\EOF
5839 #define HAVE_TERM_H 1
5845 case $cf_cv_term_header in
5848 cat >>confdefs.h <<\EOF
5849 #define HAVE_NCURSES_TERM_H 1
5855 cat >>confdefs.h <<\EOF
5856 #define HAVE_NCURSESW_TERM_H 1
5862 echo "$as_me:5862: checking for ncurses version" >&5
5863 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5864 if test "${cf_cv_ncurses_version+set}" = set; then
5865 echo $ECHO_N "(cached) $ECHO_C" >&6
5868 cf_cv_ncurses_version=no
5871 if test "$cross_compiling" = yes; then
5873 # This will not work if the preprocessor splits the line after the
5874 # Autoconf token. The 'unproto' program does that.
5875 cat > conftest.$ac_ext <<EOF
5876 #include <${cf_cv_ncurses_header:-curses.h}>
5878 #ifdef NCURSES_VERSION
5879 Autoconf NCURSES_VERSION
5887 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5888 { (eval echo "$as_me:5888: \"$cf_try\"") >&5
5891 echo "$as_me:5891: \$? = $ac_status" >&5
5892 (exit $ac_status); }
5893 if test -f conftest.out ; then
5894 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5895 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5900 cat >conftest.$ac_ext <<_ACEOF
5901 #line 5901 "configure"
5902 #include "confdefs.h"
5904 #include <${cf_cv_ncurses_header:-curses.h}>
5908 FILE *fp = fopen("$cf_tempfile", "w");
5909 #ifdef NCURSES_VERSION
5910 # ifdef NCURSES_VERSION_PATCH
5911 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5913 fprintf(fp, "%s\n", NCURSES_VERSION);
5917 fprintf(fp, "old\n");
5922 ${cf_cv_main_return:-return}(0);
5925 rm -f conftest$ac_exeext
5926 if { (eval echo "$as_me:5926: \"$ac_link\"") >&5
5927 (eval $ac_link) 2>&5
5929 echo "$as_me:5929: \$? = $ac_status" >&5
5930 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5931 { (eval echo "$as_me:5931: \"$ac_try\"") >&5
5934 echo "$as_me:5934: \$? = $ac_status" >&5
5935 (exit $ac_status); }; }; then
5937 cf_cv_ncurses_version=`cat $cf_tempfile`
5939 echo "$as_me: program exited with status $ac_status" >&5
5940 echo "$as_me: failed program was:" >&5
5941 cat conftest.$ac_ext >&5
5943 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5948 echo "$as_me:5948: result: $cf_cv_ncurses_version" >&5
5949 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5950 test "$cf_cv_ncurses_version" = no ||
5951 cat >>confdefs.h <<\EOF
5955 echo "$as_me:5955: checking if we have identified curses libraries" >&5
5956 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
5957 cat >conftest.$ac_ext <<_ACEOF
5958 #line 5958 "configure"
5959 #include "confdefs.h"
5960 #include <${cf_cv_ncurses_header:-curses.h}>
5964 initscr(); tgoto("?", 0,0)
5969 rm -f conftest.$ac_objext conftest$ac_exeext
5970 if { (eval echo "$as_me:5970: \"$ac_link\"") >&5
5971 (eval $ac_link) 2>&5
5973 echo "$as_me:5973: \$? = $ac_status" >&5
5974 (exit $ac_status); } &&
5975 { ac_try='test -s conftest$ac_exeext'
5976 { (eval echo "$as_me:5976: \"$ac_try\"") >&5
5979 echo "$as_me:5979: \$? = $ac_status" >&5
5980 (exit $ac_status); }; }; then
5983 echo "$as_me: failed program was:" >&5
5984 cat conftest.$ac_ext >&5
5987 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5988 echo "$as_me:5988: result: $cf_result" >&5
5989 echo "${ECHO_T}$cf_result" >&6
5991 if test "$cf_result" = no ; then
5994 echo "$as_me:5994: checking for tgoto in -lmytinfo" >&5
5995 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5996 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5997 echo $ECHO_N "(cached) $ECHO_C" >&6
5999 ac_check_lib_save_LIBS=$LIBS
6000 LIBS="-lmytinfo $LIBS"
6001 cat >conftest.$ac_ext <<_ACEOF
6002 #line 6002 "configure"
6003 #include "confdefs.h"
6005 /* Override any gcc2 internal prototype to avoid an error. */
6009 /* We use char because int might match the return type of a gcc2
6010 builtin and then its argument prototype would still apply. */
6020 rm -f conftest.$ac_objext conftest$ac_exeext
6021 if { (eval echo "$as_me:6021: \"$ac_link\"") >&5
6022 (eval $ac_link) 2>&5
6024 echo "$as_me:6024: \$? = $ac_status" >&5
6025 (exit $ac_status); } &&
6026 { ac_try='test -s conftest$ac_exeext'
6027 { (eval echo "$as_me:6027: \"$ac_try\"") >&5
6030 echo "$as_me:6030: \$? = $ac_status" >&5
6031 (exit $ac_status); }; }; then
6032 ac_cv_lib_mytinfo_tgoto=yes
6034 echo "$as_me: failed program was:" >&5
6035 cat conftest.$ac_ext >&5
6036 ac_cv_lib_mytinfo_tgoto=no
6038 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6039 LIBS=$ac_check_lib_save_LIBS
6041 echo "$as_me:6041: result: $ac_cv_lib_mytinfo_tgoto" >&5
6042 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6043 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6045 cf_add_libs="-lmytinfo"
6046 # Filter out duplicates - this happens with badly-designed ".pc" files...
6047 for cf_add_1lib in $LIBS
6049 for cf_add_2lib in $cf_add_libs
6051 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6057 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6065 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
6066 # next (1998), and xcurses "newer" (2000). There is no header file for
6067 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
6068 # term.h) for cur_colr
6069 if test "x$cf_cv_screen" = "xcurses_colr"
6071 echo "$as_me:6071: checking for initscr in -lcur_colr" >&5
6072 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
6073 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
6074 echo $ECHO_N "(cached) $ECHO_C" >&6
6076 ac_check_lib_save_LIBS=$LIBS
6077 LIBS="-lcur_colr $LIBS"
6078 cat >conftest.$ac_ext <<_ACEOF
6079 #line 6079 "configure"
6080 #include "confdefs.h"
6082 /* Override any gcc2 internal prototype to avoid an error. */
6086 /* We use char because int might match the return type of a gcc2
6087 builtin and then its argument prototype would still apply. */
6097 rm -f conftest.$ac_objext conftest$ac_exeext
6098 if { (eval echo "$as_me:6098: \"$ac_link\"") >&5
6099 (eval $ac_link) 2>&5
6101 echo "$as_me:6101: \$? = $ac_status" >&5
6102 (exit $ac_status); } &&
6103 { ac_try='test -s conftest$ac_exeext'
6104 { (eval echo "$as_me:6104: \"$ac_try\"") >&5
6107 echo "$as_me:6107: \$? = $ac_status" >&5
6108 (exit $ac_status); }; }; then
6109 ac_cv_lib_cur_colr_initscr=yes
6111 echo "$as_me: failed program was:" >&5
6112 cat conftest.$ac_ext >&5
6113 ac_cv_lib_cur_colr_initscr=no
6115 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6116 LIBS=$ac_check_lib_save_LIBS
6118 echo "$as_me:6118: result: $ac_cv_lib_cur_colr_initscr" >&5
6119 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
6120 if test $ac_cv_lib_cur_colr_initscr = yes; then
6122 cf_add_libs="-lcur_colr"
6123 # Filter out duplicates - this happens with badly-designed ".pc" files...
6124 for cf_add_1lib in $LIBS
6126 for cf_add_2lib in $cf_add_libs
6128 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6134 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6138 ac_cv_func_initscr=yes
6142 echo "$as_me:6142: checking for initscr in -lHcurses" >&5
6143 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
6144 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
6145 echo $ECHO_N "(cached) $ECHO_C" >&6
6147 ac_check_lib_save_LIBS=$LIBS
6148 LIBS="-lHcurses $LIBS"
6149 cat >conftest.$ac_ext <<_ACEOF
6150 #line 6150 "configure"
6151 #include "confdefs.h"
6153 /* Override any gcc2 internal prototype to avoid an error. */
6157 /* We use char because int might match the return type of a gcc2
6158 builtin and then its argument prototype would still apply. */
6168 rm -f conftest.$ac_objext conftest$ac_exeext
6169 if { (eval echo "$as_me:6169: \"$ac_link\"") >&5
6170 (eval $ac_link) 2>&5
6172 echo "$as_me:6172: \$? = $ac_status" >&5
6173 (exit $ac_status); } &&
6174 { ac_try='test -s conftest$ac_exeext'
6175 { (eval echo "$as_me:6175: \"$ac_try\"") >&5
6178 echo "$as_me:6178: \$? = $ac_status" >&5
6179 (exit $ac_status); }; }; then
6180 ac_cv_lib_Hcurses_initscr=yes
6182 echo "$as_me: failed program was:" >&5
6183 cat conftest.$ac_ext >&5
6184 ac_cv_lib_Hcurses_initscr=no
6186 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6187 LIBS=$ac_check_lib_save_LIBS
6189 echo "$as_me:6189: result: $ac_cv_lib_Hcurses_initscr" >&5
6190 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
6191 if test $ac_cv_lib_Hcurses_initscr = yes; then
6193 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
6195 cf_add_libs="-lHcurses"
6196 # Filter out duplicates - this happens with badly-designed ".pc" files...
6197 for cf_add_1lib in $LIBS
6199 for cf_add_2lib in $cf_add_libs
6201 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6207 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6211 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6212 CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
6214 ac_cv_func_initscr=yes
6223 case `arch 2>/dev/null` in
6228 if test -n "/lib64" ; then
6229 for cf_add_libdir in /lib64
6231 if test $cf_add_libdir = /usr/lib ; then
6233 elif test -d $cf_add_libdir
6236 if test -n "$LDFLAGS$LIBS" ; then
6237 # a loop is needed to ensure we can add subdirs of existing dirs
6238 for cf_test_libdir in $LDFLAGS $LIBS ; do
6239 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6240 cf_have_libdir=yes; break
6244 if test "$cf_have_libdir" = no ; then
6245 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6247 echo "${as_me:-configure}:6247: testing adding $cf_add_libdir to library-path ..." 1>&5
6249 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6257 if test -n "/lib" ; then
6258 for cf_add_libdir in /lib
6260 if test $cf_add_libdir = /usr/lib ; then
6262 elif test -d $cf_add_libdir
6265 if test -n "$LDFLAGS$LIBS" ; then
6266 # a loop is needed to ensure we can add subdirs of existing dirs
6267 for cf_test_libdir in $LDFLAGS $LIBS ; do
6268 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6269 cf_have_libdir=yes; break
6273 if test "$cf_have_libdir" = no ; then
6274 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6276 echo "${as_me:-configure}:6276: testing adding $cf_add_libdir to library-path ..." 1>&5
6278 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6288 if test -n "/lib" ; then
6289 for cf_add_libdir in /lib
6291 if test $cf_add_libdir = /usr/lib ; then
6293 elif test -d $cf_add_libdir
6296 if test -n "$LDFLAGS$LIBS" ; then
6297 # a loop is needed to ensure we can add subdirs of existing dirs
6298 for cf_test_libdir in $LDFLAGS $LIBS ; do
6299 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6300 cf_have_libdir=yes; break
6304 if test "$cf_have_libdir" = no ; then
6305 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6307 echo "${as_me:-configure}:6307: testing adding $cf_add_libdir to library-path ..." 1>&5
6309 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6319 if test "x$cf_cv_screen" = "xcurses_5lib"
6321 if test -d /usr/5lib ; then
6323 if test -n "/usr/5lib" ; then
6324 for cf_add_libdir in /usr/5lib
6326 if test $cf_add_libdir = /usr/lib ; then
6328 elif test -d $cf_add_libdir
6331 if test -n "$LDFLAGS$LIBS" ; then
6332 # a loop is needed to ensure we can add subdirs of existing dirs
6333 for cf_test_libdir in $LDFLAGS $LIBS ; do
6334 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6335 cf_have_libdir=yes; break
6339 if test "$cf_have_libdir" = no ; then
6340 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6342 echo "${as_me:-configure}:6342: testing adding $cf_add_libdir to library-path ..." 1>&5
6344 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6350 cf_add_libs="-lcurses -ltermcap"
6351 # Filter out duplicates - this happens with badly-designed ".pc" files...
6352 for cf_add_1lib in $LIBS
6354 for cf_add_2lib in $cf_add_libs
6356 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6362 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6368 ac_cv_func_initscr=yes
6372 if test ".$ac_cv_func_initscr" != .yes ; then
6373 cf_save_LIBS="$LIBS"
6375 if test ".${cf_cv_ncurses_version:-no}" != .no
6377 cf_check_list="ncurses curses cursesX"
6379 cf_check_list="cursesX curses ncurses"
6382 # Check for library containing tgoto. Do this before curses library
6383 # because it may be needed to link the test-case for initscr.
6384 if test "x$cf_term_lib" = x
6386 echo "$as_me:6386: checking for tgoto" >&5
6387 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
6388 if test "${ac_cv_func_tgoto+set}" = set; then
6389 echo $ECHO_N "(cached) $ECHO_C" >&6
6391 cat >conftest.$ac_ext <<_ACEOF
6392 #line 6392 "configure"
6393 #include "confdefs.h"
6394 /* System header to define __stub macros and hopefully few prototypes,
6395 which can conflict with char tgoto (); below. */
6397 /* Override any gcc2 internal prototype to avoid an error. */
6401 /* We use char because int might match the return type of a gcc2
6402 builtin and then its argument prototype would still apply. */
6409 /* The GNU C library defines this for functions which it implements
6410 to always fail with ENOSYS. Some functions are actually named
6411 something starting with __ and the normal name is an alias. */
6412 #if defined (__stub_tgoto) || defined (__stub___tgoto)
6415 f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6422 rm -f conftest.$ac_objext conftest$ac_exeext
6423 if { (eval echo "$as_me:6423: \"$ac_link\"") >&5
6424 (eval $ac_link) 2>&5
6426 echo "$as_me:6426: \$? = $ac_status" >&5
6427 (exit $ac_status); } &&
6428 { ac_try='test -s conftest$ac_exeext'
6429 { (eval echo "$as_me:6429: \"$ac_try\"") >&5
6432 echo "$as_me:6432: \$? = $ac_status" >&5
6433 (exit $ac_status); }; }; then
6434 ac_cv_func_tgoto=yes
6436 echo "$as_me: failed program was:" >&5
6437 cat conftest.$ac_ext >&5
6440 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6442 echo "$as_me:6442: result: $ac_cv_func_tgoto" >&5
6443 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
6444 if test $ac_cv_func_tgoto = yes; then
6445 cf_term_lib=predefined
6448 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
6450 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
6451 echo "$as_me:6451: checking for tgoto in -l$cf_term_lib" >&5
6452 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
6453 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
6454 echo $ECHO_N "(cached) $ECHO_C" >&6
6456 ac_check_lib_save_LIBS=$LIBS
6457 LIBS="-l$cf_term_lib $LIBS"
6458 cat >conftest.$ac_ext <<_ACEOF
6459 #line 6459 "configure"
6460 #include "confdefs.h"
6462 /* Override any gcc2 internal prototype to avoid an error. */
6466 /* We use char because int might match the return type of a gcc2
6467 builtin and then its argument prototype would still apply. */
6477 rm -f conftest.$ac_objext conftest$ac_exeext
6478 if { (eval echo "$as_me:6478: \"$ac_link\"") >&5
6479 (eval $ac_link) 2>&5
6481 echo "$as_me:6481: \$? = $ac_status" >&5
6482 (exit $ac_status); } &&
6483 { ac_try='test -s conftest$ac_exeext'
6484 { (eval echo "$as_me:6484: \"$ac_try\"") >&5
6487 echo "$as_me:6487: \$? = $ac_status" >&5
6488 (exit $ac_status); }; }; then
6489 eval "$as_ac_Lib=yes"
6491 echo "$as_me: failed program was:" >&5
6492 cat conftest.$ac_ext >&5
6493 eval "$as_ac_Lib=no"
6495 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6496 LIBS=$ac_check_lib_save_LIBS
6498 echo "$as_me:6498: result: `eval echo '${'$as_ac_Lib'}'`" >&5
6499 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
6500 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
6502 : ${cf_nculib_root:=$cf_term_lib}
6513 # Check for library containing initscr
6514 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
6515 if test "x$cf_curs_lib" = x
6517 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
6519 LIBS="-l$cf_curs_lib $cf_save_LIBS"
6520 if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
6521 echo "$as_me:6521: checking if we can link with $cf_curs_lib library" >&5
6522 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
6523 cat >conftest.$ac_ext <<_ACEOF
6524 #line 6524 "configure"
6525 #include "confdefs.h"
6526 #include <${cf_cv_ncurses_header:-curses.h}>
6535 rm -f conftest.$ac_objext conftest$ac_exeext
6536 if { (eval echo "$as_me:6536: \"$ac_link\"") >&5
6537 (eval $ac_link) 2>&5
6539 echo "$as_me:6539: \$? = $ac_status" >&5
6540 (exit $ac_status); } &&
6541 { ac_try='test -s conftest$ac_exeext'
6542 { (eval echo "$as_me:6542: \"$ac_try\"") >&5
6545 echo "$as_me:6545: \$? = $ac_status" >&5
6546 (exit $ac_status); }; }; then
6549 echo "$as_me: failed program was:" >&5
6550 cat conftest.$ac_ext >&5
6553 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6554 echo "$as_me:6554: result: $cf_result" >&5
6555 echo "${ECHO_T}$cf_result" >&6
6556 test $cf_result = yes && break
6557 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
6559 elif test "$cf_term_lib" != predefined ; then
6560 echo "$as_me:6560: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
6561 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
6562 cat >conftest.$ac_ext <<_ACEOF
6563 #line 6563 "configure"
6564 #include "confdefs.h"
6565 #include <${cf_cv_ncurses_header:-curses.h}>
6569 initscr(); tgoto((char *)0, 0, 0);
6574 rm -f conftest.$ac_objext conftest$ac_exeext
6575 if { (eval echo "$as_me:6575: \"$ac_link\"") >&5
6576 (eval $ac_link) 2>&5
6578 echo "$as_me:6578: \$? = $ac_status" >&5
6579 (exit $ac_status); } &&
6580 { ac_try='test -s conftest$ac_exeext'
6581 { (eval echo "$as_me:6581: \"$ac_try\"") >&5
6584 echo "$as_me:6584: \$? = $ac_status" >&5
6585 (exit $ac_status); }; }; then
6588 echo "$as_me: failed program was:" >&5
6589 cat conftest.$ac_ext >&5
6591 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
6592 cat >conftest.$ac_ext <<_ACEOF
6593 #line 6593 "configure"
6594 #include "confdefs.h"
6595 #include <${cf_cv_ncurses_header:-curses.h}>
6604 rm -f conftest.$ac_objext conftest$ac_exeext
6605 if { (eval echo "$as_me:6605: \"$ac_link\"") >&5
6606 (eval $ac_link) 2>&5
6608 echo "$as_me:6608: \$? = $ac_status" >&5
6609 (exit $ac_status); } &&
6610 { ac_try='test -s conftest$ac_exeext'
6611 { (eval echo "$as_me:6611: \"$ac_try\"") >&5
6614 echo "$as_me:6614: \$? = $ac_status" >&5
6615 (exit $ac_status); }; }; then
6618 echo "$as_me: failed program was:" >&5
6619 cat conftest.$ac_ext >&5
6622 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6625 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6626 echo "$as_me:6626: result: $cf_result" >&5
6627 echo "${ECHO_T}$cf_result" >&6
6628 test $cf_result != error && break
6632 test $cf_curs_lib = unknown && { { echo "$as_me:6632: error: no curses library found" >&5
6633 echo "$as_me: error: no curses library found" >&2;}
6634 { (exit 1); exit 1; }; }
6641 echo "$as_me:6641: checking for multibyte character support" >&5
6642 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6643 if test "${cf_cv_utf8_lib+set}" = set; then
6644 echo $ECHO_N "(cached) $ECHO_C" >&6
6647 cf_save_LIBS="$LIBS"
6648 cat >conftest.$ac_ext <<_ACEOF
6649 #line 6649 "configure"
6650 #include "confdefs.h"
6661 rm -f conftest.$ac_objext conftest$ac_exeext
6662 if { (eval echo "$as_me:6662: \"$ac_link\"") >&5
6663 (eval $ac_link) 2>&5
6665 echo "$as_me:6665: \$? = $ac_status" >&5
6666 (exit $ac_status); } &&
6667 { ac_try='test -s conftest$ac_exeext'
6668 { (eval echo "$as_me:6668: \"$ac_try\"") >&5
6671 echo "$as_me:6671: \$? = $ac_status" >&5
6672 (exit $ac_status); }; }; then
6675 echo "$as_me: failed program was:" >&5
6676 cat conftest.$ac_ext >&5
6678 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6679 # will be set on completion of the AC_TRY_LINK below.
6680 cf_cv_header_path_utf8=
6681 cf_cv_library_path_utf8=
6683 echo "${as_me:-configure}:6683: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6685 cf_save_LIBS="$LIBS"
6687 cat >conftest.$ac_ext <<_ACEOF
6688 #line 6688 "configure"
6689 #include "confdefs.h"
6691 #include <libutf8.h>
6700 rm -f conftest.$ac_objext conftest$ac_exeext
6701 if { (eval echo "$as_me:6701: \"$ac_link\"") >&5
6702 (eval $ac_link) 2>&5
6704 echo "$as_me:6704: \$? = $ac_status" >&5
6705 (exit $ac_status); } &&
6706 { ac_try='test -s conftest$ac_exeext'
6707 { (eval echo "$as_me:6707: \"$ac_try\"") >&5
6710 echo "$as_me:6710: \$? = $ac_status" >&5
6711 (exit $ac_status); }; }; then
6713 cf_cv_find_linkage_utf8=yes
6714 cf_cv_header_path_utf8=/usr/include
6715 cf_cv_library_path_utf8=/usr/lib
6718 echo "$as_me: failed program was:" >&5
6719 cat conftest.$ac_ext >&5
6721 LIBS="-lutf8 $cf_save_LIBS"
6723 cat >conftest.$ac_ext <<_ACEOF
6724 #line 6724 "configure"
6725 #include "confdefs.h"
6727 #include <libutf8.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
6749 cf_cv_find_linkage_utf8=yes
6750 cf_cv_header_path_utf8=/usr/include
6751 cf_cv_library_path_utf8=/usr/lib
6752 cf_cv_library_file_utf8="-lutf8"
6755 echo "$as_me: failed program was:" >&5
6756 cat conftest.$ac_ext >&5
6758 cf_cv_find_linkage_utf8=no
6759 LIBS="$cf_save_LIBS"
6761 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6763 echo "${as_me:-configure}:6763: testing find linkage for utf8 library ..." 1>&5
6765 echo "${as_me:-configure}:6765: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6767 cf_save_CPPFLAGS="$CPPFLAGS"
6768 cf_test_CPPFLAGS="$CPPFLAGS"
6772 # collect the current set of include-directories from compiler flags
6773 cf_header_path_list=""
6774 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6775 for cf_header_path in $CPPFLAGS $CFLAGS
6777 case $cf_header_path in
6779 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6781 test "x$cf_header_path" != "xNONE" && \
6782 test -d "$cf_header_path" && \
6784 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6785 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6786 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
6787 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
6788 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
6789 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6792 cf_header_path_list="$cf_header_path_list $cf_search"
6798 # add the variations for the package we are looking for
6802 test "x$prefix" != "xNONE" && \
6803 test -d "$prefix" && \
6805 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6806 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6807 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
6808 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
6809 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
6810 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
6813 for cf_subdir_prefix in \
6822 test "x$cf_subdir_prefix" != "x$prefix" && \
6823 test -d "$cf_subdir_prefix" && \
6824 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6825 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6826 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6827 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6828 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6829 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6830 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6835 test "$includedir" != NONE && \
6836 test "$includedir" != "/usr/include" && \
6837 test -d "$includedir" && {
6838 test -d $includedir && cf_search="$cf_search $includedir"
6839 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
6842 test "$oldincludedir" != NONE && \
6843 test "$oldincludedir" != "/usr/include" && \
6844 test -d "$oldincludedir" && {
6845 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6846 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
6849 cf_search="$cf_search $cf_header_path_list"
6851 for cf_cv_header_path_utf8 in $cf_search
6853 if test -d $cf_cv_header_path_utf8 ; then
6854 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6856 echo "${as_me:-configure}:6856: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6858 CPPFLAGS="$cf_save_CPPFLAGS"
6860 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6861 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
6863 cat >conftest.$ac_ext <<_ACEOF
6864 #line 6864 "configure"
6865 #include "confdefs.h"
6867 #include <libutf8.h>
6876 rm -f conftest.$ac_objext
6877 if { (eval echo "$as_me:6877: \"$ac_compile\"") >&5
6878 (eval $ac_compile) 2>&5
6880 echo "$as_me:6880: \$? = $ac_status" >&5
6881 (exit $ac_status); } &&
6882 { ac_try='test -s conftest.$ac_objext'
6883 { (eval echo "$as_me:6883: \"$ac_try\"") >&5
6886 echo "$as_me:6886: \$? = $ac_status" >&5
6887 (exit $ac_status); }; }; then
6889 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6891 echo "${as_me:-configure}:6891: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6893 cf_cv_find_linkage_utf8=maybe
6894 cf_test_CPPFLAGS="$CPPFLAGS"
6897 echo "$as_me: failed program was:" >&5
6898 cat conftest.$ac_ext >&5
6900 CPPFLAGS="$cf_save_CPPFLAGS"
6903 rm -f conftest.$ac_objext conftest.$ac_ext
6907 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6909 echo "${as_me:-configure}:6909: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6911 cf_save_LIBS="$LIBS"
6912 cf_save_LDFLAGS="$LDFLAGS"
6914 if test "$cf_cv_find_linkage_utf8" != yes ; then
6917 cf_library_path_list=""
6918 if test -n "${LDFLAGS}${LIBS}" ; then
6919 for cf_library_path in $LDFLAGS $LIBS
6921 case $cf_library_path in
6923 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6925 test "x$cf_library_path" != "xNONE" && \
6926 test -d "$cf_library_path" && \
6928 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6929 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6930 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
6931 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6932 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
6933 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6936 cf_library_path_list="$cf_library_path_list $cf_search"
6944 test "x$prefix" != "xNONE" && \
6945 test -d "$prefix" && \
6947 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6948 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6949 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
6950 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
6951 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
6952 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
6955 for cf_subdir_prefix in \
6964 test "x$cf_subdir_prefix" != "x$prefix" && \
6965 test -d "$cf_subdir_prefix" && \
6966 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6967 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6968 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
6969 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6970 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6971 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6972 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6977 cf_search="$cf_library_path_list $cf_search"
6979 for cf_cv_library_path_utf8 in $cf_search
6981 if test -d $cf_cv_library_path_utf8 ; then
6982 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6984 echo "${as_me:-configure}:6984: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6986 CPPFLAGS="$cf_test_CPPFLAGS"
6987 LIBS="-lutf8 $cf_save_LIBS"
6988 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6989 cat >conftest.$ac_ext <<_ACEOF
6990 #line 6990 "configure"
6991 #include "confdefs.h"
6993 #include <libutf8.h>
7002 rm -f conftest.$ac_objext conftest$ac_exeext
7003 if { (eval echo "$as_me:7003: \"$ac_link\"") >&5
7004 (eval $ac_link) 2>&5
7006 echo "$as_me:7006: \$? = $ac_status" >&5
7007 (exit $ac_status); } &&
7008 { ac_try='test -s conftest$ac_exeext'
7009 { (eval echo "$as_me:7009: \"$ac_try\"") >&5
7012 echo "$as_me:7012: \$? = $ac_status" >&5
7013 (exit $ac_status); }; }; then
7015 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7017 echo "${as_me:-configure}:7017: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7019 cf_cv_find_linkage_utf8=yes
7020 cf_cv_library_file_utf8="-lutf8"
7023 echo "$as_me: failed program was:" >&5
7024 cat conftest.$ac_ext >&5
7026 CPPFLAGS="$cf_save_CPPFLAGS"
7027 LIBS="$cf_save_LIBS"
7028 LDFLAGS="$cf_save_LDFLAGS"
7031 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7034 CPPFLAGS="$cf_save_CPPFLAGS"
7035 LDFLAGS="$cf_save_LDFLAGS"
7039 cf_cv_find_linkage_utf8=no
7043 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7046 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7048 LIBS="$cf_save_LIBS"
7050 if test "$cf_cv_find_linkage_utf8" = yes ; then
7051 cf_cv_utf8_lib=add-on
7057 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7059 echo "$as_me:7059: result: $cf_cv_utf8_lib" >&5
7060 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7062 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7064 if test "$cf_cv_utf8_lib" = "add-on" ; then
7066 cat >>confdefs.h <<\EOF
7067 #define HAVE_LIBUTF8_H 1
7070 if test -n "$cf_cv_header_path_utf8" ; then
7071 for cf_add_incdir in $cf_cv_header_path_utf8
7073 while test $cf_add_incdir != /usr/include
7075 if test -d $cf_add_incdir
7078 if test -n "$CFLAGS$CPPFLAGS" ; then
7079 # a loop is needed to ensure we can add subdirs of existing dirs
7080 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7081 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7082 cf_have_incdir=yes; break
7087 if test "$cf_have_incdir" = no ; then
7088 if test "$cf_add_incdir" = /usr/local/include ; then
7089 if test "$GCC" = yes
7091 cf_save_CPPFLAGS=$CPPFLAGS
7093 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7094 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7096 cat >conftest.$ac_ext <<_ACEOF
7097 #line 7097 "configure"
7098 #include "confdefs.h"
7108 rm -f conftest.$ac_objext
7109 if { (eval echo "$as_me:7109: \"$ac_compile\"") >&5
7110 (eval $ac_compile) 2>&5
7112 echo "$as_me:7112: \$? = $ac_status" >&5
7113 (exit $ac_status); } &&
7114 { ac_try='test -s conftest.$ac_objext'
7115 { (eval echo "$as_me:7115: \"$ac_try\"") >&5
7118 echo "$as_me:7118: \$? = $ac_status" >&5
7119 (exit $ac_status); }; }; then
7122 echo "$as_me: failed program was:" >&5
7123 cat conftest.$ac_ext >&5
7126 rm -f conftest.$ac_objext conftest.$ac_ext
7127 CPPFLAGS=$cf_save_CPPFLAGS
7132 if test "$cf_have_incdir" = no ; then
7133 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7135 echo "${as_me:-configure}:7135: testing adding $cf_add_incdir to include-path ..." 1>&5
7137 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7139 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7140 test "$cf_top_incdir" = "$cf_add_incdir" && break
7141 cf_add_incdir="$cf_top_incdir"
7152 if test -n "$cf_cv_library_path_utf8" ; then
7153 for cf_add_libdir in $cf_cv_library_path_utf8
7155 if test $cf_add_libdir = /usr/lib ; then
7157 elif test -d $cf_add_libdir
7160 if test -n "$LDFLAGS$LIBS" ; then
7161 # a loop is needed to ensure we can add subdirs of existing dirs
7162 for cf_test_libdir in $LDFLAGS $LIBS ; do
7163 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7164 cf_have_libdir=yes; break
7168 if test "$cf_have_libdir" = no ; then
7169 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7171 echo "${as_me:-configure}:7171: testing adding $cf_add_libdir to library-path ..." 1>&5
7173 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7179 cf_add_libs="$cf_cv_library_file_utf8"
7180 # Filter out duplicates - this happens with badly-designed ".pc" files...
7181 for cf_add_1lib in $LIBS
7183 for cf_add_2lib in $cf_add_libs
7185 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7191 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7197 cf_ncuconfig_root=$cf_cv_screen
7198 cf_have_ncuconfig=no
7200 if test "x${PKG_CONFIG:=none}" != xnone; then
7201 echo "$as_me:7201: checking pkg-config for $cf_ncuconfig_root" >&5
7202 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7203 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7204 echo "$as_me:7204: result: yes" >&5
7205 echo "${ECHO_T}yes" >&6
7207 echo "$as_me:7207: checking if the $cf_ncuconfig_root package files work" >&5
7208 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7209 cf_have_ncuconfig=unknown
7211 cf_save_CPPFLAGS="$CPPFLAGS"
7212 cf_save_LIBS="$LIBS"
7217 cf_new_extra_cppflags=
7219 for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
7221 case $cf_fix_cppflags in
7223 case $cf_add_cflags in
7224 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7225 case $cf_add_cflags in
7227 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7229 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7230 && test -z "${cf_tst_cflags}" \
7231 && cf_fix_cppflags=yes
7233 if test $cf_fix_cppflags = yes ; then
7235 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7236 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7239 elif test "${cf_tst_cflags}" = "\"'" ; then
7241 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7242 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7252 case $cf_add_cflags in
7254 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7256 CPPFLAGS=`echo "$CPPFLAGS" | \
7257 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7258 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7263 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7264 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7271 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7272 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7279 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7280 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7282 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7284 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7285 && test -z "${cf_tst_cflags}" \
7286 && cf_fix_cppflags=no
7291 if test -n "$cf_new_cflags" ; then
7293 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7294 CFLAGS="${CFLAGS}$cf_new_cflags"
7298 if test -n "$cf_new_cppflags" ; then
7300 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7301 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7305 if test -n "$cf_new_extra_cppflags" ; then
7307 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7308 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7312 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7313 # Filter out duplicates - this happens with badly-designed ".pc" files...
7314 for cf_add_1lib in $LIBS
7316 for cf_add_2lib in $cf_add_libs
7318 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7324 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7328 cat >conftest.$ac_ext <<_ACEOF
7329 #line 7329 "configure"
7330 #include "confdefs.h"
7331 #include <${cf_cv_ncurses_header:-curses.h}>
7335 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7340 rm -f conftest.$ac_objext conftest$ac_exeext
7341 if { (eval echo "$as_me:7341: \"$ac_link\"") >&5
7342 (eval $ac_link) 2>&5
7344 echo "$as_me:7344: \$? = $ac_status" >&5
7345 (exit $ac_status); } &&
7346 { ac_try='test -s conftest$ac_exeext'
7347 { (eval echo "$as_me:7347: \"$ac_try\"") >&5
7350 echo "$as_me:7350: \$? = $ac_status" >&5
7351 (exit $ac_status); }; }; then
7352 if test "$cross_compiling" = yes; then
7353 cf_have_ncuconfig=maybe
7355 cat >conftest.$ac_ext <<_ACEOF
7356 #line 7356 "configure"
7357 #include "confdefs.h"
7358 #include <${cf_cv_ncurses_header:-curses.h}>
7360 { char *xx = curses_version(); return (xx == 0); }
7362 rm -f conftest$ac_exeext
7363 if { (eval echo "$as_me:7363: \"$ac_link\"") >&5
7364 (eval $ac_link) 2>&5
7366 echo "$as_me:7366: \$? = $ac_status" >&5
7367 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7368 { (eval echo "$as_me:7368: \"$ac_try\"") >&5
7371 echo "$as_me:7371: \$? = $ac_status" >&5
7372 (exit $ac_status); }; }; then
7373 cf_have_ncuconfig=yes
7375 echo "$as_me: program exited with status $ac_status" >&5
7376 echo "$as_me: failed program was:" >&5
7377 cat conftest.$ac_ext >&5
7378 cf_have_ncuconfig=no
7380 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7383 echo "$as_me: failed program was:" >&5
7384 cat conftest.$ac_ext >&5
7385 cf_have_ncuconfig=no
7387 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7388 echo "$as_me:7388: result: $cf_have_ncuconfig" >&5
7389 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7390 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7391 if test "$cf_have_ncuconfig" != "yes"
7393 CPPFLAGS="$cf_save_CPPFLAGS"
7394 LIBS="$cf_save_LIBS"
7395 NCURSES_CONFIG_PKG=none
7398 cat >>confdefs.h <<\EOF
7402 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7404 echo "$as_me:7404: checking for terminfo header" >&5
7405 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7406 if test "${cf_cv_term_header+set}" = set; then
7407 echo $ECHO_N "(cached) $ECHO_C" >&6
7410 case ${cf_cv_ncurses_header} in
7411 (*/ncurses.h|*/ncursesw.h)
7412 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7415 cf_term_header=term.h
7419 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7421 cat >conftest.$ac_ext <<_ACEOF
7422 #line 7422 "configure"
7423 #include "confdefs.h"
7425 #include <${cf_cv_ncurses_header:-curses.h}>
7431 int x = auto_left_margin
7436 rm -f conftest.$ac_objext
7437 if { (eval echo "$as_me:7437: \"$ac_compile\"") >&5
7438 (eval $ac_compile) 2>&5
7440 echo "$as_me:7440: \$? = $ac_status" >&5
7441 (exit $ac_status); } &&
7442 { ac_try='test -s conftest.$ac_objext'
7443 { (eval echo "$as_me:7443: \"$ac_try\"") >&5
7446 echo "$as_me:7446: \$? = $ac_status" >&5
7447 (exit $ac_status); }; }; then
7449 cf_cv_term_header="$cf_test"
7451 echo "$as_me: failed program was:" >&5
7452 cat conftest.$ac_ext >&5
7454 cf_cv_term_header=unknown
7457 rm -f conftest.$ac_objext conftest.$ac_ext
7458 test "$cf_cv_term_header" != unknown && break
7462 echo "$as_me:7462: result: $cf_cv_term_header" >&5
7463 echo "${ECHO_T}$cf_cv_term_header" >&6
7465 # Set definitions to allow ifdef'ing to accommodate subdirectories
7467 case $cf_cv_term_header in
7470 cat >>confdefs.h <<\EOF
7471 #define HAVE_TERM_H 1
7477 case $cf_cv_term_header in
7480 cat >>confdefs.h <<\EOF
7481 #define HAVE_NCURSES_TERM_H 1
7487 cat >>confdefs.h <<\EOF
7488 #define HAVE_NCURSESW_TERM_H 1
7497 echo "$as_me:7497: result: no" >&5
7498 echo "${ECHO_T}no" >&6
7499 NCURSES_CONFIG_PKG=none
7502 NCURSES_CONFIG_PKG=none
7505 if test "x$cf_have_ncuconfig" = "xno"; then
7506 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7508 if test -n "$ac_tool_prefix"; then
7509 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7511 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7512 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7513 echo "$as_me:7513: checking for $ac_word" >&5
7514 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7515 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7516 echo $ECHO_N "(cached) $ECHO_C" >&6
7518 if test -n "$NCURSES_CONFIG"; then
7519 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7521 ac_save_IFS=$IFS; IFS=$ac_path_separator
7523 for ac_dir in $ac_dummy; do
7525 test -z "$ac_dir" && ac_dir=.
7526 $as_executable_p "$ac_dir/$ac_word" || continue
7527 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7528 echo "$as_me:7528: found $ac_dir/$ac_word" >&5
7534 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7535 if test -n "$NCURSES_CONFIG"; then
7536 echo "$as_me:7536: result: $NCURSES_CONFIG" >&5
7537 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7539 echo "$as_me:7539: result: no" >&5
7540 echo "${ECHO_T}no" >&6
7543 test -n "$NCURSES_CONFIG" && break
7546 if test -z "$NCURSES_CONFIG"; then
7547 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7548 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7550 # Extract the first word of "$ac_prog", so it can be a program name with args.
7551 set dummy $ac_prog; ac_word=$2
7552 echo "$as_me:7552: checking for $ac_word" >&5
7553 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7554 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7555 echo $ECHO_N "(cached) $ECHO_C" >&6
7557 if test -n "$ac_ct_NCURSES_CONFIG"; then
7558 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7560 ac_save_IFS=$IFS; IFS=$ac_path_separator
7562 for ac_dir in $ac_dummy; do
7564 test -z "$ac_dir" && ac_dir=.
7565 $as_executable_p "$ac_dir/$ac_word" || continue
7566 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7567 echo "$as_me:7567: found $ac_dir/$ac_word" >&5
7573 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7574 if test -n "$ac_ct_NCURSES_CONFIG"; then
7575 echo "$as_me:7575: result: $ac_ct_NCURSES_CONFIG" >&5
7576 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7578 echo "$as_me:7578: result: no" >&5
7579 echo "${ECHO_T}no" >&6
7582 test -n "$ac_ct_NCURSES_CONFIG" && break
7584 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7586 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7589 if test "$NCURSES_CONFIG" != none ; then
7594 cf_new_extra_cppflags=
7596 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7598 case $cf_fix_cppflags in
7600 case $cf_add_cflags in
7601 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7602 case $cf_add_cflags in
7604 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7606 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7607 && test -z "${cf_tst_cflags}" \
7608 && cf_fix_cppflags=yes
7610 if test $cf_fix_cppflags = yes ; then
7612 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7613 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7616 elif test "${cf_tst_cflags}" = "\"'" ; then
7618 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7619 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7629 case $cf_add_cflags in
7631 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7633 CPPFLAGS=`echo "$CPPFLAGS" | \
7634 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7635 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7640 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7641 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7648 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7649 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7656 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7657 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7659 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7661 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7662 && test -z "${cf_tst_cflags}" \
7663 && cf_fix_cppflags=no
7668 if test -n "$cf_new_cflags" ; then
7670 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7671 CFLAGS="${CFLAGS}$cf_new_cflags"
7675 if test -n "$cf_new_cppflags" ; then
7677 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7678 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7682 if test -n "$cf_new_extra_cppflags" ; then
7684 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7685 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7689 cf_add_libs="`$NCURSES_CONFIG --libs`"
7690 # Filter out duplicates - this happens with badly-designed ".pc" files...
7691 for cf_add_1lib in $LIBS
7693 for cf_add_2lib in $cf_add_libs
7695 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7701 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7705 # even with config script, some packages use no-override for curses.h
7707 echo "$as_me:7707: checking if we have identified curses headers" >&5
7708 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7709 if test "${cf_cv_ncurses_header+set}" = set; then
7710 echo $ECHO_N "(cached) $ECHO_C" >&6
7713 cf_cv_ncurses_header=none
7715 ncurses.h $cf_cv_screen/ncurses.h \
7716 curses.h $cf_cv_screen/curses.h
7718 cat >conftest.$ac_ext <<_ACEOF
7719 #line 7719 "configure"
7720 #include "confdefs.h"
7721 #include <${cf_header}>
7725 initscr(); tgoto("?", 0,0)
7730 rm -f conftest.$ac_objext
7731 if { (eval echo "$as_me:7731: \"$ac_compile\"") >&5
7732 (eval $ac_compile) 2>&5
7734 echo "$as_me:7734: \$? = $ac_status" >&5
7735 (exit $ac_status); } &&
7736 { ac_try='test -s conftest.$ac_objext'
7737 { (eval echo "$as_me:7737: \"$ac_try\"") >&5
7740 echo "$as_me:7740: \$? = $ac_status" >&5
7741 (exit $ac_status); }; }; then
7742 cf_cv_ncurses_header=$cf_header; break
7744 echo "$as_me: failed program was:" >&5
7745 cat conftest.$ac_ext >&5
7747 rm -f conftest.$ac_objext conftest.$ac_ext
7751 echo "$as_me:7751: result: $cf_cv_ncurses_header" >&5
7752 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7754 if test "$cf_cv_ncurses_header" = none ; then
7755 { { echo "$as_me:7755: error: No curses header-files found" >&5
7756 echo "$as_me: error: No curses header-files found" >&2;}
7757 { (exit 1); exit 1; }; }
7760 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7762 for ac_header in $cf_cv_ncurses_header
7764 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7765 echo "$as_me:7765: checking for $ac_header" >&5
7766 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7767 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7768 echo $ECHO_N "(cached) $ECHO_C" >&6
7770 cat >conftest.$ac_ext <<_ACEOF
7771 #line 7771 "configure"
7772 #include "confdefs.h"
7773 #include <$ac_header>
7775 if { (eval echo "$as_me:7775: \"$ac_cpp conftest.$ac_ext\"") >&5
7776 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7778 egrep -v '^ *\+' conftest.er1 >conftest.err
7780 cat conftest.err >&5
7781 echo "$as_me:7781: \$? = $ac_status" >&5
7782 (exit $ac_status); } >/dev/null; then
7783 if test -s conftest.err; then
7784 ac_cpp_err=$ac_c_preproc_warn_flag
7791 if test -z "$ac_cpp_err"; then
7792 eval "$as_ac_Header=yes"
7794 echo "$as_me: failed program was:" >&5
7795 cat conftest.$ac_ext >&5
7796 eval "$as_ac_Header=no"
7798 rm -f conftest.err conftest.$ac_ext
7800 echo "$as_me:7800: result: `eval echo '${'$as_ac_Header'}'`" >&5
7801 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7802 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7803 cat >>confdefs.h <<EOF
7804 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7810 cat >>confdefs.h <<\EOF
7814 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7816 cat >>confdefs.h <<EOF
7817 #define $cf_nculib_ROOT 1
7820 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7824 cf_ncuhdr_root=$cf_cv_screen
7826 test -n "$cf_cv_curses_dir" && \
7827 test "$cf_cv_curses_dir" != "no" && { \
7829 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7830 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7832 while test $cf_add_incdir != /usr/include
7834 if test -d $cf_add_incdir
7837 if test -n "$CFLAGS$CPPFLAGS" ; then
7838 # a loop is needed to ensure we can add subdirs of existing dirs
7839 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7840 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7841 cf_have_incdir=yes; break
7846 if test "$cf_have_incdir" = no ; then
7847 if test "$cf_add_incdir" = /usr/local/include ; then
7848 if test "$GCC" = yes
7850 cf_save_CPPFLAGS=$CPPFLAGS
7852 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7853 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7855 cat >conftest.$ac_ext <<_ACEOF
7856 #line 7856 "configure"
7857 #include "confdefs.h"
7867 rm -f conftest.$ac_objext
7868 if { (eval echo "$as_me:7868: \"$ac_compile\"") >&5
7869 (eval $ac_compile) 2>&5
7871 echo "$as_me:7871: \$? = $ac_status" >&5
7872 (exit $ac_status); } &&
7873 { ac_try='test -s conftest.$ac_objext'
7874 { (eval echo "$as_me:7874: \"$ac_try\"") >&5
7877 echo "$as_me:7877: \$? = $ac_status" >&5
7878 (exit $ac_status); }; }; then
7881 echo "$as_me: failed program was:" >&5
7882 cat conftest.$ac_ext >&5
7885 rm -f conftest.$ac_objext conftest.$ac_ext
7886 CPPFLAGS=$cf_save_CPPFLAGS
7891 if test "$cf_have_incdir" = no ; then
7892 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7894 echo "${as_me:-configure}:7894: testing adding $cf_add_incdir to include-path ..." 1>&5
7896 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7898 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7899 test "$cf_top_incdir" = "$cf_add_incdir" && break
7900 cf_add_incdir="$cf_top_incdir"
7913 echo "$as_me:7913: checking for $cf_ncuhdr_root header in include-path" >&5
7914 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
7915 if test "${cf_cv_ncurses_h+set}" = set; then
7916 echo $ECHO_N "(cached) $ECHO_C" >&6
7919 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
7920 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
7921 for cf_header in $cf_header_list
7924 cat >conftest.$ac_ext <<_ACEOF
7925 #line 7925 "configure"
7926 #include "confdefs.h"
7928 #include <$cf_header>
7933 #ifdef NCURSES_VERSION
7935 printf("%s\n", NCURSES_VERSION);
7948 rm -f conftest.$ac_objext
7949 if { (eval echo "$as_me:7949: \"$ac_compile\"") >&5
7950 (eval $ac_compile) 2>&5
7952 echo "$as_me:7952: \$? = $ac_status" >&5
7953 (exit $ac_status); } &&
7954 { ac_try='test -s conftest.$ac_objext'
7955 { (eval echo "$as_me:7955: \"$ac_try\"") >&5
7958 echo "$as_me:7958: \$? = $ac_status" >&5
7959 (exit $ac_status); }; }; then
7960 cf_cv_ncurses_h=$cf_header
7963 echo "$as_me: failed program was:" >&5
7964 cat conftest.$ac_ext >&5
7967 rm -f conftest.$ac_objext conftest.$ac_ext
7969 test "$cf_cv_ncurses_h" != no && break
7973 echo "$as_me:7973: result: $cf_cv_ncurses_h" >&5
7974 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
7976 if test "$cf_cv_ncurses_h" != no ; then
7977 cf_cv_ncurses_header=$cf_cv_ncurses_h
7980 echo "$as_me:7980: checking for $cf_ncuhdr_root include-path" >&5
7981 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
7982 if test "${cf_cv_ncurses_h2+set}" = set; then
7983 echo $ECHO_N "(cached) $ECHO_C" >&6
7986 test -n "$verbose" && echo
7990 # collect the current set of include-directories from compiler flags
7991 cf_header_path_list=""
7992 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7993 for cf_header_path in $CPPFLAGS $CFLAGS
7995 case $cf_header_path in
7997 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7999 test "x$cf_header_path" != "xNONE" && \
8000 test -d "$cf_header_path" && \
8002 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8003 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
8004 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8005 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8006 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8007 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"
8010 cf_header_path_list="$cf_header_path_list $cf_search"
8016 # add the variations for the package we are looking for
8020 test "x$prefix" != "xNONE" && \
8021 test -d "$prefix" && \
8023 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8024 test -d $prefix/include && cf_search="$cf_search $prefix/include"
8025 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8026 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8027 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8028 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8031 for cf_subdir_prefix in \
8040 test "x$cf_subdir_prefix" != "x$prefix" && \
8041 test -d "$cf_subdir_prefix" && \
8042 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8043 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8044 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
8045 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8046 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8047 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8048 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8053 test "$includedir" != NONE && \
8054 test "$includedir" != "/usr/include" && \
8055 test -d "$includedir" && {
8056 test -d $includedir && cf_search="$cf_search $includedir"
8057 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8060 test "$oldincludedir" != NONE && \
8061 test "$oldincludedir" != "/usr/include" && \
8062 test -d "$oldincludedir" && {
8063 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8064 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8067 cf_search="$cf_search $cf_header_path_list"
8069 test -n "$verbose" && echo search path $cf_search
8070 cf_save2_CPPFLAGS="$CPPFLAGS"
8071 for cf_incdir in $cf_search
8074 if test -n "$cf_incdir" ; then
8075 for cf_add_incdir in $cf_incdir
8077 while test $cf_add_incdir != /usr/include
8079 if test -d $cf_add_incdir
8082 if test -n "$CFLAGS$CPPFLAGS" ; then
8083 # a loop is needed to ensure we can add subdirs of existing dirs
8084 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8085 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8086 cf_have_incdir=yes; break
8091 if test "$cf_have_incdir" = no ; then
8092 if test "$cf_add_incdir" = /usr/local/include ; then
8093 if test "$GCC" = yes
8095 cf_save_CPPFLAGS=$CPPFLAGS
8097 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8098 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8100 cat >conftest.$ac_ext <<_ACEOF
8101 #line 8101 "configure"
8102 #include "confdefs.h"
8112 rm -f conftest.$ac_objext
8113 if { (eval echo "$as_me:8113: \"$ac_compile\"") >&5
8114 (eval $ac_compile) 2>&5
8116 echo "$as_me:8116: \$? = $ac_status" >&5
8117 (exit $ac_status); } &&
8118 { ac_try='test -s conftest.$ac_objext'
8119 { (eval echo "$as_me:8119: \"$ac_try\"") >&5
8122 echo "$as_me:8122: \$? = $ac_status" >&5
8123 (exit $ac_status); }; }; then
8126 echo "$as_me: failed program was:" >&5
8127 cat conftest.$ac_ext >&5
8130 rm -f conftest.$ac_objext conftest.$ac_ext
8131 CPPFLAGS=$cf_save_CPPFLAGS
8136 if test "$cf_have_incdir" = no ; then
8137 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8139 echo "${as_me:-configure}:8139: testing adding $cf_add_incdir to include-path ..." 1>&5
8141 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8143 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8144 test "$cf_top_incdir" = "$cf_add_incdir" && break
8145 cf_add_incdir="$cf_top_incdir"
8161 cat >conftest.$ac_ext <<_ACEOF
8162 #line 8162 "configure"
8163 #include "confdefs.h"
8165 #include <$cf_header>
8170 #ifdef NCURSES_VERSION
8172 printf("%s\n", NCURSES_VERSION);
8185 rm -f conftest.$ac_objext
8186 if { (eval echo "$as_me:8186: \"$ac_compile\"") >&5
8187 (eval $ac_compile) 2>&5
8189 echo "$as_me:8189: \$? = $ac_status" >&5
8190 (exit $ac_status); } &&
8191 { ac_try='test -s conftest.$ac_objext'
8192 { (eval echo "$as_me:8192: \"$ac_try\"") >&5
8195 echo "$as_me:8195: \$? = $ac_status" >&5
8196 (exit $ac_status); }; }; then
8197 cf_cv_ncurses_h2=$cf_header
8200 echo "$as_me: failed program was:" >&5
8201 cat conftest.$ac_ext >&5
8204 rm -f conftest.$ac_objext conftest.$ac_ext
8206 if test "$cf_cv_ncurses_h2" != no ; then
8207 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8208 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8211 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8213 CPPFLAGS="$cf_save2_CPPFLAGS"
8214 test "$cf_cv_ncurses_h2" != no && break
8216 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8216: error: not found" >&5
8217 echo "$as_me: error: not found" >&2;}
8218 { (exit 1); exit 1; }; }
8221 echo "$as_me:8221: result: $cf_cv_ncurses_h2" >&5
8222 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8224 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8225 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8226 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8227 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8230 if test -n "$cf_1st_incdir" ; then
8231 for cf_add_incdir in $cf_1st_incdir
8233 while test $cf_add_incdir != /usr/include
8235 if test -d $cf_add_incdir
8238 if test -n "$CFLAGS$CPPFLAGS" ; then
8239 # a loop is needed to ensure we can add subdirs of existing dirs
8240 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8241 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8242 cf_have_incdir=yes; break
8247 if test "$cf_have_incdir" = no ; then
8248 if test "$cf_add_incdir" = /usr/local/include ; then
8249 if test "$GCC" = yes
8251 cf_save_CPPFLAGS=$CPPFLAGS
8253 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8254 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8256 cat >conftest.$ac_ext <<_ACEOF
8257 #line 8257 "configure"
8258 #include "confdefs.h"
8268 rm -f conftest.$ac_objext
8269 if { (eval echo "$as_me:8269: \"$ac_compile\"") >&5
8270 (eval $ac_compile) 2>&5
8272 echo "$as_me:8272: \$? = $ac_status" >&5
8273 (exit $ac_status); } &&
8274 { ac_try='test -s conftest.$ac_objext'
8275 { (eval echo "$as_me:8275: \"$ac_try\"") >&5
8278 echo "$as_me:8278: \$? = $ac_status" >&5
8279 (exit $ac_status); }; }; then
8282 echo "$as_me: failed program was:" >&5
8283 cat conftest.$ac_ext >&5
8286 rm -f conftest.$ac_objext conftest.$ac_ext
8287 CPPFLAGS=$cf_save_CPPFLAGS
8292 if test "$cf_have_incdir" = no ; then
8293 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8295 echo "${as_me:-configure}:8295: testing adding $cf_add_incdir to include-path ..." 1>&5
8297 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8299 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8300 test "$cf_top_incdir" = "$cf_add_incdir" && break
8301 cf_add_incdir="$cf_top_incdir"
8314 # Set definitions to allow ifdef'ing for ncurses.h
8316 case $cf_cv_ncurses_header in
8319 cat >>confdefs.h <<\EOF
8320 #define HAVE_NCURSES_H 1
8326 case $cf_cv_ncurses_header in
8327 (ncurses/curses.h|ncurses/ncurses.h)
8329 cat >>confdefs.h <<\EOF
8330 #define HAVE_NCURSES_NCURSES_H 1
8334 (ncursesw/curses.h|ncursesw/ncurses.h)
8336 cat >>confdefs.h <<\EOF
8337 #define HAVE_NCURSESW_NCURSES_H 1
8343 echo "$as_me:8343: checking for terminfo header" >&5
8344 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8345 if test "${cf_cv_term_header+set}" = set; then
8346 echo $ECHO_N "(cached) $ECHO_C" >&6
8349 case ${cf_cv_ncurses_header} in
8350 (*/ncurses.h|*/ncursesw.h)
8351 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8354 cf_term_header=term.h
8358 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8360 cat >conftest.$ac_ext <<_ACEOF
8361 #line 8361 "configure"
8362 #include "confdefs.h"
8364 #include <${cf_cv_ncurses_header:-curses.h}>
8370 int x = auto_left_margin
8375 rm -f conftest.$ac_objext
8376 if { (eval echo "$as_me:8376: \"$ac_compile\"") >&5
8377 (eval $ac_compile) 2>&5
8379 echo "$as_me:8379: \$? = $ac_status" >&5
8380 (exit $ac_status); } &&
8381 { ac_try='test -s conftest.$ac_objext'
8382 { (eval echo "$as_me:8382: \"$ac_try\"") >&5
8385 echo "$as_me:8385: \$? = $ac_status" >&5
8386 (exit $ac_status); }; }; then
8388 cf_cv_term_header="$cf_test"
8390 echo "$as_me: failed program was:" >&5
8391 cat conftest.$ac_ext >&5
8393 cf_cv_term_header=unknown
8396 rm -f conftest.$ac_objext conftest.$ac_ext
8397 test "$cf_cv_term_header" != unknown && break
8401 echo "$as_me:8401: result: $cf_cv_term_header" >&5
8402 echo "${ECHO_T}$cf_cv_term_header" >&6
8404 # Set definitions to allow ifdef'ing to accommodate subdirectories
8406 case $cf_cv_term_header in
8409 cat >>confdefs.h <<\EOF
8410 #define HAVE_TERM_H 1
8416 case $cf_cv_term_header in
8419 cat >>confdefs.h <<\EOF
8420 #define HAVE_NCURSES_TERM_H 1
8426 cat >>confdefs.h <<\EOF
8427 #define HAVE_NCURSESW_TERM_H 1
8433 # some applications need this, but should check for NCURSES_VERSION
8435 cat >>confdefs.h <<\EOF
8439 echo "$as_me:8439: checking for ncurses version" >&5
8440 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8441 if test "${cf_cv_ncurses_version+set}" = set; then
8442 echo $ECHO_N "(cached) $ECHO_C" >&6
8445 cf_cv_ncurses_version=no
8448 if test "$cross_compiling" = yes; then
8450 # This will not work if the preprocessor splits the line after the
8451 # Autoconf token. The 'unproto' program does that.
8452 cat > conftest.$ac_ext <<EOF
8453 #include <${cf_cv_ncurses_header:-curses.h}>
8455 #ifdef NCURSES_VERSION
8456 Autoconf NCURSES_VERSION
8464 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8465 { (eval echo "$as_me:8465: \"$cf_try\"") >&5
8468 echo "$as_me:8468: \$? = $ac_status" >&5
8469 (exit $ac_status); }
8470 if test -f conftest.out ; then
8471 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8472 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8477 cat >conftest.$ac_ext <<_ACEOF
8478 #line 8478 "configure"
8479 #include "confdefs.h"
8481 #include <${cf_cv_ncurses_header:-curses.h}>
8485 FILE *fp = fopen("$cf_tempfile", "w");
8486 #ifdef NCURSES_VERSION
8487 # ifdef NCURSES_VERSION_PATCH
8488 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8490 fprintf(fp, "%s\n", NCURSES_VERSION);
8494 fprintf(fp, "old\n");
8499 ${cf_cv_main_return:-return}(0);
8502 rm -f conftest$ac_exeext
8503 if { (eval echo "$as_me:8503: \"$ac_link\"") >&5
8504 (eval $ac_link) 2>&5
8506 echo "$as_me:8506: \$? = $ac_status" >&5
8507 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8508 { (eval echo "$as_me:8508: \"$ac_try\"") >&5
8511 echo "$as_me:8511: \$? = $ac_status" >&5
8512 (exit $ac_status); }; }; then
8514 cf_cv_ncurses_version=`cat $cf_tempfile`
8516 echo "$as_me: program exited with status $ac_status" >&5
8517 echo "$as_me: failed program was:" >&5
8518 cat conftest.$ac_ext >&5
8520 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8525 echo "$as_me:8525: result: $cf_cv_ncurses_version" >&5
8526 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8527 test "$cf_cv_ncurses_version" = no ||
8528 cat >>confdefs.h <<\EOF
8532 cf_nculib_root=$cf_cv_screen
8533 # This works, except for the special case where we find gpm, but
8534 # ncurses is in a nonstandard location via $LIBS, and we really want
8537 cf_ncurses_SAVE="$LIBS"
8538 echo "$as_me:8538: checking for Gpm_Open in -lgpm" >&5
8539 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8540 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8541 echo $ECHO_N "(cached) $ECHO_C" >&6
8543 ac_check_lib_save_LIBS=$LIBS
8545 cat >conftest.$ac_ext <<_ACEOF
8546 #line 8546 "configure"
8547 #include "confdefs.h"
8549 /* Override any gcc2 internal prototype to avoid an error. */
8553 /* We use char because int might match the return type of a gcc2
8554 builtin and then its argument prototype would still apply. */
8564 rm -f conftest.$ac_objext conftest$ac_exeext
8565 if { (eval echo "$as_me:8565: \"$ac_link\"") >&5
8566 (eval $ac_link) 2>&5
8568 echo "$as_me:8568: \$? = $ac_status" >&5
8569 (exit $ac_status); } &&
8570 { ac_try='test -s conftest$ac_exeext'
8571 { (eval echo "$as_me:8571: \"$ac_try\"") >&5
8574 echo "$as_me:8574: \$? = $ac_status" >&5
8575 (exit $ac_status); }; }; then
8576 ac_cv_lib_gpm_Gpm_Open=yes
8578 echo "$as_me: failed program was:" >&5
8579 cat conftest.$ac_ext >&5
8580 ac_cv_lib_gpm_Gpm_Open=no
8582 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8583 LIBS=$ac_check_lib_save_LIBS
8585 echo "$as_me:8585: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8586 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8587 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8588 echo "$as_me:8588: checking for initscr in -lgpm" >&5
8589 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8590 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8591 echo $ECHO_N "(cached) $ECHO_C" >&6
8593 ac_check_lib_save_LIBS=$LIBS
8595 cat >conftest.$ac_ext <<_ACEOF
8596 #line 8596 "configure"
8597 #include "confdefs.h"
8599 /* Override any gcc2 internal prototype to avoid an error. */
8603 /* We use char because int might match the return type of a gcc2
8604 builtin and then its argument prototype would still apply. */
8614 rm -f conftest.$ac_objext conftest$ac_exeext
8615 if { (eval echo "$as_me:8615: \"$ac_link\"") >&5
8616 (eval $ac_link) 2>&5
8618 echo "$as_me:8618: \$? = $ac_status" >&5
8619 (exit $ac_status); } &&
8620 { ac_try='test -s conftest$ac_exeext'
8621 { (eval echo "$as_me:8621: \"$ac_try\"") >&5
8624 echo "$as_me:8624: \$? = $ac_status" >&5
8625 (exit $ac_status); }; }; then
8626 ac_cv_lib_gpm_initscr=yes
8628 echo "$as_me: failed program was:" >&5
8629 cat conftest.$ac_ext >&5
8630 ac_cv_lib_gpm_initscr=no
8632 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8633 LIBS=$ac_check_lib_save_LIBS
8635 echo "$as_me:8635: result: $ac_cv_lib_gpm_initscr" >&5
8636 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8637 if test $ac_cv_lib_gpm_initscr = yes; then
8638 LIBS="$cf_ncurses_SAVE"
8640 cf_ncurses_LIBS="-lgpm"
8647 # This is only necessary if you are linking against an obsolete
8648 # version of ncurses (but it should do no harm, since it's static).
8649 if test "$cf_nculib_root" = ncurses ; then
8650 echo "$as_me:8650: checking for tgoto in -lmytinfo" >&5
8651 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8652 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8653 echo $ECHO_N "(cached) $ECHO_C" >&6
8655 ac_check_lib_save_LIBS=$LIBS
8656 LIBS="-lmytinfo $LIBS"
8657 cat >conftest.$ac_ext <<_ACEOF
8658 #line 8658 "configure"
8659 #include "confdefs.h"
8661 /* Override any gcc2 internal prototype to avoid an error. */
8665 /* We use char because int might match the return type of a gcc2
8666 builtin and then its argument prototype would still apply. */
8676 rm -f conftest.$ac_objext conftest$ac_exeext
8677 if { (eval echo "$as_me:8677: \"$ac_link\"") >&5
8678 (eval $ac_link) 2>&5
8680 echo "$as_me:8680: \$? = $ac_status" >&5
8681 (exit $ac_status); } &&
8682 { ac_try='test -s conftest$ac_exeext'
8683 { (eval echo "$as_me:8683: \"$ac_try\"") >&5
8686 echo "$as_me:8686: \$? = $ac_status" >&5
8687 (exit $ac_status); }; }; then
8688 ac_cv_lib_mytinfo_tgoto=yes
8690 echo "$as_me: failed program was:" >&5
8691 cat conftest.$ac_ext >&5
8692 ac_cv_lib_mytinfo_tgoto=no
8694 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8695 LIBS=$ac_check_lib_save_LIBS
8697 echo "$as_me:8697: result: $ac_cv_lib_mytinfo_tgoto" >&5
8698 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8699 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8700 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8707 cf_add_libs="$cf_ncurses_LIBS"
8708 # Filter out duplicates - this happens with badly-designed ".pc" files...
8709 for cf_add_1lib in $LIBS
8711 for cf_add_2lib in $cf_add_libs
8713 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8719 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8723 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8726 cf_add_libs="-l$cf_nculib_root"
8727 # Filter out duplicates - this happens with badly-designed ".pc" files...
8728 for cf_add_1lib in $LIBS
8730 for cf_add_2lib in $cf_add_libs
8732 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8738 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8744 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
8746 echo "$as_me:8746: checking for initscr" >&5
8747 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8748 if test "${ac_cv_func_initscr+set}" = set; then
8749 echo $ECHO_N "(cached) $ECHO_C" >&6
8751 cat >conftest.$ac_ext <<_ACEOF
8752 #line 8752 "configure"
8753 #include "confdefs.h"
8754 /* System header to define __stub macros and hopefully few prototypes,
8755 which can conflict with char initscr (); below. */
8757 /* Override any gcc2 internal prototype to avoid an error. */
8761 /* We use char because int might match the return type of a gcc2
8762 builtin and then its argument prototype would still apply. */
8769 /* The GNU C library defines this for functions which it implements
8770 to always fail with ENOSYS. Some functions are actually named
8771 something starting with __ and the normal name is an alias. */
8772 #if defined (__stub_initscr) || defined (__stub___initscr)
8775 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8782 rm -f conftest.$ac_objext conftest$ac_exeext
8783 if { (eval echo "$as_me:8783: \"$ac_link\"") >&5
8784 (eval $ac_link) 2>&5
8786 echo "$as_me:8786: \$? = $ac_status" >&5
8787 (exit $ac_status); } &&
8788 { ac_try='test -s conftest$ac_exeext'
8789 { (eval echo "$as_me:8789: \"$ac_try\"") >&5
8792 echo "$as_me:8792: \$? = $ac_status" >&5
8793 (exit $ac_status); }; }; then
8794 ac_cv_func_initscr=yes
8796 echo "$as_me: failed program was:" >&5
8797 cat conftest.$ac_ext >&5
8798 ac_cv_func_initscr=no
8800 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8802 echo "$as_me:8802: result: $ac_cv_func_initscr" >&5
8803 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8804 if test $ac_cv_func_initscr = yes; then
8805 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8808 cf_save_LIBS="$LIBS"
8809 echo "$as_me:8809: checking for initscr in -l$cf_nculib_root" >&5
8810 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8811 LIBS="-l$cf_nculib_root $LIBS"
8812 cat >conftest.$ac_ext <<_ACEOF
8813 #line 8813 "configure"
8814 #include "confdefs.h"
8815 #include <${cf_cv_ncurses_header:-curses.h}>
8824 rm -f conftest.$ac_objext conftest$ac_exeext
8825 if { (eval echo "$as_me:8825: \"$ac_link\"") >&5
8826 (eval $ac_link) 2>&5
8828 echo "$as_me:8828: \$? = $ac_status" >&5
8829 (exit $ac_status); } &&
8830 { ac_try='test -s conftest$ac_exeext'
8831 { (eval echo "$as_me:8831: \"$ac_try\"") >&5
8834 echo "$as_me:8834: \$? = $ac_status" >&5
8835 (exit $ac_status); }; }; then
8836 echo "$as_me:8836: result: yes" >&5
8837 echo "${ECHO_T}yes" >&6
8838 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8841 echo "$as_me: failed program was:" >&5
8842 cat conftest.$ac_ext >&5
8843 echo "$as_me:8843: result: no" >&5
8844 echo "${ECHO_T}no" >&6
8847 cf_library_path_list=""
8848 if test -n "${LDFLAGS}${LIBS}" ; then
8849 for cf_library_path in $LDFLAGS $LIBS
8851 case $cf_library_path in
8853 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8855 test "x$cf_library_path" != "xNONE" && \
8856 test -d "$cf_library_path" && \
8858 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8859 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
8860 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
8861 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
8862 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
8863 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"
8866 cf_library_path_list="$cf_library_path_list $cf_search"
8874 test "x$prefix" != "xNONE" && \
8875 test -d "$prefix" && \
8877 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8878 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
8879 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
8880 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
8881 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
8882 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
8885 for cf_subdir_prefix in \
8894 test "x$cf_subdir_prefix" != "x$prefix" && \
8895 test -d "$cf_subdir_prefix" && \
8896 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8897 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
8898 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
8899 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
8900 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
8901 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
8902 test -d $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
8907 cf_search="$cf_library_path_list $cf_search"
8909 for cf_libdir in $cf_search
8911 echo "$as_me:8911: checking for -l$cf_nculib_root in $cf_libdir" >&5
8912 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
8913 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
8914 cat >conftest.$ac_ext <<_ACEOF
8915 #line 8915 "configure"
8916 #include "confdefs.h"
8917 #include <${cf_cv_ncurses_header:-curses.h}>
8926 rm -f conftest.$ac_objext conftest$ac_exeext
8927 if { (eval echo "$as_me:8927: \"$ac_link\"") >&5
8928 (eval $ac_link) 2>&5
8930 echo "$as_me:8930: \$? = $ac_status" >&5
8931 (exit $ac_status); } &&
8932 { ac_try='test -s conftest$ac_exeext'
8933 { (eval echo "$as_me:8933: \"$ac_try\"") >&5
8936 echo "$as_me:8936: \$? = $ac_status" >&5
8937 (exit $ac_status); }; }; then
8938 echo "$as_me:8938: result: yes" >&5
8939 echo "${ECHO_T}yes" >&6
8940 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8943 echo "$as_me: failed program was:" >&5
8944 cat conftest.$ac_ext >&5
8945 echo "$as_me:8945: result: no" >&5
8946 echo "${ECHO_T}no" >&6
8947 LIBS="$cf_save_LIBS"
8949 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8953 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8957 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
8959 if test $cf_found_library = no ; then
8960 { { echo "$as_me:8960: error: Cannot link $cf_nculib_root library" >&5
8961 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
8962 { (exit 1); exit 1; }; }
8967 if test -n "$cf_ncurses_LIBS" ; then
8968 echo "$as_me:8968: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
8969 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
8970 cf_ncurses_SAVE="$LIBS"
8971 for p in $cf_ncurses_LIBS ; do
8972 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
8973 if test "$q" != "$LIBS" ; then
8977 cat >conftest.$ac_ext <<_ACEOF
8978 #line 8978 "configure"
8979 #include "confdefs.h"
8980 #include <${cf_cv_ncurses_header:-curses.h}>
8984 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8989 rm -f conftest.$ac_objext conftest$ac_exeext
8990 if { (eval echo "$as_me:8990: \"$ac_link\"") >&5
8991 (eval $ac_link) 2>&5
8993 echo "$as_me:8993: \$? = $ac_status" >&5
8994 (exit $ac_status); } &&
8995 { ac_try='test -s conftest$ac_exeext'
8996 { (eval echo "$as_me:8996: \"$ac_try\"") >&5
8999 echo "$as_me:8999: \$? = $ac_status" >&5
9000 (exit $ac_status); }; }; then
9001 echo "$as_me:9001: result: yes" >&5
9002 echo "${ECHO_T}yes" >&6
9004 echo "$as_me: failed program was:" >&5
9005 cat conftest.$ac_ext >&5
9006 echo "$as_me:9006: result: no" >&5
9007 echo "${ECHO_T}no" >&6
9008 LIBS="$cf_ncurses_SAVE"
9010 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9013 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9015 cat >>confdefs.h <<EOF
9016 #define $cf_nculib_ROOT 1
9027 cf_ncuconfig_root=$cf_cv_screen
9028 cf_have_ncuconfig=no
9030 if test "x${PKG_CONFIG:=none}" != xnone; then
9031 echo "$as_me:9031: checking pkg-config for $cf_ncuconfig_root" >&5
9032 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9033 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9034 echo "$as_me:9034: result: yes" >&5
9035 echo "${ECHO_T}yes" >&6
9037 echo "$as_me:9037: checking if the $cf_ncuconfig_root package files work" >&5
9038 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9039 cf_have_ncuconfig=unknown
9041 cf_save_CPPFLAGS="$CPPFLAGS"
9042 cf_save_LIBS="$LIBS"
9047 cf_new_extra_cppflags=
9049 for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
9051 case $cf_fix_cppflags in
9053 case $cf_add_cflags in
9054 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9055 case $cf_add_cflags in
9057 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9059 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9060 && test -z "${cf_tst_cflags}" \
9061 && cf_fix_cppflags=yes
9063 if test $cf_fix_cppflags = yes ; then
9065 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9066 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9069 elif test "${cf_tst_cflags}" = "\"'" ; then
9071 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9072 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9082 case $cf_add_cflags in
9084 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9086 CPPFLAGS=`echo "$CPPFLAGS" | \
9087 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9088 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9093 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9094 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9101 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9102 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9109 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9110 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9112 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9114 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9115 && test -z "${cf_tst_cflags}" \
9116 && cf_fix_cppflags=no
9121 if test -n "$cf_new_cflags" ; then
9123 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9124 CFLAGS="${CFLAGS}$cf_new_cflags"
9128 if test -n "$cf_new_cppflags" ; then
9130 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9131 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9135 if test -n "$cf_new_extra_cppflags" ; then
9137 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9138 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9142 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9143 # Filter out duplicates - this happens with badly-designed ".pc" files...
9144 for cf_add_1lib in $LIBS
9146 for cf_add_2lib in $cf_add_libs
9148 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9154 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9158 cat >conftest.$ac_ext <<_ACEOF
9159 #line 9159 "configure"
9160 #include "confdefs.h"
9161 #include <${cf_cv_ncurses_header:-curses.h}>
9165 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9170 rm -f conftest.$ac_objext conftest$ac_exeext
9171 if { (eval echo "$as_me:9171: \"$ac_link\"") >&5
9172 (eval $ac_link) 2>&5
9174 echo "$as_me:9174: \$? = $ac_status" >&5
9175 (exit $ac_status); } &&
9176 { ac_try='test -s conftest$ac_exeext'
9177 { (eval echo "$as_me:9177: \"$ac_try\"") >&5
9180 echo "$as_me:9180: \$? = $ac_status" >&5
9181 (exit $ac_status); }; }; then
9182 if test "$cross_compiling" = yes; then
9183 cf_have_ncuconfig=maybe
9185 cat >conftest.$ac_ext <<_ACEOF
9186 #line 9186 "configure"
9187 #include "confdefs.h"
9188 #include <${cf_cv_ncurses_header:-curses.h}>
9190 { char *xx = curses_version(); return (xx == 0); }
9192 rm -f conftest$ac_exeext
9193 if { (eval echo "$as_me:9193: \"$ac_link\"") >&5
9194 (eval $ac_link) 2>&5
9196 echo "$as_me:9196: \$? = $ac_status" >&5
9197 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9198 { (eval echo "$as_me:9198: \"$ac_try\"") >&5
9201 echo "$as_me:9201: \$? = $ac_status" >&5
9202 (exit $ac_status); }; }; then
9203 cf_have_ncuconfig=yes
9205 echo "$as_me: program exited with status $ac_status" >&5
9206 echo "$as_me: failed program was:" >&5
9207 cat conftest.$ac_ext >&5
9208 cf_have_ncuconfig=no
9210 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9213 echo "$as_me: failed program was:" >&5
9214 cat conftest.$ac_ext >&5
9215 cf_have_ncuconfig=no
9217 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9218 echo "$as_me:9218: result: $cf_have_ncuconfig" >&5
9219 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9220 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9221 if test "$cf_have_ncuconfig" != "yes"
9223 CPPFLAGS="$cf_save_CPPFLAGS"
9224 LIBS="$cf_save_LIBS"
9225 NCURSES_CONFIG_PKG=none
9228 cat >>confdefs.h <<\EOF
9232 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9234 echo "$as_me:9234: checking for terminfo header" >&5
9235 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9236 if test "${cf_cv_term_header+set}" = set; then
9237 echo $ECHO_N "(cached) $ECHO_C" >&6
9240 case ${cf_cv_ncurses_header} in
9241 (*/ncurses.h|*/ncursesw.h)
9242 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9245 cf_term_header=term.h
9249 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9251 cat >conftest.$ac_ext <<_ACEOF
9252 #line 9252 "configure"
9253 #include "confdefs.h"
9255 #include <${cf_cv_ncurses_header:-curses.h}>
9261 int x = auto_left_margin
9266 rm -f conftest.$ac_objext
9267 if { (eval echo "$as_me:9267: \"$ac_compile\"") >&5
9268 (eval $ac_compile) 2>&5
9270 echo "$as_me:9270: \$? = $ac_status" >&5
9271 (exit $ac_status); } &&
9272 { ac_try='test -s conftest.$ac_objext'
9273 { (eval echo "$as_me:9273: \"$ac_try\"") >&5
9276 echo "$as_me:9276: \$? = $ac_status" >&5
9277 (exit $ac_status); }; }; then
9279 cf_cv_term_header="$cf_test"
9281 echo "$as_me: failed program was:" >&5
9282 cat conftest.$ac_ext >&5
9284 cf_cv_term_header=unknown
9287 rm -f conftest.$ac_objext conftest.$ac_ext
9288 test "$cf_cv_term_header" != unknown && break
9292 echo "$as_me:9292: result: $cf_cv_term_header" >&5
9293 echo "${ECHO_T}$cf_cv_term_header" >&6
9295 # Set definitions to allow ifdef'ing to accommodate subdirectories
9297 case $cf_cv_term_header in
9300 cat >>confdefs.h <<\EOF
9301 #define HAVE_TERM_H 1
9307 case $cf_cv_term_header in
9310 cat >>confdefs.h <<\EOF
9311 #define HAVE_NCURSES_TERM_H 1
9317 cat >>confdefs.h <<\EOF
9318 #define HAVE_NCURSESW_TERM_H 1
9327 echo "$as_me:9327: result: no" >&5
9328 echo "${ECHO_T}no" >&6
9329 NCURSES_CONFIG_PKG=none
9332 NCURSES_CONFIG_PKG=none
9335 if test "x$cf_have_ncuconfig" = "xno"; then
9336 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9338 if test -n "$ac_tool_prefix"; then
9339 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9341 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9342 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9343 echo "$as_me:9343: checking for $ac_word" >&5
9344 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9345 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9346 echo $ECHO_N "(cached) $ECHO_C" >&6
9348 if test -n "$NCURSES_CONFIG"; then
9349 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9351 ac_save_IFS=$IFS; IFS=$ac_path_separator
9353 for ac_dir in $ac_dummy; do
9355 test -z "$ac_dir" && ac_dir=.
9356 $as_executable_p "$ac_dir/$ac_word" || continue
9357 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9358 echo "$as_me:9358: found $ac_dir/$ac_word" >&5
9364 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9365 if test -n "$NCURSES_CONFIG"; then
9366 echo "$as_me:9366: result: $NCURSES_CONFIG" >&5
9367 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9369 echo "$as_me:9369: result: no" >&5
9370 echo "${ECHO_T}no" >&6
9373 test -n "$NCURSES_CONFIG" && break
9376 if test -z "$NCURSES_CONFIG"; then
9377 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9378 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9380 # Extract the first word of "$ac_prog", so it can be a program name with args.
9381 set dummy $ac_prog; ac_word=$2
9382 echo "$as_me:9382: checking for $ac_word" >&5
9383 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9384 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9385 echo $ECHO_N "(cached) $ECHO_C" >&6
9387 if test -n "$ac_ct_NCURSES_CONFIG"; then
9388 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9390 ac_save_IFS=$IFS; IFS=$ac_path_separator
9392 for ac_dir in $ac_dummy; do
9394 test -z "$ac_dir" && ac_dir=.
9395 $as_executable_p "$ac_dir/$ac_word" || continue
9396 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9397 echo "$as_me:9397: found $ac_dir/$ac_word" >&5
9403 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9404 if test -n "$ac_ct_NCURSES_CONFIG"; then
9405 echo "$as_me:9405: result: $ac_ct_NCURSES_CONFIG" >&5
9406 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9408 echo "$as_me:9408: result: no" >&5
9409 echo "${ECHO_T}no" >&6
9412 test -n "$ac_ct_NCURSES_CONFIG" && break
9414 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9416 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9419 if test "$NCURSES_CONFIG" != none ; then
9424 cf_new_extra_cppflags=
9426 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9428 case $cf_fix_cppflags in
9430 case $cf_add_cflags in
9431 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9432 case $cf_add_cflags in
9434 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9436 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9437 && test -z "${cf_tst_cflags}" \
9438 && cf_fix_cppflags=yes
9440 if test $cf_fix_cppflags = yes ; then
9442 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9443 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9446 elif test "${cf_tst_cflags}" = "\"'" ; then
9448 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9449 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9459 case $cf_add_cflags in
9461 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9463 CPPFLAGS=`echo "$CPPFLAGS" | \
9464 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9465 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9470 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9471 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9478 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9479 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9486 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9487 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9489 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9491 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9492 && test -z "${cf_tst_cflags}" \
9493 && cf_fix_cppflags=no
9498 if test -n "$cf_new_cflags" ; then
9500 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9501 CFLAGS="${CFLAGS}$cf_new_cflags"
9505 if test -n "$cf_new_cppflags" ; then
9507 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9508 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9512 if test -n "$cf_new_extra_cppflags" ; then
9514 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9515 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9519 cf_add_libs="`$NCURSES_CONFIG --libs`"
9520 # Filter out duplicates - this happens with badly-designed ".pc" files...
9521 for cf_add_1lib in $LIBS
9523 for cf_add_2lib in $cf_add_libs
9525 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9531 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9535 # even with config script, some packages use no-override for curses.h
9537 echo "$as_me:9537: checking if we have identified curses headers" >&5
9538 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
9539 if test "${cf_cv_ncurses_header+set}" = set; then
9540 echo $ECHO_N "(cached) $ECHO_C" >&6
9543 cf_cv_ncurses_header=none
9545 ncurses.h $cf_cv_screen/ncurses.h \
9546 curses.h $cf_cv_screen/curses.h
9548 cat >conftest.$ac_ext <<_ACEOF
9549 #line 9549 "configure"
9550 #include "confdefs.h"
9551 #include <${cf_header}>
9555 initscr(); tgoto("?", 0,0)
9560 rm -f conftest.$ac_objext
9561 if { (eval echo "$as_me:9561: \"$ac_compile\"") >&5
9562 (eval $ac_compile) 2>&5
9564 echo "$as_me:9564: \$? = $ac_status" >&5
9565 (exit $ac_status); } &&
9566 { ac_try='test -s conftest.$ac_objext'
9567 { (eval echo "$as_me:9567: \"$ac_try\"") >&5
9570 echo "$as_me:9570: \$? = $ac_status" >&5
9571 (exit $ac_status); }; }; then
9572 cf_cv_ncurses_header=$cf_header; break
9574 echo "$as_me: failed program was:" >&5
9575 cat conftest.$ac_ext >&5
9577 rm -f conftest.$ac_objext conftest.$ac_ext
9581 echo "$as_me:9581: result: $cf_cv_ncurses_header" >&5
9582 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
9584 if test "$cf_cv_ncurses_header" = none ; then
9585 { { echo "$as_me:9585: error: No curses header-files found" >&5
9586 echo "$as_me: error: No curses header-files found" >&2;}
9587 { (exit 1); exit 1; }; }
9590 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
9592 for ac_header in $cf_cv_ncurses_header
9594 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9595 echo "$as_me:9595: checking for $ac_header" >&5
9596 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9597 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9598 echo $ECHO_N "(cached) $ECHO_C" >&6
9600 cat >conftest.$ac_ext <<_ACEOF
9601 #line 9601 "configure"
9602 #include "confdefs.h"
9603 #include <$ac_header>
9605 if { (eval echo "$as_me:9605: \"$ac_cpp conftest.$ac_ext\"") >&5
9606 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9608 egrep -v '^ *\+' conftest.er1 >conftest.err
9610 cat conftest.err >&5
9611 echo "$as_me:9611: \$? = $ac_status" >&5
9612 (exit $ac_status); } >/dev/null; then
9613 if test -s conftest.err; then
9614 ac_cpp_err=$ac_c_preproc_warn_flag
9621 if test -z "$ac_cpp_err"; then
9622 eval "$as_ac_Header=yes"
9624 echo "$as_me: failed program was:" >&5
9625 cat conftest.$ac_ext >&5
9626 eval "$as_ac_Header=no"
9628 rm -f conftest.err conftest.$ac_ext
9630 echo "$as_me:9630: result: `eval echo '${'$as_ac_Header'}'`" >&5
9631 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9632 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9633 cat >>confdefs.h <<EOF
9634 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9640 cat >>confdefs.h <<\EOF
9644 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9646 cat >>confdefs.h <<EOF
9647 #define $cf_nculib_ROOT 1
9650 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
9654 cf_ncuhdr_root=$cf_cv_screen
9656 test -n "$cf_cv_curses_dir" && \
9657 test "$cf_cv_curses_dir" != "no" && { \
9659 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
9660 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
9662 while test $cf_add_incdir != /usr/include
9664 if test -d $cf_add_incdir
9667 if test -n "$CFLAGS$CPPFLAGS" ; then
9668 # a loop is needed to ensure we can add subdirs of existing dirs
9669 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9670 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9671 cf_have_incdir=yes; break
9676 if test "$cf_have_incdir" = no ; then
9677 if test "$cf_add_incdir" = /usr/local/include ; then
9678 if test "$GCC" = yes
9680 cf_save_CPPFLAGS=$CPPFLAGS
9682 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9683 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9685 cat >conftest.$ac_ext <<_ACEOF
9686 #line 9686 "configure"
9687 #include "confdefs.h"
9697 rm -f conftest.$ac_objext
9698 if { (eval echo "$as_me:9698: \"$ac_compile\"") >&5
9699 (eval $ac_compile) 2>&5
9701 echo "$as_me:9701: \$? = $ac_status" >&5
9702 (exit $ac_status); } &&
9703 { ac_try='test -s conftest.$ac_objext'
9704 { (eval echo "$as_me:9704: \"$ac_try\"") >&5
9707 echo "$as_me:9707: \$? = $ac_status" >&5
9708 (exit $ac_status); }; }; then
9711 echo "$as_me: failed program was:" >&5
9712 cat conftest.$ac_ext >&5
9715 rm -f conftest.$ac_objext conftest.$ac_ext
9716 CPPFLAGS=$cf_save_CPPFLAGS
9721 if test "$cf_have_incdir" = no ; then
9722 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9724 echo "${as_me:-configure}:9724: testing adding $cf_add_incdir to include-path ..." 1>&5
9726 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9728 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9729 test "$cf_top_incdir" = "$cf_add_incdir" && break
9730 cf_add_incdir="$cf_top_incdir"
9743 echo "$as_me:9743: checking for $cf_ncuhdr_root header in include-path" >&5
9744 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
9745 if test "${cf_cv_ncurses_h+set}" = set; then
9746 echo $ECHO_N "(cached) $ECHO_C" >&6
9749 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
9750 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
9751 for cf_header in $cf_header_list
9754 cat >conftest.$ac_ext <<_ACEOF
9755 #line 9755 "configure"
9756 #include "confdefs.h"
9758 #include <$cf_header>
9763 #ifdef NCURSES_VERSION
9765 printf("%s\n", NCURSES_VERSION);
9778 rm -f conftest.$ac_objext
9779 if { (eval echo "$as_me:9779: \"$ac_compile\"") >&5
9780 (eval $ac_compile) 2>&5
9782 echo "$as_me:9782: \$? = $ac_status" >&5
9783 (exit $ac_status); } &&
9784 { ac_try='test -s conftest.$ac_objext'
9785 { (eval echo "$as_me:9785: \"$ac_try\"") >&5
9788 echo "$as_me:9788: \$? = $ac_status" >&5
9789 (exit $ac_status); }; }; then
9790 cf_cv_ncurses_h=$cf_header
9793 echo "$as_me: failed program was:" >&5
9794 cat conftest.$ac_ext >&5
9797 rm -f conftest.$ac_objext conftest.$ac_ext
9799 test "$cf_cv_ncurses_h" != no && break
9803 echo "$as_me:9803: result: $cf_cv_ncurses_h" >&5
9804 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
9806 if test "$cf_cv_ncurses_h" != no ; then
9807 cf_cv_ncurses_header=$cf_cv_ncurses_h
9810 echo "$as_me:9810: checking for $cf_ncuhdr_root include-path" >&5
9811 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
9812 if test "${cf_cv_ncurses_h2+set}" = set; then
9813 echo $ECHO_N "(cached) $ECHO_C" >&6
9816 test -n "$verbose" && echo
9820 # collect the current set of include-directories from compiler flags
9821 cf_header_path_list=""
9822 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9823 for cf_header_path in $CPPFLAGS $CFLAGS
9825 case $cf_header_path in
9827 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9829 test "x$cf_header_path" != "xNONE" && \
9830 test -d "$cf_header_path" && \
9832 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
9833 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
9834 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
9835 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
9836 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
9837 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"
9840 cf_header_path_list="$cf_header_path_list $cf_search"
9846 # add the variations for the package we are looking for
9850 test "x$prefix" != "xNONE" && \
9851 test -d "$prefix" && \
9853 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
9854 test -d $prefix/include && cf_search="$cf_search $prefix/include"
9855 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
9856 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
9857 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
9858 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9861 for cf_subdir_prefix in \
9870 test "x$cf_subdir_prefix" != "x$prefix" && \
9871 test -d "$cf_subdir_prefix" && \
9872 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9873 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
9874 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
9875 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
9876 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
9877 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
9878 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9883 test "$includedir" != NONE && \
9884 test "$includedir" != "/usr/include" && \
9885 test -d "$includedir" && {
9886 test -d $includedir && cf_search="$cf_search $includedir"
9887 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
9890 test "$oldincludedir" != NONE && \
9891 test "$oldincludedir" != "/usr/include" && \
9892 test -d "$oldincludedir" && {
9893 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
9894 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
9897 cf_search="$cf_search $cf_header_path_list"
9899 test -n "$verbose" && echo search path $cf_search
9900 cf_save2_CPPFLAGS="$CPPFLAGS"
9901 for cf_incdir in $cf_search
9904 if test -n "$cf_incdir" ; then
9905 for cf_add_incdir in $cf_incdir
9907 while test $cf_add_incdir != /usr/include
9909 if test -d $cf_add_incdir
9912 if test -n "$CFLAGS$CPPFLAGS" ; then
9913 # a loop is needed to ensure we can add subdirs of existing dirs
9914 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9915 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9916 cf_have_incdir=yes; break
9921 if test "$cf_have_incdir" = no ; then
9922 if test "$cf_add_incdir" = /usr/local/include ; then
9923 if test "$GCC" = yes
9925 cf_save_CPPFLAGS=$CPPFLAGS
9927 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9928 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9930 cat >conftest.$ac_ext <<_ACEOF
9931 #line 9931 "configure"
9932 #include "confdefs.h"
9942 rm -f conftest.$ac_objext
9943 if { (eval echo "$as_me:9943: \"$ac_compile\"") >&5
9944 (eval $ac_compile) 2>&5
9946 echo "$as_me:9946: \$? = $ac_status" >&5
9947 (exit $ac_status); } &&
9948 { ac_try='test -s conftest.$ac_objext'
9949 { (eval echo "$as_me:9949: \"$ac_try\"") >&5
9952 echo "$as_me:9952: \$? = $ac_status" >&5
9953 (exit $ac_status); }; }; then
9956 echo "$as_me: failed program was:" >&5
9957 cat conftest.$ac_ext >&5
9960 rm -f conftest.$ac_objext conftest.$ac_ext
9961 CPPFLAGS=$cf_save_CPPFLAGS
9966 if test "$cf_have_incdir" = no ; then
9967 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9969 echo "${as_me:-configure}:9969: testing adding $cf_add_incdir to include-path ..." 1>&5
9971 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9973 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9974 test "$cf_top_incdir" = "$cf_add_incdir" && break
9975 cf_add_incdir="$cf_top_incdir"
9991 cat >conftest.$ac_ext <<_ACEOF
9992 #line 9992 "configure"
9993 #include "confdefs.h"
9995 #include <$cf_header>
10000 #ifdef NCURSES_VERSION
10002 printf("%s\n", NCURSES_VERSION);
10015 rm -f conftest.$ac_objext
10016 if { (eval echo "$as_me:10016: \"$ac_compile\"") >&5
10017 (eval $ac_compile) 2>&5
10019 echo "$as_me:10019: \$? = $ac_status" >&5
10020 (exit $ac_status); } &&
10021 { ac_try='test -s conftest.$ac_objext'
10022 { (eval echo "$as_me:10022: \"$ac_try\"") >&5
10023 (eval $ac_try) 2>&5
10025 echo "$as_me:10025: \$? = $ac_status" >&5
10026 (exit $ac_status); }; }; then
10027 cf_cv_ncurses_h2=$cf_header
10030 echo "$as_me: failed program was:" >&5
10031 cat conftest.$ac_ext >&5
10032 cf_cv_ncurses_h2=no
10034 rm -f conftest.$ac_objext conftest.$ac_ext
10036 if test "$cf_cv_ncurses_h2" != no ; then
10037 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10038 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
10041 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10043 CPPFLAGS="$cf_save2_CPPFLAGS"
10044 test "$cf_cv_ncurses_h2" != no && break
10046 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10046: error: not found" >&5
10047 echo "$as_me: error: not found" >&2;}
10048 { (exit 1); exit 1; }; }
10051 echo "$as_me:10051: result: $cf_cv_ncurses_h2" >&5
10052 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10054 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
10055 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
10056 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
10057 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
10060 if test -n "$cf_1st_incdir" ; then
10061 for cf_add_incdir in $cf_1st_incdir
10063 while test $cf_add_incdir != /usr/include
10065 if test -d $cf_add_incdir
10068 if test -n "$CFLAGS$CPPFLAGS" ; then
10069 # a loop is needed to ensure we can add subdirs of existing dirs
10070 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10071 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10072 cf_have_incdir=yes; break
10077 if test "$cf_have_incdir" = no ; then
10078 if test "$cf_add_incdir" = /usr/local/include ; then
10079 if test "$GCC" = yes
10081 cf_save_CPPFLAGS=$CPPFLAGS
10083 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10084 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10086 cat >conftest.$ac_ext <<_ACEOF
10087 #line 10087 "configure"
10088 #include "confdefs.h"
10098 rm -f conftest.$ac_objext
10099 if { (eval echo "$as_me:10099: \"$ac_compile\"") >&5
10100 (eval $ac_compile) 2>&5
10102 echo "$as_me:10102: \$? = $ac_status" >&5
10103 (exit $ac_status); } &&
10104 { ac_try='test -s conftest.$ac_objext'
10105 { (eval echo "$as_me:10105: \"$ac_try\"") >&5
10106 (eval $ac_try) 2>&5
10108 echo "$as_me:10108: \$? = $ac_status" >&5
10109 (exit $ac_status); }; }; then
10112 echo "$as_me: failed program was:" >&5
10113 cat conftest.$ac_ext >&5
10116 rm -f conftest.$ac_objext conftest.$ac_ext
10117 CPPFLAGS=$cf_save_CPPFLAGS
10122 if test "$cf_have_incdir" = no ; then
10123 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10125 echo "${as_me:-configure}:10125: testing adding $cf_add_incdir to include-path ..." 1>&5
10127 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10129 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10130 test "$cf_top_incdir" = "$cf_add_incdir" && break
10131 cf_add_incdir="$cf_top_incdir"
10144 # Set definitions to allow ifdef'ing for ncurses.h
10146 case $cf_cv_ncurses_header in
10149 cat >>confdefs.h <<\EOF
10150 #define HAVE_NCURSES_H 1
10156 case $cf_cv_ncurses_header in
10157 (ncurses/curses.h|ncurses/ncurses.h)
10159 cat >>confdefs.h <<\EOF
10160 #define HAVE_NCURSES_NCURSES_H 1
10164 (ncursesw/curses.h|ncursesw/ncurses.h)
10166 cat >>confdefs.h <<\EOF
10167 #define HAVE_NCURSESW_NCURSES_H 1
10173 echo "$as_me:10173: checking for terminfo header" >&5
10174 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10175 if test "${cf_cv_term_header+set}" = set; then
10176 echo $ECHO_N "(cached) $ECHO_C" >&6
10179 case ${cf_cv_ncurses_header} in
10180 (*/ncurses.h|*/ncursesw.h)
10181 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10184 cf_term_header=term.h
10188 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10190 cat >conftest.$ac_ext <<_ACEOF
10191 #line 10191 "configure"
10192 #include "confdefs.h"
10194 #include <${cf_cv_ncurses_header:-curses.h}>
10195 #include <$cf_test>
10200 int x = auto_left_margin
10205 rm -f conftest.$ac_objext
10206 if { (eval echo "$as_me:10206: \"$ac_compile\"") >&5
10207 (eval $ac_compile) 2>&5
10209 echo "$as_me:10209: \$? = $ac_status" >&5
10210 (exit $ac_status); } &&
10211 { ac_try='test -s conftest.$ac_objext'
10212 { (eval echo "$as_me:10212: \"$ac_try\"") >&5
10213 (eval $ac_try) 2>&5
10215 echo "$as_me:10215: \$? = $ac_status" >&5
10216 (exit $ac_status); }; }; then
10218 cf_cv_term_header="$cf_test"
10220 echo "$as_me: failed program was:" >&5
10221 cat conftest.$ac_ext >&5
10223 cf_cv_term_header=unknown
10226 rm -f conftest.$ac_objext conftest.$ac_ext
10227 test "$cf_cv_term_header" != unknown && break
10231 echo "$as_me:10231: result: $cf_cv_term_header" >&5
10232 echo "${ECHO_T}$cf_cv_term_header" >&6
10234 # Set definitions to allow ifdef'ing to accommodate subdirectories
10236 case $cf_cv_term_header in
10239 cat >>confdefs.h <<\EOF
10240 #define HAVE_TERM_H 1
10246 case $cf_cv_term_header in
10249 cat >>confdefs.h <<\EOF
10250 #define HAVE_NCURSES_TERM_H 1
10256 cat >>confdefs.h <<\EOF
10257 #define HAVE_NCURSESW_TERM_H 1
10263 # some applications need this, but should check for NCURSES_VERSION
10265 cat >>confdefs.h <<\EOF
10269 echo "$as_me:10269: checking for ncurses version" >&5
10270 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10271 if test "${cf_cv_ncurses_version+set}" = set; then
10272 echo $ECHO_N "(cached) $ECHO_C" >&6
10275 cf_cv_ncurses_version=no
10278 if test "$cross_compiling" = yes; then
10280 # This will not work if the preprocessor splits the line after the
10281 # Autoconf token. The 'unproto' program does that.
10282 cat > conftest.$ac_ext <<EOF
10283 #include <${cf_cv_ncurses_header:-curses.h}>
10285 #ifdef NCURSES_VERSION
10286 Autoconf NCURSES_VERSION
10294 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10295 { (eval echo "$as_me:10295: \"$cf_try\"") >&5
10296 (eval $cf_try) 2>&5
10298 echo "$as_me:10298: \$? = $ac_status" >&5
10299 (exit $ac_status); }
10300 if test -f conftest.out ; then
10301 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
10302 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10307 cat >conftest.$ac_ext <<_ACEOF
10308 #line 10308 "configure"
10309 #include "confdefs.h"
10311 #include <${cf_cv_ncurses_header:-curses.h}>
10315 FILE *fp = fopen("$cf_tempfile", "w");
10316 #ifdef NCURSES_VERSION
10317 # ifdef NCURSES_VERSION_PATCH
10318 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10320 fprintf(fp, "%s\n", NCURSES_VERSION);
10323 # ifdef __NCURSES_H
10324 fprintf(fp, "old\n");
10329 ${cf_cv_main_return:-return}(0);
10332 rm -f conftest$ac_exeext
10333 if { (eval echo "$as_me:10333: \"$ac_link\"") >&5
10334 (eval $ac_link) 2>&5
10336 echo "$as_me:10336: \$? = $ac_status" >&5
10337 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10338 { (eval echo "$as_me:10338: \"$ac_try\"") >&5
10339 (eval $ac_try) 2>&5
10341 echo "$as_me:10341: \$? = $ac_status" >&5
10342 (exit $ac_status); }; }; then
10344 cf_cv_ncurses_version=`cat $cf_tempfile`
10346 echo "$as_me: program exited with status $ac_status" >&5
10347 echo "$as_me: failed program was:" >&5
10348 cat conftest.$ac_ext >&5
10350 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10355 echo "$as_me:10355: result: $cf_cv_ncurses_version" >&5
10356 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10357 test "$cf_cv_ncurses_version" = no ||
10358 cat >>confdefs.h <<\EOF
10362 cf_nculib_root=$cf_cv_screen
10363 # This works, except for the special case where we find gpm, but
10364 # ncurses is in a nonstandard location via $LIBS, and we really want
10367 cf_ncurses_SAVE="$LIBS"
10368 echo "$as_me:10368: checking for Gpm_Open in -lgpm" >&5
10369 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10370 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10371 echo $ECHO_N "(cached) $ECHO_C" >&6
10373 ac_check_lib_save_LIBS=$LIBS
10375 cat >conftest.$ac_ext <<_ACEOF
10376 #line 10376 "configure"
10377 #include "confdefs.h"
10379 /* Override any gcc2 internal prototype to avoid an error. */
10383 /* We use char because int might match the return type of a gcc2
10384 builtin and then its argument prototype would still apply. */
10394 rm -f conftest.$ac_objext conftest$ac_exeext
10395 if { (eval echo "$as_me:10395: \"$ac_link\"") >&5
10396 (eval $ac_link) 2>&5
10398 echo "$as_me:10398: \$? = $ac_status" >&5
10399 (exit $ac_status); } &&
10400 { ac_try='test -s conftest$ac_exeext'
10401 { (eval echo "$as_me:10401: \"$ac_try\"") >&5
10402 (eval $ac_try) 2>&5
10404 echo "$as_me:10404: \$? = $ac_status" >&5
10405 (exit $ac_status); }; }; then
10406 ac_cv_lib_gpm_Gpm_Open=yes
10408 echo "$as_me: failed program was:" >&5
10409 cat conftest.$ac_ext >&5
10410 ac_cv_lib_gpm_Gpm_Open=no
10412 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10413 LIBS=$ac_check_lib_save_LIBS
10415 echo "$as_me:10415: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10416 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
10417 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
10418 echo "$as_me:10418: checking for initscr in -lgpm" >&5
10419 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
10420 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
10421 echo $ECHO_N "(cached) $ECHO_C" >&6
10423 ac_check_lib_save_LIBS=$LIBS
10425 cat >conftest.$ac_ext <<_ACEOF
10426 #line 10426 "configure"
10427 #include "confdefs.h"
10429 /* Override any gcc2 internal prototype to avoid an error. */
10433 /* We use char because int might match the return type of a gcc2
10434 builtin and then its argument prototype would still apply. */
10444 rm -f conftest.$ac_objext conftest$ac_exeext
10445 if { (eval echo "$as_me:10445: \"$ac_link\"") >&5
10446 (eval $ac_link) 2>&5
10448 echo "$as_me:10448: \$? = $ac_status" >&5
10449 (exit $ac_status); } &&
10450 { ac_try='test -s conftest$ac_exeext'
10451 { (eval echo "$as_me:10451: \"$ac_try\"") >&5
10452 (eval $ac_try) 2>&5
10454 echo "$as_me:10454: \$? = $ac_status" >&5
10455 (exit $ac_status); }; }; then
10456 ac_cv_lib_gpm_initscr=yes
10458 echo "$as_me: failed program was:" >&5
10459 cat conftest.$ac_ext >&5
10460 ac_cv_lib_gpm_initscr=no
10462 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10463 LIBS=$ac_check_lib_save_LIBS
10465 echo "$as_me:10465: result: $ac_cv_lib_gpm_initscr" >&5
10466 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
10467 if test $ac_cv_lib_gpm_initscr = yes; then
10468 LIBS="$cf_ncurses_SAVE"
10470 cf_ncurses_LIBS="-lgpm"
10477 # This is only necessary if you are linking against an obsolete
10478 # version of ncurses (but it should do no harm, since it's static).
10479 if test "$cf_nculib_root" = ncurses ; then
10480 echo "$as_me:10480: checking for tgoto in -lmytinfo" >&5
10481 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
10482 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
10483 echo $ECHO_N "(cached) $ECHO_C" >&6
10485 ac_check_lib_save_LIBS=$LIBS
10486 LIBS="-lmytinfo $LIBS"
10487 cat >conftest.$ac_ext <<_ACEOF
10488 #line 10488 "configure"
10489 #include "confdefs.h"
10491 /* Override any gcc2 internal prototype to avoid an error. */
10495 /* We use char because int might match the return type of a gcc2
10496 builtin and then its argument prototype would still apply. */
10506 rm -f conftest.$ac_objext conftest$ac_exeext
10507 if { (eval echo "$as_me:10507: \"$ac_link\"") >&5
10508 (eval $ac_link) 2>&5
10510 echo "$as_me:10510: \$? = $ac_status" >&5
10511 (exit $ac_status); } &&
10512 { ac_try='test -s conftest$ac_exeext'
10513 { (eval echo "$as_me:10513: \"$ac_try\"") >&5
10514 (eval $ac_try) 2>&5
10516 echo "$as_me:10516: \$? = $ac_status" >&5
10517 (exit $ac_status); }; }; then
10518 ac_cv_lib_mytinfo_tgoto=yes
10520 echo "$as_me: failed program was:" >&5
10521 cat conftest.$ac_ext >&5
10522 ac_cv_lib_mytinfo_tgoto=no
10524 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10525 LIBS=$ac_check_lib_save_LIBS
10527 echo "$as_me:10527: result: $ac_cv_lib_mytinfo_tgoto" >&5
10528 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
10529 if test $ac_cv_lib_mytinfo_tgoto = yes; then
10530 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
10537 cf_add_libs="$cf_ncurses_LIBS"
10538 # Filter out duplicates - this happens with badly-designed ".pc" files...
10539 for cf_add_1lib in $LIBS
10541 for cf_add_2lib in $cf_add_libs
10543 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10549 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10551 LIBS="$cf_add_libs"
10553 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
10556 cf_add_libs="-l$cf_nculib_root"
10557 # Filter out duplicates - this happens with badly-designed ".pc" files...
10558 for cf_add_1lib in $LIBS
10560 for cf_add_2lib in $cf_add_libs
10562 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10568 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10570 LIBS="$cf_add_libs"
10574 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
10576 echo "$as_me:10576: checking for initscr" >&5
10577 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
10578 if test "${ac_cv_func_initscr+set}" = set; then
10579 echo $ECHO_N "(cached) $ECHO_C" >&6
10581 cat >conftest.$ac_ext <<_ACEOF
10582 #line 10582 "configure"
10583 #include "confdefs.h"
10584 /* System header to define __stub macros and hopefully few prototypes,
10585 which can conflict with char initscr (); below. */
10586 #include <assert.h>
10587 /* Override any gcc2 internal prototype to avoid an error. */
10591 /* We use char because int might match the return type of a gcc2
10592 builtin and then its argument prototype would still apply. */
10599 /* The GNU C library defines this for functions which it implements
10600 to always fail with ENOSYS. Some functions are actually named
10601 something starting with __ and the normal name is an alias. */
10602 #if defined (__stub_initscr) || defined (__stub___initscr)
10605 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10612 rm -f conftest.$ac_objext conftest$ac_exeext
10613 if { (eval echo "$as_me:10613: \"$ac_link\"") >&5
10614 (eval $ac_link) 2>&5
10616 echo "$as_me:10616: \$? = $ac_status" >&5
10617 (exit $ac_status); } &&
10618 { ac_try='test -s conftest$ac_exeext'
10619 { (eval echo "$as_me:10619: \"$ac_try\"") >&5
10620 (eval $ac_try) 2>&5
10622 echo "$as_me:10622: \$? = $ac_status" >&5
10623 (exit $ac_status); }; }; then
10624 ac_cv_func_initscr=yes
10626 echo "$as_me: failed program was:" >&5
10627 cat conftest.$ac_ext >&5
10628 ac_cv_func_initscr=no
10630 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10632 echo "$as_me:10632: result: $ac_cv_func_initscr" >&5
10633 echo "${ECHO_T}$ac_cv_func_initscr" >&6
10634 if test $ac_cv_func_initscr = yes; then
10635 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10638 cf_save_LIBS="$LIBS"
10639 echo "$as_me:10639: checking for initscr in -l$cf_nculib_root" >&5
10640 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
10641 LIBS="-l$cf_nculib_root $LIBS"
10642 cat >conftest.$ac_ext <<_ACEOF
10643 #line 10643 "configure"
10644 #include "confdefs.h"
10645 #include <${cf_cv_ncurses_header:-curses.h}>
10654 rm -f conftest.$ac_objext conftest$ac_exeext
10655 if { (eval echo "$as_me:10655: \"$ac_link\"") >&5
10656 (eval $ac_link) 2>&5
10658 echo "$as_me:10658: \$? = $ac_status" >&5
10659 (exit $ac_status); } &&
10660 { ac_try='test -s conftest$ac_exeext'
10661 { (eval echo "$as_me:10661: \"$ac_try\"") >&5
10662 (eval $ac_try) 2>&5
10664 echo "$as_me:10664: \$? = $ac_status" >&5
10665 (exit $ac_status); }; }; then
10666 echo "$as_me:10666: result: yes" >&5
10667 echo "${ECHO_T}yes" >&6
10668 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10671 echo "$as_me: failed program was:" >&5
10672 cat conftest.$ac_ext >&5
10673 echo "$as_me:10673: result: no" >&5
10674 echo "${ECHO_T}no" >&6
10677 cf_library_path_list=""
10678 if test -n "${LDFLAGS}${LIBS}" ; then
10679 for cf_library_path in $LDFLAGS $LIBS
10681 case $cf_library_path in
10683 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10685 test "x$cf_library_path" != "xNONE" && \
10686 test -d "$cf_library_path" && \
10688 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
10689 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
10690 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
10691 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
10692 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
10693 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"
10696 cf_library_path_list="$cf_library_path_list $cf_search"
10704 test "x$prefix" != "xNONE" && \
10705 test -d "$prefix" && \
10707 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
10708 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
10709 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
10710 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
10711 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
10712 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
10715 for cf_subdir_prefix in \
10724 test "x$cf_subdir_prefix" != "x$prefix" && \
10725 test -d "$cf_subdir_prefix" && \
10726 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10727 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
10728 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
10729 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
10730 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
10731 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
10732 test -d $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
10737 cf_search="$cf_library_path_list $cf_search"
10739 for cf_libdir in $cf_search
10741 echo "$as_me:10741: checking for -l$cf_nculib_root in $cf_libdir" >&5
10742 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
10743 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
10744 cat >conftest.$ac_ext <<_ACEOF
10745 #line 10745 "configure"
10746 #include "confdefs.h"
10747 #include <${cf_cv_ncurses_header:-curses.h}>
10756 rm -f conftest.$ac_objext conftest$ac_exeext
10757 if { (eval echo "$as_me:10757: \"$ac_link\"") >&5
10758 (eval $ac_link) 2>&5
10760 echo "$as_me:10760: \$? = $ac_status" >&5
10761 (exit $ac_status); } &&
10762 { ac_try='test -s conftest$ac_exeext'
10763 { (eval echo "$as_me:10763: \"$ac_try\"") >&5
10764 (eval $ac_try) 2>&5
10766 echo "$as_me:10766: \$? = $ac_status" >&5
10767 (exit $ac_status); }; }; then
10768 echo "$as_me:10768: result: yes" >&5
10769 echo "${ECHO_T}yes" >&6
10770 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10773 echo "$as_me: failed program was:" >&5
10774 cat conftest.$ac_ext >&5
10775 echo "$as_me:10775: result: no" >&5
10776 echo "${ECHO_T}no" >&6
10777 LIBS="$cf_save_LIBS"
10779 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10783 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10787 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
10789 if test $cf_found_library = no ; then
10790 { { echo "$as_me:10790: error: Cannot link $cf_nculib_root library" >&5
10791 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
10792 { (exit 1); exit 1; }; }
10797 if test -n "$cf_ncurses_LIBS" ; then
10798 echo "$as_me:10798: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
10799 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
10800 cf_ncurses_SAVE="$LIBS"
10801 for p in $cf_ncurses_LIBS ; do
10802 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
10803 if test "$q" != "$LIBS" ; then
10807 cat >conftest.$ac_ext <<_ACEOF
10808 #line 10808 "configure"
10809 #include "confdefs.h"
10810 #include <${cf_cv_ncurses_header:-curses.h}>
10814 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
10819 rm -f conftest.$ac_objext conftest$ac_exeext
10820 if { (eval echo "$as_me:10820: \"$ac_link\"") >&5
10821 (eval $ac_link) 2>&5
10823 echo "$as_me:10823: \$? = $ac_status" >&5
10824 (exit $ac_status); } &&
10825 { ac_try='test -s conftest$ac_exeext'
10826 { (eval echo "$as_me:10826: \"$ac_try\"") >&5
10827 (eval $ac_try) 2>&5
10829 echo "$as_me:10829: \$? = $ac_status" >&5
10830 (exit $ac_status); }; }; then
10831 echo "$as_me:10831: result: yes" >&5
10832 echo "${ECHO_T}yes" >&6
10834 echo "$as_me: failed program was:" >&5
10835 cat conftest.$ac_ext >&5
10836 echo "$as_me:10836: result: no" >&5
10837 echo "${ECHO_T}no" >&6
10838 LIBS="$cf_ncurses_SAVE"
10840 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10843 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10845 cat >>confdefs.h <<EOF
10846 #define $cf_nculib_ROOT 1
10851 NCURSES_CONFIG=none
10856 echo "$as_me:10856: checking for X" >&5
10857 echo $ECHO_N "checking for X... $ECHO_C" >&6
10859 # Check whether --with-x or --without-x was given.
10860 if test "${with_x+set}" = set; then
10864 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
10865 if test "x$with_x" = xno; then
10866 # The user explicitly disabled X.
10869 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
10870 # Both variables are already set.
10873 if test "${ac_cv_have_x+set}" = set; then
10874 echo $ECHO_N "(cached) $ECHO_C" >&6
10876 # One or both of the vars are not set, and there is no cached value.
10877 ac_x_includes=no ac_x_libraries=no
10878 rm -fr conftest.dir
10879 if mkdir conftest.dir; then
10881 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
10882 cat >Imakefile <<'EOF'
10884 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
10886 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
10887 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
10888 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
10889 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
10890 for ac_extension in a so sl dylib dll; do
10891 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
10892 test -f $ac_im_libdir/libX11.$ac_extension; then
10893 ac_im_usrlibdir=$ac_im_libdir; break
10896 # Screen out bogus values from the imake configuration. They are
10897 # bogus both because they are the default anyway, and because
10898 # using them would break gcc on systems where it needs fixed includes.
10899 case $ac_im_incroot in
10901 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
10903 case $ac_im_usrlibdir in
10904 /usr/lib | /lib) ;;
10905 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
10909 rm -fr conftest.dir
10912 # Standard set of common directories for X headers.
10913 # Check X11 before X11Rn because it is often a symlink to the current release.
10925 /usr/local/X11/include
10926 /usr/local/X11R6/include
10927 /usr/local/X11R5/include
10928 /usr/local/X11R4/include
10930 /usr/local/include/X11
10931 /usr/local/include/X11R6
10932 /usr/local/include/X11R5
10933 /usr/local/include/X11R4
10937 /usr/XFree86/include/X11
10941 /usr/unsupported/include
10942 /usr/athena/include
10943 /usr/local/x11r5/include
10944 /usr/lpp/Xamples/include
10946 /usr/openwin/include
10947 /usr/openwin/share/include'
10949 if test "$ac_x_includes" = no; then
10950 # Guess where to find include files, by looking for Intrinsic.h.
10951 # First, try using that file with no special directory specified.
10952 cat >conftest.$ac_ext <<_ACEOF
10953 #line 10953 "configure"
10954 #include "confdefs.h"
10955 #include <X11/Intrinsic.h>
10957 if { (eval echo "$as_me:10957: \"$ac_cpp conftest.$ac_ext\"") >&5
10958 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10960 egrep -v '^ *\+' conftest.er1 >conftest.err
10962 cat conftest.err >&5
10963 echo "$as_me:10963: \$? = $ac_status" >&5
10964 (exit $ac_status); } >/dev/null; then
10965 if test -s conftest.err; then
10966 ac_cpp_err=$ac_c_preproc_warn_flag
10973 if test -z "$ac_cpp_err"; then
10974 # We can compile using X headers with no special include directory.
10977 echo "$as_me: failed program was:" >&5
10978 cat conftest.$ac_ext >&5
10979 for ac_dir in $ac_x_header_dirs; do
10980 if test -r "$ac_dir/X11/Intrinsic.h"; then
10981 ac_x_includes=$ac_dir
10986 rm -f conftest.err conftest.$ac_ext
10987 fi # $ac_x_includes = no
10989 if test "$ac_x_libraries" = no; then
10990 # Check for the libraries.
10991 # See if we find them without any special options.
10992 # Don't add to $LIBS permanently.
10995 cat >conftest.$ac_ext <<_ACEOF
10996 #line 10996 "configure"
10997 #include "confdefs.h"
10998 #include <X11/Intrinsic.h>
11007 rm -f conftest.$ac_objext conftest$ac_exeext
11008 if { (eval echo "$as_me:11008: \"$ac_link\"") >&5
11009 (eval $ac_link) 2>&5
11011 echo "$as_me:11011: \$? = $ac_status" >&5
11012 (exit $ac_status); } &&
11013 { ac_try='test -s conftest$ac_exeext'
11014 { (eval echo "$as_me:11014: \"$ac_try\"") >&5
11015 (eval $ac_try) 2>&5
11017 echo "$as_me:11017: \$? = $ac_status" >&5
11018 (exit $ac_status); }; }; then
11020 # We can link X programs with no special library path.
11023 echo "$as_me: failed program was:" >&5
11024 cat conftest.$ac_ext >&5
11026 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
11028 # Don't even attempt the hair of trying to link an X program!
11029 for ac_extension in a so sl dylib dll; do
11030 if test -r $ac_dir/libXt.$ac_extension; then
11031 ac_x_libraries=$ac_dir
11037 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11038 fi # $ac_x_libraries = no
11040 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
11041 # Didn't find X anywhere. Cache the known absence of X.
11042 ac_cv_have_x="have_x=no"
11044 # Record where we found X for the cache.
11045 ac_cv_have_x="have_x=yes \
11046 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
11051 eval "$ac_cv_have_x"
11054 if test "$have_x" != yes; then
11055 echo "$as_me:11055: result: $have_x" >&5
11056 echo "${ECHO_T}$have_x" >&6
11059 # If each of the values was on the command line, it overrides each guess.
11060 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
11061 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
11062 # Update the cache value to reflect the command line values.
11063 ac_cv_have_x="have_x=yes \
11064 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
11065 echo "$as_me:11065: result: libraries $x_libraries, headers $x_includes" >&5
11066 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
11069 if test "$no_x" = yes; then
11070 # Not all programs may use this symbol, but it does not hurt to define it.
11072 cat >>confdefs.h <<\EOF
11073 #define X_DISPLAY_MISSING 1
11076 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
11078 if test -n "$x_includes"; then
11079 X_CFLAGS="$X_CFLAGS -I$x_includes"
11082 # It would also be nice to do this for all -L options, not just this one.
11083 if test -n "$x_libraries"; then
11084 X_LIBS="$X_LIBS -L$x_libraries"
11085 # For Solaris; some versions of Sun CC require a space after -R and
11086 # others require no space. Words are not sufficient . . . .
11087 case `(uname -sr) 2>/dev/null` in
11089 echo "$as_me:11089: checking whether -R must be followed by a space" >&5
11090 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
11091 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
11092 cat >conftest.$ac_ext <<_ACEOF
11093 #line 11093 "configure"
11094 #include "confdefs.h"
11104 rm -f conftest.$ac_objext conftest$ac_exeext
11105 if { (eval echo "$as_me:11105: \"$ac_link\"") >&5
11106 (eval $ac_link) 2>&5
11108 echo "$as_me:11108: \$? = $ac_status" >&5
11109 (exit $ac_status); } &&
11110 { ac_try='test -s conftest$ac_exeext'
11111 { (eval echo "$as_me:11111: \"$ac_try\"") >&5
11112 (eval $ac_try) 2>&5
11114 echo "$as_me:11114: \$? = $ac_status" >&5
11115 (exit $ac_status); }; }; then
11118 echo "$as_me: failed program was:" >&5
11119 cat conftest.$ac_ext >&5
11122 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11123 if test $ac_R_nospace = yes; then
11124 echo "$as_me:11124: result: no" >&5
11125 echo "${ECHO_T}no" >&6
11126 X_LIBS="$X_LIBS -R$x_libraries"
11128 LIBS="$ac_xsave_LIBS -R $x_libraries"
11129 cat >conftest.$ac_ext <<_ACEOF
11130 #line 11130 "configure"
11131 #include "confdefs.h"
11141 rm -f conftest.$ac_objext conftest$ac_exeext
11142 if { (eval echo "$as_me:11142: \"$ac_link\"") >&5
11143 (eval $ac_link) 2>&5
11145 echo "$as_me:11145: \$? = $ac_status" >&5
11146 (exit $ac_status); } &&
11147 { ac_try='test -s conftest$ac_exeext'
11148 { (eval echo "$as_me:11148: \"$ac_try\"") >&5
11149 (eval $ac_try) 2>&5
11151 echo "$as_me:11151: \$? = $ac_status" >&5
11152 (exit $ac_status); }; }; then
11155 echo "$as_me: failed program was:" >&5
11156 cat conftest.$ac_ext >&5
11159 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11160 if test $ac_R_space = yes; then
11161 echo "$as_me:11161: result: yes" >&5
11162 echo "${ECHO_T}yes" >&6
11163 X_LIBS="$X_LIBS -R $x_libraries"
11165 echo "$as_me:11165: result: neither works" >&5
11166 echo "${ECHO_T}neither works" >&6
11169 LIBS=$ac_xsave_LIBS
11173 # Check for system-dependent libraries X programs must link with.
11174 # Do this before checking for the system-independent R6 libraries
11175 # (-lICE), since we may need -lsocket or whatever for X linking.
11177 if test "$ISC" = yes; then
11178 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
11180 # Martyn Johnson says this is needed for Ultrix, if the X
11181 # libraries were built with DECnet support. And Karl Berry says
11182 # the Alpha needs dnet_stub (dnet does not exist).
11183 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
11184 cat >conftest.$ac_ext <<_ACEOF
11185 #line 11185 "configure"
11186 #include "confdefs.h"
11188 /* Override any gcc2 internal prototype to avoid an error. */
11192 /* We use char because int might match the return type of a gcc2
11193 builtin and then its argument prototype would still apply. */
11194 char XOpenDisplay ();
11203 rm -f conftest.$ac_objext conftest$ac_exeext
11204 if { (eval echo "$as_me:11204: \"$ac_link\"") >&5
11205 (eval $ac_link) 2>&5
11207 echo "$as_me:11207: \$? = $ac_status" >&5
11208 (exit $ac_status); } &&
11209 { ac_try='test -s conftest$ac_exeext'
11210 { (eval echo "$as_me:11210: \"$ac_try\"") >&5
11211 (eval $ac_try) 2>&5
11213 echo "$as_me:11213: \$? = $ac_status" >&5
11214 (exit $ac_status); }; }; then
11217 echo "$as_me: failed program was:" >&5
11218 cat conftest.$ac_ext >&5
11219 echo "$as_me:11219: checking for dnet_ntoa in -ldnet" >&5
11220 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
11221 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
11222 echo $ECHO_N "(cached) $ECHO_C" >&6
11224 ac_check_lib_save_LIBS=$LIBS
11225 LIBS="-ldnet $LIBS"
11226 cat >conftest.$ac_ext <<_ACEOF
11227 #line 11227 "configure"
11228 #include "confdefs.h"
11230 /* Override any gcc2 internal prototype to avoid an error. */
11234 /* We use char because int might match the return type of a gcc2
11235 builtin and then its argument prototype would still apply. */
11245 rm -f conftest.$ac_objext conftest$ac_exeext
11246 if { (eval echo "$as_me:11246: \"$ac_link\"") >&5
11247 (eval $ac_link) 2>&5
11249 echo "$as_me:11249: \$? = $ac_status" >&5
11250 (exit $ac_status); } &&
11251 { ac_try='test -s conftest$ac_exeext'
11252 { (eval echo "$as_me:11252: \"$ac_try\"") >&5
11253 (eval $ac_try) 2>&5
11255 echo "$as_me:11255: \$? = $ac_status" >&5
11256 (exit $ac_status); }; }; then
11257 ac_cv_lib_dnet_dnet_ntoa=yes
11259 echo "$as_me: failed program was:" >&5
11260 cat conftest.$ac_ext >&5
11261 ac_cv_lib_dnet_dnet_ntoa=no
11263 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11264 LIBS=$ac_check_lib_save_LIBS
11266 echo "$as_me:11266: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
11267 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
11268 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
11269 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
11272 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
11273 echo "$as_me:11273: checking for dnet_ntoa in -ldnet_stub" >&5
11274 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
11275 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
11276 echo $ECHO_N "(cached) $ECHO_C" >&6
11278 ac_check_lib_save_LIBS=$LIBS
11279 LIBS="-ldnet_stub $LIBS"
11280 cat >conftest.$ac_ext <<_ACEOF
11281 #line 11281 "configure"
11282 #include "confdefs.h"
11284 /* Override any gcc2 internal prototype to avoid an error. */
11288 /* We use char because int might match the return type of a gcc2
11289 builtin and then its argument prototype would still apply. */
11299 rm -f conftest.$ac_objext conftest$ac_exeext
11300 if { (eval echo "$as_me:11300: \"$ac_link\"") >&5
11301 (eval $ac_link) 2>&5
11303 echo "$as_me:11303: \$? = $ac_status" >&5
11304 (exit $ac_status); } &&
11305 { ac_try='test -s conftest$ac_exeext'
11306 { (eval echo "$as_me:11306: \"$ac_try\"") >&5
11307 (eval $ac_try) 2>&5
11309 echo "$as_me:11309: \$? = $ac_status" >&5
11310 (exit $ac_status); }; }; then
11311 ac_cv_lib_dnet_stub_dnet_ntoa=yes
11313 echo "$as_me: failed program was:" >&5
11314 cat conftest.$ac_ext >&5
11315 ac_cv_lib_dnet_stub_dnet_ntoa=no
11317 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11318 LIBS=$ac_check_lib_save_LIBS
11320 echo "$as_me:11320: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
11321 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
11322 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
11323 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
11328 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11329 LIBS="$ac_xsave_LIBS"
11331 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
11332 # to get the SysV transport functions.
11333 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
11335 # The nsl library prevents programs from opening the X display
11336 # on Irix 5.2, according to T.E. Dickey.
11337 # The functions gethostbyname, getservbyname, and inet_addr are
11338 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
11339 echo "$as_me:11339: checking for gethostbyname" >&5
11340 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
11341 if test "${ac_cv_func_gethostbyname+set}" = set; then
11342 echo $ECHO_N "(cached) $ECHO_C" >&6
11344 cat >conftest.$ac_ext <<_ACEOF
11345 #line 11345 "configure"
11346 #include "confdefs.h"
11347 /* System header to define __stub macros and hopefully few prototypes,
11348 which can conflict with char gethostbyname (); below. */
11349 #include <assert.h>
11350 /* Override any gcc2 internal prototype to avoid an error. */
11354 /* We use char because int might match the return type of a gcc2
11355 builtin and then its argument prototype would still apply. */
11356 char gethostbyname ();
11362 /* The GNU C library defines this for functions which it implements
11363 to always fail with ENOSYS. Some functions are actually named
11364 something starting with __ and the normal name is an alias. */
11365 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
11368 f = gethostbyname; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11375 rm -f conftest.$ac_objext conftest$ac_exeext
11376 if { (eval echo "$as_me:11376: \"$ac_link\"") >&5
11377 (eval $ac_link) 2>&5
11379 echo "$as_me:11379: \$? = $ac_status" >&5
11380 (exit $ac_status); } &&
11381 { ac_try='test -s conftest$ac_exeext'
11382 { (eval echo "$as_me:11382: \"$ac_try\"") >&5
11383 (eval $ac_try) 2>&5
11385 echo "$as_me:11385: \$? = $ac_status" >&5
11386 (exit $ac_status); }; }; then
11387 ac_cv_func_gethostbyname=yes
11389 echo "$as_me: failed program was:" >&5
11390 cat conftest.$ac_ext >&5
11391 ac_cv_func_gethostbyname=no
11393 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11395 echo "$as_me:11395: result: $ac_cv_func_gethostbyname" >&5
11396 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
11398 if test $ac_cv_func_gethostbyname = no; then
11399 echo "$as_me:11399: checking for gethostbyname in -lnsl" >&5
11400 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
11401 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
11402 echo $ECHO_N "(cached) $ECHO_C" >&6
11404 ac_check_lib_save_LIBS=$LIBS
11406 cat >conftest.$ac_ext <<_ACEOF
11407 #line 11407 "configure"
11408 #include "confdefs.h"
11410 /* Override any gcc2 internal prototype to avoid an error. */
11414 /* We use char because int might match the return type of a gcc2
11415 builtin and then its argument prototype would still apply. */
11416 char gethostbyname ();
11425 rm -f conftest.$ac_objext conftest$ac_exeext
11426 if { (eval echo "$as_me:11426: \"$ac_link\"") >&5
11427 (eval $ac_link) 2>&5
11429 echo "$as_me:11429: \$? = $ac_status" >&5
11430 (exit $ac_status); } &&
11431 { ac_try='test -s conftest$ac_exeext'
11432 { (eval echo "$as_me:11432: \"$ac_try\"") >&5
11433 (eval $ac_try) 2>&5
11435 echo "$as_me:11435: \$? = $ac_status" >&5
11436 (exit $ac_status); }; }; then
11437 ac_cv_lib_nsl_gethostbyname=yes
11439 echo "$as_me: failed program was:" >&5
11440 cat conftest.$ac_ext >&5
11441 ac_cv_lib_nsl_gethostbyname=no
11443 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11444 LIBS=$ac_check_lib_save_LIBS
11446 echo "$as_me:11446: result: $ac_cv_lib_nsl_gethostbyname" >&5
11447 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
11448 if test $ac_cv_lib_nsl_gethostbyname = yes; then
11449 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
11452 if test $ac_cv_lib_nsl_gethostbyname = no; then
11453 echo "$as_me:11453: checking for gethostbyname in -lbsd" >&5
11454 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
11455 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
11456 echo $ECHO_N "(cached) $ECHO_C" >&6
11458 ac_check_lib_save_LIBS=$LIBS
11460 cat >conftest.$ac_ext <<_ACEOF
11461 #line 11461 "configure"
11462 #include "confdefs.h"
11464 /* Override any gcc2 internal prototype to avoid an error. */
11468 /* We use char because int might match the return type of a gcc2
11469 builtin and then its argument prototype would still apply. */
11470 char gethostbyname ();
11479 rm -f conftest.$ac_objext conftest$ac_exeext
11480 if { (eval echo "$as_me:11480: \"$ac_link\"") >&5
11481 (eval $ac_link) 2>&5
11483 echo "$as_me:11483: \$? = $ac_status" >&5
11484 (exit $ac_status); } &&
11485 { ac_try='test -s conftest$ac_exeext'
11486 { (eval echo "$as_me:11486: \"$ac_try\"") >&5
11487 (eval $ac_try) 2>&5
11489 echo "$as_me:11489: \$? = $ac_status" >&5
11490 (exit $ac_status); }; }; then
11491 ac_cv_lib_bsd_gethostbyname=yes
11493 echo "$as_me: failed program was:" >&5
11494 cat conftest.$ac_ext >&5
11495 ac_cv_lib_bsd_gethostbyname=no
11497 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11498 LIBS=$ac_check_lib_save_LIBS
11500 echo "$as_me:11500: result: $ac_cv_lib_bsd_gethostbyname" >&5
11501 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
11502 if test $ac_cv_lib_bsd_gethostbyname = yes; then
11503 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
11509 # lieder@skyler.mavd.honeywell.com says without -lsocket,
11510 # socket/setsockopt and other routines are undefined under SCO ODT
11511 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
11512 # on later versions), says Simon Leinen: it contains gethostby*
11513 # variants that don't use the nameserver (or something). -lsocket
11514 # must be given before -lnsl if both are needed. We assume that
11515 # if connect needs -lnsl, so does gethostbyname.
11516 echo "$as_me:11516: checking for connect" >&5
11517 echo $ECHO_N "checking for connect... $ECHO_C" >&6
11518 if test "${ac_cv_func_connect+set}" = set; then
11519 echo $ECHO_N "(cached) $ECHO_C" >&6
11521 cat >conftest.$ac_ext <<_ACEOF
11522 #line 11522 "configure"
11523 #include "confdefs.h"
11524 /* System header to define __stub macros and hopefully few prototypes,
11525 which can conflict with char connect (); below. */
11526 #include <assert.h>
11527 /* Override any gcc2 internal prototype to avoid an error. */
11531 /* We use char because int might match the return type of a gcc2
11532 builtin and then its argument prototype would still apply. */
11539 /* The GNU C library defines this for functions which it implements
11540 to always fail with ENOSYS. Some functions are actually named
11541 something starting with __ and the normal name is an alias. */
11542 #if defined (__stub_connect) || defined (__stub___connect)
11545 f = connect; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11552 rm -f conftest.$ac_objext conftest$ac_exeext
11553 if { (eval echo "$as_me:11553: \"$ac_link\"") >&5
11554 (eval $ac_link) 2>&5
11556 echo "$as_me:11556: \$? = $ac_status" >&5
11557 (exit $ac_status); } &&
11558 { ac_try='test -s conftest$ac_exeext'
11559 { (eval echo "$as_me:11559: \"$ac_try\"") >&5
11560 (eval $ac_try) 2>&5
11562 echo "$as_me:11562: \$? = $ac_status" >&5
11563 (exit $ac_status); }; }; then
11564 ac_cv_func_connect=yes
11566 echo "$as_me: failed program was:" >&5
11567 cat conftest.$ac_ext >&5
11568 ac_cv_func_connect=no
11570 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11572 echo "$as_me:11572: result: $ac_cv_func_connect" >&5
11573 echo "${ECHO_T}$ac_cv_func_connect" >&6
11575 if test $ac_cv_func_connect = no; then
11576 echo "$as_me:11576: checking for connect in -lsocket" >&5
11577 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
11578 if test "${ac_cv_lib_socket_connect+set}" = set; then
11579 echo $ECHO_N "(cached) $ECHO_C" >&6
11581 ac_check_lib_save_LIBS=$LIBS
11582 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
11583 cat >conftest.$ac_ext <<_ACEOF
11584 #line 11584 "configure"
11585 #include "confdefs.h"
11587 /* Override any gcc2 internal prototype to avoid an error. */
11591 /* We use char because int might match the return type of a gcc2
11592 builtin and then its argument prototype would still apply. */
11602 rm -f conftest.$ac_objext conftest$ac_exeext
11603 if { (eval echo "$as_me:11603: \"$ac_link\"") >&5
11604 (eval $ac_link) 2>&5
11606 echo "$as_me:11606: \$? = $ac_status" >&5
11607 (exit $ac_status); } &&
11608 { ac_try='test -s conftest$ac_exeext'
11609 { (eval echo "$as_me:11609: \"$ac_try\"") >&5
11610 (eval $ac_try) 2>&5
11612 echo "$as_me:11612: \$? = $ac_status" >&5
11613 (exit $ac_status); }; }; then
11614 ac_cv_lib_socket_connect=yes
11616 echo "$as_me: failed program was:" >&5
11617 cat conftest.$ac_ext >&5
11618 ac_cv_lib_socket_connect=no
11620 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11621 LIBS=$ac_check_lib_save_LIBS
11623 echo "$as_me:11623: result: $ac_cv_lib_socket_connect" >&5
11624 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
11625 if test $ac_cv_lib_socket_connect = yes; then
11626 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
11631 # Guillermo Gomez says -lposix is necessary on A/UX.
11632 echo "$as_me:11632: checking for remove" >&5
11633 echo $ECHO_N "checking for remove... $ECHO_C" >&6
11634 if test "${ac_cv_func_remove+set}" = set; then
11635 echo $ECHO_N "(cached) $ECHO_C" >&6
11637 cat >conftest.$ac_ext <<_ACEOF
11638 #line 11638 "configure"
11639 #include "confdefs.h"
11640 /* System header to define __stub macros and hopefully few prototypes,
11641 which can conflict with char remove (); below. */
11642 #include <assert.h>
11643 /* Override any gcc2 internal prototype to avoid an error. */
11647 /* We use char because int might match the return type of a gcc2
11648 builtin and then its argument prototype would still apply. */
11655 /* The GNU C library defines this for functions which it implements
11656 to always fail with ENOSYS. Some functions are actually named
11657 something starting with __ and the normal name is an alias. */
11658 #if defined (__stub_remove) || defined (__stub___remove)
11661 f = remove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11668 rm -f conftest.$ac_objext conftest$ac_exeext
11669 if { (eval echo "$as_me:11669: \"$ac_link\"") >&5
11670 (eval $ac_link) 2>&5
11672 echo "$as_me:11672: \$? = $ac_status" >&5
11673 (exit $ac_status); } &&
11674 { ac_try='test -s conftest$ac_exeext'
11675 { (eval echo "$as_me:11675: \"$ac_try\"") >&5
11676 (eval $ac_try) 2>&5
11678 echo "$as_me:11678: \$? = $ac_status" >&5
11679 (exit $ac_status); }; }; then
11680 ac_cv_func_remove=yes
11682 echo "$as_me: failed program was:" >&5
11683 cat conftest.$ac_ext >&5
11684 ac_cv_func_remove=no
11686 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11688 echo "$as_me:11688: result: $ac_cv_func_remove" >&5
11689 echo "${ECHO_T}$ac_cv_func_remove" >&6
11691 if test $ac_cv_func_remove = no; then
11692 echo "$as_me:11692: checking for remove in -lposix" >&5
11693 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
11694 if test "${ac_cv_lib_posix_remove+set}" = set; then
11695 echo $ECHO_N "(cached) $ECHO_C" >&6
11697 ac_check_lib_save_LIBS=$LIBS
11698 LIBS="-lposix $LIBS"
11699 cat >conftest.$ac_ext <<_ACEOF
11700 #line 11700 "configure"
11701 #include "confdefs.h"
11703 /* Override any gcc2 internal prototype to avoid an error. */
11707 /* We use char because int might match the return type of a gcc2
11708 builtin and then its argument prototype would still apply. */
11718 rm -f conftest.$ac_objext conftest$ac_exeext
11719 if { (eval echo "$as_me:11719: \"$ac_link\"") >&5
11720 (eval $ac_link) 2>&5
11722 echo "$as_me:11722: \$? = $ac_status" >&5
11723 (exit $ac_status); } &&
11724 { ac_try='test -s conftest$ac_exeext'
11725 { (eval echo "$as_me:11725: \"$ac_try\"") >&5
11726 (eval $ac_try) 2>&5
11728 echo "$as_me:11728: \$? = $ac_status" >&5
11729 (exit $ac_status); }; }; then
11730 ac_cv_lib_posix_remove=yes
11732 echo "$as_me: failed program was:" >&5
11733 cat conftest.$ac_ext >&5
11734 ac_cv_lib_posix_remove=no
11736 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11737 LIBS=$ac_check_lib_save_LIBS
11739 echo "$as_me:11739: result: $ac_cv_lib_posix_remove" >&5
11740 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
11741 if test $ac_cv_lib_posix_remove = yes; then
11742 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
11747 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
11748 echo "$as_me:11748: checking for shmat" >&5
11749 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
11750 if test "${ac_cv_func_shmat+set}" = set; then
11751 echo $ECHO_N "(cached) $ECHO_C" >&6
11753 cat >conftest.$ac_ext <<_ACEOF
11754 #line 11754 "configure"
11755 #include "confdefs.h"
11756 /* System header to define __stub macros and hopefully few prototypes,
11757 which can conflict with char shmat (); below. */
11758 #include <assert.h>
11759 /* Override any gcc2 internal prototype to avoid an error. */
11763 /* We use char because int might match the return type of a gcc2
11764 builtin and then its argument prototype would still apply. */
11771 /* The GNU C library defines this for functions which it implements
11772 to always fail with ENOSYS. Some functions are actually named
11773 something starting with __ and the normal name is an alias. */
11774 #if defined (__stub_shmat) || defined (__stub___shmat)
11777 f = shmat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11784 rm -f conftest.$ac_objext conftest$ac_exeext
11785 if { (eval echo "$as_me:11785: \"$ac_link\"") >&5
11786 (eval $ac_link) 2>&5
11788 echo "$as_me:11788: \$? = $ac_status" >&5
11789 (exit $ac_status); } &&
11790 { ac_try='test -s conftest$ac_exeext'
11791 { (eval echo "$as_me:11791: \"$ac_try\"") >&5
11792 (eval $ac_try) 2>&5
11794 echo "$as_me:11794: \$? = $ac_status" >&5
11795 (exit $ac_status); }; }; then
11796 ac_cv_func_shmat=yes
11798 echo "$as_me: failed program was:" >&5
11799 cat conftest.$ac_ext >&5
11800 ac_cv_func_shmat=no
11802 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11804 echo "$as_me:11804: result: $ac_cv_func_shmat" >&5
11805 echo "${ECHO_T}$ac_cv_func_shmat" >&6
11807 if test $ac_cv_func_shmat = no; then
11808 echo "$as_me:11808: checking for shmat in -lipc" >&5
11809 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
11810 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
11811 echo $ECHO_N "(cached) $ECHO_C" >&6
11813 ac_check_lib_save_LIBS=$LIBS
11815 cat >conftest.$ac_ext <<_ACEOF
11816 #line 11816 "configure"
11817 #include "confdefs.h"
11819 /* Override any gcc2 internal prototype to avoid an error. */
11823 /* We use char because int might match the return type of a gcc2
11824 builtin and then its argument prototype would still apply. */
11834 rm -f conftest.$ac_objext conftest$ac_exeext
11835 if { (eval echo "$as_me:11835: \"$ac_link\"") >&5
11836 (eval $ac_link) 2>&5
11838 echo "$as_me:11838: \$? = $ac_status" >&5
11839 (exit $ac_status); } &&
11840 { ac_try='test -s conftest$ac_exeext'
11841 { (eval echo "$as_me:11841: \"$ac_try\"") >&5
11842 (eval $ac_try) 2>&5
11844 echo "$as_me:11844: \$? = $ac_status" >&5
11845 (exit $ac_status); }; }; then
11846 ac_cv_lib_ipc_shmat=yes
11848 echo "$as_me: failed program was:" >&5
11849 cat conftest.$ac_ext >&5
11850 ac_cv_lib_ipc_shmat=no
11852 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11853 LIBS=$ac_check_lib_save_LIBS
11855 echo "$as_me:11855: result: $ac_cv_lib_ipc_shmat" >&5
11856 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
11857 if test $ac_cv_lib_ipc_shmat = yes; then
11858 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
11864 # Check for libraries that X11R6 Xt/Xaw programs need.
11865 ac_save_LDFLAGS=$LDFLAGS
11866 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
11867 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
11868 # check for ICE first), but we must link in the order -lSM -lICE or
11869 # we get undefined symbols. So assume we have SM if we have ICE.
11870 # These have to be linked with before -lX11, unlike the other
11871 # libraries we check for below, so use a different variable.
11872 # John Interrante, Karl Berry
11873 echo "$as_me:11873: checking for IceConnectionNumber in -lICE" >&5
11874 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
11875 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
11876 echo $ECHO_N "(cached) $ECHO_C" >&6
11878 ac_check_lib_save_LIBS=$LIBS
11879 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
11880 cat >conftest.$ac_ext <<_ACEOF
11881 #line 11881 "configure"
11882 #include "confdefs.h"
11884 /* Override any gcc2 internal prototype to avoid an error. */
11888 /* We use char because int might match the return type of a gcc2
11889 builtin and then its argument prototype would still apply. */
11890 char IceConnectionNumber ();
11894 IceConnectionNumber ();
11899 rm -f conftest.$ac_objext conftest$ac_exeext
11900 if { (eval echo "$as_me:11900: \"$ac_link\"") >&5
11901 (eval $ac_link) 2>&5
11903 echo "$as_me:11903: \$? = $ac_status" >&5
11904 (exit $ac_status); } &&
11905 { ac_try='test -s conftest$ac_exeext'
11906 { (eval echo "$as_me:11906: \"$ac_try\"") >&5
11907 (eval $ac_try) 2>&5
11909 echo "$as_me:11909: \$? = $ac_status" >&5
11910 (exit $ac_status); }; }; then
11911 ac_cv_lib_ICE_IceConnectionNumber=yes
11913 echo "$as_me: failed program was:" >&5
11914 cat conftest.$ac_ext >&5
11915 ac_cv_lib_ICE_IceConnectionNumber=no
11917 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11918 LIBS=$ac_check_lib_save_LIBS
11920 echo "$as_me:11920: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
11921 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
11922 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
11923 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
11926 LDFLAGS=$ac_save_LDFLAGS
11930 cf_x_athena=${cf_x_athena:-Xaw}
11932 echo "$as_me:11932: checking if you want to link with Xaw 3d library" >&5
11933 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
11936 # Check whether --with-Xaw3d or --without-Xaw3d was given.
11937 if test "${with_Xaw3d+set}" = set; then
11938 withval="$with_Xaw3d"
11941 if test "$withval" = yes ; then
11943 echo "$as_me:11943: result: yes" >&5
11944 echo "${ECHO_T}yes" >&6
11946 echo "$as_me:11946: result: no" >&5
11947 echo "${ECHO_T}no" >&6
11950 echo "$as_me:11950: checking if you want to link with Xaw 3d xft library" >&5
11951 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
11954 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
11955 if test "${with_Xaw3dxft+set}" = set; then
11956 withval="$with_Xaw3dxft"
11959 if test "$withval" = yes ; then
11960 cf_x_athena=Xaw3dxft
11961 echo "$as_me:11961: result: yes" >&5
11962 echo "${ECHO_T}yes" >&6
11964 echo "$as_me:11964: result: no" >&5
11965 echo "${ECHO_T}no" >&6
11968 echo "$as_me:11968: checking if you want to link with neXT Athena library" >&5
11969 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
11972 # Check whether --with-neXtaw or --without-neXtaw was given.
11973 if test "${with_neXtaw+set}" = set; then
11974 withval="$with_neXtaw"
11977 if test "$withval" = yes ; then
11979 echo "$as_me:11979: result: yes" >&5
11980 echo "${ECHO_T}yes" >&6
11982 echo "$as_me:11982: result: no" >&5
11983 echo "${ECHO_T}no" >&6
11986 echo "$as_me:11986: checking if you want to link with Athena-Plus library" >&5
11987 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
11990 # Check whether --with-XawPlus or --without-XawPlus was given.
11991 if test "${with_XawPlus+set}" = set; then
11992 withval="$with_XawPlus"
11995 if test "$withval" = yes ; then
11996 cf_x_athena=XawPlus
11997 echo "$as_me:11997: result: yes" >&5
11998 echo "${ECHO_T}yes" >&6
12000 echo "$as_me:12000: result: no" >&5
12001 echo "${ECHO_T}no" >&6
12006 if test "$PKG_CONFIG" != none ; then
12008 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
12009 for cf_athena_pkg in \
12012 ${cf_x_athena}-devel \
12013 lib${cf_x_athena} \
12014 lib${cf_x_athena}-devel
12017 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
12018 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
12020 echo "${as_me:-configure}:12020: testing found package $cf_athena_pkg ..." 1>&5
12022 cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
12023 cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
12024 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
12026 echo "${as_me:-configure}:12026: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12028 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
12030 echo "${as_me:-configure}:12030: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
12035 cf_new_extra_cppflags=
12037 for cf_add_cflags in $cf_pkgconfig_incs
12039 case $cf_fix_cppflags in
12041 case $cf_add_cflags in
12042 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12043 case $cf_add_cflags in
12045 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12047 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12048 && test -z "${cf_tst_cflags}" \
12049 && cf_fix_cppflags=yes
12051 if test $cf_fix_cppflags = yes ; then
12053 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12054 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12057 elif test "${cf_tst_cflags}" = "\"'" ; then
12059 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12060 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12066 case "$CPPFLAGS" in
12070 case $cf_add_cflags in
12072 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12074 CPPFLAGS=`echo "$CPPFLAGS" | \
12075 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12076 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12081 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12082 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12089 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12090 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12097 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12098 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12100 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12102 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12103 && test -z "${cf_tst_cflags}" \
12104 && cf_fix_cppflags=no
12109 if test -n "$cf_new_cflags" ; then
12111 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12112 CFLAGS="${CFLAGS}$cf_new_cflags"
12116 if test -n "$cf_new_cppflags" ; then
12118 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12119 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12123 if test -n "$cf_new_extra_cppflags" ; then
12125 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12126 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12130 cf_add_libs="$cf_pkgconfig_libs"
12131 # Filter out duplicates - this happens with badly-designed ".pc" files...
12132 for cf_add_1lib in $LIBS
12134 for cf_add_2lib in $cf_add_libs
12136 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12142 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12144 LIBS="$cf_add_libs"
12146 cf_x_athena_lib="$cf_pkgconfig_libs"
12148 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12150 cat >>confdefs.h <<EOF
12151 #define $cf_x_athena_LIBS 1
12154 for cf_trim_lib in Xmu Xt X11
12157 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
12158 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
12159 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
12161 echo "${as_me:-configure}:12161: testing ..trimmed $LIBS ..." 1>&5
12167 echo "$as_me:12167: checking for usable $cf_x_athena/Xmu package" >&5
12168 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
12169 if test "${cf_cv_xaw_compat+set}" = set; then
12170 echo $ECHO_N "(cached) $ECHO_C" >&6
12173 cat >conftest.$ac_ext <<_ACEOF
12174 #line 12174 "configure"
12175 #include "confdefs.h"
12177 #include <X11/Xmu/CharSet.h>
12183 int check = XmuCompareISOLatin1("big", "small")
12189 rm -f conftest.$ac_objext conftest$ac_exeext
12190 if { (eval echo "$as_me:12190: \"$ac_link\"") >&5
12191 (eval $ac_link) 2>&5
12193 echo "$as_me:12193: \$? = $ac_status" >&5
12194 (exit $ac_status); } &&
12195 { ac_try='test -s conftest$ac_exeext'
12196 { (eval echo "$as_me:12196: \"$ac_try\"") >&5
12197 (eval $ac_try) 2>&5
12199 echo "$as_me:12199: \$? = $ac_status" >&5
12200 (exit $ac_status); }; }; then
12201 cf_cv_xaw_compat=yes
12203 echo "$as_me: failed program was:" >&5
12204 cat conftest.$ac_ext >&5
12205 cf_cv_xaw_compat=no
12207 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12209 echo "$as_me:12209: result: $cf_cv_xaw_compat" >&5
12210 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
12212 if test "$cf_cv_xaw_compat" = no
12214 # workaround for broken ".pc" files...
12215 case "$cf_x_athena_lib" in
12219 test -n "$verbose" && echo " work around broken package" 1>&6
12221 echo "${as_me:-configure}:12221: testing work around broken package ..." 1>&5
12223 cf_save_xmu="$LIBS"
12224 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
12226 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
12227 test -n "$verbose" && echo " found package xmu" 1>&6
12229 echo "${as_me:-configure}:12229: testing found package xmu ..." 1>&5
12231 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
12232 cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`"
12233 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
12235 echo "${as_me:-configure}:12235: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12237 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
12239 echo "${as_me:-configure}:12239: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
12244 cf_new_extra_cppflags=
12246 for cf_add_cflags in $cf_pkgconfig_incs
12248 case $cf_fix_cppflags in
12250 case $cf_add_cflags in
12251 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12252 case $cf_add_cflags in
12254 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12256 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12257 && test -z "${cf_tst_cflags}" \
12258 && cf_fix_cppflags=yes
12260 if test $cf_fix_cppflags = yes ; then
12262 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12263 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12266 elif test "${cf_tst_cflags}" = "\"'" ; then
12268 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12269 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12275 case "$CPPFLAGS" in
12279 case $cf_add_cflags in
12281 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12283 CPPFLAGS=`echo "$CPPFLAGS" | \
12284 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12285 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12290 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12291 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12298 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12299 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12306 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12307 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12309 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12311 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12312 && test -z "${cf_tst_cflags}" \
12313 && cf_fix_cppflags=no
12318 if test -n "$cf_new_cflags" ; then
12320 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12321 CFLAGS="${CFLAGS}$cf_new_cflags"
12325 if test -n "$cf_new_cppflags" ; then
12327 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12328 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12332 if test -n "$cf_new_extra_cppflags" ; then
12334 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12335 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12339 cf_add_libs="$cf_pkgconfig_libs"
12340 # Filter out duplicates - this happens with badly-designed ".pc" files...
12341 for cf_add_1lib in $LIBS
12343 for cf_add_2lib in $cf_add_libs
12345 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12351 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12353 LIBS="$cf_add_libs"
12355 LIBS="$cf_save_xmu"
12357 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12359 echo "${as_me:-configure}:12359: testing ...before $LIBS ..." 1>&5
12361 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
12362 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12364 echo "${as_me:-configure}:12364: testing ...after $LIBS ..." 1>&5
12370 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12372 echo "${as_me:-configure}:12372: testing ...before $LIBS ..." 1>&5
12374 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
12375 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12377 echo "${as_me:-configure}:12377: testing ...after $LIBS ..." 1>&5
12381 for cf_trim_lib in Xmu Xt X11
12384 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
12385 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
12386 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
12388 echo "${as_me:-configure}:12388: testing ..trimmed $LIBS ..." 1>&5
12408 if test -z "$cf_x_athena_lib" ; then
12410 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
12411 test -n "$verbose" && echo " found package Xext" 1>&6
12413 echo "${as_me:-configure}:12413: testing found package Xext ..." 1>&5
12415 cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
12416 cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
12417 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
12419 echo "${as_me:-configure}:12419: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12421 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
12423 echo "${as_me:-configure}:12423: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
12428 cf_new_extra_cppflags=
12430 for cf_add_cflags in $cf_pkgconfig_incs
12432 case $cf_fix_cppflags in
12434 case $cf_add_cflags in
12435 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12436 case $cf_add_cflags in
12438 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12440 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12441 && test -z "${cf_tst_cflags}" \
12442 && cf_fix_cppflags=yes
12444 if test $cf_fix_cppflags = yes ; then
12446 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12447 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12450 elif test "${cf_tst_cflags}" = "\"'" ; then
12452 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12453 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12459 case "$CPPFLAGS" in
12463 case $cf_add_cflags in
12465 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12467 CPPFLAGS=`echo "$CPPFLAGS" | \
12468 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12469 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12474 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12475 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12482 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12483 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12490 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12491 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12493 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12495 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12496 && test -z "${cf_tst_cflags}" \
12497 && cf_fix_cppflags=no
12502 if test -n "$cf_new_cflags" ; then
12504 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12505 CFLAGS="${CFLAGS}$cf_new_cflags"
12509 if test -n "$cf_new_cppflags" ; then
12511 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12512 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12516 if test -n "$cf_new_extra_cppflags" ; then
12518 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12519 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12523 cf_add_libs="$cf_pkgconfig_libs"
12524 # Filter out duplicates - this happens with badly-designed ".pc" files...
12525 for cf_add_1lib in $LIBS
12527 for cf_add_2lib in $cf_add_libs
12529 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12535 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12537 LIBS="$cf_add_libs"
12544 echo "$as_me:12544: checking for XextCreateExtension in -lXext" >&5
12545 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
12546 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
12547 echo $ECHO_N "(cached) $ECHO_C" >&6
12549 ac_check_lib_save_LIBS=$LIBS
12550 LIBS="-lXext $LIBS"
12551 cat >conftest.$ac_ext <<_ACEOF
12552 #line 12552 "configure"
12553 #include "confdefs.h"
12555 /* Override any gcc2 internal prototype to avoid an error. */
12559 /* We use char because int might match the return type of a gcc2
12560 builtin and then its argument prototype would still apply. */
12561 char XextCreateExtension ();
12565 XextCreateExtension ();
12570 rm -f conftest.$ac_objext conftest$ac_exeext
12571 if { (eval echo "$as_me:12571: \"$ac_link\"") >&5
12572 (eval $ac_link) 2>&5
12574 echo "$as_me:12574: \$? = $ac_status" >&5
12575 (exit $ac_status); } &&
12576 { ac_try='test -s conftest$ac_exeext'
12577 { (eval echo "$as_me:12577: \"$ac_try\"") >&5
12578 (eval $ac_try) 2>&5
12580 echo "$as_me:12580: \$? = $ac_status" >&5
12581 (exit $ac_status); }; }; then
12582 ac_cv_lib_Xext_XextCreateExtension=yes
12584 echo "$as_me: failed program was:" >&5
12585 cat conftest.$ac_ext >&5
12586 ac_cv_lib_Xext_XextCreateExtension=no
12588 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12589 LIBS=$ac_check_lib_save_LIBS
12591 echo "$as_me:12591: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
12592 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
12593 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
12595 cf_add_libs="-lXext"
12596 # Filter out duplicates - this happens with badly-designed ".pc" files...
12597 for cf_add_1lib in $LIBS
12599 for cf_add_2lib in $cf_add_libs
12601 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12607 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12609 LIBS="$cf_add_libs"
12615 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
12616 # in some cases has installed dummy files in the former, other cases replaced
12617 # it with a link to the new location). This complicates the configure script.
12618 # Check for that pitfall, and recover using pkg-config
12620 # If none of these are set, the configuration is almost certainly broken.
12621 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
12624 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
12625 test -n "$verbose" && echo " found package x11" 1>&6
12627 echo "${as_me:-configure}:12627: testing found package x11 ..." 1>&5
12629 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
12630 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
12631 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
12633 echo "${as_me:-configure}:12633: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12635 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
12637 echo "${as_me:-configure}:12637: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
12642 cf_new_extra_cppflags=
12644 for cf_add_cflags in $cf_pkgconfig_incs
12646 case $cf_fix_cppflags in
12648 case $cf_add_cflags in
12649 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12650 case $cf_add_cflags in
12652 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12654 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12655 && test -z "${cf_tst_cflags}" \
12656 && cf_fix_cppflags=yes
12658 if test $cf_fix_cppflags = yes ; then
12660 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12661 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12664 elif test "${cf_tst_cflags}" = "\"'" ; then
12666 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12667 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12673 case "$CPPFLAGS" in
12677 case $cf_add_cflags in
12679 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12681 CPPFLAGS=`echo "$CPPFLAGS" | \
12682 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12683 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12688 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12689 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12696 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12697 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12704 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12705 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12707 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12709 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12710 && test -z "${cf_tst_cflags}" \
12711 && cf_fix_cppflags=no
12716 if test -n "$cf_new_cflags" ; then
12718 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12719 CFLAGS="${CFLAGS}$cf_new_cflags"
12723 if test -n "$cf_new_cppflags" ; then
12725 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12726 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12730 if test -n "$cf_new_extra_cppflags" ; then
12732 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12733 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12737 cf_add_libs="$cf_pkgconfig_libs"
12738 # Filter out duplicates - this happens with badly-designed ".pc" files...
12739 for cf_add_1lib in $LIBS
12741 for cf_add_2lib in $cf_add_libs
12743 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12749 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12751 LIBS="$cf_add_libs"
12757 { echo "$as_me:12757: WARNING: unable to find X11 library" >&5
12758 echo "$as_me: WARNING: unable to find X11 library" >&2;}
12761 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
12762 test -n "$verbose" && echo " found package ice" 1>&6
12764 echo "${as_me:-configure}:12764: testing found package ice ..." 1>&5
12766 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
12767 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
12768 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
12770 echo "${as_me:-configure}:12770: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12772 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
12774 echo "${as_me:-configure}:12774: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
12779 cf_new_extra_cppflags=
12781 for cf_add_cflags in $cf_pkgconfig_incs
12783 case $cf_fix_cppflags in
12785 case $cf_add_cflags in
12786 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12787 case $cf_add_cflags in
12789 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12791 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12792 && test -z "${cf_tst_cflags}" \
12793 && cf_fix_cppflags=yes
12795 if test $cf_fix_cppflags = yes ; then
12797 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12798 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12801 elif test "${cf_tst_cflags}" = "\"'" ; then
12803 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12804 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12810 case "$CPPFLAGS" in
12814 case $cf_add_cflags in
12816 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12818 CPPFLAGS=`echo "$CPPFLAGS" | \
12819 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12820 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12825 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12826 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12833 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12834 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12841 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12842 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12844 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12846 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12847 && test -z "${cf_tst_cflags}" \
12848 && cf_fix_cppflags=no
12853 if test -n "$cf_new_cflags" ; then
12855 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12856 CFLAGS="${CFLAGS}$cf_new_cflags"
12860 if test -n "$cf_new_cppflags" ; then
12862 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12863 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12867 if test -n "$cf_new_extra_cppflags" ; then
12869 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12870 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12874 cf_add_libs="$cf_pkgconfig_libs"
12875 # Filter out duplicates - this happens with badly-designed ".pc" files...
12876 for cf_add_1lib in $LIBS
12878 for cf_add_2lib in $cf_add_libs
12880 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12886 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12888 LIBS="$cf_add_libs"
12894 { echo "$as_me:12894: WARNING: unable to find ICE library" >&5
12895 echo "$as_me: WARNING: unable to find ICE library" >&2;}
12898 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
12899 test -n "$verbose" && echo " found package sm" 1>&6
12901 echo "${as_me:-configure}:12901: testing found package sm ..." 1>&5
12903 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
12904 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
12905 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
12907 echo "${as_me:-configure}:12907: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12909 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
12911 echo "${as_me:-configure}:12911: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
12916 cf_new_extra_cppflags=
12918 for cf_add_cflags in $cf_pkgconfig_incs
12920 case $cf_fix_cppflags in
12922 case $cf_add_cflags in
12923 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12924 case $cf_add_cflags in
12926 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12928 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12929 && test -z "${cf_tst_cflags}" \
12930 && cf_fix_cppflags=yes
12932 if test $cf_fix_cppflags = yes ; then
12934 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12935 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12938 elif test "${cf_tst_cflags}" = "\"'" ; then
12940 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12941 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12947 case "$CPPFLAGS" in
12951 case $cf_add_cflags in
12953 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12955 CPPFLAGS=`echo "$CPPFLAGS" | \
12956 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12957 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12962 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12963 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12970 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12971 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12978 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12979 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12981 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12983 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12984 && test -z "${cf_tst_cflags}" \
12985 && cf_fix_cppflags=no
12990 if test -n "$cf_new_cflags" ; then
12992 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12993 CFLAGS="${CFLAGS}$cf_new_cflags"
12997 if test -n "$cf_new_cppflags" ; then
12999 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13000 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13004 if test -n "$cf_new_extra_cppflags" ; then
13006 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13007 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13011 cf_add_libs="$cf_pkgconfig_libs"
13012 # Filter out duplicates - this happens with badly-designed ".pc" files...
13013 for cf_add_1lib in $LIBS
13015 for cf_add_2lib in $cf_add_libs
13017 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13023 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13025 LIBS="$cf_add_libs"
13031 { echo "$as_me:13031: WARNING: unable to find SM library" >&5
13032 echo "$as_me: WARNING: unable to find SM library" >&2;}
13035 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
13036 test -n "$verbose" && echo " found package xt" 1>&6
13038 echo "${as_me:-configure}:13038: testing found package xt ..." 1>&5
13040 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
13041 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
13042 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13044 echo "${as_me:-configure}:13044: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13046 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
13048 echo "${as_me:-configure}:13048: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13053 cf_new_extra_cppflags=
13055 for cf_add_cflags in $cf_pkgconfig_incs
13057 case $cf_fix_cppflags in
13059 case $cf_add_cflags in
13060 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13061 case $cf_add_cflags in
13063 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13065 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13066 && test -z "${cf_tst_cflags}" \
13067 && cf_fix_cppflags=yes
13069 if test $cf_fix_cppflags = yes ; then
13071 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13072 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13075 elif test "${cf_tst_cflags}" = "\"'" ; then
13077 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13078 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13084 case "$CPPFLAGS" in
13088 case $cf_add_cflags in
13090 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13092 CPPFLAGS=`echo "$CPPFLAGS" | \
13093 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13094 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13099 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13100 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13107 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13108 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13115 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13116 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13118 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13120 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13121 && test -z "${cf_tst_cflags}" \
13122 && cf_fix_cppflags=no
13127 if test -n "$cf_new_cflags" ; then
13129 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13130 CFLAGS="${CFLAGS}$cf_new_cflags"
13134 if test -n "$cf_new_cppflags" ; then
13136 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13137 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13141 if test -n "$cf_new_extra_cppflags" ; then
13143 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13144 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13148 cf_add_libs="$cf_pkgconfig_libs"
13149 # Filter out duplicates - this happens with badly-designed ".pc" files...
13150 for cf_add_1lib in $LIBS
13152 for cf_add_2lib in $cf_add_libs
13154 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13160 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13162 LIBS="$cf_add_libs"
13168 { echo "$as_me:13168: WARNING: unable to find Xt library" >&5
13169 echo "$as_me: WARNING: unable to find Xt library" >&2;}
13176 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
13177 test -n "$verbose" && echo " found package xt" 1>&6
13179 echo "${as_me:-configure}:13179: testing found package xt ..." 1>&5
13181 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
13182 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
13183 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13185 echo "${as_me:-configure}:13185: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13187 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
13189 echo "${as_me:-configure}:13189: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13194 cf_new_extra_cppflags=
13196 for cf_add_cflags in $cf_pkgconfig_incs
13198 case $cf_fix_cppflags in
13200 case $cf_add_cflags in
13201 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13202 case $cf_add_cflags in
13204 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13206 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13207 && test -z "${cf_tst_cflags}" \
13208 && cf_fix_cppflags=yes
13210 if test $cf_fix_cppflags = yes ; then
13212 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13213 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13216 elif test "${cf_tst_cflags}" = "\"'" ; then
13218 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13219 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13225 case "$CPPFLAGS" in
13229 case $cf_add_cflags in
13231 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13233 CPPFLAGS=`echo "$CPPFLAGS" | \
13234 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13235 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13240 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13241 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13248 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13249 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13256 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13257 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13259 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13261 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13262 && test -z "${cf_tst_cflags}" \
13263 && cf_fix_cppflags=no
13268 if test -n "$cf_new_cflags" ; then
13270 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13271 CFLAGS="${CFLAGS}$cf_new_cflags"
13275 if test -n "$cf_new_cppflags" ; then
13277 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13278 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13282 if test -n "$cf_new_extra_cppflags" ; then
13284 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13285 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13289 cf_add_libs="$cf_pkgconfig_libs"
13290 # Filter out duplicates - this happens with badly-designed ".pc" files...
13291 for cf_add_1lib in $LIBS
13293 for cf_add_2lib in $cf_add_libs
13295 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13301 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13303 LIBS="$cf_add_libs"
13309 # we have an "xt" package, but it may omit Xt's dependency on X11
13310 echo "$as_me:13310: checking for usable X dependency" >&5
13311 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
13312 if test "${cf_cv_xt_x11_compat+set}" = set; then
13313 echo $ECHO_N "(cached) $ECHO_C" >&6
13316 cat >conftest.$ac_ext <<_ACEOF
13317 #line 13317 "configure"
13318 #include "confdefs.h"
13320 #include <X11/Xlib.h>
13326 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
13327 int rc2 = XClearWindow((Display*) 0, (Window) 0);
13328 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
13329 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
13335 rm -f conftest.$ac_objext conftest$ac_exeext
13336 if { (eval echo "$as_me:13336: \"$ac_link\"") >&5
13337 (eval $ac_link) 2>&5
13339 echo "$as_me:13339: \$? = $ac_status" >&5
13340 (exit $ac_status); } &&
13341 { ac_try='test -s conftest$ac_exeext'
13342 { (eval echo "$as_me:13342: \"$ac_try\"") >&5
13343 (eval $ac_try) 2>&5
13345 echo "$as_me:13345: \$? = $ac_status" >&5
13346 (exit $ac_status); }; }; then
13347 cf_cv_xt_x11_compat=yes
13349 echo "$as_me: failed program was:" >&5
13350 cat conftest.$ac_ext >&5
13351 cf_cv_xt_x11_compat=no
13353 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13355 echo "$as_me:13355: result: $cf_cv_xt_x11_compat" >&5
13356 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
13357 if test "$cf_cv_xt_x11_compat" = no
13359 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
13361 echo "${as_me:-configure}:13361: testing work around broken X11 dependency ..." 1>&5
13363 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
13365 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
13366 test -n "$verbose" && echo " found package x11" 1>&6
13368 echo "${as_me:-configure}:13368: testing found package x11 ..." 1>&5
13370 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
13371 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
13372 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
13374 echo "${as_me:-configure}:13374: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13376 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
13378 echo "${as_me:-configure}:13378: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
13383 cf_new_extra_cppflags=
13385 for cf_add_cflags in $cf_pkgconfig_incs
13387 case $cf_fix_cppflags in
13389 case $cf_add_cflags in
13390 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13391 case $cf_add_cflags in
13393 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13395 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13396 && test -z "${cf_tst_cflags}" \
13397 && cf_fix_cppflags=yes
13399 if test $cf_fix_cppflags = yes ; then
13401 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13402 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13405 elif test "${cf_tst_cflags}" = "\"'" ; then
13407 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13408 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13414 case "$CPPFLAGS" in
13418 case $cf_add_cflags in
13420 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13422 CPPFLAGS=`echo "$CPPFLAGS" | \
13423 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13424 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13429 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13430 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13437 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13438 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13445 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13446 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13448 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13450 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13451 && test -z "${cf_tst_cflags}" \
13452 && cf_fix_cppflags=no
13457 if test -n "$cf_new_cflags" ; then
13459 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13460 CFLAGS="${CFLAGS}$cf_new_cflags"
13464 if test -n "$cf_new_cppflags" ; then
13466 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13467 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13471 if test -n "$cf_new_extra_cppflags" ; then
13473 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13474 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13478 cf_add_libs="$cf_pkgconfig_libs"
13479 # Filter out duplicates - this happens with badly-designed ".pc" files...
13480 for cf_add_1lib in $LIBS
13482 for cf_add_2lib in $cf_add_libs
13484 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13490 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13492 LIBS="$cf_add_libs"
13499 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13501 echo "${as_me:-configure}:13501: testing ...before $LIBS ..." 1>&5
13503 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
13504 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13506 echo "${as_me:-configure}:13506: testing ...after $LIBS ..." 1>&5
13514 echo "$as_me:13514: checking for usable X Toolkit package" >&5
13515 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
13516 if test "${cf_cv_xt_ice_compat+set}" = set; then
13517 echo $ECHO_N "(cached) $ECHO_C" >&6
13520 cat >conftest.$ac_ext <<_ACEOF
13521 #line 13521 "configure"
13522 #include "confdefs.h"
13524 #include <X11/Shell.h>
13529 int num = IceConnectionNumber(0)
13535 rm -f conftest.$ac_objext conftest$ac_exeext
13536 if { (eval echo "$as_me:13536: \"$ac_link\"") >&5
13537 (eval $ac_link) 2>&5
13539 echo "$as_me:13539: \$? = $ac_status" >&5
13540 (exit $ac_status); } &&
13541 { ac_try='test -s conftest$ac_exeext'
13542 { (eval echo "$as_me:13542: \"$ac_try\"") >&5
13543 (eval $ac_try) 2>&5
13545 echo "$as_me:13545: \$? = $ac_status" >&5
13546 (exit $ac_status); }; }; then
13547 cf_cv_xt_ice_compat=yes
13549 echo "$as_me: failed program was:" >&5
13550 cat conftest.$ac_ext >&5
13551 cf_cv_xt_ice_compat=no
13553 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13555 echo "$as_me:13555: result: $cf_cv_xt_ice_compat" >&5
13556 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
13558 if test "$cf_cv_xt_ice_compat" = no
13560 # workaround for broken ".pc" files used for X Toolkit.
13561 case "x$X_PRE_LIBS" in
13567 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
13569 echo "${as_me:-configure}:13569: testing work around broken ICE dependency ..." 1>&5
13571 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
13572 test -n "$verbose" && echo " found package ice" 1>&6
13574 echo "${as_me:-configure}:13574: testing found package ice ..." 1>&5
13576 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
13577 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
13578 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
13580 echo "${as_me:-configure}:13580: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13582 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
13584 echo "${as_me:-configure}:13584: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
13589 cf_new_extra_cppflags=
13591 for cf_add_cflags in $cf_pkgconfig_incs
13593 case $cf_fix_cppflags in
13595 case $cf_add_cflags in
13596 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13597 case $cf_add_cflags in
13599 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13601 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13602 && test -z "${cf_tst_cflags}" \
13603 && cf_fix_cppflags=yes
13605 if test $cf_fix_cppflags = yes ; then
13607 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13608 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13611 elif test "${cf_tst_cflags}" = "\"'" ; then
13613 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13614 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13620 case "$CPPFLAGS" in
13624 case $cf_add_cflags in
13626 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13628 CPPFLAGS=`echo "$CPPFLAGS" | \
13629 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13630 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13635 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13636 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13643 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13644 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13651 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13652 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13654 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13656 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13657 && test -z "${cf_tst_cflags}" \
13658 && cf_fix_cppflags=no
13663 if test -n "$cf_new_cflags" ; then
13665 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13666 CFLAGS="${CFLAGS}$cf_new_cflags"
13670 if test -n "$cf_new_cppflags" ; then
13672 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13673 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13677 if test -n "$cf_new_extra_cppflags" ; then
13679 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13680 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13684 cf_add_libs="$cf_pkgconfig_libs"
13685 # Filter out duplicates - this happens with badly-designed ".pc" files...
13686 for cf_add_1lib in $LIBS
13688 for cf_add_2lib in $cf_add_libs
13690 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13696 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13698 LIBS="$cf_add_libs"
13700 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
13701 test -n "$verbose" && echo " found package sm" 1>&6
13703 echo "${as_me:-configure}:13703: testing found package sm ..." 1>&5
13705 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
13706 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
13707 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
13709 echo "${as_me:-configure}:13709: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13711 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
13713 echo "${as_me:-configure}:13713: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
13718 cf_new_extra_cppflags=
13720 for cf_add_cflags in $cf_pkgconfig_incs
13722 case $cf_fix_cppflags in
13724 case $cf_add_cflags in
13725 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13726 case $cf_add_cflags in
13728 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13730 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13731 && test -z "${cf_tst_cflags}" \
13732 && cf_fix_cppflags=yes
13734 if test $cf_fix_cppflags = yes ; then
13736 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13737 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13740 elif test "${cf_tst_cflags}" = "\"'" ; then
13742 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13743 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13749 case "$CPPFLAGS" in
13753 case $cf_add_cflags in
13755 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13757 CPPFLAGS=`echo "$CPPFLAGS" | \
13758 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13759 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13764 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13765 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13772 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13773 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13780 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13781 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13783 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13785 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13786 && test -z "${cf_tst_cflags}" \
13787 && cf_fix_cppflags=no
13792 if test -n "$cf_new_cflags" ; then
13794 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13795 CFLAGS="${CFLAGS}$cf_new_cflags"
13799 if test -n "$cf_new_cppflags" ; then
13801 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13802 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13806 if test -n "$cf_new_extra_cppflags" ; then
13808 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13809 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13813 cf_add_libs="$cf_pkgconfig_libs"
13814 # Filter out duplicates - this happens with badly-designed ".pc" files...
13815 for cf_add_1lib in $LIBS
13817 for cf_add_2lib in $cf_add_libs
13819 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13825 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13827 LIBS="$cf_add_libs"
13840 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13842 echo "${as_me:-configure}:13842: testing ...before $LIBS ..." 1>&5
13844 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
13845 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13847 echo "${as_me:-configure}:13847: testing ...after $LIBS ..." 1>&5
13863 LDFLAGS="$X_LIBS $LDFLAGS"
13865 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
13867 echo "${as_me:-configure}:13867: testing checking additions to CFLAGS ..." 1>&5
13869 cf_check_cflags="$CFLAGS"
13870 cf_check_cppflags="$CPPFLAGS"
13875 cf_new_extra_cppflags=
13877 for cf_add_cflags in $X_CFLAGS
13879 case $cf_fix_cppflags in
13881 case $cf_add_cflags in
13882 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13883 case $cf_add_cflags in
13885 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13887 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13888 && test -z "${cf_tst_cflags}" \
13889 && cf_fix_cppflags=yes
13891 if test $cf_fix_cppflags = yes ; then
13893 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13894 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13897 elif test "${cf_tst_cflags}" = "\"'" ; then
13899 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13900 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13906 case "$CPPFLAGS" in
13910 case $cf_add_cflags in
13912 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13914 CPPFLAGS=`echo "$CPPFLAGS" | \
13915 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13916 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13921 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13922 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13929 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13930 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13937 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13938 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13940 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13942 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13943 && test -z "${cf_tst_cflags}" \
13944 && cf_fix_cppflags=no
13949 if test -n "$cf_new_cflags" ; then
13950 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13952 echo "${as_me:-configure}:13952: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13954 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13955 CFLAGS="${CFLAGS}$cf_new_cflags"
13959 if test -n "$cf_new_cppflags" ; then
13960 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13962 echo "${as_me:-configure}:13962: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13964 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13965 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13969 if test -n "$cf_new_extra_cppflags" ; then
13970 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13972 echo "${as_me:-configure}:13972: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13974 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13975 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13979 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
13980 cat >conftest.$ac_ext <<_ACEOF
13981 #line 13981 "configure"
13982 #include "confdefs.h"
13987 printf("Hello world");
13992 rm -f conftest.$ac_objext conftest$ac_exeext
13993 if { (eval echo "$as_me:13993: \"$ac_link\"") >&5
13994 (eval $ac_link) 2>&5
13996 echo "$as_me:13996: \$? = $ac_status" >&5
13997 (exit $ac_status); } &&
13998 { ac_try='test -s conftest$ac_exeext'
13999 { (eval echo "$as_me:13999: \"$ac_try\"") >&5
14000 (eval $ac_try) 2>&5
14002 echo "$as_me:14002: \$? = $ac_status" >&5
14003 (exit $ac_status); }; }; then
14006 echo "$as_me: failed program was:" >&5
14007 cat conftest.$ac_ext >&5
14008 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
14010 echo "${as_me:-configure}:14010: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
14012 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
14013 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
14015 echo "${as_me:-configure}:14015: testing but keeping change to \$CPPFLAGS ..." 1>&5
14018 CFLAGS="$cf_check_flags"
14020 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14023 echo "$as_me:14023: checking for XOpenDisplay" >&5
14024 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
14025 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
14026 echo $ECHO_N "(cached) $ECHO_C" >&6
14028 cat >conftest.$ac_ext <<_ACEOF
14029 #line 14029 "configure"
14030 #include "confdefs.h"
14031 /* System header to define __stub macros and hopefully few prototypes,
14032 which can conflict with char XOpenDisplay (); below. */
14033 #include <assert.h>
14034 /* Override any gcc2 internal prototype to avoid an error. */
14038 /* We use char because int might match the return type of a gcc2
14039 builtin and then its argument prototype would still apply. */
14040 char XOpenDisplay ();
14046 /* The GNU C library defines this for functions which it implements
14047 to always fail with ENOSYS. Some functions are actually named
14048 something starting with __ and the normal name is an alias. */
14049 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
14052 f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14059 rm -f conftest.$ac_objext conftest$ac_exeext
14060 if { (eval echo "$as_me:14060: \"$ac_link\"") >&5
14061 (eval $ac_link) 2>&5
14063 echo "$as_me:14063: \$? = $ac_status" >&5
14064 (exit $ac_status); } &&
14065 { ac_try='test -s conftest$ac_exeext'
14066 { (eval echo "$as_me:14066: \"$ac_try\"") >&5
14067 (eval $ac_try) 2>&5
14069 echo "$as_me:14069: \$? = $ac_status" >&5
14070 (exit $ac_status); }; }; then
14071 ac_cv_func_XOpenDisplay=yes
14073 echo "$as_me: failed program was:" >&5
14074 cat conftest.$ac_ext >&5
14075 ac_cv_func_XOpenDisplay=no
14077 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14079 echo "$as_me:14079: result: $ac_cv_func_XOpenDisplay" >&5
14080 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
14081 if test $ac_cv_func_XOpenDisplay = yes; then
14085 echo "$as_me:14085: checking for XOpenDisplay in -lX11" >&5
14086 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
14087 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
14088 echo $ECHO_N "(cached) $ECHO_C" >&6
14090 ac_check_lib_save_LIBS=$LIBS
14091 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
14092 cat >conftest.$ac_ext <<_ACEOF
14093 #line 14093 "configure"
14094 #include "confdefs.h"
14096 /* Override any gcc2 internal prototype to avoid an error. */
14100 /* We use char because int might match the return type of a gcc2
14101 builtin and then its argument prototype would still apply. */
14102 char XOpenDisplay ();
14111 rm -f conftest.$ac_objext conftest$ac_exeext
14112 if { (eval echo "$as_me:14112: \"$ac_link\"") >&5
14113 (eval $ac_link) 2>&5
14115 echo "$as_me:14115: \$? = $ac_status" >&5
14116 (exit $ac_status); } &&
14117 { ac_try='test -s conftest$ac_exeext'
14118 { (eval echo "$as_me:14118: \"$ac_try\"") >&5
14119 (eval $ac_try) 2>&5
14121 echo "$as_me:14121: \$? = $ac_status" >&5
14122 (exit $ac_status); }; }; then
14123 ac_cv_lib_X11_XOpenDisplay=yes
14125 echo "$as_me: failed program was:" >&5
14126 cat conftest.$ac_ext >&5
14127 ac_cv_lib_X11_XOpenDisplay=no
14129 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14130 LIBS=$ac_check_lib_save_LIBS
14132 echo "$as_me:14132: result: $ac_cv_lib_X11_XOpenDisplay" >&5
14133 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
14134 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
14136 cf_add_libs="-lX11"
14137 # Filter out duplicates - this happens with badly-designed ".pc" files...
14138 for cf_add_1lib in $LIBS
14140 for cf_add_2lib in $cf_add_libs
14142 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14148 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14150 LIBS="$cf_add_libs"
14156 echo "$as_me:14156: checking for XtAppInitialize" >&5
14157 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
14158 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
14159 echo $ECHO_N "(cached) $ECHO_C" >&6
14161 cat >conftest.$ac_ext <<_ACEOF
14162 #line 14162 "configure"
14163 #include "confdefs.h"
14164 /* System header to define __stub macros and hopefully few prototypes,
14165 which can conflict with char XtAppInitialize (); below. */
14166 #include <assert.h>
14167 /* Override any gcc2 internal prototype to avoid an error. */
14171 /* We use char because int might match the return type of a gcc2
14172 builtin and then its argument prototype would still apply. */
14173 char XtAppInitialize ();
14179 /* The GNU C library defines this for functions which it implements
14180 to always fail with ENOSYS. Some functions are actually named
14181 something starting with __ and the normal name is an alias. */
14182 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
14185 f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14192 rm -f conftest.$ac_objext conftest$ac_exeext
14193 if { (eval echo "$as_me:14193: \"$ac_link\"") >&5
14194 (eval $ac_link) 2>&5
14196 echo "$as_me:14196: \$? = $ac_status" >&5
14197 (exit $ac_status); } &&
14198 { ac_try='test -s conftest$ac_exeext'
14199 { (eval echo "$as_me:14199: \"$ac_try\"") >&5
14200 (eval $ac_try) 2>&5
14202 echo "$as_me:14202: \$? = $ac_status" >&5
14203 (exit $ac_status); }; }; then
14204 ac_cv_func_XtAppInitialize=yes
14206 echo "$as_me: failed program was:" >&5
14207 cat conftest.$ac_ext >&5
14208 ac_cv_func_XtAppInitialize=no
14210 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14212 echo "$as_me:14212: result: $ac_cv_func_XtAppInitialize" >&5
14213 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
14214 if test $ac_cv_func_XtAppInitialize = yes; then
14218 echo "$as_me:14218: checking for XtAppInitialize in -lXt" >&5
14219 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
14220 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
14221 echo $ECHO_N "(cached) $ECHO_C" >&6
14223 ac_check_lib_save_LIBS=$LIBS
14224 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
14225 cat >conftest.$ac_ext <<_ACEOF
14226 #line 14226 "configure"
14227 #include "confdefs.h"
14229 /* Override any gcc2 internal prototype to avoid an error. */
14233 /* We use char because int might match the return type of a gcc2
14234 builtin and then its argument prototype would still apply. */
14235 char XtAppInitialize ();
14239 XtAppInitialize ();
14244 rm -f conftest.$ac_objext conftest$ac_exeext
14245 if { (eval echo "$as_me:14245: \"$ac_link\"") >&5
14246 (eval $ac_link) 2>&5
14248 echo "$as_me:14248: \$? = $ac_status" >&5
14249 (exit $ac_status); } &&
14250 { ac_try='test -s conftest$ac_exeext'
14251 { (eval echo "$as_me:14251: \"$ac_try\"") >&5
14252 (eval $ac_try) 2>&5
14254 echo "$as_me:14254: \$? = $ac_status" >&5
14255 (exit $ac_status); }; }; then
14256 ac_cv_lib_Xt_XtAppInitialize=yes
14258 echo "$as_me: failed program was:" >&5
14259 cat conftest.$ac_ext >&5
14260 ac_cv_lib_Xt_XtAppInitialize=no
14262 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14263 LIBS=$ac_check_lib_save_LIBS
14265 echo "$as_me:14265: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
14266 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
14267 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
14269 cat >>confdefs.h <<\EOF
14270 #define HAVE_LIBXT 1
14274 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
14281 if test $cf_have_X_LIBS = no ; then
14282 { echo "$as_me:14282: WARNING: Unable to successfully link X Toolkit library (-lXt) with
14283 test program. You will have to check and add the proper libraries by hand
14285 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
14286 test program. You will have to check and add the proper libraries by hand
14287 to makefile." >&2;}
14290 cf_x_athena_root=$cf_x_athena
14293 for cf_path in default \
14294 /usr/contrib/X11R6 \
14295 /usr/contrib/X11R5 \
14299 if test -z "$cf_x_athena_inc" ; then
14300 cf_save="$CPPFLAGS"
14301 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
14302 if test $cf_path != default ; then
14303 CPPFLAGS="$cf_save"
14305 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14306 CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
14308 echo "$as_me:14308: checking for $cf_test in $cf_path" >&5
14309 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
14311 echo "$as_me:14311: checking for $cf_test" >&5
14312 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
14314 cat >conftest.$ac_ext <<_ACEOF
14315 #line 14315 "configure"
14316 #include "confdefs.h"
14318 #include <X11/Intrinsic.h>
14319 #include <$cf_test>
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
14342 echo "$as_me: failed program was:" >&5
14343 cat conftest.$ac_ext >&5
14346 rm -f conftest.$ac_objext conftest.$ac_ext
14347 echo "$as_me:14347: result: $cf_result" >&5
14348 echo "${ECHO_T}$cf_result" >&6
14349 if test "$cf_result" = yes ; then
14350 cf_x_athena_inc=$cf_path
14353 CPPFLAGS="$cf_save"
14358 if test -z "$cf_x_athena_inc" ; then
14359 { echo "$as_me:14359: WARNING: Unable to successfully find Athena header files with test program" >&5
14360 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
14361 elif test "$cf_x_athena_inc" != default ; then
14363 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14364 CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
14368 cf_x_athena_root=$cf_x_athena
14371 for cf_path in default \
14372 /usr/contrib/X11R6 \
14373 /usr/contrib/X11R5 \
14378 ${cf_x_athena_root} \
14379 ${cf_x_athena_root}7 \
14380 ${cf_x_athena_root}6
14383 "-l$cf_lib -lXmu" \
14384 "-l$cf_lib -lXpm -lXmu" \
14385 "-l${cf_lib}_s -lXmu_s"
14387 if test -z "$cf_x_athena_lib" ; then
14389 cf_test=XawSimpleMenuAddGlobalActions
14390 if test $cf_path != default ; then
14392 cf_add_libs="-L$cf_path/lib $cf_libs"
14393 # Filter out duplicates - this happens with badly-designed ".pc" files...
14394 for cf_add_1lib in $LIBS
14396 for cf_add_2lib in $cf_add_libs
14398 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14404 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14406 LIBS="$cf_add_libs"
14408 echo "$as_me:14408: checking for $cf_libs in $cf_path" >&5
14409 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
14412 cf_add_libs="$cf_libs"
14413 # Filter out duplicates - this happens with badly-designed ".pc" files...
14414 for cf_add_1lib in $LIBS
14416 for cf_add_2lib in $cf_add_libs
14418 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14424 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14426 LIBS="$cf_add_libs"
14428 echo "$as_me:14428: checking for $cf_test in $cf_libs" >&5
14429 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
14431 cat >conftest.$ac_ext <<_ACEOF
14432 #line 14432 "configure"
14433 #include "confdefs.h"
14435 #include <X11/Intrinsic.h>
14436 #include <X11/$cf_x_athena_root/SimpleMenu.h>
14442 $cf_test((XtAppContext) 0)
14447 rm -f conftest.$ac_objext conftest$ac_exeext
14448 if { (eval echo "$as_me:14448: \"$ac_link\"") >&5
14449 (eval $ac_link) 2>&5
14451 echo "$as_me:14451: \$? = $ac_status" >&5
14452 (exit $ac_status); } &&
14453 { ac_try='test -s conftest$ac_exeext'
14454 { (eval echo "$as_me:14454: \"$ac_try\"") >&5
14455 (eval $ac_try) 2>&5
14457 echo "$as_me:14457: \$? = $ac_status" >&5
14458 (exit $ac_status); }; }; then
14461 echo "$as_me: failed program was:" >&5
14462 cat conftest.$ac_ext >&5
14465 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14466 echo "$as_me:14466: result: $cf_result" >&5
14467 echo "${ECHO_T}$cf_result" >&6
14468 if test "$cf_result" = yes ; then
14469 cf_x_athena_lib="$cf_libs"
14475 test -n "$cf_x_athena_lib" && break
14479 if test -z "$cf_x_athena_lib" ; then
14480 { { echo "$as_me:14480: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
14481 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
14482 { (exit 1); exit 1; }; }
14485 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14487 cat >>confdefs.h <<EOF
14488 #define $cf_x_athena_LIBS 1
14493 if test -n "$ac_tool_prefix"; then
14494 for ac_prog in xcurses-config
14496 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
14497 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
14498 echo "$as_me:14498: checking for $ac_word" >&5
14499 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14500 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
14501 echo $ECHO_N "(cached) $ECHO_C" >&6
14503 if test -n "$XCURSES_CONFIG"; then
14504 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
14506 ac_save_IFS=$IFS; IFS=$ac_path_separator
14508 for ac_dir in $ac_dummy; do
14510 test -z "$ac_dir" && ac_dir=.
14511 $as_executable_p "$ac_dir/$ac_word" || continue
14512 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
14513 echo "$as_me:14513: found $ac_dir/$ac_word" >&5
14519 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
14520 if test -n "$XCURSES_CONFIG"; then
14521 echo "$as_me:14521: result: $XCURSES_CONFIG" >&5
14522 echo "${ECHO_T}$XCURSES_CONFIG" >&6
14524 echo "$as_me:14524: result: no" >&5
14525 echo "${ECHO_T}no" >&6
14528 test -n "$XCURSES_CONFIG" && break
14531 if test -z "$XCURSES_CONFIG"; then
14532 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
14533 for ac_prog in xcurses-config
14535 # Extract the first word of "$ac_prog", so it can be a program name with args.
14536 set dummy $ac_prog; ac_word=$2
14537 echo "$as_me:14537: checking for $ac_word" >&5
14538 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14539 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
14540 echo $ECHO_N "(cached) $ECHO_C" >&6
14542 if test -n "$ac_ct_XCURSES_CONFIG"; then
14543 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
14545 ac_save_IFS=$IFS; IFS=$ac_path_separator
14547 for ac_dir in $ac_dummy; do
14549 test -z "$ac_dir" && ac_dir=.
14550 $as_executable_p "$ac_dir/$ac_word" || continue
14551 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
14552 echo "$as_me:14552: found $ac_dir/$ac_word" >&5
14558 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
14559 if test -n "$ac_ct_XCURSES_CONFIG"; then
14560 echo "$as_me:14560: result: $ac_ct_XCURSES_CONFIG" >&5
14561 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
14563 echo "$as_me:14563: result: no" >&5
14564 echo "${ECHO_T}no" >&6
14567 test -n "$ac_ct_XCURSES_CONFIG" && break
14569 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
14571 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
14574 if test "$XCURSES_CONFIG" != none ; then
14579 cf_new_extra_cppflags=
14581 for cf_add_cflags in `$XCURSES_CONFIG --cflags`
14583 case $cf_fix_cppflags in
14585 case $cf_add_cflags in
14586 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14587 case $cf_add_cflags in
14589 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14591 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14592 && test -z "${cf_tst_cflags}" \
14593 && cf_fix_cppflags=yes
14595 if test $cf_fix_cppflags = yes ; then
14597 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14598 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14601 elif test "${cf_tst_cflags}" = "\"'" ; then
14603 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14604 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14610 case "$CPPFLAGS" in
14614 case $cf_add_cflags in
14616 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14618 CPPFLAGS=`echo "$CPPFLAGS" | \
14619 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14620 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14625 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14626 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14633 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14634 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14641 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14642 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14644 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14646 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14647 && test -z "${cf_tst_cflags}" \
14648 && cf_fix_cppflags=no
14653 if test -n "$cf_new_cflags" ; then
14655 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14656 CFLAGS="${CFLAGS}$cf_new_cflags"
14660 if test -n "$cf_new_cppflags" ; then
14662 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14663 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14667 if test -n "$cf_new_extra_cppflags" ; then
14669 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14670 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14674 cf_add_libs="`$XCURSES_CONFIG --libs`"
14675 # Filter out duplicates - this happens with badly-designed ".pc" files...
14676 for cf_add_1lib in $LIBS
14678 for cf_add_2lib in $cf_add_libs
14680 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14686 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14688 LIBS="$cf_add_libs"
14690 cf_cv_lib_XCurses=yes
14694 LDFLAGS="$LDFLAGS $X_LIBS"
14696 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
14698 echo "${as_me:-configure}:14698: testing checking additions to CFLAGS ..." 1>&5
14700 cf_check_cflags="$CFLAGS"
14701 cf_check_cppflags="$CPPFLAGS"
14706 cf_new_extra_cppflags=
14708 for cf_add_cflags in $X_CFLAGS
14710 case $cf_fix_cppflags in
14712 case $cf_add_cflags in
14713 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14714 case $cf_add_cflags in
14716 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14718 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14719 && test -z "${cf_tst_cflags}" \
14720 && cf_fix_cppflags=yes
14722 if test $cf_fix_cppflags = yes ; then
14724 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14725 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14728 elif test "${cf_tst_cflags}" = "\"'" ; then
14730 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14731 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14737 case "$CPPFLAGS" in
14741 case $cf_add_cflags in
14743 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14745 CPPFLAGS=`echo "$CPPFLAGS" | \
14746 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14747 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14752 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14753 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14760 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14761 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14768 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14769 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14771 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14773 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14774 && test -z "${cf_tst_cflags}" \
14775 && cf_fix_cppflags=no
14780 if test -n "$cf_new_cflags" ; then
14781 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
14783 echo "${as_me:-configure}:14783: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
14785 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14786 CFLAGS="${CFLAGS}$cf_new_cflags"
14790 if test -n "$cf_new_cppflags" ; then
14791 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
14793 echo "${as_me:-configure}:14793: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
14795 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14796 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14800 if test -n "$cf_new_extra_cppflags" ; then
14801 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
14803 echo "${as_me:-configure}:14803: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
14805 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14806 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14810 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
14811 cat >conftest.$ac_ext <<_ACEOF
14812 #line 14812 "configure"
14813 #include "confdefs.h"
14818 printf("Hello world");
14823 rm -f conftest.$ac_objext conftest$ac_exeext
14824 if { (eval echo "$as_me:14824: \"$ac_link\"") >&5
14825 (eval $ac_link) 2>&5
14827 echo "$as_me:14827: \$? = $ac_status" >&5
14828 (exit $ac_status); } &&
14829 { ac_try='test -s conftest$ac_exeext'
14830 { (eval echo "$as_me:14830: \"$ac_try\"") >&5
14831 (eval $ac_try) 2>&5
14833 echo "$as_me:14833: \$? = $ac_status" >&5
14834 (exit $ac_status); }; }; then
14837 echo "$as_me: failed program was:" >&5
14838 cat conftest.$ac_ext >&5
14839 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
14841 echo "${as_me:-configure}:14841: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
14843 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
14844 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
14846 echo "${as_me:-configure}:14846: testing but keeping change to \$CPPFLAGS ..." 1>&5
14849 CFLAGS="$cf_check_flags"
14851 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14854 echo "$as_me:14854: checking for XOpenDisplay in -lX11" >&5
14855 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
14856 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
14857 echo $ECHO_N "(cached) $ECHO_C" >&6
14859 ac_check_lib_save_LIBS=$LIBS
14860 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
14861 cat >conftest.$ac_ext <<_ACEOF
14862 #line 14862 "configure"
14863 #include "confdefs.h"
14865 /* Override any gcc2 internal prototype to avoid an error. */
14869 /* We use char because int might match the return type of a gcc2
14870 builtin and then its argument prototype would still apply. */
14871 char XOpenDisplay ();
14880 rm -f conftest.$ac_objext conftest$ac_exeext
14881 if { (eval echo "$as_me:14881: \"$ac_link\"") >&5
14882 (eval $ac_link) 2>&5
14884 echo "$as_me:14884: \$? = $ac_status" >&5
14885 (exit $ac_status); } &&
14886 { ac_try='test -s conftest$ac_exeext'
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
14892 ac_cv_lib_X11_XOpenDisplay=yes
14894 echo "$as_me: failed program was:" >&5
14895 cat conftest.$ac_ext >&5
14896 ac_cv_lib_X11_XOpenDisplay=no
14898 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14899 LIBS=$ac_check_lib_save_LIBS
14901 echo "$as_me:14901: result: $ac_cv_lib_X11_XOpenDisplay" >&5
14902 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
14903 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
14905 cf_add_libs="-lX11"
14906 # Filter out duplicates - this happens with badly-designed ".pc" files...
14907 for cf_add_1lib in $LIBS
14909 for cf_add_2lib in $cf_add_libs
14911 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14917 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14919 LIBS="$cf_add_libs"
14923 echo "$as_me:14923: checking for XCurses library" >&5
14924 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
14925 if test "${cf_cv_lib_XCurses+set}" = set; then
14926 echo $ECHO_N "(cached) $ECHO_C" >&6
14929 cf_add_libs="-lXCurses"
14930 # Filter out duplicates - this happens with badly-designed ".pc" files...
14931 for cf_add_1lib in $LIBS
14933 for cf_add_2lib in $cf_add_libs
14935 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14941 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14943 LIBS="$cf_add_libs"
14945 cat >conftest.$ac_ext <<_ACEOF
14946 #line 14946 "configure"
14947 #include "confdefs.h"
14949 #include <xcurses.h>
14950 char *XCursesProgramName = "test";
14960 rm -f conftest.$ac_objext conftest$ac_exeext
14961 if { (eval echo "$as_me:14961: \"$ac_link\"") >&5
14962 (eval $ac_link) 2>&5
14964 echo "$as_me:14964: \$? = $ac_status" >&5
14965 (exit $ac_status); } &&
14966 { ac_try='test -s conftest$ac_exeext'
14967 { (eval echo "$as_me:14967: \"$ac_try\"") >&5
14968 (eval $ac_try) 2>&5
14970 echo "$as_me:14970: \$? = $ac_status" >&5
14971 (exit $ac_status); }; }; then
14972 cf_cv_lib_XCurses=yes
14974 echo "$as_me: failed program was:" >&5
14975 cat conftest.$ac_ext >&5
14976 cf_cv_lib_XCurses=no
14978 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14981 echo "$as_me:14981: result: $cf_cv_lib_XCurses" >&5
14982 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
14986 if test $cf_cv_lib_XCurses = yes ; then
14988 cat >>confdefs.h <<\EOF
14992 cat >>confdefs.h <<\EOF
14996 echo "$as_me:14996: checking for xcurses.h" >&5
14997 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
14998 if test "${ac_cv_header_xcurses_h+set}" = set; then
14999 echo $ECHO_N "(cached) $ECHO_C" >&6
15001 cat >conftest.$ac_ext <<_ACEOF
15002 #line 15002 "configure"
15003 #include "confdefs.h"
15004 #include <xcurses.h>
15006 if { (eval echo "$as_me:15006: \"$ac_cpp conftest.$ac_ext\"") >&5
15007 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15009 egrep -v '^ *\+' conftest.er1 >conftest.err
15011 cat conftest.err >&5
15012 echo "$as_me:15012: \$? = $ac_status" >&5
15013 (exit $ac_status); } >/dev/null; then
15014 if test -s conftest.err; then
15015 ac_cpp_err=$ac_c_preproc_warn_flag
15022 if test -z "$ac_cpp_err"; then
15023 ac_cv_header_xcurses_h=yes
15025 echo "$as_me: failed program was:" >&5
15026 cat conftest.$ac_ext >&5
15027 ac_cv_header_xcurses_h=no
15029 rm -f conftest.err conftest.$ac_ext
15031 echo "$as_me:15031: result: $ac_cv_header_xcurses_h" >&5
15032 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
15033 if test $ac_cv_header_xcurses_h = yes; then
15035 cat >>confdefs.h <<\EOF
15036 #define HAVE_XCURSES 1
15042 { { echo "$as_me:15042: error: Cannot link with XCurses" >&5
15043 echo "$as_me: error: Cannot link with XCurses" >&2;}
15044 { (exit 1); exit 1; }; }
15049 { { echo "$as_me:15049: error: unexpected screen-value: $cf_cv_screen" >&5
15050 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
15051 { (exit 1); exit 1; }; }
15055 : ${cf_nculib_root:=$cf_cv_screen}
15056 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
15057 echo "$as_me:15057: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
15058 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
15059 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15060 echo $ECHO_N "(cached) $ECHO_C" >&6
15062 ac_check_lib_save_LIBS=$LIBS
15063 LIBS="-l$cf_nculib_root $LIBS"
15064 cat >conftest.$ac_ext <<_ACEOF
15065 #line 15065 "configure"
15066 #include "confdefs.h"
15068 /* Override any gcc2 internal prototype to avoid an error. */
15072 /* We use char because int might match the return type of a gcc2
15073 builtin and then its argument prototype would still apply. */
15074 char _nc_init_pthreads ();
15078 _nc_init_pthreads ();
15083 rm -f conftest.$ac_objext conftest$ac_exeext
15084 if { (eval echo "$as_me:15084: \"$ac_link\"") >&5
15085 (eval $ac_link) 2>&5
15087 echo "$as_me:15087: \$? = $ac_status" >&5
15088 (exit $ac_status); } &&
15089 { ac_try='test -s conftest$ac_exeext'
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
15095 eval "$as_ac_Lib=yes"
15097 echo "$as_me: failed program was:" >&5
15098 cat conftest.$ac_ext >&5
15099 eval "$as_ac_Lib=no"
15101 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15102 LIBS=$ac_check_lib_save_LIBS
15104 echo "$as_me:15104: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15105 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15106 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15107 cf_cv_ncurses_pthreads=yes
15109 cf_cv_ncurses_pthreads=no
15112 if test "$cf_cv_ncurses_pthreads" = yes
15115 cf_add_libs="-lpthread"
15116 # Filter out duplicates - this happens with badly-designed ".pc" files...
15117 for cf_add_1lib in $LIBS
15119 for cf_add_2lib in $cf_add_libs
15121 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15127 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15129 LIBS="$cf_add_libs"
15133 case $cf_cv_screen in
15135 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
15139 echo "$as_me:15139: checking for X11 rgb file" >&5
15140 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
15142 # Check whether --with-x11-rgb or --without-x11-rgb was given.
15143 if test "${with_x11_rgb+set}" = set; then
15144 withval="$with_x11_rgb"
15150 if test "x$RGB_PATH" = xauto
15152 RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
15154 /opt/local/share/X11/rgb.txt \
15155 /opt/X11/share/X11/rgb.txt \
15156 /usr/share/X11/rgb.txt \
15157 /usr/X11/share/X11/rgb.txt \
15158 /usr/X11/lib/X11/rgb.txt \
15159 /usr/lib/X11/rgb.txt \
15161 /usr/pkg/lib/X11/rgb.txt \
15162 /usr/X11R7/lib/X11/rgb.txt \
15163 /usr/X11R6/lib/X11/rgb.txt \
15164 /usr/X11R5/lib/X11/rgb.txt \
15165 /usr/X11R4/lib/X11/rgb.txt \
15166 /usr/local/lib/X11/rgb.txt \
15167 /usr/local/share/X11/rgb.txt \
15168 /usr/lib64/X11/rgb.txt
15170 if test -f "$cf_path" ; then
15171 RGB_PATH="$cf_path"
15178 if test "x$prefix" != xNONE; then
15179 cf_path_syntax="$prefix"
15181 cf_path_syntax="$ac_default_prefix"
15184 case ".$cf_path" in
15185 (.\$\(*\)*|.\'*\'*)
15189 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
15191 (.\${*prefix}*|.\${*dir}*)
15192 eval cf_path="$cf_path"
15193 case ".$cf_path" in
15195 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
15200 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
15203 { { echo "$as_me:15203: error: expected a pathname, not \"$cf_path\"" >&5
15204 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
15205 { (exit 1); exit 1; }; }
15211 echo "$as_me:15211: result: $RGB_PATH" >&5
15212 echo "${ECHO_T}$RGB_PATH" >&6
15214 cat >>confdefs.h <<EOF
15215 #define RGB_PATH "$cf_path"
15219 if test "$RGB_PATH" = no
15226 case $cf_cv_screen in
15228 cf_default_panel=no
15231 cf_default_tinfo=no
15233 (xcurses|bsdcurses)
15234 cf_default_panel=no
15237 cf_default_tinfo=yes
15240 cf_default_panel=yes
15241 cf_default_form=yes
15242 cf_default_menu=yes
15243 cf_default_tinfo=yes
15244 case $cf_cv_screen in
15246 cf_curses_headers="nc_alloc.h nomacros.h term_entry.h"
15252 echo "$as_me:15252: checking if you want to check for panel functions" >&5
15253 echo $ECHO_N "checking if you want to check for panel functions... $ECHO_C" >&6
15255 # Check whether --enable-panel or --disable-panel was given.
15256 if test "${enable_panel+set}" = set; then
15257 enableval="$enable_panel"
15258 test "$enableval" != no && enableval=yes
15259 if test "$enableval" != "yes" ; then
15262 cf_enable_panel=$cf_default_panel
15266 cf_enable_panel=$cf_default_panel
15269 echo "$as_me:15269: result: $cf_enable_panel" >&5
15270 echo "${ECHO_T}$cf_enable_panel" >&6
15271 if test $cf_enable_panel = yes
15274 cf_have_curses_lib=no
15276 : ${NCURSES_CONFIG_PKG:=none}
15277 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
15279 elif test "x${PKG_CONFIG:=none}" != xnone; then
15280 echo "$as_me:15280: checking pkg-config for panel$cf_cv_libtype" >&5
15281 echo $ECHO_N "checking pkg-config for panel$cf_cv_libtype... $ECHO_C" >&6
15282 if "$PKG_CONFIG" --exists panel$cf_cv_libtype ; then
15283 echo "$as_me:15283: result: yes" >&5
15284 echo "${ECHO_T}yes" >&6
15286 echo "$as_me:15286: checking if the panel$cf_cv_libtype package files work" >&5
15287 echo $ECHO_N "checking if the panel$cf_cv_libtype package files work... $ECHO_C" >&6
15289 cf_save_CPPFLAGS="$CPPFLAGS"
15290 cf_save_LIBS="$LIBS"
15295 cf_new_extra_cppflags=
15297 for cf_add_cflags in `$PKG_CONFIG --cflags panel$cf_cv_libtype`
15299 case $cf_fix_cppflags in
15301 case $cf_add_cflags in
15302 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15303 case $cf_add_cflags in
15305 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15307 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15308 && test -z "${cf_tst_cflags}" \
15309 && cf_fix_cppflags=yes
15311 if test $cf_fix_cppflags = yes ; then
15313 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15314 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15317 elif test "${cf_tst_cflags}" = "\"'" ; then
15319 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15320 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15326 case "$CPPFLAGS" in
15330 case $cf_add_cflags in
15332 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15334 CPPFLAGS=`echo "$CPPFLAGS" | \
15335 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15336 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15341 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15342 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15349 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15350 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15357 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15358 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15360 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15362 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15363 && test -z "${cf_tst_cflags}" \
15364 && cf_fix_cppflags=no
15369 if test -n "$cf_new_cflags" ; then
15371 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15372 CFLAGS="${CFLAGS}$cf_new_cflags"
15376 if test -n "$cf_new_cppflags" ; then
15378 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15379 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15383 if test -n "$cf_new_extra_cppflags" ; then
15385 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15386 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15390 cf_add_libs="`$PKG_CONFIG --libs panel$cf_cv_libtype`"
15391 # Filter out duplicates - this happens with badly-designed ".pc" files...
15392 for cf_add_1lib in $LIBS
15394 for cf_add_2lib in $cf_add_libs
15396 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15402 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15404 LIBS="$cf_add_libs"
15406 cat >conftest.$ac_ext <<_ACEOF
15407 #line 15407 "configure"
15408 #include "confdefs.h"
15413 (void) new_panel ( 0 );
15418 rm -f conftest.$ac_objext conftest$ac_exeext
15419 if { (eval echo "$as_me:15419: \"$ac_link\"") >&5
15420 (eval $ac_link) 2>&5
15422 echo "$as_me:15422: \$? = $ac_status" >&5
15423 (exit $ac_status); } &&
15424 { ac_try='test -s conftest$ac_exeext'
15425 { (eval echo "$as_me:15425: \"$ac_try\"") >&5
15426 (eval $ac_try) 2>&5
15428 echo "$as_me:15428: \$? = $ac_status" >&5
15429 (exit $ac_status); }; }; then
15430 if test "$cross_compiling" = yes; then
15431 cf_have_curses_lib=maybe
15433 cat >conftest.$ac_ext <<_ACEOF
15434 #line 15434 "configure"
15435 #include "confdefs.h"
15438 { (void) new_panel ( 0 ); return 0; }
15440 rm -f conftest$ac_exeext
15441 if { (eval echo "$as_me:15441: \"$ac_link\"") >&5
15442 (eval $ac_link) 2>&5
15444 echo "$as_me:15444: \$? = $ac_status" >&5
15445 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15446 { (eval echo "$as_me:15446: \"$ac_try\"") >&5
15447 (eval $ac_try) 2>&5
15449 echo "$as_me:15449: \$? = $ac_status" >&5
15450 (exit $ac_status); }; }; then
15451 cf_have_curses_lib=yes
15453 echo "$as_me: program exited with status $ac_status" >&5
15454 echo "$as_me: failed program was:" >&5
15455 cat conftest.$ac_ext >&5
15456 cf_have_curses_lib=no
15458 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15461 echo "$as_me: failed program was:" >&5
15462 cat conftest.$ac_ext >&5
15463 cf_have_curses_lib=no
15465 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15466 echo "$as_me:15466: result: $cf_have_curses_lib" >&5
15467 echo "${ECHO_T}$cf_have_curses_lib" >&6
15468 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
15469 if test "$cf_have_curses_lib" != "yes"
15471 CPPFLAGS="$cf_save_CPPFLAGS"
15472 LIBS="$cf_save_LIBS"
15475 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15477 cat >>confdefs.h <<EOF
15478 #define $cf_upper 1
15484 if test "$cf_have_curses_lib" = no; then
15485 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
15486 echo "$as_me:15486: checking for new_panel in -lpanel$cf_cv_libtype" >&5
15487 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
15488 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15489 echo $ECHO_N "(cached) $ECHO_C" >&6
15491 ac_check_lib_save_LIBS=$LIBS
15492 LIBS="-lpanel$cf_cv_libtype $LIBS"
15493 cat >conftest.$ac_ext <<_ACEOF
15494 #line 15494 "configure"
15495 #include "confdefs.h"
15497 /* Override any gcc2 internal prototype to avoid an error. */
15501 /* We use char because int might match the return type of a gcc2
15502 builtin and then its argument prototype would still apply. */
15512 rm -f conftest.$ac_objext conftest$ac_exeext
15513 if { (eval echo "$as_me:15513: \"$ac_link\"") >&5
15514 (eval $ac_link) 2>&5
15516 echo "$as_me:15516: \$? = $ac_status" >&5
15517 (exit $ac_status); } &&
15518 { ac_try='test -s conftest$ac_exeext'
15519 { (eval echo "$as_me:15519: \"$ac_try\"") >&5
15520 (eval $ac_try) 2>&5
15522 echo "$as_me:15522: \$? = $ac_status" >&5
15523 (exit $ac_status); }; }; then
15524 eval "$as_ac_Lib=yes"
15526 echo "$as_me: failed program was:" >&5
15527 cat conftest.$ac_ext >&5
15528 eval "$as_ac_Lib=no"
15530 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15531 LIBS=$ac_check_lib_save_LIBS
15533 echo "$as_me:15533: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15534 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15535 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15537 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15539 cf_add_libs="-lpanel$cf_cv_libtype"
15540 # Filter out duplicates - this happens with badly-designed ".pc" files...
15541 for cf_add_1lib in $LIBS
15543 for cf_add_2lib in $cf_add_libs
15545 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15551 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15553 LIBS="$cf_add_libs"
15555 cat >>confdefs.h <<EOF
15556 #define $cf_upper 1
15563 cf_curses_headers="$cf_curses_headers panel.h"
15566 echo "$as_me:15566: checking if you want to check for menu functions" >&5
15567 echo $ECHO_N "checking if you want to check for menu functions... $ECHO_C" >&6
15569 # Check whether --enable-menu or --disable-menu was given.
15570 if test "${enable_menu+set}" = set; then
15571 enableval="$enable_menu"
15572 test "$enableval" != no && enableval=yes
15573 if test "$enableval" != "yes" ; then
15576 cf_enable_menu=$cf_default_menu
15580 cf_enable_menu=$cf_default_menu
15583 echo "$as_me:15583: result: $cf_enable_menu" >&5
15584 echo "${ECHO_T}$cf_enable_menu" >&6
15585 if test $cf_enable_menu = yes
15587 case $cf_cv_screen in
15592 echo "$as_me:15592: checking for NetBSD menu.h" >&5
15593 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
15594 if test "${cf_cv_netbsd_menu_h+set}" = set; then
15595 echo $ECHO_N "(cached) $ECHO_C" >&6
15598 cat >conftest.$ac_ext <<_ACEOF
15599 #line 15599 "configure"
15600 #include "confdefs.h"
15602 #include <${cf_cv_ncurses_header:-curses.h}>
15610 int y = menu->max_item_width;
15616 rm -f conftest.$ac_objext
15617 if { (eval echo "$as_me:15617: \"$ac_compile\"") >&5
15618 (eval $ac_compile) 2>&5
15620 echo "$as_me:15620: \$? = $ac_status" >&5
15621 (exit $ac_status); } &&
15622 { ac_try='test -s conftest.$ac_objext'
15623 { (eval echo "$as_me:15623: \"$ac_try\"") >&5
15624 (eval $ac_try) 2>&5
15626 echo "$as_me:15626: \$? = $ac_status" >&5
15627 (exit $ac_status); }; }; then
15628 cf_cv_netbsd_menu_h=yes
15631 echo "$as_me: failed program was:" >&5
15632 cat conftest.$ac_ext >&5
15633 cf_cv_netbsd_menu_h=no
15635 rm -f conftest.$ac_objext conftest.$ac_ext
15638 echo "$as_me:15638: result: $cf_cv_netbsd_menu_h" >&5
15639 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
15641 test "$cf_cv_netbsd_menu_h" = yes &&
15642 cat >>confdefs.h <<\EOF
15643 #define HAVE_NETBSD_MENU_H 1
15649 cf_have_curses_lib=no
15651 : ${NCURSES_CONFIG_PKG:=none}
15652 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
15654 elif test "x${PKG_CONFIG:=none}" != xnone; then
15655 echo "$as_me:15655: checking pkg-config for menu$cf_cv_libtype" >&5
15656 echo $ECHO_N "checking pkg-config for menu$cf_cv_libtype... $ECHO_C" >&6
15657 if "$PKG_CONFIG" --exists menu$cf_cv_libtype ; then
15658 echo "$as_me:15658: result: yes" >&5
15659 echo "${ECHO_T}yes" >&6
15661 echo "$as_me:15661: checking if the menu$cf_cv_libtype package files work" >&5
15662 echo $ECHO_N "checking if the menu$cf_cv_libtype package files work... $ECHO_C" >&6
15664 cf_save_CPPFLAGS="$CPPFLAGS"
15665 cf_save_LIBS="$LIBS"
15670 cf_new_extra_cppflags=
15672 for cf_add_cflags in `$PKG_CONFIG --cflags menu$cf_cv_libtype`
15674 case $cf_fix_cppflags in
15676 case $cf_add_cflags in
15677 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15678 case $cf_add_cflags in
15680 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15682 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15683 && test -z "${cf_tst_cflags}" \
15684 && cf_fix_cppflags=yes
15686 if test $cf_fix_cppflags = yes ; then
15688 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15689 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15692 elif test "${cf_tst_cflags}" = "\"'" ; then
15694 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15695 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15701 case "$CPPFLAGS" in
15705 case $cf_add_cflags in
15707 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15709 CPPFLAGS=`echo "$CPPFLAGS" | \
15710 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15711 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15716 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15717 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15724 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15725 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15732 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15733 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15735 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15737 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15738 && test -z "${cf_tst_cflags}" \
15739 && cf_fix_cppflags=no
15744 if test -n "$cf_new_cflags" ; then
15746 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15747 CFLAGS="${CFLAGS}$cf_new_cflags"
15751 if test -n "$cf_new_cppflags" ; then
15753 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15754 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15758 if test -n "$cf_new_extra_cppflags" ; then
15760 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15761 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15765 cf_add_libs="`$PKG_CONFIG --libs menu$cf_cv_libtype`"
15766 # Filter out duplicates - this happens with badly-designed ".pc" files...
15767 for cf_add_1lib in $LIBS
15769 for cf_add_2lib in $cf_add_libs
15771 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15777 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15779 LIBS="$cf_add_libs"
15781 cat >conftest.$ac_ext <<_ACEOF
15782 #line 15782 "configure"
15783 #include "confdefs.h"
15788 (void) menu_driver ( 0,0 );
15793 rm -f conftest.$ac_objext conftest$ac_exeext
15794 if { (eval echo "$as_me:15794: \"$ac_link\"") >&5
15795 (eval $ac_link) 2>&5
15797 echo "$as_me:15797: \$? = $ac_status" >&5
15798 (exit $ac_status); } &&
15799 { ac_try='test -s conftest$ac_exeext'
15800 { (eval echo "$as_me:15800: \"$ac_try\"") >&5
15801 (eval $ac_try) 2>&5
15803 echo "$as_me:15803: \$? = $ac_status" >&5
15804 (exit $ac_status); }; }; then
15805 if test "$cross_compiling" = yes; then
15806 cf_have_curses_lib=maybe
15808 cat >conftest.$ac_ext <<_ACEOF
15809 #line 15809 "configure"
15810 #include "confdefs.h"
15813 { (void) menu_driver ( 0,0 ); return 0; }
15815 rm -f conftest$ac_exeext
15816 if { (eval echo "$as_me:15816: \"$ac_link\"") >&5
15817 (eval $ac_link) 2>&5
15819 echo "$as_me:15819: \$? = $ac_status" >&5
15820 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15821 { (eval echo "$as_me:15821: \"$ac_try\"") >&5
15822 (eval $ac_try) 2>&5
15824 echo "$as_me:15824: \$? = $ac_status" >&5
15825 (exit $ac_status); }; }; then
15826 cf_have_curses_lib=yes
15828 echo "$as_me: program exited with status $ac_status" >&5
15829 echo "$as_me: failed program was:" >&5
15830 cat conftest.$ac_ext >&5
15831 cf_have_curses_lib=no
15833 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15836 echo "$as_me: failed program was:" >&5
15837 cat conftest.$ac_ext >&5
15838 cf_have_curses_lib=no
15840 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15841 echo "$as_me:15841: result: $cf_have_curses_lib" >&5
15842 echo "${ECHO_T}$cf_have_curses_lib" >&6
15843 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
15844 if test "$cf_have_curses_lib" != "yes"
15846 CPPFLAGS="$cf_save_CPPFLAGS"
15847 LIBS="$cf_save_LIBS"
15850 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15852 cat >>confdefs.h <<EOF
15853 #define $cf_upper 1
15859 if test "$cf_have_curses_lib" = no; then
15860 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
15861 echo "$as_me:15861: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
15862 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
15863 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15864 echo $ECHO_N "(cached) $ECHO_C" >&6
15866 ac_check_lib_save_LIBS=$LIBS
15867 LIBS="-lmenu$cf_cv_libtype $LIBS"
15868 cat >conftest.$ac_ext <<_ACEOF
15869 #line 15869 "configure"
15870 #include "confdefs.h"
15872 /* Override any gcc2 internal prototype to avoid an error. */
15876 /* We use char because int might match the return type of a gcc2
15877 builtin and then its argument prototype would still apply. */
15878 char menu_driver ();
15887 rm -f conftest.$ac_objext conftest$ac_exeext
15888 if { (eval echo "$as_me:15888: \"$ac_link\"") >&5
15889 (eval $ac_link) 2>&5
15891 echo "$as_me:15891: \$? = $ac_status" >&5
15892 (exit $ac_status); } &&
15893 { ac_try='test -s conftest$ac_exeext'
15894 { (eval echo "$as_me:15894: \"$ac_try\"") >&5
15895 (eval $ac_try) 2>&5
15897 echo "$as_me:15897: \$? = $ac_status" >&5
15898 (exit $ac_status); }; }; then
15899 eval "$as_ac_Lib=yes"
15901 echo "$as_me: failed program was:" >&5
15902 cat conftest.$ac_ext >&5
15903 eval "$as_ac_Lib=no"
15905 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15906 LIBS=$ac_check_lib_save_LIBS
15908 echo "$as_me:15908: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15909 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15910 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15912 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15914 cf_add_libs="-lmenu$cf_cv_libtype"
15915 # Filter out duplicates - this happens with badly-designed ".pc" files...
15916 for cf_add_1lib in $LIBS
15918 for cf_add_2lib in $cf_add_libs
15920 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15926 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15928 LIBS="$cf_add_libs"
15930 cat >>confdefs.h <<EOF
15931 #define $cf_upper 1
15938 cf_curses_headers="$cf_curses_headers menu.h"
15941 echo "$as_me:15941: checking if you want to check for form functions" >&5
15942 echo $ECHO_N "checking if you want to check for form functions... $ECHO_C" >&6
15944 # Check whether --enable-form or --disable-form was given.
15945 if test "${enable_form+set}" = set; then
15946 enableval="$enable_form"
15947 test "$enableval" != no && enableval=yes
15948 if test "$enableval" != "yes" ; then
15951 cf_enable_form=$cf_default_form
15955 cf_enable_form=$cf_default_form
15958 echo "$as_me:15958: result: $cf_enable_form" >&5
15959 echo "${ECHO_T}$cf_enable_form" >&6
15960 if test $cf_enable_form = yes
15962 case $cf_cv_screen in
15967 echo "$as_me:15967: checking for NetBSD form.h" >&5
15968 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
15969 if test "${cf_cv_netbsd_form_h+set}" = set; then
15970 echo $ECHO_N "(cached) $ECHO_C" >&6
15973 cat >conftest.$ac_ext <<_ACEOF
15974 #line 15974 "configure"
15975 #include "confdefs.h"
15977 #include <${cf_cv_ncurses_header:-curses.h}>
15985 int y = current_field(form)->cursor_ypos;
15986 int x = current_field(form)->cursor_xpos;
15992 rm -f conftest.$ac_objext
15993 if { (eval echo "$as_me:15993: \"$ac_compile\"") >&5
15994 (eval $ac_compile) 2>&5
15996 echo "$as_me:15996: \$? = $ac_status" >&5
15997 (exit $ac_status); } &&
15998 { ac_try='test -s conftest.$ac_objext'
15999 { (eval echo "$as_me:15999: \"$ac_try\"") >&5
16000 (eval $ac_try) 2>&5
16002 echo "$as_me:16002: \$? = $ac_status" >&5
16003 (exit $ac_status); }; }; then
16004 cf_cv_netbsd_form_h=yes
16007 echo "$as_me: failed program was:" >&5
16008 cat conftest.$ac_ext >&5
16009 cf_cv_netbsd_form_h=no
16011 rm -f conftest.$ac_objext conftest.$ac_ext
16014 echo "$as_me:16014: result: $cf_cv_netbsd_form_h" >&5
16015 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
16017 test "$cf_cv_netbsd_form_h" = yes &&
16018 cat >>confdefs.h <<\EOF
16019 #define HAVE_NETBSD_FORM_H 1
16025 cf_have_curses_lib=no
16027 : ${NCURSES_CONFIG_PKG:=none}
16028 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16030 elif test "x${PKG_CONFIG:=none}" != xnone; then
16031 echo "$as_me:16031: checking pkg-config for form$cf_cv_libtype" >&5
16032 echo $ECHO_N "checking pkg-config for form$cf_cv_libtype... $ECHO_C" >&6
16033 if "$PKG_CONFIG" --exists form$cf_cv_libtype ; then
16034 echo "$as_me:16034: result: yes" >&5
16035 echo "${ECHO_T}yes" >&6
16037 echo "$as_me:16037: checking if the form$cf_cv_libtype package files work" >&5
16038 echo $ECHO_N "checking if the form$cf_cv_libtype package files work... $ECHO_C" >&6
16040 cf_save_CPPFLAGS="$CPPFLAGS"
16041 cf_save_LIBS="$LIBS"
16046 cf_new_extra_cppflags=
16048 for cf_add_cflags in `$PKG_CONFIG --cflags form$cf_cv_libtype`
16050 case $cf_fix_cppflags in
16052 case $cf_add_cflags in
16053 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16054 case $cf_add_cflags in
16056 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16058 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16059 && test -z "${cf_tst_cflags}" \
16060 && cf_fix_cppflags=yes
16062 if test $cf_fix_cppflags = yes ; then
16064 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16065 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16068 elif test "${cf_tst_cflags}" = "\"'" ; then
16070 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16071 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16077 case "$CPPFLAGS" in
16081 case $cf_add_cflags in
16083 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16085 CPPFLAGS=`echo "$CPPFLAGS" | \
16086 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16087 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16092 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16093 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16100 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16101 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16108 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16109 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16111 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16113 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16114 && test -z "${cf_tst_cflags}" \
16115 && cf_fix_cppflags=no
16120 if test -n "$cf_new_cflags" ; then
16122 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16123 CFLAGS="${CFLAGS}$cf_new_cflags"
16127 if test -n "$cf_new_cppflags" ; then
16129 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16130 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16134 if test -n "$cf_new_extra_cppflags" ; then
16136 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16137 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16141 cf_add_libs="`$PKG_CONFIG --libs form$cf_cv_libtype`"
16142 # Filter out duplicates - this happens with badly-designed ".pc" files...
16143 for cf_add_1lib in $LIBS
16145 for cf_add_2lib in $cf_add_libs
16147 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16153 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16155 LIBS="$cf_add_libs"
16157 cat >conftest.$ac_ext <<_ACEOF
16158 #line 16158 "configure"
16159 #include "confdefs.h"
16164 (void) form_driver ( 0,0 );
16169 rm -f conftest.$ac_objext conftest$ac_exeext
16170 if { (eval echo "$as_me:16170: \"$ac_link\"") >&5
16171 (eval $ac_link) 2>&5
16173 echo "$as_me:16173: \$? = $ac_status" >&5
16174 (exit $ac_status); } &&
16175 { ac_try='test -s conftest$ac_exeext'
16176 { (eval echo "$as_me:16176: \"$ac_try\"") >&5
16177 (eval $ac_try) 2>&5
16179 echo "$as_me:16179: \$? = $ac_status" >&5
16180 (exit $ac_status); }; }; then
16181 if test "$cross_compiling" = yes; then
16182 cf_have_curses_lib=maybe
16184 cat >conftest.$ac_ext <<_ACEOF
16185 #line 16185 "configure"
16186 #include "confdefs.h"
16189 { (void) form_driver ( 0,0 ); return 0; }
16191 rm -f conftest$ac_exeext
16192 if { (eval echo "$as_me:16192: \"$ac_link\"") >&5
16193 (eval $ac_link) 2>&5
16195 echo "$as_me:16195: \$? = $ac_status" >&5
16196 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16197 { (eval echo "$as_me:16197: \"$ac_try\"") >&5
16198 (eval $ac_try) 2>&5
16200 echo "$as_me:16200: \$? = $ac_status" >&5
16201 (exit $ac_status); }; }; then
16202 cf_have_curses_lib=yes
16204 echo "$as_me: program exited with status $ac_status" >&5
16205 echo "$as_me: failed program was:" >&5
16206 cat conftest.$ac_ext >&5
16207 cf_have_curses_lib=no
16209 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16212 echo "$as_me: failed program was:" >&5
16213 cat conftest.$ac_ext >&5
16214 cf_have_curses_lib=no
16216 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16217 echo "$as_me:16217: result: $cf_have_curses_lib" >&5
16218 echo "${ECHO_T}$cf_have_curses_lib" >&6
16219 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
16220 if test "$cf_have_curses_lib" != "yes"
16222 CPPFLAGS="$cf_save_CPPFLAGS"
16223 LIBS="$cf_save_LIBS"
16226 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16228 cat >>confdefs.h <<EOF
16229 #define $cf_upper 1
16235 if test "$cf_have_curses_lib" = no; then
16236 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
16237 echo "$as_me:16237: checking for form_driver in -lform$cf_cv_libtype" >&5
16238 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
16239 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16240 echo $ECHO_N "(cached) $ECHO_C" >&6
16242 ac_check_lib_save_LIBS=$LIBS
16243 LIBS="-lform$cf_cv_libtype $LIBS"
16244 cat >conftest.$ac_ext <<_ACEOF
16245 #line 16245 "configure"
16246 #include "confdefs.h"
16248 /* Override any gcc2 internal prototype to avoid an error. */
16252 /* We use char because int might match the return type of a gcc2
16253 builtin and then its argument prototype would still apply. */
16254 char form_driver ();
16263 rm -f conftest.$ac_objext conftest$ac_exeext
16264 if { (eval echo "$as_me:16264: \"$ac_link\"") >&5
16265 (eval $ac_link) 2>&5
16267 echo "$as_me:16267: \$? = $ac_status" >&5
16268 (exit $ac_status); } &&
16269 { ac_try='test -s conftest$ac_exeext'
16270 { (eval echo "$as_me:16270: \"$ac_try\"") >&5
16271 (eval $ac_try) 2>&5
16273 echo "$as_me:16273: \$? = $ac_status" >&5
16274 (exit $ac_status); }; }; then
16275 eval "$as_ac_Lib=yes"
16277 echo "$as_me: failed program was:" >&5
16278 cat conftest.$ac_ext >&5
16279 eval "$as_ac_Lib=no"
16281 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16282 LIBS=$ac_check_lib_save_LIBS
16284 echo "$as_me:16284: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16285 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16286 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16288 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16290 cf_add_libs="-lform$cf_cv_libtype"
16291 # Filter out duplicates - this happens with badly-designed ".pc" files...
16292 for cf_add_1lib in $LIBS
16294 for cf_add_2lib in $cf_add_libs
16296 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16302 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16304 LIBS="$cf_add_libs"
16306 cat >>confdefs.h <<EOF
16307 #define $cf_upper 1
16314 cf_curses_headers="$cf_curses_headers form.h"
16317 # look for curses-related headers
16319 for ac_header in $cf_curses_headers
16321 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16322 echo "$as_me:16322: checking for $ac_header" >&5
16323 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16324 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16325 echo $ECHO_N "(cached) $ECHO_C" >&6
16327 cat >conftest.$ac_ext <<_ACEOF
16328 #line 16328 "configure"
16329 #include "confdefs.h"
16330 #include <$ac_header>
16332 if { (eval echo "$as_me:16332: \"$ac_cpp conftest.$ac_ext\"") >&5
16333 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16335 egrep -v '^ *\+' conftest.er1 >conftest.err
16337 cat conftest.err >&5
16338 echo "$as_me:16338: \$? = $ac_status" >&5
16339 (exit $ac_status); } >/dev/null; then
16340 if test -s conftest.err; then
16341 ac_cpp_err=$ac_c_preproc_warn_flag
16348 if test -z "$ac_cpp_err"; then
16349 eval "$as_ac_Header=yes"
16351 echo "$as_me: failed program was:" >&5
16352 cat conftest.$ac_ext >&5
16353 eval "$as_ac_Header=no"
16355 rm -f conftest.err conftest.$ac_ext
16357 echo "$as_me:16357: result: `eval echo '${'$as_ac_Header'}'`" >&5
16358 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16359 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16360 cat >>confdefs.h <<EOF
16361 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16367 echo "$as_me:16367: checking for ANSI C header files" >&5
16368 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16369 if test "${ac_cv_header_stdc+set}" = set; then
16370 echo $ECHO_N "(cached) $ECHO_C" >&6
16372 cat >conftest.$ac_ext <<_ACEOF
16373 #line 16373 "configure"
16374 #include "confdefs.h"
16375 #include <stdlib.h>
16376 #include <stdarg.h>
16377 #include <string.h>
16381 if { (eval echo "$as_me:16381: \"$ac_cpp conftest.$ac_ext\"") >&5
16382 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16384 egrep -v '^ *\+' conftest.er1 >conftest.err
16386 cat conftest.err >&5
16387 echo "$as_me:16387: \$? = $ac_status" >&5
16388 (exit $ac_status); } >/dev/null; then
16389 if test -s conftest.err; then
16390 ac_cpp_err=$ac_c_preproc_warn_flag
16397 if test -z "$ac_cpp_err"; then
16398 ac_cv_header_stdc=yes
16400 echo "$as_me: failed program was:" >&5
16401 cat conftest.$ac_ext >&5
16402 ac_cv_header_stdc=no
16404 rm -f conftest.err conftest.$ac_ext
16406 if test $ac_cv_header_stdc = yes; then
16407 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16408 cat >conftest.$ac_ext <<_ACEOF
16409 #line 16409 "configure"
16410 #include "confdefs.h"
16411 #include <string.h>
16414 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16415 egrep "memchr" >/dev/null 2>&1; then
16418 ac_cv_header_stdc=no
16424 if test $ac_cv_header_stdc = yes; then
16425 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16426 cat >conftest.$ac_ext <<_ACEOF
16427 #line 16427 "configure"
16428 #include "confdefs.h"
16429 #include <stdlib.h>
16432 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16433 egrep "free" >/dev/null 2>&1; then
16436 ac_cv_header_stdc=no
16442 if test $ac_cv_header_stdc = yes; then
16443 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16444 if test "$cross_compiling" = yes; then
16447 cat >conftest.$ac_ext <<_ACEOF
16448 #line 16448 "configure"
16449 #include "confdefs.h"
16451 #if ((' ' & 0x0FF) == 0x020)
16452 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16453 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16455 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16456 || ('j' <= (c) && (c) <= 'r') \
16457 || ('s' <= (c) && (c) <= 'z'))
16458 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16461 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16466 for (i = 0; i < 256; i++)
16467 if (XOR (islower (i), ISLOWER (i))
16468 || toupper (i) != TOUPPER (i))
16469 $ac_main_return(2);
16470 $ac_main_return (0);
16473 rm -f conftest$ac_exeext
16474 if { (eval echo "$as_me:16474: \"$ac_link\"") >&5
16475 (eval $ac_link) 2>&5
16477 echo "$as_me:16477: \$? = $ac_status" >&5
16478 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16479 { (eval echo "$as_me:16479: \"$ac_try\"") >&5
16480 (eval $ac_try) 2>&5
16482 echo "$as_me:16482: \$? = $ac_status" >&5
16483 (exit $ac_status); }; }; then
16486 echo "$as_me: program exited with status $ac_status" >&5
16487 echo "$as_me: failed program was:" >&5
16488 cat conftest.$ac_ext >&5
16489 ac_cv_header_stdc=no
16491 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16495 echo "$as_me:16495: result: $ac_cv_header_stdc" >&5
16496 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16497 if test $ac_cv_header_stdc = yes; then
16499 cat >>confdefs.h <<\EOF
16500 #define STDC_HEADERS 1
16505 echo "$as_me:16505: checking whether time.h and sys/time.h may both be included" >&5
16506 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16507 if test "${ac_cv_header_time+set}" = set; then
16508 echo $ECHO_N "(cached) $ECHO_C" >&6
16510 cat >conftest.$ac_ext <<_ACEOF
16511 #line 16511 "configure"
16512 #include "confdefs.h"
16513 #include <sys/types.h>
16514 #include <sys/time.h>
16520 if ((struct tm *) 0)
16526 rm -f conftest.$ac_objext
16527 if { (eval echo "$as_me:16527: \"$ac_compile\"") >&5
16528 (eval $ac_compile) 2>&5
16530 echo "$as_me:16530: \$? = $ac_status" >&5
16531 (exit $ac_status); } &&
16532 { ac_try='test -s conftest.$ac_objext'
16533 { (eval echo "$as_me:16533: \"$ac_try\"") >&5
16534 (eval $ac_try) 2>&5
16536 echo "$as_me:16536: \$? = $ac_status" >&5
16537 (exit $ac_status); }; }; then
16538 ac_cv_header_time=yes
16540 echo "$as_me: failed program was:" >&5
16541 cat conftest.$ac_ext >&5
16542 ac_cv_header_time=no
16544 rm -f conftest.$ac_objext conftest.$ac_ext
16546 echo "$as_me:16546: result: $ac_cv_header_time" >&5
16547 echo "${ECHO_T}$ac_cv_header_time" >&6
16548 if test $ac_cv_header_time = yes; then
16550 cat >>confdefs.h <<\EOF
16551 #define TIME_WITH_SYS_TIME 1
16569 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16570 echo "$as_me:16570: checking for $ac_header" >&5
16571 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16572 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16573 echo $ECHO_N "(cached) $ECHO_C" >&6
16575 cat >conftest.$ac_ext <<_ACEOF
16576 #line 16576 "configure"
16577 #include "confdefs.h"
16578 #include <$ac_header>
16580 if { (eval echo "$as_me:16580: \"$ac_cpp conftest.$ac_ext\"") >&5
16581 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16583 egrep -v '^ *\+' conftest.er1 >conftest.err
16585 cat conftest.err >&5
16586 echo "$as_me:16586: \$? = $ac_status" >&5
16587 (exit $ac_status); } >/dev/null; then
16588 if test -s conftest.err; then
16589 ac_cpp_err=$ac_c_preproc_warn_flag
16596 if test -z "$ac_cpp_err"; then
16597 eval "$as_ac_Header=yes"
16599 echo "$as_me: failed program was:" >&5
16600 cat conftest.$ac_ext >&5
16601 eval "$as_ac_Header=no"
16603 rm -f conftest.err conftest.$ac_ext
16605 echo "$as_me:16605: result: `eval echo '${'$as_ac_Header'}'`" >&5
16606 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16607 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16608 cat >>confdefs.h <<EOF
16609 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16615 for ac_header in unistd.h getopt.h
16617 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16618 echo "$as_me:16618: checking for $ac_header" >&5
16619 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16620 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16621 echo $ECHO_N "(cached) $ECHO_C" >&6
16623 cat >conftest.$ac_ext <<_ACEOF
16624 #line 16624 "configure"
16625 #include "confdefs.h"
16626 #include <$ac_header>
16628 if { (eval echo "$as_me:16628: \"$ac_cpp conftest.$ac_ext\"") >&5
16629 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16631 egrep -v '^ *\+' conftest.er1 >conftest.err
16633 cat conftest.err >&5
16634 echo "$as_me:16634: \$? = $ac_status" >&5
16635 (exit $ac_status); } >/dev/null; then
16636 if test -s conftest.err; then
16637 ac_cpp_err=$ac_c_preproc_warn_flag
16644 if test -z "$ac_cpp_err"; then
16645 eval "$as_ac_Header=yes"
16647 echo "$as_me: failed program was:" >&5
16648 cat conftest.$ac_ext >&5
16649 eval "$as_ac_Header=no"
16651 rm -f conftest.err conftest.$ac_ext
16653 echo "$as_me:16653: result: `eval echo '${'$as_ac_Header'}'`" >&5
16654 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16655 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16656 cat >>confdefs.h <<EOF
16657 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16663 echo "$as_me:16663: checking for header declaring getopt variables" >&5
16664 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
16665 if test "${cf_cv_getopt_header+set}" = set; then
16666 echo $ECHO_N "(cached) $ECHO_C" >&6
16669 cf_cv_getopt_header=none
16670 for cf_header in stdio.h stdlib.h unistd.h getopt.h
16672 cat >conftest.$ac_ext <<_ACEOF
16673 #line 16673 "configure"
16674 #include "confdefs.h"
16676 #include <$cf_header>
16680 int x = optind; char *y = optarg
16685 rm -f conftest.$ac_objext
16686 if { (eval echo "$as_me:16686: \"$ac_compile\"") >&5
16687 (eval $ac_compile) 2>&5
16689 echo "$as_me:16689: \$? = $ac_status" >&5
16690 (exit $ac_status); } &&
16691 { ac_try='test -s conftest.$ac_objext'
16692 { (eval echo "$as_me:16692: \"$ac_try\"") >&5
16693 (eval $ac_try) 2>&5
16695 echo "$as_me:16695: \$? = $ac_status" >&5
16696 (exit $ac_status); }; }; then
16697 cf_cv_getopt_header=$cf_header
16700 echo "$as_me: failed program was:" >&5
16701 cat conftest.$ac_ext >&5
16703 rm -f conftest.$ac_objext conftest.$ac_ext
16707 echo "$as_me:16707: result: $cf_cv_getopt_header" >&5
16708 echo "${ECHO_T}$cf_cv_getopt_header" >&6
16709 if test $cf_cv_getopt_header != none ; then
16711 cat >>confdefs.h <<\EOF
16712 #define HAVE_GETOPT_HEADER 1
16716 if test $cf_cv_getopt_header = getopt.h ; then
16718 cat >>confdefs.h <<\EOF
16719 #define NEED_GETOPT_H 1
16731 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16732 echo "$as_me:16732: checking for $ac_func" >&5
16733 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16734 if eval "test \"\${$as_ac_var+set}\" = set"; then
16735 echo $ECHO_N "(cached) $ECHO_C" >&6
16737 cat >conftest.$ac_ext <<_ACEOF
16738 #line 16738 "configure"
16739 #include "confdefs.h"
16740 /* System header to define __stub macros and hopefully few prototypes,
16741 which can conflict with char $ac_func (); below. */
16742 #include <assert.h>
16743 /* Override any gcc2 internal prototype to avoid an error. */
16747 /* We use char because int might match the return type of a gcc2
16748 builtin and then its argument prototype would still apply. */
16755 /* The GNU C library defines this for functions which it implements
16756 to always fail with ENOSYS. Some functions are actually named
16757 something starting with __ and the normal name is an alias. */
16758 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16761 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16768 rm -f conftest.$ac_objext conftest$ac_exeext
16769 if { (eval echo "$as_me:16769: \"$ac_link\"") >&5
16770 (eval $ac_link) 2>&5
16772 echo "$as_me:16772: \$? = $ac_status" >&5
16773 (exit $ac_status); } &&
16774 { ac_try='test -s conftest$ac_exeext'
16775 { (eval echo "$as_me:16775: \"$ac_try\"") >&5
16776 (eval $ac_try) 2>&5
16778 echo "$as_me:16778: \$? = $ac_status" >&5
16779 (exit $ac_status); }; }; then
16780 eval "$as_ac_var=yes"
16782 echo "$as_me: failed program was:" >&5
16783 cat conftest.$ac_ext >&5
16784 eval "$as_ac_var=no"
16786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16788 echo "$as_me:16788: result: `eval echo '${'$as_ac_var'}'`" >&5
16789 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16790 if test `eval echo '${'$as_ac_var'}'` = yes; then
16791 cat >>confdefs.h <<EOF
16792 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16798 # use a compile-check to work with ncurses*-config and subdirectory includes
16799 echo "$as_me:16799: checking if we can use termcap.h" >&5
16800 echo $ECHO_N "checking if we can use termcap.h... $ECHO_C" >&6
16801 if test "${cf_cv_have_termcap_h+set}" = set; then
16802 echo $ECHO_N "(cached) $ECHO_C" >&6
16805 cat >conftest.$ac_ext <<_ACEOF
16806 #line 16806 "configure"
16807 #include "confdefs.h"
16809 #include <curses.h>
16810 #include <termcap.h>
16820 rm -f conftest.$ac_objext
16821 if { (eval echo "$as_me:16821: \"$ac_compile\"") >&5
16822 (eval $ac_compile) 2>&5
16824 echo "$as_me:16824: \$? = $ac_status" >&5
16825 (exit $ac_status); } &&
16826 { ac_try='test -s conftest.$ac_objext'
16827 { (eval echo "$as_me:16827: \"$ac_try\"") >&5
16828 (eval $ac_try) 2>&5
16830 echo "$as_me:16830: \$? = $ac_status" >&5
16831 (exit $ac_status); }; }; then
16832 cf_cv_have_termcap_h=yes
16834 echo "$as_me: failed program was:" >&5
16835 cat conftest.$ac_ext >&5
16836 cf_cv_have_termcap_h=no
16838 rm -f conftest.$ac_objext conftest.$ac_ext
16840 echo "$as_me:16840: result: $cf_cv_have_termcap_h" >&5
16841 echo "${ECHO_T}$cf_cv_have_termcap_h" >&6
16842 test "x$cf_cv_have_termcap_h" = xyes && cat >>confdefs.h <<\EOF
16843 #define HAVE_TERMCAP_H 1
16846 if test "x$ac_cv_func_getopt" = xno; then
16847 { { echo "$as_me:16847: error: getopt is required for building programs" >&5
16848 echo "$as_me: error: getopt is required for building programs" >&2;}
16849 { (exit 1); exit 1; }; }
16852 if test "$cf_enable_widec" = yes; then
16865 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16866 echo "$as_me:16866: checking for $ac_func" >&5
16867 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16868 if eval "test \"\${$as_ac_var+set}\" = set"; then
16869 echo $ECHO_N "(cached) $ECHO_C" >&6
16871 cat >conftest.$ac_ext <<_ACEOF
16872 #line 16872 "configure"
16873 #include "confdefs.h"
16874 /* System header to define __stub macros and hopefully few prototypes,
16875 which can conflict with char $ac_func (); below. */
16876 #include <assert.h>
16877 /* Override any gcc2 internal prototype to avoid an error. */
16881 /* We use char because int might match the return type of a gcc2
16882 builtin and then its argument prototype would still apply. */
16889 /* The GNU C library defines this for functions which it implements
16890 to always fail with ENOSYS. Some functions are actually named
16891 something starting with __ and the normal name is an alias. */
16892 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16895 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16902 rm -f conftest.$ac_objext conftest$ac_exeext
16903 if { (eval echo "$as_me:16903: \"$ac_link\"") >&5
16904 (eval $ac_link) 2>&5
16906 echo "$as_me:16906: \$? = $ac_status" >&5
16907 (exit $ac_status); } &&
16908 { ac_try='test -s conftest$ac_exeext'
16909 { (eval echo "$as_me:16909: \"$ac_try\"") >&5
16910 (eval $ac_try) 2>&5
16912 echo "$as_me:16912: \$? = $ac_status" >&5
16913 (exit $ac_status); }; }; then
16914 eval "$as_ac_var=yes"
16916 echo "$as_me: failed program was:" >&5
16917 cat conftest.$ac_ext >&5
16918 eval "$as_ac_var=no"
16920 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16922 echo "$as_me:16922: result: `eval echo '${'$as_ac_var'}'`" >&5
16923 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16924 if test `eval echo '${'$as_ac_var'}'` = yes; then
16925 cat >>confdefs.h <<EOF
16926 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16934 echo "$as_me:16934: checking definition to turn on extended curses functions" >&5
16935 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
16936 if test "${cf_cv_need_xopen_extension+set}" = set; then
16937 echo $ECHO_N "(cached) $ECHO_C" >&6
16940 cf_cv_need_xopen_extension=unknown
16941 cat >conftest.$ac_ext <<_ACEOF
16942 #line 16942 "configure"
16943 #include "confdefs.h"
16945 #include <stdlib.h>
16946 #include <${cf_cv_ncurses_header:-curses.h}>
16951 #if defined(NCURSES_VERSION_PATCH)
16952 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
16956 #ifdef NCURSES_VERSION
16958 int check2 = curs_set((int)sizeof(check));
16960 long x = winnstr(stdscr, "", 0);
16962 getbegyx(stdscr, y1, x1)
16967 rm -f conftest.$ac_objext conftest$ac_exeext
16968 if { (eval echo "$as_me:16968: \"$ac_link\"") >&5
16969 (eval $ac_link) 2>&5
16971 echo "$as_me:16971: \$? = $ac_status" >&5
16972 (exit $ac_status); } &&
16973 { ac_try='test -s conftest$ac_exeext'
16974 { (eval echo "$as_me:16974: \"$ac_try\"") >&5
16975 (eval $ac_try) 2>&5
16977 echo "$as_me:16977: \$? = $ac_status" >&5
16978 (exit $ac_status); }; }; then
16979 cf_cv_need_xopen_extension=none
16981 echo "$as_me: failed program was:" >&5
16982 cat conftest.$ac_ext >&5
16984 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
16986 cat >conftest.$ac_ext <<_ACEOF
16987 #line 16987 "configure"
16988 #include "confdefs.h"
16990 #define $cf_try_xopen_extension 1
16991 #include <stdlib.h>
16992 #include <${cf_cv_ncurses_header:-curses.h}>
16997 #ifdef NCURSES_VERSION
16999 int check2 = curs_set((int)sizeof(check));
17001 long x = winnstr(stdscr, "", 0);
17003 getbegyx(stdscr, y1, x1)
17008 rm -f conftest.$ac_objext conftest$ac_exeext
17009 if { (eval echo "$as_me:17009: \"$ac_link\"") >&5
17010 (eval $ac_link) 2>&5
17012 echo "$as_me:17012: \$? = $ac_status" >&5
17013 (exit $ac_status); } &&
17014 { ac_try='test -s conftest$ac_exeext'
17015 { (eval echo "$as_me:17015: \"$ac_try\"") >&5
17016 (eval $ac_try) 2>&5
17018 echo "$as_me:17018: \$? = $ac_status" >&5
17019 (exit $ac_status); }; }; then
17020 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
17022 echo "$as_me: failed program was:" >&5
17023 cat conftest.$ac_ext >&5
17025 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17029 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17032 echo "$as_me:17032: result: $cf_cv_need_xopen_extension" >&5
17033 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
17035 case $cf_cv_need_xopen_extension in
17038 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17039 CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
17044 echo "$as_me:17044: checking for term.h" >&5
17045 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
17046 if test "${cf_cv_term_header+set}" = set; then
17047 echo $ECHO_N "(cached) $ECHO_C" >&6
17050 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
17051 # for <term.h> if we do not find the variant.
17053 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
17055 case ${cf_cv_ncurses_header:-curses.h} in
17057 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
17058 cf_header_list="$cf_header_item $cf_header_list"
17062 for cf_header in $cf_header_list
17064 cat >conftest.$ac_ext <<_ACEOF
17065 #line 17065 "configure"
17066 #include "confdefs.h"
17068 #include <${cf_cv_ncurses_header:-curses.h}>
17069 #include <${cf_header}>
17078 rm -f conftest.$ac_objext
17079 if { (eval echo "$as_me:17079: \"$ac_compile\"") >&5
17080 (eval $ac_compile) 2>&5
17082 echo "$as_me:17082: \$? = $ac_status" >&5
17083 (exit $ac_status); } &&
17084 { ac_try='test -s conftest.$ac_objext'
17085 { (eval echo "$as_me:17085: \"$ac_try\"") >&5
17086 (eval $ac_try) 2>&5
17088 echo "$as_me:17088: \$? = $ac_status" >&5
17089 (exit $ac_status); }; }; then
17090 cf_cv_term_header=$cf_header
17093 echo "$as_me: failed program was:" >&5
17094 cat conftest.$ac_ext >&5
17095 cf_cv_term_header=no
17097 rm -f conftest.$ac_objext conftest.$ac_ext
17100 case $cf_cv_term_header in
17102 # If curses is ncurses, some packagers still mess it up by trying to make
17103 # us use GNU termcap. This handles the most common case.
17104 for cf_header in ncurses/term.h ncursesw/term.h
17106 cat >conftest.$ac_ext <<_ACEOF
17107 #line 17107 "configure"
17108 #include "confdefs.h"
17110 #include <${cf_cv_ncurses_header:-curses.h}>
17111 #ifdef NCURSES_VERSION
17112 #include <${cf_header}>
17124 rm -f conftest.$ac_objext
17125 if { (eval echo "$as_me:17125: \"$ac_compile\"") >&5
17126 (eval $ac_compile) 2>&5
17128 echo "$as_me:17128: \$? = $ac_status" >&5
17129 (exit $ac_status); } &&
17130 { ac_try='test -s conftest.$ac_objext'
17131 { (eval echo "$as_me:17131: \"$ac_try\"") >&5
17132 (eval $ac_try) 2>&5
17134 echo "$as_me:17134: \$? = $ac_status" >&5
17135 (exit $ac_status); }; }; then
17136 cf_cv_term_header=$cf_header
17139 echo "$as_me: failed program was:" >&5
17140 cat conftest.$ac_ext >&5
17141 cf_cv_term_header=no
17143 rm -f conftest.$ac_objext conftest.$ac_ext
17149 echo "$as_me:17149: result: $cf_cv_term_header" >&5
17150 echo "${ECHO_T}$cf_cv_term_header" >&6
17152 case $cf_cv_term_header in
17155 cat >>confdefs.h <<\EOF
17156 #define HAVE_TERM_H 1
17162 cat >>confdefs.h <<\EOF
17163 #define HAVE_NCURSES_TERM_H 1
17169 cat >>confdefs.h <<\EOF
17170 #define HAVE_NCURSESW_TERM_H 1
17176 echo "$as_me:17176: checking for unctrl.h" >&5
17177 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
17178 if test "${cf_cv_unctrl_header+set}" = set; then
17179 echo $ECHO_N "(cached) $ECHO_C" >&6
17182 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
17183 # for <unctrl.h> if we do not find the variant.
17185 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
17187 case ${cf_cv_ncurses_header:-curses.h} in
17189 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
17190 cf_header_list="$cf_header_item $cf_header_list"
17194 for cf_header in $cf_header_list
17196 cat >conftest.$ac_ext <<_ACEOF
17197 #line 17197 "configure"
17198 #include "confdefs.h"
17200 #include <${cf_cv_ncurses_header:-curses.h}>
17201 #include <${cf_header}>
17210 rm -f conftest.$ac_objext
17211 if { (eval echo "$as_me:17211: \"$ac_compile\"") >&5
17212 (eval $ac_compile) 2>&5
17214 echo "$as_me:17214: \$? = $ac_status" >&5
17215 (exit $ac_status); } &&
17216 { ac_try='test -s conftest.$ac_objext'
17217 { (eval echo "$as_me:17217: \"$ac_try\"") >&5
17218 (eval $ac_try) 2>&5
17220 echo "$as_me:17220: \$? = $ac_status" >&5
17221 (exit $ac_status); }; }; then
17222 cf_cv_unctrl_header=$cf_header
17225 echo "$as_me: failed program was:" >&5
17226 cat conftest.$ac_ext >&5
17227 cf_cv_unctrl_header=no
17229 rm -f conftest.$ac_objext conftest.$ac_ext
17233 echo "$as_me:17233: result: $cf_cv_unctrl_header" >&5
17234 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
17236 case $cf_cv_unctrl_header in
17238 { echo "$as_me:17238: WARNING: unctrl.h header not found" >&5
17239 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
17243 case $cf_cv_unctrl_header in
17246 cat >>confdefs.h <<\EOF
17247 #define HAVE_UNCTRL_H 1
17253 cat >>confdefs.h <<\EOF
17254 #define HAVE_NCURSES_UNCTRL_H 1
17258 (ncursesw/unctrl.h)
17260 cat >>confdefs.h <<\EOF
17261 #define HAVE_NCURSESW_UNCTRL_H 1
17269 assume_default_colors \
17284 init_extended_color \
17292 reset_color_pairs \
17307 use_default_colors \
17309 use_extended_names \
17325 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17327 echo "$as_me:17327: checking for ${cf_func}" >&5
17328 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
17330 echo "${as_me:-configure}:17330: testing ${cf_func} ..." 1>&5
17332 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
17333 echo $ECHO_N "(cached) $ECHO_C" >&6
17336 eval cf_result='$ac_cv_func_'$cf_func
17337 if test ".$cf_result" != ".no"; then
17338 cat >conftest.$ac_ext <<_ACEOF
17339 #line 17339 "configure"
17340 #include "confdefs.h"
17342 #ifdef HAVE_XCURSES
17343 #include <xcurses.h>
17344 char * XCursesProgramName = "test";
17346 #include <${cf_cv_ncurses_header:-curses.h}>
17347 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17348 #include <ncursesw/term.h>
17349 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17350 #include <ncurses/term.h>
17351 #elif defined(HAVE_TERM_H)
17361 long foo = (long)(&${cf_func});
17362 fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
17363 if (foo + 1234L > 5678L)
17364 ${cf_cv_main_return:-return}(foo != 0);
17371 rm -f conftest.$ac_objext conftest$ac_exeext
17372 if { (eval echo "$as_me:17372: \"$ac_link\"") >&5
17373 (eval $ac_link) 2>&5
17375 echo "$as_me:17375: \$? = $ac_status" >&5
17376 (exit $ac_status); } &&
17377 { ac_try='test -s conftest$ac_exeext'
17378 { (eval echo "$as_me:17378: \"$ac_try\"") >&5
17379 (eval $ac_try) 2>&5
17381 echo "$as_me:17381: \$? = $ac_status" >&5
17382 (exit $ac_status); }; }; then
17385 echo "$as_me: failed program was:" >&5
17386 cat conftest.$ac_ext >&5
17389 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17391 eval 'cf_cv_func_'$cf_func'=$cf_result'
17395 # use the computed/retrieved cache-value:
17396 eval 'cf_result=$cf_cv_func_'$cf_func
17397 echo "$as_me:17397: result: $cf_result" >&5
17398 echo "${ECHO_T}$cf_result" >&6
17399 if test $cf_result != no; then
17400 cat >>confdefs.h <<EOF
17401 #define HAVE_${cf_tr_func} 1
17407 for cf_func in tputs
17410 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17412 echo "$as_me:17412: checking for ${cf_func}" >&5
17413 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
17415 echo "${as_me:-configure}:17415: testing ${cf_func} ..." 1>&5
17417 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
17418 echo $ECHO_N "(cached) $ECHO_C" >&6
17421 eval cf_result='$ac_cv_func_'$cf_func
17422 if test ".$cf_result" != ".no"; then
17423 cat >conftest.$ac_ext <<_ACEOF
17424 #line 17424 "configure"
17425 #include "confdefs.h"
17427 #ifdef HAVE_XCURSES
17428 #include <xcurses.h>
17429 char * XCursesProgramName = "test";
17431 #include <${cf_cv_ncurses_header:-curses.h}>
17432 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17433 #include <ncursesw/term.h>
17434 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17435 #include <ncurses/term.h>
17436 #elif defined(HAVE_TERM_H)
17446 long foo = (long)(&${cf_func});
17447 fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
17448 if (foo + 1234L > 5678L)
17449 ${cf_cv_main_return:-return}(foo != 0);
17456 rm -f conftest.$ac_objext conftest$ac_exeext
17457 if { (eval echo "$as_me:17457: \"$ac_link\"") >&5
17458 (eval $ac_link) 2>&5
17460 echo "$as_me:17460: \$? = $ac_status" >&5
17461 (exit $ac_status); } &&
17462 { ac_try='test -s conftest$ac_exeext'
17463 { (eval echo "$as_me:17463: \"$ac_try\"") >&5
17464 (eval $ac_try) 2>&5
17466 echo "$as_me:17466: \$? = $ac_status" >&5
17467 (exit $ac_status); }; }; then
17470 echo "$as_me: failed program was:" >&5
17471 cat conftest.$ac_ext >&5
17474 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17476 eval 'cf_cv_func_'$cf_func'=$cf_result'
17480 # use the computed/retrieved cache-value:
17481 eval 'cf_result=$cf_cv_func_'$cf_func
17482 echo "$as_me:17482: result: $cf_result" >&5
17483 echo "${ECHO_T}$cf_result" >&6
17484 if test $cf_result != no; then
17485 cat >>confdefs.h <<EOF
17486 #define HAVE_${cf_tr_func} 1
17492 if test x$cf_cv_func_tputs = xyes
17495 for cf_arg in int char
17497 for cf_ret in int void
17499 if test $cf_ret = void
17501 cf_return="/* nothing */"
17503 cf_return="return value"
17505 cat >conftest.$ac_ext <<_ACEOF
17506 #line 17506 "configure"
17507 #include "confdefs.h"
17509 #include <${cf_cv_ncurses_header:-curses.h}>
17510 #include <$cf_cv_term_header>
17512 static $cf_ret outc($cf_arg value) { $cf_return; }
17518 tputs("hello", 0, outc);
17519 ${cf_cv_main_return:-return}(0);
17525 rm -f conftest.$ac_objext
17526 if { (eval echo "$as_me:17526: \"$ac_compile\"") >&5
17527 (eval $ac_compile) 2>&5
17529 echo "$as_me:17529: \$? = $ac_status" >&5
17530 (exit $ac_status); } &&
17531 { ac_try='test -s conftest.$ac_objext'
17532 { (eval echo "$as_me:17532: \"$ac_try\"") >&5
17533 (eval $ac_try) 2>&5
17535 echo "$as_me:17535: \$? = $ac_status" >&5
17536 (exit $ac_status); }; }; then
17538 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
17540 echo "${as_me:-configure}:17540: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
17542 cat >>confdefs.h <<EOF
17543 #define TPUTS_ARG $cf_arg
17544 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
17545 #define TPUTS_RETURN(value) $cf_return
17551 echo "$as_me: failed program was:" >&5
17552 cat conftest.$ac_ext >&5
17554 rm -f conftest.$ac_objext conftest.$ac_ext
17556 test $cf_done = yes && break
17560 echo "$as_me:17560: checking for ncurses extended functions" >&5
17561 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
17562 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
17563 echo $ECHO_N "(cached) $ECHO_C" >&6
17566 cat >conftest.$ac_ext <<_ACEOF
17567 #line 17567 "configure"
17568 #include "confdefs.h"
17570 #include <${cf_cv_ncurses_header:-curses.h}>
17575 int x = NCURSES_EXT_FUNCS
17581 rm -f conftest.$ac_objext
17582 if { (eval echo "$as_me:17582: \"$ac_compile\"") >&5
17583 (eval $ac_compile) 2>&5
17585 echo "$as_me:17585: \$? = $ac_status" >&5
17586 (exit $ac_status); } &&
17587 { ac_try='test -s conftest.$ac_objext'
17588 { (eval echo "$as_me:17588: \"$ac_try\"") >&5
17589 (eval $ac_try) 2>&5
17591 echo "$as_me:17591: \$? = $ac_status" >&5
17592 (exit $ac_status); }; }; then
17593 cf_cv_ncurses_ext_funcs=defined
17595 echo "$as_me: failed program was:" >&5
17596 cat conftest.$ac_ext >&5
17598 cat >conftest.$ac_ext <<_ACEOF
17599 #line 17599 "configure"
17600 #include "confdefs.h"
17602 #include <${cf_cv_ncurses_header:-curses.h}>
17607 (void) assume_default_colors (0, 0);
17608 (void) curses_version ();
17609 (void) define_key (0, 0);
17610 (void) is_term_resized (0, 0);
17611 (void) key_defined (0);
17612 (void) keybound (0, 0);
17613 (void) keyok (0, 0);
17614 (void) resize_term (0, 0);
17615 (void) resizeterm (0, 0);
17616 (void) use_default_colors ();
17617 (void) use_extended_names (0);
17618 (void) wresize (0, 0, 0);
17623 rm -f conftest.$ac_objext conftest$ac_exeext
17624 if { (eval echo "$as_me:17624: \"$ac_link\"") >&5
17625 (eval $ac_link) 2>&5
17627 echo "$as_me:17627: \$? = $ac_status" >&5
17628 (exit $ac_status); } &&
17629 { ac_try='test -s conftest$ac_exeext'
17630 { (eval echo "$as_me:17630: \"$ac_try\"") >&5
17631 (eval $ac_try) 2>&5
17633 echo "$as_me:17633: \$? = $ac_status" >&5
17634 (exit $ac_status); }; }; then
17635 cf_cv_ncurses_ext_funcs=yes
17637 echo "$as_me: failed program was:" >&5
17638 cat conftest.$ac_ext >&5
17639 cf_cv_ncurses_ext_funcs=no
17641 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17644 rm -f conftest.$ac_objext conftest.$ac_ext
17647 echo "$as_me:17647: result: $cf_cv_ncurses_ext_funcs" >&5
17648 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
17649 test "$cf_cv_ncurses_ext_funcs" = yes &&
17650 cat >>confdefs.h <<\EOF
17651 #define NCURSES_EXT_FUNCS 1
17654 if test "$cf_enable_widec" = yes
17656 # workaround for systems with ncurses before 20111029, due to change of
17657 # feature test macro from _XPG5 to _XOPEN_SOURCE
17658 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
17661 echo "$as_me:17661: checking if _XPG5 should be defined to enable wide-characters" >&5
17662 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
17664 cat >conftest.$ac_ext <<_ACEOF
17665 #line 17665 "configure"
17666 #include "confdefs.h"
17668 #include <${cf_cv_ncurses_header:-curses.h}>
17677 rm -f conftest.$ac_objext
17678 if { (eval echo "$as_me:17678: \"$ac_compile\"") >&5
17679 (eval $ac_compile) 2>&5
17681 echo "$as_me:17681: \$? = $ac_status" >&5
17682 (exit $ac_status); } &&
17683 { ac_try='test -s conftest.$ac_objext'
17684 { (eval echo "$as_me:17684: \"$ac_try\"") >&5
17685 (eval $ac_try) 2>&5
17687 echo "$as_me:17687: \$? = $ac_status" >&5
17688 (exit $ac_status); }; }; then
17691 echo "$as_me: failed program was:" >&5
17692 cat conftest.$ac_ext >&5
17693 cf_save_cppflags="$CPPFLAGS"
17694 CPPFLAGS="$CPPFLAGS -D_XPG5"
17695 cat >conftest.$ac_ext <<_ACEOF
17696 #line 17696 "configure"
17697 #include "confdefs.h"
17699 #include <${cf_cv_ncurses_header:-curses.h}>
17708 rm -f conftest.$ac_objext
17709 if { (eval echo "$as_me:17709: \"$ac_compile\"") >&5
17710 (eval $ac_compile) 2>&5
17712 echo "$as_me:17712: \$? = $ac_status" >&5
17713 (exit $ac_status); } &&
17714 { ac_try='test -s conftest.$ac_objext'
17715 { (eval echo "$as_me:17715: \"$ac_try\"") >&5
17716 (eval $ac_try) 2>&5
17718 echo "$as_me:17718: \$? = $ac_status" >&5
17719 (exit $ac_status); }; }; then
17722 echo "$as_me: failed program was:" >&5
17723 cat conftest.$ac_ext >&5
17725 rm -f conftest.$ac_objext conftest.$ac_ext
17726 CPPFLAGS="$cf_save_cppflags"
17728 rm -f conftest.$ac_objext conftest.$ac_ext
17729 echo "$as_me:17729: result: $cf_define_xpg5" >&5
17730 echo "${ECHO_T}$cf_define_xpg5" >&6
17732 if test "$cf_define_xpg5" = yes
17734 CPPFLAGS="$CPPFLAGS -D_XPG5"
17738 echo "$as_me:17738: checking for wide-character functions" >&5
17739 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
17740 if test "${cf_cv_widechar_funcs+set}" = set; then
17741 echo $ECHO_N "(cached) $ECHO_C" >&6
17744 cat >conftest.$ac_ext <<_ACEOF
17745 #line 17745 "configure"
17746 #include "confdefs.h"
17748 #include <${cf_cv_ncurses_header:-curses.h}>
17753 static wchar_t src_wchar[2];
17754 static cchar_t dst_cchar;
17755 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
17761 rm -f conftest.$ac_objext conftest$ac_exeext
17762 if { (eval echo "$as_me:17762: \"$ac_link\"") >&5
17763 (eval $ac_link) 2>&5
17765 echo "$as_me:17765: \$? = $ac_status" >&5
17766 (exit $ac_status); } &&
17767 { ac_try='test -s conftest$ac_exeext'
17768 { (eval echo "$as_me:17768: \"$ac_try\"") >&5
17769 (eval $ac_try) 2>&5
17771 echo "$as_me:17771: \$? = $ac_status" >&5
17772 (exit $ac_status); }; }; then
17773 cf_cv_widechar_funcs=yes
17775 echo "$as_me: failed program was:" >&5
17776 cat conftest.$ac_ext >&5
17777 cf_cv_widechar_funcs=no
17779 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17782 echo "$as_me:17782: result: $cf_cv_widechar_funcs" >&5
17783 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
17784 if test "$cf_cv_widechar_funcs" != no ; then
17786 cat >>confdefs.h <<\EOF
17787 #define USE_WIDEC_SUPPORT 1
17791 cat >>confdefs.h <<\EOF
17792 #define USE_WIDEC_SUPPORT 0
17797 cat >>confdefs.h <<\EOF
17798 #define USE_WIDEC_SUPPORT 0
17803 echo "$as_me:17803: checking if $cf_cv_screen library uses pthreads" >&5
17804 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
17805 if test "${cf_cv_use_pthreads+set}" = set; then
17806 echo $ECHO_N "(cached) $ECHO_C" >&6
17809 cat >conftest.$ac_ext <<_ACEOF
17810 #line 17810 "configure"
17811 #include "confdefs.h"
17813 #include <${cf_cv_ncurses_header:-curses.h}>
17814 extern void _nc_init_pthreads(void);
17821 _nc_init_pthreads();
17827 rm -f conftest.$ac_objext conftest$ac_exeext
17828 if { (eval echo "$as_me:17828: \"$ac_link\"") >&5
17829 (eval $ac_link) 2>&5
17831 echo "$as_me:17831: \$? = $ac_status" >&5
17832 (exit $ac_status); } &&
17833 { ac_try='test -s conftest$ac_exeext'
17834 { (eval echo "$as_me:17834: \"$ac_try\"") >&5
17835 (eval $ac_try) 2>&5
17837 echo "$as_me:17837: \$? = $ac_status" >&5
17838 (exit $ac_status); }; }; then
17839 cf_cv_use_pthreads=yes
17841 echo "$as_me: failed program was:" >&5
17842 cat conftest.$ac_ext >&5
17843 cf_cv_use_pthreads=no
17845 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17848 echo "$as_me:17848: result: $cf_cv_use_pthreads" >&5
17849 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
17850 test $cf_cv_use_pthreads = yes && cat >>confdefs.h <<\EOF
17851 #define USE_PTHREADS 1
17854 echo "$as_me:17854: checking if sys/time.h works with sys/select.h" >&5
17855 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
17856 if test "${cf_cv_sys_time_select+set}" = set; then
17857 echo $ECHO_N "(cached) $ECHO_C" >&6
17860 cat >conftest.$ac_ext <<_ACEOF
17861 #line 17861 "configure"
17862 #include "confdefs.h"
17864 #include <sys/types.h>
17865 #ifdef HAVE_SYS_TIME_H
17866 #include <sys/time.h>
17868 #ifdef HAVE_SYS_SELECT_H
17869 #include <sys/select.h>
17880 rm -f conftest.$ac_objext
17881 if { (eval echo "$as_me:17881: \"$ac_compile\"") >&5
17882 (eval $ac_compile) 2>&5
17884 echo "$as_me:17884: \$? = $ac_status" >&5
17885 (exit $ac_status); } &&
17886 { ac_try='test -s conftest.$ac_objext'
17887 { (eval echo "$as_me:17887: \"$ac_try\"") >&5
17888 (eval $ac_try) 2>&5
17890 echo "$as_me:17890: \$? = $ac_status" >&5
17891 (exit $ac_status); }; }; then
17892 cf_cv_sys_time_select=yes
17894 echo "$as_me: failed program was:" >&5
17895 cat conftest.$ac_ext >&5
17896 cf_cv_sys_time_select=no
17898 rm -f conftest.$ac_objext conftest.$ac_ext
17902 echo "$as_me:17902: result: $cf_cv_sys_time_select" >&5
17903 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
17904 test "$cf_cv_sys_time_select" = yes &&
17905 cat >>confdefs.h <<\EOF
17906 #define HAVE_SYS_TIME_SELECT 1
17909 # special check for test/ditto.c
17911 echo "$as_me:17911: checking for openpty in -lutil" >&5
17912 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17913 if test "${ac_cv_lib_util_openpty+set}" = set; then
17914 echo $ECHO_N "(cached) $ECHO_C" >&6
17916 ac_check_lib_save_LIBS=$LIBS
17917 LIBS="-lutil $LIBS"
17918 cat >conftest.$ac_ext <<_ACEOF
17919 #line 17919 "configure"
17920 #include "confdefs.h"
17922 /* Override any gcc2 internal prototype to avoid an error. */
17926 /* We use char because int might match the return type of a gcc2
17927 builtin and then its argument prototype would still apply. */
17937 rm -f conftest.$ac_objext conftest$ac_exeext
17938 if { (eval echo "$as_me:17938: \"$ac_link\"") >&5
17939 (eval $ac_link) 2>&5
17941 echo "$as_me:17941: \$? = $ac_status" >&5
17942 (exit $ac_status); } &&
17943 { ac_try='test -s conftest$ac_exeext'
17944 { (eval echo "$as_me:17944: \"$ac_try\"") >&5
17945 (eval $ac_try) 2>&5
17947 echo "$as_me:17947: \$? = $ac_status" >&5
17948 (exit $ac_status); }; }; then
17949 ac_cv_lib_util_openpty=yes
17951 echo "$as_me: failed program was:" >&5
17952 cat conftest.$ac_ext >&5
17953 ac_cv_lib_util_openpty=no
17955 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17956 LIBS=$ac_check_lib_save_LIBS
17958 echo "$as_me:17958: result: $ac_cv_lib_util_openpty" >&5
17959 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17960 if test $ac_cv_lib_util_openpty = yes; then
17966 echo "$as_me:17966: checking for openpty header" >&5
17967 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17968 if test "${cf_cv_func_openpty+set}" = set; then
17969 echo $ECHO_N "(cached) $ECHO_C" >&6
17972 cf_save_LIBS="$LIBS"
17973 test $cf_cv_lib_util = yes && {
17974 cf_add_libs="-lutil"
17975 # Filter out duplicates - this happens with badly-designed ".pc" files...
17976 for cf_add_1lib in $LIBS
17978 for cf_add_2lib in $cf_add_libs
17980 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17986 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17988 LIBS="$cf_add_libs"
17990 for cf_header in pty.h libutil.h util.h
17992 cat >conftest.$ac_ext <<_ACEOF
17993 #line 17993 "configure"
17994 #include "confdefs.h"
17996 #include <$cf_header>
18002 int x = openpty((int *)0, (int *)0, (char *)0,
18003 (struct termios *)0, (struct winsize *)0);
18009 rm -f conftest.$ac_objext conftest$ac_exeext
18010 if { (eval echo "$as_me:18010: \"$ac_link\"") >&5
18011 (eval $ac_link) 2>&5
18013 echo "$as_me:18013: \$? = $ac_status" >&5
18014 (exit $ac_status); } &&
18015 { ac_try='test -s conftest$ac_exeext'
18016 { (eval echo "$as_me:18016: \"$ac_try\"") >&5
18017 (eval $ac_try) 2>&5
18019 echo "$as_me:18019: \$? = $ac_status" >&5
18020 (exit $ac_status); }; }; then
18022 cf_cv_func_openpty=$cf_header
18026 echo "$as_me: failed program was:" >&5
18027 cat conftest.$ac_ext >&5
18029 cf_cv_func_openpty=no
18032 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18034 LIBS="$cf_save_LIBS"
18037 echo "$as_me:18037: result: $cf_cv_func_openpty" >&5
18038 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18040 if test "$cf_cv_func_openpty" != no ; then
18042 cat >>confdefs.h <<EOF
18043 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18046 cat >>confdefs.h <<\EOF
18047 #define USE_XTERM_PTY 1
18050 if test "x$cf_cv_lib_util" = xyes ; then
18052 cf_add_libs="-lutil"
18053 # Filter out duplicates - this happens with badly-designed ".pc" files...
18054 for cf_add_1lib in $TEST_LIBS
18056 for cf_add_2lib in $cf_add_libs
18058 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18064 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18066 TEST_LIBS="$cf_add_libs"
18071 echo "$as_me:18071: checking for function curses_version" >&5
18072 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
18073 if test "${cf_cv_func_curses_version+set}" = set; then
18074 echo $ECHO_N "(cached) $ECHO_C" >&6
18077 if test "$cross_compiling" = yes; then
18078 cf_cv_func_curses_version=unknown
18080 cat >conftest.$ac_ext <<_ACEOF
18081 #line 18081 "configure"
18082 #include "confdefs.h"
18084 #include <${cf_cv_ncurses_header:-curses.h}>
18088 sprintf(temp, "%s\n", curses_version());
18089 ${cf_cv_main_return:-return}(0);
18093 rm -f conftest$ac_exeext
18094 if { (eval echo "$as_me:18094: \"$ac_link\"") >&5
18095 (eval $ac_link) 2>&5
18097 echo "$as_me:18097: \$? = $ac_status" >&5
18098 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18099 { (eval echo "$as_me:18099: \"$ac_try\"") >&5
18100 (eval $ac_try) 2>&5
18102 echo "$as_me:18102: \$? = $ac_status" >&5
18103 (exit $ac_status); }; }; then
18104 cf_cv_func_curses_version=yes
18107 echo "$as_me: program exited with status $ac_status" >&5
18108 echo "$as_me: failed program was:" >&5
18109 cat conftest.$ac_ext >&5
18110 cf_cv_func_curses_version=no
18113 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18117 echo "$as_me:18117: result: $cf_cv_func_curses_version" >&5
18118 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
18119 test "$cf_cv_func_curses_version" = yes &&
18120 cat >>confdefs.h <<\EOF
18121 #define HAVE_CURSES_VERSION 1
18124 echo "$as_me:18124: checking for alternate character set array" >&5
18125 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
18126 if test "${cf_cv_curses_acs_map+set}" = set; then
18127 echo $ECHO_N "(cached) $ECHO_C" >&6
18130 cf_cv_curses_acs_map=unknown
18131 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
18133 cat >conftest.$ac_ext <<_ACEOF
18134 #line 18134 "configure"
18135 #include "confdefs.h"
18137 #include <${cf_cv_ncurses_header:-curses.h}>
18143 $name['k'] = ACS_PLUS
18149 rm -f conftest.$ac_objext conftest$ac_exeext
18150 if { (eval echo "$as_me:18150: \"$ac_link\"") >&5
18151 (eval $ac_link) 2>&5
18153 echo "$as_me:18153: \$? = $ac_status" >&5
18154 (exit $ac_status); } &&
18155 { ac_try='test -s conftest$ac_exeext'
18156 { (eval echo "$as_me:18156: \"$ac_try\"") >&5
18157 (eval $ac_try) 2>&5
18159 echo "$as_me:18159: \$? = $ac_status" >&5
18160 (exit $ac_status); }; }; then
18161 cf_cv_curses_acs_map=$name; break
18163 echo "$as_me: failed program was:" >&5
18164 cat conftest.$ac_ext >&5
18166 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18170 echo "$as_me:18170: result: $cf_cv_curses_acs_map" >&5
18171 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
18173 test "$cf_cv_curses_acs_map" != unknown &&
18174 cat >>confdefs.h <<EOF
18175 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
18178 if test "$cf_enable_widec" = yes; then
18180 echo "$as_me:18180: checking for wide alternate character set array" >&5
18181 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
18182 if test "${cf_cv_curses_wacs_map+set}" = set; then
18183 echo $ECHO_N "(cached) $ECHO_C" >&6
18186 cf_cv_curses_wacs_map=unknown
18187 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
18189 cat >conftest.$ac_ext <<_ACEOF
18190 #line 18190 "configure"
18191 #include "confdefs.h"
18193 #ifndef _XOPEN_SOURCE_EXTENDED
18194 #define _XOPEN_SOURCE_EXTENDED
18196 #include <${cf_cv_ncurses_header:-curses.h}>
18200 void *foo = &($name['k'])
18205 rm -f conftest.$ac_objext conftest$ac_exeext
18206 if { (eval echo "$as_me:18206: \"$ac_link\"") >&5
18207 (eval $ac_link) 2>&5
18209 echo "$as_me:18209: \$? = $ac_status" >&5
18210 (exit $ac_status); } &&
18211 { ac_try='test -s conftest$ac_exeext'
18212 { (eval echo "$as_me:18212: \"$ac_try\"") >&5
18213 (eval $ac_try) 2>&5
18215 echo "$as_me:18215: \$? = $ac_status" >&5
18216 (exit $ac_status); }; }; then
18217 cf_cv_curses_wacs_map=$name
18220 echo "$as_me: failed program was:" >&5
18221 cat conftest.$ac_ext >&5
18223 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18226 echo "$as_me:18226: result: $cf_cv_curses_wacs_map" >&5
18227 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
18229 test "$cf_cv_curses_wacs_map" != unknown &&
18230 cat >>confdefs.h <<EOF
18231 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
18234 echo "$as_me:18234: checking for wide alternate character constants" >&5
18235 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
18236 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
18237 echo $ECHO_N "(cached) $ECHO_C" >&6
18240 cf_cv_curses_wacs_symbols=no
18241 if test "$cf_cv_curses_wacs_map" != unknown
18243 cat >conftest.$ac_ext <<_ACEOF
18244 #line 18244 "configure"
18245 #include "confdefs.h"
18247 #ifndef _XOPEN_SOURCE_EXTENDED
18248 #define _XOPEN_SOURCE_EXTENDED
18250 #include <${cf_cv_ncurses_header:-curses.h}>
18254 cchar_t *foo = WACS_PLUS;
18255 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
18260 rm -f conftest.$ac_objext conftest$ac_exeext
18261 if { (eval echo "$as_me:18261: \"$ac_link\"") >&5
18262 (eval $ac_link) 2>&5
18264 echo "$as_me:18264: \$? = $ac_status" >&5
18265 (exit $ac_status); } &&
18266 { ac_try='test -s conftest$ac_exeext'
18267 { (eval echo "$as_me:18267: \"$ac_try\"") >&5
18268 (eval $ac_try) 2>&5
18270 echo "$as_me:18270: \$? = $ac_status" >&5
18271 (exit $ac_status); }; }; then
18272 cf_cv_curses_wacs_symbols=yes
18274 echo "$as_me: failed program was:" >&5
18275 cat conftest.$ac_ext >&5
18277 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18279 cat >conftest.$ac_ext <<_ACEOF
18280 #line 18280 "configure"
18281 #include "confdefs.h"
18283 #ifndef _XOPEN_SOURCE_EXTENDED
18284 #define _XOPEN_SOURCE_EXTENDED
18286 #include <${cf_cv_ncurses_header:-curses.h}>
18290 cchar_t *foo = WACS_PLUS
18295 rm -f conftest.$ac_objext conftest$ac_exeext
18296 if { (eval echo "$as_me:18296: \"$ac_link\"") >&5
18297 (eval $ac_link) 2>&5
18299 echo "$as_me:18299: \$? = $ac_status" >&5
18300 (exit $ac_status); } &&
18301 { ac_try='test -s conftest$ac_exeext'
18302 { (eval echo "$as_me:18302: \"$ac_try\"") >&5
18303 (eval $ac_try) 2>&5
18305 echo "$as_me:18305: \$? = $ac_status" >&5
18306 (exit $ac_status); }; }; then
18307 cf_cv_curses_wacs_symbols=yes
18309 echo "$as_me: failed program was:" >&5
18310 cat conftest.$ac_ext >&5
18312 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18316 echo "$as_me:18316: result: $cf_cv_curses_wacs_symbols" >&5
18317 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
18319 test "$cf_cv_curses_wacs_symbols" != no &&
18320 cat >>confdefs.h <<\EOF
18321 #define CURSES_WACS_SYMBOLS 1
18326 echo "$as_me:18326: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
18327 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
18328 cat >conftest.$ac_ext <<_ACEOF
18329 #line 18329 "configure"
18330 #include "confdefs.h"
18332 #ifndef _XOPEN_SOURCE_EXTENDED
18333 #define _XOPEN_SOURCE_EXTENDED
18335 #include <${cf_cv_ncurses_header:-curses.h}>
18346 rm -f conftest.$ac_objext
18347 if { (eval echo "$as_me:18347: \"$ac_compile\"") >&5
18348 (eval $ac_compile) 2>&5
18350 echo "$as_me:18350: \$? = $ac_status" >&5
18351 (exit $ac_status); } &&
18352 { ac_try='test -s conftest.$ac_objext'
18353 { (eval echo "$as_me:18353: \"$ac_try\"") >&5
18354 (eval $ac_try) 2>&5
18356 echo "$as_me:18356: \$? = $ac_status" >&5
18357 (exit $ac_status); }; }; then
18360 echo "$as_me: failed program was:" >&5
18361 cat conftest.$ac_ext >&5
18364 rm -f conftest.$ac_objext conftest.$ac_ext
18365 echo "$as_me:18365: result: $cf_result" >&5
18366 echo "${ECHO_T}$cf_result" >&6
18367 if test $cf_result = yes ; then
18369 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18371 cat >>confdefs.h <<EOF
18372 #define $cf_result 1
18377 cat >>confdefs.h <<EOF
18378 #define attr_t long
18383 if test "$cf_enable_widec" = yes; then
18385 # This is needed on Tru64 5.0 to declare mbstate_t
18386 echo "$as_me:18386: checking if we must include wchar.h to declare mbstate_t" >&5
18387 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
18388 if test "${cf_cv_mbstate_t+set}" = set; then
18389 echo $ECHO_N "(cached) $ECHO_C" >&6
18392 cat >conftest.$ac_ext <<_ACEOF
18393 #line 18393 "configure"
18394 #include "confdefs.h"
18396 #include <stdlib.h>
18397 #include <stdarg.h>
18399 #ifdef HAVE_LIBUTF8_H
18400 #include <libutf8.h>
18410 rm -f conftest.$ac_objext
18411 if { (eval echo "$as_me:18411: \"$ac_compile\"") >&5
18412 (eval $ac_compile) 2>&5
18414 echo "$as_me:18414: \$? = $ac_status" >&5
18415 (exit $ac_status); } &&
18416 { ac_try='test -s conftest.$ac_objext'
18417 { (eval echo "$as_me:18417: \"$ac_try\"") >&5
18418 (eval $ac_try) 2>&5
18420 echo "$as_me:18420: \$? = $ac_status" >&5
18421 (exit $ac_status); }; }; then
18424 echo "$as_me: failed program was:" >&5
18425 cat conftest.$ac_ext >&5
18426 cat >conftest.$ac_ext <<_ACEOF
18427 #line 18427 "configure"
18428 #include "confdefs.h"
18430 #include <stdlib.h>
18431 #include <stdarg.h>
18434 #ifdef HAVE_LIBUTF8_H
18435 #include <libutf8.h>
18445 rm -f conftest.$ac_objext
18446 if { (eval echo "$as_me:18446: \"$ac_compile\"") >&5
18447 (eval $ac_compile) 2>&5
18449 echo "$as_me:18449: \$? = $ac_status" >&5
18450 (exit $ac_status); } &&
18451 { ac_try='test -s conftest.$ac_objext'
18452 { (eval echo "$as_me:18452: \"$ac_try\"") >&5
18453 (eval $ac_try) 2>&5
18455 echo "$as_me:18455: \$? = $ac_status" >&5
18456 (exit $ac_status); }; }; then
18457 cf_cv_mbstate_t=yes
18459 echo "$as_me: failed program was:" >&5
18460 cat conftest.$ac_ext >&5
18461 cf_cv_mbstate_t=unknown
18463 rm -f conftest.$ac_objext conftest.$ac_ext
18465 rm -f conftest.$ac_objext conftest.$ac_ext
18467 echo "$as_me:18467: result: $cf_cv_mbstate_t" >&5
18468 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
18470 if test "$cf_cv_mbstate_t" = yes ; then
18472 cat >>confdefs.h <<\EOF
18473 #define NEED_WCHAR_H 1
18479 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
18480 if test "$cf_cv_mbstate_t" = unknown ; then
18481 NCURSES_MBSTATE_T=1
18484 # if we find mbstate_t in either place, use substitution to provide a fallback.
18485 if test "$cf_cv_mbstate_t" != unknown ; then
18486 NCURSES_OK_MBSTATE_T=1
18489 # This is needed on Tru64 5.0 to declare wchar_t
18490 echo "$as_me:18490: checking if we must include wchar.h to declare wchar_t" >&5
18491 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
18492 if test "${cf_cv_wchar_t+set}" = set; then
18493 echo $ECHO_N "(cached) $ECHO_C" >&6
18496 cat >conftest.$ac_ext <<_ACEOF
18497 #line 18497 "configure"
18498 #include "confdefs.h"
18500 #include <stdlib.h>
18501 #include <stdarg.h>
18503 #ifdef HAVE_LIBUTF8_H
18504 #include <libutf8.h>
18514 rm -f conftest.$ac_objext
18515 if { (eval echo "$as_me:18515: \"$ac_compile\"") >&5
18516 (eval $ac_compile) 2>&5
18518 echo "$as_me:18518: \$? = $ac_status" >&5
18519 (exit $ac_status); } &&
18520 { ac_try='test -s conftest.$ac_objext'
18521 { (eval echo "$as_me:18521: \"$ac_try\"") >&5
18522 (eval $ac_try) 2>&5
18524 echo "$as_me:18524: \$? = $ac_status" >&5
18525 (exit $ac_status); }; }; then
18528 echo "$as_me: failed program was:" >&5
18529 cat conftest.$ac_ext >&5
18530 cat >conftest.$ac_ext <<_ACEOF
18531 #line 18531 "configure"
18532 #include "confdefs.h"
18534 #include <stdlib.h>
18535 #include <stdarg.h>
18538 #ifdef HAVE_LIBUTF8_H
18539 #include <libutf8.h>
18549 rm -f conftest.$ac_objext
18550 if { (eval echo "$as_me:18550: \"$ac_compile\"") >&5
18551 (eval $ac_compile) 2>&5
18553 echo "$as_me:18553: \$? = $ac_status" >&5
18554 (exit $ac_status); } &&
18555 { ac_try='test -s conftest.$ac_objext'
18556 { (eval echo "$as_me:18556: \"$ac_try\"") >&5
18557 (eval $ac_try) 2>&5
18559 echo "$as_me:18559: \$? = $ac_status" >&5
18560 (exit $ac_status); }; }; then
18563 echo "$as_me: failed program was:" >&5
18564 cat conftest.$ac_ext >&5
18565 cf_cv_wchar_t=unknown
18567 rm -f conftest.$ac_objext conftest.$ac_ext
18569 rm -f conftest.$ac_objext conftest.$ac_ext
18571 echo "$as_me:18571: result: $cf_cv_wchar_t" >&5
18572 echo "${ECHO_T}$cf_cv_wchar_t" >&6
18574 if test "$cf_cv_wchar_t" = yes ; then
18576 cat >>confdefs.h <<\EOF
18577 #define NEED_WCHAR_H 1
18583 # if we do not find wchar_t in either place, use substitution to provide a fallback.
18584 if test "$cf_cv_wchar_t" = unknown ; then
18588 # if we find wchar_t in either place, use substitution to provide a fallback.
18589 if test "$cf_cv_wchar_t" != unknown ; then
18590 NCURSES_OK_WCHAR_T=1
18593 # This is needed on Tru64 5.0 to declare wint_t
18594 echo "$as_me:18594: checking if we must include wchar.h to declare wint_t" >&5
18595 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
18596 if test "${cf_cv_wint_t+set}" = set; then
18597 echo $ECHO_N "(cached) $ECHO_C" >&6
18600 cat >conftest.$ac_ext <<_ACEOF
18601 #line 18601 "configure"
18602 #include "confdefs.h"
18604 #include <stdlib.h>
18605 #include <stdarg.h>
18607 #ifdef HAVE_LIBUTF8_H
18608 #include <libutf8.h>
18618 rm -f conftest.$ac_objext
18619 if { (eval echo "$as_me:18619: \"$ac_compile\"") >&5
18620 (eval $ac_compile) 2>&5
18622 echo "$as_me:18622: \$? = $ac_status" >&5
18623 (exit $ac_status); } &&
18624 { ac_try='test -s conftest.$ac_objext'
18625 { (eval echo "$as_me:18625: \"$ac_try\"") >&5
18626 (eval $ac_try) 2>&5
18628 echo "$as_me:18628: \$? = $ac_status" >&5
18629 (exit $ac_status); }; }; then
18632 echo "$as_me: failed program was:" >&5
18633 cat conftest.$ac_ext >&5
18634 cat >conftest.$ac_ext <<_ACEOF
18635 #line 18635 "configure"
18636 #include "confdefs.h"
18638 #include <stdlib.h>
18639 #include <stdarg.h>
18642 #ifdef HAVE_LIBUTF8_H
18643 #include <libutf8.h>
18653 rm -f conftest.$ac_objext
18654 if { (eval echo "$as_me:18654: \"$ac_compile\"") >&5
18655 (eval $ac_compile) 2>&5
18657 echo "$as_me:18657: \$? = $ac_status" >&5
18658 (exit $ac_status); } &&
18659 { ac_try='test -s conftest.$ac_objext'
18660 { (eval echo "$as_me:18660: \"$ac_try\"") >&5
18661 (eval $ac_try) 2>&5
18663 echo "$as_me:18663: \$? = $ac_status" >&5
18664 (exit $ac_status); }; }; then
18667 echo "$as_me: failed program was:" >&5
18668 cat conftest.$ac_ext >&5
18669 cf_cv_wint_t=unknown
18671 rm -f conftest.$ac_objext conftest.$ac_ext
18673 rm -f conftest.$ac_objext conftest.$ac_ext
18675 echo "$as_me:18675: result: $cf_cv_wint_t" >&5
18676 echo "${ECHO_T}$cf_cv_wint_t" >&6
18678 if test "$cf_cv_wint_t" = yes ; then
18680 cat >>confdefs.h <<\EOF
18681 #define NEED_WCHAR_H 1
18687 # if we do not find wint_t in either place, use substitution to provide a fallback.
18688 if test "$cf_cv_wint_t" = unknown ; then
18692 # if we find wint_t in either place, use substitution to provide a fallback.
18693 if test "$cf_cv_wint_t" != unknown ; then
18694 NCURSES_OK_WINT_T=1
18697 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
18699 echo "$as_me:18699: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
18700 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
18701 cat >conftest.$ac_ext <<_ACEOF
18702 #line 18702 "configure"
18703 #include "confdefs.h"
18705 #ifndef _XOPEN_SOURCE_EXTENDED
18706 #define _XOPEN_SOURCE_EXTENDED
18708 #include <${cf_cv_ncurses_header:-curses.h}>
18719 rm -f conftest.$ac_objext
18720 if { (eval echo "$as_me:18720: \"$ac_compile\"") >&5
18721 (eval $ac_compile) 2>&5
18723 echo "$as_me:18723: \$? = $ac_status" >&5
18724 (exit $ac_status); } &&
18725 { ac_try='test -s conftest.$ac_objext'
18726 { (eval echo "$as_me:18726: \"$ac_try\"") >&5
18727 (eval $ac_try) 2>&5
18729 echo "$as_me:18729: \$? = $ac_status" >&5
18730 (exit $ac_status); }; }; then
18733 echo "$as_me: failed program was:" >&5
18734 cat conftest.$ac_ext >&5
18737 rm -f conftest.$ac_objext conftest.$ac_ext
18738 echo "$as_me:18738: result: $cf_result" >&5
18739 echo "${ECHO_T}$cf_result" >&6
18740 if test $cf_result = yes ; then
18742 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18744 cat >>confdefs.h <<EOF
18745 #define $cf_result 1
18750 cat >>confdefs.h <<EOF
18751 #define mbstate_t long
18758 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
18760 echo "$as_me:18760: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
18761 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
18762 cat >conftest.$ac_ext <<_ACEOF
18763 #line 18763 "configure"
18764 #include "confdefs.h"
18766 #ifndef _XOPEN_SOURCE_EXTENDED
18767 #define _XOPEN_SOURCE_EXTENDED
18769 #include <${cf_cv_ncurses_header:-curses.h}>
18780 rm -f conftest.$ac_objext
18781 if { (eval echo "$as_me:18781: \"$ac_compile\"") >&5
18782 (eval $ac_compile) 2>&5
18784 echo "$as_me:18784: \$? = $ac_status" >&5
18785 (exit $ac_status); } &&
18786 { ac_try='test -s conftest.$ac_objext'
18787 { (eval echo "$as_me:18787: \"$ac_try\"") >&5
18788 (eval $ac_try) 2>&5
18790 echo "$as_me:18790: \$? = $ac_status" >&5
18791 (exit $ac_status); }; }; then
18794 echo "$as_me: failed program was:" >&5
18795 cat conftest.$ac_ext >&5
18798 rm -f conftest.$ac_objext conftest.$ac_ext
18799 echo "$as_me:18799: result: $cf_result" >&5
18800 echo "${ECHO_T}$cf_result" >&6
18801 if test $cf_result = yes ; then
18803 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18805 cat >>confdefs.h <<EOF
18806 #define $cf_result 1
18811 cat >>confdefs.h <<EOF
18812 #define wchar_t long
18819 if test "$NCURSES_OK_WINT_T" = 0 ; then
18821 echo "$as_me:18821: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
18822 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
18823 cat >conftest.$ac_ext <<_ACEOF
18824 #line 18824 "configure"
18825 #include "confdefs.h"
18827 #ifndef _XOPEN_SOURCE_EXTENDED
18828 #define _XOPEN_SOURCE_EXTENDED
18830 #include <${cf_cv_ncurses_header:-curses.h}>
18841 rm -f conftest.$ac_objext
18842 if { (eval echo "$as_me:18842: \"$ac_compile\"") >&5
18843 (eval $ac_compile) 2>&5
18845 echo "$as_me:18845: \$? = $ac_status" >&5
18846 (exit $ac_status); } &&
18847 { ac_try='test -s conftest.$ac_objext'
18848 { (eval echo "$as_me:18848: \"$ac_try\"") >&5
18849 (eval $ac_try) 2>&5
18851 echo "$as_me:18851: \$? = $ac_status" >&5
18852 (exit $ac_status); }; }; then
18855 echo "$as_me: failed program was:" >&5
18856 cat conftest.$ac_ext >&5
18859 rm -f conftest.$ac_objext conftest.$ac_ext
18860 echo "$as_me:18860: result: $cf_result" >&5
18861 echo "${ECHO_T}$cf_result" >&6
18862 if test $cf_result = yes ; then
18864 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18866 cat >>confdefs.h <<EOF
18867 #define $cf_result 1
18872 cat >>confdefs.h <<EOF
18873 #define wint_t long
18888 echo "$as_me:18888: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
18889 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
18891 cat >conftest.$ac_ext <<_ACEOF
18892 #line 18892 "configure"
18893 #include "confdefs.h"
18895 #ifdef HAVE_XCURSES
18896 #include <xcurses.h>
18897 char * XCursesProgramName = "test";
18899 #include <${cf_cv_ncurses_header:-curses.h}>
18900 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
18901 #include <ncursesw/term.h>
18902 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
18903 #include <ncurses/term.h>
18904 #elif defined(HAVE_TERM_H)
18913 void *foo = &($cf_data)
18919 rm -f conftest.$ac_objext
18920 if { (eval echo "$as_me:18920: \"$ac_compile\"") >&5
18921 (eval $ac_compile) 2>&5
18923 echo "$as_me:18923: \$? = $ac_status" >&5
18924 (exit $ac_status); } &&
18925 { ac_try='test -s conftest.$ac_objext'
18926 { (eval echo "$as_me:18926: \"$ac_try\"") >&5
18927 (eval $ac_try) 2>&5
18929 echo "$as_me:18929: \$? = $ac_status" >&5
18930 (exit $ac_status); }; }; then
18934 echo "$as_me: failed program was:" >&5
18935 cat conftest.$ac_ext >&5
18938 rm -f conftest.$ac_objext conftest.$ac_ext
18939 echo "$as_me:18939: result: $cf_result" >&5
18940 echo "${ECHO_T}$cf_result" >&6
18942 if test $cf_result = yes ; then
18944 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18946 cat >>confdefs.h <<EOF
18947 #define $cf_result 1
18951 echo "$as_me:18951: checking for data $cf_data in library" >&5
18952 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
18953 # BSD linkers insist on making weak linkage, but resolve at runtime.
18954 if test "$cross_compiling" = yes; then
18957 cat >conftest.$ac_ext <<_ACEOF
18958 #line 18958 "configure"
18959 #include "confdefs.h"
18961 #ifdef HAVE_XCURSES
18962 #include <xcurses.h>
18963 char * XCursesProgramName = "test";
18965 #include <${cf_cv_ncurses_header:-curses.h}>
18966 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
18967 #include <ncursesw/term.h>
18968 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
18969 #include <ncurses/term.h>
18970 #elif defined(HAVE_TERM_H)
18975 extern char $cf_data;
18981 void *foo = &($cf_data);
18982 fprintf(stderr, "testing linkage of $cf_data:%p\n", (void *)foo);
18983 ${cf_cv_main_return:-return}(foo == 0);
18990 rm -f conftest.$ac_objext conftest$ac_exeext
18991 if { (eval echo "$as_me:18991: \"$ac_link\"") >&5
18992 (eval $ac_link) 2>&5
18994 echo "$as_me:18994: \$? = $ac_status" >&5
18995 (exit $ac_status); } &&
18996 { ac_try='test -s conftest$ac_exeext'
18997 { (eval echo "$as_me:18997: \"$ac_try\"") >&5
18998 (eval $ac_try) 2>&5
19000 echo "$as_me:19000: \$? = $ac_status" >&5
19001 (exit $ac_status); }; }; then
19004 echo "$as_me: failed program was:" >&5
19005 cat conftest.$ac_ext >&5
19008 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19011 cat >conftest.$ac_ext <<_ACEOF
19012 #line 19012 "configure"
19013 #include "confdefs.h"
19015 #ifdef HAVE_XCURSES
19016 #include <xcurses.h>
19017 char * XCursesProgramName = "test";
19019 #include <${cf_cv_ncurses_header:-curses.h}>
19020 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19021 #include <ncursesw/term.h>
19022 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19023 #include <ncurses/term.h>
19024 #elif defined(HAVE_TERM_H)
19029 extern char $cf_data;
19032 void *foo = &($cf_data);
19033 fprintf(stderr, "testing linkage of $cf_data:%p\n", (void *)foo);
19034 ${cf_cv_main_return:-return}(foo == 0);
19037 rm -f conftest$ac_exeext
19038 if { (eval echo "$as_me:19038: \"$ac_link\"") >&5
19039 (eval $ac_link) 2>&5
19041 echo "$as_me:19041: \$? = $ac_status" >&5
19042 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19043 { (eval echo "$as_me:19043: \"$ac_try\"") >&5
19044 (eval $ac_try) 2>&5
19046 echo "$as_me:19046: \$? = $ac_status" >&5
19047 (exit $ac_status); }; }; then
19051 echo "$as_me: program exited with status $ac_status" >&5
19052 echo "$as_me: failed program was:" >&5
19053 cat conftest.$ac_ext >&5
19056 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19058 echo "$as_me:19058: result: $cf_result" >&5
19059 echo "${ECHO_T}$cf_result" >&6
19060 if test $cf_result = yes ; then
19062 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19064 cat >>confdefs.h <<EOF
19065 #define $cf_result 1
19068 # do not exit loop here, since we prefer system's declarations
19073 if ( test "$GCC" = yes || test "$GXX" = yes )
19075 echo "$as_me:19075: checking if you want to turn on gcc warnings" >&5
19076 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
19078 # Check whether --enable-warnings or --disable-warnings was given.
19079 if test "${enable_warnings+set}" = set; then
19080 enableval="$enable_warnings"
19081 test "$enableval" != yes && enableval=no
19082 if test "$enableval" != "no" ; then
19092 echo "$as_me:19092: result: $with_warnings" >&5
19093 echo "${ECHO_T}$with_warnings" >&6
19094 if test "$with_warnings" = "yes"
19097 if test "$GCC" = yes
19099 cat > conftest.i <<EOF
19101 #define GCC_PRINTF 0
19104 #define GCC_SCANF 0
19106 #ifndef GCC_NORETURN
19107 #define GCC_NORETURN /* nothing */
19110 #define GCC_UNUSED /* nothing */
19113 if test "$GCC" = yes
19115 { echo "$as_me:19115: checking for $CC __attribute__ directives..." >&5
19116 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
19117 cat > conftest.$ac_ext <<EOF
19118 #line 19118 "${as_me:-configure}"
19119 #include "confdefs.h"
19120 #include "conftest.h"
19121 #include "conftest.i"
19123 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
19125 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
19128 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
19130 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
19132 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
19133 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
19134 extern void foo(void) GCC_NORETURN;
19135 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
19137 cf_printf_attribute=no
19138 cf_scanf_attribute=no
19139 for cf_attribute in scanf printf unused noreturn
19142 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19144 cf_directive="__attribute__(($cf_attribute))"
19145 echo "checking for $CC $cf_directive" 1>&5
19147 case $cf_attribute in
19149 cf_printf_attribute=yes
19150 cat >conftest.h <<EOF
19151 #define GCC_$cf_ATTRIBUTE 1
19155 cf_scanf_attribute=yes
19156 cat >conftest.h <<EOF
19157 #define GCC_$cf_ATTRIBUTE 1
19161 cat >conftest.h <<EOF
19162 #define GCC_$cf_ATTRIBUTE $cf_directive
19167 if { (eval echo "$as_me:19167: \"$ac_compile\"") >&5
19168 (eval $ac_compile) 2>&5
19170 echo "$as_me:19170: \$? = $ac_status" >&5
19171 (exit $ac_status); }; then
19172 test -n "$verbose" && echo "$as_me:19172: result: ... $cf_attribute" >&5
19173 echo "${ECHO_T}... $cf_attribute" >&6
19174 cat conftest.h >>confdefs.h
19175 case $cf_attribute in
19178 cat >>confdefs.h <<EOF
19179 #define GCC_NORETURN $cf_directive
19184 cf_value='/* nothing */'
19185 if test "$cf_printf_attribute" != no ; then
19186 cf_value='__attribute__((format(printf,fmt,var)))'
19188 cat >>confdefs.h <<\EOF
19189 #define GCC_PRINTF 1
19194 cat >>confdefs.h <<EOF
19195 #define GCC_PRINTFLIKE(fmt,var) $cf_value
19200 cf_value='/* nothing */'
19201 if test "$cf_scanf_attribute" != no ; then
19202 cf_value='__attribute__((format(scanf,fmt,var)))'
19204 cat >>confdefs.h <<\EOF
19205 #define GCC_SCANF 1
19210 cat >>confdefs.h <<EOF
19211 #define GCC_SCANFLIKE(fmt,var) $cf_value
19217 cat >>confdefs.h <<EOF
19218 #define GCC_UNUSED $cf_directive
19226 fgrep define conftest.i >>confdefs.h
19233 if test "$GCC" = yes ; then
19236 echo "$as_me:19236: checking if this is really Intel C compiler" >&5
19237 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
19238 cf_save_CFLAGS="$CFLAGS"
19239 CFLAGS="$CFLAGS -no-gcc"
19240 cat >conftest.$ac_ext <<_ACEOF
19241 #line 19241 "configure"
19242 #include "confdefs.h"
19248 #ifdef __INTEL_COMPILER
19257 rm -f conftest.$ac_objext
19258 if { (eval echo "$as_me:19258: \"$ac_compile\"") >&5
19259 (eval $ac_compile) 2>&5
19261 echo "$as_me:19261: \$? = $ac_status" >&5
19262 (exit $ac_status); } &&
19263 { ac_try='test -s conftest.$ac_objext'
19264 { (eval echo "$as_me:19264: \"$ac_try\"") >&5
19265 (eval $ac_try) 2>&5
19267 echo "$as_me:19267: \$? = $ac_status" >&5
19268 (exit $ac_status); }; }; then
19270 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
19273 echo "$as_me: failed program was:" >&5
19274 cat conftest.$ac_ext >&5
19276 rm -f conftest.$ac_objext conftest.$ac_ext
19277 CFLAGS="$cf_save_CFLAGS"
19278 echo "$as_me:19278: result: $INTEL_COMPILER" >&5
19279 echo "${ECHO_T}$INTEL_COMPILER" >&6
19286 if test "$GCC" = yes ; then
19287 echo "$as_me:19287: checking if this is really Clang C compiler" >&5
19288 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
19289 cf_save_CFLAGS="$CFLAGS"
19290 CFLAGS="$CFLAGS -Qunused-arguments"
19291 cat >conftest.$ac_ext <<_ACEOF
19292 #line 19292 "configure"
19293 #include "confdefs.h"
19308 rm -f conftest.$ac_objext
19309 if { (eval echo "$as_me:19309: \"$ac_compile\"") >&5
19310 (eval $ac_compile) 2>&5
19312 echo "$as_me:19312: \$? = $ac_status" >&5
19313 (exit $ac_status); } &&
19314 { ac_try='test -s conftest.$ac_objext'
19315 { (eval echo "$as_me:19315: \"$ac_try\"") >&5
19316 (eval $ac_try) 2>&5
19318 echo "$as_me:19318: \$? = $ac_status" >&5
19319 (exit $ac_status); }; }; then
19321 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
19324 echo "$as_me: failed program was:" >&5
19325 cat conftest.$ac_ext >&5
19327 rm -f conftest.$ac_objext conftest.$ac_ext
19328 CFLAGS="$cf_save_CFLAGS"
19329 echo "$as_me:19329: result: $CLANG_COMPILER" >&5
19330 echo "${ECHO_T}$CLANG_COMPILER" >&6
19333 cat > conftest.$ac_ext <<EOF
19334 #line 19334 "${as_me:-configure}"
19335 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
19338 if test "$INTEL_COMPILER" = yes
19340 # The "-wdXXX" options suppress warnings:
19341 # remark #1419: external declaration in primary source file
19342 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
19343 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
19344 # remark #193: zero used for undefined preprocessing identifier
19345 # remark #593: variable "curs_sb_left_arrow" was set but never used
19346 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
19347 # remark #869: parameter "tw" was never referenced
19348 # remark #981: operands are evaluated in unspecified order
19349 # warning #279: controlling expression is constant
19351 { echo "$as_me:19351: checking for $CC warning options..." >&5
19352 echo "$as_me: checking for $CC warning options..." >&6;}
19353 cf_save_CFLAGS="$CFLAGS"
19354 EXTRA_CFLAGS="-Wall"
19366 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
19367 if { (eval echo "$as_me:19367: \"$ac_compile\"") >&5
19368 (eval $ac_compile) 2>&5
19370 echo "$as_me:19370: \$? = $ac_status" >&5
19371 (exit $ac_status); }; then
19372 test -n "$verbose" && echo "$as_me:19372: result: ... -$cf_opt" >&5
19373 echo "${ECHO_T}... -$cf_opt" >&6
19374 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
19377 CFLAGS="$cf_save_CFLAGS"
19379 elif test "$GCC" = yes
19381 { echo "$as_me:19381: checking for $CC warning options..." >&5
19382 echo "$as_me: checking for $CC warning options..." >&6;}
19383 cf_save_CFLAGS="$CFLAGS"
19386 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
19387 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
19388 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
19389 for cf_opt in W Wall \
19390 Wbad-function-cast \
19393 Wdeclaration-after-statement \
19396 Wmissing-declarations \
19397 Wmissing-prototypes \
19401 Wstrict-prototypes \
19402 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
19404 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
19405 if { (eval echo "$as_me:19405: \"$ac_compile\"") >&5
19406 (eval $ac_compile) 2>&5
19408 echo "$as_me:19408: \$? = $ac_status" >&5
19409 (exit $ac_status); }; then
19410 test -n "$verbose" && echo "$as_me:19410: result: ... -$cf_opt" >&5
19411 echo "${ECHO_T}... -$cf_opt" >&6
19415 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19416 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
19420 case $GCC_VERSION in
19422 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
19424 echo "${as_me:-configure}:19424: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
19430 case $GCC_VERSION in
19432 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
19434 echo "${as_me:-configure}:19434: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
19440 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
19443 CFLAGS="$cf_save_CFLAGS"
19450 echo "$as_me:19450: checking if you want to use dmalloc for testing" >&5
19451 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
19453 # Check whether --with-dmalloc or --without-dmalloc was given.
19454 if test "${with_dmalloc+set}" = set; then
19455 withval="$with_dmalloc"
19457 cat >>confdefs.h <<EOF
19458 #define USE_DMALLOC 1
19461 : ${with_cflags:=-g}
19462 : ${with_no_leaks:=yes}
19467 echo "$as_me:19467: result: ${with_dmalloc:-no}" >&5
19468 echo "${ECHO_T}${with_dmalloc:-no}" >&6
19470 case .$with_cflags in
19480 cf_new_extra_cppflags=
19482 for cf_add_cflags in -g
19484 case $cf_fix_cppflags in
19486 case $cf_add_cflags in
19487 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19488 case $cf_add_cflags in
19490 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19492 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19493 && test -z "${cf_tst_cflags}" \
19494 && cf_fix_cppflags=yes
19496 if test $cf_fix_cppflags = yes ; then
19498 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19499 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19502 elif test "${cf_tst_cflags}" = "\"'" ; then
19504 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19505 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19511 case "$CPPFLAGS" in
19515 case $cf_add_cflags in
19517 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19519 CPPFLAGS=`echo "$CPPFLAGS" | \
19520 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
19521 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
19526 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19527 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19534 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19535 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19542 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19543 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19545 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19547 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19548 && test -z "${cf_tst_cflags}" \
19549 && cf_fix_cppflags=no
19554 if test -n "$cf_new_cflags" ; then
19556 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19557 CFLAGS="${CFLAGS}$cf_new_cflags"
19561 if test -n "$cf_new_cppflags" ; then
19563 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19564 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19568 if test -n "$cf_new_extra_cppflags" ; then
19570 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19571 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19580 if test "$with_dmalloc" = yes ; then
19581 echo "$as_me:19581: checking for dmalloc.h" >&5
19582 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
19583 if test "${ac_cv_header_dmalloc_h+set}" = set; then
19584 echo $ECHO_N "(cached) $ECHO_C" >&6
19586 cat >conftest.$ac_ext <<_ACEOF
19587 #line 19587 "configure"
19588 #include "confdefs.h"
19589 #include <dmalloc.h>
19591 if { (eval echo "$as_me:19591: \"$ac_cpp conftest.$ac_ext\"") >&5
19592 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19594 egrep -v '^ *\+' conftest.er1 >conftest.err
19596 cat conftest.err >&5
19597 echo "$as_me:19597: \$? = $ac_status" >&5
19598 (exit $ac_status); } >/dev/null; then
19599 if test -s conftest.err; then
19600 ac_cpp_err=$ac_c_preproc_warn_flag
19607 if test -z "$ac_cpp_err"; then
19608 ac_cv_header_dmalloc_h=yes
19610 echo "$as_me: failed program was:" >&5
19611 cat conftest.$ac_ext >&5
19612 ac_cv_header_dmalloc_h=no
19614 rm -f conftest.err conftest.$ac_ext
19616 echo "$as_me:19616: result: $ac_cv_header_dmalloc_h" >&5
19617 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
19618 if test $ac_cv_header_dmalloc_h = yes; then
19620 echo "$as_me:19620: checking for dmalloc_debug in -ldmalloc" >&5
19621 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
19622 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
19623 echo $ECHO_N "(cached) $ECHO_C" >&6
19625 ac_check_lib_save_LIBS=$LIBS
19626 LIBS="-ldmalloc $LIBS"
19627 cat >conftest.$ac_ext <<_ACEOF
19628 #line 19628 "configure"
19629 #include "confdefs.h"
19631 /* Override any gcc2 internal prototype to avoid an error. */
19635 /* We use char because int might match the return type of a gcc2
19636 builtin and then its argument prototype would still apply. */
19637 char dmalloc_debug ();
19646 rm -f conftest.$ac_objext conftest$ac_exeext
19647 if { (eval echo "$as_me:19647: \"$ac_link\"") >&5
19648 (eval $ac_link) 2>&5
19650 echo "$as_me:19650: \$? = $ac_status" >&5
19651 (exit $ac_status); } &&
19652 { ac_try='test -s conftest$ac_exeext'
19653 { (eval echo "$as_me:19653: \"$ac_try\"") >&5
19654 (eval $ac_try) 2>&5
19656 echo "$as_me:19656: \$? = $ac_status" >&5
19657 (exit $ac_status); }; }; then
19658 ac_cv_lib_dmalloc_dmalloc_debug=yes
19660 echo "$as_me: failed program was:" >&5
19661 cat conftest.$ac_ext >&5
19662 ac_cv_lib_dmalloc_dmalloc_debug=no
19664 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19665 LIBS=$ac_check_lib_save_LIBS
19667 echo "$as_me:19667: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
19668 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
19669 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
19670 cat >>confdefs.h <<EOF
19671 #define HAVE_LIBDMALLOC 1
19674 LIBS="-ldmalloc $LIBS"
19682 echo "$as_me:19682: checking if you want to use dbmalloc for testing" >&5
19683 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
19685 # Check whether --with-dbmalloc or --without-dbmalloc was given.
19686 if test "${with_dbmalloc+set}" = set; then
19687 withval="$with_dbmalloc"
19689 cat >>confdefs.h <<EOF
19690 #define USE_DBMALLOC 1
19693 : ${with_cflags:=-g}
19694 : ${with_no_leaks:=yes}
19699 echo "$as_me:19699: result: ${with_dbmalloc:-no}" >&5
19700 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
19702 case .$with_cflags in
19712 cf_new_extra_cppflags=
19714 for cf_add_cflags in -g
19716 case $cf_fix_cppflags in
19718 case $cf_add_cflags in
19719 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19720 case $cf_add_cflags in
19722 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19724 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19725 && test -z "${cf_tst_cflags}" \
19726 && cf_fix_cppflags=yes
19728 if test $cf_fix_cppflags = yes ; then
19730 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19731 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19734 elif test "${cf_tst_cflags}" = "\"'" ; then
19736 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19737 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19743 case "$CPPFLAGS" in
19747 case $cf_add_cflags in
19749 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19751 CPPFLAGS=`echo "$CPPFLAGS" | \
19752 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
19753 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
19758 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19759 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19766 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19767 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19774 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19775 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19777 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19779 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19780 && test -z "${cf_tst_cflags}" \
19781 && cf_fix_cppflags=no
19786 if test -n "$cf_new_cflags" ; then
19788 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19789 CFLAGS="${CFLAGS}$cf_new_cflags"
19793 if test -n "$cf_new_cppflags" ; then
19795 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19796 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19800 if test -n "$cf_new_extra_cppflags" ; then
19802 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19803 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19812 if test "$with_dbmalloc" = yes ; then
19813 echo "$as_me:19813: checking for dbmalloc.h" >&5
19814 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
19815 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
19816 echo $ECHO_N "(cached) $ECHO_C" >&6
19818 cat >conftest.$ac_ext <<_ACEOF
19819 #line 19819 "configure"
19820 #include "confdefs.h"
19821 #include <dbmalloc.h>
19823 if { (eval echo "$as_me:19823: \"$ac_cpp conftest.$ac_ext\"") >&5
19824 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19826 egrep -v '^ *\+' conftest.er1 >conftest.err
19828 cat conftest.err >&5
19829 echo "$as_me:19829: \$? = $ac_status" >&5
19830 (exit $ac_status); } >/dev/null; then
19831 if test -s conftest.err; then
19832 ac_cpp_err=$ac_c_preproc_warn_flag
19839 if test -z "$ac_cpp_err"; then
19840 ac_cv_header_dbmalloc_h=yes
19842 echo "$as_me: failed program was:" >&5
19843 cat conftest.$ac_ext >&5
19844 ac_cv_header_dbmalloc_h=no
19846 rm -f conftest.err conftest.$ac_ext
19848 echo "$as_me:19848: result: $ac_cv_header_dbmalloc_h" >&5
19849 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
19850 if test $ac_cv_header_dbmalloc_h = yes; then
19852 echo "$as_me:19852: checking for debug_malloc in -ldbmalloc" >&5
19853 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
19854 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
19855 echo $ECHO_N "(cached) $ECHO_C" >&6
19857 ac_check_lib_save_LIBS=$LIBS
19858 LIBS="-ldbmalloc $LIBS"
19859 cat >conftest.$ac_ext <<_ACEOF
19860 #line 19860 "configure"
19861 #include "confdefs.h"
19863 /* Override any gcc2 internal prototype to avoid an error. */
19867 /* We use char because int might match the return type of a gcc2
19868 builtin and then its argument prototype would still apply. */
19869 char debug_malloc ();
19878 rm -f conftest.$ac_objext conftest$ac_exeext
19879 if { (eval echo "$as_me:19879: \"$ac_link\"") >&5
19880 (eval $ac_link) 2>&5
19882 echo "$as_me:19882: \$? = $ac_status" >&5
19883 (exit $ac_status); } &&
19884 { ac_try='test -s conftest$ac_exeext'
19885 { (eval echo "$as_me:19885: \"$ac_try\"") >&5
19886 (eval $ac_try) 2>&5
19888 echo "$as_me:19888: \$? = $ac_status" >&5
19889 (exit $ac_status); }; }; then
19890 ac_cv_lib_dbmalloc_debug_malloc=yes
19892 echo "$as_me: failed program was:" >&5
19893 cat conftest.$ac_ext >&5
19894 ac_cv_lib_dbmalloc_debug_malloc=no
19896 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19897 LIBS=$ac_check_lib_save_LIBS
19899 echo "$as_me:19899: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
19900 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
19901 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
19902 cat >>confdefs.h <<EOF
19903 #define HAVE_LIBDBMALLOC 1
19906 LIBS="-ldbmalloc $LIBS"
19914 echo "$as_me:19914: checking if you want to use valgrind for testing" >&5
19915 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
19917 # Check whether --with-valgrind or --without-valgrind was given.
19918 if test "${with_valgrind+set}" = set; then
19919 withval="$with_valgrind"
19921 cat >>confdefs.h <<EOF
19922 #define USE_VALGRIND 1
19925 : ${with_cflags:=-g}
19926 : ${with_no_leaks:=yes}
19931 echo "$as_me:19931: result: ${with_valgrind:-no}" >&5
19932 echo "${ECHO_T}${with_valgrind:-no}" >&6
19934 case .$with_cflags in
19944 cf_new_extra_cppflags=
19946 for cf_add_cflags in -g
19948 case $cf_fix_cppflags in
19950 case $cf_add_cflags in
19951 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19952 case $cf_add_cflags in
19954 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19956 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19957 && test -z "${cf_tst_cflags}" \
19958 && cf_fix_cppflags=yes
19960 if test $cf_fix_cppflags = yes ; then
19962 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19963 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19966 elif test "${cf_tst_cflags}" = "\"'" ; then
19968 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19969 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19975 case "$CPPFLAGS" in
19979 case $cf_add_cflags in
19981 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19983 CPPFLAGS=`echo "$CPPFLAGS" | \
19984 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
19985 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
19990 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19991 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19998 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19999 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20006 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20007 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20009 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20011 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20012 && test -z "${cf_tst_cflags}" \
20013 && cf_fix_cppflags=no
20018 if test -n "$cf_new_cflags" ; then
20020 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20021 CFLAGS="${CFLAGS}$cf_new_cflags"
20025 if test -n "$cf_new_cppflags" ; then
20027 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20028 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20032 if test -n "$cf_new_extra_cppflags" ; then
20034 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20035 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20044 echo "$as_me:20044: checking if you want to perform memory-leak testing" >&5
20045 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
20047 # Check whether --enable-leaks or --disable-leaks was given.
20048 if test "${enable_leaks+set}" = set; then
20049 enableval="$enable_leaks"
20050 if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
20052 : ${with_no_leaks:=no}
20054 echo "$as_me:20054: result: $with_no_leaks" >&5
20055 echo "${ECHO_T}$with_no_leaks" >&6
20057 if test "$with_no_leaks" = yes ; then
20059 cat >>confdefs.h <<\EOF
20063 cat >>confdefs.h <<\EOF
20064 #define YY_NO_LEAKS 1
20070 echo "$as_me:20070: checking for an rpath option" >&5
20071 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
20072 case $cf_cv_system_name in
20074 if test "$GCC" = yes; then
20075 LD_RPATH_OPT="-Wl,-rpath,"
20077 LD_RPATH_OPT="-rpath "
20080 (linux*|gnu*|k*bsd*-gnu|freebsd*)
20081 LD_RPATH_OPT="-Wl,-rpath,"
20083 (openbsd[2-9].*|mirbsd*)
20084 LD_RPATH_OPT="-Wl,-rpath,"
20087 LD_RPATH_OPT="-rpath "
20090 LD_RPATH_OPT="-Wl,-rpath,"
20093 LD_RPATH_OPT="-rpath "
20101 echo "$as_me:20101: result: $LD_RPATH_OPT" >&5
20102 echo "${ECHO_T}$LD_RPATH_OPT" >&6
20104 case "x$LD_RPATH_OPT" in
20106 echo "$as_me:20106: checking if we need a space after rpath option" >&5
20107 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
20108 cf_save_LIBS="$LIBS"
20110 cf_add_libs="${LD_RPATH_OPT}$libdir"
20111 # Filter out duplicates - this happens with badly-designed ".pc" files...
20112 for cf_add_1lib in $LIBS
20114 for cf_add_2lib in $cf_add_libs
20116 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20122 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20124 LIBS="$cf_add_libs"
20126 cat >conftest.$ac_ext <<_ACEOF
20127 #line 20127 "configure"
20128 #include "confdefs.h"
20138 rm -f conftest.$ac_objext conftest$ac_exeext
20139 if { (eval echo "$as_me:20139: \"$ac_link\"") >&5
20140 (eval $ac_link) 2>&5
20142 echo "$as_me:20142: \$? = $ac_status" >&5
20143 (exit $ac_status); } &&
20144 { ac_try='test -s conftest$ac_exeext'
20145 { (eval echo "$as_me:20145: \"$ac_try\"") >&5
20146 (eval $ac_try) 2>&5
20148 echo "$as_me:20148: \$? = $ac_status" >&5
20149 (exit $ac_status); }; }; then
20152 echo "$as_me: failed program was:" >&5
20153 cat conftest.$ac_ext >&5
20156 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20157 LIBS="$cf_save_LIBS"
20158 echo "$as_me:20158: result: $cf_rpath_space" >&5
20159 echo "${ECHO_T}$cf_rpath_space" >&6
20160 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
20164 echo "$as_me:20164: checking if rpath-hack should be disabled" >&5
20165 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
20167 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
20168 if test "${enable_rpath_hack+set}" = set; then
20169 enableval="$enable_rpath_hack"
20170 test "$enableval" != no && enableval=yes
20171 if test "$enableval" != "yes" ; then
20172 cf_disable_rpath_hack=yes
20174 cf_disable_rpath_hack=no
20178 cf_disable_rpath_hack=no
20181 echo "$as_me:20181: result: $cf_disable_rpath_hack" >&5
20182 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
20183 if test "$cf_disable_rpath_hack" = no ; then
20185 echo "$as_me:20185: checking for updated LDFLAGS" >&5
20186 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
20187 if test -n "$LD_RPATH_OPT" ; then
20188 echo "$as_me:20188: result: maybe" >&5
20189 echo "${ECHO_T}maybe" >&6
20193 # Extract the first word of "$ac_prog", so it can be a program name with args.
20194 set dummy $ac_prog; ac_word=$2
20195 echo "$as_me:20195: checking for $ac_word" >&5
20196 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20197 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
20198 echo $ECHO_N "(cached) $ECHO_C" >&6
20200 if test -n "$cf_ldd_prog"; then
20201 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
20203 ac_save_IFS=$IFS; IFS=$ac_path_separator
20205 for ac_dir in $ac_dummy; do
20207 test -z "$ac_dir" && ac_dir=.
20208 $as_executable_p "$ac_dir/$ac_word" || continue
20209 ac_cv_prog_cf_ldd_prog="$ac_prog"
20210 echo "$as_me:20210: found $ac_dir/$ac_word" >&5
20216 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
20217 if test -n "$cf_ldd_prog"; then
20218 echo "$as_me:20218: result: $cf_ldd_prog" >&5
20219 echo "${ECHO_T}$cf_ldd_prog" >&6
20221 echo "$as_me:20221: result: no" >&5
20222 echo "${ECHO_T}no" >&6
20225 test -n "$cf_ldd_prog" && break
20227 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
20229 cf_rpath_list="/usr/lib /lib"
20230 if test "$cf_ldd_prog" != no
20234 cat >conftest.$ac_ext <<_ACEOF
20235 #line 20235 "configure"
20236 #include "confdefs.h"
20246 rm -f conftest.$ac_objext conftest$ac_exeext
20247 if { (eval echo "$as_me:20247: \"$ac_link\"") >&5
20248 (eval $ac_link) 2>&5
20250 echo "$as_me:20250: \$? = $ac_status" >&5
20251 (exit $ac_status); } &&
20252 { ac_try='test -s conftest$ac_exeext'
20253 { (eval echo "$as_me:20253: \"$ac_try\"") >&5
20254 (eval $ac_try) 2>&5
20256 echo "$as_me:20256: \$? = $ac_status" >&5
20257 (exit $ac_status); }; }; then
20258 cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
20259 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
20261 echo "$as_me: failed program was:" >&5
20262 cat conftest.$ac_ext >&5
20264 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20266 # If we passed the link-test, but get a "not found" on a given library,
20267 # this could be due to inept reconfiguration of gcc to make it only
20268 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
20269 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
20270 # /usr/local libraries.
20271 if test -n "$cf_rpath_oops"
20273 for cf_rpath_src in $cf_rpath_oops
20275 for cf_rpath_dir in \
20280 if test -f $cf_rpath_dir/lib/$cf_rpath_src
20282 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
20284 echo "${as_me:-configure}:20284: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
20286 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
20294 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
20296 echo "${as_me:-configure}:20296: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
20298 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
20300 echo "${as_me:-configure}:20300: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
20303 for cf_rpath_src in $LDFLAGS
20305 case $cf_rpath_src in
20308 # check if this refers to a directory which we will ignore
20310 if test -n "$cf_rpath_list"
20312 for cf_rpath_item in $cf_rpath_list
20314 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
20322 if test "$cf_rpath_skip" = no
20324 # transform the option
20325 if test "$LD_RPATH_OPT" = "-R " ; then
20326 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
20328 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
20331 # if we have not already added this, add it now
20332 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
20333 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
20335 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
20337 echo "${as_me:-configure}:20337: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
20339 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
20344 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
20346 LDFLAGS=$cf_rpath_dst
20348 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
20350 echo "${as_me:-configure}:20350: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
20352 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
20354 echo "${as_me:-configure}:20354: testing ...checking LIBS $LIBS ..." 1>&5
20357 for cf_rpath_src in $LIBS
20359 case $cf_rpath_src in
20362 # check if this refers to a directory which we will ignore
20364 if test -n "$cf_rpath_list"
20366 for cf_rpath_item in $cf_rpath_list
20368 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
20376 if test "$cf_rpath_skip" = no
20378 # transform the option
20379 if test "$LD_RPATH_OPT" = "-R " ; then
20380 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
20382 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
20385 # if we have not already added this, add it now
20386 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
20387 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
20389 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
20391 echo "${as_me:-configure}:20391: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
20393 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
20398 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
20402 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
20404 echo "${as_me:-configure}:20404: testing ...checked LIBS $LIBS ..." 1>&5
20406 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
20408 echo "${as_me:-configure}:20408: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
20411 echo "$as_me:20411: result: no" >&5
20412 echo "${ECHO_T}no" >&6
20420 ac_config_files="$ac_config_files Makefile"
20421 ac_config_commands="$ac_config_commands default"
20422 cat >confcache <<\_ACEOF
20423 # This file is a shell script that caches the results of configure
20424 # tests run on this system so they can be shared between configure
20425 # scripts and configure runs, see configure's option --config-cache.
20426 # It is not useful on other systems. If it contains results you don't
20427 # want to keep, you may remove or edit it.
20429 # config.status only pays attention to the cache file if you give it
20430 # the --recheck option to rerun configure.
20432 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20433 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20434 # following values.
20438 # The following way of writing the cache mishandles newlines in values,
20439 # but we know of no workaround that is simple, portable, and efficient.
20440 # So, don't put newlines in cache variables' values.
20441 # Ultrix sh set writes to stderr and can't be redirected directly,
20442 # and sets the high bit in the cache file unless we assign to the vars.
20445 case `(ac_space=' '; set | grep ac_space) 2>&1` in
20447 # `set' does not quote correctly, so add quotes (double-quote
20448 # substitution turns \\\\ into \\, and sed turns \\ into \).
20451 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20454 # `set' quotes correctly as required by POSIX, so do not add quotes.
20456 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20463 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20465 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20467 if cmp -s $cache_file confcache; then :; else
20468 if test -w $cache_file; then
20469 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20470 cat confcache >$cache_file
20472 echo "not updating unwritable cache $cache_file"
20477 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20478 # Let make expand exec_prefix.
20479 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20481 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20482 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20483 # trailing colons and then remove the whole line if VPATH becomes empty
20484 # (actually we leave an empty line to preserve line numbers).
20485 if test "x$srcdir" = x.; then
20486 ac_vpsub='/^[ ]*VPATH[ ]*=/{
20487 s/:*\$(srcdir):*/:/;
20488 s/:*\${srcdir}:*/:/;
20490 s/^\([^=]*=[ ]*\):*/\1/;
20496 DEFS=-DHAVE_CONFIG_H
20498 : ${CONFIG_STATUS=./config.status}
20499 ac_clean_files_save=$ac_clean_files
20500 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20501 { echo "$as_me:20501: creating $CONFIG_STATUS" >&5
20502 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20503 cat >$CONFIG_STATUS <<_ACEOF
20505 # Generated automatically by configure.
20506 # Run this file to recreate the current configuration.
20507 # Compiler output produced by configure, useful for debugging
20508 # configure, is in config.log if it exists.
20511 SHELL=\${CONFIG_SHELL-$SHELL}
20512 ac_cs_invocation="\$0 \$@"
20516 cat >>$CONFIG_STATUS <<\_ACEOF
20517 # Be Bourne compatible
20518 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20521 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20525 # Name of the executable.
20526 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20528 if expr a : '\(a\)' >/dev/null 2>&1; then
20534 rm -f conf$$ conf$$.exe conf$$.file
20536 if ln -s conf$$.file conf$$ 2>/dev/null; then
20537 # We could just check for DJGPP; but this test a) works b) is more generic
20538 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20539 if test -f conf$$.exe; then
20540 # Don't use ln at all; we don't have any links
20545 elif ln conf$$.file conf$$ 2>/dev/null; then
20550 rm -f conf$$ conf$$.exe conf$$.file
20552 as_executable_p="test -f"
20554 # Support unset when possible.
20555 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20562 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20563 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20564 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20565 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20566 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20567 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20568 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20569 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20572 # We need space, tab and new line, in precisely that order.
20578 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20584 # Files that config.status was made for.
20585 if test -n "$ac_config_files"; then
20586 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20589 if test -n "$ac_config_headers"; then
20590 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20593 if test -n "$ac_config_links"; then
20594 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20597 if test -n "$ac_config_commands"; then
20598 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20601 cat >>$CONFIG_STATUS <<\EOF
20604 \`$as_me' instantiates files from templates according to the
20605 current configuration.
20607 Usage: $0 [OPTIONS] [FILE]...
20609 -h, --help print this help, then exit
20610 -V, --version print version number, then exit
20611 -d, --debug don't remove temporary files
20612 --recheck update $as_me by reconfiguring in the same conditions
20613 --file=FILE[:TEMPLATE]
20614 instantiate the configuration file FILE
20615 --header=FILE[:TEMPLATE]
20616 instantiate the configuration header FILE
20618 Configuration files:
20621 Configuration headers:
20624 Configuration commands:
20627 Report bugs to <dickey@invisible-island.net>."
20630 cat >>$CONFIG_STATUS <<EOF
20633 configured by $0, generated by GNU Autoconf 2.52.20170501,
20634 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20636 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
20637 Free Software Foundation, Inc.
20638 This config.status script is free software; the Free Software Foundation
20639 gives unlimited permission to copy, distribute and modify it."
20644 cat >>$CONFIG_STATUS <<\EOF
20645 # If no file are specified by the user, then we need to provide default
20646 # value. By we need to know if files were specified by the user.
20652 ac_option=`expr "x$1" : 'x\([^=]*\)='`
20653 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20655 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
20659 *) # This is not an option, so the user has probably given explicit
20661 ac_need_defaults=false;;
20665 # Handling of the options.
20667 cat >>$CONFIG_STATUS <<EOF
20668 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20669 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
20670 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
20672 cat >>$CONFIG_STATUS <<\EOF
20673 --version | --vers* | -V )
20674 echo "$ac_cs_version"; exit 0 ;;
20676 # Conflict between --help and --header
20677 { { echo "$as_me:20677: error: ambiguous option: $1
20678 Try \`$0 --help' for more information." >&5
20679 echo "$as_me: error: ambiguous option: $1
20680 Try \`$0 --help' for more information." >&2;}
20681 { (exit 1); exit 1; }; };;
20682 --help | --hel | -h )
20683 echo "$ac_cs_usage"; exit 0 ;;
20684 --debug | --d* | -d )
20686 --file | --fil | --fi | --f )
20688 CONFIG_FILES="$CONFIG_FILES $1"
20689 ac_need_defaults=false;;
20690 --header | --heade | --head | --hea )
20692 CONFIG_HEADERS="$CONFIG_HEADERS $1"
20693 ac_need_defaults=false;;
20695 # This is an error.
20696 -*) { { echo "$as_me:20696: error: unrecognized option: $1
20697 Try \`$0 --help' for more information." >&5
20698 echo "$as_me: error: unrecognized option: $1
20699 Try \`$0 --help' for more information." >&2;}
20700 { (exit 1); exit 1; }; } ;;
20702 *) ac_config_targets="$ac_config_targets $1" ;;
20711 ## ----------------------- ##
20712 ## Running config.status. ##
20713 ## ----------------------- ##
20715 This file was extended by $as_me 2.52.20170501, executed with
20716 CONFIG_FILES = $CONFIG_FILES
20717 CONFIG_HEADERS = $CONFIG_HEADERS
20718 CONFIG_LINKS = $CONFIG_LINKS
20719 CONFIG_COMMANDS = $CONFIG_COMMANDS
20720 > $ac_cs_invocation
20721 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20726 cat >>$CONFIG_STATUS <<EOF
20728 # INIT-COMMANDS section.
20738 cat >>$CONFIG_STATUS <<\EOF
20739 for ac_config_target in $ac_config_targets
20741 case "$ac_config_target" in
20742 # Handling of arguments.
20743 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20744 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
20745 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
20746 *) { { echo "$as_me:20746: error: invalid argument: $ac_config_target" >&5
20747 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20748 { (exit 1); exit 1; }; };;
20752 # If the user did not use the arguments to specify the items to instantiate,
20753 # then the envvar interface is used. Set only those that are not.
20754 # We use the long form for the default assignment because of an extremely
20755 # bizarre bug on SunOS 4.1.3.
20756 if $ac_need_defaults; then
20757 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20758 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20759 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20762 # Create a temporary directory, and hook for its removal unless debugging.
20765 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20766 trap '{ (exit 1); exit 1; }' 1 2 13 15
20769 # Create a (secure) tmp directory for tmp files.
20772 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
20773 test -n "$tmp" && test -d "$tmp"
20776 tmp=$TMPDIR/cs$$-$RANDOM
20777 (umask 077 && mkdir $tmp)
20780 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
20781 { (exit 1); exit 1; }
20786 cat >>$CONFIG_STATUS <<EOF
20789 # CONFIG_FILES section.
20792 # No need to generate the scripts if there are no CONFIG_FILES.
20793 # This happens for instance when ./config.status config.h
20794 if test -n "\$CONFIG_FILES"; then
20795 # Protect against being on the right side of a sed subst in config.status.
20796 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20797 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20798 s,@SHELL@,$SHELL,;t t
20799 s,@exec_prefix@,$exec_prefix,;t t
20800 s,@prefix@,$prefix,;t t
20801 s,@program_transform_name@,$program_transform_name,;t t
20802 s,@bindir@,$bindir,;t t
20803 s,@sbindir@,$sbindir,;t t
20804 s,@libexecdir@,$libexecdir,;t t
20805 s,@datarootdir@,$datarootdir,;t t
20806 s,@datadir@,$datadir,;t t
20807 s,@sysconfdir@,$sysconfdir,;t t
20808 s,@sharedstatedir@,$sharedstatedir,;t t
20809 s,@localstatedir@,$localstatedir,;t t
20810 s,@libdir@,$libdir,;t t
20811 s,@includedir@,$includedir,;t t
20812 s,@oldincludedir@,$oldincludedir,;t t
20813 s,@infodir@,$infodir,;t t
20814 s,@mandir@,$mandir,;t t
20815 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20816 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20817 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20818 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20819 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20820 s,@build_alias@,$build_alias,;t t
20821 s,@host_alias@,$host_alias,;t t
20822 s,@target_alias@,$target_alias,;t t
20823 s,@ECHO_C@,$ECHO_C,;t t
20824 s,@ECHO_N@,$ECHO_N,;t t
20825 s,@ECHO_T@,$ECHO_T,;t t
20826 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20827 s,@DEFS@,$DEFS,;t t
20828 s,@LIBS@,$LIBS,;t t
20829 s,@build@,$build,;t t
20830 s,@build_cpu@,$build_cpu,;t t
20831 s,@build_vendor@,$build_vendor,;t t
20832 s,@build_os@,$build_os,;t t
20833 s,@host@,$host,;t t
20834 s,@host_cpu@,$host_cpu,;t t
20835 s,@host_vendor@,$host_vendor,;t t
20836 s,@host_os@,$host_os,;t t
20837 s,@SET_MAKE@,$SET_MAKE,;t t
20839 s,@CFLAGS@,$CFLAGS,;t t
20840 s,@LDFLAGS@,$LDFLAGS,;t t
20841 s,@CPPFLAGS@,$CPPFLAGS,;t t
20842 s,@ac_ct_CC@,$ac_ct_CC,;t t
20843 s,@EXEEXT@,$EXEEXT,;t t
20844 s,@OBJEXT@,$OBJEXT,;t t
20845 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
20848 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
20849 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
20850 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
20851 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
20852 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
20853 s,@LINT@,$LINT,;t t
20854 s,@LINT_OPTS@,$LINT_OPTS,;t t
20855 s,@CTAGS@,$CTAGS,;t t
20856 s,@ETAGS@,$ETAGS,;t t
20857 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
20858 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
20859 s,@MATH_LIB@,$MATH_LIB,;t t
20860 s,@top_builddir@,$top_builddir,;t t
20861 s,@CC_G_OPT@,$CC_G_OPT,;t t
20862 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
20863 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
20864 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
20865 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
20867 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
20868 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
20869 s,@LD_MODEL@,$LD_MODEL,;t t
20870 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
20871 s,@LIBTOOL@,$LIBTOOL,;t t
20872 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
20873 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
20874 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
20875 s,@LIB_LINK@,$LIB_LINK,;t t
20876 s,@LINK_TESTS@,$LINK_TESTS,;t t
20877 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
20878 s,@PACKAGE@,$PACKAGE,;t t
20879 s,@PTHREAD@,$PTHREAD,;t t
20880 s,@TEST_ARGS@,$TEST_ARGS,;t t
20881 s,@TEST_DEPS@,$TEST_DEPS,;t t
20882 s,@TEST_LIBS@,$TEST_LIBS,;t t
20883 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
20884 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
20885 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
20886 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
20887 s,@includesubdir@,$includesubdir,;t t
20888 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
20889 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
20890 s,@ECHO_LT@,$ECHO_LT,;t t
20891 s,@ECHO_LD@,$ECHO_LD,;t t
20892 s,@RULE_CC@,$RULE_CC,;t t
20893 s,@SHOW_CC@,$SHOW_CC,;t t
20894 s,@ECHO_CC@,$ECHO_CC,;t t
20895 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
20896 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
20897 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
20898 s,@X_CFLAGS@,$X_CFLAGS,;t t
20899 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
20900 s,@X_LIBS@,$X_LIBS,;t t
20901 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
20902 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
20903 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
20904 s,@RGB_PATH@,$RGB_PATH,;t t
20905 s,@no_x11_rgb@,$no_x11_rgb,;t t
20906 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
20907 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
20908 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
20913 cat >>$CONFIG_STATUS <<\EOF
20914 # Split the substitutions into bite-sized pieces for seds with
20915 # small command number limits, like on Digital OSF/1 and HP-UX.
20916 ac_max_sed_lines=48
20917 ac_sed_frag=1 # Number of current file.
20918 ac_beg=1 # First line for current file.
20919 ac_end=$ac_max_sed_lines # Line after last line for current file.
20922 while $ac_more_lines; do
20923 if test $ac_beg -gt 1; then
20924 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20926 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20928 if test ! -s $tmp/subs.frag; then
20929 ac_more_lines=false
20931 # The purpose of the label and of the branching condition is to
20932 # speed up the sed processing (if there are no `@' at all, there
20933 # is no need to browse any of the substitutions).
20934 # These are the two extra sed commands mentioned above.
20936 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
20937 # It is possible to make a multiline substitution using escaped newlines.
20938 # Ensure that we do not split the substitution between script fragments.
20940 ac_END=`expr $ac_end + $ac_max_sed_lines`
20941 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
20942 if test -s $tmp/subs.next; then
20943 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
20944 if test ! -s $tmp/subs.edit; then
20945 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
20946 if test ! -s $tmp/subs.edit; then
20947 if test $ac_beg -gt 1; then
20948 ac_end=`expr $ac_end - 1`
20955 if test -z "$ac_sed_cmds"; then
20956 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
20958 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
20960 ac_sed_frag=`expr $ac_sed_frag + 1`
20962 ac_end=`expr $ac_end + $ac_max_sed_lines`
20965 if test -z "$ac_sed_cmds"; then
20968 fi # test -n "$CONFIG_FILES"
20971 cat >>$CONFIG_STATUS <<\EOF
20972 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
20973 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20975 - | *:- | *:-:* ) # input from stdin
20977 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20978 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20979 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20980 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20981 * ) ac_file_in=$ac_file.in ;;
20984 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
20985 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20986 X"$ac_file" : 'X\(//\)[^/]' \| \
20987 X"$ac_file" : 'X\(//\)$' \| \
20988 X"$ac_file" : 'X\(/\)' \| \
20989 . : '\(.\)' 2>/dev/null ||
20991 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20992 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20993 /^X\(\/\/\)$/{ s//\1/; q; }
20994 /^X\(\/\).*/{ s//\1/; q; }
20996 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
20997 { case "$ac_dir" in
20998 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21002 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21003 case $as_mkdir_dir in
21004 # Skip DOS drivespec
21005 ?:) as_incr_dir=$as_mkdir_dir ;;
21007 as_incr_dir=$as_incr_dir/$as_mkdir_dir
21008 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21013 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21014 # A "../" for each directory in $ac_dir_suffix.
21015 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21017 ac_dir_suffix= ac_dots=
21022 if test -z "$ac_dots"; then
21025 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21027 [\\/]* | ?:[\\/]* )
21028 ac_srcdir=$srcdir$ac_dir_suffix;
21029 ac_top_srcdir=$srcdir ;;
21030 *) # Relative path.
21031 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21032 ac_top_srcdir=$ac_dots$srcdir ;;
21036 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21037 *) ac_INSTALL=$ac_dots$INSTALL ;;
21040 if test x"$ac_file" != x-; then
21041 { echo "$as_me:21041: creating $ac_file" >&5
21042 echo "$as_me: creating $ac_file" >&6;}
21045 # Let's still pretend it is `configure' which instantiates (i.e., don't
21046 # use $as_me), people would be surprised to read:
21047 # /* config.h. Generated automatically by config.status. */
21048 configure_input="Generated automatically from `echo $ac_file_in |
21049 sed 's,.*/,,'` by configure."
21051 # First look for the input files in the build tree, otherwise in the
21053 ac_file_inputs=`IFS=:
21054 for f in $ac_file_in; do
21056 -) echo $tmp/stdin ;;
21058 # Absolute (can't be DOS-style, as IFS=:)
21059 test -f "$f" || { { echo "$as_me:21059: error: cannot find input file: $f" >&5
21060 echo "$as_me: error: cannot find input file: $f" >&2;}
21061 { (exit 1); exit 1; }; }
21064 if test -f "$f"; then
21067 elif test -f "$srcdir/$f"; then
21072 { { echo "$as_me:21072: error: cannot find input file: $f" >&5
21073 echo "$as_me: error: cannot find input file: $f" >&2;}
21074 { (exit 1); exit 1; }; }
21077 done` || { (exit 1); exit 1; }
21079 cat >>$CONFIG_STATUS <<\EOF
21080 ac_warn_datarootdir=no
21081 if test x"$ac_file" != x-; then
21082 for ac_item in $ac_file_inputs
21084 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
21085 if test -n "$ac_seen"; then
21086 ac_used=`grep '@datarootdir@' $ac_item`
21087 if test -z "$ac_used"; then
21088 { echo "$as_me:21088: WARNING: datarootdir was used implicitly but not set:
21090 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
21092 ac_warn_datarootdir=yes
21095 ac_seen=`grep '${datarootdir}' $ac_item`
21096 if test -n "$ac_seen"; then
21097 { echo "$as_me:21097: WARNING: datarootdir was used explicitly but not set:
21099 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
21101 ac_warn_datarootdir=yes
21106 if test "x$ac_warn_datarootdir" = xyes; then
21107 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
21111 cat >>$CONFIG_STATUS <<EOF
21115 cat >>$CONFIG_STATUS <<\EOF
21117 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21118 s,@configure_input@,$configure_input,;t t
21119 s,@srcdir@,$ac_srcdir,;t t
21120 s,@top_srcdir@,$ac_top_srcdir,;t t
21121 s,@INSTALL@,$ac_INSTALL,;t t
21122 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21124 if test x"$ac_file" != x-; then
21125 cp $tmp/out $ac_file
21127 for ac_name in prefix exec_prefix datarootdir
21129 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
21130 if test -n "$ac_seen"; then
21131 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
21132 if test -z "$ac_init"; then
21133 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
21134 { echo "$as_me:21134: WARNING: Variable $ac_name is used but was not set:
21136 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
21141 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
21142 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
21143 if test -s $tmp/out; then
21144 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
21145 { echo "$as_me:21145: WARNING: Some variables may not be substituted:
21147 echo "$as_me: WARNING: Some variables may not be substituted:
21157 cat >>$CONFIG_STATUS <<\EOF
21160 # CONFIG_HEADER section.
21163 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21164 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21166 # ac_d sets the value in "#define NAME VALUE" lines.
21167 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
21168 ac_dB='[ ].*$,\1#\2'
21171 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21172 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
21173 ac_iB='\([ ]\),\1#\2define\3'
21176 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21177 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
21178 ac_uB='$,\1#\2define\3'
21182 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21183 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21185 - | *:- | *:-:* ) # input from stdin
21187 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21188 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21189 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21190 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21191 * ) ac_file_in=$ac_file.in ;;
21194 test x"$ac_file" != x- && { echo "$as_me:21194: creating $ac_file" >&5
21195 echo "$as_me: creating $ac_file" >&6;}
21197 # First look for the input files in the build tree, otherwise in the
21199 ac_file_inputs=`IFS=:
21200 for f in $ac_file_in; do
21202 -) echo $tmp/stdin ;;
21204 # Absolute (can't be DOS-style, as IFS=:)
21205 test -f "$f" || { { echo "$as_me:21205: error: cannot find input file: $f" >&5
21206 echo "$as_me: error: cannot find input file: $f" >&2;}
21207 { (exit 1); exit 1; }; }
21210 if test -f "$f"; then
21213 elif test -f "$srcdir/$f"; then
21218 { { echo "$as_me:21218: error: cannot find input file: $f" >&5
21219 echo "$as_me: error: cannot find input file: $f" >&2;}
21220 { (exit 1); exit 1; }; }
21223 done` || { (exit 1); exit 1; }
21224 # Remove the trailing spaces.
21225 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
21229 # Transform confdefs.h into a list of #define's. We won't use it as a sed
21230 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
21231 # be either 'cat' or 'sort'.
21232 cat confdefs.h | uniq >conftest.vals
21234 # Break up conftest.vals because some shells have a limit on
21235 # the size of here documents, and old seds have small limits too.
21237 rm -f conftest.tail
21238 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
21239 while grep . conftest.vals >/dev/null
21241 # Write chunks of a limited-size here document to conftest.frag.
21242 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21243 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21244 echo 'CEOF' >> $CONFIG_STATUS
21245 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21246 rm -f conftest.vals
21247 mv conftest.tail conftest.vals
21249 rm -f conftest.vals
21251 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21253 echo ' cat >> conftest.edit <<CEOF
21254 /@DEFS@/r conftest.frag
21257 sed -f conftest.edit $tmp/in > $tmp/out
21259 mv $tmp/out $tmp/in
21260 rm -f conftest.edit conftest.frag
21261 ' >> $CONFIG_STATUS
21263 cat >>$CONFIG_STATUS <<\EOF
21264 # Let's still pretend it is `configure' which instantiates (i.e., don't
21265 # use $as_me), people would be surprised to read:
21266 # /* config.h. Generated automatically by config.status. */
21267 if test x"$ac_file" = x-; then
21268 echo "/* Generated automatically by configure. */" >$tmp/config.h
21270 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
21272 cat $tmp/in >>$tmp/config.h
21274 if test x"$ac_file" != x-; then
21275 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21276 { echo "$as_me:21276: $ac_file is unchanged" >&5
21277 echo "$as_me: $ac_file is unchanged" >&6;}
21279 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21280 X"$ac_file" : 'X\(//\)[^/]' \| \
21281 X"$ac_file" : 'X\(//\)$' \| \
21282 X"$ac_file" : 'X\(/\)' \| \
21283 . : '\(.\)' 2>/dev/null ||
21285 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21286 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21287 /^X\(\/\/\)$/{ s//\1/; q; }
21288 /^X\(\/\).*/{ s//\1/; q; }
21290 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21291 { case "$ac_dir" in
21292 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21296 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21297 case $as_mkdir_dir in
21298 # Skip DOS drivespec
21299 ?:) as_incr_dir=$as_mkdir_dir ;;
21301 as_incr_dir=$as_incr_dir/$as_mkdir_dir
21302 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21309 mv $tmp/config.h $ac_file
21313 rm -f $tmp/config.h
21317 cat >>$CONFIG_STATUS <<\EOF
21319 # CONFIG_COMMANDS section.
21321 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21322 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21323 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21330 if test ! -d $srcdir/$cf_dir; then
21332 elif test -f $srcdir/$cf_dir/programs; then
21333 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21337 cat >>Makefile <<TEST_EOF
21339 # These rules are generated so we do not rely on suffix rules, which do not
21340 # work consistently for different make-programs (the '\$(MODEL)/' confuses
21341 # some, and the '\$x' confuses others).
21344 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
21347 cat >>Makefile <<TEST_EOF
21349 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
21350 \$(srcdir)/test.priv.h \\
21353 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) -DMODULE_NAME="$N" \$(srcdir)/$N.c
21357 if test -f ../config.guess && test -f ../config.sub
21359 cat >>Makefile <<TEST_EOF
21361 # if we used CF_INHERIT for getting these files, we can remove them
21363 rm -f config.guess config.sub
21371 cat >>$CONFIG_STATUS <<\EOF
21373 { (exit 0); exit 0; }
21375 chmod +x $CONFIG_STATUS
21376 ac_clean_files=$ac_clean_files_save
21378 # configure is writing to config.log, and then calls config.status.
21379 # config.status does its own redirection, appending to config.log.
21380 # Unfortunately, on DOS this fails, as config.log is still kept open
21381 # by configure, so config.status won't be able to write to it; its
21382 # output is simply discarded. So we exec the FD to /dev/null,
21383 # effectively closing config.log, so it can be properly (re)opened and
21384 # appended to by config.status. When coming back to configure, we
21385 # need to make the FD available again.
21386 if test "$no_create" != yes; then
21389 $SHELL $CONFIG_STATUS || ac_cs_success=false
21391 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21392 # would make configure fail if this is the last instruction.
21393 $ac_cs_success || { (exit 1); exit 1; }