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 (debug info) 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 \$CFLAGS variable" >&5
1943 echo $ECHO_N "checking \$CFLAGS 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 uses the CFLAGS variable to hold CPPFLAGS options" >&5
1949 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
1952 for cf_arg in $cf_flags
1958 cf_new_extra_cppflags=
1960 for cf_add_cflags in $cf_arg
1962 case $cf_fix_cppflags in
1964 case $cf_add_cflags in
1965 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1966 case $cf_add_cflags in
1968 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1970 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1971 && test -z "${cf_tst_cflags}" \
1972 && cf_fix_cppflags=yes
1974 if test $cf_fix_cppflags = yes ; then
1976 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1977 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1980 elif test "${cf_tst_cflags}" = "\"'" ; then
1982 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1983 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1993 case $cf_add_cflags in
1995 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1997 CPPFLAGS=`echo "$CPPFLAGS" | \
1998 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1999 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2004 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2005 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2012 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2013 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2020 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2021 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2023 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2025 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2026 && test -z "${cf_tst_cflags}" \
2027 && cf_fix_cppflags=no
2032 if test -n "$cf_new_cflags" ; then
2034 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2035 CFLAGS="${CFLAGS}$cf_new_cflags"
2039 if test -n "$cf_new_cppflags" ; then
2041 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2042 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2046 if test -n "$cf_new_extra_cppflags" ; then
2048 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2049 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2056 echo "$as_me:2056: result: ok" >&5
2057 echo "${ECHO_T}ok" >&6
2061 echo "$as_me:2061: checking \$CC variable" >&5
2062 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2065 echo "$as_me:2065: result: broken" >&5
2066 echo "${ECHO_T}broken" >&6
2067 { echo "$as_me:2067: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2068 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2070 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2071 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2073 for cf_arg in $cf_flags
2081 cf_new_extra_cppflags=
2083 for cf_add_cflags in $cf_arg
2085 case $cf_fix_cppflags in
2087 case $cf_add_cflags in
2088 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2089 case $cf_add_cflags in
2091 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2093 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2094 && test -z "${cf_tst_cflags}" \
2095 && cf_fix_cppflags=yes
2097 if test $cf_fix_cppflags = yes ; then
2099 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2100 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2103 elif test "${cf_tst_cflags}" = "\"'" ; then
2105 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2106 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2116 case $cf_add_cflags in
2118 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2120 CPPFLAGS=`echo "$CPPFLAGS" | \
2121 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2122 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2127 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2128 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2135 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2136 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2143 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2144 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2146 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2148 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2149 && test -z "${cf_tst_cflags}" \
2150 && cf_fix_cppflags=no
2155 if test -n "$cf_new_cflags" ; then
2157 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2158 CFLAGS="${CFLAGS}$cf_new_cflags"
2162 if test -n "$cf_new_cppflags" ; then
2164 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2165 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2169 if test -n "$cf_new_extra_cppflags" ; then
2171 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2172 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2182 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2184 echo "${as_me:-configure}:2184: testing resulting CC: '$CC' ..." 1>&5
2186 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2188 echo "${as_me:-configure}:2188: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2190 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2192 echo "${as_me:-configure}:2192: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2196 echo "$as_me:2196: result: ok" >&5
2197 echo "${ECHO_T}ok" >&6
2201 echo "$as_me:2201: checking for inline" >&5
2202 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2203 if test "${ac_cv_c_inline+set}" = set; then
2204 echo $ECHO_N "(cached) $ECHO_C" >&6
2207 for ac_kw in inline __inline__ __inline; do
2208 cat >conftest.$ac_ext <<_ACEOF
2209 #line 2209 "configure"
2210 #include "confdefs.h"
2212 static $ac_kw int static_foo () {return 0; }
2213 $ac_kw int foo () {return 0; }
2217 rm -f conftest.$ac_objext
2218 if { (eval echo "$as_me:2218: \"$ac_compile\"") >&5
2219 (eval $ac_compile) 2>&5
2221 echo "$as_me:2221: \$? = $ac_status" >&5
2222 (exit $ac_status); } &&
2223 { ac_try='test -s conftest.$ac_objext'
2224 { (eval echo "$as_me:2224: \"$ac_try\"") >&5
2227 echo "$as_me:2227: \$? = $ac_status" >&5
2228 (exit $ac_status); }; }; then
2229 ac_cv_c_inline=$ac_kw; break
2231 echo "$as_me: failed program was:" >&5
2232 cat conftest.$ac_ext >&5
2234 rm -f conftest.$ac_objext conftest.$ac_ext
2238 echo "$as_me:2238: result: $ac_cv_c_inline" >&5
2239 echo "${ECHO_T}$ac_cv_c_inline" >&6
2240 case $ac_cv_c_inline in
2243 cat >>confdefs.h <<\EOF
2247 *) cat >>confdefs.h <<EOF
2248 #define inline $ac_cv_c_inline
2254 ac_cpp='$CPP $CPPFLAGS'
2255 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2256 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2257 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2258 ac_main_return=return
2259 echo "$as_me:2259: checking how to run the C preprocessor" >&5
2260 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2261 # On Suns, sometimes $CPP names a directory.
2262 if test -n "$CPP" && test -d "$CPP"; then
2265 if test -z "$CPP"; then
2266 if test "${ac_cv_prog_CPP+set}" = set; then
2267 echo $ECHO_N "(cached) $ECHO_C" >&6
2269 # Double quotes because CPP needs to be expanded
2270 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2273 for ac_c_preproc_warn_flag in '' yes
2275 # Use a header file that comes with gcc, so configuring glibc
2276 # with a fresh cross-compiler works.
2277 # On the NeXT, cc -E runs the code through the compiler's parser,
2278 # not just through cpp. "Syntax error" is here to catch this case.
2279 cat >conftest.$ac_ext <<_ACEOF
2280 #line 2280 "configure"
2281 #include "confdefs.h"
2285 if { (eval echo "$as_me:2285: \"$ac_cpp conftest.$ac_ext\"") >&5
2286 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2288 egrep -v '^ *\+' conftest.er1 >conftest.err
2290 cat conftest.err >&5
2291 echo "$as_me:2291: \$? = $ac_status" >&5
2292 (exit $ac_status); } >/dev/null; then
2293 if test -s conftest.err; then
2294 ac_cpp_err=$ac_c_preproc_warn_flag
2301 if test -z "$ac_cpp_err"; then
2304 echo "$as_me: failed program was:" >&5
2305 cat conftest.$ac_ext >&5
2306 # Broken: fails on valid input.
2309 rm -f conftest.err conftest.$ac_ext
2311 # OK, works on sane cases. Now check whether non-existent headers
2312 # can be detected and how.
2313 cat >conftest.$ac_ext <<_ACEOF
2314 #line 2314 "configure"
2315 #include "confdefs.h"
2316 #include <ac_nonexistent.h>
2318 if { (eval echo "$as_me:2318: \"$ac_cpp conftest.$ac_ext\"") >&5
2319 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2321 egrep -v '^ *\+' conftest.er1 >conftest.err
2323 cat conftest.err >&5
2324 echo "$as_me:2324: \$? = $ac_status" >&5
2325 (exit $ac_status); } >/dev/null; then
2326 if test -s conftest.err; then
2327 ac_cpp_err=$ac_c_preproc_warn_flag
2334 if test -z "$ac_cpp_err"; then
2335 # Broken: success on invalid input.
2338 echo "$as_me: failed program was:" >&5
2339 cat conftest.$ac_ext >&5
2340 # Passes both tests.
2344 rm -f conftest.err conftest.$ac_ext
2347 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2348 rm -f conftest.err conftest.$ac_ext
2349 if $ac_preproc_ok; then
2361 echo "$as_me:2361: result: $CPP" >&5
2362 echo "${ECHO_T}$CPP" >&6
2364 for ac_c_preproc_warn_flag in '' yes
2366 # Use a header file that comes with gcc, so configuring glibc
2367 # with a fresh cross-compiler works.
2368 # On the NeXT, cc -E runs the code through the compiler's parser,
2369 # not just through cpp. "Syntax error" is here to catch this case.
2370 cat >conftest.$ac_ext <<_ACEOF
2371 #line 2371 "configure"
2372 #include "confdefs.h"
2376 if { (eval echo "$as_me:2376: \"$ac_cpp conftest.$ac_ext\"") >&5
2377 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2379 egrep -v '^ *\+' conftest.er1 >conftest.err
2381 cat conftest.err >&5
2382 echo "$as_me:2382: \$? = $ac_status" >&5
2383 (exit $ac_status); } >/dev/null; then
2384 if test -s conftest.err; then
2385 ac_cpp_err=$ac_c_preproc_warn_flag
2392 if test -z "$ac_cpp_err"; then
2395 echo "$as_me: failed program was:" >&5
2396 cat conftest.$ac_ext >&5
2397 # Broken: fails on valid input.
2400 rm -f conftest.err conftest.$ac_ext
2402 # OK, works on sane cases. Now check whether non-existent headers
2403 # can be detected and how.
2404 cat >conftest.$ac_ext <<_ACEOF
2405 #line 2405 "configure"
2406 #include "confdefs.h"
2407 #include <ac_nonexistent.h>
2409 if { (eval echo "$as_me:2409: \"$ac_cpp conftest.$ac_ext\"") >&5
2410 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2412 egrep -v '^ *\+' conftest.er1 >conftest.err
2414 cat conftest.err >&5
2415 echo "$as_me:2415: \$? = $ac_status" >&5
2416 (exit $ac_status); } >/dev/null; then
2417 if test -s conftest.err; then
2418 ac_cpp_err=$ac_c_preproc_warn_flag
2425 if test -z "$ac_cpp_err"; then
2426 # Broken: success on invalid input.
2429 echo "$as_me: failed program was:" >&5
2430 cat conftest.$ac_ext >&5
2431 # Passes both tests.
2435 rm -f conftest.err conftest.$ac_ext
2438 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2439 rm -f conftest.err conftest.$ac_ext
2440 if $ac_preproc_ok; then
2443 { { echo "$as_me:2443: error: C preprocessor \"$CPP\" fails sanity check" >&5
2444 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2445 { (exit 1); exit 1; }; }
2449 ac_cpp='$CPP $CPPFLAGS'
2450 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2451 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2452 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2453 ac_main_return=return
2455 for ac_prog in mawk gawk nawk awk
2457 # Extract the first word of "$ac_prog", so it can be a program name with args.
2458 set dummy $ac_prog; ac_word=$2
2459 echo "$as_me:2459: checking for $ac_word" >&5
2460 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2461 if test "${ac_cv_prog_AWK+set}" = set; then
2462 echo $ECHO_N "(cached) $ECHO_C" >&6
2464 if test -n "$AWK"; then
2465 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2467 ac_save_IFS=$IFS; IFS=$ac_path_separator
2469 for ac_dir in $ac_dummy; do
2471 test -z "$ac_dir" && ac_dir=.
2472 $as_executable_p "$ac_dir/$ac_word" || continue
2473 ac_cv_prog_AWK="$ac_prog"
2474 echo "$as_me:2474: found $ac_dir/$ac_word" >&5
2481 if test -n "$AWK"; then
2482 echo "$as_me:2482: result: $AWK" >&5
2483 echo "${ECHO_T}$AWK" >&6
2485 echo "$as_me:2485: result: no" >&5
2486 echo "${ECHO_T}no" >&6
2489 test -n "$AWK" && break
2492 # Find a good install program. We prefer a C program (faster),
2493 # so one script is as good as another. But avoid the broken or
2494 # incompatible versions:
2495 # SysV /etc/install, /usr/sbin/install
2496 # SunOS /usr/etc/install
2497 # IRIX /sbin/install
2499 # AmigaOS /C/install, which installs bootblocks on floppy discs
2500 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2501 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2502 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2503 # ./install, which can be erroneously created by make from ./install.sh.
2504 echo "$as_me:2504: checking for a BSD compatible install" >&5
2505 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2506 if test -z "$INSTALL"; then
2507 if test "${ac_cv_path_install+set}" = set; then
2508 echo $ECHO_N "(cached) $ECHO_C" >&6
2510 ac_save_IFS=$IFS; IFS=$ac_path_separator
2511 for ac_dir in $PATH; do
2513 # Account for people who put trailing slashes in PATH elements.
2515 / | ./ | .// | /cC/* \
2516 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2519 # OSF1 and SCO ODT 3.0 have their own names for install.
2520 # Don't use installbsd from OSF since it installs stuff as root
2522 for ac_prog in ginstall scoinst install; do
2523 if $as_executable_p "$ac_dir/$ac_prog"; then
2524 if test $ac_prog = install &&
2525 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2526 # AIX install. It has an incompatible calling convention.
2528 elif test $ac_prog = install &&
2529 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2530 # program-specific install script used by HP pwplus--don't use.
2533 ac_cv_path_install="$ac_dir/$ac_prog -c"
2543 if test "${ac_cv_path_install+set}" = set; then
2544 INSTALL=$ac_cv_path_install
2546 # As a last resort, use the slow shell script. We don't cache a
2547 # path for INSTALL within a source directory, because that will
2548 # break other packages using the cache if that directory is
2549 # removed, or if the path is relative.
2550 INSTALL=$ac_install_sh
2553 echo "$as_me:2553: result: $INSTALL" >&5
2554 echo "${ECHO_T}$INSTALL" >&6
2556 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2557 # It thinks the first close brace ends the variable substitution.
2558 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2560 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2562 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2568 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2569 test -z "$cf_dir" && cf_dir=.
2570 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2574 echo "$as_me:2574: checking if you want to install stripped executables" >&5
2575 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2577 # Check whether --enable-stripping or --disable-stripping was given.
2578 if test "${enable_stripping+set}" = set; then
2579 enableval="$enable_stripping"
2580 test "$enableval" != no && enableval=yes
2581 if test "$enableval" != "yes" ; then
2591 echo "$as_me:2591: result: $with_stripping" >&5
2592 echo "${ECHO_T}$with_stripping" >&6
2594 if test "$with_stripping" = yes
2601 : ${INSTALL:=install}
2602 echo "$as_me:2602: checking if install accepts -p option" >&5
2603 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
2604 if test "${cf_cv_install_p+set}" = set; then
2605 echo $ECHO_N "(cached) $ECHO_C" >&6
2612 if $INSTALL -p conftest.in conftest.out 2>/dev/null
2614 if test -f conftest.out/conftest.in
2616 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
2617 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
2618 if test -s conftest.err
2633 echo "$as_me:2633: result: $cf_cv_install_p" >&5
2634 echo "${ECHO_T}$cf_cv_install_p" >&6
2636 echo "$as_me:2636: checking if install needs to be told about ownership" >&5
2637 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
2638 case `$ac_config_guess` in
2647 echo "$as_me:2647: result: $with_install_o" >&5
2648 echo "${ECHO_T}$with_install_o" >&6
2649 if test "x$with_install_o" = xyes
2651 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'`
2656 for ac_prog in lint cppcheck splint
2658 # Extract the first word of "$ac_prog", so it can be a program name with args.
2659 set dummy $ac_prog; ac_word=$2
2660 echo "$as_me:2660: checking for $ac_word" >&5
2661 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2662 if test "${ac_cv_prog_LINT+set}" = set; then
2663 echo $ECHO_N "(cached) $ECHO_C" >&6
2665 if test -n "$LINT"; then
2666 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2668 ac_save_IFS=$IFS; IFS=$ac_path_separator
2670 for ac_dir in $ac_dummy; do
2672 test -z "$ac_dir" && ac_dir=.
2673 $as_executable_p "$ac_dir/$ac_word" || continue
2674 ac_cv_prog_LINT="$ac_prog"
2675 echo "$as_me:2675: found $ac_dir/$ac_word" >&5
2681 LINT=$ac_cv_prog_LINT
2682 if test -n "$LINT"; then
2683 echo "$as_me:2683: result: $LINT" >&5
2684 echo "${ECHO_T}$LINT" >&6
2686 echo "$as_me:2686: result: no" >&5
2687 echo "${ECHO_T}no" >&6
2690 test -n "$LINT" && break
2693 echo "$as_me:2693: checking if filesystem supports mixed-case filenames" >&5
2694 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2695 if test "${cf_cv_mixedcase+set}" = set; then
2696 echo $ECHO_N "(cached) $ECHO_C" >&6
2699 if test "$cross_compiling" = yes ; then
2700 case $target_alias in
2701 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2709 rm -f conftest CONFTEST
2711 if test -f CONFTEST ; then
2716 rm -f conftest CONFTEST
2720 echo "$as_me:2720: result: $cf_cv_mixedcase" >&5
2721 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2722 test "$cf_cv_mixedcase" = yes &&
2723 cat >>confdefs.h <<\EOF
2724 #define MIXEDCASE_FILENAMES 1
2727 for ac_prog in exctags ctags
2729 # Extract the first word of "$ac_prog", so it can be a program name with args.
2730 set dummy $ac_prog; ac_word=$2
2731 echo "$as_me:2731: checking for $ac_word" >&5
2732 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2733 if test "${ac_cv_prog_CTAGS+set}" = set; then
2734 echo $ECHO_N "(cached) $ECHO_C" >&6
2736 if test -n "$CTAGS"; then
2737 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2739 ac_save_IFS=$IFS; IFS=$ac_path_separator
2741 for ac_dir in $ac_dummy; do
2743 test -z "$ac_dir" && ac_dir=.
2744 $as_executable_p "$ac_dir/$ac_word" || continue
2745 ac_cv_prog_CTAGS="$ac_prog"
2746 echo "$as_me:2746: found $ac_dir/$ac_word" >&5
2752 CTAGS=$ac_cv_prog_CTAGS
2753 if test -n "$CTAGS"; then
2754 echo "$as_me:2754: result: $CTAGS" >&5
2755 echo "${ECHO_T}$CTAGS" >&6
2757 echo "$as_me:2757: result: no" >&5
2758 echo "${ECHO_T}no" >&6
2761 test -n "$CTAGS" && break
2764 for ac_prog in exetags etags
2766 # Extract the first word of "$ac_prog", so it can be a program name with args.
2767 set dummy $ac_prog; ac_word=$2
2768 echo "$as_me:2768: checking for $ac_word" >&5
2769 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2770 if test "${ac_cv_prog_ETAGS+set}" = set; then
2771 echo $ECHO_N "(cached) $ECHO_C" >&6
2773 if test -n "$ETAGS"; then
2774 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2776 ac_save_IFS=$IFS; IFS=$ac_path_separator
2778 for ac_dir in $ac_dummy; do
2780 test -z "$ac_dir" && ac_dir=.
2781 $as_executable_p "$ac_dir/$ac_word" || continue
2782 ac_cv_prog_ETAGS="$ac_prog"
2783 echo "$as_me:2783: found $ac_dir/$ac_word" >&5
2789 ETAGS=$ac_cv_prog_ETAGS
2790 if test -n "$ETAGS"; then
2791 echo "$as_me:2791: result: $ETAGS" >&5
2792 echo "${ECHO_T}$ETAGS" >&6
2794 echo "$as_me:2794: result: no" >&5
2795 echo "${ECHO_T}no" >&6
2798 test -n "$ETAGS" && break
2801 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2802 set dummy ${CTAGS:-ctags}; ac_word=$2
2803 echo "$as_me:2803: checking for $ac_word" >&5
2804 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2805 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2806 echo $ECHO_N "(cached) $ECHO_C" >&6
2808 if test -n "$MAKE_LOWER_TAGS"; then
2809 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2811 ac_save_IFS=$IFS; IFS=$ac_path_separator
2813 for ac_dir in $ac_dummy; do
2815 test -z "$ac_dir" && ac_dir=.
2816 $as_executable_p "$ac_dir/$ac_word" || continue
2817 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2818 echo "$as_me:2818: found $ac_dir/$ac_word" >&5
2822 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2825 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2826 if test -n "$MAKE_LOWER_TAGS"; then
2827 echo "$as_me:2827: result: $MAKE_LOWER_TAGS" >&5
2828 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2830 echo "$as_me:2830: result: no" >&5
2831 echo "${ECHO_T}no" >&6
2834 if test "$cf_cv_mixedcase" = yes ; then
2835 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2836 set dummy ${ETAGS:-etags}; ac_word=$2
2837 echo "$as_me:2837: checking for $ac_word" >&5
2838 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2839 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2840 echo $ECHO_N "(cached) $ECHO_C" >&6
2842 if test -n "$MAKE_UPPER_TAGS"; then
2843 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2845 ac_save_IFS=$IFS; IFS=$ac_path_separator
2847 for ac_dir in $ac_dummy; do
2849 test -z "$ac_dir" && ac_dir=.
2850 $as_executable_p "$ac_dir/$ac_word" || continue
2851 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2852 echo "$as_me:2852: found $ac_dir/$ac_word" >&5
2856 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2859 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2860 if test -n "$MAKE_UPPER_TAGS"; then
2861 echo "$as_me:2861: result: $MAKE_UPPER_TAGS" >&5
2862 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2864 echo "$as_me:2864: result: no" >&5
2865 echo "${ECHO_T}no" >&6
2872 if test "$MAKE_UPPER_TAGS" = yes ; then
2878 if test "$MAKE_LOWER_TAGS" = yes ; then
2884 echo "$as_me:2884: checking if -lm needed for math functions" >&5
2885 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
2886 if test "${cf_cv_need_libm+set}" = set; then
2887 echo $ECHO_N "(cached) $ECHO_C" >&6
2890 cat >conftest.$ac_ext <<_ACEOF
2891 #line 2891 "configure"
2892 #include "confdefs.h"
2901 double x = rand(); printf("result = %g\n", pow(sin(x),x))
2906 rm -f conftest.$ac_objext conftest$ac_exeext
2907 if { (eval echo "$as_me:2907: \"$ac_link\"") >&5
2908 (eval $ac_link) 2>&5
2910 echo "$as_me:2910: \$? = $ac_status" >&5
2911 (exit $ac_status); } &&
2912 { ac_try='test -s conftest$ac_exeext'
2913 { (eval echo "$as_me:2913: \"$ac_try\"") >&5
2916 echo "$as_me:2916: \$? = $ac_status" >&5
2917 (exit $ac_status); }; }; then
2920 echo "$as_me: failed program was:" >&5
2921 cat conftest.$ac_ext >&5
2924 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2926 echo "$as_me:2926: result: $cf_cv_need_libm" >&5
2927 echo "${ECHO_T}$cf_cv_need_libm" >&6
2928 if test "$cf_cv_need_libm" = yes
2936 CC_SHARED_OPTS=unknown
2937 CPPFLAGS="$CPPFLAGS"
2939 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
2940 DFT_UPR_MODEL="NORMAL"
2953 PACKAGE="ncurses-examples"
2959 TINFO_LIBS='$(LIBS_CURSES)'
2960 cf_cv_abi_version=""
2961 cf_cv_rel_version=""
2967 if test "$GCC" = yes
2969 cat > conftest.i <<EOF
2971 #define GCC_PRINTF 0
2976 #ifndef GCC_NORETURN
2977 #define GCC_NORETURN /* nothing */
2980 #define GCC_UNUSED /* nothing */
2983 if test "$GCC" = yes
2985 { echo "$as_me:2985: checking for $CC __attribute__ directives..." >&5
2986 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
2987 cat > conftest.$ac_ext <<EOF
2988 #line 2988 "${as_me:-configure}"
2989 #include "confdefs.h"
2990 #include "conftest.h"
2991 #include "conftest.i"
2993 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2995 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2998 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
3000 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
3002 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
3003 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
3004 extern void foo(void) GCC_NORETURN;
3005 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
3007 cf_printf_attribute=no
3008 cf_scanf_attribute=no
3009 for cf_attribute in scanf printf unused noreturn
3012 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3014 cf_directive="__attribute__(($cf_attribute))"
3015 echo "checking for $CC $cf_directive" 1>&5
3017 case $cf_attribute in
3019 cf_printf_attribute=yes
3020 cat >conftest.h <<EOF
3021 #define GCC_$cf_ATTRIBUTE 1
3025 cf_scanf_attribute=yes
3026 cat >conftest.h <<EOF
3027 #define GCC_$cf_ATTRIBUTE 1
3031 cat >conftest.h <<EOF
3032 #define GCC_$cf_ATTRIBUTE $cf_directive
3037 if { (eval echo "$as_me:3037: \"$ac_compile\"") >&5
3038 (eval $ac_compile) 2>&5
3040 echo "$as_me:3040: \$? = $ac_status" >&5
3041 (exit $ac_status); }; then
3042 test -n "$verbose" && echo "$as_me:3042: result: ... $cf_attribute" >&5
3043 echo "${ECHO_T}... $cf_attribute" >&6
3044 cat conftest.h >>confdefs.h
3045 case $cf_attribute in
3048 cat >>confdefs.h <<EOF
3049 #define GCC_NORETURN $cf_directive
3054 cf_value='/* nothing */'
3055 if test "$cf_printf_attribute" != no ; then
3056 cf_value='__attribute__((format(printf,fmt,var)))'
3058 cat >>confdefs.h <<\EOF
3059 #define GCC_PRINTF 1
3064 cat >>confdefs.h <<EOF
3065 #define GCC_PRINTFLIKE(fmt,var) $cf_value
3070 cf_value='/* nothing */'
3071 if test "$cf_scanf_attribute" != no ; then
3072 cf_value='__attribute__((format(scanf,fmt,var)))'
3074 cat >>confdefs.h <<\EOF
3080 cat >>confdefs.h <<EOF
3081 #define GCC_SCANFLIKE(fmt,var) $cf_value
3087 cat >>confdefs.h <<EOF
3088 #define GCC_UNUSED $cf_directive
3096 fgrep define conftest.i >>confdefs.h
3101 echo "$as_me:3101: checking if you want to work around bogus compiler/loader warnings" >&5
3102 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
3104 # Check whether --enable-string-hacks or --disable-string-hacks was given.
3105 if test "${enable_string_hacks+set}" = set; then
3106 enableval="$enable_string_hacks"
3107 with_string_hacks=$enableval
3109 with_string_hacks=no
3111 echo "$as_me:3111: result: $with_string_hacks" >&5
3112 echo "${ECHO_T}$with_string_hacks" >&6
3114 if test "x$with_string_hacks" = "xyes"; then
3116 cat >>confdefs.h <<\EOF
3117 #define USE_STRING_HACKS 1
3120 { echo "$as_me:3120: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
3121 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
3122 echo "$as_me:3122: checking for strlcat" >&5
3123 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
3124 if test "${ac_cv_func_strlcat+set}" = set; then
3125 echo $ECHO_N "(cached) $ECHO_C" >&6
3127 cat >conftest.$ac_ext <<_ACEOF
3128 #line 3128 "configure"
3129 #include "confdefs.h"
3130 /* System header to define __stub macros and hopefully few prototypes,
3131 which can conflict with char strlcat (); below. */
3133 /* Override any gcc2 internal prototype to avoid an error. */
3137 /* We use char because int might match the return type of a gcc2
3138 builtin and then its argument prototype would still apply. */
3145 /* The GNU C library defines this for functions which it implements
3146 to always fail with ENOSYS. Some functions are actually named
3147 something starting with __ and the normal name is an alias. */
3148 #if defined (__stub_strlcat) || defined (__stub___strlcat)
3151 f = strlcat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
3158 rm -f conftest.$ac_objext conftest$ac_exeext
3159 if { (eval echo "$as_me:3159: \"$ac_link\"") >&5
3160 (eval $ac_link) 2>&5
3162 echo "$as_me:3162: \$? = $ac_status" >&5
3163 (exit $ac_status); } &&
3164 { ac_try='test -s conftest$ac_exeext'
3165 { (eval echo "$as_me:3165: \"$ac_try\"") >&5
3168 echo "$as_me:3168: \$? = $ac_status" >&5
3169 (exit $ac_status); }; }; then
3170 ac_cv_func_strlcat=yes
3172 echo "$as_me: failed program was:" >&5
3173 cat conftest.$ac_ext >&5
3174 ac_cv_func_strlcat=no
3176 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3178 echo "$as_me:3178: result: $ac_cv_func_strlcat" >&5
3179 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
3180 if test $ac_cv_func_strlcat = yes; then
3182 cat >>confdefs.h <<\EOF
3183 #define HAVE_STRLCAT 1
3188 echo "$as_me:3188: checking for strlcat in -lbsd" >&5
3189 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
3190 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
3191 echo $ECHO_N "(cached) $ECHO_C" >&6
3193 ac_check_lib_save_LIBS=$LIBS
3195 cat >conftest.$ac_ext <<_ACEOF
3196 #line 3196 "configure"
3197 #include "confdefs.h"
3199 /* Override any gcc2 internal prototype to avoid an error. */
3203 /* We use char because int might match the return type of a gcc2
3204 builtin and then its argument prototype would still apply. */
3214 rm -f conftest.$ac_objext conftest$ac_exeext
3215 if { (eval echo "$as_me:3215: \"$ac_link\"") >&5
3216 (eval $ac_link) 2>&5
3218 echo "$as_me:3218: \$? = $ac_status" >&5
3219 (exit $ac_status); } &&
3220 { ac_try='test -s conftest$ac_exeext'
3221 { (eval echo "$as_me:3221: \"$ac_try\"") >&5
3224 echo "$as_me:3224: \$? = $ac_status" >&5
3225 (exit $ac_status); }; }; then
3226 ac_cv_lib_bsd_strlcat=yes
3228 echo "$as_me: failed program was:" >&5
3229 cat conftest.$ac_ext >&5
3230 ac_cv_lib_bsd_strlcat=no
3232 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3233 LIBS=$ac_check_lib_save_LIBS
3235 echo "$as_me:3235: result: $ac_cv_lib_bsd_strlcat" >&5
3236 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
3237 if test $ac_cv_lib_bsd_strlcat = yes; then
3240 # Filter out duplicates - this happens with badly-designed ".pc" files...
3241 for cf_add_1lib in $LIBS
3243 for cf_add_2lib in $cf_add_libs
3245 if test "x$cf_add_1lib" = "x$cf_add_2lib"
3251 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
3255 for ac_header in bsd/string.h
3257 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3258 echo "$as_me:3258: checking for $ac_header" >&5
3259 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3260 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3261 echo $ECHO_N "(cached) $ECHO_C" >&6
3263 cat >conftest.$ac_ext <<_ACEOF
3264 #line 3264 "configure"
3265 #include "confdefs.h"
3266 #include <$ac_header>
3268 if { (eval echo "$as_me:3268: \"$ac_cpp conftest.$ac_ext\"") >&5
3269 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3271 egrep -v '^ *\+' conftest.er1 >conftest.err
3273 cat conftest.err >&5
3274 echo "$as_me:3274: \$? = $ac_status" >&5
3275 (exit $ac_status); } >/dev/null; then
3276 if test -s conftest.err; then
3277 ac_cpp_err=$ac_c_preproc_warn_flag
3284 if test -z "$ac_cpp_err"; then
3285 eval "$as_ac_Header=yes"
3287 echo "$as_me: failed program was:" >&5
3288 cat conftest.$ac_ext >&5
3289 eval "$as_ac_Header=no"
3291 rm -f conftest.err conftest.$ac_ext
3293 echo "$as_me:3293: result: `eval echo '${'$as_ac_Header'}'`" >&5
3294 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3295 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3296 cat >>confdefs.h <<EOF
3297 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3303 cat >>confdefs.h <<\EOF
3304 #define HAVE_STRLCAT 1
3311 for ac_func in strlcpy snprintf
3313 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3314 echo "$as_me:3314: checking for $ac_func" >&5
3315 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3316 if eval "test \"\${$as_ac_var+set}\" = set"; then
3317 echo $ECHO_N "(cached) $ECHO_C" >&6
3319 cat >conftest.$ac_ext <<_ACEOF
3320 #line 3320 "configure"
3321 #include "confdefs.h"
3322 /* System header to define __stub macros and hopefully few prototypes,
3323 which can conflict with char $ac_func (); below. */
3325 /* Override any gcc2 internal prototype to avoid an error. */
3329 /* We use char because int might match the return type of a gcc2
3330 builtin and then its argument prototype would still apply. */
3337 /* The GNU C library defines this for functions which it implements
3338 to always fail with ENOSYS. Some functions are actually named
3339 something starting with __ and the normal name is an alias. */
3340 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3343 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
3350 rm -f conftest.$ac_objext conftest$ac_exeext
3351 if { (eval echo "$as_me:3351: \"$ac_link\"") >&5
3352 (eval $ac_link) 2>&5
3354 echo "$as_me:3354: \$? = $ac_status" >&5
3355 (exit $ac_status); } &&
3356 { ac_try='test -s conftest$ac_exeext'
3357 { (eval echo "$as_me:3357: \"$ac_try\"") >&5
3360 echo "$as_me:3360: \$? = $ac_status" >&5
3361 (exit $ac_status); }; }; then
3362 eval "$as_ac_var=yes"
3364 echo "$as_me: failed program was:" >&5
3365 cat conftest.$ac_ext >&5
3366 eval "$as_ac_var=no"
3368 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3370 echo "$as_me:3370: result: `eval echo '${'$as_ac_var'}'`" >&5
3371 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
3372 if test `eval echo '${'$as_ac_var'}'` = yes; then
3373 cat >>confdefs.h <<EOF
3374 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3383 cf_POSIX_C_SOURCE=199506L
3388 cf_xopen_source="-D_ALL_SOURCE"
3394 cf_xopen_source="-D_APPLE_C_SOURCE"
3397 cf_xopen_source="-D_DARWIN_C_SOURCE"
3400 (freebsd*|dragonfly*)
3401 # 5.x headers associate
3402 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3403 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3404 cf_POSIX_C_SOURCE=200112L
3406 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3409 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3412 cf_xopen_source="-D_HPUX_SOURCE"
3415 cf_xopen_source="-D_SGI_SOURCE"
3418 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3420 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3422 echo "$as_me:3422: checking if this is the GNU C library" >&5
3423 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3424 if test "${cf_cv_gnu_library+set}" = set; then
3425 echo $ECHO_N "(cached) $ECHO_C" >&6
3428 cat >conftest.$ac_ext <<_ACEOF
3429 #line 3429 "configure"
3430 #include "confdefs.h"
3431 #include <sys/types.h>
3436 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3439 # error not GNU C library
3445 rm -f conftest.$ac_objext
3446 if { (eval echo "$as_me:3446: \"$ac_compile\"") >&5
3447 (eval $ac_compile) 2>&5
3449 echo "$as_me:3449: \$? = $ac_status" >&5
3450 (exit $ac_status); } &&
3451 { ac_try='test -s conftest.$ac_objext'
3452 { (eval echo "$as_me:3452: \"$ac_try\"") >&5
3455 echo "$as_me:3455: \$? = $ac_status" >&5
3456 (exit $ac_status); }; }; then
3457 cf_cv_gnu_library=yes
3459 echo "$as_me: failed program was:" >&5
3460 cat conftest.$ac_ext >&5
3461 cf_cv_gnu_library=no
3463 rm -f conftest.$ac_objext conftest.$ac_ext
3466 echo "$as_me:3466: result: $cf_cv_gnu_library" >&5
3467 echo "${ECHO_T}$cf_cv_gnu_library" >&6
3469 if test x$cf_cv_gnu_library = xyes; then
3471 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3472 # was changed to help a little...
3473 echo "$as_me:3473: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3474 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3475 if test "${cf_cv_gnu_library_219+set}" = set; then
3476 echo $ECHO_N "(cached) $ECHO_C" >&6
3481 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3482 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3484 cat >conftest.$ac_ext <<_ACEOF
3485 #line 3485 "configure"
3486 #include "confdefs.h"
3487 #include <sys/types.h>
3492 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
3495 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
3501 rm -f conftest.$ac_objext
3502 if { (eval echo "$as_me:3502: \"$ac_compile\"") >&5
3503 (eval $ac_compile) 2>&5
3505 echo "$as_me:3505: \$? = $ac_status" >&5
3506 (exit $ac_status); } &&
3507 { ac_try='test -s conftest.$ac_objext'
3508 { (eval echo "$as_me:3508: \"$ac_try\"") >&5
3511 echo "$as_me:3511: \$? = $ac_status" >&5
3512 (exit $ac_status); }; }; then
3513 cf_cv_gnu_library_219=yes
3515 echo "$as_me: failed program was:" >&5
3516 cat conftest.$ac_ext >&5
3517 cf_cv_gnu_library_219=no
3519 rm -f conftest.$ac_objext conftest.$ac_ext
3523 echo "$as_me:3523: result: $cf_cv_gnu_library_219" >&5
3524 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
3526 if test "x$cf_cv_gnu_library_219" = xyes; then
3528 echo "$as_me:3528: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
3529 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
3530 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
3531 echo $ECHO_N "(cached) $ECHO_C" >&6
3537 cf_new_extra_cppflags=
3539 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
3541 case $cf_fix_cppflags in
3543 case $cf_add_cflags in
3544 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3545 case $cf_add_cflags in
3547 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3549 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3550 && test -z "${cf_tst_cflags}" \
3551 && cf_fix_cppflags=yes
3553 if test $cf_fix_cppflags = yes ; then
3555 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3556 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3559 elif test "${cf_tst_cflags}" = "\"'" ; then
3561 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3562 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3572 case $cf_add_cflags in
3574 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3576 CPPFLAGS=`echo "$CPPFLAGS" | \
3577 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3578 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3583 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3584 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3591 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3592 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3599 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3600 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3602 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3604 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3605 && test -z "${cf_tst_cflags}" \
3606 && cf_fix_cppflags=no
3611 if test -n "$cf_new_cflags" ; then
3613 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3614 CFLAGS="${CFLAGS}$cf_new_cflags"
3618 if test -n "$cf_new_cppflags" ; then
3620 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3621 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3625 if test -n "$cf_new_extra_cppflags" ; then
3627 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3628 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3632 cat >conftest.$ac_ext <<_ACEOF
3633 #line 3633 "configure"
3634 #include "confdefs.h"
3637 #include <sys/types.h>
3643 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
3646 # error GNU C library is too old
3652 rm -f conftest.$ac_objext
3653 if { (eval echo "$as_me:3653: \"$ac_compile\"") >&5
3654 (eval $ac_compile) 2>&5
3656 echo "$as_me:3656: \$? = $ac_status" >&5
3657 (exit $ac_status); } &&
3658 { ac_try='test -s conftest.$ac_objext'
3659 { (eval echo "$as_me:3659: \"$ac_try\"") >&5
3662 echo "$as_me:3662: \$? = $ac_status" >&5
3663 (exit $ac_status); }; }; then
3664 cf_cv_gnu_dftsrc_219=yes
3666 echo "$as_me: failed program was:" >&5
3667 cat conftest.$ac_ext >&5
3668 cf_cv_gnu_dftsrc_219=no
3670 rm -f conftest.$ac_objext conftest.$ac_ext
3673 echo "$as_me:3673: result: $cf_cv_gnu_dftsrc_219" >&5
3674 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
3675 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
3677 cf_cv_gnu_dftsrc_219=maybe
3680 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
3682 echo "$as_me:3682: checking if we must define _GNU_SOURCE" >&5
3683 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3684 if test "${cf_cv_gnu_source+set}" = set; then
3685 echo $ECHO_N "(cached) $ECHO_C" >&6
3688 cat >conftest.$ac_ext <<_ACEOF
3689 #line 3689 "configure"
3690 #include "confdefs.h"
3691 #include <sys/types.h>
3696 #ifndef _XOPEN_SOURCE
3697 #error expected _XOPEN_SOURCE to be defined
3703 rm -f conftest.$ac_objext
3704 if { (eval echo "$as_me:3704: \"$ac_compile\"") >&5
3705 (eval $ac_compile) 2>&5
3707 echo "$as_me:3707: \$? = $ac_status" >&5
3708 (exit $ac_status); } &&
3709 { ac_try='test -s conftest.$ac_objext'
3710 { (eval echo "$as_me:3710: \"$ac_try\"") >&5
3713 echo "$as_me:3713: \$? = $ac_status" >&5
3714 (exit $ac_status); }; }; then
3717 echo "$as_me: failed program was:" >&5
3718 cat conftest.$ac_ext >&5
3724 cf_new_extra_cppflags=
3726 for cf_add_cflags in -D_GNU_SOURCE
3728 case $cf_fix_cppflags in
3730 case $cf_add_cflags in
3731 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3732 case $cf_add_cflags in
3734 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3736 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3737 && test -z "${cf_tst_cflags}" \
3738 && cf_fix_cppflags=yes
3740 if test $cf_fix_cppflags = yes ; then
3742 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3743 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3746 elif test "${cf_tst_cflags}" = "\"'" ; then
3748 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3749 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3759 case $cf_add_cflags in
3761 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3763 CPPFLAGS=`echo "$CPPFLAGS" | \
3764 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3765 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3770 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3771 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3778 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3779 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3786 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3787 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3789 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3791 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3792 && test -z "${cf_tst_cflags}" \
3793 && cf_fix_cppflags=no
3798 if test -n "$cf_new_cflags" ; then
3800 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3801 CFLAGS="${CFLAGS}$cf_new_cflags"
3805 if test -n "$cf_new_cppflags" ; then
3807 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3808 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3812 if test -n "$cf_new_extra_cppflags" ; then
3814 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3815 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3819 cat >conftest.$ac_ext <<_ACEOF
3820 #line 3820 "configure"
3821 #include "confdefs.h"
3822 #include <sys/types.h>
3827 #ifdef _XOPEN_SOURCE
3828 #error expected _XOPEN_SOURCE to be undefined
3834 rm -f conftest.$ac_objext
3835 if { (eval echo "$as_me:3835: \"$ac_compile\"") >&5
3836 (eval $ac_compile) 2>&5
3838 echo "$as_me:3838: \$? = $ac_status" >&5
3839 (exit $ac_status); } &&
3840 { ac_try='test -s conftest.$ac_objext'
3841 { (eval echo "$as_me:3841: \"$ac_try\"") >&5
3844 echo "$as_me:3844: \$? = $ac_status" >&5
3845 (exit $ac_status); }; }; then
3848 echo "$as_me: failed program was:" >&5
3849 cat conftest.$ac_ext >&5
3850 cf_cv_gnu_source=yes
3852 rm -f conftest.$ac_objext conftest.$ac_ext
3856 rm -f conftest.$ac_objext conftest.$ac_ext
3859 echo "$as_me:3859: result: $cf_cv_gnu_source" >&5
3860 echo "${ECHO_T}$cf_cv_gnu_source" >&6
3862 if test "$cf_cv_gnu_source" = yes
3864 echo "$as_me:3864: checking if we should also define _DEFAULT_SOURCE" >&5
3865 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
3866 if test "${cf_cv_default_source+set}" = set; then
3867 echo $ECHO_N "(cached) $ECHO_C" >&6
3870 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3871 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
3873 cat >conftest.$ac_ext <<_ACEOF
3874 #line 3874 "configure"
3875 #include "confdefs.h"
3876 #include <sys/types.h>
3881 #ifdef _DEFAULT_SOURCE
3882 #error expected _DEFAULT_SOURCE to be undefined
3888 rm -f conftest.$ac_objext
3889 if { (eval echo "$as_me:3889: \"$ac_compile\"") >&5
3890 (eval $ac_compile) 2>&5
3892 echo "$as_me:3892: \$? = $ac_status" >&5
3893 (exit $ac_status); } &&
3894 { ac_try='test -s conftest.$ac_objext'
3895 { (eval echo "$as_me:3895: \"$ac_try\"") >&5
3898 echo "$as_me:3898: \$? = $ac_status" >&5
3899 (exit $ac_status); }; }; then
3900 cf_cv_default_source=no
3902 echo "$as_me: failed program was:" >&5
3903 cat conftest.$ac_ext >&5
3904 cf_cv_default_source=yes
3906 rm -f conftest.$ac_objext conftest.$ac_ext
3909 echo "$as_me:3909: result: $cf_cv_default_source" >&5
3910 echo "${ECHO_T}$cf_cv_default_source" >&6
3911 if test "$cf_cv_default_source" = yes
3914 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3915 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3925 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
3928 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
3931 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3933 cf_save_CFLAGS="$CFLAGS"
3934 cf_save_CPPFLAGS="$CPPFLAGS"
3936 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3937 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3938 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3940 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3941 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3942 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3944 echo "$as_me:3944: checking if we should define _POSIX_C_SOURCE" >&5
3945 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3946 if test "${cf_cv_posix_c_source+set}" = set; then
3947 echo $ECHO_N "(cached) $ECHO_C" >&6
3950 echo "${as_me:-configure}:3950: testing if the symbol is already defined go no further ..." 1>&5
3952 cat >conftest.$ac_ext <<_ACEOF
3953 #line 3953 "configure"
3954 #include "confdefs.h"
3955 #include <sys/types.h>
3960 #ifndef _POSIX_C_SOURCE
3967 rm -f conftest.$ac_objext
3968 if { (eval echo "$as_me:3968: \"$ac_compile\"") >&5
3969 (eval $ac_compile) 2>&5
3971 echo "$as_me:3971: \$? = $ac_status" >&5
3972 (exit $ac_status); } &&
3973 { ac_try='test -s conftest.$ac_objext'
3974 { (eval echo "$as_me:3974: \"$ac_try\"") >&5
3977 echo "$as_me:3977: \$? = $ac_status" >&5
3978 (exit $ac_status); }; }; then
3979 cf_cv_posix_c_source=no
3981 echo "$as_me: failed program was:" >&5
3982 cat conftest.$ac_ext >&5
3983 cf_want_posix_source=no
3984 case .$cf_POSIX_C_SOURCE in
3986 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3989 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3990 cf_want_posix_source=yes
3993 cf_want_posix_source=yes
3996 if test "$cf_want_posix_source" = yes ; then
3997 cat >conftest.$ac_ext <<_ACEOF
3998 #line 3998 "configure"
3999 #include "confdefs.h"
4000 #include <sys/types.h>
4005 #ifdef _POSIX_SOURCE
4012 rm -f conftest.$ac_objext
4013 if { (eval echo "$as_me:4013: \"$ac_compile\"") >&5
4014 (eval $ac_compile) 2>&5
4016 echo "$as_me:4016: \$? = $ac_status" >&5
4017 (exit $ac_status); } &&
4018 { ac_try='test -s conftest.$ac_objext'
4019 { (eval echo "$as_me:4019: \"$ac_try\"") >&5
4022 echo "$as_me:4022: \$? = $ac_status" >&5
4023 (exit $ac_status); }; }; then
4026 echo "$as_me: failed program was:" >&5
4027 cat conftest.$ac_ext >&5
4028 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4030 rm -f conftest.$ac_objext conftest.$ac_ext
4033 echo "${as_me:-configure}:4033: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4035 CFLAGS="$cf_trim_CFLAGS"
4036 CPPFLAGS="$cf_trim_CPPFLAGS"
4038 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4039 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4041 echo "${as_me:-configure}:4041: testing if the second compile does not leave our definition intact error ..." 1>&5
4043 cat >conftest.$ac_ext <<_ACEOF
4044 #line 4044 "configure"
4045 #include "confdefs.h"
4046 #include <sys/types.h>
4051 #ifndef _POSIX_C_SOURCE
4058 rm -f conftest.$ac_objext
4059 if { (eval echo "$as_me:4059: \"$ac_compile\"") >&5
4060 (eval $ac_compile) 2>&5
4062 echo "$as_me:4062: \$? = $ac_status" >&5
4063 (exit $ac_status); } &&
4064 { ac_try='test -s conftest.$ac_objext'
4065 { (eval echo "$as_me:4065: \"$ac_try\"") >&5
4068 echo "$as_me:4068: \$? = $ac_status" >&5
4069 (exit $ac_status); }; }; then
4072 echo "$as_me: failed program was:" >&5
4073 cat conftest.$ac_ext >&5
4074 cf_cv_posix_c_source=no
4076 rm -f conftest.$ac_objext conftest.$ac_ext
4077 CFLAGS="$cf_save_CFLAGS"
4078 CPPFLAGS="$cf_save_CPPFLAGS"
4081 rm -f conftest.$ac_objext conftest.$ac_ext
4084 echo "$as_me:4084: result: $cf_cv_posix_c_source" >&5
4085 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4087 if test "$cf_cv_posix_c_source" != no ; then
4088 CFLAGS="$cf_trim_CFLAGS"
4089 CPPFLAGS="$cf_trim_CPPFLAGS"
4094 cf_new_extra_cppflags=
4096 for cf_add_cflags in $cf_cv_posix_c_source
4098 case $cf_fix_cppflags in
4100 case $cf_add_cflags in
4101 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4102 case $cf_add_cflags in
4104 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4106 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4107 && test -z "${cf_tst_cflags}" \
4108 && cf_fix_cppflags=yes
4110 if test $cf_fix_cppflags = yes ; then
4112 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4113 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4116 elif test "${cf_tst_cflags}" = "\"'" ; then
4118 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4119 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4129 case $cf_add_cflags in
4131 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4133 CPPFLAGS=`echo "$CPPFLAGS" | \
4134 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4135 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4140 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4141 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4148 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4149 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4156 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4157 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4159 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4161 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4162 && test -z "${cf_tst_cflags}" \
4163 && cf_fix_cppflags=no
4168 if test -n "$cf_new_cflags" ; then
4170 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4171 CFLAGS="${CFLAGS}$cf_new_cflags"
4175 if test -n "$cf_new_cppflags" ; then
4177 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4178 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4182 if test -n "$cf_new_extra_cppflags" ; then
4184 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4185 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4193 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4196 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
4197 cf_xopen_source="-D_BSD_SOURCE"
4201 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
4204 cf_xopen_source="-D_OSF_SOURCE"
4207 cf_xopen_source="-D_QNX_SOURCE"
4210 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
4213 cf_xopen_source="-D__EXTENSIONS__"
4214 cf_cv_xopen_source=broken
4216 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
4222 echo "$as_me:4222: checking if we should define _XOPEN_SOURCE" >&5
4223 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4224 if test "${cf_cv_xopen_source+set}" = set; then
4225 echo $ECHO_N "(cached) $ECHO_C" >&6
4228 cat >conftest.$ac_ext <<_ACEOF
4229 #line 4229 "configure"
4230 #include "confdefs.h"
4234 #include <sys/types.h>
4240 #ifndef _XOPEN_SOURCE
4247 rm -f conftest.$ac_objext
4248 if { (eval echo "$as_me:4248: \"$ac_compile\"") >&5
4249 (eval $ac_compile) 2>&5
4251 echo "$as_me:4251: \$? = $ac_status" >&5
4252 (exit $ac_status); } &&
4253 { ac_try='test -s conftest.$ac_objext'
4254 { (eval echo "$as_me:4254: \"$ac_try\"") >&5
4257 echo "$as_me:4257: \$? = $ac_status" >&5
4258 (exit $ac_status); }; }; then
4259 cf_cv_xopen_source=no
4261 echo "$as_me: failed program was:" >&5
4262 cat conftest.$ac_ext >&5
4265 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4266 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4268 cat >conftest.$ac_ext <<_ACEOF
4269 #line 4269 "configure"
4270 #include "confdefs.h"
4274 #include <sys/types.h>
4280 #ifdef _XOPEN_SOURCE
4287 rm -f conftest.$ac_objext
4288 if { (eval echo "$as_me:4288: \"$ac_compile\"") >&5
4289 (eval $ac_compile) 2>&5
4291 echo "$as_me:4291: \$? = $ac_status" >&5
4292 (exit $ac_status); } &&
4293 { ac_try='test -s conftest.$ac_objext'
4294 { (eval echo "$as_me:4294: \"$ac_try\"") >&5
4297 echo "$as_me:4297: \$? = $ac_status" >&5
4298 (exit $ac_status); }; }; then
4299 cf_cv_xopen_source=no
4301 echo "$as_me: failed program was:" >&5
4302 cat conftest.$ac_ext >&5
4303 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4305 rm -f conftest.$ac_objext conftest.$ac_ext
4309 rm -f conftest.$ac_objext conftest.$ac_ext
4312 echo "$as_me:4312: result: $cf_cv_xopen_source" >&5
4313 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4315 if test "$cf_cv_xopen_source" != no ; then
4317 CFLAGS=`echo "$CFLAGS" | \
4318 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4319 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4321 CPPFLAGS=`echo "$CPPFLAGS" | \
4322 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4323 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4325 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4330 cf_new_extra_cppflags=
4332 for cf_add_cflags in $cf_temp_xopen_source
4334 case $cf_fix_cppflags in
4336 case $cf_add_cflags in
4337 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4338 case $cf_add_cflags in
4340 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4342 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4343 && test -z "${cf_tst_cflags}" \
4344 && cf_fix_cppflags=yes
4346 if test $cf_fix_cppflags = yes ; then
4348 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4349 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4352 elif test "${cf_tst_cflags}" = "\"'" ; then
4354 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4355 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4365 case $cf_add_cflags in
4367 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4369 CPPFLAGS=`echo "$CPPFLAGS" | \
4370 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4371 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4376 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4377 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4384 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4385 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4392 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4393 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4395 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4397 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4398 && test -z "${cf_tst_cflags}" \
4399 && cf_fix_cppflags=no
4404 if test -n "$cf_new_cflags" ; then
4406 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4407 CFLAGS="${CFLAGS}$cf_new_cflags"
4411 if test -n "$cf_new_cppflags" ; then
4413 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4414 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4418 if test -n "$cf_new_extra_cppflags" ; then
4420 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4421 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4427 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4429 cf_save_CFLAGS="$CFLAGS"
4430 cf_save_CPPFLAGS="$CPPFLAGS"
4432 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4433 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4434 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4436 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4437 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4438 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4440 echo "$as_me:4440: checking if we should define _POSIX_C_SOURCE" >&5
4441 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4442 if test "${cf_cv_posix_c_source+set}" = set; then
4443 echo $ECHO_N "(cached) $ECHO_C" >&6
4446 echo "${as_me:-configure}:4446: testing if the symbol is already defined go no further ..." 1>&5
4448 cat >conftest.$ac_ext <<_ACEOF
4449 #line 4449 "configure"
4450 #include "confdefs.h"
4451 #include <sys/types.h>
4456 #ifndef _POSIX_C_SOURCE
4463 rm -f conftest.$ac_objext
4464 if { (eval echo "$as_me:4464: \"$ac_compile\"") >&5
4465 (eval $ac_compile) 2>&5
4467 echo "$as_me:4467: \$? = $ac_status" >&5
4468 (exit $ac_status); } &&
4469 { ac_try='test -s conftest.$ac_objext'
4470 { (eval echo "$as_me:4470: \"$ac_try\"") >&5
4473 echo "$as_me:4473: \$? = $ac_status" >&5
4474 (exit $ac_status); }; }; then
4475 cf_cv_posix_c_source=no
4477 echo "$as_me: failed program was:" >&5
4478 cat conftest.$ac_ext >&5
4479 cf_want_posix_source=no
4480 case .$cf_POSIX_C_SOURCE in
4482 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4485 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4486 cf_want_posix_source=yes
4489 cf_want_posix_source=yes
4492 if test "$cf_want_posix_source" = yes ; then
4493 cat >conftest.$ac_ext <<_ACEOF
4494 #line 4494 "configure"
4495 #include "confdefs.h"
4496 #include <sys/types.h>
4501 #ifdef _POSIX_SOURCE
4508 rm -f conftest.$ac_objext
4509 if { (eval echo "$as_me:4509: \"$ac_compile\"") >&5
4510 (eval $ac_compile) 2>&5
4512 echo "$as_me:4512: \$? = $ac_status" >&5
4513 (exit $ac_status); } &&
4514 { ac_try='test -s conftest.$ac_objext'
4515 { (eval echo "$as_me:4515: \"$ac_try\"") >&5
4518 echo "$as_me:4518: \$? = $ac_status" >&5
4519 (exit $ac_status); }; }; then
4522 echo "$as_me: failed program was:" >&5
4523 cat conftest.$ac_ext >&5
4524 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4526 rm -f conftest.$ac_objext conftest.$ac_ext
4529 echo "${as_me:-configure}:4529: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4531 CFLAGS="$cf_trim_CFLAGS"
4532 CPPFLAGS="$cf_trim_CPPFLAGS"
4534 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4535 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4537 echo "${as_me:-configure}:4537: testing if the second compile does not leave our definition intact error ..." 1>&5
4539 cat >conftest.$ac_ext <<_ACEOF
4540 #line 4540 "configure"
4541 #include "confdefs.h"
4542 #include <sys/types.h>
4547 #ifndef _POSIX_C_SOURCE
4554 rm -f conftest.$ac_objext
4555 if { (eval echo "$as_me:4555: \"$ac_compile\"") >&5
4556 (eval $ac_compile) 2>&5
4558 echo "$as_me:4558: \$? = $ac_status" >&5
4559 (exit $ac_status); } &&
4560 { ac_try='test -s conftest.$ac_objext'
4561 { (eval echo "$as_me:4561: \"$ac_try\"") >&5
4564 echo "$as_me:4564: \$? = $ac_status" >&5
4565 (exit $ac_status); }; }; then
4568 echo "$as_me: failed program was:" >&5
4569 cat conftest.$ac_ext >&5
4570 cf_cv_posix_c_source=no
4572 rm -f conftest.$ac_objext conftest.$ac_ext
4573 CFLAGS="$cf_save_CFLAGS"
4574 CPPFLAGS="$cf_save_CPPFLAGS"
4577 rm -f conftest.$ac_objext conftest.$ac_ext
4580 echo "$as_me:4580: result: $cf_cv_posix_c_source" >&5
4581 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4583 if test "$cf_cv_posix_c_source" != no ; then
4584 CFLAGS="$cf_trim_CFLAGS"
4585 CPPFLAGS="$cf_trim_CPPFLAGS"
4590 cf_new_extra_cppflags=
4592 for cf_add_cflags in $cf_cv_posix_c_source
4594 case $cf_fix_cppflags in
4596 case $cf_add_cflags in
4597 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4598 case $cf_add_cflags in
4600 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4602 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4603 && test -z "${cf_tst_cflags}" \
4604 && cf_fix_cppflags=yes
4606 if test $cf_fix_cppflags = yes ; then
4608 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4609 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4612 elif test "${cf_tst_cflags}" = "\"'" ; then
4614 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4615 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4625 case $cf_add_cflags in
4627 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4629 CPPFLAGS=`echo "$CPPFLAGS" | \
4630 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4631 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4636 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4637 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4644 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4645 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4652 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4653 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4655 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4657 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4658 && test -z "${cf_tst_cflags}" \
4659 && cf_fix_cppflags=no
4664 if test -n "$cf_new_cflags" ; then
4666 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4667 CFLAGS="${CFLAGS}$cf_new_cflags"
4671 if test -n "$cf_new_cppflags" ; then
4673 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4674 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4678 if test -n "$cf_new_extra_cppflags" ; then
4680 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4681 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4690 if test -n "$cf_xopen_source" ; then
4695 cf_new_extra_cppflags=
4697 for cf_add_cflags in $cf_xopen_source
4699 case $cf_fix_cppflags in
4701 case $cf_add_cflags in
4702 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4703 case $cf_add_cflags in
4705 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4707 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4708 && test -z "${cf_tst_cflags}" \
4709 && cf_fix_cppflags=yes
4711 if test $cf_fix_cppflags = yes ; then
4713 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4714 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4717 elif test "${cf_tst_cflags}" = "\"'" ; then
4719 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4720 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4730 case $cf_add_cflags in
4732 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4734 CPPFLAGS=`echo "$CPPFLAGS" | \
4735 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4736 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4741 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4742 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4749 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4750 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4757 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4758 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4760 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4762 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4763 && test -z "${cf_tst_cflags}" \
4764 && cf_fix_cppflags=no
4769 if test -n "$cf_new_cflags" ; then
4770 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
4772 echo "${as_me:-configure}:4772: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
4774 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4775 CFLAGS="${CFLAGS}$cf_new_cflags"
4779 if test -n "$cf_new_cppflags" ; then
4780 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
4782 echo "${as_me:-configure}:4782: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
4784 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4785 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4789 if test -n "$cf_new_extra_cppflags" ; then
4790 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
4792 echo "${as_me:-configure}:4792: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
4794 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4795 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4801 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
4802 echo "$as_me:4802: checking if _XOPEN_SOURCE really is set" >&5
4803 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
4804 cat >conftest.$ac_ext <<_ACEOF
4805 #line 4805 "configure"
4806 #include "confdefs.h"
4812 #ifndef _XOPEN_SOURCE
4819 rm -f conftest.$ac_objext
4820 if { (eval echo "$as_me:4820: \"$ac_compile\"") >&5
4821 (eval $ac_compile) 2>&5
4823 echo "$as_me:4823: \$? = $ac_status" >&5
4824 (exit $ac_status); } &&
4825 { ac_try='test -s conftest.$ac_objext'
4826 { (eval echo "$as_me:4826: \"$ac_try\"") >&5
4829 echo "$as_me:4829: \$? = $ac_status" >&5
4830 (exit $ac_status); }; }; then
4831 cf_XOPEN_SOURCE_set=yes
4833 echo "$as_me: failed program was:" >&5
4834 cat conftest.$ac_ext >&5
4835 cf_XOPEN_SOURCE_set=no
4837 rm -f conftest.$ac_objext conftest.$ac_ext
4838 echo "$as_me:4838: result: $cf_XOPEN_SOURCE_set" >&5
4839 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
4840 if test $cf_XOPEN_SOURCE_set = yes
4842 cat >conftest.$ac_ext <<_ACEOF
4843 #line 4843 "configure"
4844 #include "confdefs.h"
4850 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
4857 rm -f conftest.$ac_objext
4858 if { (eval echo "$as_me:4858: \"$ac_compile\"") >&5
4859 (eval $ac_compile) 2>&5
4861 echo "$as_me:4861: \$? = $ac_status" >&5
4862 (exit $ac_status); } &&
4863 { ac_try='test -s conftest.$ac_objext'
4864 { (eval echo "$as_me:4864: \"$ac_try\"") >&5
4867 echo "$as_me:4867: \$? = $ac_status" >&5
4868 (exit $ac_status); }; }; then
4869 cf_XOPEN_SOURCE_set_ok=yes
4871 echo "$as_me: failed program was:" >&5
4872 cat conftest.$ac_ext >&5
4873 cf_XOPEN_SOURCE_set_ok=no
4875 rm -f conftest.$ac_objext conftest.$ac_ext
4876 if test $cf_XOPEN_SOURCE_set_ok = no
4878 { echo "$as_me:4878: WARNING: _XOPEN_SOURCE is lower than requested" >&5
4879 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
4883 echo "$as_me:4883: checking if we should define _XOPEN_SOURCE" >&5
4884 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4885 if test "${cf_cv_xopen_source+set}" = set; then
4886 echo $ECHO_N "(cached) $ECHO_C" >&6
4889 cat >conftest.$ac_ext <<_ACEOF
4890 #line 4890 "configure"
4891 #include "confdefs.h"
4895 #include <sys/types.h>
4901 #ifndef _XOPEN_SOURCE
4908 rm -f conftest.$ac_objext
4909 if { (eval echo "$as_me:4909: \"$ac_compile\"") >&5
4910 (eval $ac_compile) 2>&5
4912 echo "$as_me:4912: \$? = $ac_status" >&5
4913 (exit $ac_status); } &&
4914 { ac_try='test -s conftest.$ac_objext'
4915 { (eval echo "$as_me:4915: \"$ac_try\"") >&5
4918 echo "$as_me:4918: \$? = $ac_status" >&5
4919 (exit $ac_status); }; }; then
4920 cf_cv_xopen_source=no
4922 echo "$as_me: failed program was:" >&5
4923 cat conftest.$ac_ext >&5
4926 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4927 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4929 cat >conftest.$ac_ext <<_ACEOF
4930 #line 4930 "configure"
4931 #include "confdefs.h"
4935 #include <sys/types.h>
4941 #ifdef _XOPEN_SOURCE
4948 rm -f conftest.$ac_objext
4949 if { (eval echo "$as_me:4949: \"$ac_compile\"") >&5
4950 (eval $ac_compile) 2>&5
4952 echo "$as_me:4952: \$? = $ac_status" >&5
4953 (exit $ac_status); } &&
4954 { ac_try='test -s conftest.$ac_objext'
4955 { (eval echo "$as_me:4955: \"$ac_try\"") >&5
4958 echo "$as_me:4958: \$? = $ac_status" >&5
4959 (exit $ac_status); }; }; then
4960 cf_cv_xopen_source=no
4962 echo "$as_me: failed program was:" >&5
4963 cat conftest.$ac_ext >&5
4964 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4966 rm -f conftest.$ac_objext conftest.$ac_ext
4970 rm -f conftest.$ac_objext conftest.$ac_ext
4973 echo "$as_me:4973: result: $cf_cv_xopen_source" >&5
4974 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4976 if test "$cf_cv_xopen_source" != no ; then
4978 CFLAGS=`echo "$CFLAGS" | \
4979 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4980 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4982 CPPFLAGS=`echo "$CPPFLAGS" | \
4983 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4984 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4986 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4991 cf_new_extra_cppflags=
4993 for cf_add_cflags in $cf_temp_xopen_source
4995 case $cf_fix_cppflags in
4997 case $cf_add_cflags in
4998 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4999 case $cf_add_cflags in
5001 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5003 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5004 && test -z "${cf_tst_cflags}" \
5005 && cf_fix_cppflags=yes
5007 if test $cf_fix_cppflags = yes ; then
5009 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5010 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5013 elif test "${cf_tst_cflags}" = "\"'" ; then
5015 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5016 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5026 case $cf_add_cflags in
5028 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5030 CPPFLAGS=`echo "$CPPFLAGS" | \
5031 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5032 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5037 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5038 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5045 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5046 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5053 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5054 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5056 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
5058 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5059 && test -z "${cf_tst_cflags}" \
5060 && cf_fix_cppflags=no
5065 if test -n "$cf_new_cflags" ; then
5067 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5068 CFLAGS="${CFLAGS}$cf_new_cflags"
5072 if test -n "$cf_new_cppflags" ; then
5074 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5075 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5079 if test -n "$cf_new_extra_cppflags" ; then
5081 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5082 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5091 echo "$as_me:5091: checking for signal global datatype" >&5
5092 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
5093 if test "${cf_cv_sig_atomic_t+set}" = set; then
5094 echo $ECHO_N "(cached) $ECHO_C" >&6
5098 "volatile sig_atomic_t" \
5102 cat >conftest.$ac_ext <<_ACEOF
5103 #line 5103 "configure"
5104 #include "confdefs.h"
5106 #include <sys/types.h>
5112 static void handler(int sig)
5119 signal(SIGINT, handler);
5125 rm -f conftest.$ac_objext
5126 if { (eval echo "$as_me:5126: \"$ac_compile\"") >&5
5127 (eval $ac_compile) 2>&5
5129 echo "$as_me:5129: \$? = $ac_status" >&5
5130 (exit $ac_status); } &&
5131 { ac_try='test -s conftest.$ac_objext'
5132 { (eval echo "$as_me:5132: \"$ac_try\"") >&5
5135 echo "$as_me:5135: \$? = $ac_status" >&5
5136 (exit $ac_status); }; }; then
5137 cf_cv_sig_atomic_t=$cf_type
5139 echo "$as_me: failed program was:" >&5
5140 cat conftest.$ac_ext >&5
5141 cf_cv_sig_atomic_t=no
5143 rm -f conftest.$ac_objext conftest.$ac_ext
5144 test "$cf_cv_sig_atomic_t" != no && break
5149 echo "$as_me:5149: result: $cf_cv_sig_atomic_t" >&5
5150 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
5151 test "$cf_cv_sig_atomic_t" != no &&
5152 cat >>confdefs.h <<EOF
5153 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
5156 # Work around breakage on OS X
5158 echo "$as_me:5158: checking if SIGWINCH is defined" >&5
5159 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
5160 if test "${cf_cv_define_sigwinch+set}" = set; then
5161 echo $ECHO_N "(cached) $ECHO_C" >&6
5164 cat >conftest.$ac_ext <<_ACEOF
5165 #line 5165 "configure"
5166 #include "confdefs.h"
5168 #include <sys/types.h>
5169 #include <sys/signal.h>
5179 rm -f conftest.$ac_objext
5180 if { (eval echo "$as_me:5180: \"$ac_compile\"") >&5
5181 (eval $ac_compile) 2>&5
5183 echo "$as_me:5183: \$? = $ac_status" >&5
5184 (exit $ac_status); } &&
5185 { ac_try='test -s conftest.$ac_objext'
5186 { (eval echo "$as_me:5186: \"$ac_try\"") >&5
5189 echo "$as_me:5189: \$? = $ac_status" >&5
5190 (exit $ac_status); }; }; then
5191 cf_cv_define_sigwinch=yes
5193 echo "$as_me: failed program was:" >&5
5194 cat conftest.$ac_ext >&5
5195 cat >conftest.$ac_ext <<_ACEOF
5196 #line 5196 "configure"
5197 #include "confdefs.h"
5199 #undef _XOPEN_SOURCE
5200 #undef _POSIX_SOURCE
5201 #undef _POSIX_C_SOURCE
5202 #include <sys/types.h>
5203 #include <sys/signal.h>
5213 rm -f conftest.$ac_objext
5214 if { (eval echo "$as_me:5214: \"$ac_compile\"") >&5
5215 (eval $ac_compile) 2>&5
5217 echo "$as_me:5217: \$? = $ac_status" >&5
5218 (exit $ac_status); } &&
5219 { ac_try='test -s conftest.$ac_objext'
5220 { (eval echo "$as_me:5220: \"$ac_try\"") >&5
5223 echo "$as_me:5223: \$? = $ac_status" >&5
5224 (exit $ac_status); }; }; then
5225 cf_cv_define_sigwinch=maybe
5227 echo "$as_me: failed program was:" >&5
5228 cat conftest.$ac_ext >&5
5229 cf_cv_define_sigwinch=no
5231 rm -f conftest.$ac_objext conftest.$ac_ext
5234 rm -f conftest.$ac_objext conftest.$ac_ext
5237 echo "$as_me:5237: result: $cf_cv_define_sigwinch" >&5
5238 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
5240 if test "$cf_cv_define_sigwinch" = maybe ; then
5241 echo "$as_me:5241: checking for actual SIGWINCH definition" >&5
5242 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
5243 if test "${cf_cv_fixup_sigwinch+set}" = set; then
5244 echo $ECHO_N "(cached) $ECHO_C" >&6
5247 cf_cv_fixup_sigwinch=unknown
5249 while test $cf_sigwinch != 1
5251 cat >conftest.$ac_ext <<_ACEOF
5252 #line 5252 "configure"
5253 #include "confdefs.h"
5255 #undef _XOPEN_SOURCE
5256 #undef _POSIX_SOURCE
5257 #undef _POSIX_C_SOURCE
5258 #include <sys/types.h>
5259 #include <sys/signal.h>
5265 #if SIGWINCH != $cf_sigwinch
5273 rm -f conftest.$ac_objext
5274 if { (eval echo "$as_me:5274: \"$ac_compile\"") >&5
5275 (eval $ac_compile) 2>&5
5277 echo "$as_me:5277: \$? = $ac_status" >&5
5278 (exit $ac_status); } &&
5279 { ac_try='test -s conftest.$ac_objext'
5280 { (eval echo "$as_me:5280: \"$ac_try\"") >&5
5283 echo "$as_me:5283: \$? = $ac_status" >&5
5284 (exit $ac_status); }; }; then
5285 cf_cv_fixup_sigwinch=$cf_sigwinch
5288 echo "$as_me: failed program was:" >&5
5289 cat conftest.$ac_ext >&5
5291 rm -f conftest.$ac_objext conftest.$ac_ext
5293 cf_sigwinch=`expr $cf_sigwinch - 1`
5297 echo "$as_me:5297: result: $cf_cv_fixup_sigwinch" >&5
5298 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
5300 if test "$cf_cv_fixup_sigwinch" != unknown ; then
5301 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
5305 # Checks for CODESET support.
5307 echo "$as_me:5307: checking for nl_langinfo and CODESET" >&5
5308 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
5309 if test "${am_cv_langinfo_codeset+set}" = set; then
5310 echo $ECHO_N "(cached) $ECHO_C" >&6
5312 cat >conftest.$ac_ext <<_ACEOF
5313 #line 5313 "configure"
5314 #include "confdefs.h"
5315 #include <langinfo.h>
5319 char* cs = nl_langinfo(CODESET);
5324 rm -f conftest.$ac_objext conftest$ac_exeext
5325 if { (eval echo "$as_me:5325: \"$ac_link\"") >&5
5326 (eval $ac_link) 2>&5
5328 echo "$as_me:5328: \$? = $ac_status" >&5
5329 (exit $ac_status); } &&
5330 { ac_try='test -s conftest$ac_exeext'
5331 { (eval echo "$as_me:5331: \"$ac_try\"") >&5
5334 echo "$as_me:5334: \$? = $ac_status" >&5
5335 (exit $ac_status); }; }; then
5336 am_cv_langinfo_codeset=yes
5338 echo "$as_me: failed program was:" >&5
5339 cat conftest.$ac_ext >&5
5340 am_cv_langinfo_codeset=no
5342 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5345 echo "$as_me:5345: result: $am_cv_langinfo_codeset" >&5
5346 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
5347 if test $am_cv_langinfo_codeset = yes; then
5349 cat >>confdefs.h <<\EOF
5350 #define HAVE_LANGINFO_CODESET 1
5355 echo "$as_me:5355: checking if you want to use pkg-config" >&5
5356 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
5358 # Check whether --with-pkg-config or --without-pkg-config was given.
5359 if test "${with_pkg_config+set}" = set; then
5360 withval="$with_pkg_config"
5361 cf_pkg_config=$withval
5365 echo "$as_me:5365: result: $cf_pkg_config" >&5
5366 echo "${ECHO_T}$cf_pkg_config" >&6
5368 case $cf_pkg_config in
5374 if test -n "$ac_tool_prefix"; then
5375 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5376 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5377 echo "$as_me:5377: checking for $ac_word" >&5
5378 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5379 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
5380 echo $ECHO_N "(cached) $ECHO_C" >&6
5384 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5387 ac_save_IFS=$IFS; IFS=$ac_path_separator
5389 for ac_dir in $ac_dummy; do
5391 test -z "$ac_dir" && ac_dir=.
5392 if $as_executable_p "$ac_dir/$ac_word"; then
5393 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
5394 echo "$as_me:5394: found $ac_dir/$ac_word" >&5
5402 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5404 if test -n "$PKG_CONFIG"; then
5405 echo "$as_me:5405: result: $PKG_CONFIG" >&5
5406 echo "${ECHO_T}$PKG_CONFIG" >&6
5408 echo "$as_me:5408: result: no" >&5
5409 echo "${ECHO_T}no" >&6
5413 if test -z "$ac_cv_path_PKG_CONFIG"; then
5414 ac_pt_PKG_CONFIG=$PKG_CONFIG
5415 # Extract the first word of "pkg-config", so it can be a program name with args.
5416 set dummy pkg-config; ac_word=$2
5417 echo "$as_me:5417: checking for $ac_word" >&5
5418 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5419 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
5420 echo $ECHO_N "(cached) $ECHO_C" >&6
5422 case $ac_pt_PKG_CONFIG in
5424 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5427 ac_save_IFS=$IFS; IFS=$ac_path_separator
5429 for ac_dir in $ac_dummy; do
5431 test -z "$ac_dir" && ac_dir=.
5432 if $as_executable_p "$ac_dir/$ac_word"; then
5433 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
5434 echo "$as_me:5434: found $ac_dir/$ac_word" >&5
5439 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
5443 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5445 if test -n "$ac_pt_PKG_CONFIG"; then
5446 echo "$as_me:5446: result: $ac_pt_PKG_CONFIG" >&5
5447 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
5449 echo "$as_me:5449: result: no" >&5
5450 echo "${ECHO_T}no" >&6
5453 PKG_CONFIG=$ac_pt_PKG_CONFIG
5455 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5464 test -z "$PKG_CONFIG" && PKG_CONFIG=none
5465 if test "$PKG_CONFIG" != none ; then
5467 if test "x$prefix" != xNONE; then
5468 cf_path_syntax="$prefix"
5470 cf_path_syntax="$ac_default_prefix"
5473 case ".$PKG_CONFIG" in
5478 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5480 (.\${*prefix}*|.\${*dir}*)
5481 eval PKG_CONFIG="$PKG_CONFIG"
5482 case ".$PKG_CONFIG" in
5484 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5489 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5492 { { echo "$as_me:5492: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
5493 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
5494 { (exit 1); exit 1; }; }
5498 elif test "x$cf_pkg_config" != xno ; then
5499 { echo "$as_me:5499: WARNING: pkg-config is not installed" >&5
5500 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
5503 echo "$as_me:5503: checking if you want to see long compiling messages" >&5
5504 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
5506 # Check whether --enable-echo or --disable-echo was given.
5507 if test "${enable_echo+set}" = set; then
5508 enableval="$enable_echo"
5509 test "$enableval" != no && enableval=yes
5510 if test "$enableval" != "yes" ; then
5513 ECHO_LD='@echo linking $@;'
5514 RULE_CC='@echo compiling $<'
5515 SHOW_CC='@echo compiling $@'
5537 echo "$as_me:5537: result: $enableval" >&5
5538 echo "${ECHO_T}$enableval" >&6
5540 echo "$as_me:5540: checking for ncurses wrap-prefix" >&5
5541 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
5543 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
5544 if test "${with_ncurses_wrap_prefix+set}" = set; then
5545 withval="$with_ncurses_wrap_prefix"
5546 NCURSES_WRAP_PREFIX=$withval
5548 NCURSES_WRAP_PREFIX=_nc_
5550 echo "$as_me:5550: result: $NCURSES_WRAP_PREFIX" >&5
5551 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
5553 echo "$as_me:5553: checking if you want to check for wide-character functions" >&5
5554 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
5556 # Check whether --enable-widec or --disable-widec was given.
5557 if test "${enable_widec+set}" = set; then
5558 enableval="$enable_widec"
5559 test "$enableval" != no && enableval=yes
5560 if test "$enableval" != "yes" ; then
5570 echo "$as_me:5570: result: $cf_enable_widec" >&5
5571 echo "${ECHO_T}$cf_enable_widec" >&6
5573 echo "$as_me:5573: checking for specific curses-directory" >&5
5574 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
5576 # Check whether --with-curses-dir or --without-curses-dir was given.
5577 if test "${with_curses_dir+set}" = set; then
5578 withval="$with_curses_dir"
5579 cf_cv_curses_dir=$withval
5583 echo "$as_me:5583: result: $cf_cv_curses_dir" >&5
5584 echo "${ECHO_T}$cf_cv_curses_dir" >&6
5586 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5589 if test "x$prefix" != xNONE; then
5590 cf_path_syntax="$prefix"
5592 cf_path_syntax="$ac_default_prefix"
5600 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5602 (.\${*prefix}*|.\${*dir}*)
5603 eval withval="$withval"
5606 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5611 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5614 { { echo "$as_me:5614: error: expected a pathname, not \"$withval\"" >&5
5615 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5616 { (exit 1); exit 1; }; }
5620 if test -d "$cf_cv_curses_dir"
5623 if test -n "$cf_cv_curses_dir/include" ; then
5624 for cf_add_incdir in $cf_cv_curses_dir/include
5626 while test $cf_add_incdir != /usr/include
5628 if test -d $cf_add_incdir
5631 if test -n "$CFLAGS$CPPFLAGS" ; then
5632 # a loop is needed to ensure we can add subdirs of existing dirs
5633 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5634 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5635 cf_have_incdir=yes; break
5640 if test "$cf_have_incdir" = no ; then
5641 if test "$cf_add_incdir" = /usr/local/include ; then
5642 if test "$GCC" = yes
5644 cf_save_CPPFLAGS=$CPPFLAGS
5646 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5647 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5649 cat >conftest.$ac_ext <<_ACEOF
5650 #line 5650 "configure"
5651 #include "confdefs.h"
5661 rm -f conftest.$ac_objext
5662 if { (eval echo "$as_me:5662: \"$ac_compile\"") >&5
5663 (eval $ac_compile) 2>&5
5665 echo "$as_me:5665: \$? = $ac_status" >&5
5666 (exit $ac_status); } &&
5667 { ac_try='test -s conftest.$ac_objext'
5668 { (eval echo "$as_me:5668: \"$ac_try\"") >&5
5671 echo "$as_me:5671: \$? = $ac_status" >&5
5672 (exit $ac_status); }; }; then
5675 echo "$as_me: failed program was:" >&5
5676 cat conftest.$ac_ext >&5
5679 rm -f conftest.$ac_objext conftest.$ac_ext
5680 CPPFLAGS=$cf_save_CPPFLAGS
5685 if test "$cf_have_incdir" = no ; then
5686 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5688 echo "${as_me:-configure}:5688: testing adding $cf_add_incdir to include-path ..." 1>&5
5690 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5692 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5693 test "$cf_top_incdir" = "$cf_add_incdir" && break
5694 cf_add_incdir="$cf_top_incdir"
5705 if test -n "$cf_cv_curses_dir/lib" ; then
5706 for cf_add_libdir in $cf_cv_curses_dir/lib
5708 if test $cf_add_libdir = /usr/lib ; then
5710 elif test -d $cf_add_libdir
5713 if test -n "$LDFLAGS$LIBS" ; then
5714 # a loop is needed to ensure we can add subdirs of existing dirs
5715 for cf_test_libdir in $LDFLAGS $LIBS ; do
5716 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5717 cf_have_libdir=yes; break
5721 if test "$cf_have_libdir" = no ; then
5722 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5724 echo "${as_me:-configure}:5724: testing adding $cf_add_libdir to library-path ..." 1>&5
5726 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5737 echo "$as_me:5737: checking for specified curses library type" >&5
5738 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
5740 # Check whether --with-screen or --without-screen was given.
5741 if test "${with_screen+set}" = set; then
5742 withval="$with_screen"
5743 cf_cv_screen=$withval
5746 # Check whether --with-ncursesw or --without-ncursesw was given.
5747 if test "${with_ncursesw+set}" = set; then
5748 withval="$with_ncursesw"
5749 cf_cv_screen=ncursesw
5752 # Check whether --with-ncurses or --without-ncurses was given.
5753 if test "${with_ncurses+set}" = set; then
5754 withval="$with_ncurses"
5755 cf_cv_screen=ncurses
5758 # Check whether --with-pdcurses or --without-pdcurses was given.
5759 if test "${with_pdcurses+set}" = set; then
5760 withval="$with_pdcurses"
5761 cf_cv_screen=pdcurses
5764 # Check whether --with-curses-colr or --without-curses-colr was given.
5765 if test "${with_curses_colr+set}" = set; then
5766 withval="$with_curses_colr"
5767 cf_cv_screen=curses_colr
5770 # Check whether --with-curses-5lib or --without-curses-5lib was given.
5771 if test "${with_curses_5lib+set}" = set; then
5772 withval="$with_curses_5lib"
5773 cf_cv_screen=curses_5lib
5781 echo "$as_me:5781: result: $cf_cv_screen" >&5
5782 echo "${ECHO_T}$cf_cv_screen" >&6
5784 case $cf_cv_screen in
5787 echo "$as_me:5787: checking for extra include directories" >&5
5788 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
5789 if test "${cf_cv_curses_incdir+set}" = set; then
5790 echo $ECHO_N "(cached) $ECHO_C" >&6
5793 cf_cv_curses_incdir=no
5796 if test "x$cf_cv_screen" = "xcurses_colr"
5798 test -d /usr/include/curses_colr && \
5799 cf_cv_curses_incdir="-I/usr/include/curses_colr"
5803 if test "x$cf_cv_screen" = "xcurses_5lib"
5805 test -d /usr/5lib && \
5806 test -d /usr/5include && \
5807 cf_cv_curses_incdir="-I/usr/5include"
5813 echo "$as_me:5813: result: $cf_cv_curses_incdir" >&5
5814 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
5815 if test "$cf_cv_curses_incdir" != no
5818 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5819 CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
5823 echo "$as_me:5823: checking if we have identified curses headers" >&5
5824 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5825 if test "${cf_cv_ncurses_header+set}" = set; then
5826 echo $ECHO_N "(cached) $ECHO_C" >&6
5829 cf_cv_ncurses_header=none
5832 curses.h ncurses/ncurses.h ncurses/curses.h
5834 cat >conftest.$ac_ext <<_ACEOF
5835 #line 5835 "configure"
5836 #include "confdefs.h"
5837 #include <${cf_header}>
5841 initscr(); tgoto("?", 0,0)
5846 rm -f conftest.$ac_objext
5847 if { (eval echo "$as_me:5847: \"$ac_compile\"") >&5
5848 (eval $ac_compile) 2>&5
5850 echo "$as_me:5850: \$? = $ac_status" >&5
5851 (exit $ac_status); } &&
5852 { ac_try='test -s conftest.$ac_objext'
5853 { (eval echo "$as_me:5853: \"$ac_try\"") >&5
5856 echo "$as_me:5856: \$? = $ac_status" >&5
5857 (exit $ac_status); }; }; then
5858 cf_cv_ncurses_header=$cf_header; break
5860 echo "$as_me: failed program was:" >&5
5861 cat conftest.$ac_ext >&5
5863 rm -f conftest.$ac_objext conftest.$ac_ext
5867 echo "$as_me:5867: result: $cf_cv_ncurses_header" >&5
5868 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5870 if test "$cf_cv_ncurses_header" = none ; then
5871 { { echo "$as_me:5871: error: No curses header-files found" >&5
5872 echo "$as_me: error: No curses header-files found" >&2;}
5873 { (exit 1); exit 1; }; }
5876 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5878 for ac_header in $cf_cv_ncurses_header
5880 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5881 echo "$as_me:5881: checking for $ac_header" >&5
5882 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5883 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5884 echo $ECHO_N "(cached) $ECHO_C" >&6
5886 cat >conftest.$ac_ext <<_ACEOF
5887 #line 5887 "configure"
5888 #include "confdefs.h"
5889 #include <$ac_header>
5891 if { (eval echo "$as_me:5891: \"$ac_cpp conftest.$ac_ext\"") >&5
5892 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5894 egrep -v '^ *\+' conftest.er1 >conftest.err
5896 cat conftest.err >&5
5897 echo "$as_me:5897: \$? = $ac_status" >&5
5898 (exit $ac_status); } >/dev/null; then
5899 if test -s conftest.err; then
5900 ac_cpp_err=$ac_c_preproc_warn_flag
5907 if test -z "$ac_cpp_err"; then
5908 eval "$as_ac_Header=yes"
5910 echo "$as_me: failed program was:" >&5
5911 cat conftest.$ac_ext >&5
5912 eval "$as_ac_Header=no"
5914 rm -f conftest.err conftest.$ac_ext
5916 echo "$as_me:5916: result: `eval echo '${'$as_ac_Header'}'`" >&5
5917 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5918 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5919 cat >>confdefs.h <<EOF
5920 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5926 echo "$as_me:5926: checking for terminfo header" >&5
5927 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5928 if test "${cf_cv_term_header+set}" = set; then
5929 echo $ECHO_N "(cached) $ECHO_C" >&6
5932 case ${cf_cv_ncurses_header} in
5933 (*/ncurses.h|*/ncursesw.h)
5934 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5937 cf_term_header=term.h
5941 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5943 cat >conftest.$ac_ext <<_ACEOF
5944 #line 5944 "configure"
5945 #include "confdefs.h"
5947 #include <${cf_cv_ncurses_header:-curses.h}>
5953 int x = auto_left_margin
5958 rm -f conftest.$ac_objext
5959 if { (eval echo "$as_me:5959: \"$ac_compile\"") >&5
5960 (eval $ac_compile) 2>&5
5962 echo "$as_me:5962: \$? = $ac_status" >&5
5963 (exit $ac_status); } &&
5964 { ac_try='test -s conftest.$ac_objext'
5965 { (eval echo "$as_me:5965: \"$ac_try\"") >&5
5968 echo "$as_me:5968: \$? = $ac_status" >&5
5969 (exit $ac_status); }; }; then
5971 cf_cv_term_header="$cf_test"
5973 echo "$as_me: failed program was:" >&5
5974 cat conftest.$ac_ext >&5
5976 cf_cv_term_header=unknown
5979 rm -f conftest.$ac_objext conftest.$ac_ext
5980 test "$cf_cv_term_header" != unknown && break
5984 echo "$as_me:5984: result: $cf_cv_term_header" >&5
5985 echo "${ECHO_T}$cf_cv_term_header" >&6
5987 # Set definitions to allow ifdef'ing to accommodate subdirectories
5989 case $cf_cv_term_header in
5992 cat >>confdefs.h <<\EOF
5993 #define HAVE_TERM_H 1
5999 case $cf_cv_term_header in
6002 cat >>confdefs.h <<\EOF
6003 #define HAVE_NCURSES_TERM_H 1
6009 cat >>confdefs.h <<\EOF
6010 #define HAVE_NCURSESW_TERM_H 1
6016 echo "$as_me:6016: checking for ncurses version" >&5
6017 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6018 if test "${cf_cv_ncurses_version+set}" = set; then
6019 echo $ECHO_N "(cached) $ECHO_C" >&6
6022 cf_cv_ncurses_version=no
6025 if test "$cross_compiling" = yes; then
6027 # This will not work if the preprocessor splits the line after the
6028 # Autoconf token. The 'unproto' program does that.
6029 cat > conftest.$ac_ext <<EOF
6030 #include <${cf_cv_ncurses_header:-curses.h}>
6032 #ifdef NCURSES_VERSION
6033 Autoconf NCURSES_VERSION
6041 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6042 { (eval echo "$as_me:6042: \"$cf_try\"") >&5
6045 echo "$as_me:6045: \$? = $ac_status" >&5
6046 (exit $ac_status); }
6047 if test -f conftest.out ; then
6048 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6049 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6054 cat >conftest.$ac_ext <<_ACEOF
6055 #line 6055 "configure"
6056 #include "confdefs.h"
6058 #include <${cf_cv_ncurses_header:-curses.h}>
6062 FILE *fp = fopen("$cf_tempfile", "w");
6063 #ifdef NCURSES_VERSION
6064 # ifdef NCURSES_VERSION_PATCH
6065 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6067 fprintf(fp, "%s\n", NCURSES_VERSION);
6071 fprintf(fp, "old\n");
6076 ${cf_cv_main_return:-return}(0);
6079 rm -f conftest$ac_exeext
6080 if { (eval echo "$as_me:6080: \"$ac_link\"") >&5
6081 (eval $ac_link) 2>&5
6083 echo "$as_me:6083: \$? = $ac_status" >&5
6084 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6085 { (eval echo "$as_me:6085: \"$ac_try\"") >&5
6088 echo "$as_me:6088: \$? = $ac_status" >&5
6089 (exit $ac_status); }; }; then
6091 cf_cv_ncurses_version=`cat $cf_tempfile`
6093 echo "$as_me: program exited with status $ac_status" >&5
6094 echo "$as_me: failed program was:" >&5
6095 cat conftest.$ac_ext >&5
6097 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6102 echo "$as_me:6102: result: $cf_cv_ncurses_version" >&5
6103 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6104 test "$cf_cv_ncurses_version" = no ||
6105 cat >>confdefs.h <<\EOF
6109 echo "$as_me:6109: checking if we have identified curses libraries" >&5
6110 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
6111 cat >conftest.$ac_ext <<_ACEOF
6112 #line 6112 "configure"
6113 #include "confdefs.h"
6114 #include <${cf_cv_ncurses_header:-curses.h}>
6118 initscr(); tgoto("?", 0,0)
6123 rm -f conftest.$ac_objext conftest$ac_exeext
6124 if { (eval echo "$as_me:6124: \"$ac_link\"") >&5
6125 (eval $ac_link) 2>&5
6127 echo "$as_me:6127: \$? = $ac_status" >&5
6128 (exit $ac_status); } &&
6129 { ac_try='test -s conftest$ac_exeext'
6130 { (eval echo "$as_me:6130: \"$ac_try\"") >&5
6133 echo "$as_me:6133: \$? = $ac_status" >&5
6134 (exit $ac_status); }; }; then
6137 echo "$as_me: failed program was:" >&5
6138 cat conftest.$ac_ext >&5
6141 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6142 echo "$as_me:6142: result: $cf_result" >&5
6143 echo "${ECHO_T}$cf_result" >&6
6145 if test "$cf_result" = no ; then
6148 echo "$as_me:6148: checking for tgoto in -lmytinfo" >&5
6149 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6150 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6151 echo $ECHO_N "(cached) $ECHO_C" >&6
6153 ac_check_lib_save_LIBS=$LIBS
6154 LIBS="-lmytinfo $LIBS"
6155 cat >conftest.$ac_ext <<_ACEOF
6156 #line 6156 "configure"
6157 #include "confdefs.h"
6159 /* Override any gcc2 internal prototype to avoid an error. */
6163 /* We use char because int might match the return type of a gcc2
6164 builtin and then its argument prototype would still apply. */
6174 rm -f conftest.$ac_objext conftest$ac_exeext
6175 if { (eval echo "$as_me:6175: \"$ac_link\"") >&5
6176 (eval $ac_link) 2>&5
6178 echo "$as_me:6178: \$? = $ac_status" >&5
6179 (exit $ac_status); } &&
6180 { ac_try='test -s conftest$ac_exeext'
6181 { (eval echo "$as_me:6181: \"$ac_try\"") >&5
6184 echo "$as_me:6184: \$? = $ac_status" >&5
6185 (exit $ac_status); }; }; then
6186 ac_cv_lib_mytinfo_tgoto=yes
6188 echo "$as_me: failed program was:" >&5
6189 cat conftest.$ac_ext >&5
6190 ac_cv_lib_mytinfo_tgoto=no
6192 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6193 LIBS=$ac_check_lib_save_LIBS
6195 echo "$as_me:6195: result: $ac_cv_lib_mytinfo_tgoto" >&5
6196 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6197 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6199 cf_add_libs="-lmytinfo"
6200 # Filter out duplicates - this happens with badly-designed ".pc" files...
6201 for cf_add_1lib in $LIBS
6203 for cf_add_2lib in $cf_add_libs
6205 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6211 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6219 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
6220 # next (1998), and xcurses "newer" (2000). There is no header file for
6221 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
6222 # term.h) for cur_colr
6223 if test "x$cf_cv_screen" = "xcurses_colr"
6225 echo "$as_me:6225: checking for initscr in -lcur_colr" >&5
6226 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
6227 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
6228 echo $ECHO_N "(cached) $ECHO_C" >&6
6230 ac_check_lib_save_LIBS=$LIBS
6231 LIBS="-lcur_colr $LIBS"
6232 cat >conftest.$ac_ext <<_ACEOF
6233 #line 6233 "configure"
6234 #include "confdefs.h"
6236 /* Override any gcc2 internal prototype to avoid an error. */
6240 /* We use char because int might match the return type of a gcc2
6241 builtin and then its argument prototype would still apply. */
6251 rm -f conftest.$ac_objext conftest$ac_exeext
6252 if { (eval echo "$as_me:6252: \"$ac_link\"") >&5
6253 (eval $ac_link) 2>&5
6255 echo "$as_me:6255: \$? = $ac_status" >&5
6256 (exit $ac_status); } &&
6257 { ac_try='test -s conftest$ac_exeext'
6258 { (eval echo "$as_me:6258: \"$ac_try\"") >&5
6261 echo "$as_me:6261: \$? = $ac_status" >&5
6262 (exit $ac_status); }; }; then
6263 ac_cv_lib_cur_colr_initscr=yes
6265 echo "$as_me: failed program was:" >&5
6266 cat conftest.$ac_ext >&5
6267 ac_cv_lib_cur_colr_initscr=no
6269 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6270 LIBS=$ac_check_lib_save_LIBS
6272 echo "$as_me:6272: result: $ac_cv_lib_cur_colr_initscr" >&5
6273 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
6274 if test $ac_cv_lib_cur_colr_initscr = yes; then
6276 cf_add_libs="-lcur_colr"
6277 # Filter out duplicates - this happens with badly-designed ".pc" files...
6278 for cf_add_1lib in $LIBS
6280 for cf_add_2lib in $cf_add_libs
6282 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6288 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6292 ac_cv_func_initscr=yes
6296 echo "$as_me:6296: checking for initscr in -lHcurses" >&5
6297 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
6298 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
6299 echo $ECHO_N "(cached) $ECHO_C" >&6
6301 ac_check_lib_save_LIBS=$LIBS
6302 LIBS="-lHcurses $LIBS"
6303 cat >conftest.$ac_ext <<_ACEOF
6304 #line 6304 "configure"
6305 #include "confdefs.h"
6307 /* Override any gcc2 internal prototype to avoid an error. */
6311 /* We use char because int might match the return type of a gcc2
6312 builtin and then its argument prototype would still apply. */
6322 rm -f conftest.$ac_objext conftest$ac_exeext
6323 if { (eval echo "$as_me:6323: \"$ac_link\"") >&5
6324 (eval $ac_link) 2>&5
6326 echo "$as_me:6326: \$? = $ac_status" >&5
6327 (exit $ac_status); } &&
6328 { ac_try='test -s conftest$ac_exeext'
6329 { (eval echo "$as_me:6329: \"$ac_try\"") >&5
6332 echo "$as_me:6332: \$? = $ac_status" >&5
6333 (exit $ac_status); }; }; then
6334 ac_cv_lib_Hcurses_initscr=yes
6336 echo "$as_me: failed program was:" >&5
6337 cat conftest.$ac_ext >&5
6338 ac_cv_lib_Hcurses_initscr=no
6340 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6341 LIBS=$ac_check_lib_save_LIBS
6343 echo "$as_me:6343: result: $ac_cv_lib_Hcurses_initscr" >&5
6344 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
6345 if test $ac_cv_lib_Hcurses_initscr = yes; then
6347 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
6349 cf_add_libs="-lHcurses"
6350 # Filter out duplicates - this happens with badly-designed ".pc" files...
6351 for cf_add_1lib in $LIBS
6353 for cf_add_2lib in $cf_add_libs
6355 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6361 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6365 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6366 CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
6368 ac_cv_func_initscr=yes
6377 case `arch 2>/dev/null` in
6382 if test -n "/lib64" ; then
6383 for cf_add_libdir in /lib64
6385 if test $cf_add_libdir = /usr/lib ; then
6387 elif test -d $cf_add_libdir
6390 if test -n "$LDFLAGS$LIBS" ; then
6391 # a loop is needed to ensure we can add subdirs of existing dirs
6392 for cf_test_libdir in $LDFLAGS $LIBS ; do
6393 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6394 cf_have_libdir=yes; break
6398 if test "$cf_have_libdir" = no ; then
6399 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6401 echo "${as_me:-configure}:6401: testing adding $cf_add_libdir to library-path ..." 1>&5
6403 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6411 if test -n "/lib" ; then
6412 for cf_add_libdir in /lib
6414 if test $cf_add_libdir = /usr/lib ; then
6416 elif test -d $cf_add_libdir
6419 if test -n "$LDFLAGS$LIBS" ; then
6420 # a loop is needed to ensure we can add subdirs of existing dirs
6421 for cf_test_libdir in $LDFLAGS $LIBS ; do
6422 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6423 cf_have_libdir=yes; break
6427 if test "$cf_have_libdir" = no ; then
6428 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6430 echo "${as_me:-configure}:6430: testing adding $cf_add_libdir to library-path ..." 1>&5
6432 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6442 if test -n "/lib" ; then
6443 for cf_add_libdir in /lib
6445 if test $cf_add_libdir = /usr/lib ; then
6447 elif test -d $cf_add_libdir
6450 if test -n "$LDFLAGS$LIBS" ; then
6451 # a loop is needed to ensure we can add subdirs of existing dirs
6452 for cf_test_libdir in $LDFLAGS $LIBS ; do
6453 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6454 cf_have_libdir=yes; break
6458 if test "$cf_have_libdir" = no ; then
6459 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6461 echo "${as_me:-configure}:6461: testing adding $cf_add_libdir to library-path ..." 1>&5
6463 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6473 if test "x$cf_cv_screen" = "xcurses_5lib"
6475 if test -d /usr/5lib ; then
6477 if test -n "/usr/5lib" ; then
6478 for cf_add_libdir in /usr/5lib
6480 if test $cf_add_libdir = /usr/lib ; then
6482 elif test -d $cf_add_libdir
6485 if test -n "$LDFLAGS$LIBS" ; then
6486 # a loop is needed to ensure we can add subdirs of existing dirs
6487 for cf_test_libdir in $LDFLAGS $LIBS ; do
6488 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6489 cf_have_libdir=yes; break
6493 if test "$cf_have_libdir" = no ; then
6494 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6496 echo "${as_me:-configure}:6496: testing adding $cf_add_libdir to library-path ..." 1>&5
6498 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6504 cf_add_libs="-lcurses -ltermcap"
6505 # Filter out duplicates - this happens with badly-designed ".pc" files...
6506 for cf_add_1lib in $LIBS
6508 for cf_add_2lib in $cf_add_libs
6510 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6516 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6522 ac_cv_func_initscr=yes
6526 if test ".$ac_cv_func_initscr" != .yes ; then
6527 cf_save_LIBS="$LIBS"
6529 if test ".${cf_cv_ncurses_version:-no}" != .no
6531 cf_check_list="ncurses curses cursesX"
6533 cf_check_list="cursesX curses ncurses"
6536 # Check for library containing tgoto. Do this before curses library
6537 # because it may be needed to link the test-case for initscr.
6538 if test "x$cf_term_lib" = x
6540 echo "$as_me:6540: checking for tgoto" >&5
6541 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
6542 if test "${ac_cv_func_tgoto+set}" = set; then
6543 echo $ECHO_N "(cached) $ECHO_C" >&6
6545 cat >conftest.$ac_ext <<_ACEOF
6546 #line 6546 "configure"
6547 #include "confdefs.h"
6548 /* System header to define __stub macros and hopefully few prototypes,
6549 which can conflict with char tgoto (); below. */
6551 /* Override any gcc2 internal prototype to avoid an error. */
6555 /* We use char because int might match the return type of a gcc2
6556 builtin and then its argument prototype would still apply. */
6563 /* The GNU C library defines this for functions which it implements
6564 to always fail with ENOSYS. Some functions are actually named
6565 something starting with __ and the normal name is an alias. */
6566 #if defined (__stub_tgoto) || defined (__stub___tgoto)
6569 f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6576 rm -f conftest.$ac_objext conftest$ac_exeext
6577 if { (eval echo "$as_me:6577: \"$ac_link\"") >&5
6578 (eval $ac_link) 2>&5
6580 echo "$as_me:6580: \$? = $ac_status" >&5
6581 (exit $ac_status); } &&
6582 { ac_try='test -s conftest$ac_exeext'
6583 { (eval echo "$as_me:6583: \"$ac_try\"") >&5
6586 echo "$as_me:6586: \$? = $ac_status" >&5
6587 (exit $ac_status); }; }; then
6588 ac_cv_func_tgoto=yes
6590 echo "$as_me: failed program was:" >&5
6591 cat conftest.$ac_ext >&5
6594 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6596 echo "$as_me:6596: result: $ac_cv_func_tgoto" >&5
6597 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
6598 if test $ac_cv_func_tgoto = yes; then
6599 cf_term_lib=predefined
6602 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
6604 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
6605 echo "$as_me:6605: checking for tgoto in -l$cf_term_lib" >&5
6606 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
6607 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
6608 echo $ECHO_N "(cached) $ECHO_C" >&6
6610 ac_check_lib_save_LIBS=$LIBS
6611 LIBS="-l$cf_term_lib $LIBS"
6612 cat >conftest.$ac_ext <<_ACEOF
6613 #line 6613 "configure"
6614 #include "confdefs.h"
6616 /* Override any gcc2 internal prototype to avoid an error. */
6620 /* We use char because int might match the return type of a gcc2
6621 builtin and then its argument prototype would still apply. */
6631 rm -f conftest.$ac_objext conftest$ac_exeext
6632 if { (eval echo "$as_me:6632: \"$ac_link\"") >&5
6633 (eval $ac_link) 2>&5
6635 echo "$as_me:6635: \$? = $ac_status" >&5
6636 (exit $ac_status); } &&
6637 { ac_try='test -s conftest$ac_exeext'
6638 { (eval echo "$as_me:6638: \"$ac_try\"") >&5
6641 echo "$as_me:6641: \$? = $ac_status" >&5
6642 (exit $ac_status); }; }; then
6643 eval "$as_ac_Lib=yes"
6645 echo "$as_me: failed program was:" >&5
6646 cat conftest.$ac_ext >&5
6647 eval "$as_ac_Lib=no"
6649 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6650 LIBS=$ac_check_lib_save_LIBS
6652 echo "$as_me:6652: result: `eval echo '${'$as_ac_Lib'}'`" >&5
6653 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
6654 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
6656 : ${cf_nculib_root:=$cf_term_lib}
6667 # Check for library containing initscr
6668 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
6669 if test "x$cf_curs_lib" = x
6671 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
6673 LIBS="-l$cf_curs_lib $cf_save_LIBS"
6674 if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
6675 echo "$as_me:6675: checking if we can link with $cf_curs_lib library" >&5
6676 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
6677 cat >conftest.$ac_ext <<_ACEOF
6678 #line 6678 "configure"
6679 #include "confdefs.h"
6680 #include <${cf_cv_ncurses_header:-curses.h}>
6689 rm -f conftest.$ac_objext conftest$ac_exeext
6690 if { (eval echo "$as_me:6690: \"$ac_link\"") >&5
6691 (eval $ac_link) 2>&5
6693 echo "$as_me:6693: \$? = $ac_status" >&5
6694 (exit $ac_status); } &&
6695 { ac_try='test -s conftest$ac_exeext'
6696 { (eval echo "$as_me:6696: \"$ac_try\"") >&5
6699 echo "$as_me:6699: \$? = $ac_status" >&5
6700 (exit $ac_status); }; }; then
6703 echo "$as_me: failed program was:" >&5
6704 cat conftest.$ac_ext >&5
6707 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6708 echo "$as_me:6708: result: $cf_result" >&5
6709 echo "${ECHO_T}$cf_result" >&6
6710 test $cf_result = yes && break
6711 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
6713 elif test "$cf_term_lib" != predefined ; then
6714 echo "$as_me:6714: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
6715 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
6716 cat >conftest.$ac_ext <<_ACEOF
6717 #line 6717 "configure"
6718 #include "confdefs.h"
6719 #include <${cf_cv_ncurses_header:-curses.h}>
6723 initscr(); tgoto((char *)0, 0, 0);
6728 rm -f conftest.$ac_objext conftest$ac_exeext
6729 if { (eval echo "$as_me:6729: \"$ac_link\"") >&5
6730 (eval $ac_link) 2>&5
6732 echo "$as_me:6732: \$? = $ac_status" >&5
6733 (exit $ac_status); } &&
6734 { ac_try='test -s conftest$ac_exeext'
6735 { (eval echo "$as_me:6735: \"$ac_try\"") >&5
6738 echo "$as_me:6738: \$? = $ac_status" >&5
6739 (exit $ac_status); }; }; then
6742 echo "$as_me: failed program was:" >&5
6743 cat conftest.$ac_ext >&5
6745 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
6746 cat >conftest.$ac_ext <<_ACEOF
6747 #line 6747 "configure"
6748 #include "confdefs.h"
6749 #include <${cf_cv_ncurses_header:-curses.h}>
6758 rm -f conftest.$ac_objext conftest$ac_exeext
6759 if { (eval echo "$as_me:6759: \"$ac_link\"") >&5
6760 (eval $ac_link) 2>&5
6762 echo "$as_me:6762: \$? = $ac_status" >&5
6763 (exit $ac_status); } &&
6764 { ac_try='test -s conftest$ac_exeext'
6765 { (eval echo "$as_me:6765: \"$ac_try\"") >&5
6768 echo "$as_me:6768: \$? = $ac_status" >&5
6769 (exit $ac_status); }; }; then
6772 echo "$as_me: failed program was:" >&5
6773 cat conftest.$ac_ext >&5
6776 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6779 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6780 echo "$as_me:6780: result: $cf_result" >&5
6781 echo "${ECHO_T}$cf_result" >&6
6782 test $cf_result != error && break
6786 test $cf_curs_lib = unknown && { { echo "$as_me:6786: error: no curses library found" >&5
6787 echo "$as_me: error: no curses library found" >&2;}
6788 { (exit 1); exit 1; }; }
6795 echo "$as_me:6795: checking for multibyte character support" >&5
6796 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6797 if test "${cf_cv_utf8_lib+set}" = set; then
6798 echo $ECHO_N "(cached) $ECHO_C" >&6
6801 cf_save_LIBS="$LIBS"
6802 cat >conftest.$ac_ext <<_ACEOF
6803 #line 6803 "configure"
6804 #include "confdefs.h"
6815 rm -f conftest.$ac_objext conftest$ac_exeext
6816 if { (eval echo "$as_me:6816: \"$ac_link\"") >&5
6817 (eval $ac_link) 2>&5
6819 echo "$as_me:6819: \$? = $ac_status" >&5
6820 (exit $ac_status); } &&
6821 { ac_try='test -s conftest$ac_exeext'
6822 { (eval echo "$as_me:6822: \"$ac_try\"") >&5
6825 echo "$as_me:6825: \$? = $ac_status" >&5
6826 (exit $ac_status); }; }; then
6829 echo "$as_me: failed program was:" >&5
6830 cat conftest.$ac_ext >&5
6832 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6833 # will be set on completion of the AC_TRY_LINK below.
6834 cf_cv_header_path_utf8=
6835 cf_cv_library_path_utf8=
6837 echo "${as_me:-configure}:6837: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6839 cf_save_LIBS="$LIBS"
6841 cat >conftest.$ac_ext <<_ACEOF
6842 #line 6842 "configure"
6843 #include "confdefs.h"
6845 #include <libutf8.h>
6854 rm -f conftest.$ac_objext conftest$ac_exeext
6855 if { (eval echo "$as_me:6855: \"$ac_link\"") >&5
6856 (eval $ac_link) 2>&5
6858 echo "$as_me:6858: \$? = $ac_status" >&5
6859 (exit $ac_status); } &&
6860 { ac_try='test -s conftest$ac_exeext'
6861 { (eval echo "$as_me:6861: \"$ac_try\"") >&5
6864 echo "$as_me:6864: \$? = $ac_status" >&5
6865 (exit $ac_status); }; }; then
6867 cf_cv_find_linkage_utf8=yes
6868 cf_cv_header_path_utf8=/usr/include
6869 cf_cv_library_path_utf8=/usr/lib
6872 echo "$as_me: failed program was:" >&5
6873 cat conftest.$ac_ext >&5
6875 LIBS="-lutf8 $cf_save_LIBS"
6877 cat >conftest.$ac_ext <<_ACEOF
6878 #line 6878 "configure"
6879 #include "confdefs.h"
6881 #include <libutf8.h>
6890 rm -f conftest.$ac_objext conftest$ac_exeext
6891 if { (eval echo "$as_me:6891: \"$ac_link\"") >&5
6892 (eval $ac_link) 2>&5
6894 echo "$as_me:6894: \$? = $ac_status" >&5
6895 (exit $ac_status); } &&
6896 { ac_try='test -s conftest$ac_exeext'
6897 { (eval echo "$as_me:6897: \"$ac_try\"") >&5
6900 echo "$as_me:6900: \$? = $ac_status" >&5
6901 (exit $ac_status); }; }; then
6903 cf_cv_find_linkage_utf8=yes
6904 cf_cv_header_path_utf8=/usr/include
6905 cf_cv_library_path_utf8=/usr/lib
6906 cf_cv_library_file_utf8="-lutf8"
6909 echo "$as_me: failed program was:" >&5
6910 cat conftest.$ac_ext >&5
6912 cf_cv_find_linkage_utf8=no
6913 LIBS="$cf_save_LIBS"
6915 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6917 echo "${as_me:-configure}:6917: testing find linkage for utf8 library ..." 1>&5
6919 echo "${as_me:-configure}:6919: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6921 cf_save_CPPFLAGS="$CPPFLAGS"
6922 cf_test_CPPFLAGS="$CPPFLAGS"
6926 # collect the current set of include-directories from compiler flags
6927 cf_header_path_list=""
6928 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6929 for cf_header_path in $CPPFLAGS $CFLAGS
6931 case $cf_header_path in
6933 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6935 test "x$cf_header_path" != "xNONE" && \
6936 test -d "$cf_header_path" && \
6938 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6939 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6940 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
6941 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
6942 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
6943 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6946 cf_header_path_list="$cf_header_path_list $cf_search"
6952 # add the variations for the package we are looking for
6956 test "x$prefix" != "xNONE" && \
6957 test -d "$prefix" && \
6959 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6960 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6961 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
6962 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
6963 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
6964 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
6967 for cf_subdir_prefix in \
6976 test "x$cf_subdir_prefix" != "x$prefix" && \
6977 test -d "$cf_subdir_prefix" && \
6978 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6979 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6980 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6981 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6982 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6983 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6984 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6989 test "$includedir" != NONE && \
6990 test "$includedir" != "/usr/include" && \
6991 test -d "$includedir" && {
6992 test -d $includedir && cf_search="$cf_search $includedir"
6993 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
6996 test "$oldincludedir" != NONE && \
6997 test "$oldincludedir" != "/usr/include" && \
6998 test -d "$oldincludedir" && {
6999 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7000 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7003 cf_search="$cf_search $cf_header_path_list"
7005 for cf_cv_header_path_utf8 in $cf_search
7007 if test -d $cf_cv_header_path_utf8 ; then
7008 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
7010 echo "${as_me:-configure}:7010: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7012 CPPFLAGS="$cf_save_CPPFLAGS"
7014 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7015 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
7017 cat >conftest.$ac_ext <<_ACEOF
7018 #line 7018 "configure"
7019 #include "confdefs.h"
7021 #include <libutf8.h>
7030 rm -f conftest.$ac_objext
7031 if { (eval echo "$as_me:7031: \"$ac_compile\"") >&5
7032 (eval $ac_compile) 2>&5
7034 echo "$as_me:7034: \$? = $ac_status" >&5
7035 (exit $ac_status); } &&
7036 { ac_try='test -s conftest.$ac_objext'
7037 { (eval echo "$as_me:7037: \"$ac_try\"") >&5
7040 echo "$as_me:7040: \$? = $ac_status" >&5
7041 (exit $ac_status); }; }; then
7043 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7045 echo "${as_me:-configure}:7045: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7047 cf_cv_find_linkage_utf8=maybe
7048 cf_test_CPPFLAGS="$CPPFLAGS"
7051 echo "$as_me: failed program was:" >&5
7052 cat conftest.$ac_ext >&5
7054 CPPFLAGS="$cf_save_CPPFLAGS"
7057 rm -f conftest.$ac_objext conftest.$ac_ext
7061 if test "$cf_cv_find_linkage_utf8" = maybe ; then
7063 echo "${as_me:-configure}:7063: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7065 cf_save_LIBS="$LIBS"
7066 cf_save_LDFLAGS="$LDFLAGS"
7068 if test "$cf_cv_find_linkage_utf8" != yes ; then
7071 cf_library_path_list=""
7072 if test -n "${LDFLAGS}${LIBS}" ; then
7073 for cf_library_path in $LDFLAGS $LIBS
7075 case $cf_library_path in
7077 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7079 test "x$cf_library_path" != "xNONE" && \
7080 test -d "$cf_library_path" && \
7082 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7083 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7084 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
7085 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7086 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
7087 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7090 cf_library_path_list="$cf_library_path_list $cf_search"
7098 test "x$prefix" != "xNONE" && \
7099 test -d "$prefix" && \
7101 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7102 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7103 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
7104 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
7105 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
7106 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
7109 for cf_subdir_prefix in \
7118 test "x$cf_subdir_prefix" != "x$prefix" && \
7119 test -d "$cf_subdir_prefix" && \
7120 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7121 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7122 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
7123 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
7124 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
7125 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
7126 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
7131 cf_search="$cf_library_path_list $cf_search"
7133 for cf_cv_library_path_utf8 in $cf_search
7135 if test -d $cf_cv_library_path_utf8 ; then
7136 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7138 echo "${as_me:-configure}:7138: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7140 CPPFLAGS="$cf_test_CPPFLAGS"
7141 LIBS="-lutf8 $cf_save_LIBS"
7142 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7143 cat >conftest.$ac_ext <<_ACEOF
7144 #line 7144 "configure"
7145 #include "confdefs.h"
7147 #include <libutf8.h>
7156 rm -f conftest.$ac_objext conftest$ac_exeext
7157 if { (eval echo "$as_me:7157: \"$ac_link\"") >&5
7158 (eval $ac_link) 2>&5
7160 echo "$as_me:7160: \$? = $ac_status" >&5
7161 (exit $ac_status); } &&
7162 { ac_try='test -s conftest$ac_exeext'
7163 { (eval echo "$as_me:7163: \"$ac_try\"") >&5
7166 echo "$as_me:7166: \$? = $ac_status" >&5
7167 (exit $ac_status); }; }; then
7169 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7171 echo "${as_me:-configure}:7171: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7173 cf_cv_find_linkage_utf8=yes
7174 cf_cv_library_file_utf8="-lutf8"
7177 echo "$as_me: failed program was:" >&5
7178 cat conftest.$ac_ext >&5
7180 CPPFLAGS="$cf_save_CPPFLAGS"
7181 LIBS="$cf_save_LIBS"
7182 LDFLAGS="$cf_save_LDFLAGS"
7185 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7188 CPPFLAGS="$cf_save_CPPFLAGS"
7189 LDFLAGS="$cf_save_LDFLAGS"
7193 cf_cv_find_linkage_utf8=no
7197 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7200 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7202 LIBS="$cf_save_LIBS"
7204 if test "$cf_cv_find_linkage_utf8" = yes ; then
7205 cf_cv_utf8_lib=add-on
7211 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7213 echo "$as_me:7213: result: $cf_cv_utf8_lib" >&5
7214 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7216 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7218 if test "$cf_cv_utf8_lib" = "add-on" ; then
7220 cat >>confdefs.h <<\EOF
7221 #define HAVE_LIBUTF8_H 1
7224 if test -n "$cf_cv_header_path_utf8" ; then
7225 for cf_add_incdir in $cf_cv_header_path_utf8
7227 while test $cf_add_incdir != /usr/include
7229 if test -d $cf_add_incdir
7232 if test -n "$CFLAGS$CPPFLAGS" ; then
7233 # a loop is needed to ensure we can add subdirs of existing dirs
7234 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7235 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7236 cf_have_incdir=yes; break
7241 if test "$cf_have_incdir" = no ; then
7242 if test "$cf_add_incdir" = /usr/local/include ; then
7243 if test "$GCC" = yes
7245 cf_save_CPPFLAGS=$CPPFLAGS
7247 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7248 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7250 cat >conftest.$ac_ext <<_ACEOF
7251 #line 7251 "configure"
7252 #include "confdefs.h"
7262 rm -f conftest.$ac_objext
7263 if { (eval echo "$as_me:7263: \"$ac_compile\"") >&5
7264 (eval $ac_compile) 2>&5
7266 echo "$as_me:7266: \$? = $ac_status" >&5
7267 (exit $ac_status); } &&
7268 { ac_try='test -s conftest.$ac_objext'
7269 { (eval echo "$as_me:7269: \"$ac_try\"") >&5
7272 echo "$as_me:7272: \$? = $ac_status" >&5
7273 (exit $ac_status); }; }; then
7276 echo "$as_me: failed program was:" >&5
7277 cat conftest.$ac_ext >&5
7280 rm -f conftest.$ac_objext conftest.$ac_ext
7281 CPPFLAGS=$cf_save_CPPFLAGS
7286 if test "$cf_have_incdir" = no ; then
7287 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7289 echo "${as_me:-configure}:7289: testing adding $cf_add_incdir to include-path ..." 1>&5
7291 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7293 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7294 test "$cf_top_incdir" = "$cf_add_incdir" && break
7295 cf_add_incdir="$cf_top_incdir"
7306 if test -n "$cf_cv_library_path_utf8" ; then
7307 for cf_add_libdir in $cf_cv_library_path_utf8
7309 if test $cf_add_libdir = /usr/lib ; then
7311 elif test -d $cf_add_libdir
7314 if test -n "$LDFLAGS$LIBS" ; then
7315 # a loop is needed to ensure we can add subdirs of existing dirs
7316 for cf_test_libdir in $LDFLAGS $LIBS ; do
7317 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7318 cf_have_libdir=yes; break
7322 if test "$cf_have_libdir" = no ; then
7323 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7325 echo "${as_me:-configure}:7325: testing adding $cf_add_libdir to library-path ..." 1>&5
7327 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7333 cf_add_libs="$cf_cv_library_file_utf8"
7334 # Filter out duplicates - this happens with badly-designed ".pc" files...
7335 for cf_add_1lib in $LIBS
7337 for cf_add_2lib in $cf_add_libs
7339 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7345 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7351 cf_ncuconfig_root=$cf_cv_screen
7352 cf_have_ncuconfig=no
7354 if test "x${PKG_CONFIG:=none}" != xnone; then
7355 echo "$as_me:7355: checking pkg-config for $cf_ncuconfig_root" >&5
7356 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7357 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7358 echo "$as_me:7358: result: yes" >&5
7359 echo "${ECHO_T}yes" >&6
7361 echo "$as_me:7361: checking if the $cf_ncuconfig_root package files work" >&5
7362 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7363 cf_have_ncuconfig=unknown
7365 cf_save_CPPFLAGS="$CPPFLAGS"
7366 cf_save_LIBS="$LIBS"
7371 cf_new_extra_cppflags=
7373 for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
7375 case $cf_fix_cppflags in
7377 case $cf_add_cflags in
7378 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7379 case $cf_add_cflags in
7381 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7383 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7384 && test -z "${cf_tst_cflags}" \
7385 && cf_fix_cppflags=yes
7387 if test $cf_fix_cppflags = yes ; then
7389 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7390 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7393 elif test "${cf_tst_cflags}" = "\"'" ; then
7395 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7396 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7406 case $cf_add_cflags in
7408 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7410 CPPFLAGS=`echo "$CPPFLAGS" | \
7411 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7412 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7417 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7418 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7425 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7426 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7433 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7434 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7436 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7438 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7439 && test -z "${cf_tst_cflags}" \
7440 && cf_fix_cppflags=no
7445 if test -n "$cf_new_cflags" ; then
7447 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7448 CFLAGS="${CFLAGS}$cf_new_cflags"
7452 if test -n "$cf_new_cppflags" ; then
7454 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7455 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7459 if test -n "$cf_new_extra_cppflags" ; then
7461 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7462 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7466 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7467 # Filter out duplicates - this happens with badly-designed ".pc" files...
7468 for cf_add_1lib in $LIBS
7470 for cf_add_2lib in $cf_add_libs
7472 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7478 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7482 cat >conftest.$ac_ext <<_ACEOF
7483 #line 7483 "configure"
7484 #include "confdefs.h"
7485 #include <${cf_cv_ncurses_header:-curses.h}>
7489 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7494 rm -f conftest.$ac_objext conftest$ac_exeext
7495 if { (eval echo "$as_me:7495: \"$ac_link\"") >&5
7496 (eval $ac_link) 2>&5
7498 echo "$as_me:7498: \$? = $ac_status" >&5
7499 (exit $ac_status); } &&
7500 { ac_try='test -s conftest$ac_exeext'
7501 { (eval echo "$as_me:7501: \"$ac_try\"") >&5
7504 echo "$as_me:7504: \$? = $ac_status" >&5
7505 (exit $ac_status); }; }; then
7506 if test "$cross_compiling" = yes; then
7507 cf_have_ncuconfig=maybe
7509 cat >conftest.$ac_ext <<_ACEOF
7510 #line 7510 "configure"
7511 #include "confdefs.h"
7512 #include <${cf_cv_ncurses_header:-curses.h}>
7514 { char *xx = curses_version(); return (xx == 0); }
7516 rm -f conftest$ac_exeext
7517 if { (eval echo "$as_me:7517: \"$ac_link\"") >&5
7518 (eval $ac_link) 2>&5
7520 echo "$as_me:7520: \$? = $ac_status" >&5
7521 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7522 { (eval echo "$as_me:7522: \"$ac_try\"") >&5
7525 echo "$as_me:7525: \$? = $ac_status" >&5
7526 (exit $ac_status); }; }; then
7527 cf_have_ncuconfig=yes
7529 echo "$as_me: program exited with status $ac_status" >&5
7530 echo "$as_me: failed program was:" >&5
7531 cat conftest.$ac_ext >&5
7532 cf_have_ncuconfig=no
7534 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7537 echo "$as_me: failed program was:" >&5
7538 cat conftest.$ac_ext >&5
7539 cf_have_ncuconfig=no
7541 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7542 echo "$as_me:7542: result: $cf_have_ncuconfig" >&5
7543 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7544 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7545 if test "$cf_have_ncuconfig" != "yes"
7547 CPPFLAGS="$cf_save_CPPFLAGS"
7548 LIBS="$cf_save_LIBS"
7549 NCURSES_CONFIG_PKG=none
7552 cat >>confdefs.h <<\EOF
7556 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7558 echo "$as_me:7558: checking for terminfo header" >&5
7559 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7560 if test "${cf_cv_term_header+set}" = set; then
7561 echo $ECHO_N "(cached) $ECHO_C" >&6
7564 case ${cf_cv_ncurses_header} in
7565 (*/ncurses.h|*/ncursesw.h)
7566 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7569 cf_term_header=term.h
7573 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7575 cat >conftest.$ac_ext <<_ACEOF
7576 #line 7576 "configure"
7577 #include "confdefs.h"
7579 #include <${cf_cv_ncurses_header:-curses.h}>
7585 int x = auto_left_margin
7590 rm -f conftest.$ac_objext
7591 if { (eval echo "$as_me:7591: \"$ac_compile\"") >&5
7592 (eval $ac_compile) 2>&5
7594 echo "$as_me:7594: \$? = $ac_status" >&5
7595 (exit $ac_status); } &&
7596 { ac_try='test -s conftest.$ac_objext'
7597 { (eval echo "$as_me:7597: \"$ac_try\"") >&5
7600 echo "$as_me:7600: \$? = $ac_status" >&5
7601 (exit $ac_status); }; }; then
7603 cf_cv_term_header="$cf_test"
7605 echo "$as_me: failed program was:" >&5
7606 cat conftest.$ac_ext >&5
7608 cf_cv_term_header=unknown
7611 rm -f conftest.$ac_objext conftest.$ac_ext
7612 test "$cf_cv_term_header" != unknown && break
7616 echo "$as_me:7616: result: $cf_cv_term_header" >&5
7617 echo "${ECHO_T}$cf_cv_term_header" >&6
7619 # Set definitions to allow ifdef'ing to accommodate subdirectories
7621 case $cf_cv_term_header in
7624 cat >>confdefs.h <<\EOF
7625 #define HAVE_TERM_H 1
7631 case $cf_cv_term_header in
7634 cat >>confdefs.h <<\EOF
7635 #define HAVE_NCURSES_TERM_H 1
7641 cat >>confdefs.h <<\EOF
7642 #define HAVE_NCURSESW_TERM_H 1
7651 echo "$as_me:7651: result: no" >&5
7652 echo "${ECHO_T}no" >&6
7653 NCURSES_CONFIG_PKG=none
7656 NCURSES_CONFIG_PKG=none
7659 if test "x$cf_have_ncuconfig" = "xno"; then
7660 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7662 if test -n "$ac_tool_prefix"; then
7663 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7665 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7666 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7667 echo "$as_me:7667: checking for $ac_word" >&5
7668 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7669 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7670 echo $ECHO_N "(cached) $ECHO_C" >&6
7672 if test -n "$NCURSES_CONFIG"; then
7673 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7675 ac_save_IFS=$IFS; IFS=$ac_path_separator
7677 for ac_dir in $ac_dummy; do
7679 test -z "$ac_dir" && ac_dir=.
7680 $as_executable_p "$ac_dir/$ac_word" || continue
7681 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7682 echo "$as_me:7682: found $ac_dir/$ac_word" >&5
7688 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7689 if test -n "$NCURSES_CONFIG"; then
7690 echo "$as_me:7690: result: $NCURSES_CONFIG" >&5
7691 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7693 echo "$as_me:7693: result: no" >&5
7694 echo "${ECHO_T}no" >&6
7697 test -n "$NCURSES_CONFIG" && break
7700 if test -z "$NCURSES_CONFIG"; then
7701 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7702 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7704 # Extract the first word of "$ac_prog", so it can be a program name with args.
7705 set dummy $ac_prog; ac_word=$2
7706 echo "$as_me:7706: checking for $ac_word" >&5
7707 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7708 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7709 echo $ECHO_N "(cached) $ECHO_C" >&6
7711 if test -n "$ac_ct_NCURSES_CONFIG"; then
7712 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7714 ac_save_IFS=$IFS; IFS=$ac_path_separator
7716 for ac_dir in $ac_dummy; do
7718 test -z "$ac_dir" && ac_dir=.
7719 $as_executable_p "$ac_dir/$ac_word" || continue
7720 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7721 echo "$as_me:7721: found $ac_dir/$ac_word" >&5
7727 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7728 if test -n "$ac_ct_NCURSES_CONFIG"; then
7729 echo "$as_me:7729: result: $ac_ct_NCURSES_CONFIG" >&5
7730 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7732 echo "$as_me:7732: result: no" >&5
7733 echo "${ECHO_T}no" >&6
7736 test -n "$ac_ct_NCURSES_CONFIG" && break
7738 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7740 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7743 if test "$NCURSES_CONFIG" != none ; then
7748 cf_new_extra_cppflags=
7750 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7752 case $cf_fix_cppflags in
7754 case $cf_add_cflags in
7755 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7756 case $cf_add_cflags in
7758 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7760 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7761 && test -z "${cf_tst_cflags}" \
7762 && cf_fix_cppflags=yes
7764 if test $cf_fix_cppflags = yes ; then
7766 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7767 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7770 elif test "${cf_tst_cflags}" = "\"'" ; then
7772 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7773 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7783 case $cf_add_cflags in
7785 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7787 CPPFLAGS=`echo "$CPPFLAGS" | \
7788 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7789 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7794 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7795 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7802 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7803 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7810 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7811 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7813 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7815 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7816 && test -z "${cf_tst_cflags}" \
7817 && cf_fix_cppflags=no
7822 if test -n "$cf_new_cflags" ; then
7824 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7825 CFLAGS="${CFLAGS}$cf_new_cflags"
7829 if test -n "$cf_new_cppflags" ; then
7831 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7832 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7836 if test -n "$cf_new_extra_cppflags" ; then
7838 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7839 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7843 cf_add_libs="`$NCURSES_CONFIG --libs`"
7844 # Filter out duplicates - this happens with badly-designed ".pc" files...
7845 for cf_add_1lib in $LIBS
7847 for cf_add_2lib in $cf_add_libs
7849 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7855 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7859 # even with config script, some packages use no-override for curses.h
7861 echo "$as_me:7861: checking if we have identified curses headers" >&5
7862 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7863 if test "${cf_cv_ncurses_header+set}" = set; then
7864 echo $ECHO_N "(cached) $ECHO_C" >&6
7867 cf_cv_ncurses_header=none
7869 ncurses.h $cf_cv_screen/ncurses.h \
7870 curses.h $cf_cv_screen/curses.h
7872 cat >conftest.$ac_ext <<_ACEOF
7873 #line 7873 "configure"
7874 #include "confdefs.h"
7875 #include <${cf_header}>
7879 initscr(); tgoto("?", 0,0)
7884 rm -f conftest.$ac_objext
7885 if { (eval echo "$as_me:7885: \"$ac_compile\"") >&5
7886 (eval $ac_compile) 2>&5
7888 echo "$as_me:7888: \$? = $ac_status" >&5
7889 (exit $ac_status); } &&
7890 { ac_try='test -s conftest.$ac_objext'
7891 { (eval echo "$as_me:7891: \"$ac_try\"") >&5
7894 echo "$as_me:7894: \$? = $ac_status" >&5
7895 (exit $ac_status); }; }; then
7896 cf_cv_ncurses_header=$cf_header; break
7898 echo "$as_me: failed program was:" >&5
7899 cat conftest.$ac_ext >&5
7901 rm -f conftest.$ac_objext conftest.$ac_ext
7905 echo "$as_me:7905: result: $cf_cv_ncurses_header" >&5
7906 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7908 if test "$cf_cv_ncurses_header" = none ; then
7909 { { echo "$as_me:7909: error: No curses header-files found" >&5
7910 echo "$as_me: error: No curses header-files found" >&2;}
7911 { (exit 1); exit 1; }; }
7914 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7916 for ac_header in $cf_cv_ncurses_header
7918 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7919 echo "$as_me:7919: checking for $ac_header" >&5
7920 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7921 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7922 echo $ECHO_N "(cached) $ECHO_C" >&6
7924 cat >conftest.$ac_ext <<_ACEOF
7925 #line 7925 "configure"
7926 #include "confdefs.h"
7927 #include <$ac_header>
7929 if { (eval echo "$as_me:7929: \"$ac_cpp conftest.$ac_ext\"") >&5
7930 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7932 egrep -v '^ *\+' conftest.er1 >conftest.err
7934 cat conftest.err >&5
7935 echo "$as_me:7935: \$? = $ac_status" >&5
7936 (exit $ac_status); } >/dev/null; then
7937 if test -s conftest.err; then
7938 ac_cpp_err=$ac_c_preproc_warn_flag
7945 if test -z "$ac_cpp_err"; then
7946 eval "$as_ac_Header=yes"
7948 echo "$as_me: failed program was:" >&5
7949 cat conftest.$ac_ext >&5
7950 eval "$as_ac_Header=no"
7952 rm -f conftest.err conftest.$ac_ext
7954 echo "$as_me:7954: result: `eval echo '${'$as_ac_Header'}'`" >&5
7955 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7956 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7957 cat >>confdefs.h <<EOF
7958 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7964 cat >>confdefs.h <<\EOF
7968 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7970 cat >>confdefs.h <<EOF
7971 #define $cf_nculib_ROOT 1
7974 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7978 cf_ncuhdr_root=$cf_cv_screen
7980 test -n "$cf_cv_curses_dir" && \
7981 test "$cf_cv_curses_dir" != "no" && { \
7983 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7984 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7986 while test $cf_add_incdir != /usr/include
7988 if test -d $cf_add_incdir
7991 if test -n "$CFLAGS$CPPFLAGS" ; then
7992 # a loop is needed to ensure we can add subdirs of existing dirs
7993 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7994 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7995 cf_have_incdir=yes; break
8000 if test "$cf_have_incdir" = no ; then
8001 if test "$cf_add_incdir" = /usr/local/include ; then
8002 if test "$GCC" = yes
8004 cf_save_CPPFLAGS=$CPPFLAGS
8006 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8007 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8009 cat >conftest.$ac_ext <<_ACEOF
8010 #line 8010 "configure"
8011 #include "confdefs.h"
8021 rm -f conftest.$ac_objext
8022 if { (eval echo "$as_me:8022: \"$ac_compile\"") >&5
8023 (eval $ac_compile) 2>&5
8025 echo "$as_me:8025: \$? = $ac_status" >&5
8026 (exit $ac_status); } &&
8027 { ac_try='test -s conftest.$ac_objext'
8028 { (eval echo "$as_me:8028: \"$ac_try\"") >&5
8031 echo "$as_me:8031: \$? = $ac_status" >&5
8032 (exit $ac_status); }; }; then
8035 echo "$as_me: failed program was:" >&5
8036 cat conftest.$ac_ext >&5
8039 rm -f conftest.$ac_objext conftest.$ac_ext
8040 CPPFLAGS=$cf_save_CPPFLAGS
8045 if test "$cf_have_incdir" = no ; then
8046 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8048 echo "${as_me:-configure}:8048: testing adding $cf_add_incdir to include-path ..." 1>&5
8050 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8052 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8053 test "$cf_top_incdir" = "$cf_add_incdir" && break
8054 cf_add_incdir="$cf_top_incdir"
8067 echo "$as_me:8067: checking for $cf_ncuhdr_root header in include-path" >&5
8068 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8069 if test "${cf_cv_ncurses_h+set}" = set; then
8070 echo $ECHO_N "(cached) $ECHO_C" >&6
8073 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8074 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8075 for cf_header in $cf_header_list
8078 cat >conftest.$ac_ext <<_ACEOF
8079 #line 8079 "configure"
8080 #include "confdefs.h"
8082 #include <$cf_header>
8087 #ifdef NCURSES_VERSION
8089 printf("%s\n", NCURSES_VERSION);
8102 rm -f conftest.$ac_objext
8103 if { (eval echo "$as_me:8103: \"$ac_compile\"") >&5
8104 (eval $ac_compile) 2>&5
8106 echo "$as_me:8106: \$? = $ac_status" >&5
8107 (exit $ac_status); } &&
8108 { ac_try='test -s conftest.$ac_objext'
8109 { (eval echo "$as_me:8109: \"$ac_try\"") >&5
8112 echo "$as_me:8112: \$? = $ac_status" >&5
8113 (exit $ac_status); }; }; then
8114 cf_cv_ncurses_h=$cf_header
8117 echo "$as_me: failed program was:" >&5
8118 cat conftest.$ac_ext >&5
8121 rm -f conftest.$ac_objext conftest.$ac_ext
8123 test "$cf_cv_ncurses_h" != no && break
8127 echo "$as_me:8127: result: $cf_cv_ncurses_h" >&5
8128 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8130 if test "$cf_cv_ncurses_h" != no ; then
8131 cf_cv_ncurses_header=$cf_cv_ncurses_h
8134 echo "$as_me:8134: checking for $cf_ncuhdr_root include-path" >&5
8135 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8136 if test "${cf_cv_ncurses_h2+set}" = set; then
8137 echo $ECHO_N "(cached) $ECHO_C" >&6
8140 test -n "$verbose" && echo
8144 # collect the current set of include-directories from compiler flags
8145 cf_header_path_list=""
8146 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8147 for cf_header_path in $CPPFLAGS $CFLAGS
8149 case $cf_header_path in
8151 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8153 test "x$cf_header_path" != "xNONE" && \
8154 test -d "$cf_header_path" && \
8156 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8157 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
8158 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8159 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8160 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8161 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"
8164 cf_header_path_list="$cf_header_path_list $cf_search"
8170 # add the variations for the package we are looking for
8174 test "x$prefix" != "xNONE" && \
8175 test -d "$prefix" && \
8177 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8178 test -d $prefix/include && cf_search="$cf_search $prefix/include"
8179 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8180 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8181 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8182 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8185 for cf_subdir_prefix in \
8194 test "x$cf_subdir_prefix" != "x$prefix" && \
8195 test -d "$cf_subdir_prefix" && \
8196 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8197 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8198 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
8199 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8200 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8201 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8202 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"
8207 test "$includedir" != NONE && \
8208 test "$includedir" != "/usr/include" && \
8209 test -d "$includedir" && {
8210 test -d $includedir && cf_search="$cf_search $includedir"
8211 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8214 test "$oldincludedir" != NONE && \
8215 test "$oldincludedir" != "/usr/include" && \
8216 test -d "$oldincludedir" && {
8217 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8218 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8221 cf_search="$cf_search $cf_header_path_list"
8223 test -n "$verbose" && echo search path $cf_search
8224 cf_save2_CPPFLAGS="$CPPFLAGS"
8225 for cf_incdir in $cf_search
8228 if test -n "$cf_incdir" ; then
8229 for cf_add_incdir in $cf_incdir
8231 while test $cf_add_incdir != /usr/include
8233 if test -d $cf_add_incdir
8236 if test -n "$CFLAGS$CPPFLAGS" ; then
8237 # a loop is needed to ensure we can add subdirs of existing dirs
8238 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8239 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8240 cf_have_incdir=yes; break
8245 if test "$cf_have_incdir" = no ; then
8246 if test "$cf_add_incdir" = /usr/local/include ; then
8247 if test "$GCC" = yes
8249 cf_save_CPPFLAGS=$CPPFLAGS
8251 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8252 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8254 cat >conftest.$ac_ext <<_ACEOF
8255 #line 8255 "configure"
8256 #include "confdefs.h"
8266 rm -f conftest.$ac_objext
8267 if { (eval echo "$as_me:8267: \"$ac_compile\"") >&5
8268 (eval $ac_compile) 2>&5
8270 echo "$as_me:8270: \$? = $ac_status" >&5
8271 (exit $ac_status); } &&
8272 { ac_try='test -s conftest.$ac_objext'
8273 { (eval echo "$as_me:8273: \"$ac_try\"") >&5
8276 echo "$as_me:8276: \$? = $ac_status" >&5
8277 (exit $ac_status); }; }; then
8280 echo "$as_me: failed program was:" >&5
8281 cat conftest.$ac_ext >&5
8284 rm -f conftest.$ac_objext conftest.$ac_ext
8285 CPPFLAGS=$cf_save_CPPFLAGS
8290 if test "$cf_have_incdir" = no ; then
8291 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8293 echo "${as_me:-configure}:8293: testing adding $cf_add_incdir to include-path ..." 1>&5
8295 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8297 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8298 test "$cf_top_incdir" = "$cf_add_incdir" && break
8299 cf_add_incdir="$cf_top_incdir"
8315 cat >conftest.$ac_ext <<_ACEOF
8316 #line 8316 "configure"
8317 #include "confdefs.h"
8319 #include <$cf_header>
8324 #ifdef NCURSES_VERSION
8326 printf("%s\n", NCURSES_VERSION);
8339 rm -f conftest.$ac_objext
8340 if { (eval echo "$as_me:8340: \"$ac_compile\"") >&5
8341 (eval $ac_compile) 2>&5
8343 echo "$as_me:8343: \$? = $ac_status" >&5
8344 (exit $ac_status); } &&
8345 { ac_try='test -s conftest.$ac_objext'
8346 { (eval echo "$as_me:8346: \"$ac_try\"") >&5
8349 echo "$as_me:8349: \$? = $ac_status" >&5
8350 (exit $ac_status); }; }; then
8351 cf_cv_ncurses_h2=$cf_header
8354 echo "$as_me: failed program was:" >&5
8355 cat conftest.$ac_ext >&5
8358 rm -f conftest.$ac_objext conftest.$ac_ext
8360 if test "$cf_cv_ncurses_h2" != no ; then
8361 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8362 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8365 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8367 CPPFLAGS="$cf_save2_CPPFLAGS"
8368 test "$cf_cv_ncurses_h2" != no && break
8370 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8370: error: not found" >&5
8371 echo "$as_me: error: not found" >&2;}
8372 { (exit 1); exit 1; }; }
8375 echo "$as_me:8375: result: $cf_cv_ncurses_h2" >&5
8376 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8378 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8379 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8380 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8381 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8384 if test -n "$cf_1st_incdir" ; then
8385 for cf_add_incdir in $cf_1st_incdir
8387 while test $cf_add_incdir != /usr/include
8389 if test -d $cf_add_incdir
8392 if test -n "$CFLAGS$CPPFLAGS" ; then
8393 # a loop is needed to ensure we can add subdirs of existing dirs
8394 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8395 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8396 cf_have_incdir=yes; break
8401 if test "$cf_have_incdir" = no ; then
8402 if test "$cf_add_incdir" = /usr/local/include ; then
8403 if test "$GCC" = yes
8405 cf_save_CPPFLAGS=$CPPFLAGS
8407 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8408 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8410 cat >conftest.$ac_ext <<_ACEOF
8411 #line 8411 "configure"
8412 #include "confdefs.h"
8422 rm -f conftest.$ac_objext
8423 if { (eval echo "$as_me:8423: \"$ac_compile\"") >&5
8424 (eval $ac_compile) 2>&5
8426 echo "$as_me:8426: \$? = $ac_status" >&5
8427 (exit $ac_status); } &&
8428 { ac_try='test -s conftest.$ac_objext'
8429 { (eval echo "$as_me:8429: \"$ac_try\"") >&5
8432 echo "$as_me:8432: \$? = $ac_status" >&5
8433 (exit $ac_status); }; }; then
8436 echo "$as_me: failed program was:" >&5
8437 cat conftest.$ac_ext >&5
8440 rm -f conftest.$ac_objext conftest.$ac_ext
8441 CPPFLAGS=$cf_save_CPPFLAGS
8446 if test "$cf_have_incdir" = no ; then
8447 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8449 echo "${as_me:-configure}:8449: testing adding $cf_add_incdir to include-path ..." 1>&5
8451 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8453 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8454 test "$cf_top_incdir" = "$cf_add_incdir" && break
8455 cf_add_incdir="$cf_top_incdir"
8468 # Set definitions to allow ifdef'ing for ncurses.h
8470 case $cf_cv_ncurses_header in
8473 cat >>confdefs.h <<\EOF
8474 #define HAVE_NCURSES_H 1
8480 case $cf_cv_ncurses_header in
8481 (ncurses/curses.h|ncurses/ncurses.h)
8483 cat >>confdefs.h <<\EOF
8484 #define HAVE_NCURSES_NCURSES_H 1
8488 (ncursesw/curses.h|ncursesw/ncurses.h)
8490 cat >>confdefs.h <<\EOF
8491 #define HAVE_NCURSESW_NCURSES_H 1
8497 echo "$as_me:8497: checking for terminfo header" >&5
8498 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8499 if test "${cf_cv_term_header+set}" = set; then
8500 echo $ECHO_N "(cached) $ECHO_C" >&6
8503 case ${cf_cv_ncurses_header} in
8504 (*/ncurses.h|*/ncursesw.h)
8505 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8508 cf_term_header=term.h
8512 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8514 cat >conftest.$ac_ext <<_ACEOF
8515 #line 8515 "configure"
8516 #include "confdefs.h"
8518 #include <${cf_cv_ncurses_header:-curses.h}>
8524 int x = auto_left_margin
8529 rm -f conftest.$ac_objext
8530 if { (eval echo "$as_me:8530: \"$ac_compile\"") >&5
8531 (eval $ac_compile) 2>&5
8533 echo "$as_me:8533: \$? = $ac_status" >&5
8534 (exit $ac_status); } &&
8535 { ac_try='test -s conftest.$ac_objext'
8536 { (eval echo "$as_me:8536: \"$ac_try\"") >&5
8539 echo "$as_me:8539: \$? = $ac_status" >&5
8540 (exit $ac_status); }; }; then
8542 cf_cv_term_header="$cf_test"
8544 echo "$as_me: failed program was:" >&5
8545 cat conftest.$ac_ext >&5
8547 cf_cv_term_header=unknown
8550 rm -f conftest.$ac_objext conftest.$ac_ext
8551 test "$cf_cv_term_header" != unknown && break
8555 echo "$as_me:8555: result: $cf_cv_term_header" >&5
8556 echo "${ECHO_T}$cf_cv_term_header" >&6
8558 # Set definitions to allow ifdef'ing to accommodate subdirectories
8560 case $cf_cv_term_header in
8563 cat >>confdefs.h <<\EOF
8564 #define HAVE_TERM_H 1
8570 case $cf_cv_term_header in
8573 cat >>confdefs.h <<\EOF
8574 #define HAVE_NCURSES_TERM_H 1
8580 cat >>confdefs.h <<\EOF
8581 #define HAVE_NCURSESW_TERM_H 1
8587 # some applications need this, but should check for NCURSES_VERSION
8589 cat >>confdefs.h <<\EOF
8593 echo "$as_me:8593: checking for ncurses version" >&5
8594 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8595 if test "${cf_cv_ncurses_version+set}" = set; then
8596 echo $ECHO_N "(cached) $ECHO_C" >&6
8599 cf_cv_ncurses_version=no
8602 if test "$cross_compiling" = yes; then
8604 # This will not work if the preprocessor splits the line after the
8605 # Autoconf token. The 'unproto' program does that.
8606 cat > conftest.$ac_ext <<EOF
8607 #include <${cf_cv_ncurses_header:-curses.h}>
8609 #ifdef NCURSES_VERSION
8610 Autoconf NCURSES_VERSION
8618 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8619 { (eval echo "$as_me:8619: \"$cf_try\"") >&5
8622 echo "$as_me:8622: \$? = $ac_status" >&5
8623 (exit $ac_status); }
8624 if test -f conftest.out ; then
8625 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8626 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8631 cat >conftest.$ac_ext <<_ACEOF
8632 #line 8632 "configure"
8633 #include "confdefs.h"
8635 #include <${cf_cv_ncurses_header:-curses.h}>
8639 FILE *fp = fopen("$cf_tempfile", "w");
8640 #ifdef NCURSES_VERSION
8641 # ifdef NCURSES_VERSION_PATCH
8642 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8644 fprintf(fp, "%s\n", NCURSES_VERSION);
8648 fprintf(fp, "old\n");
8653 ${cf_cv_main_return:-return}(0);
8656 rm -f conftest$ac_exeext
8657 if { (eval echo "$as_me:8657: \"$ac_link\"") >&5
8658 (eval $ac_link) 2>&5
8660 echo "$as_me:8660: \$? = $ac_status" >&5
8661 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8662 { (eval echo "$as_me:8662: \"$ac_try\"") >&5
8665 echo "$as_me:8665: \$? = $ac_status" >&5
8666 (exit $ac_status); }; }; then
8668 cf_cv_ncurses_version=`cat $cf_tempfile`
8670 echo "$as_me: program exited with status $ac_status" >&5
8671 echo "$as_me: failed program was:" >&5
8672 cat conftest.$ac_ext >&5
8674 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8679 echo "$as_me:8679: result: $cf_cv_ncurses_version" >&5
8680 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8681 test "$cf_cv_ncurses_version" = no ||
8682 cat >>confdefs.h <<\EOF
8686 cf_nculib_root=$cf_cv_screen
8687 # This works, except for the special case where we find gpm, but
8688 # ncurses is in a nonstandard location via $LIBS, and we really want
8691 cf_ncurses_SAVE="$LIBS"
8692 echo "$as_me:8692: checking for Gpm_Open in -lgpm" >&5
8693 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8694 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8695 echo $ECHO_N "(cached) $ECHO_C" >&6
8697 ac_check_lib_save_LIBS=$LIBS
8699 cat >conftest.$ac_ext <<_ACEOF
8700 #line 8700 "configure"
8701 #include "confdefs.h"
8703 /* Override any gcc2 internal prototype to avoid an error. */
8707 /* We use char because int might match the return type of a gcc2
8708 builtin and then its argument prototype would still apply. */
8718 rm -f conftest.$ac_objext conftest$ac_exeext
8719 if { (eval echo "$as_me:8719: \"$ac_link\"") >&5
8720 (eval $ac_link) 2>&5
8722 echo "$as_me:8722: \$? = $ac_status" >&5
8723 (exit $ac_status); } &&
8724 { ac_try='test -s conftest$ac_exeext'
8725 { (eval echo "$as_me:8725: \"$ac_try\"") >&5
8728 echo "$as_me:8728: \$? = $ac_status" >&5
8729 (exit $ac_status); }; }; then
8730 ac_cv_lib_gpm_Gpm_Open=yes
8732 echo "$as_me: failed program was:" >&5
8733 cat conftest.$ac_ext >&5
8734 ac_cv_lib_gpm_Gpm_Open=no
8736 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8737 LIBS=$ac_check_lib_save_LIBS
8739 echo "$as_me:8739: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8740 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8741 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8742 echo "$as_me:8742: checking for initscr in -lgpm" >&5
8743 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8744 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8745 echo $ECHO_N "(cached) $ECHO_C" >&6
8747 ac_check_lib_save_LIBS=$LIBS
8749 cat >conftest.$ac_ext <<_ACEOF
8750 #line 8750 "configure"
8751 #include "confdefs.h"
8753 /* Override any gcc2 internal prototype to avoid an error. */
8757 /* We use char because int might match the return type of a gcc2
8758 builtin and then its argument prototype would still apply. */
8768 rm -f conftest.$ac_objext conftest$ac_exeext
8769 if { (eval echo "$as_me:8769: \"$ac_link\"") >&5
8770 (eval $ac_link) 2>&5
8772 echo "$as_me:8772: \$? = $ac_status" >&5
8773 (exit $ac_status); } &&
8774 { ac_try='test -s conftest$ac_exeext'
8775 { (eval echo "$as_me:8775: \"$ac_try\"") >&5
8778 echo "$as_me:8778: \$? = $ac_status" >&5
8779 (exit $ac_status); }; }; then
8780 ac_cv_lib_gpm_initscr=yes
8782 echo "$as_me: failed program was:" >&5
8783 cat conftest.$ac_ext >&5
8784 ac_cv_lib_gpm_initscr=no
8786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8787 LIBS=$ac_check_lib_save_LIBS
8789 echo "$as_me:8789: result: $ac_cv_lib_gpm_initscr" >&5
8790 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8791 if test $ac_cv_lib_gpm_initscr = yes; then
8792 LIBS="$cf_ncurses_SAVE"
8794 cf_ncurses_LIBS="-lgpm"
8801 # This is only necessary if you are linking against an obsolete
8802 # version of ncurses (but it should do no harm, since it's static).
8803 if test "$cf_nculib_root" = ncurses ; then
8804 echo "$as_me:8804: checking for tgoto in -lmytinfo" >&5
8805 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8806 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8807 echo $ECHO_N "(cached) $ECHO_C" >&6
8809 ac_check_lib_save_LIBS=$LIBS
8810 LIBS="-lmytinfo $LIBS"
8811 cat >conftest.$ac_ext <<_ACEOF
8812 #line 8812 "configure"
8813 #include "confdefs.h"
8815 /* Override any gcc2 internal prototype to avoid an error. */
8819 /* We use char because int might match the return type of a gcc2
8820 builtin and then its argument prototype would still apply. */
8830 rm -f conftest.$ac_objext conftest$ac_exeext
8831 if { (eval echo "$as_me:8831: \"$ac_link\"") >&5
8832 (eval $ac_link) 2>&5
8834 echo "$as_me:8834: \$? = $ac_status" >&5
8835 (exit $ac_status); } &&
8836 { ac_try='test -s conftest$ac_exeext'
8837 { (eval echo "$as_me:8837: \"$ac_try\"") >&5
8840 echo "$as_me:8840: \$? = $ac_status" >&5
8841 (exit $ac_status); }; }; then
8842 ac_cv_lib_mytinfo_tgoto=yes
8844 echo "$as_me: failed program was:" >&5
8845 cat conftest.$ac_ext >&5
8846 ac_cv_lib_mytinfo_tgoto=no
8848 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8849 LIBS=$ac_check_lib_save_LIBS
8851 echo "$as_me:8851: result: $ac_cv_lib_mytinfo_tgoto" >&5
8852 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8853 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8854 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8861 cf_add_libs="$cf_ncurses_LIBS"
8862 # Filter out duplicates - this happens with badly-designed ".pc" files...
8863 for cf_add_1lib in $LIBS
8865 for cf_add_2lib in $cf_add_libs
8867 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8873 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8877 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8880 cf_add_libs="-l$cf_nculib_root"
8881 # Filter out duplicates - this happens with badly-designed ".pc" files...
8882 for cf_add_1lib in $LIBS
8884 for cf_add_2lib in $cf_add_libs
8886 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8892 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8898 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
8900 echo "$as_me:8900: checking for initscr" >&5
8901 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8902 if test "${ac_cv_func_initscr+set}" = set; then
8903 echo $ECHO_N "(cached) $ECHO_C" >&6
8905 cat >conftest.$ac_ext <<_ACEOF
8906 #line 8906 "configure"
8907 #include "confdefs.h"
8908 /* System header to define __stub macros and hopefully few prototypes,
8909 which can conflict with char initscr (); below. */
8911 /* Override any gcc2 internal prototype to avoid an error. */
8915 /* We use char because int might match the return type of a gcc2
8916 builtin and then its argument prototype would still apply. */
8923 /* The GNU C library defines this for functions which it implements
8924 to always fail with ENOSYS. Some functions are actually named
8925 something starting with __ and the normal name is an alias. */
8926 #if defined (__stub_initscr) || defined (__stub___initscr)
8929 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8936 rm -f conftest.$ac_objext conftest$ac_exeext
8937 if { (eval echo "$as_me:8937: \"$ac_link\"") >&5
8938 (eval $ac_link) 2>&5
8940 echo "$as_me:8940: \$? = $ac_status" >&5
8941 (exit $ac_status); } &&
8942 { ac_try='test -s conftest$ac_exeext'
8943 { (eval echo "$as_me:8943: \"$ac_try\"") >&5
8946 echo "$as_me:8946: \$? = $ac_status" >&5
8947 (exit $ac_status); }; }; then
8948 ac_cv_func_initscr=yes
8950 echo "$as_me: failed program was:" >&5
8951 cat conftest.$ac_ext >&5
8952 ac_cv_func_initscr=no
8954 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8956 echo "$as_me:8956: result: $ac_cv_func_initscr" >&5
8957 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8958 if test $ac_cv_func_initscr = yes; then
8959 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8962 cf_save_LIBS="$LIBS"
8963 echo "$as_me:8963: checking for initscr in -l$cf_nculib_root" >&5
8964 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8965 LIBS="-l$cf_nculib_root $LIBS"
8966 cat >conftest.$ac_ext <<_ACEOF
8967 #line 8967 "configure"
8968 #include "confdefs.h"
8969 #include <${cf_cv_ncurses_header:-curses.h}>
8978 rm -f conftest.$ac_objext conftest$ac_exeext
8979 if { (eval echo "$as_me:8979: \"$ac_link\"") >&5
8980 (eval $ac_link) 2>&5
8982 echo "$as_me:8982: \$? = $ac_status" >&5
8983 (exit $ac_status); } &&
8984 { ac_try='test -s conftest$ac_exeext'
8985 { (eval echo "$as_me:8985: \"$ac_try\"") >&5
8988 echo "$as_me:8988: \$? = $ac_status" >&5
8989 (exit $ac_status); }; }; then
8990 echo "$as_me:8990: result: yes" >&5
8991 echo "${ECHO_T}yes" >&6
8992 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8995 echo "$as_me: failed program was:" >&5
8996 cat conftest.$ac_ext >&5
8997 echo "$as_me:8997: result: no" >&5
8998 echo "${ECHO_T}no" >&6
9001 cf_library_path_list=""
9002 if test -n "${LDFLAGS}${LIBS}" ; then
9003 for cf_library_path in $LDFLAGS $LIBS
9005 case $cf_library_path in
9007 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9009 test "x$cf_library_path" != "xNONE" && \
9010 test -d "$cf_library_path" && \
9012 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9013 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9014 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9015 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9016 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9017 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"
9020 cf_library_path_list="$cf_library_path_list $cf_search"
9028 test "x$prefix" != "xNONE" && \
9029 test -d "$prefix" && \
9031 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9032 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9033 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9034 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9035 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9036 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9039 for cf_subdir_prefix in \
9048 test "x$cf_subdir_prefix" != "x$prefix" && \
9049 test -d "$cf_subdir_prefix" && \
9050 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9051 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9052 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
9053 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9054 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9055 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9056 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"
9061 cf_search="$cf_library_path_list $cf_search"
9063 for cf_libdir in $cf_search
9065 echo "$as_me:9065: checking for -l$cf_nculib_root in $cf_libdir" >&5
9066 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9067 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9068 cat >conftest.$ac_ext <<_ACEOF
9069 #line 9069 "configure"
9070 #include "confdefs.h"
9071 #include <${cf_cv_ncurses_header:-curses.h}>
9080 rm -f conftest.$ac_objext conftest$ac_exeext
9081 if { (eval echo "$as_me:9081: \"$ac_link\"") >&5
9082 (eval $ac_link) 2>&5
9084 echo "$as_me:9084: \$? = $ac_status" >&5
9085 (exit $ac_status); } &&
9086 { ac_try='test -s conftest$ac_exeext'
9087 { (eval echo "$as_me:9087: \"$ac_try\"") >&5
9090 echo "$as_me:9090: \$? = $ac_status" >&5
9091 (exit $ac_status); }; }; then
9092 echo "$as_me:9092: result: yes" >&5
9093 echo "${ECHO_T}yes" >&6
9094 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9097 echo "$as_me: failed program was:" >&5
9098 cat conftest.$ac_ext >&5
9099 echo "$as_me:9099: result: no" >&5
9100 echo "${ECHO_T}no" >&6
9101 LIBS="$cf_save_LIBS"
9103 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9107 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9111 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9113 if test $cf_found_library = no ; then
9114 { { echo "$as_me:9114: error: Cannot link $cf_nculib_root library" >&5
9115 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9116 { (exit 1); exit 1; }; }
9121 if test -n "$cf_ncurses_LIBS" ; then
9122 echo "$as_me:9122: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9123 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9124 cf_ncurses_SAVE="$LIBS"
9125 for p in $cf_ncurses_LIBS ; do
9126 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9127 if test "$q" != "$LIBS" ; then
9131 cat >conftest.$ac_ext <<_ACEOF
9132 #line 9132 "configure"
9133 #include "confdefs.h"
9134 #include <${cf_cv_ncurses_header:-curses.h}>
9138 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9143 rm -f conftest.$ac_objext conftest$ac_exeext
9144 if { (eval echo "$as_me:9144: \"$ac_link\"") >&5
9145 (eval $ac_link) 2>&5
9147 echo "$as_me:9147: \$? = $ac_status" >&5
9148 (exit $ac_status); } &&
9149 { ac_try='test -s conftest$ac_exeext'
9150 { (eval echo "$as_me:9150: \"$ac_try\"") >&5
9153 echo "$as_me:9153: \$? = $ac_status" >&5
9154 (exit $ac_status); }; }; then
9155 echo "$as_me:9155: result: yes" >&5
9156 echo "${ECHO_T}yes" >&6
9158 echo "$as_me: failed program was:" >&5
9159 cat conftest.$ac_ext >&5
9160 echo "$as_me:9160: result: no" >&5
9161 echo "${ECHO_T}no" >&6
9162 LIBS="$cf_ncurses_SAVE"
9164 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9167 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9169 cat >>confdefs.h <<EOF
9170 #define $cf_nculib_ROOT 1
9181 cf_ncuconfig_root=$cf_cv_screen
9182 cf_have_ncuconfig=no
9184 if test "x${PKG_CONFIG:=none}" != xnone; then
9185 echo "$as_me:9185: checking pkg-config for $cf_ncuconfig_root" >&5
9186 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9187 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9188 echo "$as_me:9188: result: yes" >&5
9189 echo "${ECHO_T}yes" >&6
9191 echo "$as_me:9191: checking if the $cf_ncuconfig_root package files work" >&5
9192 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9193 cf_have_ncuconfig=unknown
9195 cf_save_CPPFLAGS="$CPPFLAGS"
9196 cf_save_LIBS="$LIBS"
9201 cf_new_extra_cppflags=
9203 for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
9205 case $cf_fix_cppflags in
9207 case $cf_add_cflags in
9208 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9209 case $cf_add_cflags in
9211 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9213 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9214 && test -z "${cf_tst_cflags}" \
9215 && cf_fix_cppflags=yes
9217 if test $cf_fix_cppflags = yes ; then
9219 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9220 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9223 elif test "${cf_tst_cflags}" = "\"'" ; then
9225 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9226 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9236 case $cf_add_cflags in
9238 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9240 CPPFLAGS=`echo "$CPPFLAGS" | \
9241 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9242 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9247 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9248 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9255 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9256 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9263 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9264 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9266 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9268 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9269 && test -z "${cf_tst_cflags}" \
9270 && cf_fix_cppflags=no
9275 if test -n "$cf_new_cflags" ; then
9277 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9278 CFLAGS="${CFLAGS}$cf_new_cflags"
9282 if test -n "$cf_new_cppflags" ; then
9284 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9285 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9289 if test -n "$cf_new_extra_cppflags" ; then
9291 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9292 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9296 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9297 # Filter out duplicates - this happens with badly-designed ".pc" files...
9298 for cf_add_1lib in $LIBS
9300 for cf_add_2lib in $cf_add_libs
9302 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9308 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9312 cat >conftest.$ac_ext <<_ACEOF
9313 #line 9313 "configure"
9314 #include "confdefs.h"
9315 #include <${cf_cv_ncurses_header:-curses.h}>
9319 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9324 rm -f conftest.$ac_objext conftest$ac_exeext
9325 if { (eval echo "$as_me:9325: \"$ac_link\"") >&5
9326 (eval $ac_link) 2>&5
9328 echo "$as_me:9328: \$? = $ac_status" >&5
9329 (exit $ac_status); } &&
9330 { ac_try='test -s conftest$ac_exeext'
9331 { (eval echo "$as_me:9331: \"$ac_try\"") >&5
9334 echo "$as_me:9334: \$? = $ac_status" >&5
9335 (exit $ac_status); }; }; then
9336 if test "$cross_compiling" = yes; then
9337 cf_have_ncuconfig=maybe
9339 cat >conftest.$ac_ext <<_ACEOF
9340 #line 9340 "configure"
9341 #include "confdefs.h"
9342 #include <${cf_cv_ncurses_header:-curses.h}>
9344 { char *xx = curses_version(); return (xx == 0); }
9346 rm -f conftest$ac_exeext
9347 if { (eval echo "$as_me:9347: \"$ac_link\"") >&5
9348 (eval $ac_link) 2>&5
9350 echo "$as_me:9350: \$? = $ac_status" >&5
9351 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9352 { (eval echo "$as_me:9352: \"$ac_try\"") >&5
9355 echo "$as_me:9355: \$? = $ac_status" >&5
9356 (exit $ac_status); }; }; then
9357 cf_have_ncuconfig=yes
9359 echo "$as_me: program exited with status $ac_status" >&5
9360 echo "$as_me: failed program was:" >&5
9361 cat conftest.$ac_ext >&5
9362 cf_have_ncuconfig=no
9364 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9367 echo "$as_me: failed program was:" >&5
9368 cat conftest.$ac_ext >&5
9369 cf_have_ncuconfig=no
9371 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9372 echo "$as_me:9372: result: $cf_have_ncuconfig" >&5
9373 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9374 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9375 if test "$cf_have_ncuconfig" != "yes"
9377 CPPFLAGS="$cf_save_CPPFLAGS"
9378 LIBS="$cf_save_LIBS"
9379 NCURSES_CONFIG_PKG=none
9382 cat >>confdefs.h <<\EOF
9386 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9388 echo "$as_me:9388: checking for terminfo header" >&5
9389 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9390 if test "${cf_cv_term_header+set}" = set; then
9391 echo $ECHO_N "(cached) $ECHO_C" >&6
9394 case ${cf_cv_ncurses_header} in
9395 (*/ncurses.h|*/ncursesw.h)
9396 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9399 cf_term_header=term.h
9403 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9405 cat >conftest.$ac_ext <<_ACEOF
9406 #line 9406 "configure"
9407 #include "confdefs.h"
9409 #include <${cf_cv_ncurses_header:-curses.h}>
9415 int x = auto_left_margin
9420 rm -f conftest.$ac_objext
9421 if { (eval echo "$as_me:9421: \"$ac_compile\"") >&5
9422 (eval $ac_compile) 2>&5
9424 echo "$as_me:9424: \$? = $ac_status" >&5
9425 (exit $ac_status); } &&
9426 { ac_try='test -s conftest.$ac_objext'
9427 { (eval echo "$as_me:9427: \"$ac_try\"") >&5
9430 echo "$as_me:9430: \$? = $ac_status" >&5
9431 (exit $ac_status); }; }; then
9433 cf_cv_term_header="$cf_test"
9435 echo "$as_me: failed program was:" >&5
9436 cat conftest.$ac_ext >&5
9438 cf_cv_term_header=unknown
9441 rm -f conftest.$ac_objext conftest.$ac_ext
9442 test "$cf_cv_term_header" != unknown && break
9446 echo "$as_me:9446: result: $cf_cv_term_header" >&5
9447 echo "${ECHO_T}$cf_cv_term_header" >&6
9449 # Set definitions to allow ifdef'ing to accommodate subdirectories
9451 case $cf_cv_term_header in
9454 cat >>confdefs.h <<\EOF
9455 #define HAVE_TERM_H 1
9461 case $cf_cv_term_header in
9464 cat >>confdefs.h <<\EOF
9465 #define HAVE_NCURSES_TERM_H 1
9471 cat >>confdefs.h <<\EOF
9472 #define HAVE_NCURSESW_TERM_H 1
9481 echo "$as_me:9481: result: no" >&5
9482 echo "${ECHO_T}no" >&6
9483 NCURSES_CONFIG_PKG=none
9486 NCURSES_CONFIG_PKG=none
9489 if test "x$cf_have_ncuconfig" = "xno"; then
9490 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9492 if test -n "$ac_tool_prefix"; then
9493 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9495 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9496 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9497 echo "$as_me:9497: checking for $ac_word" >&5
9498 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9499 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9500 echo $ECHO_N "(cached) $ECHO_C" >&6
9502 if test -n "$NCURSES_CONFIG"; then
9503 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9505 ac_save_IFS=$IFS; IFS=$ac_path_separator
9507 for ac_dir in $ac_dummy; do
9509 test -z "$ac_dir" && ac_dir=.
9510 $as_executable_p "$ac_dir/$ac_word" || continue
9511 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9512 echo "$as_me:9512: found $ac_dir/$ac_word" >&5
9518 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9519 if test -n "$NCURSES_CONFIG"; then
9520 echo "$as_me:9520: result: $NCURSES_CONFIG" >&5
9521 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9523 echo "$as_me:9523: result: no" >&5
9524 echo "${ECHO_T}no" >&6
9527 test -n "$NCURSES_CONFIG" && break
9530 if test -z "$NCURSES_CONFIG"; then
9531 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9532 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9534 # Extract the first word of "$ac_prog", so it can be a program name with args.
9535 set dummy $ac_prog; ac_word=$2
9536 echo "$as_me:9536: checking for $ac_word" >&5
9537 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9538 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9539 echo $ECHO_N "(cached) $ECHO_C" >&6
9541 if test -n "$ac_ct_NCURSES_CONFIG"; then
9542 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9544 ac_save_IFS=$IFS; IFS=$ac_path_separator
9546 for ac_dir in $ac_dummy; do
9548 test -z "$ac_dir" && ac_dir=.
9549 $as_executable_p "$ac_dir/$ac_word" || continue
9550 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9551 echo "$as_me:9551: found $ac_dir/$ac_word" >&5
9557 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9558 if test -n "$ac_ct_NCURSES_CONFIG"; then
9559 echo "$as_me:9559: result: $ac_ct_NCURSES_CONFIG" >&5
9560 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9562 echo "$as_me:9562: result: no" >&5
9563 echo "${ECHO_T}no" >&6
9566 test -n "$ac_ct_NCURSES_CONFIG" && break
9568 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9570 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9573 if test "$NCURSES_CONFIG" != none ; then
9578 cf_new_extra_cppflags=
9580 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9582 case $cf_fix_cppflags in
9584 case $cf_add_cflags in
9585 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9586 case $cf_add_cflags in
9588 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9590 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9591 && test -z "${cf_tst_cflags}" \
9592 && cf_fix_cppflags=yes
9594 if test $cf_fix_cppflags = yes ; then
9596 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9597 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9600 elif test "${cf_tst_cflags}" = "\"'" ; then
9602 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9603 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9613 case $cf_add_cflags in
9615 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9617 CPPFLAGS=`echo "$CPPFLAGS" | \
9618 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9619 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9624 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9625 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9632 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9633 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9640 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9641 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9643 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9645 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9646 && test -z "${cf_tst_cflags}" \
9647 && cf_fix_cppflags=no
9652 if test -n "$cf_new_cflags" ; then
9654 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9655 CFLAGS="${CFLAGS}$cf_new_cflags"
9659 if test -n "$cf_new_cppflags" ; then
9661 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9662 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9666 if test -n "$cf_new_extra_cppflags" ; then
9668 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9669 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9673 cf_add_libs="`$NCURSES_CONFIG --libs`"
9674 # Filter out duplicates - this happens with badly-designed ".pc" files...
9675 for cf_add_1lib in $LIBS
9677 for cf_add_2lib in $cf_add_libs
9679 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9685 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9689 # even with config script, some packages use no-override for curses.h
9691 echo "$as_me:9691: checking if we have identified curses headers" >&5
9692 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
9693 if test "${cf_cv_ncurses_header+set}" = set; then
9694 echo $ECHO_N "(cached) $ECHO_C" >&6
9697 cf_cv_ncurses_header=none
9699 ncurses.h $cf_cv_screen/ncurses.h \
9700 curses.h $cf_cv_screen/curses.h
9702 cat >conftest.$ac_ext <<_ACEOF
9703 #line 9703 "configure"
9704 #include "confdefs.h"
9705 #include <${cf_header}>
9709 initscr(); tgoto("?", 0,0)
9714 rm -f conftest.$ac_objext
9715 if { (eval echo "$as_me:9715: \"$ac_compile\"") >&5
9716 (eval $ac_compile) 2>&5
9718 echo "$as_me:9718: \$? = $ac_status" >&5
9719 (exit $ac_status); } &&
9720 { ac_try='test -s conftest.$ac_objext'
9721 { (eval echo "$as_me:9721: \"$ac_try\"") >&5
9724 echo "$as_me:9724: \$? = $ac_status" >&5
9725 (exit $ac_status); }; }; then
9726 cf_cv_ncurses_header=$cf_header; break
9728 echo "$as_me: failed program was:" >&5
9729 cat conftest.$ac_ext >&5
9731 rm -f conftest.$ac_objext conftest.$ac_ext
9735 echo "$as_me:9735: result: $cf_cv_ncurses_header" >&5
9736 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
9738 if test "$cf_cv_ncurses_header" = none ; then
9739 { { echo "$as_me:9739: error: No curses header-files found" >&5
9740 echo "$as_me: error: No curses header-files found" >&2;}
9741 { (exit 1); exit 1; }; }
9744 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
9746 for ac_header in $cf_cv_ncurses_header
9748 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9749 echo "$as_me:9749: checking for $ac_header" >&5
9750 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9751 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9752 echo $ECHO_N "(cached) $ECHO_C" >&6
9754 cat >conftest.$ac_ext <<_ACEOF
9755 #line 9755 "configure"
9756 #include "confdefs.h"
9757 #include <$ac_header>
9759 if { (eval echo "$as_me:9759: \"$ac_cpp conftest.$ac_ext\"") >&5
9760 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9762 egrep -v '^ *\+' conftest.er1 >conftest.err
9764 cat conftest.err >&5
9765 echo "$as_me:9765: \$? = $ac_status" >&5
9766 (exit $ac_status); } >/dev/null; then
9767 if test -s conftest.err; then
9768 ac_cpp_err=$ac_c_preproc_warn_flag
9775 if test -z "$ac_cpp_err"; then
9776 eval "$as_ac_Header=yes"
9778 echo "$as_me: failed program was:" >&5
9779 cat conftest.$ac_ext >&5
9780 eval "$as_ac_Header=no"
9782 rm -f conftest.err conftest.$ac_ext
9784 echo "$as_me:9784: result: `eval echo '${'$as_ac_Header'}'`" >&5
9785 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9786 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9787 cat >>confdefs.h <<EOF
9788 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9794 cat >>confdefs.h <<\EOF
9798 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9800 cat >>confdefs.h <<EOF
9801 #define $cf_nculib_ROOT 1
9804 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
9808 cf_ncuhdr_root=$cf_cv_screen
9810 test -n "$cf_cv_curses_dir" && \
9811 test "$cf_cv_curses_dir" != "no" && { \
9813 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
9814 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
9816 while test $cf_add_incdir != /usr/include
9818 if test -d $cf_add_incdir
9821 if test -n "$CFLAGS$CPPFLAGS" ; then
9822 # a loop is needed to ensure we can add subdirs of existing dirs
9823 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9824 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9825 cf_have_incdir=yes; break
9830 if test "$cf_have_incdir" = no ; then
9831 if test "$cf_add_incdir" = /usr/local/include ; then
9832 if test "$GCC" = yes
9834 cf_save_CPPFLAGS=$CPPFLAGS
9836 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9837 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9839 cat >conftest.$ac_ext <<_ACEOF
9840 #line 9840 "configure"
9841 #include "confdefs.h"
9851 rm -f conftest.$ac_objext
9852 if { (eval echo "$as_me:9852: \"$ac_compile\"") >&5
9853 (eval $ac_compile) 2>&5
9855 echo "$as_me:9855: \$? = $ac_status" >&5
9856 (exit $ac_status); } &&
9857 { ac_try='test -s conftest.$ac_objext'
9858 { (eval echo "$as_me:9858: \"$ac_try\"") >&5
9861 echo "$as_me:9861: \$? = $ac_status" >&5
9862 (exit $ac_status); }; }; then
9865 echo "$as_me: failed program was:" >&5
9866 cat conftest.$ac_ext >&5
9869 rm -f conftest.$ac_objext conftest.$ac_ext
9870 CPPFLAGS=$cf_save_CPPFLAGS
9875 if test "$cf_have_incdir" = no ; then
9876 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9878 echo "${as_me:-configure}:9878: testing adding $cf_add_incdir to include-path ..." 1>&5
9880 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9882 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9883 test "$cf_top_incdir" = "$cf_add_incdir" && break
9884 cf_add_incdir="$cf_top_incdir"
9897 echo "$as_me:9897: checking for $cf_ncuhdr_root header in include-path" >&5
9898 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
9899 if test "${cf_cv_ncurses_h+set}" = set; then
9900 echo $ECHO_N "(cached) $ECHO_C" >&6
9903 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
9904 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
9905 for cf_header in $cf_header_list
9908 cat >conftest.$ac_ext <<_ACEOF
9909 #line 9909 "configure"
9910 #include "confdefs.h"
9912 #include <$cf_header>
9917 #ifdef NCURSES_VERSION
9919 printf("%s\n", NCURSES_VERSION);
9932 rm -f conftest.$ac_objext
9933 if { (eval echo "$as_me:9933: \"$ac_compile\"") >&5
9934 (eval $ac_compile) 2>&5
9936 echo "$as_me:9936: \$? = $ac_status" >&5
9937 (exit $ac_status); } &&
9938 { ac_try='test -s conftest.$ac_objext'
9939 { (eval echo "$as_me:9939: \"$ac_try\"") >&5
9942 echo "$as_me:9942: \$? = $ac_status" >&5
9943 (exit $ac_status); }; }; then
9944 cf_cv_ncurses_h=$cf_header
9947 echo "$as_me: failed program was:" >&5
9948 cat conftest.$ac_ext >&5
9951 rm -f conftest.$ac_objext conftest.$ac_ext
9953 test "$cf_cv_ncurses_h" != no && break
9957 echo "$as_me:9957: result: $cf_cv_ncurses_h" >&5
9958 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
9960 if test "$cf_cv_ncurses_h" != no ; then
9961 cf_cv_ncurses_header=$cf_cv_ncurses_h
9964 echo "$as_me:9964: checking for $cf_ncuhdr_root include-path" >&5
9965 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
9966 if test "${cf_cv_ncurses_h2+set}" = set; then
9967 echo $ECHO_N "(cached) $ECHO_C" >&6
9970 test -n "$verbose" && echo
9974 # collect the current set of include-directories from compiler flags
9975 cf_header_path_list=""
9976 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9977 for cf_header_path in $CPPFLAGS $CFLAGS
9979 case $cf_header_path in
9981 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9983 test "x$cf_header_path" != "xNONE" && \
9984 test -d "$cf_header_path" && \
9986 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
9987 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
9988 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
9989 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
9990 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
9991 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"
9994 cf_header_path_list="$cf_header_path_list $cf_search"
10000 # add the variations for the package we are looking for
10004 test "x$prefix" != "xNONE" && \
10005 test -d "$prefix" && \
10007 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10008 test -d $prefix/include && cf_search="$cf_search $prefix/include"
10009 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10010 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10011 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10012 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10015 for cf_subdir_prefix in \
10024 test "x$cf_subdir_prefix" != "x$prefix" && \
10025 test -d "$cf_subdir_prefix" && \
10026 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10027 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10028 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
10029 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10030 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10031 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10032 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"
10037 test "$includedir" != NONE && \
10038 test "$includedir" != "/usr/include" && \
10039 test -d "$includedir" && {
10040 test -d $includedir && cf_search="$cf_search $includedir"
10041 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10044 test "$oldincludedir" != NONE && \
10045 test "$oldincludedir" != "/usr/include" && \
10046 test -d "$oldincludedir" && {
10047 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
10048 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10051 cf_search="$cf_search $cf_header_path_list"
10053 test -n "$verbose" && echo search path $cf_search
10054 cf_save2_CPPFLAGS="$CPPFLAGS"
10055 for cf_incdir in $cf_search
10058 if test -n "$cf_incdir" ; then
10059 for cf_add_incdir in $cf_incdir
10061 while test $cf_add_incdir != /usr/include
10063 if test -d $cf_add_incdir
10066 if test -n "$CFLAGS$CPPFLAGS" ; then
10067 # a loop is needed to ensure we can add subdirs of existing dirs
10068 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10069 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10070 cf_have_incdir=yes; break
10075 if test "$cf_have_incdir" = no ; then
10076 if test "$cf_add_incdir" = /usr/local/include ; then
10077 if test "$GCC" = yes
10079 cf_save_CPPFLAGS=$CPPFLAGS
10081 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10082 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10084 cat >conftest.$ac_ext <<_ACEOF
10085 #line 10085 "configure"
10086 #include "confdefs.h"
10096 rm -f conftest.$ac_objext
10097 if { (eval echo "$as_me:10097: \"$ac_compile\"") >&5
10098 (eval $ac_compile) 2>&5
10100 echo "$as_me:10100: \$? = $ac_status" >&5
10101 (exit $ac_status); } &&
10102 { ac_try='test -s conftest.$ac_objext'
10103 { (eval echo "$as_me:10103: \"$ac_try\"") >&5
10104 (eval $ac_try) 2>&5
10106 echo "$as_me:10106: \$? = $ac_status" >&5
10107 (exit $ac_status); }; }; then
10110 echo "$as_me: failed program was:" >&5
10111 cat conftest.$ac_ext >&5
10114 rm -f conftest.$ac_objext conftest.$ac_ext
10115 CPPFLAGS=$cf_save_CPPFLAGS
10120 if test "$cf_have_incdir" = no ; then
10121 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10123 echo "${as_me:-configure}:10123: testing adding $cf_add_incdir to include-path ..." 1>&5
10125 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10127 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10128 test "$cf_top_incdir" = "$cf_add_incdir" && break
10129 cf_add_incdir="$cf_top_incdir"
10145 cat >conftest.$ac_ext <<_ACEOF
10146 #line 10146 "configure"
10147 #include "confdefs.h"
10149 #include <$cf_header>
10154 #ifdef NCURSES_VERSION
10156 printf("%s\n", NCURSES_VERSION);
10169 rm -f conftest.$ac_objext
10170 if { (eval echo "$as_me:10170: \"$ac_compile\"") >&5
10171 (eval $ac_compile) 2>&5
10173 echo "$as_me:10173: \$? = $ac_status" >&5
10174 (exit $ac_status); } &&
10175 { ac_try='test -s conftest.$ac_objext'
10176 { (eval echo "$as_me:10176: \"$ac_try\"") >&5
10177 (eval $ac_try) 2>&5
10179 echo "$as_me:10179: \$? = $ac_status" >&5
10180 (exit $ac_status); }; }; then
10181 cf_cv_ncurses_h2=$cf_header
10184 echo "$as_me: failed program was:" >&5
10185 cat conftest.$ac_ext >&5
10186 cf_cv_ncurses_h2=no
10188 rm -f conftest.$ac_objext conftest.$ac_ext
10190 if test "$cf_cv_ncurses_h2" != no ; then
10191 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10192 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
10195 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10197 CPPFLAGS="$cf_save2_CPPFLAGS"
10198 test "$cf_cv_ncurses_h2" != no && break
10200 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10200: error: not found" >&5
10201 echo "$as_me: error: not found" >&2;}
10202 { (exit 1); exit 1; }; }
10205 echo "$as_me:10205: result: $cf_cv_ncurses_h2" >&5
10206 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10208 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
10209 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
10210 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
10211 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
10214 if test -n "$cf_1st_incdir" ; then
10215 for cf_add_incdir in $cf_1st_incdir
10217 while test $cf_add_incdir != /usr/include
10219 if test -d $cf_add_incdir
10222 if test -n "$CFLAGS$CPPFLAGS" ; then
10223 # a loop is needed to ensure we can add subdirs of existing dirs
10224 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10225 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10226 cf_have_incdir=yes; break
10231 if test "$cf_have_incdir" = no ; then
10232 if test "$cf_add_incdir" = /usr/local/include ; then
10233 if test "$GCC" = yes
10235 cf_save_CPPFLAGS=$CPPFLAGS
10237 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10238 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10240 cat >conftest.$ac_ext <<_ACEOF
10241 #line 10241 "configure"
10242 #include "confdefs.h"
10252 rm -f conftest.$ac_objext
10253 if { (eval echo "$as_me:10253: \"$ac_compile\"") >&5
10254 (eval $ac_compile) 2>&5
10256 echo "$as_me:10256: \$? = $ac_status" >&5
10257 (exit $ac_status); } &&
10258 { ac_try='test -s conftest.$ac_objext'
10259 { (eval echo "$as_me:10259: \"$ac_try\"") >&5
10260 (eval $ac_try) 2>&5
10262 echo "$as_me:10262: \$? = $ac_status" >&5
10263 (exit $ac_status); }; }; then
10266 echo "$as_me: failed program was:" >&5
10267 cat conftest.$ac_ext >&5
10270 rm -f conftest.$ac_objext conftest.$ac_ext
10271 CPPFLAGS=$cf_save_CPPFLAGS
10276 if test "$cf_have_incdir" = no ; then
10277 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10279 echo "${as_me:-configure}:10279: testing adding $cf_add_incdir to include-path ..." 1>&5
10281 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10283 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10284 test "$cf_top_incdir" = "$cf_add_incdir" && break
10285 cf_add_incdir="$cf_top_incdir"
10298 # Set definitions to allow ifdef'ing for ncurses.h
10300 case $cf_cv_ncurses_header in
10303 cat >>confdefs.h <<\EOF
10304 #define HAVE_NCURSES_H 1
10310 case $cf_cv_ncurses_header in
10311 (ncurses/curses.h|ncurses/ncurses.h)
10313 cat >>confdefs.h <<\EOF
10314 #define HAVE_NCURSES_NCURSES_H 1
10318 (ncursesw/curses.h|ncursesw/ncurses.h)
10320 cat >>confdefs.h <<\EOF
10321 #define HAVE_NCURSESW_NCURSES_H 1
10327 echo "$as_me:10327: checking for terminfo header" >&5
10328 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10329 if test "${cf_cv_term_header+set}" = set; then
10330 echo $ECHO_N "(cached) $ECHO_C" >&6
10333 case ${cf_cv_ncurses_header} in
10334 (*/ncurses.h|*/ncursesw.h)
10335 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10338 cf_term_header=term.h
10342 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10344 cat >conftest.$ac_ext <<_ACEOF
10345 #line 10345 "configure"
10346 #include "confdefs.h"
10348 #include <${cf_cv_ncurses_header:-curses.h}>
10349 #include <$cf_test>
10354 int x = auto_left_margin
10359 rm -f conftest.$ac_objext
10360 if { (eval echo "$as_me:10360: \"$ac_compile\"") >&5
10361 (eval $ac_compile) 2>&5
10363 echo "$as_me:10363: \$? = $ac_status" >&5
10364 (exit $ac_status); } &&
10365 { ac_try='test -s conftest.$ac_objext'
10366 { (eval echo "$as_me:10366: \"$ac_try\"") >&5
10367 (eval $ac_try) 2>&5
10369 echo "$as_me:10369: \$? = $ac_status" >&5
10370 (exit $ac_status); }; }; then
10372 cf_cv_term_header="$cf_test"
10374 echo "$as_me: failed program was:" >&5
10375 cat conftest.$ac_ext >&5
10377 cf_cv_term_header=unknown
10380 rm -f conftest.$ac_objext conftest.$ac_ext
10381 test "$cf_cv_term_header" != unknown && break
10385 echo "$as_me:10385: result: $cf_cv_term_header" >&5
10386 echo "${ECHO_T}$cf_cv_term_header" >&6
10388 # Set definitions to allow ifdef'ing to accommodate subdirectories
10390 case $cf_cv_term_header in
10393 cat >>confdefs.h <<\EOF
10394 #define HAVE_TERM_H 1
10400 case $cf_cv_term_header in
10403 cat >>confdefs.h <<\EOF
10404 #define HAVE_NCURSES_TERM_H 1
10410 cat >>confdefs.h <<\EOF
10411 #define HAVE_NCURSESW_TERM_H 1
10417 # some applications need this, but should check for NCURSES_VERSION
10419 cat >>confdefs.h <<\EOF
10423 echo "$as_me:10423: checking for ncurses version" >&5
10424 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10425 if test "${cf_cv_ncurses_version+set}" = set; then
10426 echo $ECHO_N "(cached) $ECHO_C" >&6
10429 cf_cv_ncurses_version=no
10432 if test "$cross_compiling" = yes; then
10434 # This will not work if the preprocessor splits the line after the
10435 # Autoconf token. The 'unproto' program does that.
10436 cat > conftest.$ac_ext <<EOF
10437 #include <${cf_cv_ncurses_header:-curses.h}>
10439 #ifdef NCURSES_VERSION
10440 Autoconf NCURSES_VERSION
10448 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10449 { (eval echo "$as_me:10449: \"$cf_try\"") >&5
10450 (eval $cf_try) 2>&5
10452 echo "$as_me:10452: \$? = $ac_status" >&5
10453 (exit $ac_status); }
10454 if test -f conftest.out ; then
10455 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
10456 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10461 cat >conftest.$ac_ext <<_ACEOF
10462 #line 10462 "configure"
10463 #include "confdefs.h"
10465 #include <${cf_cv_ncurses_header:-curses.h}>
10469 FILE *fp = fopen("$cf_tempfile", "w");
10470 #ifdef NCURSES_VERSION
10471 # ifdef NCURSES_VERSION_PATCH
10472 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10474 fprintf(fp, "%s\n", NCURSES_VERSION);
10477 # ifdef __NCURSES_H
10478 fprintf(fp, "old\n");
10483 ${cf_cv_main_return:-return}(0);
10486 rm -f conftest$ac_exeext
10487 if { (eval echo "$as_me:10487: \"$ac_link\"") >&5
10488 (eval $ac_link) 2>&5
10490 echo "$as_me:10490: \$? = $ac_status" >&5
10491 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10492 { (eval echo "$as_me:10492: \"$ac_try\"") >&5
10493 (eval $ac_try) 2>&5
10495 echo "$as_me:10495: \$? = $ac_status" >&5
10496 (exit $ac_status); }; }; then
10498 cf_cv_ncurses_version=`cat $cf_tempfile`
10500 echo "$as_me: program exited with status $ac_status" >&5
10501 echo "$as_me: failed program was:" >&5
10502 cat conftest.$ac_ext >&5
10504 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10509 echo "$as_me:10509: result: $cf_cv_ncurses_version" >&5
10510 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10511 test "$cf_cv_ncurses_version" = no ||
10512 cat >>confdefs.h <<\EOF
10516 cf_nculib_root=$cf_cv_screen
10517 # This works, except for the special case where we find gpm, but
10518 # ncurses is in a nonstandard location via $LIBS, and we really want
10521 cf_ncurses_SAVE="$LIBS"
10522 echo "$as_me:10522: checking for Gpm_Open in -lgpm" >&5
10523 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10524 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10525 echo $ECHO_N "(cached) $ECHO_C" >&6
10527 ac_check_lib_save_LIBS=$LIBS
10529 cat >conftest.$ac_ext <<_ACEOF
10530 #line 10530 "configure"
10531 #include "confdefs.h"
10533 /* Override any gcc2 internal prototype to avoid an error. */
10537 /* We use char because int might match the return type of a gcc2
10538 builtin and then its argument prototype would still apply. */
10548 rm -f conftest.$ac_objext conftest$ac_exeext
10549 if { (eval echo "$as_me:10549: \"$ac_link\"") >&5
10550 (eval $ac_link) 2>&5
10552 echo "$as_me:10552: \$? = $ac_status" >&5
10553 (exit $ac_status); } &&
10554 { ac_try='test -s conftest$ac_exeext'
10555 { (eval echo "$as_me:10555: \"$ac_try\"") >&5
10556 (eval $ac_try) 2>&5
10558 echo "$as_me:10558: \$? = $ac_status" >&5
10559 (exit $ac_status); }; }; then
10560 ac_cv_lib_gpm_Gpm_Open=yes
10562 echo "$as_me: failed program was:" >&5
10563 cat conftest.$ac_ext >&5
10564 ac_cv_lib_gpm_Gpm_Open=no
10566 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10567 LIBS=$ac_check_lib_save_LIBS
10569 echo "$as_me:10569: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10570 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
10571 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
10572 echo "$as_me:10572: checking for initscr in -lgpm" >&5
10573 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
10574 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
10575 echo $ECHO_N "(cached) $ECHO_C" >&6
10577 ac_check_lib_save_LIBS=$LIBS
10579 cat >conftest.$ac_ext <<_ACEOF
10580 #line 10580 "configure"
10581 #include "confdefs.h"
10583 /* Override any gcc2 internal prototype to avoid an error. */
10587 /* We use char because int might match the return type of a gcc2
10588 builtin and then its argument prototype would still apply. */
10598 rm -f conftest.$ac_objext conftest$ac_exeext
10599 if { (eval echo "$as_me:10599: \"$ac_link\"") >&5
10600 (eval $ac_link) 2>&5
10602 echo "$as_me:10602: \$? = $ac_status" >&5
10603 (exit $ac_status); } &&
10604 { ac_try='test -s conftest$ac_exeext'
10605 { (eval echo "$as_me:10605: \"$ac_try\"") >&5
10606 (eval $ac_try) 2>&5
10608 echo "$as_me:10608: \$? = $ac_status" >&5
10609 (exit $ac_status); }; }; then
10610 ac_cv_lib_gpm_initscr=yes
10612 echo "$as_me: failed program was:" >&5
10613 cat conftest.$ac_ext >&5
10614 ac_cv_lib_gpm_initscr=no
10616 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10617 LIBS=$ac_check_lib_save_LIBS
10619 echo "$as_me:10619: result: $ac_cv_lib_gpm_initscr" >&5
10620 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
10621 if test $ac_cv_lib_gpm_initscr = yes; then
10622 LIBS="$cf_ncurses_SAVE"
10624 cf_ncurses_LIBS="-lgpm"
10631 # This is only necessary if you are linking against an obsolete
10632 # version of ncurses (but it should do no harm, since it's static).
10633 if test "$cf_nculib_root" = ncurses ; then
10634 echo "$as_me:10634: checking for tgoto in -lmytinfo" >&5
10635 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
10636 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
10637 echo $ECHO_N "(cached) $ECHO_C" >&6
10639 ac_check_lib_save_LIBS=$LIBS
10640 LIBS="-lmytinfo $LIBS"
10641 cat >conftest.$ac_ext <<_ACEOF
10642 #line 10642 "configure"
10643 #include "confdefs.h"
10645 /* Override any gcc2 internal prototype to avoid an error. */
10649 /* We use char because int might match the return type of a gcc2
10650 builtin and then its argument prototype would still apply. */
10660 rm -f conftest.$ac_objext conftest$ac_exeext
10661 if { (eval echo "$as_me:10661: \"$ac_link\"") >&5
10662 (eval $ac_link) 2>&5
10664 echo "$as_me:10664: \$? = $ac_status" >&5
10665 (exit $ac_status); } &&
10666 { ac_try='test -s conftest$ac_exeext'
10667 { (eval echo "$as_me:10667: \"$ac_try\"") >&5
10668 (eval $ac_try) 2>&5
10670 echo "$as_me:10670: \$? = $ac_status" >&5
10671 (exit $ac_status); }; }; then
10672 ac_cv_lib_mytinfo_tgoto=yes
10674 echo "$as_me: failed program was:" >&5
10675 cat conftest.$ac_ext >&5
10676 ac_cv_lib_mytinfo_tgoto=no
10678 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10679 LIBS=$ac_check_lib_save_LIBS
10681 echo "$as_me:10681: result: $ac_cv_lib_mytinfo_tgoto" >&5
10682 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
10683 if test $ac_cv_lib_mytinfo_tgoto = yes; then
10684 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
10691 cf_add_libs="$cf_ncurses_LIBS"
10692 # Filter out duplicates - this happens with badly-designed ".pc" files...
10693 for cf_add_1lib in $LIBS
10695 for cf_add_2lib in $cf_add_libs
10697 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10703 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10705 LIBS="$cf_add_libs"
10707 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
10710 cf_add_libs="-l$cf_nculib_root"
10711 # Filter out duplicates - this happens with badly-designed ".pc" files...
10712 for cf_add_1lib in $LIBS
10714 for cf_add_2lib in $cf_add_libs
10716 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10722 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10724 LIBS="$cf_add_libs"
10728 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
10730 echo "$as_me:10730: checking for initscr" >&5
10731 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
10732 if test "${ac_cv_func_initscr+set}" = set; then
10733 echo $ECHO_N "(cached) $ECHO_C" >&6
10735 cat >conftest.$ac_ext <<_ACEOF
10736 #line 10736 "configure"
10737 #include "confdefs.h"
10738 /* System header to define __stub macros and hopefully few prototypes,
10739 which can conflict with char initscr (); below. */
10740 #include <assert.h>
10741 /* Override any gcc2 internal prototype to avoid an error. */
10745 /* We use char because int might match the return type of a gcc2
10746 builtin and then its argument prototype would still apply. */
10753 /* The GNU C library defines this for functions which it implements
10754 to always fail with ENOSYS. Some functions are actually named
10755 something starting with __ and the normal name is an alias. */
10756 #if defined (__stub_initscr) || defined (__stub___initscr)
10759 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10766 rm -f conftest.$ac_objext conftest$ac_exeext
10767 if { (eval echo "$as_me:10767: \"$ac_link\"") >&5
10768 (eval $ac_link) 2>&5
10770 echo "$as_me:10770: \$? = $ac_status" >&5
10771 (exit $ac_status); } &&
10772 { ac_try='test -s conftest$ac_exeext'
10773 { (eval echo "$as_me:10773: \"$ac_try\"") >&5
10774 (eval $ac_try) 2>&5
10776 echo "$as_me:10776: \$? = $ac_status" >&5
10777 (exit $ac_status); }; }; then
10778 ac_cv_func_initscr=yes
10780 echo "$as_me: failed program was:" >&5
10781 cat conftest.$ac_ext >&5
10782 ac_cv_func_initscr=no
10784 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10786 echo "$as_me:10786: result: $ac_cv_func_initscr" >&5
10787 echo "${ECHO_T}$ac_cv_func_initscr" >&6
10788 if test $ac_cv_func_initscr = yes; then
10789 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10792 cf_save_LIBS="$LIBS"
10793 echo "$as_me:10793: checking for initscr in -l$cf_nculib_root" >&5
10794 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
10795 LIBS="-l$cf_nculib_root $LIBS"
10796 cat >conftest.$ac_ext <<_ACEOF
10797 #line 10797 "configure"
10798 #include "confdefs.h"
10799 #include <${cf_cv_ncurses_header:-curses.h}>
10808 rm -f conftest.$ac_objext conftest$ac_exeext
10809 if { (eval echo "$as_me:10809: \"$ac_link\"") >&5
10810 (eval $ac_link) 2>&5
10812 echo "$as_me:10812: \$? = $ac_status" >&5
10813 (exit $ac_status); } &&
10814 { ac_try='test -s conftest$ac_exeext'
10815 { (eval echo "$as_me:10815: \"$ac_try\"") >&5
10816 (eval $ac_try) 2>&5
10818 echo "$as_me:10818: \$? = $ac_status" >&5
10819 (exit $ac_status); }; }; then
10820 echo "$as_me:10820: result: yes" >&5
10821 echo "${ECHO_T}yes" >&6
10822 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10825 echo "$as_me: failed program was:" >&5
10826 cat conftest.$ac_ext >&5
10827 echo "$as_me:10827: result: no" >&5
10828 echo "${ECHO_T}no" >&6
10831 cf_library_path_list=""
10832 if test -n "${LDFLAGS}${LIBS}" ; then
10833 for cf_library_path in $LDFLAGS $LIBS
10835 case $cf_library_path in
10837 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10839 test "x$cf_library_path" != "xNONE" && \
10840 test -d "$cf_library_path" && \
10842 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
10843 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
10844 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
10845 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
10846 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
10847 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"
10850 cf_library_path_list="$cf_library_path_list $cf_search"
10858 test "x$prefix" != "xNONE" && \
10859 test -d "$prefix" && \
10861 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
10862 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
10863 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
10864 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
10865 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
10866 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
10869 for cf_subdir_prefix in \
10878 test "x$cf_subdir_prefix" != "x$prefix" && \
10879 test -d "$cf_subdir_prefix" && \
10880 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10881 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
10882 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
10883 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
10884 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
10885 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
10886 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"
10891 cf_search="$cf_library_path_list $cf_search"
10893 for cf_libdir in $cf_search
10895 echo "$as_me:10895: checking for -l$cf_nculib_root in $cf_libdir" >&5
10896 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
10897 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
10898 cat >conftest.$ac_ext <<_ACEOF
10899 #line 10899 "configure"
10900 #include "confdefs.h"
10901 #include <${cf_cv_ncurses_header:-curses.h}>
10910 rm -f conftest.$ac_objext conftest$ac_exeext
10911 if { (eval echo "$as_me:10911: \"$ac_link\"") >&5
10912 (eval $ac_link) 2>&5
10914 echo "$as_me:10914: \$? = $ac_status" >&5
10915 (exit $ac_status); } &&
10916 { ac_try='test -s conftest$ac_exeext'
10917 { (eval echo "$as_me:10917: \"$ac_try\"") >&5
10918 (eval $ac_try) 2>&5
10920 echo "$as_me:10920: \$? = $ac_status" >&5
10921 (exit $ac_status); }; }; then
10922 echo "$as_me:10922: result: yes" >&5
10923 echo "${ECHO_T}yes" >&6
10924 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10927 echo "$as_me: failed program was:" >&5
10928 cat conftest.$ac_ext >&5
10929 echo "$as_me:10929: result: no" >&5
10930 echo "${ECHO_T}no" >&6
10931 LIBS="$cf_save_LIBS"
10933 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10937 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10941 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
10943 if test $cf_found_library = no ; then
10944 { { echo "$as_me:10944: error: Cannot link $cf_nculib_root library" >&5
10945 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
10946 { (exit 1); exit 1; }; }
10951 if test -n "$cf_ncurses_LIBS" ; then
10952 echo "$as_me:10952: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
10953 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
10954 cf_ncurses_SAVE="$LIBS"
10955 for p in $cf_ncurses_LIBS ; do
10956 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
10957 if test "$q" != "$LIBS" ; then
10961 cat >conftest.$ac_ext <<_ACEOF
10962 #line 10962 "configure"
10963 #include "confdefs.h"
10964 #include <${cf_cv_ncurses_header:-curses.h}>
10968 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
10973 rm -f conftest.$ac_objext conftest$ac_exeext
10974 if { (eval echo "$as_me:10974: \"$ac_link\"") >&5
10975 (eval $ac_link) 2>&5
10977 echo "$as_me:10977: \$? = $ac_status" >&5
10978 (exit $ac_status); } &&
10979 { ac_try='test -s conftest$ac_exeext'
10980 { (eval echo "$as_me:10980: \"$ac_try\"") >&5
10981 (eval $ac_try) 2>&5
10983 echo "$as_me:10983: \$? = $ac_status" >&5
10984 (exit $ac_status); }; }; then
10985 echo "$as_me:10985: result: yes" >&5
10986 echo "${ECHO_T}yes" >&6
10988 echo "$as_me: failed program was:" >&5
10989 cat conftest.$ac_ext >&5
10990 echo "$as_me:10990: result: no" >&5
10991 echo "${ECHO_T}no" >&6
10992 LIBS="$cf_ncurses_SAVE"
10994 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10997 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10999 cat >>confdefs.h <<EOF
11000 #define $cf_nculib_ROOT 1
11005 NCURSES_CONFIG=none
11010 echo "$as_me:11010: checking for X" >&5
11011 echo $ECHO_N "checking for X... $ECHO_C" >&6
11013 # Check whether --with-x or --without-x was given.
11014 if test "${with_x+set}" = set; then
11018 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
11019 if test "x$with_x" = xno; then
11020 # The user explicitly disabled X.
11023 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
11024 # Both variables are already set.
11027 if test "${ac_cv_have_x+set}" = set; then
11028 echo $ECHO_N "(cached) $ECHO_C" >&6
11030 # One or both of the vars are not set, and there is no cached value.
11031 ac_x_includes=no ac_x_libraries=no
11032 rm -fr conftest.dir
11033 if mkdir conftest.dir; then
11035 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
11036 cat >Imakefile <<'EOF'
11038 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
11040 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
11041 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
11042 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
11043 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
11044 for ac_extension in a so sl dylib dll; do
11045 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
11046 test -f $ac_im_libdir/libX11.$ac_extension; then
11047 ac_im_usrlibdir=$ac_im_libdir; break
11050 # Screen out bogus values from the imake configuration. They are
11051 # bogus both because they are the default anyway, and because
11052 # using them would break gcc on systems where it needs fixed includes.
11053 case $ac_im_incroot in
11055 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
11057 case $ac_im_usrlibdir in
11058 /usr/lib | /lib) ;;
11059 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
11063 rm -fr conftest.dir
11066 # Standard set of common directories for X headers.
11067 # Check X11 before X11Rn because it is often a symlink to the current release.
11079 /usr/local/X11/include
11080 /usr/local/X11R6/include
11081 /usr/local/X11R5/include
11082 /usr/local/X11R4/include
11084 /usr/local/include/X11
11085 /usr/local/include/X11R6
11086 /usr/local/include/X11R5
11087 /usr/local/include/X11R4
11091 /usr/XFree86/include/X11
11095 /usr/unsupported/include
11096 /usr/athena/include
11097 /usr/local/x11r5/include
11098 /usr/lpp/Xamples/include
11100 /usr/openwin/include
11101 /usr/openwin/share/include'
11103 if test "$ac_x_includes" = no; then
11104 # Guess where to find include files, by looking for Intrinsic.h.
11105 # First, try using that file with no special directory specified.
11106 cat >conftest.$ac_ext <<_ACEOF
11107 #line 11107 "configure"
11108 #include "confdefs.h"
11109 #include <X11/Intrinsic.h>
11111 if { (eval echo "$as_me:11111: \"$ac_cpp conftest.$ac_ext\"") >&5
11112 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11114 egrep -v '^ *\+' conftest.er1 >conftest.err
11116 cat conftest.err >&5
11117 echo "$as_me:11117: \$? = $ac_status" >&5
11118 (exit $ac_status); } >/dev/null; then
11119 if test -s conftest.err; then
11120 ac_cpp_err=$ac_c_preproc_warn_flag
11127 if test -z "$ac_cpp_err"; then
11128 # We can compile using X headers with no special include directory.
11131 echo "$as_me: failed program was:" >&5
11132 cat conftest.$ac_ext >&5
11133 for ac_dir in $ac_x_header_dirs; do
11134 if test -r "$ac_dir/X11/Intrinsic.h"; then
11135 ac_x_includes=$ac_dir
11140 rm -f conftest.err conftest.$ac_ext
11141 fi # $ac_x_includes = no
11143 if test "$ac_x_libraries" = no; then
11144 # Check for the libraries.
11145 # See if we find them without any special options.
11146 # Don't add to $LIBS permanently.
11149 cat >conftest.$ac_ext <<_ACEOF
11150 #line 11150 "configure"
11151 #include "confdefs.h"
11152 #include <X11/Intrinsic.h>
11161 rm -f conftest.$ac_objext conftest$ac_exeext
11162 if { (eval echo "$as_me:11162: \"$ac_link\"") >&5
11163 (eval $ac_link) 2>&5
11165 echo "$as_me:11165: \$? = $ac_status" >&5
11166 (exit $ac_status); } &&
11167 { ac_try='test -s conftest$ac_exeext'
11168 { (eval echo "$as_me:11168: \"$ac_try\"") >&5
11169 (eval $ac_try) 2>&5
11171 echo "$as_me:11171: \$? = $ac_status" >&5
11172 (exit $ac_status); }; }; then
11174 # We can link X programs with no special library path.
11177 echo "$as_me: failed program was:" >&5
11178 cat conftest.$ac_ext >&5
11180 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
11182 # Don't even attempt the hair of trying to link an X program!
11183 for ac_extension in a so sl dylib dll; do
11184 if test -r $ac_dir/libXt.$ac_extension; then
11185 ac_x_libraries=$ac_dir
11191 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11192 fi # $ac_x_libraries = no
11194 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
11195 # Didn't find X anywhere. Cache the known absence of X.
11196 ac_cv_have_x="have_x=no"
11198 # Record where we found X for the cache.
11199 ac_cv_have_x="have_x=yes \
11200 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
11205 eval "$ac_cv_have_x"
11208 if test "$have_x" != yes; then
11209 echo "$as_me:11209: result: $have_x" >&5
11210 echo "${ECHO_T}$have_x" >&6
11213 # If each of the values was on the command line, it overrides each guess.
11214 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
11215 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
11216 # Update the cache value to reflect the command line values.
11217 ac_cv_have_x="have_x=yes \
11218 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
11219 echo "$as_me:11219: result: libraries $x_libraries, headers $x_includes" >&5
11220 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
11223 if test "$no_x" = yes; then
11224 # Not all programs may use this symbol, but it does not hurt to define it.
11226 cat >>confdefs.h <<\EOF
11227 #define X_DISPLAY_MISSING 1
11230 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
11232 if test -n "$x_includes"; then
11233 X_CFLAGS="$X_CFLAGS -I$x_includes"
11236 # It would also be nice to do this for all -L options, not just this one.
11237 if test -n "$x_libraries"; then
11238 X_LIBS="$X_LIBS -L$x_libraries"
11239 # For Solaris; some versions of Sun CC require a space after -R and
11240 # others require no space. Words are not sufficient . . . .
11241 case `(uname -sr) 2>/dev/null` in
11243 echo "$as_me:11243: checking whether -R must be followed by a space" >&5
11244 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
11245 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
11246 cat >conftest.$ac_ext <<_ACEOF
11247 #line 11247 "configure"
11248 #include "confdefs.h"
11258 rm -f conftest.$ac_objext conftest$ac_exeext
11259 if { (eval echo "$as_me:11259: \"$ac_link\"") >&5
11260 (eval $ac_link) 2>&5
11262 echo "$as_me:11262: \$? = $ac_status" >&5
11263 (exit $ac_status); } &&
11264 { ac_try='test -s conftest$ac_exeext'
11265 { (eval echo "$as_me:11265: \"$ac_try\"") >&5
11266 (eval $ac_try) 2>&5
11268 echo "$as_me:11268: \$? = $ac_status" >&5
11269 (exit $ac_status); }; }; then
11272 echo "$as_me: failed program was:" >&5
11273 cat conftest.$ac_ext >&5
11276 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11277 if test $ac_R_nospace = yes; then
11278 echo "$as_me:11278: result: no" >&5
11279 echo "${ECHO_T}no" >&6
11280 X_LIBS="$X_LIBS -R$x_libraries"
11282 LIBS="$ac_xsave_LIBS -R $x_libraries"
11283 cat >conftest.$ac_ext <<_ACEOF
11284 #line 11284 "configure"
11285 #include "confdefs.h"
11295 rm -f conftest.$ac_objext conftest$ac_exeext
11296 if { (eval echo "$as_me:11296: \"$ac_link\"") >&5
11297 (eval $ac_link) 2>&5
11299 echo "$as_me:11299: \$? = $ac_status" >&5
11300 (exit $ac_status); } &&
11301 { ac_try='test -s conftest$ac_exeext'
11302 { (eval echo "$as_me:11302: \"$ac_try\"") >&5
11303 (eval $ac_try) 2>&5
11305 echo "$as_me:11305: \$? = $ac_status" >&5
11306 (exit $ac_status); }; }; then
11309 echo "$as_me: failed program was:" >&5
11310 cat conftest.$ac_ext >&5
11313 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11314 if test $ac_R_space = yes; then
11315 echo "$as_me:11315: result: yes" >&5
11316 echo "${ECHO_T}yes" >&6
11317 X_LIBS="$X_LIBS -R $x_libraries"
11319 echo "$as_me:11319: result: neither works" >&5
11320 echo "${ECHO_T}neither works" >&6
11323 LIBS=$ac_xsave_LIBS
11327 # Check for system-dependent libraries X programs must link with.
11328 # Do this before checking for the system-independent R6 libraries
11329 # (-lICE), since we may need -lsocket or whatever for X linking.
11331 if test "$ISC" = yes; then
11332 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
11334 # Martyn Johnson says this is needed for Ultrix, if the X
11335 # libraries were built with DECnet support. And Karl Berry says
11336 # the Alpha needs dnet_stub (dnet does not exist).
11337 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
11338 cat >conftest.$ac_ext <<_ACEOF
11339 #line 11339 "configure"
11340 #include "confdefs.h"
11342 /* Override any gcc2 internal prototype to avoid an error. */
11346 /* We use char because int might match the return type of a gcc2
11347 builtin and then its argument prototype would still apply. */
11348 char XOpenDisplay ();
11357 rm -f conftest.$ac_objext conftest$ac_exeext
11358 if { (eval echo "$as_me:11358: \"$ac_link\"") >&5
11359 (eval $ac_link) 2>&5
11361 echo "$as_me:11361: \$? = $ac_status" >&5
11362 (exit $ac_status); } &&
11363 { ac_try='test -s conftest$ac_exeext'
11364 { (eval echo "$as_me:11364: \"$ac_try\"") >&5
11365 (eval $ac_try) 2>&5
11367 echo "$as_me:11367: \$? = $ac_status" >&5
11368 (exit $ac_status); }; }; then
11371 echo "$as_me: failed program was:" >&5
11372 cat conftest.$ac_ext >&5
11373 echo "$as_me:11373: checking for dnet_ntoa in -ldnet" >&5
11374 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
11375 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
11376 echo $ECHO_N "(cached) $ECHO_C" >&6
11378 ac_check_lib_save_LIBS=$LIBS
11379 LIBS="-ldnet $LIBS"
11380 cat >conftest.$ac_ext <<_ACEOF
11381 #line 11381 "configure"
11382 #include "confdefs.h"
11384 /* Override any gcc2 internal prototype to avoid an error. */
11388 /* We use char because int might match the return type of a gcc2
11389 builtin and then its argument prototype would still apply. */
11399 rm -f conftest.$ac_objext conftest$ac_exeext
11400 if { (eval echo "$as_me:11400: \"$ac_link\"") >&5
11401 (eval $ac_link) 2>&5
11403 echo "$as_me:11403: \$? = $ac_status" >&5
11404 (exit $ac_status); } &&
11405 { ac_try='test -s conftest$ac_exeext'
11406 { (eval echo "$as_me:11406: \"$ac_try\"") >&5
11407 (eval $ac_try) 2>&5
11409 echo "$as_me:11409: \$? = $ac_status" >&5
11410 (exit $ac_status); }; }; then
11411 ac_cv_lib_dnet_dnet_ntoa=yes
11413 echo "$as_me: failed program was:" >&5
11414 cat conftest.$ac_ext >&5
11415 ac_cv_lib_dnet_dnet_ntoa=no
11417 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11418 LIBS=$ac_check_lib_save_LIBS
11420 echo "$as_me:11420: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
11421 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
11422 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
11423 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
11426 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
11427 echo "$as_me:11427: checking for dnet_ntoa in -ldnet_stub" >&5
11428 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
11429 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
11430 echo $ECHO_N "(cached) $ECHO_C" >&6
11432 ac_check_lib_save_LIBS=$LIBS
11433 LIBS="-ldnet_stub $LIBS"
11434 cat >conftest.$ac_ext <<_ACEOF
11435 #line 11435 "configure"
11436 #include "confdefs.h"
11438 /* Override any gcc2 internal prototype to avoid an error. */
11442 /* We use char because int might match the return type of a gcc2
11443 builtin and then its argument prototype would still apply. */
11453 rm -f conftest.$ac_objext conftest$ac_exeext
11454 if { (eval echo "$as_me:11454: \"$ac_link\"") >&5
11455 (eval $ac_link) 2>&5
11457 echo "$as_me:11457: \$? = $ac_status" >&5
11458 (exit $ac_status); } &&
11459 { ac_try='test -s conftest$ac_exeext'
11460 { (eval echo "$as_me:11460: \"$ac_try\"") >&5
11461 (eval $ac_try) 2>&5
11463 echo "$as_me:11463: \$? = $ac_status" >&5
11464 (exit $ac_status); }; }; then
11465 ac_cv_lib_dnet_stub_dnet_ntoa=yes
11467 echo "$as_me: failed program was:" >&5
11468 cat conftest.$ac_ext >&5
11469 ac_cv_lib_dnet_stub_dnet_ntoa=no
11471 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11472 LIBS=$ac_check_lib_save_LIBS
11474 echo "$as_me:11474: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
11475 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
11476 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
11477 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
11482 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11483 LIBS="$ac_xsave_LIBS"
11485 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
11486 # to get the SysV transport functions.
11487 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
11489 # The nsl library prevents programs from opening the X display
11490 # on Irix 5.2, according to T.E. Dickey.
11491 # The functions gethostbyname, getservbyname, and inet_addr are
11492 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
11493 echo "$as_me:11493: checking for gethostbyname" >&5
11494 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
11495 if test "${ac_cv_func_gethostbyname+set}" = set; then
11496 echo $ECHO_N "(cached) $ECHO_C" >&6
11498 cat >conftest.$ac_ext <<_ACEOF
11499 #line 11499 "configure"
11500 #include "confdefs.h"
11501 /* System header to define __stub macros and hopefully few prototypes,
11502 which can conflict with char gethostbyname (); below. */
11503 #include <assert.h>
11504 /* Override any gcc2 internal prototype to avoid an error. */
11508 /* We use char because int might match the return type of a gcc2
11509 builtin and then its argument prototype would still apply. */
11510 char gethostbyname ();
11516 /* The GNU C library defines this for functions which it implements
11517 to always fail with ENOSYS. Some functions are actually named
11518 something starting with __ and the normal name is an alias. */
11519 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
11522 f = gethostbyname; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11529 rm -f conftest.$ac_objext conftest$ac_exeext
11530 if { (eval echo "$as_me:11530: \"$ac_link\"") >&5
11531 (eval $ac_link) 2>&5
11533 echo "$as_me:11533: \$? = $ac_status" >&5
11534 (exit $ac_status); } &&
11535 { ac_try='test -s conftest$ac_exeext'
11536 { (eval echo "$as_me:11536: \"$ac_try\"") >&5
11537 (eval $ac_try) 2>&5
11539 echo "$as_me:11539: \$? = $ac_status" >&5
11540 (exit $ac_status); }; }; then
11541 ac_cv_func_gethostbyname=yes
11543 echo "$as_me: failed program was:" >&5
11544 cat conftest.$ac_ext >&5
11545 ac_cv_func_gethostbyname=no
11547 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11549 echo "$as_me:11549: result: $ac_cv_func_gethostbyname" >&5
11550 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
11552 if test $ac_cv_func_gethostbyname = no; then
11553 echo "$as_me:11553: checking for gethostbyname in -lnsl" >&5
11554 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
11555 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
11556 echo $ECHO_N "(cached) $ECHO_C" >&6
11558 ac_check_lib_save_LIBS=$LIBS
11560 cat >conftest.$ac_ext <<_ACEOF
11561 #line 11561 "configure"
11562 #include "confdefs.h"
11564 /* Override any gcc2 internal prototype to avoid an error. */
11568 /* We use char because int might match the return type of a gcc2
11569 builtin and then its argument prototype would still apply. */
11570 char gethostbyname ();
11579 rm -f conftest.$ac_objext conftest$ac_exeext
11580 if { (eval echo "$as_me:11580: \"$ac_link\"") >&5
11581 (eval $ac_link) 2>&5
11583 echo "$as_me:11583: \$? = $ac_status" >&5
11584 (exit $ac_status); } &&
11585 { ac_try='test -s conftest$ac_exeext'
11586 { (eval echo "$as_me:11586: \"$ac_try\"") >&5
11587 (eval $ac_try) 2>&5
11589 echo "$as_me:11589: \$? = $ac_status" >&5
11590 (exit $ac_status); }; }; then
11591 ac_cv_lib_nsl_gethostbyname=yes
11593 echo "$as_me: failed program was:" >&5
11594 cat conftest.$ac_ext >&5
11595 ac_cv_lib_nsl_gethostbyname=no
11597 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11598 LIBS=$ac_check_lib_save_LIBS
11600 echo "$as_me:11600: result: $ac_cv_lib_nsl_gethostbyname" >&5
11601 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
11602 if test $ac_cv_lib_nsl_gethostbyname = yes; then
11603 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
11606 if test $ac_cv_lib_nsl_gethostbyname = no; then
11607 echo "$as_me:11607: checking for gethostbyname in -lbsd" >&5
11608 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
11609 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
11610 echo $ECHO_N "(cached) $ECHO_C" >&6
11612 ac_check_lib_save_LIBS=$LIBS
11614 cat >conftest.$ac_ext <<_ACEOF
11615 #line 11615 "configure"
11616 #include "confdefs.h"
11618 /* Override any gcc2 internal prototype to avoid an error. */
11622 /* We use char because int might match the return type of a gcc2
11623 builtin and then its argument prototype would still apply. */
11624 char gethostbyname ();
11633 rm -f conftest.$ac_objext conftest$ac_exeext
11634 if { (eval echo "$as_me:11634: \"$ac_link\"") >&5
11635 (eval $ac_link) 2>&5
11637 echo "$as_me:11637: \$? = $ac_status" >&5
11638 (exit $ac_status); } &&
11639 { ac_try='test -s conftest$ac_exeext'
11640 { (eval echo "$as_me:11640: \"$ac_try\"") >&5
11641 (eval $ac_try) 2>&5
11643 echo "$as_me:11643: \$? = $ac_status" >&5
11644 (exit $ac_status); }; }; then
11645 ac_cv_lib_bsd_gethostbyname=yes
11647 echo "$as_me: failed program was:" >&5
11648 cat conftest.$ac_ext >&5
11649 ac_cv_lib_bsd_gethostbyname=no
11651 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11652 LIBS=$ac_check_lib_save_LIBS
11654 echo "$as_me:11654: result: $ac_cv_lib_bsd_gethostbyname" >&5
11655 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
11656 if test $ac_cv_lib_bsd_gethostbyname = yes; then
11657 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
11663 # lieder@skyler.mavd.honeywell.com says without -lsocket,
11664 # socket/setsockopt and other routines are undefined under SCO ODT
11665 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
11666 # on later versions), says Simon Leinen: it contains gethostby*
11667 # variants that don't use the nameserver (or something). -lsocket
11668 # must be given before -lnsl if both are needed. We assume that
11669 # if connect needs -lnsl, so does gethostbyname.
11670 echo "$as_me:11670: checking for connect" >&5
11671 echo $ECHO_N "checking for connect... $ECHO_C" >&6
11672 if test "${ac_cv_func_connect+set}" = set; then
11673 echo $ECHO_N "(cached) $ECHO_C" >&6
11675 cat >conftest.$ac_ext <<_ACEOF
11676 #line 11676 "configure"
11677 #include "confdefs.h"
11678 /* System header to define __stub macros and hopefully few prototypes,
11679 which can conflict with char connect (); below. */
11680 #include <assert.h>
11681 /* Override any gcc2 internal prototype to avoid an error. */
11685 /* We use char because int might match the return type of a gcc2
11686 builtin and then its argument prototype would still apply. */
11693 /* The GNU C library defines this for functions which it implements
11694 to always fail with ENOSYS. Some functions are actually named
11695 something starting with __ and the normal name is an alias. */
11696 #if defined (__stub_connect) || defined (__stub___connect)
11699 f = connect; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11706 rm -f conftest.$ac_objext conftest$ac_exeext
11707 if { (eval echo "$as_me:11707: \"$ac_link\"") >&5
11708 (eval $ac_link) 2>&5
11710 echo "$as_me:11710: \$? = $ac_status" >&5
11711 (exit $ac_status); } &&
11712 { ac_try='test -s conftest$ac_exeext'
11713 { (eval echo "$as_me:11713: \"$ac_try\"") >&5
11714 (eval $ac_try) 2>&5
11716 echo "$as_me:11716: \$? = $ac_status" >&5
11717 (exit $ac_status); }; }; then
11718 ac_cv_func_connect=yes
11720 echo "$as_me: failed program was:" >&5
11721 cat conftest.$ac_ext >&5
11722 ac_cv_func_connect=no
11724 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11726 echo "$as_me:11726: result: $ac_cv_func_connect" >&5
11727 echo "${ECHO_T}$ac_cv_func_connect" >&6
11729 if test $ac_cv_func_connect = no; then
11730 echo "$as_me:11730: checking for connect in -lsocket" >&5
11731 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
11732 if test "${ac_cv_lib_socket_connect+set}" = set; then
11733 echo $ECHO_N "(cached) $ECHO_C" >&6
11735 ac_check_lib_save_LIBS=$LIBS
11736 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
11737 cat >conftest.$ac_ext <<_ACEOF
11738 #line 11738 "configure"
11739 #include "confdefs.h"
11741 /* Override any gcc2 internal prototype to avoid an error. */
11745 /* We use char because int might match the return type of a gcc2
11746 builtin and then its argument prototype would still apply. */
11756 rm -f conftest.$ac_objext conftest$ac_exeext
11757 if { (eval echo "$as_me:11757: \"$ac_link\"") >&5
11758 (eval $ac_link) 2>&5
11760 echo "$as_me:11760: \$? = $ac_status" >&5
11761 (exit $ac_status); } &&
11762 { ac_try='test -s conftest$ac_exeext'
11763 { (eval echo "$as_me:11763: \"$ac_try\"") >&5
11764 (eval $ac_try) 2>&5
11766 echo "$as_me:11766: \$? = $ac_status" >&5
11767 (exit $ac_status); }; }; then
11768 ac_cv_lib_socket_connect=yes
11770 echo "$as_me: failed program was:" >&5
11771 cat conftest.$ac_ext >&5
11772 ac_cv_lib_socket_connect=no
11774 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11775 LIBS=$ac_check_lib_save_LIBS
11777 echo "$as_me:11777: result: $ac_cv_lib_socket_connect" >&5
11778 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
11779 if test $ac_cv_lib_socket_connect = yes; then
11780 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
11785 # Guillermo Gomez says -lposix is necessary on A/UX.
11786 echo "$as_me:11786: checking for remove" >&5
11787 echo $ECHO_N "checking for remove... $ECHO_C" >&6
11788 if test "${ac_cv_func_remove+set}" = set; then
11789 echo $ECHO_N "(cached) $ECHO_C" >&6
11791 cat >conftest.$ac_ext <<_ACEOF
11792 #line 11792 "configure"
11793 #include "confdefs.h"
11794 /* System header to define __stub macros and hopefully few prototypes,
11795 which can conflict with char remove (); below. */
11796 #include <assert.h>
11797 /* Override any gcc2 internal prototype to avoid an error. */
11801 /* We use char because int might match the return type of a gcc2
11802 builtin and then its argument prototype would still apply. */
11809 /* The GNU C library defines this for functions which it implements
11810 to always fail with ENOSYS. Some functions are actually named
11811 something starting with __ and the normal name is an alias. */
11812 #if defined (__stub_remove) || defined (__stub___remove)
11815 f = remove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11822 rm -f conftest.$ac_objext conftest$ac_exeext
11823 if { (eval echo "$as_me:11823: \"$ac_link\"") >&5
11824 (eval $ac_link) 2>&5
11826 echo "$as_me:11826: \$? = $ac_status" >&5
11827 (exit $ac_status); } &&
11828 { ac_try='test -s conftest$ac_exeext'
11829 { (eval echo "$as_me:11829: \"$ac_try\"") >&5
11830 (eval $ac_try) 2>&5
11832 echo "$as_me:11832: \$? = $ac_status" >&5
11833 (exit $ac_status); }; }; then
11834 ac_cv_func_remove=yes
11836 echo "$as_me: failed program was:" >&5
11837 cat conftest.$ac_ext >&5
11838 ac_cv_func_remove=no
11840 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11842 echo "$as_me:11842: result: $ac_cv_func_remove" >&5
11843 echo "${ECHO_T}$ac_cv_func_remove" >&6
11845 if test $ac_cv_func_remove = no; then
11846 echo "$as_me:11846: checking for remove in -lposix" >&5
11847 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
11848 if test "${ac_cv_lib_posix_remove+set}" = set; then
11849 echo $ECHO_N "(cached) $ECHO_C" >&6
11851 ac_check_lib_save_LIBS=$LIBS
11852 LIBS="-lposix $LIBS"
11853 cat >conftest.$ac_ext <<_ACEOF
11854 #line 11854 "configure"
11855 #include "confdefs.h"
11857 /* Override any gcc2 internal prototype to avoid an error. */
11861 /* We use char because int might match the return type of a gcc2
11862 builtin and then its argument prototype would still apply. */
11872 rm -f conftest.$ac_objext conftest$ac_exeext
11873 if { (eval echo "$as_me:11873: \"$ac_link\"") >&5
11874 (eval $ac_link) 2>&5
11876 echo "$as_me:11876: \$? = $ac_status" >&5
11877 (exit $ac_status); } &&
11878 { ac_try='test -s conftest$ac_exeext'
11879 { (eval echo "$as_me:11879: \"$ac_try\"") >&5
11880 (eval $ac_try) 2>&5
11882 echo "$as_me:11882: \$? = $ac_status" >&5
11883 (exit $ac_status); }; }; then
11884 ac_cv_lib_posix_remove=yes
11886 echo "$as_me: failed program was:" >&5
11887 cat conftest.$ac_ext >&5
11888 ac_cv_lib_posix_remove=no
11890 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11891 LIBS=$ac_check_lib_save_LIBS
11893 echo "$as_me:11893: result: $ac_cv_lib_posix_remove" >&5
11894 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
11895 if test $ac_cv_lib_posix_remove = yes; then
11896 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
11901 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
11902 echo "$as_me:11902: checking for shmat" >&5
11903 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
11904 if test "${ac_cv_func_shmat+set}" = set; then
11905 echo $ECHO_N "(cached) $ECHO_C" >&6
11907 cat >conftest.$ac_ext <<_ACEOF
11908 #line 11908 "configure"
11909 #include "confdefs.h"
11910 /* System header to define __stub macros and hopefully few prototypes,
11911 which can conflict with char shmat (); below. */
11912 #include <assert.h>
11913 /* Override any gcc2 internal prototype to avoid an error. */
11917 /* We use char because int might match the return type of a gcc2
11918 builtin and then its argument prototype would still apply. */
11925 /* The GNU C library defines this for functions which it implements
11926 to always fail with ENOSYS. Some functions are actually named
11927 something starting with __ and the normal name is an alias. */
11928 #if defined (__stub_shmat) || defined (__stub___shmat)
11931 f = shmat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11938 rm -f conftest.$ac_objext conftest$ac_exeext
11939 if { (eval echo "$as_me:11939: \"$ac_link\"") >&5
11940 (eval $ac_link) 2>&5
11942 echo "$as_me:11942: \$? = $ac_status" >&5
11943 (exit $ac_status); } &&
11944 { ac_try='test -s conftest$ac_exeext'
11945 { (eval echo "$as_me:11945: \"$ac_try\"") >&5
11946 (eval $ac_try) 2>&5
11948 echo "$as_me:11948: \$? = $ac_status" >&5
11949 (exit $ac_status); }; }; then
11950 ac_cv_func_shmat=yes
11952 echo "$as_me: failed program was:" >&5
11953 cat conftest.$ac_ext >&5
11954 ac_cv_func_shmat=no
11956 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11958 echo "$as_me:11958: result: $ac_cv_func_shmat" >&5
11959 echo "${ECHO_T}$ac_cv_func_shmat" >&6
11961 if test $ac_cv_func_shmat = no; then
11962 echo "$as_me:11962: checking for shmat in -lipc" >&5
11963 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
11964 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
11965 echo $ECHO_N "(cached) $ECHO_C" >&6
11967 ac_check_lib_save_LIBS=$LIBS
11969 cat >conftest.$ac_ext <<_ACEOF
11970 #line 11970 "configure"
11971 #include "confdefs.h"
11973 /* Override any gcc2 internal prototype to avoid an error. */
11977 /* We use char because int might match the return type of a gcc2
11978 builtin and then its argument prototype would still apply. */
11988 rm -f conftest.$ac_objext conftest$ac_exeext
11989 if { (eval echo "$as_me:11989: \"$ac_link\"") >&5
11990 (eval $ac_link) 2>&5
11992 echo "$as_me:11992: \$? = $ac_status" >&5
11993 (exit $ac_status); } &&
11994 { ac_try='test -s conftest$ac_exeext'
11995 { (eval echo "$as_me:11995: \"$ac_try\"") >&5
11996 (eval $ac_try) 2>&5
11998 echo "$as_me:11998: \$? = $ac_status" >&5
11999 (exit $ac_status); }; }; then
12000 ac_cv_lib_ipc_shmat=yes
12002 echo "$as_me: failed program was:" >&5
12003 cat conftest.$ac_ext >&5
12004 ac_cv_lib_ipc_shmat=no
12006 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12007 LIBS=$ac_check_lib_save_LIBS
12009 echo "$as_me:12009: result: $ac_cv_lib_ipc_shmat" >&5
12010 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
12011 if test $ac_cv_lib_ipc_shmat = yes; then
12012 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
12018 # Check for libraries that X11R6 Xt/Xaw programs need.
12019 ac_save_LDFLAGS=$LDFLAGS
12020 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
12021 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
12022 # check for ICE first), but we must link in the order -lSM -lICE or
12023 # we get undefined symbols. So assume we have SM if we have ICE.
12024 # These have to be linked with before -lX11, unlike the other
12025 # libraries we check for below, so use a different variable.
12026 # John Interrante, Karl Berry
12027 echo "$as_me:12027: checking for IceConnectionNumber in -lICE" >&5
12028 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
12029 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
12030 echo $ECHO_N "(cached) $ECHO_C" >&6
12032 ac_check_lib_save_LIBS=$LIBS
12033 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
12034 cat >conftest.$ac_ext <<_ACEOF
12035 #line 12035 "configure"
12036 #include "confdefs.h"
12038 /* Override any gcc2 internal prototype to avoid an error. */
12042 /* We use char because int might match the return type of a gcc2
12043 builtin and then its argument prototype would still apply. */
12044 char IceConnectionNumber ();
12048 IceConnectionNumber ();
12053 rm -f conftest.$ac_objext conftest$ac_exeext
12054 if { (eval echo "$as_me:12054: \"$ac_link\"") >&5
12055 (eval $ac_link) 2>&5
12057 echo "$as_me:12057: \$? = $ac_status" >&5
12058 (exit $ac_status); } &&
12059 { ac_try='test -s conftest$ac_exeext'
12060 { (eval echo "$as_me:12060: \"$ac_try\"") >&5
12061 (eval $ac_try) 2>&5
12063 echo "$as_me:12063: \$? = $ac_status" >&5
12064 (exit $ac_status); }; }; then
12065 ac_cv_lib_ICE_IceConnectionNumber=yes
12067 echo "$as_me: failed program was:" >&5
12068 cat conftest.$ac_ext >&5
12069 ac_cv_lib_ICE_IceConnectionNumber=no
12071 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12072 LIBS=$ac_check_lib_save_LIBS
12074 echo "$as_me:12074: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
12075 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
12076 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
12077 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
12080 LDFLAGS=$ac_save_LDFLAGS
12084 cf_x_athena=${cf_x_athena:-Xaw}
12086 echo "$as_me:12086: checking if you want to link with Xaw 3d library" >&5
12087 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
12090 # Check whether --with-Xaw3d or --without-Xaw3d was given.
12091 if test "${with_Xaw3d+set}" = set; then
12092 withval="$with_Xaw3d"
12095 if test "$withval" = yes ; then
12097 echo "$as_me:12097: result: yes" >&5
12098 echo "${ECHO_T}yes" >&6
12100 echo "$as_me:12100: result: no" >&5
12101 echo "${ECHO_T}no" >&6
12104 echo "$as_me:12104: checking if you want to link with Xaw 3d xft library" >&5
12105 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
12108 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
12109 if test "${with_Xaw3dxft+set}" = set; then
12110 withval="$with_Xaw3dxft"
12113 if test "$withval" = yes ; then
12114 cf_x_athena=Xaw3dxft
12115 echo "$as_me:12115: result: yes" >&5
12116 echo "${ECHO_T}yes" >&6
12118 echo "$as_me:12118: result: no" >&5
12119 echo "${ECHO_T}no" >&6
12122 echo "$as_me:12122: checking if you want to link with neXT Athena library" >&5
12123 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
12126 # Check whether --with-neXtaw or --without-neXtaw was given.
12127 if test "${with_neXtaw+set}" = set; then
12128 withval="$with_neXtaw"
12131 if test "$withval" = yes ; then
12133 echo "$as_me:12133: result: yes" >&5
12134 echo "${ECHO_T}yes" >&6
12136 echo "$as_me:12136: result: no" >&5
12137 echo "${ECHO_T}no" >&6
12140 echo "$as_me:12140: checking if you want to link with Athena-Plus library" >&5
12141 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
12144 # Check whether --with-XawPlus or --without-XawPlus was given.
12145 if test "${with_XawPlus+set}" = set; then
12146 withval="$with_XawPlus"
12149 if test "$withval" = yes ; then
12150 cf_x_athena=XawPlus
12151 echo "$as_me:12151: result: yes" >&5
12152 echo "${ECHO_T}yes" >&6
12154 echo "$as_me:12154: result: no" >&5
12155 echo "${ECHO_T}no" >&6
12160 if test "$PKG_CONFIG" != none ; then
12162 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
12163 for cf_athena_pkg in \
12166 ${cf_x_athena}-devel \
12167 lib${cf_x_athena} \
12168 lib${cf_x_athena}-devel
12171 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
12172 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
12174 echo "${as_me:-configure}:12174: testing found package $cf_athena_pkg ..." 1>&5
12176 cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
12177 cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
12178 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
12180 echo "${as_me:-configure}:12180: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12182 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
12184 echo "${as_me:-configure}:12184: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
12189 cf_new_extra_cppflags=
12191 for cf_add_cflags in $cf_pkgconfig_incs
12193 case $cf_fix_cppflags in
12195 case $cf_add_cflags in
12196 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12197 case $cf_add_cflags in
12199 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12201 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12202 && test -z "${cf_tst_cflags}" \
12203 && cf_fix_cppflags=yes
12205 if test $cf_fix_cppflags = yes ; then
12207 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12208 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12211 elif test "${cf_tst_cflags}" = "\"'" ; then
12213 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12214 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12220 case "$CPPFLAGS" in
12224 case $cf_add_cflags in
12226 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12228 CPPFLAGS=`echo "$CPPFLAGS" | \
12229 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12230 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12235 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12236 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12243 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12244 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12251 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12252 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12254 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12256 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12257 && test -z "${cf_tst_cflags}" \
12258 && cf_fix_cppflags=no
12263 if test -n "$cf_new_cflags" ; then
12265 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12266 CFLAGS="${CFLAGS}$cf_new_cflags"
12270 if test -n "$cf_new_cppflags" ; then
12272 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12273 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12277 if test -n "$cf_new_extra_cppflags" ; then
12279 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12280 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12284 cf_add_libs="$cf_pkgconfig_libs"
12285 # Filter out duplicates - this happens with badly-designed ".pc" files...
12286 for cf_add_1lib in $LIBS
12288 for cf_add_2lib in $cf_add_libs
12290 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12296 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12298 LIBS="$cf_add_libs"
12300 cf_x_athena_lib="$cf_pkgconfig_libs"
12302 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12304 cat >>confdefs.h <<EOF
12305 #define $cf_x_athena_LIBS 1
12308 for cf_trim_lib in Xmu Xt X11
12311 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
12312 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
12313 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
12315 echo "${as_me:-configure}:12315: testing ..trimmed $LIBS ..." 1>&5
12321 echo "$as_me:12321: checking for usable $cf_x_athena/Xmu package" >&5
12322 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
12323 if test "${cf_cv_xaw_compat+set}" = set; then
12324 echo $ECHO_N "(cached) $ECHO_C" >&6
12327 cat >conftest.$ac_ext <<_ACEOF
12328 #line 12328 "configure"
12329 #include "confdefs.h"
12331 #include <X11/Xmu/CharSet.h>
12337 int check = XmuCompareISOLatin1("big", "small")
12343 rm -f conftest.$ac_objext conftest$ac_exeext
12344 if { (eval echo "$as_me:12344: \"$ac_link\"") >&5
12345 (eval $ac_link) 2>&5
12347 echo "$as_me:12347: \$? = $ac_status" >&5
12348 (exit $ac_status); } &&
12349 { ac_try='test -s conftest$ac_exeext'
12350 { (eval echo "$as_me:12350: \"$ac_try\"") >&5
12351 (eval $ac_try) 2>&5
12353 echo "$as_me:12353: \$? = $ac_status" >&5
12354 (exit $ac_status); }; }; then
12355 cf_cv_xaw_compat=yes
12357 echo "$as_me: failed program was:" >&5
12358 cat conftest.$ac_ext >&5
12359 cf_cv_xaw_compat=no
12361 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12363 echo "$as_me:12363: result: $cf_cv_xaw_compat" >&5
12364 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
12366 if test "$cf_cv_xaw_compat" = no
12368 # workaround for broken ".pc" files...
12369 case "$cf_x_athena_lib" in
12373 test -n "$verbose" && echo " work around broken package" 1>&6
12375 echo "${as_me:-configure}:12375: testing work around broken package ..." 1>&5
12377 cf_save_xmu="$LIBS"
12378 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
12380 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
12381 test -n "$verbose" && echo " found package xmu" 1>&6
12383 echo "${as_me:-configure}:12383: testing found package xmu ..." 1>&5
12385 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
12386 cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`"
12387 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
12389 echo "${as_me:-configure}:12389: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12391 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
12393 echo "${as_me:-configure}:12393: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
12398 cf_new_extra_cppflags=
12400 for cf_add_cflags in $cf_pkgconfig_incs
12402 case $cf_fix_cppflags in
12404 case $cf_add_cflags in
12405 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12406 case $cf_add_cflags in
12408 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12410 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12411 && test -z "${cf_tst_cflags}" \
12412 && cf_fix_cppflags=yes
12414 if test $cf_fix_cppflags = yes ; then
12416 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12417 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12420 elif test "${cf_tst_cflags}" = "\"'" ; then
12422 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12423 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12429 case "$CPPFLAGS" in
12433 case $cf_add_cflags in
12435 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12437 CPPFLAGS=`echo "$CPPFLAGS" | \
12438 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12439 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12444 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12445 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12452 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12453 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12460 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12461 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12463 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12465 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12466 && test -z "${cf_tst_cflags}" \
12467 && cf_fix_cppflags=no
12472 if test -n "$cf_new_cflags" ; then
12474 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12475 CFLAGS="${CFLAGS}$cf_new_cflags"
12479 if test -n "$cf_new_cppflags" ; then
12481 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12482 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12486 if test -n "$cf_new_extra_cppflags" ; then
12488 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12489 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12493 cf_add_libs="$cf_pkgconfig_libs"
12494 # Filter out duplicates - this happens with badly-designed ".pc" files...
12495 for cf_add_1lib in $LIBS
12497 for cf_add_2lib in $cf_add_libs
12499 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12505 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12507 LIBS="$cf_add_libs"
12509 LIBS="$cf_save_xmu"
12511 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12513 echo "${as_me:-configure}:12513: testing ...before $LIBS ..." 1>&5
12515 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
12516 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12518 echo "${as_me:-configure}:12518: testing ...after $LIBS ..." 1>&5
12524 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12526 echo "${as_me:-configure}:12526: testing ...before $LIBS ..." 1>&5
12528 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
12529 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12531 echo "${as_me:-configure}:12531: testing ...after $LIBS ..." 1>&5
12535 for cf_trim_lib in Xmu Xt X11
12538 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
12539 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
12540 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
12542 echo "${as_me:-configure}:12542: testing ..trimmed $LIBS ..." 1>&5
12562 if test -z "$cf_x_athena_lib" ; then
12564 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
12565 test -n "$verbose" && echo " found package Xext" 1>&6
12567 echo "${as_me:-configure}:12567: testing found package Xext ..." 1>&5
12569 cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
12570 cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
12571 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
12573 echo "${as_me:-configure}:12573: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12575 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
12577 echo "${as_me:-configure}:12577: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
12582 cf_new_extra_cppflags=
12584 for cf_add_cflags in $cf_pkgconfig_incs
12586 case $cf_fix_cppflags in
12588 case $cf_add_cflags in
12589 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12590 case $cf_add_cflags in
12592 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12594 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12595 && test -z "${cf_tst_cflags}" \
12596 && cf_fix_cppflags=yes
12598 if test $cf_fix_cppflags = yes ; then
12600 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12601 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12604 elif test "${cf_tst_cflags}" = "\"'" ; then
12606 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12607 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12613 case "$CPPFLAGS" in
12617 case $cf_add_cflags in
12619 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12621 CPPFLAGS=`echo "$CPPFLAGS" | \
12622 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12623 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12628 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12629 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12636 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12637 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12644 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12645 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12647 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12649 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12650 && test -z "${cf_tst_cflags}" \
12651 && cf_fix_cppflags=no
12656 if test -n "$cf_new_cflags" ; then
12658 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12659 CFLAGS="${CFLAGS}$cf_new_cflags"
12663 if test -n "$cf_new_cppflags" ; then
12665 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12666 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12670 if test -n "$cf_new_extra_cppflags" ; then
12672 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12673 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12677 cf_add_libs="$cf_pkgconfig_libs"
12678 # Filter out duplicates - this happens with badly-designed ".pc" files...
12679 for cf_add_1lib in $LIBS
12681 for cf_add_2lib in $cf_add_libs
12683 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12689 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12691 LIBS="$cf_add_libs"
12698 echo "$as_me:12698: checking for XextCreateExtension in -lXext" >&5
12699 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
12700 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
12701 echo $ECHO_N "(cached) $ECHO_C" >&6
12703 ac_check_lib_save_LIBS=$LIBS
12704 LIBS="-lXext $LIBS"
12705 cat >conftest.$ac_ext <<_ACEOF
12706 #line 12706 "configure"
12707 #include "confdefs.h"
12709 /* Override any gcc2 internal prototype to avoid an error. */
12713 /* We use char because int might match the return type of a gcc2
12714 builtin and then its argument prototype would still apply. */
12715 char XextCreateExtension ();
12719 XextCreateExtension ();
12724 rm -f conftest.$ac_objext conftest$ac_exeext
12725 if { (eval echo "$as_me:12725: \"$ac_link\"") >&5
12726 (eval $ac_link) 2>&5
12728 echo "$as_me:12728: \$? = $ac_status" >&5
12729 (exit $ac_status); } &&
12730 { ac_try='test -s conftest$ac_exeext'
12731 { (eval echo "$as_me:12731: \"$ac_try\"") >&5
12732 (eval $ac_try) 2>&5
12734 echo "$as_me:12734: \$? = $ac_status" >&5
12735 (exit $ac_status); }; }; then
12736 ac_cv_lib_Xext_XextCreateExtension=yes
12738 echo "$as_me: failed program was:" >&5
12739 cat conftest.$ac_ext >&5
12740 ac_cv_lib_Xext_XextCreateExtension=no
12742 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12743 LIBS=$ac_check_lib_save_LIBS
12745 echo "$as_me:12745: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
12746 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
12747 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
12749 cf_add_libs="-lXext"
12750 # Filter out duplicates - this happens with badly-designed ".pc" files...
12751 for cf_add_1lib in $LIBS
12753 for cf_add_2lib in $cf_add_libs
12755 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12761 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12763 LIBS="$cf_add_libs"
12769 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
12770 # in some cases has installed dummy files in the former, other cases replaced
12771 # it with a link to the new location). This complicates the configure script.
12772 # Check for that pitfall, and recover using pkg-config
12774 # If none of these are set, the configuration is almost certainly broken.
12775 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
12778 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
12779 test -n "$verbose" && echo " found package x11" 1>&6
12781 echo "${as_me:-configure}:12781: testing found package x11 ..." 1>&5
12783 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
12784 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
12785 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
12787 echo "${as_me:-configure}:12787: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12789 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
12791 echo "${as_me:-configure}:12791: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
12796 cf_new_extra_cppflags=
12798 for cf_add_cflags in $cf_pkgconfig_incs
12800 case $cf_fix_cppflags in
12802 case $cf_add_cflags in
12803 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12804 case $cf_add_cflags in
12806 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12808 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12809 && test -z "${cf_tst_cflags}" \
12810 && cf_fix_cppflags=yes
12812 if test $cf_fix_cppflags = yes ; then
12814 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12815 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12818 elif test "${cf_tst_cflags}" = "\"'" ; then
12820 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12821 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12827 case "$CPPFLAGS" in
12831 case $cf_add_cflags in
12833 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12835 CPPFLAGS=`echo "$CPPFLAGS" | \
12836 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12837 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12842 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12843 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12850 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12851 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12858 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12859 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12861 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12863 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12864 && test -z "${cf_tst_cflags}" \
12865 && cf_fix_cppflags=no
12870 if test -n "$cf_new_cflags" ; then
12872 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12873 CFLAGS="${CFLAGS}$cf_new_cflags"
12877 if test -n "$cf_new_cppflags" ; then
12879 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12880 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12884 if test -n "$cf_new_extra_cppflags" ; then
12886 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12887 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12891 cf_add_libs="$cf_pkgconfig_libs"
12892 # Filter out duplicates - this happens with badly-designed ".pc" files...
12893 for cf_add_1lib in $LIBS
12895 for cf_add_2lib in $cf_add_libs
12897 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12903 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12905 LIBS="$cf_add_libs"
12911 { echo "$as_me:12911: WARNING: unable to find X11 library" >&5
12912 echo "$as_me: WARNING: unable to find X11 library" >&2;}
12915 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
12916 test -n "$verbose" && echo " found package ice" 1>&6
12918 echo "${as_me:-configure}:12918: testing found package ice ..." 1>&5
12920 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
12921 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
12922 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
12924 echo "${as_me:-configure}:12924: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12926 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
12928 echo "${as_me:-configure}:12928: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
12933 cf_new_extra_cppflags=
12935 for cf_add_cflags in $cf_pkgconfig_incs
12937 case $cf_fix_cppflags in
12939 case $cf_add_cflags in
12940 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12941 case $cf_add_cflags in
12943 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12945 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12946 && test -z "${cf_tst_cflags}" \
12947 && cf_fix_cppflags=yes
12949 if test $cf_fix_cppflags = yes ; then
12951 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12952 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12955 elif test "${cf_tst_cflags}" = "\"'" ; then
12957 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12958 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12964 case "$CPPFLAGS" in
12968 case $cf_add_cflags in
12970 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12972 CPPFLAGS=`echo "$CPPFLAGS" | \
12973 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12974 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12979 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12980 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12987 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12988 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12995 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12996 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12998 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13000 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13001 && test -z "${cf_tst_cflags}" \
13002 && cf_fix_cppflags=no
13007 if test -n "$cf_new_cflags" ; then
13009 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13010 CFLAGS="${CFLAGS}$cf_new_cflags"
13014 if test -n "$cf_new_cppflags" ; then
13016 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13017 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13021 if test -n "$cf_new_extra_cppflags" ; then
13023 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13024 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13028 cf_add_libs="$cf_pkgconfig_libs"
13029 # Filter out duplicates - this happens with badly-designed ".pc" files...
13030 for cf_add_1lib in $LIBS
13032 for cf_add_2lib in $cf_add_libs
13034 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13040 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13042 LIBS="$cf_add_libs"
13048 { echo "$as_me:13048: WARNING: unable to find ICE library" >&5
13049 echo "$as_me: WARNING: unable to find ICE library" >&2;}
13052 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
13053 test -n "$verbose" && echo " found package sm" 1>&6
13055 echo "${as_me:-configure}:13055: testing found package sm ..." 1>&5
13057 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
13058 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
13059 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
13061 echo "${as_me:-configure}:13061: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13063 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
13065 echo "${as_me:-configure}:13065: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
13070 cf_new_extra_cppflags=
13072 for cf_add_cflags in $cf_pkgconfig_incs
13074 case $cf_fix_cppflags in
13076 case $cf_add_cflags in
13077 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13078 case $cf_add_cflags in
13080 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13082 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13083 && test -z "${cf_tst_cflags}" \
13084 && cf_fix_cppflags=yes
13086 if test $cf_fix_cppflags = yes ; then
13088 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13089 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13092 elif test "${cf_tst_cflags}" = "\"'" ; then
13094 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13095 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13101 case "$CPPFLAGS" in
13105 case $cf_add_cflags in
13107 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13109 CPPFLAGS=`echo "$CPPFLAGS" | \
13110 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13111 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13116 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13117 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13124 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13125 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13132 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13133 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13135 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13137 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13138 && test -z "${cf_tst_cflags}" \
13139 && cf_fix_cppflags=no
13144 if test -n "$cf_new_cflags" ; then
13146 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13147 CFLAGS="${CFLAGS}$cf_new_cflags"
13151 if test -n "$cf_new_cppflags" ; then
13153 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13154 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13158 if test -n "$cf_new_extra_cppflags" ; then
13160 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13161 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13165 cf_add_libs="$cf_pkgconfig_libs"
13166 # Filter out duplicates - this happens with badly-designed ".pc" files...
13167 for cf_add_1lib in $LIBS
13169 for cf_add_2lib in $cf_add_libs
13171 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13177 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13179 LIBS="$cf_add_libs"
13185 { echo "$as_me:13185: WARNING: unable to find SM library" >&5
13186 echo "$as_me: WARNING: unable to find SM library" >&2;}
13189 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
13190 test -n "$verbose" && echo " found package xt" 1>&6
13192 echo "${as_me:-configure}:13192: testing found package xt ..." 1>&5
13194 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
13195 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
13196 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13198 echo "${as_me:-configure}:13198: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13200 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
13202 echo "${as_me:-configure}:13202: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13207 cf_new_extra_cppflags=
13209 for cf_add_cflags in $cf_pkgconfig_incs
13211 case $cf_fix_cppflags in
13213 case $cf_add_cflags in
13214 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13215 case $cf_add_cflags in
13217 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13219 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13220 && test -z "${cf_tst_cflags}" \
13221 && cf_fix_cppflags=yes
13223 if test $cf_fix_cppflags = yes ; then
13225 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13226 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13229 elif test "${cf_tst_cflags}" = "\"'" ; then
13231 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13232 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13238 case "$CPPFLAGS" in
13242 case $cf_add_cflags in
13244 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13246 CPPFLAGS=`echo "$CPPFLAGS" | \
13247 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13248 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13253 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13254 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13261 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13262 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13269 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13270 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13272 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13274 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13275 && test -z "${cf_tst_cflags}" \
13276 && cf_fix_cppflags=no
13281 if test -n "$cf_new_cflags" ; then
13283 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13284 CFLAGS="${CFLAGS}$cf_new_cflags"
13288 if test -n "$cf_new_cppflags" ; then
13290 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13291 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13295 if test -n "$cf_new_extra_cppflags" ; then
13297 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13298 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13302 cf_add_libs="$cf_pkgconfig_libs"
13303 # Filter out duplicates - this happens with badly-designed ".pc" files...
13304 for cf_add_1lib in $LIBS
13306 for cf_add_2lib in $cf_add_libs
13308 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13314 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13316 LIBS="$cf_add_libs"
13322 { echo "$as_me:13322: WARNING: unable to find Xt library" >&5
13323 echo "$as_me: WARNING: unable to find Xt library" >&2;}
13330 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
13331 test -n "$verbose" && echo " found package xt" 1>&6
13333 echo "${as_me:-configure}:13333: testing found package xt ..." 1>&5
13335 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
13336 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
13337 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13339 echo "${as_me:-configure}:13339: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13341 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
13343 echo "${as_me:-configure}:13343: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13348 cf_new_extra_cppflags=
13350 for cf_add_cflags in $cf_pkgconfig_incs
13352 case $cf_fix_cppflags in
13354 case $cf_add_cflags in
13355 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13356 case $cf_add_cflags in
13358 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13360 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13361 && test -z "${cf_tst_cflags}" \
13362 && cf_fix_cppflags=yes
13364 if test $cf_fix_cppflags = yes ; then
13366 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13367 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13370 elif test "${cf_tst_cflags}" = "\"'" ; then
13372 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13373 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13379 case "$CPPFLAGS" in
13383 case $cf_add_cflags in
13385 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13387 CPPFLAGS=`echo "$CPPFLAGS" | \
13388 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13389 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13394 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13395 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13402 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13403 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13410 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13411 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13413 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13415 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13416 && test -z "${cf_tst_cflags}" \
13417 && cf_fix_cppflags=no
13422 if test -n "$cf_new_cflags" ; then
13424 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13425 CFLAGS="${CFLAGS}$cf_new_cflags"
13429 if test -n "$cf_new_cppflags" ; then
13431 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13432 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13436 if test -n "$cf_new_extra_cppflags" ; then
13438 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13439 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13443 cf_add_libs="$cf_pkgconfig_libs"
13444 # Filter out duplicates - this happens with badly-designed ".pc" files...
13445 for cf_add_1lib in $LIBS
13447 for cf_add_2lib in $cf_add_libs
13449 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13455 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13457 LIBS="$cf_add_libs"
13463 # we have an "xt" package, but it may omit Xt's dependency on X11
13464 echo "$as_me:13464: checking for usable X dependency" >&5
13465 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
13466 if test "${cf_cv_xt_x11_compat+set}" = set; then
13467 echo $ECHO_N "(cached) $ECHO_C" >&6
13470 cat >conftest.$ac_ext <<_ACEOF
13471 #line 13471 "configure"
13472 #include "confdefs.h"
13474 #include <X11/Xlib.h>
13480 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
13481 int rc2 = XClearWindow((Display*) 0, (Window) 0);
13482 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
13483 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
13489 rm -f conftest.$ac_objext conftest$ac_exeext
13490 if { (eval echo "$as_me:13490: \"$ac_link\"") >&5
13491 (eval $ac_link) 2>&5
13493 echo "$as_me:13493: \$? = $ac_status" >&5
13494 (exit $ac_status); } &&
13495 { ac_try='test -s conftest$ac_exeext'
13496 { (eval echo "$as_me:13496: \"$ac_try\"") >&5
13497 (eval $ac_try) 2>&5
13499 echo "$as_me:13499: \$? = $ac_status" >&5
13500 (exit $ac_status); }; }; then
13501 cf_cv_xt_x11_compat=yes
13503 echo "$as_me: failed program was:" >&5
13504 cat conftest.$ac_ext >&5
13505 cf_cv_xt_x11_compat=no
13507 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13509 echo "$as_me:13509: result: $cf_cv_xt_x11_compat" >&5
13510 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
13511 if test "$cf_cv_xt_x11_compat" = no
13513 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
13515 echo "${as_me:-configure}:13515: testing work around broken X11 dependency ..." 1>&5
13517 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
13519 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
13520 test -n "$verbose" && echo " found package x11" 1>&6
13522 echo "${as_me:-configure}:13522: testing found package x11 ..." 1>&5
13524 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
13525 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
13526 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
13528 echo "${as_me:-configure}:13528: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13530 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
13532 echo "${as_me:-configure}:13532: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
13537 cf_new_extra_cppflags=
13539 for cf_add_cflags in $cf_pkgconfig_incs
13541 case $cf_fix_cppflags in
13543 case $cf_add_cflags in
13544 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13545 case $cf_add_cflags in
13547 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13549 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13550 && test -z "${cf_tst_cflags}" \
13551 && cf_fix_cppflags=yes
13553 if test $cf_fix_cppflags = yes ; then
13555 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13556 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13559 elif test "${cf_tst_cflags}" = "\"'" ; then
13561 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13562 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13568 case "$CPPFLAGS" in
13572 case $cf_add_cflags in
13574 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13576 CPPFLAGS=`echo "$CPPFLAGS" | \
13577 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13578 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13583 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13584 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13591 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13592 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13599 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13600 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13602 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13604 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13605 && test -z "${cf_tst_cflags}" \
13606 && cf_fix_cppflags=no
13611 if test -n "$cf_new_cflags" ; then
13613 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13614 CFLAGS="${CFLAGS}$cf_new_cflags"
13618 if test -n "$cf_new_cppflags" ; then
13620 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13621 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13625 if test -n "$cf_new_extra_cppflags" ; then
13627 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13628 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13632 cf_add_libs="$cf_pkgconfig_libs"
13633 # Filter out duplicates - this happens with badly-designed ".pc" files...
13634 for cf_add_1lib in $LIBS
13636 for cf_add_2lib in $cf_add_libs
13638 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13644 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13646 LIBS="$cf_add_libs"
13653 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13655 echo "${as_me:-configure}:13655: testing ...before $LIBS ..." 1>&5
13657 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
13658 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13660 echo "${as_me:-configure}:13660: testing ...after $LIBS ..." 1>&5
13668 echo "$as_me:13668: checking for usable X Toolkit package" >&5
13669 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
13670 if test "${cf_cv_xt_ice_compat+set}" = set; then
13671 echo $ECHO_N "(cached) $ECHO_C" >&6
13674 cat >conftest.$ac_ext <<_ACEOF
13675 #line 13675 "configure"
13676 #include "confdefs.h"
13678 #include <X11/Shell.h>
13683 int num = IceConnectionNumber(0)
13689 rm -f conftest.$ac_objext conftest$ac_exeext
13690 if { (eval echo "$as_me:13690: \"$ac_link\"") >&5
13691 (eval $ac_link) 2>&5
13693 echo "$as_me:13693: \$? = $ac_status" >&5
13694 (exit $ac_status); } &&
13695 { ac_try='test -s conftest$ac_exeext'
13696 { (eval echo "$as_me:13696: \"$ac_try\"") >&5
13697 (eval $ac_try) 2>&5
13699 echo "$as_me:13699: \$? = $ac_status" >&5
13700 (exit $ac_status); }; }; then
13701 cf_cv_xt_ice_compat=yes
13703 echo "$as_me: failed program was:" >&5
13704 cat conftest.$ac_ext >&5
13705 cf_cv_xt_ice_compat=no
13707 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13709 echo "$as_me:13709: result: $cf_cv_xt_ice_compat" >&5
13710 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
13712 if test "$cf_cv_xt_ice_compat" = no
13714 # workaround for broken ".pc" files used for X Toolkit.
13715 case "x$X_PRE_LIBS" in
13721 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
13723 echo "${as_me:-configure}:13723: testing work around broken ICE dependency ..." 1>&5
13725 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
13726 test -n "$verbose" && echo " found package ice" 1>&6
13728 echo "${as_me:-configure}:13728: testing found package ice ..." 1>&5
13730 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
13731 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
13732 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
13734 echo "${as_me:-configure}:13734: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13736 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
13738 echo "${as_me:-configure}:13738: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
13743 cf_new_extra_cppflags=
13745 for cf_add_cflags in $cf_pkgconfig_incs
13747 case $cf_fix_cppflags in
13749 case $cf_add_cflags in
13750 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13751 case $cf_add_cflags in
13753 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13755 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13756 && test -z "${cf_tst_cflags}" \
13757 && cf_fix_cppflags=yes
13759 if test $cf_fix_cppflags = yes ; then
13761 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13762 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13765 elif test "${cf_tst_cflags}" = "\"'" ; then
13767 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13768 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13774 case "$CPPFLAGS" in
13778 case $cf_add_cflags in
13780 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13782 CPPFLAGS=`echo "$CPPFLAGS" | \
13783 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13784 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13789 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13790 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13797 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13798 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13805 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13806 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13808 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13810 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13811 && test -z "${cf_tst_cflags}" \
13812 && cf_fix_cppflags=no
13817 if test -n "$cf_new_cflags" ; then
13819 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13820 CFLAGS="${CFLAGS}$cf_new_cflags"
13824 if test -n "$cf_new_cppflags" ; then
13826 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13827 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13831 if test -n "$cf_new_extra_cppflags" ; then
13833 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13834 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13838 cf_add_libs="$cf_pkgconfig_libs"
13839 # Filter out duplicates - this happens with badly-designed ".pc" files...
13840 for cf_add_1lib in $LIBS
13842 for cf_add_2lib in $cf_add_libs
13844 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13850 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13852 LIBS="$cf_add_libs"
13854 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
13855 test -n "$verbose" && echo " found package sm" 1>&6
13857 echo "${as_me:-configure}:13857: testing found package sm ..." 1>&5
13859 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
13860 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
13861 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
13863 echo "${as_me:-configure}:13863: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13865 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
13867 echo "${as_me:-configure}:13867: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
13872 cf_new_extra_cppflags=
13874 for cf_add_cflags in $cf_pkgconfig_incs
13876 case $cf_fix_cppflags in
13878 case $cf_add_cflags in
13879 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13880 case $cf_add_cflags in
13882 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13884 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13885 && test -z "${cf_tst_cflags}" \
13886 && cf_fix_cppflags=yes
13888 if test $cf_fix_cppflags = yes ; then
13890 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13891 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13894 elif test "${cf_tst_cflags}" = "\"'" ; then
13896 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13897 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13903 case "$CPPFLAGS" in
13907 case $cf_add_cflags in
13909 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13911 CPPFLAGS=`echo "$CPPFLAGS" | \
13912 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13913 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13918 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13919 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13926 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13927 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13934 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13935 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13937 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13939 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13940 && test -z "${cf_tst_cflags}" \
13941 && cf_fix_cppflags=no
13946 if test -n "$cf_new_cflags" ; then
13948 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13949 CFLAGS="${CFLAGS}$cf_new_cflags"
13953 if test -n "$cf_new_cppflags" ; then
13955 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13956 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13960 if test -n "$cf_new_extra_cppflags" ; then
13962 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13963 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13967 cf_add_libs="$cf_pkgconfig_libs"
13968 # Filter out duplicates - this happens with badly-designed ".pc" files...
13969 for cf_add_1lib in $LIBS
13971 for cf_add_2lib in $cf_add_libs
13973 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13979 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13981 LIBS="$cf_add_libs"
13994 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13996 echo "${as_me:-configure}:13996: testing ...before $LIBS ..." 1>&5
13998 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
13999 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14001 echo "${as_me:-configure}:14001: testing ...after $LIBS ..." 1>&5
14017 LDFLAGS="$X_LIBS $LDFLAGS"
14019 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
14021 echo "${as_me:-configure}:14021: testing checking additions to CFLAGS ..." 1>&5
14023 cf_check_cflags="$CFLAGS"
14024 cf_check_cppflags="$CPPFLAGS"
14029 cf_new_extra_cppflags=
14031 for cf_add_cflags in $X_CFLAGS
14033 case $cf_fix_cppflags in
14035 case $cf_add_cflags in
14036 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14037 case $cf_add_cflags in
14039 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14041 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14042 && test -z "${cf_tst_cflags}" \
14043 && cf_fix_cppflags=yes
14045 if test $cf_fix_cppflags = yes ; then
14047 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14048 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14051 elif test "${cf_tst_cflags}" = "\"'" ; then
14053 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14054 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14060 case "$CPPFLAGS" in
14064 case $cf_add_cflags in
14066 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14068 CPPFLAGS=`echo "$CPPFLAGS" | \
14069 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14070 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14075 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14076 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14083 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14084 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14091 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14092 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14094 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14096 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14097 && test -z "${cf_tst_cflags}" \
14098 && cf_fix_cppflags=no
14103 if test -n "$cf_new_cflags" ; then
14104 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
14106 echo "${as_me:-configure}:14106: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
14108 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14109 CFLAGS="${CFLAGS}$cf_new_cflags"
14113 if test -n "$cf_new_cppflags" ; then
14114 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
14116 echo "${as_me:-configure}:14116: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
14118 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14119 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14123 if test -n "$cf_new_extra_cppflags" ; then
14124 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
14126 echo "${as_me:-configure}:14126: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
14128 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14129 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14133 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
14134 cat >conftest.$ac_ext <<_ACEOF
14135 #line 14135 "configure"
14136 #include "confdefs.h"
14141 printf("Hello world");
14146 rm -f conftest.$ac_objext conftest$ac_exeext
14147 if { (eval echo "$as_me:14147: \"$ac_link\"") >&5
14148 (eval $ac_link) 2>&5
14150 echo "$as_me:14150: \$? = $ac_status" >&5
14151 (exit $ac_status); } &&
14152 { ac_try='test -s conftest$ac_exeext'
14153 { (eval echo "$as_me:14153: \"$ac_try\"") >&5
14154 (eval $ac_try) 2>&5
14156 echo "$as_me:14156: \$? = $ac_status" >&5
14157 (exit $ac_status); }; }; then
14160 echo "$as_me: failed program was:" >&5
14161 cat conftest.$ac_ext >&5
14162 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
14164 echo "${as_me:-configure}:14164: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
14166 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
14167 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
14169 echo "${as_me:-configure}:14169: testing but keeping change to \$CPPFLAGS ..." 1>&5
14172 CFLAGS="$cf_check_flags"
14174 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14177 echo "$as_me:14177: checking for XOpenDisplay" >&5
14178 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
14179 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
14180 echo $ECHO_N "(cached) $ECHO_C" >&6
14182 cat >conftest.$ac_ext <<_ACEOF
14183 #line 14183 "configure"
14184 #include "confdefs.h"
14185 /* System header to define __stub macros and hopefully few prototypes,
14186 which can conflict with char XOpenDisplay (); below. */
14187 #include <assert.h>
14188 /* Override any gcc2 internal prototype to avoid an error. */
14192 /* We use char because int might match the return type of a gcc2
14193 builtin and then its argument prototype would still apply. */
14194 char XOpenDisplay ();
14200 /* The GNU C library defines this for functions which it implements
14201 to always fail with ENOSYS. Some functions are actually named
14202 something starting with __ and the normal name is an alias. */
14203 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
14206 f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14213 rm -f conftest.$ac_objext conftest$ac_exeext
14214 if { (eval echo "$as_me:14214: \"$ac_link\"") >&5
14215 (eval $ac_link) 2>&5
14217 echo "$as_me:14217: \$? = $ac_status" >&5
14218 (exit $ac_status); } &&
14219 { ac_try='test -s conftest$ac_exeext'
14220 { (eval echo "$as_me:14220: \"$ac_try\"") >&5
14221 (eval $ac_try) 2>&5
14223 echo "$as_me:14223: \$? = $ac_status" >&5
14224 (exit $ac_status); }; }; then
14225 ac_cv_func_XOpenDisplay=yes
14227 echo "$as_me: failed program was:" >&5
14228 cat conftest.$ac_ext >&5
14229 ac_cv_func_XOpenDisplay=no
14231 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14233 echo "$as_me:14233: result: $ac_cv_func_XOpenDisplay" >&5
14234 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
14235 if test $ac_cv_func_XOpenDisplay = yes; then
14239 echo "$as_me:14239: checking for XOpenDisplay in -lX11" >&5
14240 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
14241 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
14242 echo $ECHO_N "(cached) $ECHO_C" >&6
14244 ac_check_lib_save_LIBS=$LIBS
14245 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
14246 cat >conftest.$ac_ext <<_ACEOF
14247 #line 14247 "configure"
14248 #include "confdefs.h"
14250 /* Override any gcc2 internal prototype to avoid an error. */
14254 /* We use char because int might match the return type of a gcc2
14255 builtin and then its argument prototype would still apply. */
14256 char XOpenDisplay ();
14265 rm -f conftest.$ac_objext conftest$ac_exeext
14266 if { (eval echo "$as_me:14266: \"$ac_link\"") >&5
14267 (eval $ac_link) 2>&5
14269 echo "$as_me:14269: \$? = $ac_status" >&5
14270 (exit $ac_status); } &&
14271 { ac_try='test -s conftest$ac_exeext'
14272 { (eval echo "$as_me:14272: \"$ac_try\"") >&5
14273 (eval $ac_try) 2>&5
14275 echo "$as_me:14275: \$? = $ac_status" >&5
14276 (exit $ac_status); }; }; then
14277 ac_cv_lib_X11_XOpenDisplay=yes
14279 echo "$as_me: failed program was:" >&5
14280 cat conftest.$ac_ext >&5
14281 ac_cv_lib_X11_XOpenDisplay=no
14283 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14284 LIBS=$ac_check_lib_save_LIBS
14286 echo "$as_me:14286: result: $ac_cv_lib_X11_XOpenDisplay" >&5
14287 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
14288 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
14290 cf_add_libs="-lX11"
14291 # Filter out duplicates - this happens with badly-designed ".pc" files...
14292 for cf_add_1lib in $LIBS
14294 for cf_add_2lib in $cf_add_libs
14296 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14302 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14304 LIBS="$cf_add_libs"
14310 echo "$as_me:14310: checking for XtAppInitialize" >&5
14311 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
14312 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
14313 echo $ECHO_N "(cached) $ECHO_C" >&6
14315 cat >conftest.$ac_ext <<_ACEOF
14316 #line 14316 "configure"
14317 #include "confdefs.h"
14318 /* System header to define __stub macros and hopefully few prototypes,
14319 which can conflict with char XtAppInitialize (); below. */
14320 #include <assert.h>
14321 /* Override any gcc2 internal prototype to avoid an error. */
14325 /* We use char because int might match the return type of a gcc2
14326 builtin and then its argument prototype would still apply. */
14327 char XtAppInitialize ();
14333 /* The GNU C library defines this for functions which it implements
14334 to always fail with ENOSYS. Some functions are actually named
14335 something starting with __ and the normal name is an alias. */
14336 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
14339 f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14346 rm -f conftest.$ac_objext conftest$ac_exeext
14347 if { (eval echo "$as_me:14347: \"$ac_link\"") >&5
14348 (eval $ac_link) 2>&5
14350 echo "$as_me:14350: \$? = $ac_status" >&5
14351 (exit $ac_status); } &&
14352 { ac_try='test -s conftest$ac_exeext'
14353 { (eval echo "$as_me:14353: \"$ac_try\"") >&5
14354 (eval $ac_try) 2>&5
14356 echo "$as_me:14356: \$? = $ac_status" >&5
14357 (exit $ac_status); }; }; then
14358 ac_cv_func_XtAppInitialize=yes
14360 echo "$as_me: failed program was:" >&5
14361 cat conftest.$ac_ext >&5
14362 ac_cv_func_XtAppInitialize=no
14364 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14366 echo "$as_me:14366: result: $ac_cv_func_XtAppInitialize" >&5
14367 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
14368 if test $ac_cv_func_XtAppInitialize = yes; then
14372 echo "$as_me:14372: checking for XtAppInitialize in -lXt" >&5
14373 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
14374 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
14375 echo $ECHO_N "(cached) $ECHO_C" >&6
14377 ac_check_lib_save_LIBS=$LIBS
14378 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
14379 cat >conftest.$ac_ext <<_ACEOF
14380 #line 14380 "configure"
14381 #include "confdefs.h"
14383 /* Override any gcc2 internal prototype to avoid an error. */
14387 /* We use char because int might match the return type of a gcc2
14388 builtin and then its argument prototype would still apply. */
14389 char XtAppInitialize ();
14393 XtAppInitialize ();
14398 rm -f conftest.$ac_objext conftest$ac_exeext
14399 if { (eval echo "$as_me:14399: \"$ac_link\"") >&5
14400 (eval $ac_link) 2>&5
14402 echo "$as_me:14402: \$? = $ac_status" >&5
14403 (exit $ac_status); } &&
14404 { ac_try='test -s conftest$ac_exeext'
14405 { (eval echo "$as_me:14405: \"$ac_try\"") >&5
14406 (eval $ac_try) 2>&5
14408 echo "$as_me:14408: \$? = $ac_status" >&5
14409 (exit $ac_status); }; }; then
14410 ac_cv_lib_Xt_XtAppInitialize=yes
14412 echo "$as_me: failed program was:" >&5
14413 cat conftest.$ac_ext >&5
14414 ac_cv_lib_Xt_XtAppInitialize=no
14416 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14417 LIBS=$ac_check_lib_save_LIBS
14419 echo "$as_me:14419: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
14420 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
14421 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
14423 cat >>confdefs.h <<\EOF
14424 #define HAVE_LIBXT 1
14428 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
14435 if test $cf_have_X_LIBS = no ; then
14436 { echo "$as_me:14436: WARNING: Unable to successfully link X Toolkit library (-lXt) with
14437 test program. You will have to check and add the proper libraries by hand
14439 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
14440 test program. You will have to check and add the proper libraries by hand
14441 to makefile." >&2;}
14444 cf_x_athena_root=$cf_x_athena
14447 for cf_path in default \
14448 /usr/contrib/X11R6 \
14449 /usr/contrib/X11R5 \
14453 if test -z "$cf_x_athena_inc" ; then
14454 cf_save="$CPPFLAGS"
14455 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
14456 if test $cf_path != default ; then
14457 CPPFLAGS="$cf_save"
14459 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14460 CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
14462 echo "$as_me:14462: checking for $cf_test in $cf_path" >&5
14463 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
14465 echo "$as_me:14465: checking for $cf_test" >&5
14466 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
14468 cat >conftest.$ac_ext <<_ACEOF
14469 #line 14469 "configure"
14470 #include "confdefs.h"
14472 #include <X11/Intrinsic.h>
14473 #include <$cf_test>
14482 rm -f conftest.$ac_objext
14483 if { (eval echo "$as_me:14483: \"$ac_compile\"") >&5
14484 (eval $ac_compile) 2>&5
14486 echo "$as_me:14486: \$? = $ac_status" >&5
14487 (exit $ac_status); } &&
14488 { ac_try='test -s conftest.$ac_objext'
14489 { (eval echo "$as_me:14489: \"$ac_try\"") >&5
14490 (eval $ac_try) 2>&5
14492 echo "$as_me:14492: \$? = $ac_status" >&5
14493 (exit $ac_status); }; }; then
14496 echo "$as_me: failed program was:" >&5
14497 cat conftest.$ac_ext >&5
14500 rm -f conftest.$ac_objext conftest.$ac_ext
14501 echo "$as_me:14501: result: $cf_result" >&5
14502 echo "${ECHO_T}$cf_result" >&6
14503 if test "$cf_result" = yes ; then
14504 cf_x_athena_inc=$cf_path
14507 CPPFLAGS="$cf_save"
14512 if test -z "$cf_x_athena_inc" ; then
14513 { echo "$as_me:14513: WARNING: Unable to successfully find Athena header files with test program" >&5
14514 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
14515 elif test "$cf_x_athena_inc" != default ; then
14517 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14518 CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
14522 cf_x_athena_root=$cf_x_athena
14525 for cf_path in default \
14526 /usr/contrib/X11R6 \
14527 /usr/contrib/X11R5 \
14532 ${cf_x_athena_root} \
14533 ${cf_x_athena_root}7 \
14534 ${cf_x_athena_root}6
14537 "-l$cf_lib -lXmu" \
14538 "-l$cf_lib -lXpm -lXmu" \
14539 "-l${cf_lib}_s -lXmu_s"
14541 if test -z "$cf_x_athena_lib" ; then
14543 cf_test=XawSimpleMenuAddGlobalActions
14544 if test $cf_path != default ; then
14546 cf_add_libs="-L$cf_path/lib $cf_libs"
14547 # Filter out duplicates - this happens with badly-designed ".pc" files...
14548 for cf_add_1lib in $LIBS
14550 for cf_add_2lib in $cf_add_libs
14552 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14558 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14560 LIBS="$cf_add_libs"
14562 echo "$as_me:14562: checking for $cf_libs in $cf_path" >&5
14563 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
14566 cf_add_libs="$cf_libs"
14567 # Filter out duplicates - this happens with badly-designed ".pc" files...
14568 for cf_add_1lib in $LIBS
14570 for cf_add_2lib in $cf_add_libs
14572 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14578 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14580 LIBS="$cf_add_libs"
14582 echo "$as_me:14582: checking for $cf_test in $cf_libs" >&5
14583 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
14585 cat >conftest.$ac_ext <<_ACEOF
14586 #line 14586 "configure"
14587 #include "confdefs.h"
14589 #include <X11/Intrinsic.h>
14590 #include <X11/$cf_x_athena_root/SimpleMenu.h>
14596 $cf_test((XtAppContext) 0)
14601 rm -f conftest.$ac_objext conftest$ac_exeext
14602 if { (eval echo "$as_me:14602: \"$ac_link\"") >&5
14603 (eval $ac_link) 2>&5
14605 echo "$as_me:14605: \$? = $ac_status" >&5
14606 (exit $ac_status); } &&
14607 { ac_try='test -s conftest$ac_exeext'
14608 { (eval echo "$as_me:14608: \"$ac_try\"") >&5
14609 (eval $ac_try) 2>&5
14611 echo "$as_me:14611: \$? = $ac_status" >&5
14612 (exit $ac_status); }; }; then
14615 echo "$as_me: failed program was:" >&5
14616 cat conftest.$ac_ext >&5
14619 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14620 echo "$as_me:14620: result: $cf_result" >&5
14621 echo "${ECHO_T}$cf_result" >&6
14622 if test "$cf_result" = yes ; then
14623 cf_x_athena_lib="$cf_libs"
14629 test -n "$cf_x_athena_lib" && break
14633 if test -z "$cf_x_athena_lib" ; then
14634 { { echo "$as_me:14634: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
14635 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
14636 { (exit 1); exit 1; }; }
14639 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14641 cat >>confdefs.h <<EOF
14642 #define $cf_x_athena_LIBS 1
14647 if test -n "$ac_tool_prefix"; then
14648 for ac_prog in xcurses-config
14650 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
14651 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
14652 echo "$as_me:14652: checking for $ac_word" >&5
14653 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14654 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
14655 echo $ECHO_N "(cached) $ECHO_C" >&6
14657 if test -n "$XCURSES_CONFIG"; then
14658 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
14660 ac_save_IFS=$IFS; IFS=$ac_path_separator
14662 for ac_dir in $ac_dummy; do
14664 test -z "$ac_dir" && ac_dir=.
14665 $as_executable_p "$ac_dir/$ac_word" || continue
14666 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
14667 echo "$as_me:14667: found $ac_dir/$ac_word" >&5
14673 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
14674 if test -n "$XCURSES_CONFIG"; then
14675 echo "$as_me:14675: result: $XCURSES_CONFIG" >&5
14676 echo "${ECHO_T}$XCURSES_CONFIG" >&6
14678 echo "$as_me:14678: result: no" >&5
14679 echo "${ECHO_T}no" >&6
14682 test -n "$XCURSES_CONFIG" && break
14685 if test -z "$XCURSES_CONFIG"; then
14686 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
14687 for ac_prog in xcurses-config
14689 # Extract the first word of "$ac_prog", so it can be a program name with args.
14690 set dummy $ac_prog; ac_word=$2
14691 echo "$as_me:14691: checking for $ac_word" >&5
14692 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14693 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
14694 echo $ECHO_N "(cached) $ECHO_C" >&6
14696 if test -n "$ac_ct_XCURSES_CONFIG"; then
14697 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
14699 ac_save_IFS=$IFS; IFS=$ac_path_separator
14701 for ac_dir in $ac_dummy; do
14703 test -z "$ac_dir" && ac_dir=.
14704 $as_executable_p "$ac_dir/$ac_word" || continue
14705 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
14706 echo "$as_me:14706: found $ac_dir/$ac_word" >&5
14712 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
14713 if test -n "$ac_ct_XCURSES_CONFIG"; then
14714 echo "$as_me:14714: result: $ac_ct_XCURSES_CONFIG" >&5
14715 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
14717 echo "$as_me:14717: result: no" >&5
14718 echo "${ECHO_T}no" >&6
14721 test -n "$ac_ct_XCURSES_CONFIG" && break
14723 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
14725 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
14728 if test "$XCURSES_CONFIG" != none ; then
14733 cf_new_extra_cppflags=
14735 for cf_add_cflags in `$XCURSES_CONFIG --cflags`
14737 case $cf_fix_cppflags in
14739 case $cf_add_cflags in
14740 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14741 case $cf_add_cflags in
14743 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14745 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14746 && test -z "${cf_tst_cflags}" \
14747 && cf_fix_cppflags=yes
14749 if test $cf_fix_cppflags = yes ; then
14751 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14752 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14755 elif test "${cf_tst_cflags}" = "\"'" ; then
14757 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14758 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14764 case "$CPPFLAGS" in
14768 case $cf_add_cflags in
14770 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14772 CPPFLAGS=`echo "$CPPFLAGS" | \
14773 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14774 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14779 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14780 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14787 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14788 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14795 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14796 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14798 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14800 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14801 && test -z "${cf_tst_cflags}" \
14802 && cf_fix_cppflags=no
14807 if test -n "$cf_new_cflags" ; then
14809 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14810 CFLAGS="${CFLAGS}$cf_new_cflags"
14814 if test -n "$cf_new_cppflags" ; then
14816 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14817 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14821 if test -n "$cf_new_extra_cppflags" ; then
14823 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14824 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14828 cf_add_libs="`$XCURSES_CONFIG --libs`"
14829 # Filter out duplicates - this happens with badly-designed ".pc" files...
14830 for cf_add_1lib in $LIBS
14832 for cf_add_2lib in $cf_add_libs
14834 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14840 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14842 LIBS="$cf_add_libs"
14844 cf_cv_lib_XCurses=yes
14848 LDFLAGS="$LDFLAGS $X_LIBS"
14850 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
14852 echo "${as_me:-configure}:14852: testing checking additions to CFLAGS ..." 1>&5
14854 cf_check_cflags="$CFLAGS"
14855 cf_check_cppflags="$CPPFLAGS"
14860 cf_new_extra_cppflags=
14862 for cf_add_cflags in $X_CFLAGS
14864 case $cf_fix_cppflags in
14866 case $cf_add_cflags in
14867 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14868 case $cf_add_cflags in
14870 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14872 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14873 && test -z "${cf_tst_cflags}" \
14874 && cf_fix_cppflags=yes
14876 if test $cf_fix_cppflags = yes ; then
14878 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14879 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14882 elif test "${cf_tst_cflags}" = "\"'" ; then
14884 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14885 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14891 case "$CPPFLAGS" in
14895 case $cf_add_cflags in
14897 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14899 CPPFLAGS=`echo "$CPPFLAGS" | \
14900 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14901 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14906 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14907 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14914 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14915 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14922 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14923 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14925 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14927 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14928 && test -z "${cf_tst_cflags}" \
14929 && cf_fix_cppflags=no
14934 if test -n "$cf_new_cflags" ; then
14935 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
14937 echo "${as_me:-configure}:14937: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
14939 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14940 CFLAGS="${CFLAGS}$cf_new_cflags"
14944 if test -n "$cf_new_cppflags" ; then
14945 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
14947 echo "${as_me:-configure}:14947: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
14949 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14950 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14954 if test -n "$cf_new_extra_cppflags" ; then
14955 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
14957 echo "${as_me:-configure}:14957: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
14959 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14960 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14964 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
14965 cat >conftest.$ac_ext <<_ACEOF
14966 #line 14966 "configure"
14967 #include "confdefs.h"
14972 printf("Hello world");
14977 rm -f conftest.$ac_objext conftest$ac_exeext
14978 if { (eval echo "$as_me:14978: \"$ac_link\"") >&5
14979 (eval $ac_link) 2>&5
14981 echo "$as_me:14981: \$? = $ac_status" >&5
14982 (exit $ac_status); } &&
14983 { ac_try='test -s conftest$ac_exeext'
14984 { (eval echo "$as_me:14984: \"$ac_try\"") >&5
14985 (eval $ac_try) 2>&5
14987 echo "$as_me:14987: \$? = $ac_status" >&5
14988 (exit $ac_status); }; }; then
14991 echo "$as_me: failed program was:" >&5
14992 cat conftest.$ac_ext >&5
14993 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
14995 echo "${as_me:-configure}:14995: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
14997 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
14998 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
15000 echo "${as_me:-configure}:15000: testing but keeping change to \$CPPFLAGS ..." 1>&5
15003 CFLAGS="$cf_check_flags"
15005 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15008 echo "$as_me:15008: checking for XOpenDisplay in -lX11" >&5
15009 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
15010 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
15011 echo $ECHO_N "(cached) $ECHO_C" >&6
15013 ac_check_lib_save_LIBS=$LIBS
15014 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
15015 cat >conftest.$ac_ext <<_ACEOF
15016 #line 15016 "configure"
15017 #include "confdefs.h"
15019 /* Override any gcc2 internal prototype to avoid an error. */
15023 /* We use char because int might match the return type of a gcc2
15024 builtin and then its argument prototype would still apply. */
15025 char XOpenDisplay ();
15034 rm -f conftest.$ac_objext conftest$ac_exeext
15035 if { (eval echo "$as_me:15035: \"$ac_link\"") >&5
15036 (eval $ac_link) 2>&5
15038 echo "$as_me:15038: \$? = $ac_status" >&5
15039 (exit $ac_status); } &&
15040 { ac_try='test -s conftest$ac_exeext'
15041 { (eval echo "$as_me:15041: \"$ac_try\"") >&5
15042 (eval $ac_try) 2>&5
15044 echo "$as_me:15044: \$? = $ac_status" >&5
15045 (exit $ac_status); }; }; then
15046 ac_cv_lib_X11_XOpenDisplay=yes
15048 echo "$as_me: failed program was:" >&5
15049 cat conftest.$ac_ext >&5
15050 ac_cv_lib_X11_XOpenDisplay=no
15052 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15053 LIBS=$ac_check_lib_save_LIBS
15055 echo "$as_me:15055: result: $ac_cv_lib_X11_XOpenDisplay" >&5
15056 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
15057 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
15059 cf_add_libs="-lX11"
15060 # Filter out duplicates - this happens with badly-designed ".pc" files...
15061 for cf_add_1lib in $LIBS
15063 for cf_add_2lib in $cf_add_libs
15065 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15071 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15073 LIBS="$cf_add_libs"
15077 echo "$as_me:15077: checking for XCurses library" >&5
15078 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
15079 if test "${cf_cv_lib_XCurses+set}" = set; then
15080 echo $ECHO_N "(cached) $ECHO_C" >&6
15083 cf_add_libs="-lXCurses"
15084 # Filter out duplicates - this happens with badly-designed ".pc" files...
15085 for cf_add_1lib in $LIBS
15087 for cf_add_2lib in $cf_add_libs
15089 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15095 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15097 LIBS="$cf_add_libs"
15099 cat >conftest.$ac_ext <<_ACEOF
15100 #line 15100 "configure"
15101 #include "confdefs.h"
15103 #include <xcurses.h>
15104 char *XCursesProgramName = "test";
15114 rm -f conftest.$ac_objext conftest$ac_exeext
15115 if { (eval echo "$as_me:15115: \"$ac_link\"") >&5
15116 (eval $ac_link) 2>&5
15118 echo "$as_me:15118: \$? = $ac_status" >&5
15119 (exit $ac_status); } &&
15120 { ac_try='test -s conftest$ac_exeext'
15121 { (eval echo "$as_me:15121: \"$ac_try\"") >&5
15122 (eval $ac_try) 2>&5
15124 echo "$as_me:15124: \$? = $ac_status" >&5
15125 (exit $ac_status); }; }; then
15126 cf_cv_lib_XCurses=yes
15128 echo "$as_me: failed program was:" >&5
15129 cat conftest.$ac_ext >&5
15130 cf_cv_lib_XCurses=no
15132 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15135 echo "$as_me:15135: result: $cf_cv_lib_XCurses" >&5
15136 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
15140 if test $cf_cv_lib_XCurses = yes ; then
15142 cat >>confdefs.h <<\EOF
15146 cat >>confdefs.h <<\EOF
15150 echo "$as_me:15150: checking for xcurses.h" >&5
15151 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
15152 if test "${ac_cv_header_xcurses_h+set}" = set; then
15153 echo $ECHO_N "(cached) $ECHO_C" >&6
15155 cat >conftest.$ac_ext <<_ACEOF
15156 #line 15156 "configure"
15157 #include "confdefs.h"
15158 #include <xcurses.h>
15160 if { (eval echo "$as_me:15160: \"$ac_cpp conftest.$ac_ext\"") >&5
15161 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15163 egrep -v '^ *\+' conftest.er1 >conftest.err
15165 cat conftest.err >&5
15166 echo "$as_me:15166: \$? = $ac_status" >&5
15167 (exit $ac_status); } >/dev/null; then
15168 if test -s conftest.err; then
15169 ac_cpp_err=$ac_c_preproc_warn_flag
15176 if test -z "$ac_cpp_err"; then
15177 ac_cv_header_xcurses_h=yes
15179 echo "$as_me: failed program was:" >&5
15180 cat conftest.$ac_ext >&5
15181 ac_cv_header_xcurses_h=no
15183 rm -f conftest.err conftest.$ac_ext
15185 echo "$as_me:15185: result: $ac_cv_header_xcurses_h" >&5
15186 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
15187 if test $ac_cv_header_xcurses_h = yes; then
15189 cat >>confdefs.h <<\EOF
15190 #define HAVE_XCURSES 1
15196 { { echo "$as_me:15196: error: Cannot link with XCurses" >&5
15197 echo "$as_me: error: Cannot link with XCurses" >&2;}
15198 { (exit 1); exit 1; }; }
15203 { { echo "$as_me:15203: error: unexpected screen-value: $cf_cv_screen" >&5
15204 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
15205 { (exit 1); exit 1; }; }
15209 : ${cf_nculib_root:=$cf_cv_screen}
15210 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
15211 echo "$as_me:15211: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
15212 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
15213 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15214 echo $ECHO_N "(cached) $ECHO_C" >&6
15216 ac_check_lib_save_LIBS=$LIBS
15217 LIBS="-l$cf_nculib_root $LIBS"
15218 cat >conftest.$ac_ext <<_ACEOF
15219 #line 15219 "configure"
15220 #include "confdefs.h"
15222 /* Override any gcc2 internal prototype to avoid an error. */
15226 /* We use char because int might match the return type of a gcc2
15227 builtin and then its argument prototype would still apply. */
15228 char _nc_init_pthreads ();
15232 _nc_init_pthreads ();
15237 rm -f conftest.$ac_objext conftest$ac_exeext
15238 if { (eval echo "$as_me:15238: \"$ac_link\"") >&5
15239 (eval $ac_link) 2>&5
15241 echo "$as_me:15241: \$? = $ac_status" >&5
15242 (exit $ac_status); } &&
15243 { ac_try='test -s conftest$ac_exeext'
15244 { (eval echo "$as_me:15244: \"$ac_try\"") >&5
15245 (eval $ac_try) 2>&5
15247 echo "$as_me:15247: \$? = $ac_status" >&5
15248 (exit $ac_status); }; }; then
15249 eval "$as_ac_Lib=yes"
15251 echo "$as_me: failed program was:" >&5
15252 cat conftest.$ac_ext >&5
15253 eval "$as_ac_Lib=no"
15255 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15256 LIBS=$ac_check_lib_save_LIBS
15258 echo "$as_me:15258: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15259 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15260 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15261 cf_cv_ncurses_pthreads=yes
15263 cf_cv_ncurses_pthreads=no
15266 if test "$cf_cv_ncurses_pthreads" = yes
15269 cf_add_libs="-lpthread"
15270 # Filter out duplicates - this happens with badly-designed ".pc" files...
15271 for cf_add_1lib in $LIBS
15273 for cf_add_2lib in $cf_add_libs
15275 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15281 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15283 LIBS="$cf_add_libs"
15287 case $cf_cv_screen in
15289 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
15293 echo "$as_me:15293: checking for X11 rgb file" >&5
15294 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
15296 # Check whether --with-x11-rgb or --without-x11-rgb was given.
15297 if test "${with_x11_rgb+set}" = set; then
15298 withval="$with_x11_rgb"
15304 if test "x$RGB_PATH" = xauto
15306 RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
15308 /opt/local/share/X11/rgb.txt \
15309 /opt/X11/share/X11/rgb.txt \
15310 /usr/share/X11/rgb.txt \
15311 /usr/X11/share/X11/rgb.txt \
15312 /usr/X11/lib/X11/rgb.txt \
15313 /usr/lib/X11/rgb.txt \
15315 /usr/pkg/lib/X11/rgb.txt \
15316 /usr/X11R7/lib/X11/rgb.txt \
15317 /usr/X11R6/lib/X11/rgb.txt \
15318 /usr/X11R5/lib/X11/rgb.txt \
15319 /usr/X11R4/lib/X11/rgb.txt \
15320 /usr/local/lib/X11/rgb.txt \
15321 /usr/local/share/X11/rgb.txt \
15322 /usr/lib64/X11/rgb.txt
15324 if test -f "$cf_path" ; then
15325 RGB_PATH="$cf_path"
15332 if test "x$prefix" != xNONE; then
15333 cf_path_syntax="$prefix"
15335 cf_path_syntax="$ac_default_prefix"
15338 case ".$cf_path" in
15339 (.\$\(*\)*|.\'*\'*)
15343 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
15345 (.\${*prefix}*|.\${*dir}*)
15346 eval cf_path="$cf_path"
15347 case ".$cf_path" in
15349 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
15354 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
15357 { { echo "$as_me:15357: error: expected a pathname, not \"$cf_path\"" >&5
15358 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
15359 { (exit 1); exit 1; }; }
15365 echo "$as_me:15365: result: $RGB_PATH" >&5
15366 echo "${ECHO_T}$RGB_PATH" >&6
15368 cat >>confdefs.h <<EOF
15369 #define RGB_PATH "$cf_path"
15373 if test "$RGB_PATH" = no
15380 case $cf_cv_screen in
15382 cf_default_panel=no
15385 cf_default_tinfo=no
15387 (xcurses|bsdcurses)
15388 cf_default_panel=no
15391 cf_default_tinfo=yes
15394 cf_default_panel=yes
15395 cf_default_form=yes
15396 cf_default_menu=yes
15397 cf_default_tinfo=yes
15398 case $cf_cv_screen in
15400 cf_curses_headers="nc_alloc.h nomacros.h term_entry.h"
15406 echo "$as_me:15406: checking if you want to check for panel functions" >&5
15407 echo $ECHO_N "checking if you want to check for panel functions... $ECHO_C" >&6
15409 # Check whether --enable-panel or --disable-panel was given.
15410 if test "${enable_panel+set}" = set; then
15411 enableval="$enable_panel"
15412 test "$enableval" != no && enableval=yes
15413 if test "$enableval" != "yes" ; then
15416 cf_enable_panel=$cf_default_panel
15420 cf_enable_panel=$cf_default_panel
15423 echo "$as_me:15423: result: $cf_enable_panel" >&5
15424 echo "${ECHO_T}$cf_enable_panel" >&6
15425 if test $cf_enable_panel = yes
15428 cf_have_curses_lib=no
15430 : ${NCURSES_CONFIG_PKG:=none}
15431 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
15433 elif test "x${PKG_CONFIG:=none}" != xnone; then
15434 echo "$as_me:15434: checking pkg-config for panel$cf_cv_libtype" >&5
15435 echo $ECHO_N "checking pkg-config for panel$cf_cv_libtype... $ECHO_C" >&6
15436 if "$PKG_CONFIG" --exists panel$cf_cv_libtype ; then
15437 echo "$as_me:15437: result: yes" >&5
15438 echo "${ECHO_T}yes" >&6
15440 echo "$as_me:15440: checking if the panel$cf_cv_libtype package files work" >&5
15441 echo $ECHO_N "checking if the panel$cf_cv_libtype package files work... $ECHO_C" >&6
15443 cf_save_CPPFLAGS="$CPPFLAGS"
15444 cf_save_LIBS="$LIBS"
15449 cf_new_extra_cppflags=
15451 for cf_add_cflags in `$PKG_CONFIG --cflags panel$cf_cv_libtype`
15453 case $cf_fix_cppflags in
15455 case $cf_add_cflags in
15456 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15457 case $cf_add_cflags in
15459 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15461 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15462 && test -z "${cf_tst_cflags}" \
15463 && cf_fix_cppflags=yes
15465 if test $cf_fix_cppflags = yes ; then
15467 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15468 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15471 elif test "${cf_tst_cflags}" = "\"'" ; then
15473 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15474 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15480 case "$CPPFLAGS" in
15484 case $cf_add_cflags in
15486 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15488 CPPFLAGS=`echo "$CPPFLAGS" | \
15489 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15490 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15495 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15496 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15503 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15504 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15511 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15512 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15514 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15516 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15517 && test -z "${cf_tst_cflags}" \
15518 && cf_fix_cppflags=no
15523 if test -n "$cf_new_cflags" ; then
15525 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15526 CFLAGS="${CFLAGS}$cf_new_cflags"
15530 if test -n "$cf_new_cppflags" ; then
15532 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15533 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15537 if test -n "$cf_new_extra_cppflags" ; then
15539 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15540 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15544 cf_add_libs="`$PKG_CONFIG --libs panel$cf_cv_libtype`"
15545 # Filter out duplicates - this happens with badly-designed ".pc" files...
15546 for cf_add_1lib in $LIBS
15548 for cf_add_2lib in $cf_add_libs
15550 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15556 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15558 LIBS="$cf_add_libs"
15560 cat >conftest.$ac_ext <<_ACEOF
15561 #line 15561 "configure"
15562 #include "confdefs.h"
15567 (void) new_panel ( 0 );
15572 rm -f conftest.$ac_objext conftest$ac_exeext
15573 if { (eval echo "$as_me:15573: \"$ac_link\"") >&5
15574 (eval $ac_link) 2>&5
15576 echo "$as_me:15576: \$? = $ac_status" >&5
15577 (exit $ac_status); } &&
15578 { ac_try='test -s conftest$ac_exeext'
15579 { (eval echo "$as_me:15579: \"$ac_try\"") >&5
15580 (eval $ac_try) 2>&5
15582 echo "$as_me:15582: \$? = $ac_status" >&5
15583 (exit $ac_status); }; }; then
15584 if test "$cross_compiling" = yes; then
15585 cf_have_curses_lib=maybe
15587 cat >conftest.$ac_ext <<_ACEOF
15588 #line 15588 "configure"
15589 #include "confdefs.h"
15592 { (void) new_panel ( 0 ); return 0; }
15594 rm -f conftest$ac_exeext
15595 if { (eval echo "$as_me:15595: \"$ac_link\"") >&5
15596 (eval $ac_link) 2>&5
15598 echo "$as_me:15598: \$? = $ac_status" >&5
15599 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15600 { (eval echo "$as_me:15600: \"$ac_try\"") >&5
15601 (eval $ac_try) 2>&5
15603 echo "$as_me:15603: \$? = $ac_status" >&5
15604 (exit $ac_status); }; }; then
15605 cf_have_curses_lib=yes
15607 echo "$as_me: program exited with status $ac_status" >&5
15608 echo "$as_me: failed program was:" >&5
15609 cat conftest.$ac_ext >&5
15610 cf_have_curses_lib=no
15612 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15615 echo "$as_me: failed program was:" >&5
15616 cat conftest.$ac_ext >&5
15617 cf_have_curses_lib=no
15619 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15620 echo "$as_me:15620: result: $cf_have_curses_lib" >&5
15621 echo "${ECHO_T}$cf_have_curses_lib" >&6
15622 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
15623 if test "$cf_have_curses_lib" != "yes"
15625 CPPFLAGS="$cf_save_CPPFLAGS"
15626 LIBS="$cf_save_LIBS"
15629 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15631 cat >>confdefs.h <<EOF
15632 #define $cf_upper 1
15638 if test "$cf_have_curses_lib" = no; then
15639 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
15640 echo "$as_me:15640: checking for new_panel in -lpanel$cf_cv_libtype" >&5
15641 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
15642 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15643 echo $ECHO_N "(cached) $ECHO_C" >&6
15645 ac_check_lib_save_LIBS=$LIBS
15646 LIBS="-lpanel$cf_cv_libtype $LIBS"
15647 cat >conftest.$ac_ext <<_ACEOF
15648 #line 15648 "configure"
15649 #include "confdefs.h"
15651 /* Override any gcc2 internal prototype to avoid an error. */
15655 /* We use char because int might match the return type of a gcc2
15656 builtin and then its argument prototype would still apply. */
15666 rm -f conftest.$ac_objext conftest$ac_exeext
15667 if { (eval echo "$as_me:15667: \"$ac_link\"") >&5
15668 (eval $ac_link) 2>&5
15670 echo "$as_me:15670: \$? = $ac_status" >&5
15671 (exit $ac_status); } &&
15672 { ac_try='test -s conftest$ac_exeext'
15673 { (eval echo "$as_me:15673: \"$ac_try\"") >&5
15674 (eval $ac_try) 2>&5
15676 echo "$as_me:15676: \$? = $ac_status" >&5
15677 (exit $ac_status); }; }; then
15678 eval "$as_ac_Lib=yes"
15680 echo "$as_me: failed program was:" >&5
15681 cat conftest.$ac_ext >&5
15682 eval "$as_ac_Lib=no"
15684 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15685 LIBS=$ac_check_lib_save_LIBS
15687 echo "$as_me:15687: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15688 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15689 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15691 cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15693 cf_add_libs="-lpanel$cf_cv_libtype"
15694 # Filter out duplicates - this happens with badly-designed ".pc" files...
15695 for cf_add_1lib in $LIBS
15697 for cf_add_2lib in $cf_add_libs
15699 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15705 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15707 LIBS="$cf_add_libs"
15709 cat >>confdefs.h <<EOF
15710 #define $cf_upper 1
15717 cf_curses_headers="$cf_curses_headers panel.h"
15720 echo "$as_me:15720: checking if you want to check for menu functions" >&5
15721 echo $ECHO_N "checking if you want to check for menu functions... $ECHO_C" >&6
15723 # Check whether --enable-menu or --disable-menu was given.
15724 if test "${enable_menu+set}" = set; then
15725 enableval="$enable_menu"
15726 test "$enableval" != no && enableval=yes
15727 if test "$enableval" != "yes" ; then
15730 cf_enable_menu=$cf_default_menu
15734 cf_enable_menu=$cf_default_menu
15737 echo "$as_me:15737: result: $cf_enable_menu" >&5
15738 echo "${ECHO_T}$cf_enable_menu" >&6
15739 if test $cf_enable_menu = yes
15741 case $cf_cv_screen in
15746 echo "$as_me:15746: checking for NetBSD menu.h" >&5
15747 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
15748 if test "${cf_cv_netbsd_menu_h+set}" = set; then
15749 echo $ECHO_N "(cached) $ECHO_C" >&6
15752 cat >conftest.$ac_ext <<_ACEOF
15753 #line 15753 "configure"
15754 #include "confdefs.h"
15756 #include <${cf_cv_ncurses_header:-curses.h}>
15764 int y = menu->max_item_width;
15770 rm -f conftest.$ac_objext
15771 if { (eval echo "$as_me:15771: \"$ac_compile\"") >&5
15772 (eval $ac_compile) 2>&5
15774 echo "$as_me:15774: \$? = $ac_status" >&5
15775 (exit $ac_status); } &&
15776 { ac_try='test -s conftest.$ac_objext'
15777 { (eval echo "$as_me:15777: \"$ac_try\"") >&5
15778 (eval $ac_try) 2>&5
15780 echo "$as_me:15780: \$? = $ac_status" >&5
15781 (exit $ac_status); }; }; then
15782 cf_cv_netbsd_menu_h=yes
15785 echo "$as_me: failed program was:" >&5
15786 cat conftest.$ac_ext >&5
15787 cf_cv_netbsd_menu_h=no
15789 rm -f conftest.$ac_objext conftest.$ac_ext
15792 echo "$as_me:15792: result: $cf_cv_netbsd_menu_h" >&5
15793 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
15795 test "$cf_cv_netbsd_menu_h" = yes &&
15796 cat >>confdefs.h <<\EOF
15797 #define HAVE_NETBSD_MENU_H 1
15803 cf_have_curses_lib=no
15805 : ${NCURSES_CONFIG_PKG:=none}
15806 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
15808 elif test "x${PKG_CONFIG:=none}" != xnone; then
15809 echo "$as_me:15809: checking pkg-config for menu$cf_cv_libtype" >&5
15810 echo $ECHO_N "checking pkg-config for menu$cf_cv_libtype... $ECHO_C" >&6
15811 if "$PKG_CONFIG" --exists menu$cf_cv_libtype ; then
15812 echo "$as_me:15812: result: yes" >&5
15813 echo "${ECHO_T}yes" >&6
15815 echo "$as_me:15815: checking if the menu$cf_cv_libtype package files work" >&5
15816 echo $ECHO_N "checking if the menu$cf_cv_libtype package files work... $ECHO_C" >&6
15818 cf_save_CPPFLAGS="$CPPFLAGS"
15819 cf_save_LIBS="$LIBS"
15824 cf_new_extra_cppflags=
15826 for cf_add_cflags in `$PKG_CONFIG --cflags menu$cf_cv_libtype`
15828 case $cf_fix_cppflags in
15830 case $cf_add_cflags in
15831 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15832 case $cf_add_cflags in
15834 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15836 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15837 && test -z "${cf_tst_cflags}" \
15838 && cf_fix_cppflags=yes
15840 if test $cf_fix_cppflags = yes ; then
15842 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15843 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15846 elif test "${cf_tst_cflags}" = "\"'" ; then
15848 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15849 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15855 case "$CPPFLAGS" in
15859 case $cf_add_cflags in
15861 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15863 CPPFLAGS=`echo "$CPPFLAGS" | \
15864 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15865 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15870 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15871 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15878 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15879 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15886 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15887 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15889 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15891 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15892 && test -z "${cf_tst_cflags}" \
15893 && cf_fix_cppflags=no
15898 if test -n "$cf_new_cflags" ; then
15900 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15901 CFLAGS="${CFLAGS}$cf_new_cflags"
15905 if test -n "$cf_new_cppflags" ; then
15907 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15908 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15912 if test -n "$cf_new_extra_cppflags" ; then
15914 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15915 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15919 cf_add_libs="`$PKG_CONFIG --libs menu$cf_cv_libtype`"
15920 # Filter out duplicates - this happens with badly-designed ".pc" files...
15921 for cf_add_1lib in $LIBS
15923 for cf_add_2lib in $cf_add_libs
15925 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15931 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15933 LIBS="$cf_add_libs"
15935 cat >conftest.$ac_ext <<_ACEOF
15936 #line 15936 "configure"
15937 #include "confdefs.h"
15942 (void) menu_driver ( 0,0 );
15947 rm -f conftest.$ac_objext conftest$ac_exeext
15948 if { (eval echo "$as_me:15948: \"$ac_link\"") >&5
15949 (eval $ac_link) 2>&5
15951 echo "$as_me:15951: \$? = $ac_status" >&5
15952 (exit $ac_status); } &&
15953 { ac_try='test -s conftest$ac_exeext'
15954 { (eval echo "$as_me:15954: \"$ac_try\"") >&5
15955 (eval $ac_try) 2>&5
15957 echo "$as_me:15957: \$? = $ac_status" >&5
15958 (exit $ac_status); }; }; then
15959 if test "$cross_compiling" = yes; then
15960 cf_have_curses_lib=maybe
15962 cat >conftest.$ac_ext <<_ACEOF
15963 #line 15963 "configure"
15964 #include "confdefs.h"
15967 { (void) menu_driver ( 0,0 ); return 0; }
15969 rm -f conftest$ac_exeext
15970 if { (eval echo "$as_me:15970: \"$ac_link\"") >&5
15971 (eval $ac_link) 2>&5
15973 echo "$as_me:15973: \$? = $ac_status" >&5
15974 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15975 { (eval echo "$as_me:15975: \"$ac_try\"") >&5
15976 (eval $ac_try) 2>&5
15978 echo "$as_me:15978: \$? = $ac_status" >&5
15979 (exit $ac_status); }; }; then
15980 cf_have_curses_lib=yes
15982 echo "$as_me: program exited with status $ac_status" >&5
15983 echo "$as_me: failed program was:" >&5
15984 cat conftest.$ac_ext >&5
15985 cf_have_curses_lib=no
15987 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15990 echo "$as_me: failed program was:" >&5
15991 cat conftest.$ac_ext >&5
15992 cf_have_curses_lib=no
15994 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15995 echo "$as_me:15995: result: $cf_have_curses_lib" >&5
15996 echo "${ECHO_T}$cf_have_curses_lib" >&6
15997 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
15998 if test "$cf_have_curses_lib" != "yes"
16000 CPPFLAGS="$cf_save_CPPFLAGS"
16001 LIBS="$cf_save_LIBS"
16004 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16006 cat >>confdefs.h <<EOF
16007 #define $cf_upper 1
16013 if test "$cf_have_curses_lib" = no; then
16014 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
16015 echo "$as_me:16015: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
16016 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
16017 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16018 echo $ECHO_N "(cached) $ECHO_C" >&6
16020 ac_check_lib_save_LIBS=$LIBS
16021 LIBS="-lmenu$cf_cv_libtype $LIBS"
16022 cat >conftest.$ac_ext <<_ACEOF
16023 #line 16023 "configure"
16024 #include "confdefs.h"
16026 /* Override any gcc2 internal prototype to avoid an error. */
16030 /* We use char because int might match the return type of a gcc2
16031 builtin and then its argument prototype would still apply. */
16032 char menu_driver ();
16041 rm -f conftest.$ac_objext conftest$ac_exeext
16042 if { (eval echo "$as_me:16042: \"$ac_link\"") >&5
16043 (eval $ac_link) 2>&5
16045 echo "$as_me:16045: \$? = $ac_status" >&5
16046 (exit $ac_status); } &&
16047 { ac_try='test -s conftest$ac_exeext'
16048 { (eval echo "$as_me:16048: \"$ac_try\"") >&5
16049 (eval $ac_try) 2>&5
16051 echo "$as_me:16051: \$? = $ac_status" >&5
16052 (exit $ac_status); }; }; then
16053 eval "$as_ac_Lib=yes"
16055 echo "$as_me: failed program was:" >&5
16056 cat conftest.$ac_ext >&5
16057 eval "$as_ac_Lib=no"
16059 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16060 LIBS=$ac_check_lib_save_LIBS
16062 echo "$as_me:16062: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16063 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16064 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16066 cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16068 cf_add_libs="-lmenu$cf_cv_libtype"
16069 # Filter out duplicates - this happens with badly-designed ".pc" files...
16070 for cf_add_1lib in $LIBS
16072 for cf_add_2lib in $cf_add_libs
16074 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16080 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16082 LIBS="$cf_add_libs"
16084 cat >>confdefs.h <<EOF
16085 #define $cf_upper 1
16092 cf_curses_headers="$cf_curses_headers menu.h"
16095 echo "$as_me:16095: checking if you want to check for form functions" >&5
16096 echo $ECHO_N "checking if you want to check for form functions... $ECHO_C" >&6
16098 # Check whether --enable-form or --disable-form was given.
16099 if test "${enable_form+set}" = set; then
16100 enableval="$enable_form"
16101 test "$enableval" != no && enableval=yes
16102 if test "$enableval" != "yes" ; then
16105 cf_enable_form=$cf_default_form
16109 cf_enable_form=$cf_default_form
16112 echo "$as_me:16112: result: $cf_enable_form" >&5
16113 echo "${ECHO_T}$cf_enable_form" >&6
16114 if test $cf_enable_form = yes
16116 case $cf_cv_screen in
16121 echo "$as_me:16121: checking for NetBSD form.h" >&5
16122 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
16123 if test "${cf_cv_netbsd_form_h+set}" = set; then
16124 echo $ECHO_N "(cached) $ECHO_C" >&6
16127 cat >conftest.$ac_ext <<_ACEOF
16128 #line 16128 "configure"
16129 #include "confdefs.h"
16131 #include <${cf_cv_ncurses_header:-curses.h}>
16139 int y = current_field(form)->cursor_ypos;
16140 int x = current_field(form)->cursor_xpos;
16146 rm -f conftest.$ac_objext
16147 if { (eval echo "$as_me:16147: \"$ac_compile\"") >&5
16148 (eval $ac_compile) 2>&5
16150 echo "$as_me:16150: \$? = $ac_status" >&5
16151 (exit $ac_status); } &&
16152 { ac_try='test -s conftest.$ac_objext'
16153 { (eval echo "$as_me:16153: \"$ac_try\"") >&5
16154 (eval $ac_try) 2>&5
16156 echo "$as_me:16156: \$? = $ac_status" >&5
16157 (exit $ac_status); }; }; then
16158 cf_cv_netbsd_form_h=yes
16161 echo "$as_me: failed program was:" >&5
16162 cat conftest.$ac_ext >&5
16163 cf_cv_netbsd_form_h=no
16165 rm -f conftest.$ac_objext conftest.$ac_ext
16168 echo "$as_me:16168: result: $cf_cv_netbsd_form_h" >&5
16169 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
16171 test "$cf_cv_netbsd_form_h" = yes &&
16172 cat >>confdefs.h <<\EOF
16173 #define HAVE_NETBSD_FORM_H 1
16179 cf_have_curses_lib=no
16181 : ${NCURSES_CONFIG_PKG:=none}
16182 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16184 elif test "x${PKG_CONFIG:=none}" != xnone; then
16185 echo "$as_me:16185: checking pkg-config for form$cf_cv_libtype" >&5
16186 echo $ECHO_N "checking pkg-config for form$cf_cv_libtype... $ECHO_C" >&6
16187 if "$PKG_CONFIG" --exists form$cf_cv_libtype ; then
16188 echo "$as_me:16188: result: yes" >&5
16189 echo "${ECHO_T}yes" >&6
16191 echo "$as_me:16191: checking if the form$cf_cv_libtype package files work" >&5
16192 echo $ECHO_N "checking if the form$cf_cv_libtype package files work... $ECHO_C" >&6
16194 cf_save_CPPFLAGS="$CPPFLAGS"
16195 cf_save_LIBS="$LIBS"
16200 cf_new_extra_cppflags=
16202 for cf_add_cflags in `$PKG_CONFIG --cflags form$cf_cv_libtype`
16204 case $cf_fix_cppflags in
16206 case $cf_add_cflags in
16207 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16208 case $cf_add_cflags in
16210 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16212 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16213 && test -z "${cf_tst_cflags}" \
16214 && cf_fix_cppflags=yes
16216 if test $cf_fix_cppflags = yes ; then
16218 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16219 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16222 elif test "${cf_tst_cflags}" = "\"'" ; then
16224 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16225 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16231 case "$CPPFLAGS" in
16235 case $cf_add_cflags in
16237 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16239 CPPFLAGS=`echo "$CPPFLAGS" | \
16240 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16241 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16246 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16247 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16254 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16255 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16262 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16263 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16265 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16267 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16268 && test -z "${cf_tst_cflags}" \
16269 && cf_fix_cppflags=no
16274 if test -n "$cf_new_cflags" ; then
16276 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16277 CFLAGS="${CFLAGS}$cf_new_cflags"
16281 if test -n "$cf_new_cppflags" ; then
16283 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16284 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16288 if test -n "$cf_new_extra_cppflags" ; then
16290 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16291 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16295 cf_add_libs="`$PKG_CONFIG --libs form$cf_cv_libtype`"
16296 # Filter out duplicates - this happens with badly-designed ".pc" files...
16297 for cf_add_1lib in $LIBS
16299 for cf_add_2lib in $cf_add_libs
16301 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16307 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16309 LIBS="$cf_add_libs"
16311 cat >conftest.$ac_ext <<_ACEOF
16312 #line 16312 "configure"
16313 #include "confdefs.h"
16318 (void) form_driver ( 0,0 );
16323 rm -f conftest.$ac_objext conftest$ac_exeext
16324 if { (eval echo "$as_me:16324: \"$ac_link\"") >&5
16325 (eval $ac_link) 2>&5
16327 echo "$as_me:16327: \$? = $ac_status" >&5
16328 (exit $ac_status); } &&
16329 { ac_try='test -s conftest$ac_exeext'
16330 { (eval echo "$as_me:16330: \"$ac_try\"") >&5
16331 (eval $ac_try) 2>&5
16333 echo "$as_me:16333: \$? = $ac_status" >&5
16334 (exit $ac_status); }; }; then
16335 if test "$cross_compiling" = yes; then
16336 cf_have_curses_lib=maybe
16338 cat >conftest.$ac_ext <<_ACEOF
16339 #line 16339 "configure"
16340 #include "confdefs.h"
16343 { (void) form_driver ( 0,0 ); return 0; }
16345 rm -f conftest$ac_exeext
16346 if { (eval echo "$as_me:16346: \"$ac_link\"") >&5
16347 (eval $ac_link) 2>&5
16349 echo "$as_me:16349: \$? = $ac_status" >&5
16350 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16351 { (eval echo "$as_me:16351: \"$ac_try\"") >&5
16352 (eval $ac_try) 2>&5
16354 echo "$as_me:16354: \$? = $ac_status" >&5
16355 (exit $ac_status); }; }; then
16356 cf_have_curses_lib=yes
16358 echo "$as_me: program exited with status $ac_status" >&5
16359 echo "$as_me: failed program was:" >&5
16360 cat conftest.$ac_ext >&5
16361 cf_have_curses_lib=no
16363 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16366 echo "$as_me: failed program was:" >&5
16367 cat conftest.$ac_ext >&5
16368 cf_have_curses_lib=no
16370 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16371 echo "$as_me:16371: result: $cf_have_curses_lib" >&5
16372 echo "${ECHO_T}$cf_have_curses_lib" >&6
16373 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
16374 if test "$cf_have_curses_lib" != "yes"
16376 CPPFLAGS="$cf_save_CPPFLAGS"
16377 LIBS="$cf_save_LIBS"
16380 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16382 cat >>confdefs.h <<EOF
16383 #define $cf_upper 1
16389 if test "$cf_have_curses_lib" = no; then
16390 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
16391 echo "$as_me:16391: checking for form_driver in -lform$cf_cv_libtype" >&5
16392 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
16393 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16394 echo $ECHO_N "(cached) $ECHO_C" >&6
16396 ac_check_lib_save_LIBS=$LIBS
16397 LIBS="-lform$cf_cv_libtype $LIBS"
16398 cat >conftest.$ac_ext <<_ACEOF
16399 #line 16399 "configure"
16400 #include "confdefs.h"
16402 /* Override any gcc2 internal prototype to avoid an error. */
16406 /* We use char because int might match the return type of a gcc2
16407 builtin and then its argument prototype would still apply. */
16408 char form_driver ();
16417 rm -f conftest.$ac_objext conftest$ac_exeext
16418 if { (eval echo "$as_me:16418: \"$ac_link\"") >&5
16419 (eval $ac_link) 2>&5
16421 echo "$as_me:16421: \$? = $ac_status" >&5
16422 (exit $ac_status); } &&
16423 { ac_try='test -s conftest$ac_exeext'
16424 { (eval echo "$as_me:16424: \"$ac_try\"") >&5
16425 (eval $ac_try) 2>&5
16427 echo "$as_me:16427: \$? = $ac_status" >&5
16428 (exit $ac_status); }; }; then
16429 eval "$as_ac_Lib=yes"
16431 echo "$as_me: failed program was:" >&5
16432 cat conftest.$ac_ext >&5
16433 eval "$as_ac_Lib=no"
16435 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16436 LIBS=$ac_check_lib_save_LIBS
16438 echo "$as_me:16438: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16439 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16440 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16442 cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16444 cf_add_libs="-lform$cf_cv_libtype"
16445 # Filter out duplicates - this happens with badly-designed ".pc" files...
16446 for cf_add_1lib in $LIBS
16448 for cf_add_2lib in $cf_add_libs
16450 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16456 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16458 LIBS="$cf_add_libs"
16460 cat >>confdefs.h <<EOF
16461 #define $cf_upper 1
16468 cf_curses_headers="$cf_curses_headers form.h"
16471 # look for curses-related headers
16473 for ac_header in $cf_curses_headers
16475 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16476 echo "$as_me:16476: checking for $ac_header" >&5
16477 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16478 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16479 echo $ECHO_N "(cached) $ECHO_C" >&6
16481 cat >conftest.$ac_ext <<_ACEOF
16482 #line 16482 "configure"
16483 #include "confdefs.h"
16484 #include <$ac_header>
16486 if { (eval echo "$as_me:16486: \"$ac_cpp conftest.$ac_ext\"") >&5
16487 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16489 egrep -v '^ *\+' conftest.er1 >conftest.err
16491 cat conftest.err >&5
16492 echo "$as_me:16492: \$? = $ac_status" >&5
16493 (exit $ac_status); } >/dev/null; then
16494 if test -s conftest.err; then
16495 ac_cpp_err=$ac_c_preproc_warn_flag
16502 if test -z "$ac_cpp_err"; then
16503 eval "$as_ac_Header=yes"
16505 echo "$as_me: failed program was:" >&5
16506 cat conftest.$ac_ext >&5
16507 eval "$as_ac_Header=no"
16509 rm -f conftest.err conftest.$ac_ext
16511 echo "$as_me:16511: result: `eval echo '${'$as_ac_Header'}'`" >&5
16512 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16513 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16514 cat >>confdefs.h <<EOF
16515 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16521 echo "$as_me:16521: checking for ANSI C header files" >&5
16522 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16523 if test "${ac_cv_header_stdc+set}" = set; then
16524 echo $ECHO_N "(cached) $ECHO_C" >&6
16526 cat >conftest.$ac_ext <<_ACEOF
16527 #line 16527 "configure"
16528 #include "confdefs.h"
16529 #include <stdlib.h>
16530 #include <stdarg.h>
16531 #include <string.h>
16535 if { (eval echo "$as_me:16535: \"$ac_cpp conftest.$ac_ext\"") >&5
16536 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16538 egrep -v '^ *\+' conftest.er1 >conftest.err
16540 cat conftest.err >&5
16541 echo "$as_me:16541: \$? = $ac_status" >&5
16542 (exit $ac_status); } >/dev/null; then
16543 if test -s conftest.err; then
16544 ac_cpp_err=$ac_c_preproc_warn_flag
16551 if test -z "$ac_cpp_err"; then
16552 ac_cv_header_stdc=yes
16554 echo "$as_me: failed program was:" >&5
16555 cat conftest.$ac_ext >&5
16556 ac_cv_header_stdc=no
16558 rm -f conftest.err conftest.$ac_ext
16560 if test $ac_cv_header_stdc = yes; then
16561 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16562 cat >conftest.$ac_ext <<_ACEOF
16563 #line 16563 "configure"
16564 #include "confdefs.h"
16565 #include <string.h>
16568 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16569 egrep "memchr" >/dev/null 2>&1; then
16572 ac_cv_header_stdc=no
16578 if test $ac_cv_header_stdc = yes; then
16579 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16580 cat >conftest.$ac_ext <<_ACEOF
16581 #line 16581 "configure"
16582 #include "confdefs.h"
16583 #include <stdlib.h>
16586 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16587 egrep "free" >/dev/null 2>&1; then
16590 ac_cv_header_stdc=no
16596 if test $ac_cv_header_stdc = yes; then
16597 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16598 if test "$cross_compiling" = yes; then
16601 cat >conftest.$ac_ext <<_ACEOF
16602 #line 16602 "configure"
16603 #include "confdefs.h"
16605 #if ((' ' & 0x0FF) == 0x020)
16606 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16607 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16609 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16610 || ('j' <= (c) && (c) <= 'r') \
16611 || ('s' <= (c) && (c) <= 'z'))
16612 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16615 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16620 for (i = 0; i < 256; i++)
16621 if (XOR (islower (i), ISLOWER (i))
16622 || toupper (i) != TOUPPER (i))
16623 $ac_main_return(2);
16624 $ac_main_return (0);
16627 rm -f conftest$ac_exeext
16628 if { (eval echo "$as_me:16628: \"$ac_link\"") >&5
16629 (eval $ac_link) 2>&5
16631 echo "$as_me:16631: \$? = $ac_status" >&5
16632 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16633 { (eval echo "$as_me:16633: \"$ac_try\"") >&5
16634 (eval $ac_try) 2>&5
16636 echo "$as_me:16636: \$? = $ac_status" >&5
16637 (exit $ac_status); }; }; then
16640 echo "$as_me: program exited with status $ac_status" >&5
16641 echo "$as_me: failed program was:" >&5
16642 cat conftest.$ac_ext >&5
16643 ac_cv_header_stdc=no
16645 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16649 echo "$as_me:16649: result: $ac_cv_header_stdc" >&5
16650 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16651 if test $ac_cv_header_stdc = yes; then
16653 cat >>confdefs.h <<\EOF
16654 #define STDC_HEADERS 1
16659 echo "$as_me:16659: checking whether time.h and sys/time.h may both be included" >&5
16660 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16661 if test "${ac_cv_header_time+set}" = set; then
16662 echo $ECHO_N "(cached) $ECHO_C" >&6
16664 cat >conftest.$ac_ext <<_ACEOF
16665 #line 16665 "configure"
16666 #include "confdefs.h"
16667 #include <sys/types.h>
16668 #include <sys/time.h>
16674 if ((struct tm *) 0)
16680 rm -f conftest.$ac_objext
16681 if { (eval echo "$as_me:16681: \"$ac_compile\"") >&5
16682 (eval $ac_compile) 2>&5
16684 echo "$as_me:16684: \$? = $ac_status" >&5
16685 (exit $ac_status); } &&
16686 { ac_try='test -s conftest.$ac_objext'
16687 { (eval echo "$as_me:16687: \"$ac_try\"") >&5
16688 (eval $ac_try) 2>&5
16690 echo "$as_me:16690: \$? = $ac_status" >&5
16691 (exit $ac_status); }; }; then
16692 ac_cv_header_time=yes
16694 echo "$as_me: failed program was:" >&5
16695 cat conftest.$ac_ext >&5
16696 ac_cv_header_time=no
16698 rm -f conftest.$ac_objext conftest.$ac_ext
16700 echo "$as_me:16700: result: $ac_cv_header_time" >&5
16701 echo "${ECHO_T}$ac_cv_header_time" >&6
16702 if test $ac_cv_header_time = yes; then
16704 cat >>confdefs.h <<\EOF
16705 #define TIME_WITH_SYS_TIME 1
16723 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16724 echo "$as_me:16724: checking for $ac_header" >&5
16725 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16726 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16727 echo $ECHO_N "(cached) $ECHO_C" >&6
16729 cat >conftest.$ac_ext <<_ACEOF
16730 #line 16730 "configure"
16731 #include "confdefs.h"
16732 #include <$ac_header>
16734 if { (eval echo "$as_me:16734: \"$ac_cpp conftest.$ac_ext\"") >&5
16735 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16737 egrep -v '^ *\+' conftest.er1 >conftest.err
16739 cat conftest.err >&5
16740 echo "$as_me:16740: \$? = $ac_status" >&5
16741 (exit $ac_status); } >/dev/null; then
16742 if test -s conftest.err; then
16743 ac_cpp_err=$ac_c_preproc_warn_flag
16750 if test -z "$ac_cpp_err"; then
16751 eval "$as_ac_Header=yes"
16753 echo "$as_me: failed program was:" >&5
16754 cat conftest.$ac_ext >&5
16755 eval "$as_ac_Header=no"
16757 rm -f conftest.err conftest.$ac_ext
16759 echo "$as_me:16759: result: `eval echo '${'$as_ac_Header'}'`" >&5
16760 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16761 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16762 cat >>confdefs.h <<EOF
16763 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16769 for ac_header in unistd.h getopt.h
16771 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16772 echo "$as_me:16772: checking for $ac_header" >&5
16773 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16774 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16775 echo $ECHO_N "(cached) $ECHO_C" >&6
16777 cat >conftest.$ac_ext <<_ACEOF
16778 #line 16778 "configure"
16779 #include "confdefs.h"
16780 #include <$ac_header>
16782 if { (eval echo "$as_me:16782: \"$ac_cpp conftest.$ac_ext\"") >&5
16783 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16785 egrep -v '^ *\+' conftest.er1 >conftest.err
16787 cat conftest.err >&5
16788 echo "$as_me:16788: \$? = $ac_status" >&5
16789 (exit $ac_status); } >/dev/null; then
16790 if test -s conftest.err; then
16791 ac_cpp_err=$ac_c_preproc_warn_flag
16798 if test -z "$ac_cpp_err"; then
16799 eval "$as_ac_Header=yes"
16801 echo "$as_me: failed program was:" >&5
16802 cat conftest.$ac_ext >&5
16803 eval "$as_ac_Header=no"
16805 rm -f conftest.err conftest.$ac_ext
16807 echo "$as_me:16807: result: `eval echo '${'$as_ac_Header'}'`" >&5
16808 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16809 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16810 cat >>confdefs.h <<EOF
16811 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16817 echo "$as_me:16817: checking for header declaring getopt variables" >&5
16818 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
16819 if test "${cf_cv_getopt_header+set}" = set; then
16820 echo $ECHO_N "(cached) $ECHO_C" >&6
16823 cf_cv_getopt_header=none
16824 for cf_header in stdio.h stdlib.h unistd.h getopt.h
16826 cat >conftest.$ac_ext <<_ACEOF
16827 #line 16827 "configure"
16828 #include "confdefs.h"
16830 #include <$cf_header>
16834 int x = optind; char *y = optarg
16839 rm -f conftest.$ac_objext
16840 if { (eval echo "$as_me:16840: \"$ac_compile\"") >&5
16841 (eval $ac_compile) 2>&5
16843 echo "$as_me:16843: \$? = $ac_status" >&5
16844 (exit $ac_status); } &&
16845 { ac_try='test -s conftest.$ac_objext'
16846 { (eval echo "$as_me:16846: \"$ac_try\"") >&5
16847 (eval $ac_try) 2>&5
16849 echo "$as_me:16849: \$? = $ac_status" >&5
16850 (exit $ac_status); }; }; then
16851 cf_cv_getopt_header=$cf_header
16854 echo "$as_me: failed program was:" >&5
16855 cat conftest.$ac_ext >&5
16857 rm -f conftest.$ac_objext conftest.$ac_ext
16861 echo "$as_me:16861: result: $cf_cv_getopt_header" >&5
16862 echo "${ECHO_T}$cf_cv_getopt_header" >&6
16863 if test $cf_cv_getopt_header != none ; then
16865 cat >>confdefs.h <<\EOF
16866 #define HAVE_GETOPT_HEADER 1
16870 if test $cf_cv_getopt_header = getopt.h ; then
16872 cat >>confdefs.h <<\EOF
16873 #define NEED_GETOPT_H 1
16885 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16886 echo "$as_me:16886: checking for $ac_func" >&5
16887 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16888 if eval "test \"\${$as_ac_var+set}\" = set"; then
16889 echo $ECHO_N "(cached) $ECHO_C" >&6
16891 cat >conftest.$ac_ext <<_ACEOF
16892 #line 16892 "configure"
16893 #include "confdefs.h"
16894 /* System header to define __stub macros and hopefully few prototypes,
16895 which can conflict with char $ac_func (); below. */
16896 #include <assert.h>
16897 /* Override any gcc2 internal prototype to avoid an error. */
16901 /* We use char because int might match the return type of a gcc2
16902 builtin and then its argument prototype would still apply. */
16909 /* The GNU C library defines this for functions which it implements
16910 to always fail with ENOSYS. Some functions are actually named
16911 something starting with __ and the normal name is an alias. */
16912 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16915 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16922 rm -f conftest.$ac_objext conftest$ac_exeext
16923 if { (eval echo "$as_me:16923: \"$ac_link\"") >&5
16924 (eval $ac_link) 2>&5
16926 echo "$as_me:16926: \$? = $ac_status" >&5
16927 (exit $ac_status); } &&
16928 { ac_try='test -s conftest$ac_exeext'
16929 { (eval echo "$as_me:16929: \"$ac_try\"") >&5
16930 (eval $ac_try) 2>&5
16932 echo "$as_me:16932: \$? = $ac_status" >&5
16933 (exit $ac_status); }; }; then
16934 eval "$as_ac_var=yes"
16936 echo "$as_me: failed program was:" >&5
16937 cat conftest.$ac_ext >&5
16938 eval "$as_ac_var=no"
16940 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16942 echo "$as_me:16942: result: `eval echo '${'$as_ac_var'}'`" >&5
16943 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16944 if test `eval echo '${'$as_ac_var'}'` = yes; then
16945 cat >>confdefs.h <<EOF
16946 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16952 # use a compile-check to work with ncurses*-config and subdirectory includes
16953 echo "$as_me:16953: checking if we can use termcap.h" >&5
16954 echo $ECHO_N "checking if we can use termcap.h... $ECHO_C" >&6
16955 if test "${cf_cv_have_termcap_h+set}" = set; then
16956 echo $ECHO_N "(cached) $ECHO_C" >&6
16959 cat >conftest.$ac_ext <<_ACEOF
16960 #line 16960 "configure"
16961 #include "confdefs.h"
16963 #include <curses.h>
16964 #include <termcap.h>
16974 rm -f conftest.$ac_objext
16975 if { (eval echo "$as_me:16975: \"$ac_compile\"") >&5
16976 (eval $ac_compile) 2>&5
16978 echo "$as_me:16978: \$? = $ac_status" >&5
16979 (exit $ac_status); } &&
16980 { ac_try='test -s conftest.$ac_objext'
16981 { (eval echo "$as_me:16981: \"$ac_try\"") >&5
16982 (eval $ac_try) 2>&5
16984 echo "$as_me:16984: \$? = $ac_status" >&5
16985 (exit $ac_status); }; }; then
16986 cf_cv_have_termcap_h=yes
16988 echo "$as_me: failed program was:" >&5
16989 cat conftest.$ac_ext >&5
16990 cf_cv_have_termcap_h=no
16992 rm -f conftest.$ac_objext conftest.$ac_ext
16994 echo "$as_me:16994: result: $cf_cv_have_termcap_h" >&5
16995 echo "${ECHO_T}$cf_cv_have_termcap_h" >&6
16996 test "x$cf_cv_have_termcap_h" = xyes && cat >>confdefs.h <<\EOF
16997 #define HAVE_TERMCAP_H 1
17000 if test "x$ac_cv_func_getopt" = xno; then
17001 { { echo "$as_me:17001: error: getopt is required for building programs" >&5
17002 echo "$as_me: error: getopt is required for building programs" >&2;}
17003 { (exit 1); exit 1; }; }
17006 if test "$cf_enable_widec" = yes; then
17019 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17020 echo "$as_me:17020: checking for $ac_func" >&5
17021 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17022 if eval "test \"\${$as_ac_var+set}\" = set"; then
17023 echo $ECHO_N "(cached) $ECHO_C" >&6
17025 cat >conftest.$ac_ext <<_ACEOF
17026 #line 17026 "configure"
17027 #include "confdefs.h"
17028 /* System header to define __stub macros and hopefully few prototypes,
17029 which can conflict with char $ac_func (); below. */
17030 #include <assert.h>
17031 /* Override any gcc2 internal prototype to avoid an error. */
17035 /* We use char because int might match the return type of a gcc2
17036 builtin and then its argument prototype would still apply. */
17043 /* The GNU C library defines this for functions which it implements
17044 to always fail with ENOSYS. Some functions are actually named
17045 something starting with __ and the normal name is an alias. */
17046 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17049 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17056 rm -f conftest.$ac_objext conftest$ac_exeext
17057 if { (eval echo "$as_me:17057: \"$ac_link\"") >&5
17058 (eval $ac_link) 2>&5
17060 echo "$as_me:17060: \$? = $ac_status" >&5
17061 (exit $ac_status); } &&
17062 { ac_try='test -s conftest$ac_exeext'
17063 { (eval echo "$as_me:17063: \"$ac_try\"") >&5
17064 (eval $ac_try) 2>&5
17066 echo "$as_me:17066: \$? = $ac_status" >&5
17067 (exit $ac_status); }; }; then
17068 eval "$as_ac_var=yes"
17070 echo "$as_me: failed program was:" >&5
17071 cat conftest.$ac_ext >&5
17072 eval "$as_ac_var=no"
17074 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17076 echo "$as_me:17076: result: `eval echo '${'$as_ac_var'}'`" >&5
17077 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17078 if test `eval echo '${'$as_ac_var'}'` = yes; then
17079 cat >>confdefs.h <<EOF
17080 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17088 echo "$as_me:17088: checking definition to turn on extended curses functions" >&5
17089 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
17090 if test "${cf_cv_need_xopen_extension+set}" = set; then
17091 echo $ECHO_N "(cached) $ECHO_C" >&6
17094 cf_cv_need_xopen_extension=unknown
17095 cat >conftest.$ac_ext <<_ACEOF
17096 #line 17096 "configure"
17097 #include "confdefs.h"
17099 #include <stdlib.h>
17100 #include <${cf_cv_ncurses_header:-curses.h}>
17105 #if defined(NCURSES_VERSION_PATCH)
17106 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
17110 #ifdef NCURSES_VERSION
17112 int check2 = curs_set((int)sizeof(check));
17114 long x = winnstr(stdscr, "", 0);
17116 getbegyx(stdscr, y1, x1)
17121 rm -f conftest.$ac_objext conftest$ac_exeext
17122 if { (eval echo "$as_me:17122: \"$ac_link\"") >&5
17123 (eval $ac_link) 2>&5
17125 echo "$as_me:17125: \$? = $ac_status" >&5
17126 (exit $ac_status); } &&
17127 { ac_try='test -s conftest$ac_exeext'
17128 { (eval echo "$as_me:17128: \"$ac_try\"") >&5
17129 (eval $ac_try) 2>&5
17131 echo "$as_me:17131: \$? = $ac_status" >&5
17132 (exit $ac_status); }; }; then
17133 cf_cv_need_xopen_extension=none
17135 echo "$as_me: failed program was:" >&5
17136 cat conftest.$ac_ext >&5
17138 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
17140 cat >conftest.$ac_ext <<_ACEOF
17141 #line 17141 "configure"
17142 #include "confdefs.h"
17144 #define $cf_try_xopen_extension 1
17145 #include <stdlib.h>
17146 #include <${cf_cv_ncurses_header:-curses.h}>
17151 #ifdef NCURSES_VERSION
17153 int check2 = curs_set((int)sizeof(check));
17155 long x = winnstr(stdscr, "", 0);
17157 getbegyx(stdscr, y1, x1)
17162 rm -f conftest.$ac_objext conftest$ac_exeext
17163 if { (eval echo "$as_me:17163: \"$ac_link\"") >&5
17164 (eval $ac_link) 2>&5
17166 echo "$as_me:17166: \$? = $ac_status" >&5
17167 (exit $ac_status); } &&
17168 { ac_try='test -s conftest$ac_exeext'
17169 { (eval echo "$as_me:17169: \"$ac_try\"") >&5
17170 (eval $ac_try) 2>&5
17172 echo "$as_me:17172: \$? = $ac_status" >&5
17173 (exit $ac_status); }; }; then
17174 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
17176 echo "$as_me: failed program was:" >&5
17177 cat conftest.$ac_ext >&5
17179 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17183 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17186 echo "$as_me:17186: result: $cf_cv_need_xopen_extension" >&5
17187 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
17189 case $cf_cv_need_xopen_extension in
17192 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17193 CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
17198 echo "$as_me:17198: checking for term.h" >&5
17199 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
17200 if test "${cf_cv_term_header+set}" = set; then
17201 echo $ECHO_N "(cached) $ECHO_C" >&6
17204 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
17205 # for <term.h> if we do not find the variant.
17207 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
17209 case ${cf_cv_ncurses_header:-curses.h} in
17211 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
17212 cf_header_list="$cf_header_item $cf_header_list"
17216 for cf_header in $cf_header_list
17218 cat >conftest.$ac_ext <<_ACEOF
17219 #line 17219 "configure"
17220 #include "confdefs.h"
17222 #include <${cf_cv_ncurses_header:-curses.h}>
17223 #include <${cf_header}>
17232 rm -f conftest.$ac_objext
17233 if { (eval echo "$as_me:17233: \"$ac_compile\"") >&5
17234 (eval $ac_compile) 2>&5
17236 echo "$as_me:17236: \$? = $ac_status" >&5
17237 (exit $ac_status); } &&
17238 { ac_try='test -s conftest.$ac_objext'
17239 { (eval echo "$as_me:17239: \"$ac_try\"") >&5
17240 (eval $ac_try) 2>&5
17242 echo "$as_me:17242: \$? = $ac_status" >&5
17243 (exit $ac_status); }; }; then
17244 cf_cv_term_header=$cf_header
17247 echo "$as_me: failed program was:" >&5
17248 cat conftest.$ac_ext >&5
17249 cf_cv_term_header=no
17251 rm -f conftest.$ac_objext conftest.$ac_ext
17254 case $cf_cv_term_header in
17256 # If curses is ncurses, some packagers still mess it up by trying to make
17257 # us use GNU termcap. This handles the most common case.
17258 for cf_header in ncurses/term.h ncursesw/term.h
17260 cat >conftest.$ac_ext <<_ACEOF
17261 #line 17261 "configure"
17262 #include "confdefs.h"
17264 #include <${cf_cv_ncurses_header:-curses.h}>
17265 #ifdef NCURSES_VERSION
17266 #include <${cf_header}>
17278 rm -f conftest.$ac_objext
17279 if { (eval echo "$as_me:17279: \"$ac_compile\"") >&5
17280 (eval $ac_compile) 2>&5
17282 echo "$as_me:17282: \$? = $ac_status" >&5
17283 (exit $ac_status); } &&
17284 { ac_try='test -s conftest.$ac_objext'
17285 { (eval echo "$as_me:17285: \"$ac_try\"") >&5
17286 (eval $ac_try) 2>&5
17288 echo "$as_me:17288: \$? = $ac_status" >&5
17289 (exit $ac_status); }; }; then
17290 cf_cv_term_header=$cf_header
17293 echo "$as_me: failed program was:" >&5
17294 cat conftest.$ac_ext >&5
17295 cf_cv_term_header=no
17297 rm -f conftest.$ac_objext conftest.$ac_ext
17303 echo "$as_me:17303: result: $cf_cv_term_header" >&5
17304 echo "${ECHO_T}$cf_cv_term_header" >&6
17306 case $cf_cv_term_header in
17309 cat >>confdefs.h <<\EOF
17310 #define HAVE_TERM_H 1
17316 cat >>confdefs.h <<\EOF
17317 #define HAVE_NCURSES_TERM_H 1
17323 cat >>confdefs.h <<\EOF
17324 #define HAVE_NCURSESW_TERM_H 1
17330 echo "$as_me:17330: checking for unctrl.h" >&5
17331 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
17332 if test "${cf_cv_unctrl_header+set}" = set; then
17333 echo $ECHO_N "(cached) $ECHO_C" >&6
17336 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
17337 # for <unctrl.h> if we do not find the variant.
17339 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
17341 case ${cf_cv_ncurses_header:-curses.h} in
17343 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
17344 cf_header_list="$cf_header_item $cf_header_list"
17348 for cf_header in $cf_header_list
17350 cat >conftest.$ac_ext <<_ACEOF
17351 #line 17351 "configure"
17352 #include "confdefs.h"
17354 #include <${cf_cv_ncurses_header:-curses.h}>
17355 #include <${cf_header}>
17364 rm -f conftest.$ac_objext
17365 if { (eval echo "$as_me:17365: \"$ac_compile\"") >&5
17366 (eval $ac_compile) 2>&5
17368 echo "$as_me:17368: \$? = $ac_status" >&5
17369 (exit $ac_status); } &&
17370 { ac_try='test -s conftest.$ac_objext'
17371 { (eval echo "$as_me:17371: \"$ac_try\"") >&5
17372 (eval $ac_try) 2>&5
17374 echo "$as_me:17374: \$? = $ac_status" >&5
17375 (exit $ac_status); }; }; then
17376 cf_cv_unctrl_header=$cf_header
17379 echo "$as_me: failed program was:" >&5
17380 cat conftest.$ac_ext >&5
17381 cf_cv_unctrl_header=no
17383 rm -f conftest.$ac_objext conftest.$ac_ext
17387 echo "$as_me:17387: result: $cf_cv_unctrl_header" >&5
17388 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
17390 case $cf_cv_unctrl_header in
17392 { echo "$as_me:17392: WARNING: unctrl.h header not found" >&5
17393 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
17397 case $cf_cv_unctrl_header in
17400 cat >>confdefs.h <<\EOF
17401 #define HAVE_UNCTRL_H 1
17407 cat >>confdefs.h <<\EOF
17408 #define HAVE_NCURSES_UNCTRL_H 1
17412 (ncursesw/unctrl.h)
17414 cat >>confdefs.h <<\EOF
17415 #define HAVE_NCURSESW_UNCTRL_H 1
17423 assume_default_colors \
17438 init_extended_color \
17446 reset_color_pairs \
17461 use_default_colors \
17463 use_extended_names \
17479 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17481 echo "$as_me:17481: checking for ${cf_func}" >&5
17482 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
17484 echo "${as_me:-configure}:17484: testing ${cf_func} ..." 1>&5
17486 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
17487 echo $ECHO_N "(cached) $ECHO_C" >&6
17490 eval cf_result='$ac_cv_func_'$cf_func
17491 if test ".$cf_result" != ".no"; then
17492 cat >conftest.$ac_ext <<_ACEOF
17493 #line 17493 "configure"
17494 #include "confdefs.h"
17496 #ifdef HAVE_XCURSES
17497 #include <xcurses.h>
17498 char * XCursesProgramName = "test";
17500 #include <${cf_cv_ncurses_header:-curses.h}>
17501 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17502 #include <ncursesw/term.h>
17503 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17504 #include <ncurses/term.h>
17505 #elif defined(HAVE_TERM_H)
17515 long foo = (long)(&${cf_func});
17516 fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
17517 if (foo + 1234L > 5678L)
17518 ${cf_cv_main_return:-return}(foo != 0);
17525 rm -f conftest.$ac_objext conftest$ac_exeext
17526 if { (eval echo "$as_me:17526: \"$ac_link\"") >&5
17527 (eval $ac_link) 2>&5
17529 echo "$as_me:17529: \$? = $ac_status" >&5
17530 (exit $ac_status); } &&
17531 { ac_try='test -s conftest$ac_exeext'
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
17539 echo "$as_me: failed program was:" >&5
17540 cat conftest.$ac_ext >&5
17543 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17545 eval 'cf_cv_func_'$cf_func'=$cf_result'
17549 # use the computed/retrieved cache-value:
17550 eval 'cf_result=$cf_cv_func_'$cf_func
17551 echo "$as_me:17551: result: $cf_result" >&5
17552 echo "${ECHO_T}$cf_result" >&6
17553 if test $cf_result != no; then
17554 cat >>confdefs.h <<EOF
17555 #define HAVE_${cf_tr_func} 1
17561 for cf_func in tputs
17564 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17566 echo "$as_me:17566: checking for ${cf_func}" >&5
17567 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
17569 echo "${as_me:-configure}:17569: testing ${cf_func} ..." 1>&5
17571 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
17572 echo $ECHO_N "(cached) $ECHO_C" >&6
17575 eval cf_result='$ac_cv_func_'$cf_func
17576 if test ".$cf_result" != ".no"; then
17577 cat >conftest.$ac_ext <<_ACEOF
17578 #line 17578 "configure"
17579 #include "confdefs.h"
17581 #ifdef HAVE_XCURSES
17582 #include <xcurses.h>
17583 char * XCursesProgramName = "test";
17585 #include <${cf_cv_ncurses_header:-curses.h}>
17586 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
17587 #include <ncursesw/term.h>
17588 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
17589 #include <ncurses/term.h>
17590 #elif defined(HAVE_TERM_H)
17600 long foo = (long)(&${cf_func});
17601 fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
17602 if (foo + 1234L > 5678L)
17603 ${cf_cv_main_return:-return}(foo != 0);
17610 rm -f conftest.$ac_objext conftest$ac_exeext
17611 if { (eval echo "$as_me:17611: \"$ac_link\"") >&5
17612 (eval $ac_link) 2>&5
17614 echo "$as_me:17614: \$? = $ac_status" >&5
17615 (exit $ac_status); } &&
17616 { ac_try='test -s conftest$ac_exeext'
17617 { (eval echo "$as_me:17617: \"$ac_try\"") >&5
17618 (eval $ac_try) 2>&5
17620 echo "$as_me:17620: \$? = $ac_status" >&5
17621 (exit $ac_status); }; }; then
17624 echo "$as_me: failed program was:" >&5
17625 cat conftest.$ac_ext >&5
17628 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17630 eval 'cf_cv_func_'$cf_func'=$cf_result'
17634 # use the computed/retrieved cache-value:
17635 eval 'cf_result=$cf_cv_func_'$cf_func
17636 echo "$as_me:17636: result: $cf_result" >&5
17637 echo "${ECHO_T}$cf_result" >&6
17638 if test $cf_result != no; then
17639 cat >>confdefs.h <<EOF
17640 #define HAVE_${cf_tr_func} 1
17646 if test x$cf_cv_func_tputs = xyes
17649 for cf_arg in int char
17651 for cf_ret in int void
17653 if test $cf_ret = void
17655 cf_return="/* nothing */"
17657 cf_return="return value"
17659 cat >conftest.$ac_ext <<_ACEOF
17660 #line 17660 "configure"
17661 #include "confdefs.h"
17663 #include <${cf_cv_ncurses_header:-curses.h}>
17664 #include <$cf_cv_term_header>
17666 static $cf_ret outc($cf_arg value) { $cf_return; }
17672 tputs("hello", 0, outc);
17673 ${cf_cv_main_return:-return}(0);
17679 rm -f conftest.$ac_objext
17680 if { (eval echo "$as_me:17680: \"$ac_compile\"") >&5
17681 (eval $ac_compile) 2>&5
17683 echo "$as_me:17683: \$? = $ac_status" >&5
17684 (exit $ac_status); } &&
17685 { ac_try='test -s conftest.$ac_objext'
17686 { (eval echo "$as_me:17686: \"$ac_try\"") >&5
17687 (eval $ac_try) 2>&5
17689 echo "$as_me:17689: \$? = $ac_status" >&5
17690 (exit $ac_status); }; }; then
17692 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
17694 echo "${as_me:-configure}:17694: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
17696 cat >>confdefs.h <<EOF
17697 #define TPUTS_ARG $cf_arg
17698 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
17699 #define TPUTS_RETURN(value) $cf_return
17705 echo "$as_me: failed program was:" >&5
17706 cat conftest.$ac_ext >&5
17708 rm -f conftest.$ac_objext conftest.$ac_ext
17710 test $cf_done = yes && break
17714 echo "$as_me:17714: checking for ncurses extended functions" >&5
17715 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
17716 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
17717 echo $ECHO_N "(cached) $ECHO_C" >&6
17720 cat >conftest.$ac_ext <<_ACEOF
17721 #line 17721 "configure"
17722 #include "confdefs.h"
17724 #include <${cf_cv_ncurses_header:-curses.h}>
17729 int x = NCURSES_EXT_FUNCS
17735 rm -f conftest.$ac_objext
17736 if { (eval echo "$as_me:17736: \"$ac_compile\"") >&5
17737 (eval $ac_compile) 2>&5
17739 echo "$as_me:17739: \$? = $ac_status" >&5
17740 (exit $ac_status); } &&
17741 { ac_try='test -s conftest.$ac_objext'
17742 { (eval echo "$as_me:17742: \"$ac_try\"") >&5
17743 (eval $ac_try) 2>&5
17745 echo "$as_me:17745: \$? = $ac_status" >&5
17746 (exit $ac_status); }; }; then
17747 cf_cv_ncurses_ext_funcs=defined
17749 echo "$as_me: failed program was:" >&5
17750 cat conftest.$ac_ext >&5
17752 cat >conftest.$ac_ext <<_ACEOF
17753 #line 17753 "configure"
17754 #include "confdefs.h"
17756 #include <${cf_cv_ncurses_header:-curses.h}>
17761 (void) assume_default_colors (0, 0);
17762 (void) curses_version ();
17763 (void) define_key (0, 0);
17764 (void) is_term_resized (0, 0);
17765 (void) key_defined (0);
17766 (void) keybound (0, 0);
17767 (void) keyok (0, 0);
17768 (void) resize_term (0, 0);
17769 (void) resizeterm (0, 0);
17770 (void) use_default_colors ();
17771 (void) use_extended_names (0);
17772 (void) wresize (0, 0, 0);
17777 rm -f conftest.$ac_objext conftest$ac_exeext
17778 if { (eval echo "$as_me:17778: \"$ac_link\"") >&5
17779 (eval $ac_link) 2>&5
17781 echo "$as_me:17781: \$? = $ac_status" >&5
17782 (exit $ac_status); } &&
17783 { ac_try='test -s conftest$ac_exeext'
17784 { (eval echo "$as_me:17784: \"$ac_try\"") >&5
17785 (eval $ac_try) 2>&5
17787 echo "$as_me:17787: \$? = $ac_status" >&5
17788 (exit $ac_status); }; }; then
17789 cf_cv_ncurses_ext_funcs=yes
17791 echo "$as_me: failed program was:" >&5
17792 cat conftest.$ac_ext >&5
17793 cf_cv_ncurses_ext_funcs=no
17795 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17798 rm -f conftest.$ac_objext conftest.$ac_ext
17801 echo "$as_me:17801: result: $cf_cv_ncurses_ext_funcs" >&5
17802 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
17803 test "$cf_cv_ncurses_ext_funcs" = yes &&
17804 cat >>confdefs.h <<\EOF
17805 #define NCURSES_EXT_FUNCS 1
17808 if test "$cf_enable_widec" = yes
17810 # workaround for systems with ncurses before 20111029, due to change of
17811 # feature test macro from _XPG5 to _XOPEN_SOURCE
17812 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
17815 echo "$as_me:17815: checking if _XPG5 should be defined to enable wide-characters" >&5
17816 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
17818 cat >conftest.$ac_ext <<_ACEOF
17819 #line 17819 "configure"
17820 #include "confdefs.h"
17822 #include <${cf_cv_ncurses_header:-curses.h}>
17831 rm -f conftest.$ac_objext
17832 if { (eval echo "$as_me:17832: \"$ac_compile\"") >&5
17833 (eval $ac_compile) 2>&5
17835 echo "$as_me:17835: \$? = $ac_status" >&5
17836 (exit $ac_status); } &&
17837 { ac_try='test -s conftest.$ac_objext'
17838 { (eval echo "$as_me:17838: \"$ac_try\"") >&5
17839 (eval $ac_try) 2>&5
17841 echo "$as_me:17841: \$? = $ac_status" >&5
17842 (exit $ac_status); }; }; then
17845 echo "$as_me: failed program was:" >&5
17846 cat conftest.$ac_ext >&5
17847 cf_save_cppflags="$CPPFLAGS"
17848 CPPFLAGS="$CPPFLAGS -D_XPG5"
17849 cat >conftest.$ac_ext <<_ACEOF
17850 #line 17850 "configure"
17851 #include "confdefs.h"
17853 #include <${cf_cv_ncurses_header:-curses.h}>
17862 rm -f conftest.$ac_objext
17863 if { (eval echo "$as_me:17863: \"$ac_compile\"") >&5
17864 (eval $ac_compile) 2>&5
17866 echo "$as_me:17866: \$? = $ac_status" >&5
17867 (exit $ac_status); } &&
17868 { ac_try='test -s conftest.$ac_objext'
17869 { (eval echo "$as_me:17869: \"$ac_try\"") >&5
17870 (eval $ac_try) 2>&5
17872 echo "$as_me:17872: \$? = $ac_status" >&5
17873 (exit $ac_status); }; }; then
17876 echo "$as_me: failed program was:" >&5
17877 cat conftest.$ac_ext >&5
17879 rm -f conftest.$ac_objext conftest.$ac_ext
17880 CPPFLAGS="$cf_save_cppflags"
17882 rm -f conftest.$ac_objext conftest.$ac_ext
17883 echo "$as_me:17883: result: $cf_define_xpg5" >&5
17884 echo "${ECHO_T}$cf_define_xpg5" >&6
17886 if test "$cf_define_xpg5" = yes
17888 CPPFLAGS="$CPPFLAGS -D_XPG5"
17892 echo "$as_me:17892: checking for wide-character functions" >&5
17893 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
17894 if test "${cf_cv_widechar_funcs+set}" = set; then
17895 echo $ECHO_N "(cached) $ECHO_C" >&6
17898 cat >conftest.$ac_ext <<_ACEOF
17899 #line 17899 "configure"
17900 #include "confdefs.h"
17902 #include <${cf_cv_ncurses_header:-curses.h}>
17907 static wchar_t src_wchar[2];
17908 static cchar_t dst_cchar;
17909 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
17915 rm -f conftest.$ac_objext conftest$ac_exeext
17916 if { (eval echo "$as_me:17916: \"$ac_link\"") >&5
17917 (eval $ac_link) 2>&5
17919 echo "$as_me:17919: \$? = $ac_status" >&5
17920 (exit $ac_status); } &&
17921 { ac_try='test -s conftest$ac_exeext'
17922 { (eval echo "$as_me:17922: \"$ac_try\"") >&5
17923 (eval $ac_try) 2>&5
17925 echo "$as_me:17925: \$? = $ac_status" >&5
17926 (exit $ac_status); }; }; then
17927 cf_cv_widechar_funcs=yes
17929 echo "$as_me: failed program was:" >&5
17930 cat conftest.$ac_ext >&5
17931 cf_cv_widechar_funcs=no
17933 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17936 echo "$as_me:17936: result: $cf_cv_widechar_funcs" >&5
17937 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
17938 if test "$cf_cv_widechar_funcs" != no ; then
17940 cat >>confdefs.h <<\EOF
17941 #define USE_WIDEC_SUPPORT 1
17945 cat >>confdefs.h <<\EOF
17946 #define USE_WIDEC_SUPPORT 0
17951 cat >>confdefs.h <<\EOF
17952 #define USE_WIDEC_SUPPORT 0
17957 echo "$as_me:17957: checking if $cf_cv_screen library uses pthreads" >&5
17958 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
17959 if test "${cf_cv_use_pthreads+set}" = set; then
17960 echo $ECHO_N "(cached) $ECHO_C" >&6
17963 cat >conftest.$ac_ext <<_ACEOF
17964 #line 17964 "configure"
17965 #include "confdefs.h"
17967 #include <${cf_cv_ncurses_header:-curses.h}>
17968 extern void _nc_init_pthreads(void);
17975 _nc_init_pthreads();
17981 rm -f conftest.$ac_objext conftest$ac_exeext
17982 if { (eval echo "$as_me:17982: \"$ac_link\"") >&5
17983 (eval $ac_link) 2>&5
17985 echo "$as_me:17985: \$? = $ac_status" >&5
17986 (exit $ac_status); } &&
17987 { ac_try='test -s conftest$ac_exeext'
17988 { (eval echo "$as_me:17988: \"$ac_try\"") >&5
17989 (eval $ac_try) 2>&5
17991 echo "$as_me:17991: \$? = $ac_status" >&5
17992 (exit $ac_status); }; }; then
17993 cf_cv_use_pthreads=yes
17995 echo "$as_me: failed program was:" >&5
17996 cat conftest.$ac_ext >&5
17997 cf_cv_use_pthreads=no
17999 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18002 echo "$as_me:18002: result: $cf_cv_use_pthreads" >&5
18003 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
18004 test $cf_cv_use_pthreads = yes && cat >>confdefs.h <<\EOF
18005 #define USE_PTHREADS 1
18008 echo "$as_me:18008: checking if sys/time.h works with sys/select.h" >&5
18009 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
18010 if test "${cf_cv_sys_time_select+set}" = set; then
18011 echo $ECHO_N "(cached) $ECHO_C" >&6
18014 cat >conftest.$ac_ext <<_ACEOF
18015 #line 18015 "configure"
18016 #include "confdefs.h"
18018 #include <sys/types.h>
18019 #ifdef HAVE_SYS_TIME_H
18020 #include <sys/time.h>
18022 #ifdef HAVE_SYS_SELECT_H
18023 #include <sys/select.h>
18034 rm -f conftest.$ac_objext
18035 if { (eval echo "$as_me:18035: \"$ac_compile\"") >&5
18036 (eval $ac_compile) 2>&5
18038 echo "$as_me:18038: \$? = $ac_status" >&5
18039 (exit $ac_status); } &&
18040 { ac_try='test -s conftest.$ac_objext'
18041 { (eval echo "$as_me:18041: \"$ac_try\"") >&5
18042 (eval $ac_try) 2>&5
18044 echo "$as_me:18044: \$? = $ac_status" >&5
18045 (exit $ac_status); }; }; then
18046 cf_cv_sys_time_select=yes
18048 echo "$as_me: failed program was:" >&5
18049 cat conftest.$ac_ext >&5
18050 cf_cv_sys_time_select=no
18052 rm -f conftest.$ac_objext conftest.$ac_ext
18056 echo "$as_me:18056: result: $cf_cv_sys_time_select" >&5
18057 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
18058 test "$cf_cv_sys_time_select" = yes &&
18059 cat >>confdefs.h <<\EOF
18060 #define HAVE_SYS_TIME_SELECT 1
18063 # special check for test/ditto.c
18065 echo "$as_me:18065: checking for openpty in -lutil" >&5
18066 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18067 if test "${ac_cv_lib_util_openpty+set}" = set; then
18068 echo $ECHO_N "(cached) $ECHO_C" >&6
18070 ac_check_lib_save_LIBS=$LIBS
18071 LIBS="-lutil $LIBS"
18072 cat >conftest.$ac_ext <<_ACEOF
18073 #line 18073 "configure"
18074 #include "confdefs.h"
18076 /* Override any gcc2 internal prototype to avoid an error. */
18080 /* We use char because int might match the return type of a gcc2
18081 builtin and then its argument prototype would still apply. */
18091 rm -f conftest.$ac_objext conftest$ac_exeext
18092 if { (eval echo "$as_me:18092: \"$ac_link\"") >&5
18093 (eval $ac_link) 2>&5
18095 echo "$as_me:18095: \$? = $ac_status" >&5
18096 (exit $ac_status); } &&
18097 { ac_try='test -s conftest$ac_exeext'
18098 { (eval echo "$as_me:18098: \"$ac_try\"") >&5
18099 (eval $ac_try) 2>&5
18101 echo "$as_me:18101: \$? = $ac_status" >&5
18102 (exit $ac_status); }; }; then
18103 ac_cv_lib_util_openpty=yes
18105 echo "$as_me: failed program was:" >&5
18106 cat conftest.$ac_ext >&5
18107 ac_cv_lib_util_openpty=no
18109 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18110 LIBS=$ac_check_lib_save_LIBS
18112 echo "$as_me:18112: result: $ac_cv_lib_util_openpty" >&5
18113 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18114 if test $ac_cv_lib_util_openpty = yes; then
18120 echo "$as_me:18120: checking for openpty header" >&5
18121 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18122 if test "${cf_cv_func_openpty+set}" = set; then
18123 echo $ECHO_N "(cached) $ECHO_C" >&6
18126 cf_save_LIBS="$LIBS"
18127 test $cf_cv_lib_util = yes && {
18128 cf_add_libs="-lutil"
18129 # Filter out duplicates - this happens with badly-designed ".pc" files...
18130 for cf_add_1lib in $LIBS
18132 for cf_add_2lib in $cf_add_libs
18134 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18140 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18142 LIBS="$cf_add_libs"
18144 for cf_header in pty.h libutil.h util.h
18146 cat >conftest.$ac_ext <<_ACEOF
18147 #line 18147 "configure"
18148 #include "confdefs.h"
18150 #include <$cf_header>
18156 int x = openpty((int *)0, (int *)0, (char *)0,
18157 (struct termios *)0, (struct winsize *)0);
18163 rm -f conftest.$ac_objext conftest$ac_exeext
18164 if { (eval echo "$as_me:18164: \"$ac_link\"") >&5
18165 (eval $ac_link) 2>&5
18167 echo "$as_me:18167: \$? = $ac_status" >&5
18168 (exit $ac_status); } &&
18169 { ac_try='test -s conftest$ac_exeext'
18170 { (eval echo "$as_me:18170: \"$ac_try\"") >&5
18171 (eval $ac_try) 2>&5
18173 echo "$as_me:18173: \$? = $ac_status" >&5
18174 (exit $ac_status); }; }; then
18176 cf_cv_func_openpty=$cf_header
18180 echo "$as_me: failed program was:" >&5
18181 cat conftest.$ac_ext >&5
18183 cf_cv_func_openpty=no
18186 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18188 LIBS="$cf_save_LIBS"
18191 echo "$as_me:18191: result: $cf_cv_func_openpty" >&5
18192 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18194 if test "$cf_cv_func_openpty" != no ; then
18196 cat >>confdefs.h <<EOF
18197 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18200 cat >>confdefs.h <<\EOF
18201 #define USE_XTERM_PTY 1
18204 if test "x$cf_cv_lib_util" = xyes ; then
18206 cf_add_libs="-lutil"
18207 # Filter out duplicates - this happens with badly-designed ".pc" files...
18208 for cf_add_1lib in $TEST_LIBS
18210 for cf_add_2lib in $cf_add_libs
18212 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18218 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18220 TEST_LIBS="$cf_add_libs"
18225 echo "$as_me:18225: checking for function curses_version" >&5
18226 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
18227 if test "${cf_cv_func_curses_version+set}" = set; then
18228 echo $ECHO_N "(cached) $ECHO_C" >&6
18231 if test "$cross_compiling" = yes; then
18232 cf_cv_func_curses_version=unknown
18234 cat >conftest.$ac_ext <<_ACEOF
18235 #line 18235 "configure"
18236 #include "confdefs.h"
18238 #include <${cf_cv_ncurses_header:-curses.h}>
18242 sprintf(temp, "%s\n", curses_version());
18243 ${cf_cv_main_return:-return}(0);
18247 rm -f conftest$ac_exeext
18248 if { (eval echo "$as_me:18248: \"$ac_link\"") >&5
18249 (eval $ac_link) 2>&5
18251 echo "$as_me:18251: \$? = $ac_status" >&5
18252 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18253 { (eval echo "$as_me:18253: \"$ac_try\"") >&5
18254 (eval $ac_try) 2>&5
18256 echo "$as_me:18256: \$? = $ac_status" >&5
18257 (exit $ac_status); }; }; then
18258 cf_cv_func_curses_version=yes
18261 echo "$as_me: program exited with status $ac_status" >&5
18262 echo "$as_me: failed program was:" >&5
18263 cat conftest.$ac_ext >&5
18264 cf_cv_func_curses_version=no
18267 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18271 echo "$as_me:18271: result: $cf_cv_func_curses_version" >&5
18272 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
18273 test "$cf_cv_func_curses_version" = yes &&
18274 cat >>confdefs.h <<\EOF
18275 #define HAVE_CURSES_VERSION 1
18278 echo "$as_me:18278: checking for alternate character set array" >&5
18279 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
18280 if test "${cf_cv_curses_acs_map+set}" = set; then
18281 echo $ECHO_N "(cached) $ECHO_C" >&6
18284 cf_cv_curses_acs_map=unknown
18285 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
18287 cat >conftest.$ac_ext <<_ACEOF
18288 #line 18288 "configure"
18289 #include "confdefs.h"
18291 #include <${cf_cv_ncurses_header:-curses.h}>
18297 $name['k'] = ACS_PLUS
18303 rm -f conftest.$ac_objext conftest$ac_exeext
18304 if { (eval echo "$as_me:18304: \"$ac_link\"") >&5
18305 (eval $ac_link) 2>&5
18307 echo "$as_me:18307: \$? = $ac_status" >&5
18308 (exit $ac_status); } &&
18309 { ac_try='test -s conftest$ac_exeext'
18310 { (eval echo "$as_me:18310: \"$ac_try\"") >&5
18311 (eval $ac_try) 2>&5
18313 echo "$as_me:18313: \$? = $ac_status" >&5
18314 (exit $ac_status); }; }; then
18315 cf_cv_curses_acs_map=$name; break
18317 echo "$as_me: failed program was:" >&5
18318 cat conftest.$ac_ext >&5
18320 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18324 echo "$as_me:18324: result: $cf_cv_curses_acs_map" >&5
18325 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
18327 test "$cf_cv_curses_acs_map" != unknown &&
18328 cat >>confdefs.h <<EOF
18329 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
18332 if test "$cf_enable_widec" = yes; then
18334 echo "$as_me:18334: checking for wide alternate character set array" >&5
18335 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
18336 if test "${cf_cv_curses_wacs_map+set}" = set; then
18337 echo $ECHO_N "(cached) $ECHO_C" >&6
18340 cf_cv_curses_wacs_map=unknown
18341 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
18343 cat >conftest.$ac_ext <<_ACEOF
18344 #line 18344 "configure"
18345 #include "confdefs.h"
18347 #ifndef _XOPEN_SOURCE_EXTENDED
18348 #define _XOPEN_SOURCE_EXTENDED
18350 #include <${cf_cv_ncurses_header:-curses.h}>
18354 void *foo = &($name['k'])
18359 rm -f conftest.$ac_objext conftest$ac_exeext
18360 if { (eval echo "$as_me:18360: \"$ac_link\"") >&5
18361 (eval $ac_link) 2>&5
18363 echo "$as_me:18363: \$? = $ac_status" >&5
18364 (exit $ac_status); } &&
18365 { ac_try='test -s conftest$ac_exeext'
18366 { (eval echo "$as_me:18366: \"$ac_try\"") >&5
18367 (eval $ac_try) 2>&5
18369 echo "$as_me:18369: \$? = $ac_status" >&5
18370 (exit $ac_status); }; }; then
18371 cf_cv_curses_wacs_map=$name
18374 echo "$as_me: failed program was:" >&5
18375 cat conftest.$ac_ext >&5
18377 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18380 echo "$as_me:18380: result: $cf_cv_curses_wacs_map" >&5
18381 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
18383 test "$cf_cv_curses_wacs_map" != unknown &&
18384 cat >>confdefs.h <<EOF
18385 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
18388 echo "$as_me:18388: checking for wide alternate character constants" >&5
18389 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
18390 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
18391 echo $ECHO_N "(cached) $ECHO_C" >&6
18394 cf_cv_curses_wacs_symbols=no
18395 if test "$cf_cv_curses_wacs_map" != unknown
18397 cat >conftest.$ac_ext <<_ACEOF
18398 #line 18398 "configure"
18399 #include "confdefs.h"
18401 #ifndef _XOPEN_SOURCE_EXTENDED
18402 #define _XOPEN_SOURCE_EXTENDED
18404 #include <${cf_cv_ncurses_header:-curses.h}>
18408 cchar_t *foo = WACS_PLUS;
18409 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
18414 rm -f conftest.$ac_objext conftest$ac_exeext
18415 if { (eval echo "$as_me:18415: \"$ac_link\"") >&5
18416 (eval $ac_link) 2>&5
18418 echo "$as_me:18418: \$? = $ac_status" >&5
18419 (exit $ac_status); } &&
18420 { ac_try='test -s conftest$ac_exeext'
18421 { (eval echo "$as_me:18421: \"$ac_try\"") >&5
18422 (eval $ac_try) 2>&5
18424 echo "$as_me:18424: \$? = $ac_status" >&5
18425 (exit $ac_status); }; }; then
18426 cf_cv_curses_wacs_symbols=yes
18428 echo "$as_me: failed program was:" >&5
18429 cat conftest.$ac_ext >&5
18431 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18433 cat >conftest.$ac_ext <<_ACEOF
18434 #line 18434 "configure"
18435 #include "confdefs.h"
18437 #ifndef _XOPEN_SOURCE_EXTENDED
18438 #define _XOPEN_SOURCE_EXTENDED
18440 #include <${cf_cv_ncurses_header:-curses.h}>
18444 cchar_t *foo = WACS_PLUS
18449 rm -f conftest.$ac_objext conftest$ac_exeext
18450 if { (eval echo "$as_me:18450: \"$ac_link\"") >&5
18451 (eval $ac_link) 2>&5
18453 echo "$as_me:18453: \$? = $ac_status" >&5
18454 (exit $ac_status); } &&
18455 { ac_try='test -s conftest$ac_exeext'
18456 { (eval echo "$as_me:18456: \"$ac_try\"") >&5
18457 (eval $ac_try) 2>&5
18459 echo "$as_me:18459: \$? = $ac_status" >&5
18460 (exit $ac_status); }; }; then
18461 cf_cv_curses_wacs_symbols=yes
18463 echo "$as_me: failed program was:" >&5
18464 cat conftest.$ac_ext >&5
18466 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18470 echo "$as_me:18470: result: $cf_cv_curses_wacs_symbols" >&5
18471 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
18473 test "$cf_cv_curses_wacs_symbols" != no &&
18474 cat >>confdefs.h <<\EOF
18475 #define CURSES_WACS_SYMBOLS 1
18480 echo "$as_me:18480: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
18481 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
18482 cat >conftest.$ac_ext <<_ACEOF
18483 #line 18483 "configure"
18484 #include "confdefs.h"
18486 #ifndef _XOPEN_SOURCE_EXTENDED
18487 #define _XOPEN_SOURCE_EXTENDED
18489 #include <${cf_cv_ncurses_header:-curses.h}>
18500 rm -f conftest.$ac_objext
18501 if { (eval echo "$as_me:18501: \"$ac_compile\"") >&5
18502 (eval $ac_compile) 2>&5
18504 echo "$as_me:18504: \$? = $ac_status" >&5
18505 (exit $ac_status); } &&
18506 { ac_try='test -s conftest.$ac_objext'
18507 { (eval echo "$as_me:18507: \"$ac_try\"") >&5
18508 (eval $ac_try) 2>&5
18510 echo "$as_me:18510: \$? = $ac_status" >&5
18511 (exit $ac_status); }; }; then
18514 echo "$as_me: failed program was:" >&5
18515 cat conftest.$ac_ext >&5
18518 rm -f conftest.$ac_objext conftest.$ac_ext
18519 echo "$as_me:18519: result: $cf_result" >&5
18520 echo "${ECHO_T}$cf_result" >&6
18521 if test $cf_result = yes ; then
18523 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18525 cat >>confdefs.h <<EOF
18526 #define $cf_result 1
18531 cat >>confdefs.h <<EOF
18532 #define attr_t long
18537 if test "$cf_enable_widec" = yes; then
18539 # This is needed on Tru64 5.0 to declare mbstate_t
18540 echo "$as_me:18540: checking if we must include wchar.h to declare mbstate_t" >&5
18541 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
18542 if test "${cf_cv_mbstate_t+set}" = set; then
18543 echo $ECHO_N "(cached) $ECHO_C" >&6
18546 cat >conftest.$ac_ext <<_ACEOF
18547 #line 18547 "configure"
18548 #include "confdefs.h"
18550 #include <stdlib.h>
18551 #include <stdarg.h>
18553 #ifdef HAVE_LIBUTF8_H
18554 #include <libutf8.h>
18564 rm -f conftest.$ac_objext
18565 if { (eval echo "$as_me:18565: \"$ac_compile\"") >&5
18566 (eval $ac_compile) 2>&5
18568 echo "$as_me:18568: \$? = $ac_status" >&5
18569 (exit $ac_status); } &&
18570 { ac_try='test -s conftest.$ac_objext'
18571 { (eval echo "$as_me:18571: \"$ac_try\"") >&5
18572 (eval $ac_try) 2>&5
18574 echo "$as_me:18574: \$? = $ac_status" >&5
18575 (exit $ac_status); }; }; then
18578 echo "$as_me: failed program was:" >&5
18579 cat conftest.$ac_ext >&5
18580 cat >conftest.$ac_ext <<_ACEOF
18581 #line 18581 "configure"
18582 #include "confdefs.h"
18584 #include <stdlib.h>
18585 #include <stdarg.h>
18588 #ifdef HAVE_LIBUTF8_H
18589 #include <libutf8.h>
18599 rm -f conftest.$ac_objext
18600 if { (eval echo "$as_me:18600: \"$ac_compile\"") >&5
18601 (eval $ac_compile) 2>&5
18603 echo "$as_me:18603: \$? = $ac_status" >&5
18604 (exit $ac_status); } &&
18605 { ac_try='test -s conftest.$ac_objext'
18606 { (eval echo "$as_me:18606: \"$ac_try\"") >&5
18607 (eval $ac_try) 2>&5
18609 echo "$as_me:18609: \$? = $ac_status" >&5
18610 (exit $ac_status); }; }; then
18611 cf_cv_mbstate_t=yes
18613 echo "$as_me: failed program was:" >&5
18614 cat conftest.$ac_ext >&5
18615 cf_cv_mbstate_t=unknown
18617 rm -f conftest.$ac_objext conftest.$ac_ext
18619 rm -f conftest.$ac_objext conftest.$ac_ext
18621 echo "$as_me:18621: result: $cf_cv_mbstate_t" >&5
18622 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
18624 if test "$cf_cv_mbstate_t" = yes ; then
18626 cat >>confdefs.h <<\EOF
18627 #define NEED_WCHAR_H 1
18633 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
18634 if test "$cf_cv_mbstate_t" = unknown ; then
18635 NCURSES_MBSTATE_T=1
18638 # if we find mbstate_t in either place, use substitution to provide a fallback.
18639 if test "$cf_cv_mbstate_t" != unknown ; then
18640 NCURSES_OK_MBSTATE_T=1
18643 # This is needed on Tru64 5.0 to declare wchar_t
18644 echo "$as_me:18644: checking if we must include wchar.h to declare wchar_t" >&5
18645 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
18646 if test "${cf_cv_wchar_t+set}" = set; then
18647 echo $ECHO_N "(cached) $ECHO_C" >&6
18650 cat >conftest.$ac_ext <<_ACEOF
18651 #line 18651 "configure"
18652 #include "confdefs.h"
18654 #include <stdlib.h>
18655 #include <stdarg.h>
18657 #ifdef HAVE_LIBUTF8_H
18658 #include <libutf8.h>
18668 rm -f conftest.$ac_objext
18669 if { (eval echo "$as_me:18669: \"$ac_compile\"") >&5
18670 (eval $ac_compile) 2>&5
18672 echo "$as_me:18672: \$? = $ac_status" >&5
18673 (exit $ac_status); } &&
18674 { ac_try='test -s conftest.$ac_objext'
18675 { (eval echo "$as_me:18675: \"$ac_try\"") >&5
18676 (eval $ac_try) 2>&5
18678 echo "$as_me:18678: \$? = $ac_status" >&5
18679 (exit $ac_status); }; }; then
18682 echo "$as_me: failed program was:" >&5
18683 cat conftest.$ac_ext >&5
18684 cat >conftest.$ac_ext <<_ACEOF
18685 #line 18685 "configure"
18686 #include "confdefs.h"
18688 #include <stdlib.h>
18689 #include <stdarg.h>
18692 #ifdef HAVE_LIBUTF8_H
18693 #include <libutf8.h>
18703 rm -f conftest.$ac_objext
18704 if { (eval echo "$as_me:18704: \"$ac_compile\"") >&5
18705 (eval $ac_compile) 2>&5
18707 echo "$as_me:18707: \$? = $ac_status" >&5
18708 (exit $ac_status); } &&
18709 { ac_try='test -s conftest.$ac_objext'
18710 { (eval echo "$as_me:18710: \"$ac_try\"") >&5
18711 (eval $ac_try) 2>&5
18713 echo "$as_me:18713: \$? = $ac_status" >&5
18714 (exit $ac_status); }; }; then
18717 echo "$as_me: failed program was:" >&5
18718 cat conftest.$ac_ext >&5
18719 cf_cv_wchar_t=unknown
18721 rm -f conftest.$ac_objext conftest.$ac_ext
18723 rm -f conftest.$ac_objext conftest.$ac_ext
18725 echo "$as_me:18725: result: $cf_cv_wchar_t" >&5
18726 echo "${ECHO_T}$cf_cv_wchar_t" >&6
18728 if test "$cf_cv_wchar_t" = yes ; then
18730 cat >>confdefs.h <<\EOF
18731 #define NEED_WCHAR_H 1
18737 # if we do not find wchar_t in either place, use substitution to provide a fallback.
18738 if test "$cf_cv_wchar_t" = unknown ; then
18742 # if we find wchar_t in either place, use substitution to provide a fallback.
18743 if test "$cf_cv_wchar_t" != unknown ; then
18744 NCURSES_OK_WCHAR_T=1
18747 # This is needed on Tru64 5.0 to declare wint_t
18748 echo "$as_me:18748: checking if we must include wchar.h to declare wint_t" >&5
18749 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
18750 if test "${cf_cv_wint_t+set}" = set; then
18751 echo $ECHO_N "(cached) $ECHO_C" >&6
18754 cat >conftest.$ac_ext <<_ACEOF
18755 #line 18755 "configure"
18756 #include "confdefs.h"
18758 #include <stdlib.h>
18759 #include <stdarg.h>
18761 #ifdef HAVE_LIBUTF8_H
18762 #include <libutf8.h>
18772 rm -f conftest.$ac_objext
18773 if { (eval echo "$as_me:18773: \"$ac_compile\"") >&5
18774 (eval $ac_compile) 2>&5
18776 echo "$as_me:18776: \$? = $ac_status" >&5
18777 (exit $ac_status); } &&
18778 { ac_try='test -s conftest.$ac_objext'
18779 { (eval echo "$as_me:18779: \"$ac_try\"") >&5
18780 (eval $ac_try) 2>&5
18782 echo "$as_me:18782: \$? = $ac_status" >&5
18783 (exit $ac_status); }; }; then
18786 echo "$as_me: failed program was:" >&5
18787 cat conftest.$ac_ext >&5
18788 cat >conftest.$ac_ext <<_ACEOF
18789 #line 18789 "configure"
18790 #include "confdefs.h"
18792 #include <stdlib.h>
18793 #include <stdarg.h>
18796 #ifdef HAVE_LIBUTF8_H
18797 #include <libutf8.h>
18807 rm -f conftest.$ac_objext
18808 if { (eval echo "$as_me:18808: \"$ac_compile\"") >&5
18809 (eval $ac_compile) 2>&5
18811 echo "$as_me:18811: \$? = $ac_status" >&5
18812 (exit $ac_status); } &&
18813 { ac_try='test -s conftest.$ac_objext'
18814 { (eval echo "$as_me:18814: \"$ac_try\"") >&5
18815 (eval $ac_try) 2>&5
18817 echo "$as_me:18817: \$? = $ac_status" >&5
18818 (exit $ac_status); }; }; then
18821 echo "$as_me: failed program was:" >&5
18822 cat conftest.$ac_ext >&5
18823 cf_cv_wint_t=unknown
18825 rm -f conftest.$ac_objext conftest.$ac_ext
18827 rm -f conftest.$ac_objext conftest.$ac_ext
18829 echo "$as_me:18829: result: $cf_cv_wint_t" >&5
18830 echo "${ECHO_T}$cf_cv_wint_t" >&6
18832 if test "$cf_cv_wint_t" = yes ; then
18834 cat >>confdefs.h <<\EOF
18835 #define NEED_WCHAR_H 1
18841 # if we do not find wint_t in either place, use substitution to provide a fallback.
18842 if test "$cf_cv_wint_t" = unknown ; then
18846 # if we find wint_t in either place, use substitution to provide a fallback.
18847 if test "$cf_cv_wint_t" != unknown ; then
18848 NCURSES_OK_WINT_T=1
18851 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
18853 echo "$as_me:18853: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
18854 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
18855 cat >conftest.$ac_ext <<_ACEOF
18856 #line 18856 "configure"
18857 #include "confdefs.h"
18859 #ifndef _XOPEN_SOURCE_EXTENDED
18860 #define _XOPEN_SOURCE_EXTENDED
18862 #include <${cf_cv_ncurses_header:-curses.h}>
18873 rm -f conftest.$ac_objext
18874 if { (eval echo "$as_me:18874: \"$ac_compile\"") >&5
18875 (eval $ac_compile) 2>&5
18877 echo "$as_me:18877: \$? = $ac_status" >&5
18878 (exit $ac_status); } &&
18879 { ac_try='test -s conftest.$ac_objext'
18880 { (eval echo "$as_me:18880: \"$ac_try\"") >&5
18881 (eval $ac_try) 2>&5
18883 echo "$as_me:18883: \$? = $ac_status" >&5
18884 (exit $ac_status); }; }; then
18887 echo "$as_me: failed program was:" >&5
18888 cat conftest.$ac_ext >&5
18891 rm -f conftest.$ac_objext conftest.$ac_ext
18892 echo "$as_me:18892: result: $cf_result" >&5
18893 echo "${ECHO_T}$cf_result" >&6
18894 if test $cf_result = yes ; then
18896 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18898 cat >>confdefs.h <<EOF
18899 #define $cf_result 1
18904 cat >>confdefs.h <<EOF
18905 #define mbstate_t long
18912 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
18914 echo "$as_me:18914: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
18915 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
18916 cat >conftest.$ac_ext <<_ACEOF
18917 #line 18917 "configure"
18918 #include "confdefs.h"
18920 #ifndef _XOPEN_SOURCE_EXTENDED
18921 #define _XOPEN_SOURCE_EXTENDED
18923 #include <${cf_cv_ncurses_header:-curses.h}>
18934 rm -f conftest.$ac_objext
18935 if { (eval echo "$as_me:18935: \"$ac_compile\"") >&5
18936 (eval $ac_compile) 2>&5
18938 echo "$as_me:18938: \$? = $ac_status" >&5
18939 (exit $ac_status); } &&
18940 { ac_try='test -s conftest.$ac_objext'
18941 { (eval echo "$as_me:18941: \"$ac_try\"") >&5
18942 (eval $ac_try) 2>&5
18944 echo "$as_me:18944: \$? = $ac_status" >&5
18945 (exit $ac_status); }; }; then
18948 echo "$as_me: failed program was:" >&5
18949 cat conftest.$ac_ext >&5
18952 rm -f conftest.$ac_objext conftest.$ac_ext
18953 echo "$as_me:18953: result: $cf_result" >&5
18954 echo "${ECHO_T}$cf_result" >&6
18955 if test $cf_result = yes ; then
18957 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18959 cat >>confdefs.h <<EOF
18960 #define $cf_result 1
18965 cat >>confdefs.h <<EOF
18966 #define wchar_t long
18973 if test "$NCURSES_OK_WINT_T" = 0 ; then
18975 echo "$as_me:18975: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
18976 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
18977 cat >conftest.$ac_ext <<_ACEOF
18978 #line 18978 "configure"
18979 #include "confdefs.h"
18981 #ifndef _XOPEN_SOURCE_EXTENDED
18982 #define _XOPEN_SOURCE_EXTENDED
18984 #include <${cf_cv_ncurses_header:-curses.h}>
18995 rm -f conftest.$ac_objext
18996 if { (eval echo "$as_me:18996: \"$ac_compile\"") >&5
18997 (eval $ac_compile) 2>&5
18999 echo "$as_me:18999: \$? = $ac_status" >&5
19000 (exit $ac_status); } &&
19001 { ac_try='test -s conftest.$ac_objext'
19002 { (eval echo "$as_me:19002: \"$ac_try\"") >&5
19003 (eval $ac_try) 2>&5
19005 echo "$as_me:19005: \$? = $ac_status" >&5
19006 (exit $ac_status); }; }; then
19009 echo "$as_me: failed program was:" >&5
19010 cat conftest.$ac_ext >&5
19013 rm -f conftest.$ac_objext conftest.$ac_ext
19014 echo "$as_me:19014: result: $cf_result" >&5
19015 echo "${ECHO_T}$cf_result" >&6
19016 if test $cf_result = yes ; then
19018 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19020 cat >>confdefs.h <<EOF
19021 #define $cf_result 1
19026 cat >>confdefs.h <<EOF
19027 #define wint_t long
19042 echo "$as_me:19042: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
19043 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19045 cat >conftest.$ac_ext <<_ACEOF
19046 #line 19046 "configure"
19047 #include "confdefs.h"
19049 #ifdef HAVE_XCURSES
19050 #include <xcurses.h>
19051 char * XCursesProgramName = "test";
19053 #include <${cf_cv_ncurses_header:-curses.h}>
19054 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19055 #include <ncursesw/term.h>
19056 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19057 #include <ncurses/term.h>
19058 #elif defined(HAVE_TERM_H)
19067 void *foo = &($cf_data)
19073 rm -f conftest.$ac_objext
19074 if { (eval echo "$as_me:19074: \"$ac_compile\"") >&5
19075 (eval $ac_compile) 2>&5
19077 echo "$as_me:19077: \$? = $ac_status" >&5
19078 (exit $ac_status); } &&
19079 { ac_try='test -s conftest.$ac_objext'
19080 { (eval echo "$as_me:19080: \"$ac_try\"") >&5
19081 (eval $ac_try) 2>&5
19083 echo "$as_me:19083: \$? = $ac_status" >&5
19084 (exit $ac_status); }; }; then
19088 echo "$as_me: failed program was:" >&5
19089 cat conftest.$ac_ext >&5
19092 rm -f conftest.$ac_objext conftest.$ac_ext
19093 echo "$as_me:19093: result: $cf_result" >&5
19094 echo "${ECHO_T}$cf_result" >&6
19096 if test $cf_result = yes ; then
19098 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19100 cat >>confdefs.h <<EOF
19101 #define $cf_result 1
19105 echo "$as_me:19105: checking for data $cf_data in library" >&5
19106 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
19107 # BSD linkers insist on making weak linkage, but resolve at runtime.
19108 if test "$cross_compiling" = yes; then
19111 cat >conftest.$ac_ext <<_ACEOF
19112 #line 19112 "configure"
19113 #include "confdefs.h"
19115 #ifdef HAVE_XCURSES
19116 #include <xcurses.h>
19117 char * XCursesProgramName = "test";
19119 #include <${cf_cv_ncurses_header:-curses.h}>
19120 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19121 #include <ncursesw/term.h>
19122 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19123 #include <ncurses/term.h>
19124 #elif defined(HAVE_TERM_H)
19129 extern char $cf_data;
19135 void *foo = &($cf_data);
19136 fprintf(stderr, "testing linkage of $cf_data:%p\n", (void *)foo);
19137 ${cf_cv_main_return:-return}(foo == 0);
19144 rm -f conftest.$ac_objext conftest$ac_exeext
19145 if { (eval echo "$as_me:19145: \"$ac_link\"") >&5
19146 (eval $ac_link) 2>&5
19148 echo "$as_me:19148: \$? = $ac_status" >&5
19149 (exit $ac_status); } &&
19150 { ac_try='test -s conftest$ac_exeext'
19151 { (eval echo "$as_me:19151: \"$ac_try\"") >&5
19152 (eval $ac_try) 2>&5
19154 echo "$as_me:19154: \$? = $ac_status" >&5
19155 (exit $ac_status); }; }; then
19158 echo "$as_me: failed program was:" >&5
19159 cat conftest.$ac_ext >&5
19162 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19165 cat >conftest.$ac_ext <<_ACEOF
19166 #line 19166 "configure"
19167 #include "confdefs.h"
19169 #ifdef HAVE_XCURSES
19170 #include <xcurses.h>
19171 char * XCursesProgramName = "test";
19173 #include <${cf_cv_ncurses_header:-curses.h}>
19174 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19175 #include <ncursesw/term.h>
19176 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19177 #include <ncurses/term.h>
19178 #elif defined(HAVE_TERM_H)
19183 extern char $cf_data;
19186 void *foo = &($cf_data);
19187 fprintf(stderr, "testing linkage of $cf_data:%p\n", (void *)foo);
19188 ${cf_cv_main_return:-return}(foo == 0);
19191 rm -f conftest$ac_exeext
19192 if { (eval echo "$as_me:19192: \"$ac_link\"") >&5
19193 (eval $ac_link) 2>&5
19195 echo "$as_me:19195: \$? = $ac_status" >&5
19196 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19197 { (eval echo "$as_me:19197: \"$ac_try\"") >&5
19198 (eval $ac_try) 2>&5
19200 echo "$as_me:19200: \$? = $ac_status" >&5
19201 (exit $ac_status); }; }; then
19205 echo "$as_me: program exited with status $ac_status" >&5
19206 echo "$as_me: failed program was:" >&5
19207 cat conftest.$ac_ext >&5
19210 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19212 echo "$as_me:19212: result: $cf_result" >&5
19213 echo "${ECHO_T}$cf_result" >&6
19214 if test $cf_result = yes ; then
19216 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19218 cat >>confdefs.h <<EOF
19219 #define $cf_result 1
19222 # do not exit loop here, since we prefer system's declarations
19227 if ( test "$GCC" = yes || test "$GXX" = yes )
19229 echo "$as_me:19229: checking if you want to turn on gcc warnings" >&5
19230 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
19232 # Check whether --enable-warnings or --disable-warnings was given.
19233 if test "${enable_warnings+set}" = set; then
19234 enableval="$enable_warnings"
19235 test "$enableval" != yes && enableval=no
19236 if test "$enableval" != "no" ; then
19246 echo "$as_me:19246: result: $with_warnings" >&5
19247 echo "${ECHO_T}$with_warnings" >&6
19248 if test "$with_warnings" = "yes"
19251 if test "$GCC" = yes
19253 cat > conftest.i <<EOF
19255 #define GCC_PRINTF 0
19258 #define GCC_SCANF 0
19260 #ifndef GCC_NORETURN
19261 #define GCC_NORETURN /* nothing */
19264 #define GCC_UNUSED /* nothing */
19267 if test "$GCC" = yes
19269 { echo "$as_me:19269: checking for $CC __attribute__ directives..." >&5
19270 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
19271 cat > conftest.$ac_ext <<EOF
19272 #line 19272 "${as_me:-configure}"
19273 #include "confdefs.h"
19274 #include "conftest.h"
19275 #include "conftest.i"
19277 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
19279 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
19282 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
19284 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
19286 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
19287 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
19288 extern void foo(void) GCC_NORETURN;
19289 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
19291 cf_printf_attribute=no
19292 cf_scanf_attribute=no
19293 for cf_attribute in scanf printf unused noreturn
19296 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19298 cf_directive="__attribute__(($cf_attribute))"
19299 echo "checking for $CC $cf_directive" 1>&5
19301 case $cf_attribute in
19303 cf_printf_attribute=yes
19304 cat >conftest.h <<EOF
19305 #define GCC_$cf_ATTRIBUTE 1
19309 cf_scanf_attribute=yes
19310 cat >conftest.h <<EOF
19311 #define GCC_$cf_ATTRIBUTE 1
19315 cat >conftest.h <<EOF
19316 #define GCC_$cf_ATTRIBUTE $cf_directive
19321 if { (eval echo "$as_me:19321: \"$ac_compile\"") >&5
19322 (eval $ac_compile) 2>&5
19324 echo "$as_me:19324: \$? = $ac_status" >&5
19325 (exit $ac_status); }; then
19326 test -n "$verbose" && echo "$as_me:19326: result: ... $cf_attribute" >&5
19327 echo "${ECHO_T}... $cf_attribute" >&6
19328 cat conftest.h >>confdefs.h
19329 case $cf_attribute in
19332 cat >>confdefs.h <<EOF
19333 #define GCC_NORETURN $cf_directive
19338 cf_value='/* nothing */'
19339 if test "$cf_printf_attribute" != no ; then
19340 cf_value='__attribute__((format(printf,fmt,var)))'
19342 cat >>confdefs.h <<\EOF
19343 #define GCC_PRINTF 1
19348 cat >>confdefs.h <<EOF
19349 #define GCC_PRINTFLIKE(fmt,var) $cf_value
19354 cf_value='/* nothing */'
19355 if test "$cf_scanf_attribute" != no ; then
19356 cf_value='__attribute__((format(scanf,fmt,var)))'
19358 cat >>confdefs.h <<\EOF
19359 #define GCC_SCANF 1
19364 cat >>confdefs.h <<EOF
19365 #define GCC_SCANFLIKE(fmt,var) $cf_value
19371 cat >>confdefs.h <<EOF
19372 #define GCC_UNUSED $cf_directive
19380 fgrep define conftest.i >>confdefs.h
19387 if test "$GCC" = yes ; then
19390 echo "$as_me:19390: checking if this is really Intel C compiler" >&5
19391 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
19392 cf_save_CFLAGS="$CFLAGS"
19393 CFLAGS="$CFLAGS -no-gcc"
19394 cat >conftest.$ac_ext <<_ACEOF
19395 #line 19395 "configure"
19396 #include "confdefs.h"
19402 #ifdef __INTEL_COMPILER
19411 rm -f conftest.$ac_objext
19412 if { (eval echo "$as_me:19412: \"$ac_compile\"") >&5
19413 (eval $ac_compile) 2>&5
19415 echo "$as_me:19415: \$? = $ac_status" >&5
19416 (exit $ac_status); } &&
19417 { ac_try='test -s conftest.$ac_objext'
19418 { (eval echo "$as_me:19418: \"$ac_try\"") >&5
19419 (eval $ac_try) 2>&5
19421 echo "$as_me:19421: \$? = $ac_status" >&5
19422 (exit $ac_status); }; }; then
19424 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
19427 echo "$as_me: failed program was:" >&5
19428 cat conftest.$ac_ext >&5
19430 rm -f conftest.$ac_objext conftest.$ac_ext
19431 CFLAGS="$cf_save_CFLAGS"
19432 echo "$as_me:19432: result: $INTEL_COMPILER" >&5
19433 echo "${ECHO_T}$INTEL_COMPILER" >&6
19440 if test "$GCC" = yes ; then
19441 echo "$as_me:19441: checking if this is really Clang C compiler" >&5
19442 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
19443 cf_save_CFLAGS="$CFLAGS"
19444 CFLAGS="$CFLAGS -Qunused-arguments"
19445 cat >conftest.$ac_ext <<_ACEOF
19446 #line 19446 "configure"
19447 #include "confdefs.h"
19462 rm -f conftest.$ac_objext
19463 if { (eval echo "$as_me:19463: \"$ac_compile\"") >&5
19464 (eval $ac_compile) 2>&5
19466 echo "$as_me:19466: \$? = $ac_status" >&5
19467 (exit $ac_status); } &&
19468 { ac_try='test -s conftest.$ac_objext'
19469 { (eval echo "$as_me:19469: \"$ac_try\"") >&5
19470 (eval $ac_try) 2>&5
19472 echo "$as_me:19472: \$? = $ac_status" >&5
19473 (exit $ac_status); }; }; then
19475 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
19478 echo "$as_me: failed program was:" >&5
19479 cat conftest.$ac_ext >&5
19481 rm -f conftest.$ac_objext conftest.$ac_ext
19482 CFLAGS="$cf_save_CFLAGS"
19483 echo "$as_me:19483: result: $CLANG_COMPILER" >&5
19484 echo "${ECHO_T}$CLANG_COMPILER" >&6
19487 cat > conftest.$ac_ext <<EOF
19488 #line 19488 "${as_me:-configure}"
19489 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
19492 if test "$INTEL_COMPILER" = yes
19494 # The "-wdXXX" options suppress warnings:
19495 # remark #1419: external declaration in primary source file
19496 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
19497 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
19498 # remark #193: zero used for undefined preprocessing identifier
19499 # remark #593: variable "curs_sb_left_arrow" was set but never used
19500 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
19501 # remark #869: parameter "tw" was never referenced
19502 # remark #981: operands are evaluated in unspecified order
19503 # warning #279: controlling expression is constant
19505 { echo "$as_me:19505: checking for $CC warning options..." >&5
19506 echo "$as_me: checking for $CC warning options..." >&6;}
19507 cf_save_CFLAGS="$CFLAGS"
19508 EXTRA_CFLAGS="-Wall"
19520 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
19521 if { (eval echo "$as_me:19521: \"$ac_compile\"") >&5
19522 (eval $ac_compile) 2>&5
19524 echo "$as_me:19524: \$? = $ac_status" >&5
19525 (exit $ac_status); }; then
19526 test -n "$verbose" && echo "$as_me:19526: result: ... -$cf_opt" >&5
19527 echo "${ECHO_T}... -$cf_opt" >&6
19528 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
19531 CFLAGS="$cf_save_CFLAGS"
19533 elif test "$GCC" = yes
19535 { echo "$as_me:19535: checking for $CC warning options..." >&5
19536 echo "$as_me: checking for $CC warning options..." >&6;}
19537 cf_save_CFLAGS="$CFLAGS"
19540 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
19541 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
19542 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
19543 for cf_opt in W Wall \
19544 Wbad-function-cast \
19547 Wdeclaration-after-statement \
19550 Wmissing-declarations \
19551 Wmissing-prototypes \
19555 Wstrict-prototypes \
19556 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
19558 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
19559 if { (eval echo "$as_me:19559: \"$ac_compile\"") >&5
19560 (eval $ac_compile) 2>&5
19562 echo "$as_me:19562: \$? = $ac_status" >&5
19563 (exit $ac_status); }; then
19564 test -n "$verbose" && echo "$as_me:19564: result: ... -$cf_opt" >&5
19565 echo "${ECHO_T}... -$cf_opt" >&6
19569 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19570 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
19574 case $GCC_VERSION in
19576 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
19578 echo "${as_me:-configure}:19578: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
19584 case $GCC_VERSION in
19586 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
19588 echo "${as_me:-configure}:19588: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
19594 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
19597 CFLAGS="$cf_save_CFLAGS"
19604 echo "$as_me:19604: checking if you want to use dmalloc for testing" >&5
19605 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
19607 # Check whether --with-dmalloc or --without-dmalloc was given.
19608 if test "${with_dmalloc+set}" = set; then
19609 withval="$with_dmalloc"
19611 cat >>confdefs.h <<EOF
19612 #define USE_DMALLOC 1
19615 : ${with_cflags:=-g}
19616 : ${with_no_leaks:=yes}
19621 echo "$as_me:19621: result: ${with_dmalloc:-no}" >&5
19622 echo "${ECHO_T}${with_dmalloc:-no}" >&6
19624 case .$with_cflags in
19634 cf_new_extra_cppflags=
19636 for cf_add_cflags in -g
19638 case $cf_fix_cppflags in
19640 case $cf_add_cflags in
19641 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19642 case $cf_add_cflags in
19644 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19646 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19647 && test -z "${cf_tst_cflags}" \
19648 && cf_fix_cppflags=yes
19650 if test $cf_fix_cppflags = yes ; then
19652 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19653 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19656 elif test "${cf_tst_cflags}" = "\"'" ; then
19658 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19659 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19665 case "$CPPFLAGS" in
19669 case $cf_add_cflags in
19671 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19673 CPPFLAGS=`echo "$CPPFLAGS" | \
19674 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
19675 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
19680 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19681 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19688 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19689 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19696 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19697 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19699 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19701 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19702 && test -z "${cf_tst_cflags}" \
19703 && cf_fix_cppflags=no
19708 if test -n "$cf_new_cflags" ; then
19710 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19711 CFLAGS="${CFLAGS}$cf_new_cflags"
19715 if test -n "$cf_new_cppflags" ; then
19717 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19718 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19722 if test -n "$cf_new_extra_cppflags" ; then
19724 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19725 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19734 if test "$with_dmalloc" = yes ; then
19735 echo "$as_me:19735: checking for dmalloc.h" >&5
19736 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
19737 if test "${ac_cv_header_dmalloc_h+set}" = set; then
19738 echo $ECHO_N "(cached) $ECHO_C" >&6
19740 cat >conftest.$ac_ext <<_ACEOF
19741 #line 19741 "configure"
19742 #include "confdefs.h"
19743 #include <dmalloc.h>
19745 if { (eval echo "$as_me:19745: \"$ac_cpp conftest.$ac_ext\"") >&5
19746 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19748 egrep -v '^ *\+' conftest.er1 >conftest.err
19750 cat conftest.err >&5
19751 echo "$as_me:19751: \$? = $ac_status" >&5
19752 (exit $ac_status); } >/dev/null; then
19753 if test -s conftest.err; then
19754 ac_cpp_err=$ac_c_preproc_warn_flag
19761 if test -z "$ac_cpp_err"; then
19762 ac_cv_header_dmalloc_h=yes
19764 echo "$as_me: failed program was:" >&5
19765 cat conftest.$ac_ext >&5
19766 ac_cv_header_dmalloc_h=no
19768 rm -f conftest.err conftest.$ac_ext
19770 echo "$as_me:19770: result: $ac_cv_header_dmalloc_h" >&5
19771 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
19772 if test $ac_cv_header_dmalloc_h = yes; then
19774 echo "$as_me:19774: checking for dmalloc_debug in -ldmalloc" >&5
19775 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
19776 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
19777 echo $ECHO_N "(cached) $ECHO_C" >&6
19779 ac_check_lib_save_LIBS=$LIBS
19780 LIBS="-ldmalloc $LIBS"
19781 cat >conftest.$ac_ext <<_ACEOF
19782 #line 19782 "configure"
19783 #include "confdefs.h"
19785 /* Override any gcc2 internal prototype to avoid an error. */
19789 /* We use char because int might match the return type of a gcc2
19790 builtin and then its argument prototype would still apply. */
19791 char dmalloc_debug ();
19800 rm -f conftest.$ac_objext conftest$ac_exeext
19801 if { (eval echo "$as_me:19801: \"$ac_link\"") >&5
19802 (eval $ac_link) 2>&5
19804 echo "$as_me:19804: \$? = $ac_status" >&5
19805 (exit $ac_status); } &&
19806 { ac_try='test -s conftest$ac_exeext'
19807 { (eval echo "$as_me:19807: \"$ac_try\"") >&5
19808 (eval $ac_try) 2>&5
19810 echo "$as_me:19810: \$? = $ac_status" >&5
19811 (exit $ac_status); }; }; then
19812 ac_cv_lib_dmalloc_dmalloc_debug=yes
19814 echo "$as_me: failed program was:" >&5
19815 cat conftest.$ac_ext >&5
19816 ac_cv_lib_dmalloc_dmalloc_debug=no
19818 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19819 LIBS=$ac_check_lib_save_LIBS
19821 echo "$as_me:19821: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
19822 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
19823 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
19824 cat >>confdefs.h <<EOF
19825 #define HAVE_LIBDMALLOC 1
19828 LIBS="-ldmalloc $LIBS"
19836 echo "$as_me:19836: checking if you want to use dbmalloc for testing" >&5
19837 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
19839 # Check whether --with-dbmalloc or --without-dbmalloc was given.
19840 if test "${with_dbmalloc+set}" = set; then
19841 withval="$with_dbmalloc"
19843 cat >>confdefs.h <<EOF
19844 #define USE_DBMALLOC 1
19847 : ${with_cflags:=-g}
19848 : ${with_no_leaks:=yes}
19853 echo "$as_me:19853: result: ${with_dbmalloc:-no}" >&5
19854 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
19856 case .$with_cflags in
19866 cf_new_extra_cppflags=
19868 for cf_add_cflags in -g
19870 case $cf_fix_cppflags in
19872 case $cf_add_cflags in
19873 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19874 case $cf_add_cflags in
19876 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19878 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19879 && test -z "${cf_tst_cflags}" \
19880 && cf_fix_cppflags=yes
19882 if test $cf_fix_cppflags = yes ; then
19884 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19885 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19888 elif test "${cf_tst_cflags}" = "\"'" ; then
19890 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19891 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19897 case "$CPPFLAGS" in
19901 case $cf_add_cflags in
19903 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19905 CPPFLAGS=`echo "$CPPFLAGS" | \
19906 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
19907 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
19912 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19913 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19920 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19921 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19928 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19929 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19931 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19933 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19934 && test -z "${cf_tst_cflags}" \
19935 && cf_fix_cppflags=no
19940 if test -n "$cf_new_cflags" ; then
19942 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19943 CFLAGS="${CFLAGS}$cf_new_cflags"
19947 if test -n "$cf_new_cppflags" ; then
19949 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19950 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19954 if test -n "$cf_new_extra_cppflags" ; then
19956 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19957 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19966 if test "$with_dbmalloc" = yes ; then
19967 echo "$as_me:19967: checking for dbmalloc.h" >&5
19968 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
19969 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
19970 echo $ECHO_N "(cached) $ECHO_C" >&6
19972 cat >conftest.$ac_ext <<_ACEOF
19973 #line 19973 "configure"
19974 #include "confdefs.h"
19975 #include <dbmalloc.h>
19977 if { (eval echo "$as_me:19977: \"$ac_cpp conftest.$ac_ext\"") >&5
19978 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19980 egrep -v '^ *\+' conftest.er1 >conftest.err
19982 cat conftest.err >&5
19983 echo "$as_me:19983: \$? = $ac_status" >&5
19984 (exit $ac_status); } >/dev/null; then
19985 if test -s conftest.err; then
19986 ac_cpp_err=$ac_c_preproc_warn_flag
19993 if test -z "$ac_cpp_err"; then
19994 ac_cv_header_dbmalloc_h=yes
19996 echo "$as_me: failed program was:" >&5
19997 cat conftest.$ac_ext >&5
19998 ac_cv_header_dbmalloc_h=no
20000 rm -f conftest.err conftest.$ac_ext
20002 echo "$as_me:20002: result: $ac_cv_header_dbmalloc_h" >&5
20003 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
20004 if test $ac_cv_header_dbmalloc_h = yes; then
20006 echo "$as_me:20006: checking for debug_malloc in -ldbmalloc" >&5
20007 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
20008 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
20009 echo $ECHO_N "(cached) $ECHO_C" >&6
20011 ac_check_lib_save_LIBS=$LIBS
20012 LIBS="-ldbmalloc $LIBS"
20013 cat >conftest.$ac_ext <<_ACEOF
20014 #line 20014 "configure"
20015 #include "confdefs.h"
20017 /* Override any gcc2 internal prototype to avoid an error. */
20021 /* We use char because int might match the return type of a gcc2
20022 builtin and then its argument prototype would still apply. */
20023 char debug_malloc ();
20032 rm -f conftest.$ac_objext conftest$ac_exeext
20033 if { (eval echo "$as_me:20033: \"$ac_link\"") >&5
20034 (eval $ac_link) 2>&5
20036 echo "$as_me:20036: \$? = $ac_status" >&5
20037 (exit $ac_status); } &&
20038 { ac_try='test -s conftest$ac_exeext'
20039 { (eval echo "$as_me:20039: \"$ac_try\"") >&5
20040 (eval $ac_try) 2>&5
20042 echo "$as_me:20042: \$? = $ac_status" >&5
20043 (exit $ac_status); }; }; then
20044 ac_cv_lib_dbmalloc_debug_malloc=yes
20046 echo "$as_me: failed program was:" >&5
20047 cat conftest.$ac_ext >&5
20048 ac_cv_lib_dbmalloc_debug_malloc=no
20050 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20051 LIBS=$ac_check_lib_save_LIBS
20053 echo "$as_me:20053: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
20054 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
20055 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
20056 cat >>confdefs.h <<EOF
20057 #define HAVE_LIBDBMALLOC 1
20060 LIBS="-ldbmalloc $LIBS"
20068 echo "$as_me:20068: checking if you want to use valgrind for testing" >&5
20069 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
20071 # Check whether --with-valgrind or --without-valgrind was given.
20072 if test "${with_valgrind+set}" = set; then
20073 withval="$with_valgrind"
20075 cat >>confdefs.h <<EOF
20076 #define USE_VALGRIND 1
20079 : ${with_cflags:=-g}
20080 : ${with_no_leaks:=yes}
20085 echo "$as_me:20085: result: ${with_valgrind:-no}" >&5
20086 echo "${ECHO_T}${with_valgrind:-no}" >&6
20088 case .$with_cflags in
20098 cf_new_extra_cppflags=
20100 for cf_add_cflags in -g
20102 case $cf_fix_cppflags in
20104 case $cf_add_cflags in
20105 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20106 case $cf_add_cflags in
20108 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20110 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20111 && test -z "${cf_tst_cflags}" \
20112 && cf_fix_cppflags=yes
20114 if test $cf_fix_cppflags = yes ; then
20116 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20117 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20120 elif test "${cf_tst_cflags}" = "\"'" ; then
20122 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20123 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20129 case "$CPPFLAGS" in
20133 case $cf_add_cflags in
20135 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20137 CPPFLAGS=`echo "$CPPFLAGS" | \
20138 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
20139 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
20144 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20145 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20152 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20153 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20160 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20161 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20163 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20165 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20166 && test -z "${cf_tst_cflags}" \
20167 && cf_fix_cppflags=no
20172 if test -n "$cf_new_cflags" ; then
20174 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20175 CFLAGS="${CFLAGS}$cf_new_cflags"
20179 if test -n "$cf_new_cppflags" ; then
20181 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20182 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20186 if test -n "$cf_new_extra_cppflags" ; then
20188 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20189 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20198 echo "$as_me:20198: checking if you want to perform memory-leak testing" >&5
20199 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
20201 # Check whether --enable-leaks or --disable-leaks was given.
20202 if test "${enable_leaks+set}" = set; then
20203 enableval="$enable_leaks"
20204 if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
20206 : ${with_no_leaks:=no}
20208 echo "$as_me:20208: result: $with_no_leaks" >&5
20209 echo "${ECHO_T}$with_no_leaks" >&6
20211 if test "$with_no_leaks" = yes ; then
20213 cat >>confdefs.h <<\EOF
20217 cat >>confdefs.h <<\EOF
20218 #define YY_NO_LEAKS 1
20224 if test "x$cf_cv_enable_rpath" != xno
20226 echo "$as_me:20226: checking for an rpath option" >&5
20227 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
20228 case $cf_cv_system_name in
20230 if test "$GCC" = yes; then
20231 LD_RPATH_OPT="-Wl,-rpath,"
20233 LD_RPATH_OPT="-rpath "
20236 (linux*|gnu*|k*bsd*-gnu|freebsd*)
20237 LD_RPATH_OPT="-Wl,-rpath,"
20239 (openbsd[2-9].*|mirbsd*)
20240 LD_RPATH_OPT="-Wl,-rpath,"
20243 LD_RPATH_OPT="-rpath "
20246 LD_RPATH_OPT="-Wl,-rpath,"
20249 LD_RPATH_OPT="-rpath "
20257 echo "$as_me:20257: result: $LD_RPATH_OPT" >&5
20258 echo "${ECHO_T}$LD_RPATH_OPT" >&6
20260 case "x$LD_RPATH_OPT" in
20262 echo "$as_me:20262: checking if we need a space after rpath option" >&5
20263 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
20264 cf_save_LIBS="$LIBS"
20266 cf_add_libs="${LD_RPATH_OPT}$libdir"
20267 # Filter out duplicates - this happens with badly-designed ".pc" files...
20268 for cf_add_1lib in $LIBS
20270 for cf_add_2lib in $cf_add_libs
20272 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20278 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20280 LIBS="$cf_add_libs"
20282 cat >conftest.$ac_ext <<_ACEOF
20283 #line 20283 "configure"
20284 #include "confdefs.h"
20294 rm -f conftest.$ac_objext conftest$ac_exeext
20295 if { (eval echo "$as_me:20295: \"$ac_link\"") >&5
20296 (eval $ac_link) 2>&5
20298 echo "$as_me:20298: \$? = $ac_status" >&5
20299 (exit $ac_status); } &&
20300 { ac_try='test -s conftest$ac_exeext'
20301 { (eval echo "$as_me:20301: \"$ac_try\"") >&5
20302 (eval $ac_try) 2>&5
20304 echo "$as_me:20304: \$? = $ac_status" >&5
20305 (exit $ac_status); }; }; then
20308 echo "$as_me: failed program was:" >&5
20309 cat conftest.$ac_ext >&5
20312 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20313 LIBS="$cf_save_LIBS"
20314 echo "$as_me:20314: result: $cf_rpath_space" >&5
20315 echo "${ECHO_T}$cf_rpath_space" >&6
20316 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
20321 echo "$as_me:20321: checking if rpath-hack should be disabled" >&5
20322 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
20324 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
20325 if test "${enable_rpath_hack+set}" = set; then
20326 enableval="$enable_rpath_hack"
20327 test "$enableval" != no && enableval=yes
20328 if test "$enableval" != "yes" ; then
20329 cf_disable_rpath_hack=yes
20331 cf_disable_rpath_hack=no
20335 cf_disable_rpath_hack=no
20338 echo "$as_me:20338: result: $cf_disable_rpath_hack" >&5
20339 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
20340 if test "$cf_disable_rpath_hack" = no ; then
20342 echo "$as_me:20342: checking for updated LDFLAGS" >&5
20343 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
20344 if test -n "$LD_RPATH_OPT" ; then
20345 echo "$as_me:20345: result: maybe" >&5
20346 echo "${ECHO_T}maybe" >&6
20350 # Extract the first word of "$ac_prog", so it can be a program name with args.
20351 set dummy $ac_prog; ac_word=$2
20352 echo "$as_me:20352: checking for $ac_word" >&5
20353 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20354 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
20355 echo $ECHO_N "(cached) $ECHO_C" >&6
20357 if test -n "$cf_ldd_prog"; then
20358 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
20360 ac_save_IFS=$IFS; IFS=$ac_path_separator
20362 for ac_dir in $ac_dummy; do
20364 test -z "$ac_dir" && ac_dir=.
20365 $as_executable_p "$ac_dir/$ac_word" || continue
20366 ac_cv_prog_cf_ldd_prog="$ac_prog"
20367 echo "$as_me:20367: found $ac_dir/$ac_word" >&5
20373 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
20374 if test -n "$cf_ldd_prog"; then
20375 echo "$as_me:20375: result: $cf_ldd_prog" >&5
20376 echo "${ECHO_T}$cf_ldd_prog" >&6
20378 echo "$as_me:20378: result: no" >&5
20379 echo "${ECHO_T}no" >&6
20382 test -n "$cf_ldd_prog" && break
20384 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
20386 cf_rpath_list="/usr/lib /lib"
20387 if test "$cf_ldd_prog" != no
20391 cat >conftest.$ac_ext <<_ACEOF
20392 #line 20392 "configure"
20393 #include "confdefs.h"
20403 rm -f conftest.$ac_objext conftest$ac_exeext
20404 if { (eval echo "$as_me:20404: \"$ac_link\"") >&5
20405 (eval $ac_link) 2>&5
20407 echo "$as_me:20407: \$? = $ac_status" >&5
20408 (exit $ac_status); } &&
20409 { ac_try='test -s conftest$ac_exeext'
20410 { (eval echo "$as_me:20410: \"$ac_try\"") >&5
20411 (eval $ac_try) 2>&5
20413 echo "$as_me:20413: \$? = $ac_status" >&5
20414 (exit $ac_status); }; }; then
20415 cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
20416 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
20418 echo "$as_me: failed program was:" >&5
20419 cat conftest.$ac_ext >&5
20421 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20423 # If we passed the link-test, but get a "not found" on a given library,
20424 # this could be due to inept reconfiguration of gcc to make it only
20425 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
20426 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
20427 # /usr/local libraries.
20428 if test -n "$cf_rpath_oops"
20430 for cf_rpath_src in $cf_rpath_oops
20432 for cf_rpath_dir in \
20437 if test -f $cf_rpath_dir/lib/$cf_rpath_src
20439 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
20441 echo "${as_me:-configure}:20441: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
20443 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
20451 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
20453 echo "${as_me:-configure}:20453: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
20455 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
20457 echo "${as_me:-configure}:20457: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
20460 for cf_rpath_src in $LDFLAGS
20462 case $cf_rpath_src in
20465 # check if this refers to a directory which we will ignore
20467 if test -n "$cf_rpath_list"
20469 for cf_rpath_item in $cf_rpath_list
20471 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
20479 if test "$cf_rpath_skip" = no
20481 # transform the option
20482 if test "$LD_RPATH_OPT" = "-R " ; then
20483 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
20485 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
20488 # if we have not already added this, add it now
20489 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
20490 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
20492 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
20494 echo "${as_me:-configure}:20494: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
20496 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
20501 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
20503 LDFLAGS=$cf_rpath_dst
20505 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
20507 echo "${as_me:-configure}:20507: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
20509 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
20511 echo "${as_me:-configure}:20511: testing ...checking LIBS $LIBS ..." 1>&5
20514 for cf_rpath_src in $LIBS
20516 case $cf_rpath_src in
20519 # check if this refers to a directory which we will ignore
20521 if test -n "$cf_rpath_list"
20523 for cf_rpath_item in $cf_rpath_list
20525 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
20533 if test "$cf_rpath_skip" = no
20535 # transform the option
20536 if test "$LD_RPATH_OPT" = "-R " ; then
20537 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
20539 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
20542 # if we have not already added this, add it now
20543 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
20544 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
20546 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
20548 echo "${as_me:-configure}:20548: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
20550 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
20555 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
20559 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
20561 echo "${as_me:-configure}:20561: testing ...checked LIBS $LIBS ..." 1>&5
20563 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
20565 echo "${as_me:-configure}:20565: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
20568 echo "$as_me:20568: result: no" >&5
20569 echo "${ECHO_T}no" >&6
20577 ac_config_files="$ac_config_files Makefile"
20578 ac_config_commands="$ac_config_commands default"
20579 cat >confcache <<\_ACEOF
20580 # This file is a shell script that caches the results of configure
20581 # tests run on this system so they can be shared between configure
20582 # scripts and configure runs, see configure's option --config-cache.
20583 # It is not useful on other systems. If it contains results you don't
20584 # want to keep, you may remove or edit it.
20586 # config.status only pays attention to the cache file if you give it
20587 # the --recheck option to rerun configure.
20589 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20590 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20591 # following values.
20595 # The following way of writing the cache mishandles newlines in values,
20596 # but we know of no workaround that is simple, portable, and efficient.
20597 # So, don't put newlines in cache variables' values.
20598 # Ultrix sh set writes to stderr and can't be redirected directly,
20599 # and sets the high bit in the cache file unless we assign to the vars.
20602 case `(ac_space=' '; set | grep ac_space) 2>&1` in
20604 # `set' does not quote correctly, so add quotes (double-quote
20605 # substitution turns \\\\ into \\, and sed turns \\ into \).
20608 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20611 # `set' quotes correctly as required by POSIX, so do not add quotes.
20613 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20620 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20622 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20624 if cmp -s $cache_file confcache; then :; else
20625 if test -w $cache_file; then
20626 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20627 cat confcache >$cache_file
20629 echo "not updating unwritable cache $cache_file"
20634 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20635 # Let make expand exec_prefix.
20636 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20638 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20639 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20640 # trailing colons and then remove the whole line if VPATH becomes empty
20641 # (actually we leave an empty line to preserve line numbers).
20642 if test "x$srcdir" = x.; then
20643 ac_vpsub='/^[ ]*VPATH[ ]*=/{
20644 s/:*\$(srcdir):*/:/;
20645 s/:*\${srcdir}:*/:/;
20647 s/^\([^=]*=[ ]*\):*/\1/;
20653 DEFS=-DHAVE_CONFIG_H
20655 : ${CONFIG_STATUS=./config.status}
20656 ac_clean_files_save=$ac_clean_files
20657 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20658 { echo "$as_me:20658: creating $CONFIG_STATUS" >&5
20659 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20660 cat >$CONFIG_STATUS <<_ACEOF
20662 # Generated automatically by configure.
20663 # Run this file to recreate the current configuration.
20664 # Compiler output produced by configure, useful for debugging
20665 # configure, is in config.log if it exists.
20668 SHELL=\${CONFIG_SHELL-$SHELL}
20669 ac_cs_invocation="\$0 \$@"
20673 cat >>$CONFIG_STATUS <<\_ACEOF
20674 # Be Bourne compatible
20675 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20678 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20682 # Name of the executable.
20683 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20685 if expr a : '\(a\)' >/dev/null 2>&1; then
20691 rm -f conf$$ conf$$.exe conf$$.file
20693 if ln -s conf$$.file conf$$ 2>/dev/null; then
20694 # We could just check for DJGPP; but this test a) works b) is more generic
20695 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20696 if test -f conf$$.exe; then
20697 # Don't use ln at all; we don't have any links
20702 elif ln conf$$.file conf$$ 2>/dev/null; then
20707 rm -f conf$$ conf$$.exe conf$$.file
20709 as_executable_p="test -f"
20711 # Support unset when possible.
20712 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20719 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20720 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20721 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20722 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20723 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20724 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20725 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20726 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20729 # We need space, tab and new line, in precisely that order.
20735 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20741 # Files that config.status was made for.
20742 if test -n "$ac_config_files"; then
20743 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20746 if test -n "$ac_config_headers"; then
20747 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20750 if test -n "$ac_config_links"; then
20751 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20754 if test -n "$ac_config_commands"; then
20755 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20758 cat >>$CONFIG_STATUS <<\EOF
20761 \`$as_me' instantiates files from templates according to the
20762 current configuration.
20764 Usage: $0 [OPTIONS] [FILE]...
20766 -h, --help print this help, then exit
20767 -V, --version print version number, then exit
20768 -d, --debug don't remove temporary files
20769 --recheck update $as_me by reconfiguring in the same conditions
20770 --file=FILE[:TEMPLATE]
20771 instantiate the configuration file FILE
20772 --header=FILE[:TEMPLATE]
20773 instantiate the configuration header FILE
20775 Configuration files:
20778 Configuration headers:
20781 Configuration commands:
20784 Report bugs to <dickey@invisible-island.net>."
20787 cat >>$CONFIG_STATUS <<EOF
20790 configured by $0, generated by GNU Autoconf 2.52.20170501,
20791 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20793 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
20794 Free Software Foundation, Inc.
20795 This config.status script is free software; the Free Software Foundation
20796 gives unlimited permission to copy, distribute and modify it."
20801 cat >>$CONFIG_STATUS <<\EOF
20802 # If no file are specified by the user, then we need to provide default
20803 # value. By we need to know if files were specified by the user.
20809 ac_option=`expr "x$1" : 'x\([^=]*\)='`
20810 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20812 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
20816 *) # This is not an option, so the user has probably given explicit
20818 ac_need_defaults=false;;
20822 # Handling of the options.
20824 cat >>$CONFIG_STATUS <<EOF
20825 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20826 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
20827 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
20829 cat >>$CONFIG_STATUS <<\EOF
20830 --version | --vers* | -V )
20831 echo "$ac_cs_version"; exit 0 ;;
20833 # Conflict between --help and --header
20834 { { echo "$as_me:20834: error: ambiguous option: $1
20835 Try \`$0 --help' for more information." >&5
20836 echo "$as_me: error: ambiguous option: $1
20837 Try \`$0 --help' for more information." >&2;}
20838 { (exit 1); exit 1; }; };;
20839 --help | --hel | -h )
20840 echo "$ac_cs_usage"; exit 0 ;;
20841 --debug | --d* | -d )
20843 --file | --fil | --fi | --f )
20845 CONFIG_FILES="$CONFIG_FILES $1"
20846 ac_need_defaults=false;;
20847 --header | --heade | --head | --hea )
20849 CONFIG_HEADERS="$CONFIG_HEADERS $1"
20850 ac_need_defaults=false;;
20852 # This is an error.
20853 -*) { { echo "$as_me:20853: error: unrecognized option: $1
20854 Try \`$0 --help' for more information." >&5
20855 echo "$as_me: error: unrecognized option: $1
20856 Try \`$0 --help' for more information." >&2;}
20857 { (exit 1); exit 1; }; } ;;
20859 *) ac_config_targets="$ac_config_targets $1" ;;
20868 ## ----------------------- ##
20869 ## Running config.status. ##
20870 ## ----------------------- ##
20872 This file was extended by $as_me 2.52.20170501, executed with
20873 CONFIG_FILES = $CONFIG_FILES
20874 CONFIG_HEADERS = $CONFIG_HEADERS
20875 CONFIG_LINKS = $CONFIG_LINKS
20876 CONFIG_COMMANDS = $CONFIG_COMMANDS
20877 > $ac_cs_invocation
20878 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20883 cat >>$CONFIG_STATUS <<EOF
20885 # INIT-COMMANDS section.
20895 cat >>$CONFIG_STATUS <<\EOF
20896 for ac_config_target in $ac_config_targets
20898 case "$ac_config_target" in
20899 # Handling of arguments.
20900 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20901 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
20902 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
20903 *) { { echo "$as_me:20903: error: invalid argument: $ac_config_target" >&5
20904 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20905 { (exit 1); exit 1; }; };;
20909 # If the user did not use the arguments to specify the items to instantiate,
20910 # then the envvar interface is used. Set only those that are not.
20911 # We use the long form for the default assignment because of an extremely
20912 # bizarre bug on SunOS 4.1.3.
20913 if $ac_need_defaults; then
20914 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20915 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20916 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20919 # Create a temporary directory, and hook for its removal unless debugging.
20922 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20923 trap '{ (exit 1); exit 1; }' 1 2 13 15
20926 # Create a (secure) tmp directory for tmp files.
20929 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
20930 test -n "$tmp" && test -d "$tmp"
20933 tmp=$TMPDIR/cs$$-$RANDOM
20934 (umask 077 && mkdir $tmp)
20937 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
20938 { (exit 1); exit 1; }
20943 cat >>$CONFIG_STATUS <<EOF
20946 # CONFIG_FILES section.
20949 # No need to generate the scripts if there are no CONFIG_FILES.
20950 # This happens for instance when ./config.status config.h
20951 if test -n "\$CONFIG_FILES"; then
20952 # Protect against being on the right side of a sed subst in config.status.
20953 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20954 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20955 s,@SHELL@,$SHELL,;t t
20956 s,@exec_prefix@,$exec_prefix,;t t
20957 s,@prefix@,$prefix,;t t
20958 s,@program_transform_name@,$program_transform_name,;t t
20959 s,@bindir@,$bindir,;t t
20960 s,@sbindir@,$sbindir,;t t
20961 s,@libexecdir@,$libexecdir,;t t
20962 s,@datarootdir@,$datarootdir,;t t
20963 s,@datadir@,$datadir,;t t
20964 s,@sysconfdir@,$sysconfdir,;t t
20965 s,@sharedstatedir@,$sharedstatedir,;t t
20966 s,@localstatedir@,$localstatedir,;t t
20967 s,@libdir@,$libdir,;t t
20968 s,@includedir@,$includedir,;t t
20969 s,@oldincludedir@,$oldincludedir,;t t
20970 s,@infodir@,$infodir,;t t
20971 s,@mandir@,$mandir,;t t
20972 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20973 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20974 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20975 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20976 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20977 s,@build_alias@,$build_alias,;t t
20978 s,@host_alias@,$host_alias,;t t
20979 s,@target_alias@,$target_alias,;t t
20980 s,@ECHO_C@,$ECHO_C,;t t
20981 s,@ECHO_N@,$ECHO_N,;t t
20982 s,@ECHO_T@,$ECHO_T,;t t
20983 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20984 s,@DEFS@,$DEFS,;t t
20985 s,@LIBS@,$LIBS,;t t
20986 s,@build@,$build,;t t
20987 s,@build_cpu@,$build_cpu,;t t
20988 s,@build_vendor@,$build_vendor,;t t
20989 s,@build_os@,$build_os,;t t
20990 s,@host@,$host,;t t
20991 s,@host_cpu@,$host_cpu,;t t
20992 s,@host_vendor@,$host_vendor,;t t
20993 s,@host_os@,$host_os,;t t
20994 s,@SET_MAKE@,$SET_MAKE,;t t
20996 s,@CFLAGS@,$CFLAGS,;t t
20997 s,@LDFLAGS@,$LDFLAGS,;t t
20998 s,@CPPFLAGS@,$CPPFLAGS,;t t
20999 s,@ac_ct_CC@,$ac_ct_CC,;t t
21000 s,@EXEEXT@,$EXEEXT,;t t
21001 s,@OBJEXT@,$OBJEXT,;t t
21002 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
21005 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21006 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21007 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21008 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
21009 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
21010 s,@LINT@,$LINT,;t t
21011 s,@LINT_OPTS@,$LINT_OPTS,;t t
21012 s,@CTAGS@,$CTAGS,;t t
21013 s,@ETAGS@,$ETAGS,;t t
21014 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21015 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21016 s,@MATH_LIB@,$MATH_LIB,;t t
21017 s,@top_builddir@,$top_builddir,;t t
21018 s,@CC_G_OPT@,$CC_G_OPT,;t t
21019 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21020 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21021 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21022 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21024 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21025 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21026 s,@LD_MODEL@,$LD_MODEL,;t t
21027 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21028 s,@LIBTOOL@,$LIBTOOL,;t t
21029 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
21030 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21031 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21032 s,@LIB_LINK@,$LIB_LINK,;t t
21033 s,@LINK_TESTS@,$LINK_TESTS,;t t
21034 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21035 s,@PACKAGE@,$PACKAGE,;t t
21036 s,@PTHREAD@,$PTHREAD,;t t
21037 s,@TEST_ARGS@,$TEST_ARGS,;t t
21038 s,@TEST_DEPS@,$TEST_DEPS,;t t
21039 s,@TEST_LIBS@,$TEST_LIBS,;t t
21040 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21041 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21042 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
21043 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
21044 s,@includesubdir@,$includesubdir,;t t
21045 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21046 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21047 s,@ECHO_LT@,$ECHO_LT,;t t
21048 s,@ECHO_LD@,$ECHO_LD,;t t
21049 s,@RULE_CC@,$RULE_CC,;t t
21050 s,@SHOW_CC@,$SHOW_CC,;t t
21051 s,@ECHO_CC@,$ECHO_CC,;t t
21052 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21053 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
21054 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
21055 s,@X_CFLAGS@,$X_CFLAGS,;t t
21056 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
21057 s,@X_LIBS@,$X_LIBS,;t t
21058 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
21059 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
21060 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
21061 s,@RGB_PATH@,$RGB_PATH,;t t
21062 s,@no_x11_rgb@,$no_x11_rgb,;t t
21063 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21064 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21065 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21070 cat >>$CONFIG_STATUS <<\EOF
21071 # Split the substitutions into bite-sized pieces for seds with
21072 # small command number limits, like on Digital OSF/1 and HP-UX.
21073 ac_max_sed_lines=48
21074 ac_sed_frag=1 # Number of current file.
21075 ac_beg=1 # First line for current file.
21076 ac_end=$ac_max_sed_lines # Line after last line for current file.
21079 while $ac_more_lines; do
21080 if test $ac_beg -gt 1; then
21081 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21083 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21085 if test ! -s $tmp/subs.frag; then
21086 ac_more_lines=false
21088 # The purpose of the label and of the branching condition is to
21089 # speed up the sed processing (if there are no `@' at all, there
21090 # is no need to browse any of the substitutions).
21091 # These are the two extra sed commands mentioned above.
21093 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21094 # It is possible to make a multiline substitution using escaped newlines.
21095 # Ensure that we do not split the substitution between script fragments.
21097 ac_END=`expr $ac_end + $ac_max_sed_lines`
21098 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
21099 if test -s $tmp/subs.next; then
21100 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
21101 if test ! -s $tmp/subs.edit; then
21102 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
21103 if test ! -s $tmp/subs.edit; then
21104 if test $ac_beg -gt 1; then
21105 ac_end=`expr $ac_end - 1`
21112 if test -z "$ac_sed_cmds"; then
21113 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21115 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21117 ac_sed_frag=`expr $ac_sed_frag + 1`
21119 ac_end=`expr $ac_end + $ac_max_sed_lines`
21122 if test -z "$ac_sed_cmds"; then
21125 fi # test -n "$CONFIG_FILES"
21128 cat >>$CONFIG_STATUS <<\EOF
21129 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21130 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21132 - | *:- | *:-:* ) # input from stdin
21134 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21135 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21136 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21137 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21138 * ) ac_file_in=$ac_file.in ;;
21141 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21142 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21143 X"$ac_file" : 'X\(//\)[^/]' \| \
21144 X"$ac_file" : 'X\(//\)$' \| \
21145 X"$ac_file" : 'X\(/\)' \| \
21146 . : '\(.\)' 2>/dev/null ||
21148 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21149 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21150 /^X\(\/\/\)$/{ s//\1/; q; }
21151 /^X\(\/\).*/{ s//\1/; q; }
21153 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21154 { case "$ac_dir" in
21155 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21159 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21160 case $as_mkdir_dir in
21161 # Skip DOS drivespec
21162 ?:) as_incr_dir=$as_mkdir_dir ;;
21164 as_incr_dir=$as_incr_dir/$as_mkdir_dir
21165 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21170 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21171 # A "../" for each directory in $ac_dir_suffix.
21172 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21174 ac_dir_suffix= ac_dots=
21179 if test -z "$ac_dots"; then
21182 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21184 [\\/]* | ?:[\\/]* )
21185 ac_srcdir=$srcdir$ac_dir_suffix;
21186 ac_top_srcdir=$srcdir ;;
21187 *) # Relative path.
21188 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21189 ac_top_srcdir=$ac_dots$srcdir ;;
21193 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21194 *) ac_INSTALL=$ac_dots$INSTALL ;;
21197 if test x"$ac_file" != x-; then
21198 { echo "$as_me:21198: creating $ac_file" >&5
21199 echo "$as_me: creating $ac_file" >&6;}
21202 # Let's still pretend it is `configure' which instantiates (i.e., don't
21203 # use $as_me), people would be surprised to read:
21204 # /* config.h. Generated automatically by config.status. */
21205 configure_input="Generated automatically from `echo $ac_file_in |
21206 sed 's,.*/,,'` by configure."
21208 # First look for the input files in the build tree, otherwise in the
21210 ac_file_inputs=`IFS=:
21211 for f in $ac_file_in; do
21213 -) echo $tmp/stdin ;;
21215 # Absolute (can't be DOS-style, as IFS=:)
21216 test -f "$f" || { { echo "$as_me:21216: error: cannot find input file: $f" >&5
21217 echo "$as_me: error: cannot find input file: $f" >&2;}
21218 { (exit 1); exit 1; }; }
21221 if test -f "$f"; then
21224 elif test -f "$srcdir/$f"; then
21229 { { echo "$as_me:21229: error: cannot find input file: $f" >&5
21230 echo "$as_me: error: cannot find input file: $f" >&2;}
21231 { (exit 1); exit 1; }; }
21234 done` || { (exit 1); exit 1; }
21236 cat >>$CONFIG_STATUS <<\EOF
21237 ac_warn_datarootdir=no
21238 if test x"$ac_file" != x-; then
21239 for ac_item in $ac_file_inputs
21241 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
21242 if test -n "$ac_seen"; then
21243 ac_used=`grep '@datarootdir@' $ac_item`
21244 if test -z "$ac_used"; then
21245 { echo "$as_me:21245: WARNING: datarootdir was used implicitly but not set:
21247 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
21249 ac_warn_datarootdir=yes
21252 ac_seen=`grep '${datarootdir}' $ac_item`
21253 if test -n "$ac_seen"; then
21254 { echo "$as_me:21254: WARNING: datarootdir was used explicitly but not set:
21256 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
21258 ac_warn_datarootdir=yes
21263 if test "x$ac_warn_datarootdir" = xyes; then
21264 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
21268 cat >>$CONFIG_STATUS <<EOF
21272 cat >>$CONFIG_STATUS <<\EOF
21274 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21275 s,@configure_input@,$configure_input,;t t
21276 s,@srcdir@,$ac_srcdir,;t t
21277 s,@top_srcdir@,$ac_top_srcdir,;t t
21278 s,@INSTALL@,$ac_INSTALL,;t t
21279 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21281 if test x"$ac_file" != x-; then
21282 cp $tmp/out $ac_file
21284 for ac_name in prefix exec_prefix datarootdir
21286 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
21287 if test -n "$ac_seen"; then
21288 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
21289 if test -z "$ac_init"; then
21290 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
21291 { echo "$as_me:21291: WARNING: Variable $ac_name is used but was not set:
21293 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
21298 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
21299 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
21300 if test -s $tmp/out; then
21301 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
21302 { echo "$as_me:21302: WARNING: Some variables may not be substituted:
21304 echo "$as_me: WARNING: Some variables may not be substituted:
21314 cat >>$CONFIG_STATUS <<\EOF
21317 # CONFIG_HEADER section.
21320 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21321 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21323 # ac_d sets the value in "#define NAME VALUE" lines.
21324 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
21325 ac_dB='[ ].*$,\1#\2'
21328 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21329 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
21330 ac_iB='\([ ]\),\1#\2define\3'
21333 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21334 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
21335 ac_uB='$,\1#\2define\3'
21339 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21340 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21342 - | *:- | *:-:* ) # input from stdin
21344 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21345 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21346 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21347 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21348 * ) ac_file_in=$ac_file.in ;;
21351 test x"$ac_file" != x- && { echo "$as_me:21351: creating $ac_file" >&5
21352 echo "$as_me: creating $ac_file" >&6;}
21354 # First look for the input files in the build tree, otherwise in the
21356 ac_file_inputs=`IFS=:
21357 for f in $ac_file_in; do
21359 -) echo $tmp/stdin ;;
21361 # Absolute (can't be DOS-style, as IFS=:)
21362 test -f "$f" || { { echo "$as_me:21362: error: cannot find input file: $f" >&5
21363 echo "$as_me: error: cannot find input file: $f" >&2;}
21364 { (exit 1); exit 1; }; }
21367 if test -f "$f"; then
21370 elif test -f "$srcdir/$f"; then
21375 { { echo "$as_me:21375: error: cannot find input file: $f" >&5
21376 echo "$as_me: error: cannot find input file: $f" >&2;}
21377 { (exit 1); exit 1; }; }
21380 done` || { (exit 1); exit 1; }
21381 # Remove the trailing spaces.
21382 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
21386 # Transform confdefs.h into a list of #define's. We won't use it as a sed
21387 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
21388 # be either 'cat' or 'sort'.
21389 cat confdefs.h | uniq >conftest.vals
21391 # Break up conftest.vals because some shells have a limit on
21392 # the size of here documents, and old seds have small limits too.
21394 rm -f conftest.tail
21395 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
21396 while grep . conftest.vals >/dev/null
21398 # Write chunks of a limited-size here document to conftest.frag.
21399 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21400 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21401 echo 'CEOF' >> $CONFIG_STATUS
21402 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21403 rm -f conftest.vals
21404 mv conftest.tail conftest.vals
21406 rm -f conftest.vals
21408 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21410 echo ' cat >> conftest.edit <<CEOF
21411 /@DEFS@/r conftest.frag
21414 sed -f conftest.edit $tmp/in > $tmp/out
21416 mv $tmp/out $tmp/in
21417 rm -f conftest.edit conftest.frag
21418 ' >> $CONFIG_STATUS
21420 cat >>$CONFIG_STATUS <<\EOF
21421 # Let's still pretend it is `configure' which instantiates (i.e., don't
21422 # use $as_me), people would be surprised to read:
21423 # /* config.h. Generated automatically by config.status. */
21424 if test x"$ac_file" = x-; then
21425 echo "/* Generated automatically by configure. */" >$tmp/config.h
21427 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
21429 cat $tmp/in >>$tmp/config.h
21431 if test x"$ac_file" != x-; then
21432 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21433 { echo "$as_me:21433: $ac_file is unchanged" >&5
21434 echo "$as_me: $ac_file is unchanged" >&6;}
21436 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21437 X"$ac_file" : 'X\(//\)[^/]' \| \
21438 X"$ac_file" : 'X\(//\)$' \| \
21439 X"$ac_file" : 'X\(/\)' \| \
21440 . : '\(.\)' 2>/dev/null ||
21442 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21443 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21444 /^X\(\/\/\)$/{ s//\1/; q; }
21445 /^X\(\/\).*/{ s//\1/; q; }
21447 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21448 { case "$ac_dir" in
21449 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21453 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21454 case $as_mkdir_dir in
21455 # Skip DOS drivespec
21456 ?:) as_incr_dir=$as_mkdir_dir ;;
21458 as_incr_dir=$as_incr_dir/$as_mkdir_dir
21459 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21466 mv $tmp/config.h $ac_file
21470 rm -f $tmp/config.h
21474 cat >>$CONFIG_STATUS <<\EOF
21476 # CONFIG_COMMANDS section.
21478 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21479 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21480 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21487 if test ! -d $srcdir/$cf_dir; then
21489 elif test -f $srcdir/$cf_dir/programs; then
21490 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21494 cat >>Makefile <<TEST_EOF
21496 # These rules are generated so we do not rely on suffix rules, which do not
21497 # work consistently for different make-programs (the '\$(MODEL)/' confuses
21498 # some, and the '\$x' confuses others).
21501 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
21504 cat >>Makefile <<TEST_EOF
21506 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
21507 \$(srcdir)/test.priv.h \\
21510 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) -DMODULE_NAME="$N" \$(srcdir)/$N.c
21514 if test -f ../config.guess && test -f ../config.sub
21516 cat >>Makefile <<TEST_EOF
21518 # if we used CF_INHERIT for getting these files, we can remove them
21520 rm -f config.guess config.sub
21528 cat >>$CONFIG_STATUS <<\EOF
21530 { (exit 0); exit 0; }
21532 chmod +x $CONFIG_STATUS
21533 ac_clean_files=$ac_clean_files_save
21535 # configure is writing to config.log, and then calls config.status.
21536 # config.status does its own redirection, appending to config.log.
21537 # Unfortunately, on DOS this fails, as config.log is still kept open
21538 # by configure, so config.status won't be able to write to it; its
21539 # output is simply discarded. So we exec the FD to /dev/null,
21540 # effectively closing config.log, so it can be properly (re)opened and
21541 # appended to by config.status. When coming back to configure, we
21542 # need to make the FD available again.
21543 if test "$no_create" != yes; then
21546 $SHELL $CONFIG_STATUS || ac_cs_success=false
21548 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21549 # would make configure fail if this is the last instruction.
21550 $ac_cs_success || { (exit 1); exit 1; }