2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20210105.
5 # Copyright 2003-2020,2021 Thomas E. Dickey
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35 if expr a : '\(a\)' >/dev/null 2>&1; then
41 rm -f conf$$ conf$$.exe conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44 # We could just check for DJGPP; but this test a) works b) is more generic
45 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46 if test -f conf$$.exe; then
47 # Don't use ln at all; we don't have any links
52 elif ln conf$$.file conf$$ 2>/dev/null; then
57 rm -f conf$$ conf$$.exe conf$$.file
59 as_executable_p="test -f"
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
79 # We need space, tab and new line, in precisely that order.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
97 ac_default_prefix=/usr/local
102 SHELL=${CONFIG_SHELL-/bin/sh}
104 # Maximum number of lines to put in a shell here document.
105 # This variable seems obsolete. It should probably be removed, and
106 # only ac_max_sed_lines should be used.
107 : "${ac_max_here_lines=38}"
109 ac_unique_file="ncurses.c"
111 # Initialize some variables set by options.
113 ac_init_version=false
114 # The variables have the same names as the options, with
115 # dashes changed to underlines.
123 program_transform_name=s,x,x,
131 # Installation directory options.
132 # These are left unexpanded so users can "make install exec_prefix=/foo"
133 # and all the variables that are supposed to be based on exec_prefix
134 # by default will actually change.
135 # Use braces instead of parens because sh, perl, etc. also accept them.
136 bindir='${exec_prefix}/bin'
137 sbindir='${exec_prefix}/sbin'
138 libexecdir='${exec_prefix}/libexec'
139 datarootdir='${prefix}/share'
140 datadir='${datarootdir}'
141 sysconfdir='${prefix}/etc'
142 sharedstatedir='${prefix}/com'
143 localstatedir='${prefix}/var'
144 runstatedir='${localstatedir}/run'
145 libdir='${exec_prefix}/lib'
146 includedir='${prefix}/include'
147 oldincludedir='/usr/include'
148 infodir='${datarootdir}/info'
149 mandir='${datarootdir}/man'
151 # Identity of this package.
161 # If the previous option needs an argument, assign it.
162 if test -n "$ac_prev"; then
163 eval "$ac_prev=\$ac_option"
168 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
170 # Accept the important Cygnus configure options, so we can diagnose typos.
174 -bindir | --bindir | --bindi | --bind | --bin | --bi)
176 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
179 -build | --build | --buil | --bui | --bu)
180 ac_prev=build_alias ;;
181 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
182 build_alias=$ac_optarg ;;
184 -cache-file | --cache-file | --cache-fil | --cache-fi \
185 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
186 ac_prev=cache_file ;;
187 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
188 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
189 cache_file=$ac_optarg ;;
192 cache_file=config.cache ;;
194 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
196 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
198 datadir=$ac_optarg ;;
200 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
201 | --dataroo | --dataro | --datar)
202 ac_prev=datarootdir ;;
203 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
204 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
205 datarootdir=$ac_optarg ;;
207 -disable-* | --disable-*)
208 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
209 # Reject names that are not valid shell variable names.
210 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
211 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
212 { (exit 1); exit 1; }; }
213 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
214 eval "enable_$ac_feature=no" ;;
216 -enable-* | --enable-*)
217 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
218 # Reject names that are not valid shell variable names.
219 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
220 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
221 { (exit 1); exit 1; }; }
222 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
224 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
227 eval "enable_$ac_feature='$ac_optarg'" ;;
229 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
230 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
231 | --exec | --exe | --ex)
232 ac_prev=exec_prefix ;;
233 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
234 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
235 | --exec=* | --exe=* | --ex=*)
236 exec_prefix=$ac_optarg ;;
238 -gas | --gas | --ga | --g)
239 # Obsolete; use --with-gas.
242 -help | --help | --hel | --he | -h)
244 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
245 ac_init_help=recursive ;;
246 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
247 ac_init_help=short ;;
249 -host | --host | --hos | --ho)
250 ac_prev=host_alias ;;
251 -host=* | --host=* | --hos=* | --ho=*)
252 host_alias=$ac_optarg ;;
254 -includedir | --includedir | --includedi | --included | --include \
255 | --includ | --inclu | --incl | --inc)
256 ac_prev=includedir ;;
257 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
258 | --includ=* | --inclu=* | --incl=* | --inc=*)
259 includedir=$ac_optarg ;;
261 -infodir | --infodir | --infodi | --infod | --info | --inf)
263 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
264 infodir=$ac_optarg ;;
266 -libdir | --libdir | --libdi | --libd)
268 -libdir=* | --libdir=* | --libdi=* | --libd=*)
271 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
272 | --libexe | --libex | --libe)
273 ac_prev=libexecdir ;;
274 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
275 | --libexe=* | --libex=* | --libe=*)
276 libexecdir=$ac_optarg ;;
278 -localstatedir | --localstatedir | --localstatedi | --localstated \
279 | --localstate | --localstat | --localsta | --localst \
280 | --locals | --local | --loca | --loc | --lo)
281 ac_prev=localstatedir ;;
282 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
283 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
284 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
285 localstatedir=$ac_optarg ;;
287 -runstatedir | --runstatedir | --runstatedi | --runstated \
288 | --runstate | --runstat | --runsta | --runst \
289 | --runs | --run | --ru)
290 ac_prev=runstatedir ;;
291 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
292 | --runstate=* | --runstat=* | --runsta=* | --runst=* \
293 | --runs=* | --run=* | --ru=*)
294 runstatedir=$ac_optarg ;;
296 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
298 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
302 # Obsolete; use --without-fp.
305 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
309 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
310 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
313 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
314 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
315 | --oldin | --oldi | --old | --ol | --o)
316 ac_prev=oldincludedir ;;
317 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
318 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
319 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
320 oldincludedir=$ac_optarg ;;
322 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
324 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
327 -program-prefix | --program-prefix | --program-prefi | --program-pref \
328 | --program-pre | --program-pr | --program-p)
329 ac_prev=program_prefix ;;
330 -program-prefix=* | --program-prefix=* | --program-prefi=* \
331 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
332 program_prefix=$ac_optarg ;;
334 -program-suffix | --program-suffix | --program-suffi | --program-suff \
335 | --program-suf | --program-su | --program-s)
336 ac_prev=program_suffix ;;
337 -program-suffix=* | --program-suffix=* | --program-suffi=* \
338 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
339 program_suffix=$ac_optarg ;;
341 -program-transform-name | --program-transform-name \
342 | --program-transform-nam | --program-transform-na \
343 | --program-transform-n | --program-transform- \
344 | --program-transform | --program-transfor \
345 | --program-transfo | --program-transf \
346 | --program-trans | --program-tran \
347 | --progr-tra | --program-tr | --program-t)
348 ac_prev=program_transform_name ;;
349 -program-transform-name=* | --program-transform-name=* \
350 | --program-transform-nam=* | --program-transform-na=* \
351 | --program-transform-n=* | --program-transform-=* \
352 | --program-transform=* | --program-transfor=* \
353 | --program-transfo=* | --program-transf=* \
354 | --program-trans=* | --program-tran=* \
355 | --progr-tra=* | --program-tr=* | --program-t=*)
356 program_transform_name=$ac_optarg ;;
358 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
359 | -silent | --silent | --silen | --sile | --sil)
362 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
364 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
366 sbindir=$ac_optarg ;;
368 -sharedstatedir | --sharedstatedir | --sharedstatedi \
369 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
370 | --sharedst | --shareds | --shared | --share | --shar \
372 ac_prev=sharedstatedir ;;
373 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
374 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
375 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
377 sharedstatedir=$ac_optarg ;;
379 -site | --site | --sit)
381 -site=* | --site=* | --sit=*)
384 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
386 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
389 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
390 | --syscon | --sysco | --sysc | --sys | --sy)
391 ac_prev=sysconfdir ;;
392 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
393 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
394 sysconfdir=$ac_optarg ;;
396 -target | --target | --targe | --targ | --tar | --ta | --t)
397 ac_prev=target_alias ;;
398 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
399 target_alias=$ac_optarg ;;
401 -v | -verbose | --verbose | --verbos | --verbo | --verb)
404 -version | --version | --versio | --versi | --vers | -V)
408 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
409 # Reject names that are not valid shell variable names.
410 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
411 { echo "$as_me: error: invalid package name: $ac_package" >&2
412 { (exit 1); exit 1; }; }
413 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
415 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
418 eval "with_$ac_package='$ac_optarg'" ;;
420 -without-* | --without-*)
421 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
422 # Reject names that are not valid shell variable names.
423 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
424 { echo "$as_me: error: invalid package name: $ac_package" >&2
425 { (exit 1); exit 1; }; }
426 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
427 eval "with_$ac_package=no" ;;
430 # Obsolete; use --with-x.
433 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
434 | --x-incl | --x-inc | --x-in | --x-i)
435 ac_prev=x_includes ;;
436 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
437 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
438 x_includes=$ac_optarg ;;
440 -x-libraries | --x-libraries | --x-librarie | --x-librari \
441 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
442 ac_prev=x_libraries ;;
443 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
444 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
445 x_libraries=$ac_optarg ;;
447 -*) { echo "$as_me: error: unrecognized option: $ac_option
448 Try \`$0 --help' for more information." >&2
449 { (exit 1); exit 1; }; }
453 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
454 # Reject names that are not valid shell variable names.
455 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
456 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
457 { (exit 1); exit 1; }; }
458 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
459 eval "$ac_envvar='$ac_optarg'"
460 export "$ac_envvar" ;;
463 # FIXME: should be removed in autoconf 3.0.
464 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
465 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
466 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
467 : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
473 if test -n "$ac_prev"; then
474 ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
475 { echo "$as_me: error: missing argument to $ac_option" >&2
476 { (exit 1); exit 1; }; }
479 # Be sure to have absolute paths.
480 for ac_var in exec_prefix prefix
482 eval ac_val=$`echo "$ac_var"`
484 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
485 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
486 { (exit 1); exit 1; }; };;
490 # Be sure to have absolute paths.
491 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
492 localstatedir libdir includedir oldincludedir infodir mandir
494 eval ac_val=$`echo "$ac_var"`
496 [\\/$]* | ?:[\\/]* ) ;;
497 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
498 { (exit 1); exit 1; }; };;
502 # There might be people who depend on the old broken behavior: `$host'
503 # used to hold the argument of --host etc.
508 # FIXME: should be removed in autoconf 3.0.
509 if test "x$host_alias" != x; then
510 if test "x$build_alias" = x; then
511 cross_compiling=maybe
512 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
513 If a cross compiler is detected then cross compile mode will be used." >&2
514 elif test "x$build_alias" != "x$host_alias"; then
520 test -n "$host_alias" && ac_tool_prefix=$host_alias-
522 test "$silent" = yes && exec 6>/dev/null
524 # Find the source files, if location was not specified.
525 if test -z "$srcdir"; then
526 ac_srcdir_defaulted=yes
527 # Try the directory containing this script, then its parent.
529 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
530 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
532 if test ! -r "$srcdir/$ac_unique_file"; then
536 ac_srcdir_defaulted=no
538 if test ! -r "$srcdir/$ac_unique_file"; then
539 if test "$ac_srcdir_defaulted" = yes; then
540 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
541 { (exit 1); exit 1; }; }
543 { echo "$as_me: error: cannot find sources in $srcdir" >&2
544 { (exit 1); exit 1; }; }
547 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
548 ac_env_build_alias_set=${build_alias+set}
549 ac_env_build_alias_value=$build_alias
550 ac_cv_env_build_alias_set=${build_alias+set}
551 ac_cv_env_build_alias_value=$build_alias
552 ac_env_host_alias_set=${host_alias+set}
553 ac_env_host_alias_value=$host_alias
554 ac_cv_env_host_alias_set=${host_alias+set}
555 ac_cv_env_host_alias_value=$host_alias
556 ac_env_target_alias_set=${target_alias+set}
557 ac_env_target_alias_value=$target_alias
558 ac_cv_env_target_alias_set=${target_alias+set}
559 ac_cv_env_target_alias_value=$target_alias
560 ac_env_CC_set=${CC+set}
562 ac_cv_env_CC_set=${CC+set}
563 ac_cv_env_CC_value=$CC
564 ac_env_CFLAGS_set=${CFLAGS+set}
565 ac_env_CFLAGS_value=$CFLAGS
566 ac_cv_env_CFLAGS_set=${CFLAGS+set}
567 ac_cv_env_CFLAGS_value=$CFLAGS
568 ac_env_LDFLAGS_set=${LDFLAGS+set}
569 ac_env_LDFLAGS_value=$LDFLAGS
570 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
571 ac_cv_env_LDFLAGS_value=$LDFLAGS
572 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
573 ac_env_CPPFLAGS_value=$CPPFLAGS
574 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
575 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
576 ac_env_CPP_set=${CPP+set}
577 ac_env_CPP_value=$CPP
578 ac_cv_env_CPP_set=${CPP+set}
579 ac_cv_env_CPP_value=$CPP
582 # Report the --help message.
584 if test "$ac_init_help" = "long"; then
585 # Omit some internal or obsolete options to make the list less imposing.
586 # This message is too long to be a string in the A/UX 3.1 sh.
588 \`configure' configures this package to adapt to many kinds of systems.
590 Usage: $0 [OPTION]... [VAR=VALUE]...
592 To assign environment variables (e.g., CC, CFLAGS...), specify them as
593 VAR=VALUE. See below for descriptions of some of the useful variables.
595 Defaults for the options are specified in brackets.
598 -h, --help display this help and exit
599 --help=short display options specific to this package
600 --help=recursive display the short help of all the included packages
601 -V, --version display version information and exit
602 -q, --quiet, --silent do not print \`checking...' messages
603 --cache-file=FILE cache test results in FILE [disabled]
604 -C, --config-cache alias for \`--cache-file=config.cache'
605 -n, --no-create do not create output files
606 --srcdir=DIR find the sources in DIR [configure dir or \`..']
611 Installation directories:
612 --prefix=PREFIX install architecture-independent files in PREFIX
614 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
617 By default, \`make install' will install all the files in
618 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
619 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
620 for instance \`--prefix=\$HOME'.
622 For better control, use the options below.
624 Fine tuning of the installation directories:
625 --bindir=DIR user executables [EPREFIX/bin]
626 --sbindir=DIR system admin executables [EPREFIX/sbin]
627 --libexecdir=DIR program executables [EPREFIX/libexec]
628 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
629 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
630 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
631 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
632 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
633 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
634 --libdir=DIR object code libraries [EPREFIX/lib]
635 --includedir=DIR C header files [PREFIX/include]
636 --oldincludedir=DIR C header files for non-gcc [/usr/include]
637 --infodir=DIR info documentation [DATAROOTDIR/info]
638 --mandir=DIR man documentation [DATAROOTDIR/man]
644 --program-prefix=PREFIX prepend PREFIX to installed program names
645 --program-suffix=SUFFIX append SUFFIX to installed program names
646 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
649 --x-includes=DIR X include files are in DIR
650 --x-libraries=DIR X library files are in DIR
653 --build=BUILD configure for building on BUILD [guessed]
654 --host=HOST build programs to run on HOST [BUILD]
658 if test -n "$ac_init_help"; then
663 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
664 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
667 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
668 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
671 --disable-stripping do not strip (debug info) installed executables
672 --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics
673 --enable-string-hacks work around bogus compiler/loader warnings
674 --with-pkg-config{=path} enable/disable use of pkg-config
675 --disable-echo do not display "compiling" commands
676 Curses Version-dependent Options:
677 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
678 --disable-widec disable checks for wide-character functions
679 --with-curses-dir=DIR directory in which (n)curses is installed
680 --with-screen=XXX use specified curses-libraries
681 --with-ncursesw use wide ncurses-libraries
682 --with-ncurses use ncurses-libraries
683 --with-pdcurses compile/link with pdcurses X11 library
684 --with-curses-colr compile/link with HPUX 10.x color-curses
685 --with-curses-5lib compile/link with SunOS 5lib curses
686 --with-Xaw3d link with Xaw 3d library
687 --with-Xaw3dxft link with Xaw 3d xft library
688 --with-neXtaw link with neXT Athena library
689 --with-XawPlus link with Athena-Plus library
690 --with-x use the X Window System
691 --with-x11-rgb=FILE file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
692 --with-form-libname=XXX override form basename of library
693 --with-menu-libname=XXX override menu basename of library
694 --with-panel-libname=XXX override panel basename of library
695 --disable-panel disable checks for panel functions
696 --disable-menu disable checks for menu functions
697 --disable-form disable checks for form functions
698 Testing/development Options:
699 --enable-warnings test: turn on gcc compiler warnings
700 --with-dmalloc test: use Gray Watson's dmalloc library
701 --with-dbmalloc test: use Conor Cahill's dbmalloc library
702 --with-valgrind test: use valgrind
703 --disable-leaks test: free permanent memory, analyze leaks
704 --disable-rpath-hack don't add rpath options for additional libraries
706 Some influential environment variables:
707 CC C compiler command
708 CFLAGS C compiler flags
709 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
710 nonstandard directory <lib dir>
711 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
712 headers in a nonstandard directory <include dir>
715 Use these variables to override the choices made by `configure' or to help
716 it to find libraries and programs with nonstandard names/locations.
721 if test "$ac_init_help" = "recursive"; then
722 # If there are subdirs, report their specific --help.
724 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
726 # A "../" for each directory in /$ac_subdir.
727 ac_dots=`echo "$ac_subdir" |
728 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
731 .) # No --srcdir option. We are building in place.
732 ac_sub_srcdir="$srcdir" ;;
733 [\\/]* | ?:[\\/]* ) # Absolute path.
734 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
736 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
739 # Check for guested configure; otherwise get Cygnus style configure.
740 if test -f "$ac_sub_srcdir/configure.gnu"; then
742 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
743 elif test -f "$ac_sub_srcdir/configure"; then
745 $SHELL "$ac_sub_srcdir/configure" --help=recursive
746 elif test -f "$ac_sub_srcdir/configure.ac" ||
747 test -f "$ac_sub_srcdir/configure.in"; then
749 "$ac_configure" --help
751 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
757 test -n "$ac_init_help" && exit 0
758 if "$ac_init_version"; then
761 Copyright 2003-2020,2021 Thomas E. Dickey
762 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
763 Free Software Foundation, Inc.
764 This configure script is free software; the Free Software Foundation
765 gives unlimited permission to copy, distribute and modify it.
771 This file contains any messages produced by compilers while
772 running configure, to aid debugging if configure makes a mistake.
774 It was created by $as_me, which was
775 generated by GNU Autoconf 2.52.20210105. Invocation command line was
786 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
787 uname -m = `(uname -m) 2>/dev/null || echo unknown`
788 uname -r = `(uname -r) 2>/dev/null || echo unknown`
789 uname -s = `(uname -s) 2>/dev/null || echo unknown`
790 uname -v = `(uname -v) 2>/dev/null || echo unknown`
792 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
793 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
795 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
796 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
797 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
798 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
799 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
800 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
801 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
815 # Keep a trace of the command line.
816 # Strip out --no-create and --no-recursion so they do not pile up.
817 # Also quote any args containing shell meta-characters.
823 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
824 | --no-cr | --no-c) ;;
825 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
826 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
827 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
828 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
829 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
831 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
834 # Get rid of the leading space.
837 # When interrupted or exit'd, cleanup temporary files, and complete
838 # config.log. We remove comments because anyway the quotes in there
839 # would cause problems or look ugly.
841 # Save into config.log some information that might help in debugging.
843 echo "## ----------------- ##" >&5
844 echo "## Cache variables. ##" >&5
845 echo "## ----------------- ##" >&5
847 # The following way of writing the cache mishandles newlines in values,
850 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
853 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
854 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
858 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
862 sed "/^$/d" confdefs.h >conftest.log
863 if test -s conftest.log; then
865 echo "## ------------ ##" >&5
866 echo "## confdefs.h. ##" >&5
867 echo "## ------------ ##" >&5
872 test "$ac_signal" != 0 &&
873 echo "$as_me: caught signal $ac_signal" >&5
874 echo "$as_me: exit $exit_status" >&5
875 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
878 for ac_signal in 1 2 13 15; do
879 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
883 # confdefs.h avoids OS command line length limits that DEFS can exceed.
884 rm -rf conftest* confdefs.h
885 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
888 # Let the site file select an alternate cache file if it wants to.
889 # Prefer explicitly selected file to automatically selected ones.
890 if test -z "$CONFIG_SITE"; then
891 if test "x$prefix" != xNONE; then
892 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
894 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
897 for ac_site_file in $CONFIG_SITE; do
898 if test -r "$ac_site_file"; then
899 { echo "$as_me:899: loading site script $ac_site_file" >&5
900 echo "$as_me: loading site script $ac_site_file" >&6;}
901 cat "$ac_site_file" >&5
906 if test -r "$cache_file"; then
907 # Some versions of bash will fail to source /dev/null (special
908 # files actually), so we avoid doing that.
909 if test -f "$cache_file"; then
910 { echo "$as_me:910: loading cache $cache_file" >&5
911 echo "$as_me: loading cache $cache_file" >&6;}
913 [\\/]* | ?:[\\/]* ) . $cache_file;;
918 { echo "$as_me:918: creating cache $cache_file" >&5
919 echo "$as_me: creating cache $cache_file" >&6;}
923 # Check that the precious variables saved in the cache have kept the same
925 ac_cache_corrupted=false
926 for ac_var in `(set) 2>&1 |
927 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
928 eval ac_old_set=\$ac_cv_env_${ac_var}_set
929 eval ac_new_set=\$ac_env_${ac_var}_set
930 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
931 eval ac_new_val="\$ac_env_${ac_var}_value"
932 case "$ac_old_set,$ac_new_set" in
934 { echo "$as_me:934: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
935 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
936 ac_cache_corrupted=: ;;
938 { echo "$as_me:938: error: \`$ac_var' was not set in the previous run" >&5
939 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
940 ac_cache_corrupted=: ;;
943 if test "x$ac_old_val" != "x$ac_new_val"; then
944 { echo "$as_me:944: error: \`$ac_var' has changed since the previous run:" >&5
945 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
946 { echo "$as_me:946: former value: $ac_old_val" >&5
947 echo "$as_me: former value: $ac_old_val" >&2;}
948 { echo "$as_me:948: current value: $ac_new_val" >&5
949 echo "$as_me: current value: $ac_new_val" >&2;}
953 # Pass precious variables to config.status. It doesn't matter if
954 # we pass some twice (in addition to the command line arguments).
955 if test "$ac_new_set" = set; then
956 case "$ac_new_val" in
957 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
958 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
959 ac_configure_args="$ac_configure_args '$ac_arg'"
961 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
966 if "$ac_cache_corrupted"; then
967 { echo "$as_me:967: error: changes in the environment can compromise the build" >&5
968 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
969 { { echo "$as_me:969: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
970 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
971 { (exit 1); exit 1; }; }
975 ac_cpp='$CPP $CPPFLAGS'
976 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
977 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
978 ac_compiler_gnu=$ac_cv_c_compiler_gnu
979 ac_main_return="return"
981 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
983 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
995 echo "#! $SHELL" >conftest.sh
996 echo "exit 0" >>conftest.sh
998 if { (echo "$as_me:998: PATH=\".;.\"; conftest.sh") >&5
999 (PATH=".;."; conftest.sh) 2>&5
1001 echo "$as_me:1001: \$? = $ac_status" >&5
1002 (exit "$ac_status"); }; then
1003 ac_path_separator=';'
1007 PATH_SEPARATOR="$ac_path_separator"
1010 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
1012 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
1014 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
1017 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1018 if test -f "$ac_dir/install-sh"; then
1020 ac_install_sh="$ac_aux_dir/install-sh -c"
1022 elif test -f "$ac_dir/install.sh"; then
1024 ac_install_sh="$ac_aux_dir/install.sh -c"
1026 elif test -f "$ac_dir/shtool"; then
1028 ac_install_sh="$ac_aux_dir/shtool install -c"
1032 if test -z "$ac_aux_dir"; then
1033 { { echo "$as_me:1033: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1034 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1035 { (exit 1); exit 1; }; }
1037 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1038 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1039 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1041 # Make sure we can run config.sub.
1042 $ac_config_sub sun4 >/dev/null 2>&1 ||
1043 { { echo "$as_me:1043: error: cannot run $ac_config_sub" >&5
1044 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1045 { (exit 1); exit 1; }; }
1047 echo "$as_me:1047: checking build system type" >&5
1048 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1049 if test "${ac_cv_build+set}" = set; then
1050 echo $ECHO_N "(cached) $ECHO_C" >&6
1052 ac_cv_build_alias=$build_alias
1053 test -z "$ac_cv_build_alias" &&
1054 ac_cv_build_alias=`$ac_config_guess`
1055 test -z "$ac_cv_build_alias" &&
1056 { { echo "$as_me:1056: error: cannot guess build type; you must specify one" >&5
1057 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1058 { (exit 1); exit 1; }; }
1059 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1060 { { echo "$as_me:1060: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1061 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1062 { (exit 1); exit 1; }; }
1065 echo "$as_me:1065: result: $ac_cv_build" >&5
1066 echo "${ECHO_T}$ac_cv_build" >&6
1068 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1069 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1070 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1072 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1073 echo "$as_me:1073: checking host system type" >&5
1074 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1075 if test "${ac_cv_host+set}" = set; then
1076 echo $ECHO_N "(cached) $ECHO_C" >&6
1078 ac_cv_host_alias=$host_alias
1079 test -z "$ac_cv_host_alias" &&
1080 ac_cv_host_alias=$ac_cv_build_alias
1081 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1082 { { echo "$as_me:1082: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1083 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1084 { (exit 1); exit 1; }; }
1087 echo "$as_me:1087: result: $ac_cv_host" >&5
1088 echo "${ECHO_T}$ac_cv_host" >&6
1090 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1091 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1092 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1094 system_name="$host_os"
1096 system_name="`(uname -s -r) 2>/dev/null`"
1097 if test -z "$system_name" ; then
1098 system_name="`(hostname) 2>/dev/null`"
1101 test -n "$system_name" &&
1102 cat >>confdefs.h <<EOF
1103 #define SYSTEM_NAME "$system_name"
1106 if test "${cf_cv_system_name+set}" = set; then
1107 echo $ECHO_N "(cached) $ECHO_C" >&6
1109 cf_cv_system_name="$system_name"
1112 test -z "$system_name" && system_name="$cf_cv_system_name"
1113 test -n "$cf_cv_system_name" && echo "$as_me:1113: result: Configuring for $cf_cv_system_name" >&5
1114 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1116 if test ".$system_name" != ".$cf_cv_system_name" ; then
1117 echo "$as_me:1117: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1118 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1119 { { echo "$as_me:1119: error: \"Please remove config.cache and try again.\"" >&5
1120 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1121 { (exit 1); exit 1; }; }
1124 test "$program_prefix" != NONE &&
1125 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1126 # Use a double $ so make ignores it.
1127 test "$program_suffix" != NONE &&
1128 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1129 # Double any \ or $. echo might interpret backslashes.
1130 # By default was `s,x,x', remove it if useless.
1131 cat <<\_ACEOF >conftest.sed
1132 s/[\\$]/&&/g;s/;s,x,x,$//
1134 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1137 echo "$as_me:1137: checking whether ${MAKE-make} sets \${MAKE}" >&5
1138 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1139 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1140 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1141 echo $ECHO_N "(cached) $ECHO_C" >&6
1143 cat >conftest.make <<\EOF
1145 @echo 'ac_maketemp="${MAKE}"'
1147 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1148 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1149 if test -n "$ac_maketemp"; then
1150 eval ac_cv_prog_make_${ac_make}_set=yes
1152 eval ac_cv_prog_make_${ac_make}_set=no
1156 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1157 echo "$as_me:1157: result: yes" >&5
1158 echo "${ECHO_T}yes" >&6
1161 echo "$as_me:1161: result: no" >&5
1162 echo "${ECHO_T}no" >&6
1163 SET_MAKE="MAKE=${MAKE-make}"
1167 ac_cpp='$CPP $CPPFLAGS'
1168 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1169 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1170 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1171 ac_main_return="return"
1172 if test -n "$ac_tool_prefix"; then
1173 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1174 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1175 echo "$as_me:1175: checking for $ac_word" >&5
1176 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1177 if test "${ac_cv_prog_CC+set}" = set; then
1178 echo $ECHO_N "(cached) $ECHO_C" >&6
1180 if test -n "$CC"; then
1181 ac_cv_prog_CC="$CC" # Let the user override the test.
1183 ac_save_IFS=$IFS; IFS=$ac_path_separator
1185 for ac_dir in $ac_dummy; do
1187 test -z "$ac_dir" && ac_dir=.
1188 $as_executable_p "$ac_dir/$ac_word" || continue
1189 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1190 echo "$as_me:1190: found $ac_dir/$ac_word" >&5
1197 if test -n "$CC"; then
1198 echo "$as_me:1198: result: $CC" >&5
1199 echo "${ECHO_T}$CC" >&6
1201 echo "$as_me:1201: result: no" >&5
1202 echo "${ECHO_T}no" >&6
1206 if test -z "$ac_cv_prog_CC"; then
1208 # Extract the first word of "gcc", so it can be a program name with args.
1209 set dummy gcc; ac_word=$2
1210 echo "$as_me:1210: checking for $ac_word" >&5
1211 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1212 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1213 echo $ECHO_N "(cached) $ECHO_C" >&6
1215 if test -n "$ac_ct_CC"; then
1216 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1218 ac_save_IFS=$IFS; IFS=$ac_path_separator
1220 for ac_dir in $ac_dummy; do
1222 test -z "$ac_dir" && ac_dir=.
1223 $as_executable_p "$ac_dir/$ac_word" || continue
1224 ac_cv_prog_ac_ct_CC="gcc"
1225 echo "$as_me:1225: found $ac_dir/$ac_word" >&5
1231 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1232 if test -n "$ac_ct_CC"; then
1233 echo "$as_me:1233: result: $ac_ct_CC" >&5
1234 echo "${ECHO_T}$ac_ct_CC" >&6
1236 echo "$as_me:1236: result: no" >&5
1237 echo "${ECHO_T}no" >&6
1245 if test -z "$CC"; then
1246 if test -n "$ac_tool_prefix"; then
1247 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1248 set dummy ${ac_tool_prefix}cc; ac_word=$2
1249 echo "$as_me:1249: checking for $ac_word" >&5
1250 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1251 if test "${ac_cv_prog_CC+set}" = set; then
1252 echo $ECHO_N "(cached) $ECHO_C" >&6
1254 if test -n "$CC"; then
1255 ac_cv_prog_CC="$CC" # Let the user override the test.
1257 ac_save_IFS=$IFS; IFS=$ac_path_separator
1259 for ac_dir in $ac_dummy; do
1261 test -z "$ac_dir" && ac_dir=.
1262 $as_executable_p "$ac_dir/$ac_word" || continue
1263 ac_cv_prog_CC="${ac_tool_prefix}cc"
1264 echo "$as_me:1264: found $ac_dir/$ac_word" >&5
1271 if test -n "$CC"; then
1272 echo "$as_me:1272: result: $CC" >&5
1273 echo "${ECHO_T}$CC" >&6
1275 echo "$as_me:1275: result: no" >&5
1276 echo "${ECHO_T}no" >&6
1280 if test -z "$ac_cv_prog_CC"; then
1282 # Extract the first word of "cc", so it can be a program name with args.
1283 set dummy cc; ac_word=$2
1284 echo "$as_me:1284: checking for $ac_word" >&5
1285 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1286 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1287 echo $ECHO_N "(cached) $ECHO_C" >&6
1289 if test -n "$ac_ct_CC"; then
1290 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1292 ac_save_IFS=$IFS; IFS=$ac_path_separator
1294 for ac_dir in $ac_dummy; do
1296 test -z "$ac_dir" && ac_dir=.
1297 $as_executable_p "$ac_dir/$ac_word" || continue
1298 ac_cv_prog_ac_ct_CC="cc"
1299 echo "$as_me:1299: found $ac_dir/$ac_word" >&5
1305 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1306 if test -n "$ac_ct_CC"; then
1307 echo "$as_me:1307: result: $ac_ct_CC" >&5
1308 echo "${ECHO_T}$ac_ct_CC" >&6
1310 echo "$as_me:1310: result: no" >&5
1311 echo "${ECHO_T}no" >&6
1320 if test -z "$CC"; then
1321 # Extract the first word of "cc", so it can be a program name with args.
1322 set dummy cc; ac_word=$2
1323 echo "$as_me:1323: checking for $ac_word" >&5
1324 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1325 if test "${ac_cv_prog_CC+set}" = set; then
1326 echo $ECHO_N "(cached) $ECHO_C" >&6
1328 if test -n "$CC"; then
1329 ac_cv_prog_CC="$CC" # Let the user override the test.
1332 ac_save_IFS=$IFS; IFS=$ac_path_separator
1334 for ac_dir in $ac_dummy; do
1336 test -z "$ac_dir" && ac_dir=.
1337 $as_executable_p "$ac_dir/$ac_word" || continue
1338 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1339 ac_prog_rejected=yes
1343 echo "$as_me:1343: found $ac_dir/$ac_word" >&5
1347 if test "$ac_prog_rejected" = yes; then
1348 # We found a bogon in the path, so make sure we never use it.
1349 set dummy $ac_cv_prog_CC
1351 if test $# != 0; then
1352 # We chose a different compiler from the bogus one.
1353 # However, it has the same basename, so the bogon will be chosen
1354 # first if we set CC to just the basename; use the full file name.
1356 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1364 if test -n "$CC"; then
1365 echo "$as_me:1365: result: $CC" >&5
1366 echo "${ECHO_T}$CC" >&6
1368 echo "$as_me:1368: result: no" >&5
1369 echo "${ECHO_T}no" >&6
1373 if test -z "$CC"; then
1374 if test -n "$ac_tool_prefix"; then
1377 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1378 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1379 echo "$as_me:1379: checking for $ac_word" >&5
1380 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1381 if test "${ac_cv_prog_CC+set}" = set; then
1382 echo $ECHO_N "(cached) $ECHO_C" >&6
1384 if test -n "$CC"; then
1385 ac_cv_prog_CC="$CC" # Let the user override the test.
1387 ac_save_IFS=$IFS; IFS=$ac_path_separator
1389 for ac_dir in $ac_dummy; do
1391 test -z "$ac_dir" && ac_dir=.
1392 $as_executable_p "$ac_dir/$ac_word" || continue
1393 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1394 echo "$as_me:1394: found $ac_dir/$ac_word" >&5
1401 if test -n "$CC"; then
1402 echo "$as_me:1402: result: $CC" >&5
1403 echo "${ECHO_T}$CC" >&6
1405 echo "$as_me:1405: result: no" >&5
1406 echo "${ECHO_T}no" >&6
1409 test -n "$CC" && break
1412 if test -z "$CC"; then
1416 # Extract the first word of "$ac_prog", so it can be a program name with args.
1417 set dummy $ac_prog; ac_word=$2
1418 echo "$as_me:1418: checking for $ac_word" >&5
1419 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1420 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1421 echo $ECHO_N "(cached) $ECHO_C" >&6
1423 if test -n "$ac_ct_CC"; then
1424 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1426 ac_save_IFS=$IFS; IFS=$ac_path_separator
1428 for ac_dir in $ac_dummy; do
1430 test -z "$ac_dir" && ac_dir=.
1431 $as_executable_p "$ac_dir/$ac_word" || continue
1432 ac_cv_prog_ac_ct_CC="$ac_prog"
1433 echo "$as_me:1433: found $ac_dir/$ac_word" >&5
1439 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1440 if test -n "$ac_ct_CC"; then
1441 echo "$as_me:1441: result: $ac_ct_CC" >&5
1442 echo "${ECHO_T}$ac_ct_CC" >&6
1444 echo "$as_me:1444: result: no" >&5
1445 echo "${ECHO_T}no" >&6
1448 test -n "$ac_ct_CC" && break
1456 test -z "$CC" && { { echo "$as_me:1456: error: no acceptable cc found in \$PATH" >&5
1457 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1458 { (exit 1); exit 1; }; }
1460 # Provide some information about the compiler.
1461 echo "$as_me:1461:" \
1462 "checking for C compiler version" >&5
1463 ac_compiler=`set X $ac_compile; echo "$2"`
1464 { (eval echo "$as_me:1464: \"$ac_compiler --version </dev/null >&5\"") >&5
1465 (eval $ac_compiler --version </dev/null >&5) 2>&5
1467 echo "$as_me:1467: \$? = $ac_status" >&5
1468 (exit "$ac_status"); }
1469 { (eval echo "$as_me:1469: \"$ac_compiler -v </dev/null >&5\"") >&5
1470 (eval $ac_compiler -v </dev/null >&5) 2>&5
1472 echo "$as_me:1472: \$? = $ac_status" >&5
1473 (exit "$ac_status"); }
1474 { (eval echo "$as_me:1474: \"$ac_compiler -V </dev/null >&5\"") >&5
1475 (eval $ac_compiler -V </dev/null >&5) 2>&5
1477 echo "$as_me:1477: \$? = $ac_status" >&5
1478 (exit "$ac_status"); }
1480 cat >"conftest.$ac_ext" <<_ACEOF
1481 #line 1481 "configure"
1482 #include "confdefs.h"
1492 ac_clean_files_save=$ac_clean_files
1493 ac_clean_files="$ac_clean_files a.out a.exe"
1494 # Try to create an executable without -o first, disregard a.out.
1495 # It will help us diagnose broken compilers, and finding out an intuition
1497 echo "$as_me:1497: checking for C compiler default output" >&5
1498 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1499 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1500 if { (eval echo "$as_me:1500: \"$ac_link_default\"") >&5
1501 (eval $ac_link_default) 2>&5
1503 echo "$as_me:1503: \$? = $ac_status" >&5
1504 (exit "$ac_status"); }; then
1505 # Find the output, starting from the most likely. This scheme is
1506 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1508 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1509 ls a.out conftest 2>/dev/null;
1510 ls a.* conftest.* 2>/dev/null`; do
1512 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1513 a.out ) # We found the default executable, but exeext='' is most
1516 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1517 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1524 echo "$as_me: failed program was:" >&5
1525 cat "conftest.$ac_ext" >&5
1526 { { echo "$as_me:1526: error: C compiler cannot create executables" >&5
1527 echo "$as_me: error: C compiler cannot create executables" >&2;}
1528 { (exit 77); exit 77; }; }
1531 ac_exeext=$ac_cv_exeext
1532 echo "$as_me:1532: result: $ac_file" >&5
1533 echo "${ECHO_T}$ac_file" >&6
1535 # Check the compiler produces executables we can run. If not, either
1536 # the compiler is broken, or we cross compile.
1537 echo "$as_me:1537: checking whether the C compiler works" >&5
1538 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1539 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1540 # If not cross compiling, check that we can run a simple program.
1541 if test "$cross_compiling" != yes; then
1542 if { ac_try='./$ac_file'
1543 { (eval echo "$as_me:1543: \"$ac_try\"") >&5
1546 echo "$as_me:1546: \$? = $ac_status" >&5
1547 (exit "$ac_status"); }; }; then
1550 if test "$cross_compiling" = maybe; then
1553 { { echo "$as_me:1553: error: cannot run C compiled programs.
1554 If you meant to cross compile, use \`--host'." >&5
1555 echo "$as_me: error: cannot run C compiled programs.
1556 If you meant to cross compile, use \`--host'." >&2;}
1557 { (exit 1); exit 1; }; }
1561 echo "$as_me:1561: result: yes" >&5
1562 echo "${ECHO_T}yes" >&6
1564 rm -f a.out a.exe "conftest$ac_cv_exeext"
1565 ac_clean_files=$ac_clean_files_save
1566 # Check the compiler produces executables we can run. If not, either
1567 # the compiler is broken, or we cross compile.
1568 echo "$as_me:1568: checking whether we are cross compiling" >&5
1569 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1570 echo "$as_me:1570: result: $cross_compiling" >&5
1571 echo "${ECHO_T}$cross_compiling" >&6
1573 echo "$as_me:1573: checking for executable suffix" >&5
1574 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1575 if { (eval echo "$as_me:1575: \"$ac_link\"") >&5
1576 (eval $ac_link) 2>&5
1578 echo "$as_me:1578: \$? = $ac_status" >&5
1579 (exit "$ac_status"); }; then
1580 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1581 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1582 # work properly (i.e., refer to `conftest.exe'), while it won't with
1584 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1586 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1587 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1594 { { echo "$as_me:1594: error: cannot compute EXEEXT: cannot compile and link" >&5
1595 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1596 { (exit 1); exit 1; }; }
1599 rm -f "conftest$ac_cv_exeext"
1600 echo "$as_me:1600: result: $ac_cv_exeext" >&5
1601 echo "${ECHO_T}$ac_cv_exeext" >&6
1603 rm -f "conftest.$ac_ext"
1604 EXEEXT=$ac_cv_exeext
1606 echo "$as_me:1606: checking for object suffix" >&5
1607 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1608 if test "${ac_cv_objext+set}" = set; then
1609 echo $ECHO_N "(cached) $ECHO_C" >&6
1611 cat >"conftest.$ac_ext" <<_ACEOF
1612 #line 1612 "configure"
1613 #include "confdefs.h"
1623 rm -f conftest.o conftest.obj
1624 if { (eval echo "$as_me:1624: \"$ac_compile\"") >&5
1625 (eval $ac_compile) 2>&5
1627 echo "$as_me:1627: \$? = $ac_status" >&5
1628 (exit "$ac_status"); }; then
1629 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1631 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1632 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1637 echo "$as_me: failed program was:" >&5
1638 cat "conftest.$ac_ext" >&5
1639 { { echo "$as_me:1639: error: cannot compute OBJEXT: cannot compile" >&5
1640 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1641 { (exit 1); exit 1; }; }
1644 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1646 echo "$as_me:1646: result: $ac_cv_objext" >&5
1647 echo "${ECHO_T}$ac_cv_objext" >&6
1648 OBJEXT=$ac_cv_objext
1650 echo "$as_me:1650: checking whether we are using the GNU C compiler" >&5
1651 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1652 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1653 echo $ECHO_N "(cached) $ECHO_C" >&6
1655 cat >"conftest.$ac_ext" <<_ACEOF
1656 #line 1656 "configure"
1657 #include "confdefs.h"
1670 rm -f "conftest.$ac_objext"
1671 if { (eval echo "$as_me:1671: \"$ac_compile\"") >&5
1672 (eval $ac_compile) 2>&5
1674 echo "$as_me:1674: \$? = $ac_status" >&5
1675 (exit "$ac_status"); } &&
1676 { ac_try='test -s "conftest.$ac_objext"'
1677 { (eval echo "$as_me:1677: \"$ac_try\"") >&5
1680 echo "$as_me:1680: \$? = $ac_status" >&5
1681 (exit "$ac_status"); }; }; then
1684 echo "$as_me: failed program was:" >&5
1685 cat "conftest.$ac_ext" >&5
1688 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1689 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1692 echo "$as_me:1692: result: $ac_cv_c_compiler_gnu" >&5
1693 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1694 GCC=`test $ac_compiler_gnu = yes && echo yes`
1695 ac_test_CFLAGS=${CFLAGS+set}
1696 ac_save_CFLAGS=$CFLAGS
1698 echo "$as_me:1698: checking whether $CC accepts -g" >&5
1699 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1700 if test "${ac_cv_prog_cc_g+set}" = set; then
1701 echo $ECHO_N "(cached) $ECHO_C" >&6
1703 cat >"conftest.$ac_ext" <<_ACEOF
1704 #line 1704 "configure"
1705 #include "confdefs.h"
1715 rm -f "conftest.$ac_objext"
1716 if { (eval echo "$as_me:1716: \"$ac_compile\"") >&5
1717 (eval $ac_compile) 2>&5
1719 echo "$as_me:1719: \$? = $ac_status" >&5
1720 (exit "$ac_status"); } &&
1721 { ac_try='test -s "conftest.$ac_objext"'
1722 { (eval echo "$as_me:1722: \"$ac_try\"") >&5
1725 echo "$as_me:1725: \$? = $ac_status" >&5
1726 (exit "$ac_status"); }; }; then
1729 echo "$as_me: failed program was:" >&5
1730 cat "conftest.$ac_ext" >&5
1733 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1735 echo "$as_me:1735: result: $ac_cv_prog_cc_g" >&5
1736 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1737 if test "$ac_test_CFLAGS" = set; then
1738 CFLAGS=$ac_save_CFLAGS
1739 elif test $ac_cv_prog_cc_g = yes; then
1740 if test "$GCC" = yes; then
1746 if test "$GCC" = yes; then
1752 # Some people use a C++ compiler to compile C. Since we use `exit',
1753 # in C++ we need to declare it. In case someone uses the same compiler
1754 # for both compiling C and C++ we need to have the C++ compiler decide
1755 # the declaration of exit, since it's the most demanding environment.
1756 cat >"conftest.$ac_ext" <<_ACEOF
1761 rm -f "conftest.$ac_objext"
1762 if { (eval echo "$as_me:1762: \"$ac_compile\"") >&5
1763 (eval $ac_compile) 2>&5
1765 echo "$as_me:1765: \$? = $ac_status" >&5
1766 (exit "$ac_status"); } &&
1767 { ac_try='test -s "conftest.$ac_objext"'
1768 { (eval echo "$as_me:1768: \"$ac_try\"") >&5
1771 echo "$as_me:1771: \$? = $ac_status" >&5
1772 (exit "$ac_status"); }; }; then
1773 for ac_declaration in \
1775 '#include <stdlib.h>' \
1776 'extern "C" void std::exit (int) throw (); using std::exit;' \
1777 'extern "C" void std::exit (int); using std::exit;' \
1778 'extern "C" void exit (int) throw ();' \
1779 'extern "C" void exit (int);' \
1782 cat >"conftest.$ac_ext" <<_ACEOF
1783 #line 1783 "configure"
1784 #include "confdefs.h"
1795 rm -f "conftest.$ac_objext"
1796 if { (eval echo "$as_me:1796: \"$ac_compile\"") >&5
1797 (eval $ac_compile) 2>&5
1799 echo "$as_me:1799: \$? = $ac_status" >&5
1800 (exit "$ac_status"); } &&
1801 { ac_try='test -s "conftest.$ac_objext"'
1802 { (eval echo "$as_me:1802: \"$ac_try\"") >&5
1805 echo "$as_me:1805: \$? = $ac_status" >&5
1806 (exit "$ac_status"); }; }; then
1809 echo "$as_me: failed program was:" >&5
1810 cat "conftest.$ac_ext" >&5
1813 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1814 cat >"conftest.$ac_ext" <<_ACEOF
1815 #line 1815 "configure"
1816 #include "confdefs.h"
1826 rm -f "conftest.$ac_objext"
1827 if { (eval echo "$as_me:1827: \"$ac_compile\"") >&5
1828 (eval $ac_compile) 2>&5
1830 echo "$as_me:1830: \$? = $ac_status" >&5
1831 (exit "$ac_status"); } &&
1832 { ac_try='test -s "conftest.$ac_objext"'
1833 { (eval echo "$as_me:1833: \"$ac_try\"") >&5
1836 echo "$as_me:1836: \$? = $ac_status" >&5
1837 (exit "$ac_status"); }; }; then
1840 echo "$as_me: failed program was:" >&5
1841 cat "conftest.$ac_ext" >&5
1843 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1846 if test -n "$ac_declaration"; then
1847 echo '#ifdef __cplusplus' >>confdefs.h
1848 echo "$ac_declaration" >>confdefs.h
1849 echo '#endif' >>confdefs.h
1853 echo "$as_me: failed program was:" >&5
1854 cat "conftest.$ac_ext" >&5
1856 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1858 ac_cpp='$CPP $CPPFLAGS'
1859 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1860 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1861 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1862 ac_main_return="return"
1865 if test "$GCC" = yes ; then
1866 echo "$as_me:1866: checking version of $CC" >&5
1867 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1868 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.].*//'`"
1869 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1870 echo "$as_me:1870: result: $GCC_VERSION" >&5
1871 echo "${ECHO_T}$GCC_VERSION" >&6
1876 if test "$GCC" = yes ; then
1879 echo "$as_me:1879: checking if this is really Intel C compiler" >&5
1880 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1881 cf_save_CFLAGS="$CFLAGS"
1882 CFLAGS="$CFLAGS -no-gcc"
1883 cat >"conftest.$ac_ext" <<_ACEOF
1884 #line 1884 "configure"
1885 #include "confdefs.h"
1891 #ifdef __INTEL_COMPILER
1900 rm -f "conftest.$ac_objext"
1901 if { (eval echo "$as_me:1901: \"$ac_compile\"") >&5
1902 (eval $ac_compile) 2>&5
1904 echo "$as_me:1904: \$? = $ac_status" >&5
1905 (exit "$ac_status"); } &&
1906 { ac_try='test -s "conftest.$ac_objext"'
1907 { (eval echo "$as_me:1907: \"$ac_try\"") >&5
1910 echo "$as_me:1910: \$? = $ac_status" >&5
1911 (exit "$ac_status"); }; }; then
1913 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1916 echo "$as_me: failed program was:" >&5
1917 cat "conftest.$ac_ext" >&5
1919 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1920 CFLAGS="$cf_save_CFLAGS"
1921 echo "$as_me:1921: result: $INTEL_COMPILER" >&5
1922 echo "${ECHO_T}$INTEL_COMPILER" >&6
1929 if test "$GCC" = yes ; then
1930 echo "$as_me:1930: checking if this is really Clang C compiler" >&5
1931 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1932 cf_save_CFLAGS="$CFLAGS"
1933 cat >"conftest.$ac_ext" <<_ACEOF
1934 #line 1934 "configure"
1935 #include "confdefs.h"
1950 rm -f "conftest.$ac_objext"
1951 if { (eval echo "$as_me:1951: \"$ac_compile\"") >&5
1952 (eval $ac_compile) 2>&5
1954 echo "$as_me:1954: \$? = $ac_status" >&5
1955 (exit "$ac_status"); } &&
1956 { ac_try='test -s "conftest.$ac_objext"'
1957 { (eval echo "$as_me:1957: \"$ac_try\"") >&5
1960 echo "$as_me:1960: \$? = $ac_status" >&5
1961 (exit "$ac_status"); }; }; then
1965 echo "$as_me: failed program was:" >&5
1966 cat "conftest.$ac_ext" >&5
1968 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1969 CFLAGS="$cf_save_CFLAGS"
1970 echo "$as_me:1970: result: $CLANG_COMPILER" >&5
1971 echo "${ECHO_T}$CLANG_COMPILER" >&6
1976 if test "x$CLANG_COMPILER" = "xyes" ; then
1978 (c[1-9][0-9]|*/c[1-9][0-9])
1979 { echo "$as_me:1979: WARNING: replacing broken compiler alias $CC" >&5
1980 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
1981 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
1986 echo "$as_me:1986: checking version of $CC" >&5
1987 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1988 CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1989 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
1990 echo "$as_me:1990: result: $CLANG_VERSION" >&5
1991 echo "${ECHO_T}$CLANG_VERSION" >&6
1993 for cf_clang_opt in \
1994 -Qunused-arguments \
1995 -Wno-error=implicit-function-declaration
1997 echo "$as_me:1997: checking if option $cf_clang_opt works" >&5
1998 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
1999 cf_save_CFLAGS="$CFLAGS"
2000 CFLAGS="$CFLAGS $cf_clang_opt"
2001 cat >"conftest.$ac_ext" <<_ACEOF
2002 #line 2002 "configure"
2003 #include "confdefs.h"
2010 printf("hello!\\n");
2015 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2016 if { (eval echo "$as_me:2016: \"$ac_link\"") >&5
2017 (eval $ac_link) 2>&5
2019 echo "$as_me:2019: \$? = $ac_status" >&5
2020 (exit "$ac_status"); } &&
2021 { ac_try='test -s "conftest$ac_exeext"'
2022 { (eval echo "$as_me:2022: \"$ac_try\"") >&5
2025 echo "$as_me:2025: \$? = $ac_status" >&5
2026 (exit "$ac_status"); }; }; then
2030 echo "$as_me: failed program was:" >&5
2031 cat "conftest.$ac_ext" >&5
2035 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2036 echo "$as_me:2036: result: $cf_clang_optok" >&5
2037 echo "${ECHO_T}$cf_clang_optok" >&6
2038 CFLAGS="$cf_save_CFLAGS"
2039 if test "$cf_clang_optok" = yes; then
2040 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2042 echo "${as_me:-configure}:2042: testing adding option $cf_clang_opt ..." 1>&5
2044 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2045 CFLAGS="${CFLAGS}$cf_clang_opt"
2051 echo "$as_me:2051: checking for $CC option to accept ANSI C" >&5
2052 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2053 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2054 echo $ECHO_N "(cached) $ECHO_C" >&6
2056 ac_cv_prog_cc_stdc=no
2058 cat >"conftest.$ac_ext" <<_ACEOF
2059 #line 2059 "configure"
2060 #include "confdefs.h"
2063 #include <sys/types.h>
2064 #include <sys/stat.h>
2065 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2066 struct buf { int x; };
2067 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2068 static char *e (p, i)
2074 static char *f (char * (*g) (char **, int), char **p, ...)
2079 s = g (p, va_arg (v,int));
2083 int test (int i, double x);
2084 struct s1 {int (*f) (int a);};
2085 struct s2 {int (*f) (double a);};
2086 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2092 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2097 # Don't try gcc -ansi; that turns off useful extensions and
2098 # breaks some systems' header files.
2099 # AIX -qlanglvl=ansi
2100 # Ultrix and OSF/1 -std1
2101 # HP-UX 10.20 and later -Ae
2102 # HP-UX older versions -Aa -D_HPUX_SOURCE
2103 # SVR4 -Xc -D__EXTENSIONS__
2104 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2106 CC="$ac_save_CC $ac_arg"
2107 rm -f "conftest.$ac_objext"
2108 if { (eval echo "$as_me:2108: \"$ac_compile\"") >&5
2109 (eval $ac_compile) 2>&5
2111 echo "$as_me:2111: \$? = $ac_status" >&5
2112 (exit "$ac_status"); } &&
2113 { ac_try='test -s "conftest.$ac_objext"'
2114 { (eval echo "$as_me:2114: \"$ac_try\"") >&5
2117 echo "$as_me:2117: \$? = $ac_status" >&5
2118 (exit "$ac_status"); }; }; then
2119 ac_cv_prog_cc_stdc=$ac_arg
2122 echo "$as_me: failed program was:" >&5
2123 cat "conftest.$ac_ext" >&5
2125 rm -f "conftest.$ac_objext"
2127 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2132 case "x$ac_cv_prog_cc_stdc" in
2134 echo "$as_me:2134: result: none needed" >&5
2135 echo "${ECHO_T}none needed" >&6 ;;
2137 echo "$as_me:2137: result: $ac_cv_prog_cc_stdc" >&5
2138 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2139 CC="$CC $ac_cv_prog_cc_stdc" ;;
2142 # This should have been defined by AC_PROG_CC
2145 echo "$as_me:2145: checking \$CFLAGS variable" >&5
2146 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2149 echo "$as_me:2149: result: broken" >&5
2150 echo "${ECHO_T}broken" >&6
2151 { echo "$as_me:2151: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2152 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2155 for cf_arg in $cf_flags
2161 cf_new_extra_cppflags=
2163 for cf_add_cflags in $cf_arg
2165 case "$cf_fix_cppflags" in
2167 case "$cf_add_cflags" in
2168 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2169 case "$cf_add_cflags" in
2171 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2173 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2174 && test -z "${cf_tst_cflags}" \
2175 && cf_fix_cppflags=yes
2177 if test "$cf_fix_cppflags" = yes ; then
2179 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2180 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2183 elif test "${cf_tst_cflags}" = "\"'" ; then
2185 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2186 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2196 case "$cf_add_cflags" in
2198 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2200 CPPFLAGS=`echo "$CPPFLAGS" | \
2201 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2202 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2207 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2208 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2215 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2216 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2223 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2224 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2226 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2228 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2229 && test -z "${cf_tst_cflags}" \
2230 && cf_fix_cppflags=no
2235 if test -n "$cf_new_cflags" ; then
2237 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2238 CFLAGS="${CFLAGS}$cf_new_cflags"
2242 if test -n "$cf_new_cppflags" ; then
2244 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2245 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2249 if test -n "$cf_new_extra_cppflags" ; then
2251 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2252 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2259 echo "$as_me:2259: result: ok" >&5
2260 echo "${ECHO_T}ok" >&6
2264 echo "$as_me:2264: checking \$CC variable" >&5
2265 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2268 echo "$as_me:2268: result: broken" >&5
2269 echo "${ECHO_T}broken" >&6
2270 { echo "$as_me:2270: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2271 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2273 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2274 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2276 for cf_arg in $cf_flags
2284 cf_new_extra_cppflags=
2286 for cf_add_cflags in $cf_arg
2288 case "$cf_fix_cppflags" in
2290 case "$cf_add_cflags" in
2291 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2292 case "$cf_add_cflags" in
2294 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2296 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2297 && test -z "${cf_tst_cflags}" \
2298 && cf_fix_cppflags=yes
2300 if test "$cf_fix_cppflags" = yes ; then
2302 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2303 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2306 elif test "${cf_tst_cflags}" = "\"'" ; then
2308 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2309 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2319 case "$cf_add_cflags" in
2321 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2323 CPPFLAGS=`echo "$CPPFLAGS" | \
2324 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2325 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2330 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2331 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2338 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2339 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2346 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2347 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2349 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2351 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2352 && test -z "${cf_tst_cflags}" \
2353 && cf_fix_cppflags=no
2358 if test -n "$cf_new_cflags" ; then
2360 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2361 CFLAGS="${CFLAGS}$cf_new_cflags"
2365 if test -n "$cf_new_cppflags" ; then
2367 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2368 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2372 if test -n "$cf_new_extra_cppflags" ; then
2374 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2375 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2385 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2387 echo "${as_me:-configure}:2387: testing resulting CC: '$CC' ..." 1>&5
2389 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2391 echo "${as_me:-configure}:2391: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2393 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2395 echo "${as_me:-configure}:2395: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2399 echo "$as_me:2399: result: ok" >&5
2400 echo "${ECHO_T}ok" >&6
2404 echo "$as_me:2404: checking for inline" >&5
2405 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2406 if test "${ac_cv_c_inline+set}" = set; then
2407 echo $ECHO_N "(cached) $ECHO_C" >&6
2410 for ac_kw in inline __inline__ __inline; do
2411 cat >"conftest.$ac_ext" <<_ACEOF
2412 #line 2412 "configure"
2413 #include "confdefs.h"
2415 static $ac_kw int static_foo () {return 0; }
2416 $ac_kw int foo () {return 0; }
2420 rm -f "conftest.$ac_objext"
2421 if { (eval echo "$as_me:2421: \"$ac_compile\"") >&5
2422 (eval $ac_compile) 2>&5
2424 echo "$as_me:2424: \$? = $ac_status" >&5
2425 (exit "$ac_status"); } &&
2426 { ac_try='test -s "conftest.$ac_objext"'
2427 { (eval echo "$as_me:2427: \"$ac_try\"") >&5
2430 echo "$as_me:2430: \$? = $ac_status" >&5
2431 (exit "$ac_status"); }; }; then
2432 ac_cv_c_inline=$ac_kw; break
2434 echo "$as_me: failed program was:" >&5
2435 cat "conftest.$ac_ext" >&5
2437 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2441 echo "$as_me:2441: result: $ac_cv_c_inline" >&5
2442 echo "${ECHO_T}$ac_cv_c_inline" >&6
2443 case $ac_cv_c_inline in
2446 cat >>confdefs.h <<\EOF
2450 *) cat >>confdefs.h <<EOF
2451 #define inline $ac_cv_c_inline
2456 for ac_prog in ggrep grep
2458 # Extract the first word of "$ac_prog", so it can be a program name with args.
2459 set dummy $ac_prog; ac_word=$2
2460 echo "$as_me:2460: checking for $ac_word" >&5
2461 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2462 if test "${ac_cv_prog_GREP+set}" = set; then
2463 echo $ECHO_N "(cached) $ECHO_C" >&6
2465 if test -n "$GREP"; then
2466 ac_cv_prog_GREP="$GREP" # Let the user override the test.
2468 ac_save_IFS=$IFS; IFS=$ac_path_separator
2470 for ac_dir in $ac_dummy; do
2472 test -z "$ac_dir" && ac_dir=.
2473 $as_executable_p "$ac_dir/$ac_word" || continue
2474 ac_cv_prog_GREP="$ac_prog"
2475 echo "$as_me:2475: found $ac_dir/$ac_word" >&5
2481 GREP=$ac_cv_prog_GREP
2482 if test -n "$GREP"; then
2483 echo "$as_me:2483: result: $GREP" >&5
2484 echo "${ECHO_T}$GREP" >&6
2486 echo "$as_me:2486: result: no" >&5
2487 echo "${ECHO_T}no" >&6
2490 test -n "$GREP" && break
2492 test -n "$GREP" || GREP=": "
2494 echo "$as_me:2494: checking for egrep" >&5
2495 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2496 if test "${ac_cv_path_EGREP+set}" = set; then
2497 echo $ECHO_N "(cached) $ECHO_C" >&6
2499 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2500 then ac_cv_path_EGREP="$GREP -E"
2502 for ac_prog in gegrep egrep
2504 # Extract the first word of "$ac_prog", so it can be a program name with args.
2505 set dummy $ac_prog; ac_word=$2
2506 echo "$as_me:2506: checking for $ac_word" >&5
2507 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2508 if test "${ac_cv_path_EGREP+set}" = set; then
2509 echo $ECHO_N "(cached) $ECHO_C" >&6
2513 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2516 ac_save_IFS=$IFS; IFS=$ac_path_separator
2518 for ac_dir in $ac_dummy; do
2520 test -z "$ac_dir" && ac_dir=.
2521 if $as_executable_p "$ac_dir/$ac_word"; then
2522 ac_cv_path_EGREP="$ac_dir/$ac_word"
2523 echo "$as_me:2523: found $ac_dir/$ac_word" >&5
2531 EGREP=$ac_cv_path_EGREP
2533 if test -n "$EGREP"; then
2534 echo "$as_me:2534: result: $EGREP" >&5
2535 echo "${ECHO_T}$EGREP" >&6
2537 echo "$as_me:2537: result: no" >&5
2538 echo "${ECHO_T}no" >&6
2541 test -n "$EGREP" && break
2543 test -n "$EGREP" || EGREP=": "
2545 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2545: error: cannot find workable egrep" >&5
2546 echo "$as_me: error: cannot find workable egrep" >&2;}
2547 { (exit 1); exit 1; }; }
2550 echo "$as_me:2550: result: $ac_cv_path_EGREP" >&5
2551 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2552 EGREP="$ac_cv_path_EGREP"
2555 ac_cpp='$CPP $CPPFLAGS'
2556 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2557 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2558 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2559 ac_main_return="return"
2560 echo "$as_me:2560: checking how to run the C preprocessor" >&5
2561 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2562 # On Suns, sometimes $CPP names a directory.
2563 if test -n "$CPP" && test -d "$CPP"; then
2566 if test -z "$CPP"; then
2567 if test "${ac_cv_prog_CPP+set}" = set; then
2568 echo $ECHO_N "(cached) $ECHO_C" >&6
2570 # Double quotes because CPP needs to be expanded
2571 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2574 for ac_c_preproc_warn_flag in '' yes
2576 # Use a header file that comes with gcc, so configuring glibc
2577 # with a fresh cross-compiler works.
2578 # On the NeXT, cc -E runs the code through the compiler's parser,
2579 # not just through cpp. "Syntax error" is here to catch this case.
2580 cat >"conftest.$ac_ext" <<_ACEOF
2581 #line 2581 "configure"
2582 #include "confdefs.h"
2586 if { (eval echo "$as_me:2586: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2587 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2589 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2591 cat conftest.err >&5
2592 echo "$as_me:2592: \$? = $ac_status" >&5
2593 (exit "$ac_status"); } >/dev/null; then
2594 if test -s conftest.err; then
2595 ac_cpp_err=$ac_c_preproc_warn_flag
2602 if test -z "$ac_cpp_err"; then
2605 echo "$as_me: failed program was:" >&5
2606 cat "conftest.$ac_ext" >&5
2607 # Broken: fails on valid input.
2610 rm -f conftest.err "conftest.$ac_ext"
2612 # OK, works on sane cases. Now check whether non-existent headers
2613 # can be detected and how.
2614 cat >"conftest.$ac_ext" <<_ACEOF
2615 #line 2615 "configure"
2616 #include "confdefs.h"
2617 #include <ac_nonexistent.h>
2619 if { (eval echo "$as_me:2619: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2620 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2622 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2624 cat conftest.err >&5
2625 echo "$as_me:2625: \$? = $ac_status" >&5
2626 (exit "$ac_status"); } >/dev/null; then
2627 if test -s conftest.err; then
2628 ac_cpp_err=$ac_c_preproc_warn_flag
2635 if test -z "$ac_cpp_err"; then
2636 # Broken: success on invalid input.
2639 echo "$as_me: failed program was:" >&5
2640 cat "conftest.$ac_ext" >&5
2641 # Passes both tests.
2645 rm -f conftest.err "conftest.$ac_ext"
2648 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2649 rm -f conftest.err "conftest.$ac_ext"
2650 if $ac_preproc_ok; then
2662 echo "$as_me:2662: result: $CPP" >&5
2663 echo "${ECHO_T}$CPP" >&6
2665 for ac_c_preproc_warn_flag in '' yes
2667 # Use a header file that comes with gcc, so configuring glibc
2668 # with a fresh cross-compiler works.
2669 # On the NeXT, cc -E runs the code through the compiler's parser,
2670 # not just through cpp. "Syntax error" is here to catch this case.
2671 cat >"conftest.$ac_ext" <<_ACEOF
2672 #line 2672 "configure"
2673 #include "confdefs.h"
2677 if { (eval echo "$as_me:2677: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2678 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2680 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2682 cat conftest.err >&5
2683 echo "$as_me:2683: \$? = $ac_status" >&5
2684 (exit "$ac_status"); } >/dev/null; then
2685 if test -s conftest.err; then
2686 ac_cpp_err=$ac_c_preproc_warn_flag
2693 if test -z "$ac_cpp_err"; then
2696 echo "$as_me: failed program was:" >&5
2697 cat "conftest.$ac_ext" >&5
2698 # Broken: fails on valid input.
2701 rm -f conftest.err "conftest.$ac_ext"
2703 # OK, works on sane cases. Now check whether non-existent headers
2704 # can be detected and how.
2705 cat >"conftest.$ac_ext" <<_ACEOF
2706 #line 2706 "configure"
2707 #include "confdefs.h"
2708 #include <ac_nonexistent.h>
2710 if { (eval echo "$as_me:2710: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2711 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2713 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2715 cat conftest.err >&5
2716 echo "$as_me:2716: \$? = $ac_status" >&5
2717 (exit "$ac_status"); } >/dev/null; then
2718 if test -s conftest.err; then
2719 ac_cpp_err=$ac_c_preproc_warn_flag
2726 if test -z "$ac_cpp_err"; then
2727 # Broken: success on invalid input.
2730 echo "$as_me: failed program was:" >&5
2731 cat "conftest.$ac_ext" >&5
2732 # Passes both tests.
2736 rm -f conftest.err "conftest.$ac_ext"
2739 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2740 rm -f conftest.err "conftest.$ac_ext"
2741 if $ac_preproc_ok; then
2744 { { echo "$as_me:2744: error: C preprocessor \"$CPP\" fails sanity check" >&5
2745 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2746 { (exit 1); exit 1; }; }
2750 ac_cpp='$CPP $CPPFLAGS'
2751 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2752 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2753 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2754 ac_main_return="return"
2756 for ac_prog in mawk gawk nawk awk
2758 # Extract the first word of "$ac_prog", so it can be a program name with args.
2759 set dummy $ac_prog; ac_word=$2
2760 echo "$as_me:2760: checking for $ac_word" >&5
2761 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2762 if test "${ac_cv_prog_AWK+set}" = set; then
2763 echo $ECHO_N "(cached) $ECHO_C" >&6
2765 if test -n "$AWK"; then
2766 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2768 ac_save_IFS=$IFS; IFS=$ac_path_separator
2770 for ac_dir in $ac_dummy; do
2772 test -z "$ac_dir" && ac_dir=.
2773 $as_executable_p "$ac_dir/$ac_word" || continue
2774 ac_cv_prog_AWK="$ac_prog"
2775 echo "$as_me:2775: found $ac_dir/$ac_word" >&5
2782 if test -n "$AWK"; then
2783 echo "$as_me:2783: result: $AWK" >&5
2784 echo "${ECHO_T}$AWK" >&6
2786 echo "$as_me:2786: result: no" >&5
2787 echo "${ECHO_T}no" >&6
2790 test -n "$AWK" && break
2793 # Find a good install program. We prefer a C program (faster),
2794 # so one script is as good as another. But avoid the broken or
2795 # incompatible versions:
2796 # SysV /etc/install, /usr/sbin/install
2797 # SunOS /usr/etc/install
2798 # IRIX /sbin/install
2800 # AmigaOS /C/install, which installs bootblocks on floppy discs
2801 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2802 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2803 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2804 # ./install, which can be erroneously created by make from ./install.sh.
2805 echo "$as_me:2805: checking for a BSD compatible install" >&5
2806 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2807 if test -z "$INSTALL"; then
2808 if test "${ac_cv_path_install+set}" = set; then
2809 echo $ECHO_N "(cached) $ECHO_C" >&6
2811 ac_save_IFS=$IFS; IFS=$ac_path_separator
2812 for ac_dir in $PATH; do
2814 # Account for people who put trailing slashes in PATH elements.
2816 / | ./ | .// | /cC/* \
2817 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2820 # OSF1 and SCO ODT 3.0 have their own names for install.
2821 # Don't use installbsd from OSF since it installs stuff as root
2823 for ac_prog in ginstall scoinst install; do
2824 if $as_executable_p "$ac_dir/$ac_prog"; then
2825 if test $ac_prog = install &&
2826 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2827 # AIX install. It has an incompatible calling convention.
2829 elif test $ac_prog = install &&
2830 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2831 # program-specific install script used by HP pwplus--don't use.
2834 ac_cv_path_install="$ac_dir/$ac_prog -c"
2844 if test "${ac_cv_path_install+set}" = set; then
2845 INSTALL=$ac_cv_path_install
2847 # As a last resort, use the slow shell script. We don't cache a
2848 # path for INSTALL within a source directory, because that will
2849 # break other packages using the cache if that directory is
2850 # removed, or if the path is relative.
2851 INSTALL=$ac_install_sh
2854 echo "$as_me:2854: result: $INSTALL" >&5
2855 echo "${ECHO_T}$INSTALL" >&6
2857 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2858 # It thinks the first close brace ends the variable substitution.
2859 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2861 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2863 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2869 cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
2870 test -z "$cf_dir" && cf_dir=.
2871 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
2875 echo "$as_me:2875: checking if you want to install stripped executables" >&5
2876 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2878 # Check whether --enable-stripping or --disable-stripping was given.
2879 if test "${enable_stripping+set}" = set; then
2880 enableval="$enable_stripping"
2881 test "$enableval" != no && enableval=yes
2882 if test "$enableval" != "yes" ; then
2885 enable_stripping=yes
2889 enable_stripping=yes
2892 echo "$as_me:2892: result: $enable_stripping" >&5
2893 echo "${ECHO_T}$enable_stripping" >&6
2895 if test "$enable_stripping" = yes
2902 : "${INSTALL:=install}"
2903 echo "$as_me:2903: checking if install accepts -p option" >&5
2904 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
2905 if test "${cf_cv_install_p+set}" = set; then
2906 echo $ECHO_N "(cached) $ECHO_C" >&6
2913 if $INSTALL -p conftest.in conftest.out 2>/dev/null
2915 if test -f conftest.out/conftest.in
2917 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
2918 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
2919 if test -s conftest.err
2934 echo "$as_me:2934: result: $cf_cv_install_p" >&5
2935 echo "${ECHO_T}$cf_cv_install_p" >&6
2937 echo "$as_me:2937: checking if install needs to be told about ownership" >&5
2938 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
2939 case `$ac_config_guess` in
2948 echo "$as_me:2948: result: $with_install_o" >&5
2949 echo "${ECHO_T}$with_install_o" >&6
2950 if test "x$with_install_o" = xyes
2952 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'`"
2957 for ac_prog in lint cppcheck splint
2959 # Extract the first word of "$ac_prog", so it can be a program name with args.
2960 set dummy $ac_prog; ac_word=$2
2961 echo "$as_me:2961: checking for $ac_word" >&5
2962 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2963 if test "${ac_cv_prog_LINT+set}" = set; then
2964 echo $ECHO_N "(cached) $ECHO_C" >&6
2966 if test -n "$LINT"; then
2967 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2969 ac_save_IFS=$IFS; IFS=$ac_path_separator
2971 for ac_dir in $ac_dummy; do
2973 test -z "$ac_dir" && ac_dir=.
2974 $as_executable_p "$ac_dir/$ac_word" || continue
2975 ac_cv_prog_LINT="$ac_prog"
2976 echo "$as_me:2976: found $ac_dir/$ac_word" >&5
2982 LINT=$ac_cv_prog_LINT
2983 if test -n "$LINT"; then
2984 echo "$as_me:2984: result: $LINT" >&5
2985 echo "${ECHO_T}$LINT" >&6
2987 echo "$as_me:2987: result: no" >&5
2988 echo "${ECHO_T}no" >&6
2991 test -n "$LINT" && break
2995 (xcppcheck|x*/cppcheck)
2996 test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3000 echo "$as_me:3000: checking if filesystem supports mixed-case filenames" >&5
3001 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3002 if test "${cf_cv_mixedcase+set}" = set; then
3003 echo $ECHO_N "(cached) $ECHO_C" >&6
3006 if test "$cross_compiling" = yes ; then
3007 case "$target_alias" in
3008 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3016 rm -f conftest CONFTEST
3018 if test -f CONFTEST ; then
3023 rm -f conftest CONFTEST
3027 echo "$as_me:3027: result: $cf_cv_mixedcase" >&5
3028 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3029 test "$cf_cv_mixedcase" = yes &&
3030 cat >>confdefs.h <<\EOF
3031 #define MIXEDCASE_FILENAMES 1
3034 for ac_prog in exctags ctags
3036 # Extract the first word of "$ac_prog", so it can be a program name with args.
3037 set dummy $ac_prog; ac_word=$2
3038 echo "$as_me:3038: checking for $ac_word" >&5
3039 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3040 if test "${ac_cv_prog_CTAGS+set}" = set; then
3041 echo $ECHO_N "(cached) $ECHO_C" >&6
3043 if test -n "$CTAGS"; then
3044 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3046 ac_save_IFS=$IFS; IFS=$ac_path_separator
3048 for ac_dir in $ac_dummy; do
3050 test -z "$ac_dir" && ac_dir=.
3051 $as_executable_p "$ac_dir/$ac_word" || continue
3052 ac_cv_prog_CTAGS="$ac_prog"
3053 echo "$as_me:3053: found $ac_dir/$ac_word" >&5
3059 CTAGS=$ac_cv_prog_CTAGS
3060 if test -n "$CTAGS"; then
3061 echo "$as_me:3061: result: $CTAGS" >&5
3062 echo "${ECHO_T}$CTAGS" >&6
3064 echo "$as_me:3064: result: no" >&5
3065 echo "${ECHO_T}no" >&6
3068 test -n "$CTAGS" && break
3071 for ac_prog in exetags etags
3073 # Extract the first word of "$ac_prog", so it can be a program name with args.
3074 set dummy $ac_prog; ac_word=$2
3075 echo "$as_me:3075: checking for $ac_word" >&5
3076 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3077 if test "${ac_cv_prog_ETAGS+set}" = set; then
3078 echo $ECHO_N "(cached) $ECHO_C" >&6
3080 if test -n "$ETAGS"; then
3081 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3083 ac_save_IFS=$IFS; IFS=$ac_path_separator
3085 for ac_dir in $ac_dummy; do
3087 test -z "$ac_dir" && ac_dir=.
3088 $as_executable_p "$ac_dir/$ac_word" || continue
3089 ac_cv_prog_ETAGS="$ac_prog"
3090 echo "$as_me:3090: found $ac_dir/$ac_word" >&5
3096 ETAGS=$ac_cv_prog_ETAGS
3097 if test -n "$ETAGS"; then
3098 echo "$as_me:3098: result: $ETAGS" >&5
3099 echo "${ECHO_T}$ETAGS" >&6
3101 echo "$as_me:3101: result: no" >&5
3102 echo "${ECHO_T}no" >&6
3105 test -n "$ETAGS" && break
3108 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3109 set dummy ${CTAGS:-ctags}; ac_word=$2
3110 echo "$as_me:3110: checking for $ac_word" >&5
3111 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3112 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3113 echo $ECHO_N "(cached) $ECHO_C" >&6
3115 if test -n "$MAKE_LOWER_TAGS"; then
3116 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3118 ac_save_IFS=$IFS; IFS=$ac_path_separator
3120 for ac_dir in $ac_dummy; do
3122 test -z "$ac_dir" && ac_dir=.
3123 $as_executable_p "$ac_dir/$ac_word" || continue
3124 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3125 echo "$as_me:3125: found $ac_dir/$ac_word" >&5
3129 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3132 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3133 if test -n "$MAKE_LOWER_TAGS"; then
3134 echo "$as_me:3134: result: $MAKE_LOWER_TAGS" >&5
3135 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3137 echo "$as_me:3137: result: no" >&5
3138 echo "${ECHO_T}no" >&6
3141 if test "$cf_cv_mixedcase" = yes ; then
3142 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3143 set dummy ${ETAGS:-etags}; ac_word=$2
3144 echo "$as_me:3144: checking for $ac_word" >&5
3145 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3146 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3147 echo $ECHO_N "(cached) $ECHO_C" >&6
3149 if test -n "$MAKE_UPPER_TAGS"; then
3150 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3152 ac_save_IFS=$IFS; IFS=$ac_path_separator
3154 for ac_dir in $ac_dummy; do
3156 test -z "$ac_dir" && ac_dir=.
3157 $as_executable_p "$ac_dir/$ac_word" || continue
3158 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3159 echo "$as_me:3159: found $ac_dir/$ac_word" >&5
3163 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3166 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3167 if test -n "$MAKE_UPPER_TAGS"; then
3168 echo "$as_me:3168: result: $MAKE_UPPER_TAGS" >&5
3169 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3171 echo "$as_me:3171: result: no" >&5
3172 echo "${ECHO_T}no" >&6
3179 if test "$MAKE_UPPER_TAGS" = yes ; then
3185 if test "$MAKE_LOWER_TAGS" = yes ; then
3191 echo "$as_me:3191: checking if -lm needed for math functions" >&5
3192 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
3193 if test "${cf_cv_need_libm+set}" = set; then
3194 echo $ECHO_N "(cached) $ECHO_C" >&6
3197 cat >"conftest.$ac_ext" <<_ACEOF
3198 #line 3198 "configure"
3199 #include "confdefs.h"
3208 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
3213 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3214 if { (eval echo "$as_me:3214: \"$ac_link\"") >&5
3215 (eval $ac_link) 2>&5
3217 echo "$as_me:3217: \$? = $ac_status" >&5
3218 (exit "$ac_status"); } &&
3219 { ac_try='test -s "conftest$ac_exeext"'
3220 { (eval echo "$as_me:3220: \"$ac_try\"") >&5
3223 echo "$as_me:3223: \$? = $ac_status" >&5
3224 (exit "$ac_status"); }; }; then
3227 echo "$as_me: failed program was:" >&5
3228 cat "conftest.$ac_ext" >&5
3231 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3233 echo "$as_me:3233: result: $cf_cv_need_libm" >&5
3234 echo "${ECHO_T}$cf_cv_need_libm" >&6
3235 if test "$cf_cv_need_libm" = yes
3243 CC_SHARED_OPTS=unknown
3244 CPPFLAGS="$CPPFLAGS"
3246 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
3247 DFT_UPR_MODEL="NORMAL"
3260 PACKAGE="ncurses-examples"
3266 TINFO_LIBS='$(LIBS_CURSES)'
3267 cf_cv_abi_version=""
3268 cf_cv_rel_version=""
3274 echo "$as_me:3274: checking for fgrep" >&5
3275 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
3276 if test "${ac_cv_path_FGREP+set}" = set; then
3277 echo $ECHO_N "(cached) $ECHO_C" >&6
3279 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
3280 then ac_cv_path_FGREP="$GREP -F"
3282 for ac_prog in gfgrep fgrep
3284 # Extract the first word of "$ac_prog", so it can be a program name with args.
3285 set dummy $ac_prog; ac_word=$2
3286 echo "$as_me:3286: checking for $ac_word" >&5
3287 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3288 if test "${ac_cv_path_FGREP+set}" = set; then
3289 echo $ECHO_N "(cached) $ECHO_C" >&6
3293 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
3296 ac_save_IFS=$IFS; IFS=$ac_path_separator
3298 for ac_dir in $ac_dummy; do
3300 test -z "$ac_dir" && ac_dir=.
3301 if $as_executable_p "$ac_dir/$ac_word"; then
3302 ac_cv_path_FGREP="$ac_dir/$ac_word"
3303 echo "$as_me:3303: found $ac_dir/$ac_word" >&5
3311 FGREP=$ac_cv_path_FGREP
3313 if test -n "$FGREP"; then
3314 echo "$as_me:3314: result: $FGREP" >&5
3315 echo "${ECHO_T}$FGREP" >&6
3317 echo "$as_me:3317: result: no" >&5
3318 echo "${ECHO_T}no" >&6
3321 test -n "$FGREP" && break
3323 test -n "$FGREP" || FGREP=": "
3325 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:3325: error: cannot find workable fgrep" >&5
3326 echo "$as_me: error: cannot find workable fgrep" >&2;}
3327 { (exit 1); exit 1; }; }
3330 echo "$as_me:3330: result: $ac_cv_path_FGREP" >&5
3331 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
3332 FGREP="$ac_cv_path_FGREP"
3334 echo "$as_me:3334: checking if you want to use C11 _Noreturn feature" >&5
3335 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
3337 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
3338 if test "${enable_stdnoreturn+set}" = set; then
3339 enableval="$enable_stdnoreturn"
3340 test "$enableval" != yes && enableval=no
3341 if test "$enableval" != "no" ; then
3342 enable_stdnoreturn=yes
3344 enable_stdnoreturn=no
3348 enable_stdnoreturn=no
3351 echo "$as_me:3351: result: $enable_stdnoreturn" >&5
3352 echo "${ECHO_T}$enable_stdnoreturn" >&6
3354 if test $enable_stdnoreturn = yes; then
3355 echo "$as_me:3355: checking for C11 _Noreturn feature" >&5
3356 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
3357 if test "${cf_cv_c11_noreturn+set}" = set; then
3358 echo $ECHO_N "(cached) $ECHO_C" >&6
3360 cat >"conftest.$ac_ext" <<_ACEOF
3361 #line 3361 "configure"
3362 #include "confdefs.h"
3366 #include <stdnoreturn.h>
3367 static _Noreturn void giveup(void) { exit(0); }
3372 if (feof(stdin)) giveup()
3377 rm -f "conftest.$ac_objext"
3378 if { (eval echo "$as_me:3378: \"$ac_compile\"") >&5
3379 (eval $ac_compile) 2>&5
3381 echo "$as_me:3381: \$? = $ac_status" >&5
3382 (exit "$ac_status"); } &&
3383 { ac_try='test -s "conftest.$ac_objext"'
3384 { (eval echo "$as_me:3384: \"$ac_try\"") >&5
3387 echo "$as_me:3387: \$? = $ac_status" >&5
3388 (exit "$ac_status"); }; }; then
3389 cf_cv_c11_noreturn=yes
3391 echo "$as_me: failed program was:" >&5
3392 cat "conftest.$ac_ext" >&5
3393 cf_cv_c11_noreturn=no
3395 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3398 echo "$as_me:3398: result: $cf_cv_c11_noreturn" >&5
3399 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
3401 cf_cv_c11_noreturn=no,
3404 if test "$cf_cv_c11_noreturn" = yes; then
3406 cat >>confdefs.h <<\EOF
3407 #define HAVE_STDNORETURN_H 1
3410 cat >>confdefs.h <<EOF
3411 #define STDC_NORETURN _Noreturn
3414 HAVE_STDNORETURN_H=1
3416 HAVE_STDNORETURN_H=0
3419 if test "$GCC" = yes || test "$GXX" = yes
3421 cat > conftest.i <<EOF
3423 #define GCC_PRINTF 0
3428 #ifndef GCC_NORETURN
3429 #define GCC_NORETURN /* nothing */
3432 #define GCC_UNUSED /* nothing */
3435 if test "$GCC" = yes
3437 { echo "$as_me:3437: checking for $CC __attribute__ directives..." >&5
3438 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
3439 cat > "conftest.$ac_ext" <<EOF
3440 #line 3440 "${as_me:-configure}"
3441 #include "confdefs.h"
3442 #include "conftest.h"
3443 #include "conftest.i"
3445 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3447 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
3450 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
3452 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
3454 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
3455 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
3456 extern GCC_NORETURN void foo(void);
3457 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
3459 cf_printf_attribute=no
3460 cf_scanf_attribute=no
3461 for cf_attribute in scanf printf unused noreturn
3464 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3466 cf_directive="__attribute__(($cf_attribute))"
3467 echo "checking for $CC $cf_directive" 1>&5
3469 case "$cf_attribute" in
3471 cf_printf_attribute=yes
3472 cat >conftest.h <<EOF
3473 #define GCC_$cf_ATTRIBUTE 1
3477 cf_scanf_attribute=yes
3478 cat >conftest.h <<EOF
3479 #define GCC_$cf_ATTRIBUTE 1
3483 cat >conftest.h <<EOF
3484 #define GCC_$cf_ATTRIBUTE $cf_directive
3489 if { (eval echo "$as_me:3489: \"$ac_compile\"") >&5
3490 (eval $ac_compile) 2>&5
3492 echo "$as_me:3492: \$? = $ac_status" >&5
3493 (exit "$ac_status"); }; then
3494 test -n "$verbose" && echo "$as_me:3494: result: ... $cf_attribute" >&5
3495 echo "${ECHO_T}... $cf_attribute" >&6
3496 cat conftest.h >>confdefs.h
3497 case "$cf_attribute" in
3500 cat >>confdefs.h <<EOF
3501 #define GCC_NORETURN $cf_directive
3506 cf_value='/* nothing */'
3507 if test "$cf_printf_attribute" != no ; then
3508 cf_value='__attribute__((format(printf,fmt,var)))'
3510 cat >>confdefs.h <<\EOF
3511 #define GCC_PRINTF 1
3516 cat >>confdefs.h <<EOF
3517 #define GCC_PRINTFLIKE(fmt,var) $cf_value
3522 cf_value='/* nothing */'
3523 if test "$cf_scanf_attribute" != no ; then
3524 cf_value='__attribute__((format(scanf,fmt,var)))'
3526 cat >>confdefs.h <<\EOF
3532 cat >>confdefs.h <<EOF
3533 #define GCC_SCANFLIKE(fmt,var) $cf_value
3539 cat >>confdefs.h <<EOF
3540 #define GCC_UNUSED $cf_directive
3548 ${FGREP-fgrep} define conftest.i >>confdefs.h
3553 echo "$as_me:3553: checking if you want to work around bogus compiler/loader warnings" >&5
3554 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
3556 # Check whether --enable-string-hacks or --disable-string-hacks was given.
3557 if test "${enable_string_hacks+set}" = set; then
3558 enableval="$enable_string_hacks"
3559 enable_string_hacks=$enableval
3561 enable_string_hacks=no
3563 echo "$as_me:3563: result: $enable_string_hacks" >&5
3564 echo "${ECHO_T}$enable_string_hacks" >&6
3566 if test "x$enable_string_hacks" = "xyes"; then
3568 cat >>confdefs.h <<\EOF
3569 #define USE_STRING_HACKS 1
3572 { echo "$as_me:3572: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
3573 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
3574 echo "$as_me:3574: checking for strlcat" >&5
3575 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
3576 if test "${ac_cv_func_strlcat+set}" = set; then
3577 echo $ECHO_N "(cached) $ECHO_C" >&6
3579 cat >"conftest.$ac_ext" <<_ACEOF
3580 #line 3580 "configure"
3581 #include "confdefs.h"
3582 #define strlcat autoconf_temporary
3583 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3590 /* We use char because int might match the return type of a gcc2
3591 builtin and then its argument prototype would still apply. */
3592 char strlcat (void);
3598 /* The GNU C library defines stubs for functions which it implements
3599 to always fail with ENOSYS. Some functions are actually named
3600 something starting with __ and the normal name is an alias. */
3601 #if defined (__stub_strlcat) || defined (__stub___strlcat)
3602 #error found stub for strlcat
3610 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3611 if { (eval echo "$as_me:3611: \"$ac_link\"") >&5
3612 (eval $ac_link) 2>&5
3614 echo "$as_me:3614: \$? = $ac_status" >&5
3615 (exit "$ac_status"); } &&
3616 { ac_try='test -s "conftest$ac_exeext"'
3617 { (eval echo "$as_me:3617: \"$ac_try\"") >&5
3620 echo "$as_me:3620: \$? = $ac_status" >&5
3621 (exit "$ac_status"); }; }; then
3622 ac_cv_func_strlcat=yes
3624 echo "$as_me: failed program was:" >&5
3625 cat "conftest.$ac_ext" >&5
3626 ac_cv_func_strlcat=no
3628 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3630 echo "$as_me:3630: result: $ac_cv_func_strlcat" >&5
3631 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
3632 if test "$ac_cv_func_strlcat" = yes; then
3634 cat >>confdefs.h <<\EOF
3635 #define HAVE_STRLCAT 1
3640 echo "$as_me:3640: checking for strlcat in -lbsd" >&5
3641 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
3642 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
3643 echo $ECHO_N "(cached) $ECHO_C" >&6
3645 ac_check_lib_save_LIBS=$LIBS
3647 cat >"conftest.$ac_ext" <<_ACEOF
3648 #line 3648 "configure"
3649 #include "confdefs.h"
3651 /* Override any gcc2 internal prototype to avoid an error. */
3655 /* We use char because int might match the return type of a gcc2
3656 builtin and then its argument prototype would still apply. */
3666 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3667 if { (eval echo "$as_me:3667: \"$ac_link\"") >&5
3668 (eval $ac_link) 2>&5
3670 echo "$as_me:3670: \$? = $ac_status" >&5
3671 (exit "$ac_status"); } &&
3672 { ac_try='test -s "conftest$ac_exeext"'
3673 { (eval echo "$as_me:3673: \"$ac_try\"") >&5
3676 echo "$as_me:3676: \$? = $ac_status" >&5
3677 (exit "$ac_status"); }; }; then
3678 ac_cv_lib_bsd_strlcat=yes
3680 echo "$as_me: failed program was:" >&5
3681 cat "conftest.$ac_ext" >&5
3682 ac_cv_lib_bsd_strlcat=no
3684 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3685 LIBS=$ac_check_lib_save_LIBS
3687 echo "$as_me:3687: result: $ac_cv_lib_bsd_strlcat" >&5
3688 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
3689 if test "$ac_cv_lib_bsd_strlcat" = yes; then
3694 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
3696 for cf_add_1lib in $cf_add_0lib; do
3697 for cf_add_2lib in $cf_add_libs; do
3698 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
3703 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
3707 for ac_header in bsd/string.h
3709 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3710 echo "$as_me:3710: checking for $ac_header" >&5
3711 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3712 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3713 echo $ECHO_N "(cached) $ECHO_C" >&6
3715 cat >"conftest.$ac_ext" <<_ACEOF
3716 #line 3716 "configure"
3717 #include "confdefs.h"
3718 #include <$ac_header>
3720 if { (eval echo "$as_me:3720: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3721 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3723 $EGREP -v '^ *\+' conftest.er1 >conftest.err
3725 cat conftest.err >&5
3726 echo "$as_me:3726: \$? = $ac_status" >&5
3727 (exit "$ac_status"); } >/dev/null; then
3728 if test -s conftest.err; then
3729 ac_cpp_err=$ac_c_preproc_warn_flag
3736 if test -z "$ac_cpp_err"; then
3737 eval "$as_ac_Header=yes"
3739 echo "$as_me: failed program was:" >&5
3740 cat "conftest.$ac_ext" >&5
3741 eval "$as_ac_Header=no"
3743 rm -f conftest.err "conftest.$ac_ext"
3745 echo "$as_me:3745: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
3746 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
3747 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
3748 cat >>confdefs.h <<EOF
3749 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3755 cat >>confdefs.h <<\EOF
3756 #define HAVE_STRLCAT 1
3763 for ac_func in strlcpy snprintf
3765 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3766 echo "$as_me:3766: checking for $ac_func" >&5
3767 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3768 if eval "test \"\${$as_ac_var+set}\" = set"; then
3769 echo $ECHO_N "(cached) $ECHO_C" >&6
3771 cat >"conftest.$ac_ext" <<_ACEOF
3772 #line 3772 "configure"
3773 #include "confdefs.h"
3774 #define $ac_func autoconf_temporary
3775 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3782 /* We use char because int might match the return type of a gcc2
3783 builtin and then its argument prototype would still apply. */
3784 char $ac_func (void);
3790 /* The GNU C library defines stubs for functions which it implements
3791 to always fail with ENOSYS. Some functions are actually named
3792 something starting with __ and the normal name is an alias. */
3793 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3794 #error found stub for $ac_func
3802 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3803 if { (eval echo "$as_me:3803: \"$ac_link\"") >&5
3804 (eval $ac_link) 2>&5
3806 echo "$as_me:3806: \$? = $ac_status" >&5
3807 (exit "$ac_status"); } &&
3808 { ac_try='test -s "conftest$ac_exeext"'
3809 { (eval echo "$as_me:3809: \"$ac_try\"") >&5
3812 echo "$as_me:3812: \$? = $ac_status" >&5
3813 (exit "$ac_status"); }; }; then
3814 eval "$as_ac_var=yes"
3816 echo "$as_me: failed program was:" >&5
3817 cat "conftest.$ac_ext" >&5
3818 eval "$as_ac_var=no"
3820 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3822 echo "$as_me:3822: result: `eval echo '${'"$as_ac_var"'}'`" >&5
3823 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
3824 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
3825 cat >>confdefs.h <<EOF
3826 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3834 echo "$as_me:3834: checking if the POSIX test-macros are already defined" >&5
3835 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
3836 if test "${cf_cv_posix_visible+set}" = set; then
3837 echo $ECHO_N "(cached) $ECHO_C" >&6
3840 cat >"conftest.$ac_ext" <<_ACEOF
3841 #line 3841 "configure"
3842 #include "confdefs.h"
3848 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
3849 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
3850 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
3851 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
3852 #error conflicting symbols found
3859 rm -f "conftest.$ac_objext"
3860 if { (eval echo "$as_me:3860: \"$ac_compile\"") >&5
3861 (eval $ac_compile) 2>&5
3863 echo "$as_me:3863: \$? = $ac_status" >&5
3864 (exit "$ac_status"); } &&
3865 { ac_try='test -s "conftest.$ac_objext"'
3866 { (eval echo "$as_me:3866: \"$ac_try\"") >&5
3869 echo "$as_me:3869: \$? = $ac_status" >&5
3870 (exit "$ac_status"); }; }; then
3871 cf_cv_posix_visible=no
3873 echo "$as_me: failed program was:" >&5
3874 cat "conftest.$ac_ext" >&5
3875 cf_cv_posix_visible=yes
3877 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3880 echo "$as_me:3880: result: $cf_cv_posix_visible" >&5
3881 echo "${ECHO_T}$cf_cv_posix_visible" >&6
3883 if test "$cf_cv_posix_visible" = no; then
3886 cf_POSIX_C_SOURCE=199506L
3891 cf_xopen_source="-D_ALL_SOURCE"
3897 cf_xopen_source="-D_APPLE_C_SOURCE"
3900 cf_xopen_source="-D_DARWIN_C_SOURCE"
3903 (freebsd*|dragonfly*|midnightbsd*)
3904 # 5.x headers associate
3905 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3906 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3907 cf_POSIX_C_SOURCE=200112L
3909 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3912 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3915 cf_xopen_source="-D_HPUX_SOURCE"
3918 cf_xopen_source="-D_SGI_SOURCE"
3921 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3923 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3925 echo "$as_me:3925: checking if this is the GNU C library" >&5
3926 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3927 if test "${cf_cv_gnu_library+set}" = set; then
3928 echo $ECHO_N "(cached) $ECHO_C" >&6
3931 cat >"conftest.$ac_ext" <<_ACEOF
3932 #line 3932 "configure"
3933 #include "confdefs.h"
3934 #include <sys/types.h>
3939 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3941 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
3944 # error not GNU C library
3950 rm -f "conftest.$ac_objext"
3951 if { (eval echo "$as_me:3951: \"$ac_compile\"") >&5
3952 (eval $ac_compile) 2>&5
3954 echo "$as_me:3954: \$? = $ac_status" >&5
3955 (exit "$ac_status"); } &&
3956 { ac_try='test -s "conftest.$ac_objext"'
3957 { (eval echo "$as_me:3957: \"$ac_try\"") >&5
3960 echo "$as_me:3960: \$? = $ac_status" >&5
3961 (exit "$ac_status"); }; }; then
3962 cf_cv_gnu_library=yes
3964 echo "$as_me: failed program was:" >&5
3965 cat "conftest.$ac_ext" >&5
3966 cf_cv_gnu_library=no
3968 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3971 echo "$as_me:3971: result: $cf_cv_gnu_library" >&5
3972 echo "${ECHO_T}$cf_cv_gnu_library" >&6
3974 if test x$cf_cv_gnu_library = xyes; then
3976 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3977 # was changed to help a little. newlib incorporated the change about 4
3979 echo "$as_me:3979: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3980 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3981 if test "${cf_cv_gnu_library_219+set}" = set; then
3982 echo $ECHO_N "(cached) $ECHO_C" >&6
3987 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3988 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3990 cat >"conftest.$ac_ext" <<_ACEOF
3991 #line 3991 "configure"
3992 #include "confdefs.h"
3993 #include <sys/types.h>
3998 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
4000 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
4003 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
4009 rm -f "conftest.$ac_objext"
4010 if { (eval echo "$as_me:4010: \"$ac_compile\"") >&5
4011 (eval $ac_compile) 2>&5
4013 echo "$as_me:4013: \$? = $ac_status" >&5
4014 (exit "$ac_status"); } &&
4015 { ac_try='test -s "conftest.$ac_objext"'
4016 { (eval echo "$as_me:4016: \"$ac_try\"") >&5
4019 echo "$as_me:4019: \$? = $ac_status" >&5
4020 (exit "$ac_status"); }; }; then
4021 cf_cv_gnu_library_219=yes
4023 echo "$as_me: failed program was:" >&5
4024 cat "conftest.$ac_ext" >&5
4025 cf_cv_gnu_library_219=no
4027 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4031 echo "$as_me:4031: result: $cf_cv_gnu_library_219" >&5
4032 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
4034 if test "x$cf_cv_gnu_library_219" = xyes; then
4036 echo "$as_me:4036: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
4037 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
4038 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
4039 echo $ECHO_N "(cached) $ECHO_C" >&6
4045 cf_new_extra_cppflags=
4047 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
4049 case "$cf_fix_cppflags" in
4051 case "$cf_add_cflags" in
4052 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4053 case "$cf_add_cflags" in
4055 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4057 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4058 && test -z "${cf_tst_cflags}" \
4059 && cf_fix_cppflags=yes
4061 if test "$cf_fix_cppflags" = yes ; then
4063 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4064 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4067 elif test "${cf_tst_cflags}" = "\"'" ; then
4069 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4070 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4080 case "$cf_add_cflags" in
4082 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4084 CPPFLAGS=`echo "$CPPFLAGS" | \
4085 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4086 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4091 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4092 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4099 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4100 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4107 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4108 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4110 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4112 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4113 && test -z "${cf_tst_cflags}" \
4114 && cf_fix_cppflags=no
4119 if test -n "$cf_new_cflags" ; then
4121 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4122 CFLAGS="${CFLAGS}$cf_new_cflags"
4126 if test -n "$cf_new_cppflags" ; then
4128 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4129 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4133 if test -n "$cf_new_extra_cppflags" ; then
4135 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4136 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4140 cat >"conftest.$ac_ext" <<_ACEOF
4141 #line 4141 "configure"
4142 #include "confdefs.h"
4145 #include <sys/types.h>
4151 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
4154 # error GNU C library is too old
4160 rm -f "conftest.$ac_objext"
4161 if { (eval echo "$as_me:4161: \"$ac_compile\"") >&5
4162 (eval $ac_compile) 2>&5
4164 echo "$as_me:4164: \$? = $ac_status" >&5
4165 (exit "$ac_status"); } &&
4166 { ac_try='test -s "conftest.$ac_objext"'
4167 { (eval echo "$as_me:4167: \"$ac_try\"") >&5
4170 echo "$as_me:4170: \$? = $ac_status" >&5
4171 (exit "$ac_status"); }; }; then
4172 cf_cv_gnu_dftsrc_219=yes
4174 echo "$as_me: failed program was:" >&5
4175 cat "conftest.$ac_ext" >&5
4176 cf_cv_gnu_dftsrc_219=no
4178 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4181 echo "$as_me:4181: result: $cf_cv_gnu_dftsrc_219" >&5
4182 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
4183 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
4185 cf_cv_gnu_dftsrc_219=maybe
4188 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
4190 echo "$as_me:4190: checking if we must define _GNU_SOURCE" >&5
4191 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
4192 if test "${cf_cv_gnu_source+set}" = set; then
4193 echo $ECHO_N "(cached) $ECHO_C" >&6
4196 cat >"conftest.$ac_ext" <<_ACEOF
4197 #line 4197 "configure"
4198 #include "confdefs.h"
4199 #include <sys/types.h>
4204 #ifndef _XOPEN_SOURCE
4205 #error expected _XOPEN_SOURCE to be defined
4211 rm -f "conftest.$ac_objext"
4212 if { (eval echo "$as_me:4212: \"$ac_compile\"") >&5
4213 (eval $ac_compile) 2>&5
4215 echo "$as_me:4215: \$? = $ac_status" >&5
4216 (exit "$ac_status"); } &&
4217 { ac_try='test -s "conftest.$ac_objext"'
4218 { (eval echo "$as_me:4218: \"$ac_try\"") >&5
4221 echo "$as_me:4221: \$? = $ac_status" >&5
4222 (exit "$ac_status"); }; }; then
4225 echo "$as_me: failed program was:" >&5
4226 cat "conftest.$ac_ext" >&5
4232 cf_new_extra_cppflags=
4234 for cf_add_cflags in -D_GNU_SOURCE
4236 case "$cf_fix_cppflags" in
4238 case "$cf_add_cflags" in
4239 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4240 case "$cf_add_cflags" in
4242 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4244 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4245 && test -z "${cf_tst_cflags}" \
4246 && cf_fix_cppflags=yes
4248 if test "$cf_fix_cppflags" = yes ; then
4250 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4251 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4254 elif test "${cf_tst_cflags}" = "\"'" ; then
4256 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4257 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4267 case "$cf_add_cflags" in
4269 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4271 CPPFLAGS=`echo "$CPPFLAGS" | \
4272 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4273 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4278 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4279 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4286 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4287 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4294 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4295 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4297 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4299 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4300 && test -z "${cf_tst_cflags}" \
4301 && cf_fix_cppflags=no
4306 if test -n "$cf_new_cflags" ; then
4308 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4309 CFLAGS="${CFLAGS}$cf_new_cflags"
4313 if test -n "$cf_new_cppflags" ; then
4315 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4316 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4320 if test -n "$cf_new_extra_cppflags" ; then
4322 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4323 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4327 cat >"conftest.$ac_ext" <<_ACEOF
4328 #line 4328 "configure"
4329 #include "confdefs.h"
4330 #include <sys/types.h>
4335 #ifdef _XOPEN_SOURCE
4336 #error expected _XOPEN_SOURCE to be undefined
4342 rm -f "conftest.$ac_objext"
4343 if { (eval echo "$as_me:4343: \"$ac_compile\"") >&5
4344 (eval $ac_compile) 2>&5
4346 echo "$as_me:4346: \$? = $ac_status" >&5
4347 (exit "$ac_status"); } &&
4348 { ac_try='test -s "conftest.$ac_objext"'
4349 { (eval echo "$as_me:4349: \"$ac_try\"") >&5
4352 echo "$as_me:4352: \$? = $ac_status" >&5
4353 (exit "$ac_status"); }; }; then
4356 echo "$as_me: failed program was:" >&5
4357 cat "conftest.$ac_ext" >&5
4358 cf_cv_gnu_source=yes
4360 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4364 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4367 echo "$as_me:4367: result: $cf_cv_gnu_source" >&5
4368 echo "${ECHO_T}$cf_cv_gnu_source" >&6
4370 if test "$cf_cv_gnu_source" = yes
4372 echo "$as_me:4372: checking if we should also define _DEFAULT_SOURCE" >&5
4373 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
4374 if test "${cf_cv_default_source+set}" = set; then
4375 echo $ECHO_N "(cached) $ECHO_C" >&6
4378 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4379 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
4381 cat >"conftest.$ac_ext" <<_ACEOF
4382 #line 4382 "configure"
4383 #include "confdefs.h"
4384 #include <sys/types.h>
4389 #ifdef _DEFAULT_SOURCE
4390 #error expected _DEFAULT_SOURCE to be undefined
4396 rm -f "conftest.$ac_objext"
4397 if { (eval echo "$as_me:4397: \"$ac_compile\"") >&5
4398 (eval $ac_compile) 2>&5
4400 echo "$as_me:4400: \$? = $ac_status" >&5
4401 (exit "$ac_status"); } &&
4402 { ac_try='test -s "conftest.$ac_objext"'
4403 { (eval echo "$as_me:4403: \"$ac_try\"") >&5
4406 echo "$as_me:4406: \$? = $ac_status" >&5
4407 (exit "$ac_status"); }; }; then
4408 cf_cv_default_source=no
4410 echo "$as_me: failed program was:" >&5
4411 cat "conftest.$ac_ext" >&5
4412 cf_cv_default_source=yes
4414 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4417 echo "$as_me:4417: result: $cf_cv_default_source" >&5
4418 echo "${ECHO_T}$cf_cv_default_source" >&6
4419 if test "$cf_cv_default_source" = yes
4422 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4423 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
4433 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
4436 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
4439 if test "$cf_cv_posix_visible" = no; then
4441 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4443 cf_save_CFLAGS="$CFLAGS"
4444 cf_save_CPPFLAGS="$CPPFLAGS"
4446 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4447 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4448 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4450 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4451 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4452 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4454 echo "$as_me:4454: checking if we should define _POSIX_C_SOURCE" >&5
4455 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4456 if test "${cf_cv_posix_c_source+set}" = set; then
4457 echo $ECHO_N "(cached) $ECHO_C" >&6
4460 echo "${as_me:-configure}:4460: testing if the symbol is already defined go no further ..." 1>&5
4462 cat >"conftest.$ac_ext" <<_ACEOF
4463 #line 4463 "configure"
4464 #include "confdefs.h"
4465 #include <sys/types.h>
4470 #ifndef _POSIX_C_SOURCE
4477 rm -f "conftest.$ac_objext"
4478 if { (eval echo "$as_me:4478: \"$ac_compile\"") >&5
4479 (eval $ac_compile) 2>&5
4481 echo "$as_me:4481: \$? = $ac_status" >&5
4482 (exit "$ac_status"); } &&
4483 { ac_try='test -s "conftest.$ac_objext"'
4484 { (eval echo "$as_me:4484: \"$ac_try\"") >&5
4487 echo "$as_me:4487: \$? = $ac_status" >&5
4488 (exit "$ac_status"); }; }; then
4489 cf_cv_posix_c_source=no
4491 echo "$as_me: failed program was:" >&5
4492 cat "conftest.$ac_ext" >&5
4493 cf_want_posix_source=no
4494 case .$cf_POSIX_C_SOURCE in
4496 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4499 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4500 cf_want_posix_source=yes
4503 cf_want_posix_source=yes
4506 if test "$cf_want_posix_source" = yes ; then
4507 cat >"conftest.$ac_ext" <<_ACEOF
4508 #line 4508 "configure"
4509 #include "confdefs.h"
4510 #include <sys/types.h>
4515 #ifdef _POSIX_SOURCE
4522 rm -f "conftest.$ac_objext"
4523 if { (eval echo "$as_me:4523: \"$ac_compile\"") >&5
4524 (eval $ac_compile) 2>&5
4526 echo "$as_me:4526: \$? = $ac_status" >&5
4527 (exit "$ac_status"); } &&
4528 { ac_try='test -s "conftest.$ac_objext"'
4529 { (eval echo "$as_me:4529: \"$ac_try\"") >&5
4532 echo "$as_me:4532: \$? = $ac_status" >&5
4533 (exit "$ac_status"); }; }; then
4536 echo "$as_me: failed program was:" >&5
4537 cat "conftest.$ac_ext" >&5
4538 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4540 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4543 echo "${as_me:-configure}:4543: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4545 CFLAGS="$cf_trim_CFLAGS"
4546 CPPFLAGS="$cf_trim_CPPFLAGS"
4548 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4549 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4551 echo "${as_me:-configure}:4551: testing if the second compile does not leave our definition intact error ..." 1>&5
4553 cat >"conftest.$ac_ext" <<_ACEOF
4554 #line 4554 "configure"
4555 #include "confdefs.h"
4556 #include <sys/types.h>
4561 #ifndef _POSIX_C_SOURCE
4568 rm -f "conftest.$ac_objext"
4569 if { (eval echo "$as_me:4569: \"$ac_compile\"") >&5
4570 (eval $ac_compile) 2>&5
4572 echo "$as_me:4572: \$? = $ac_status" >&5
4573 (exit "$ac_status"); } &&
4574 { ac_try='test -s "conftest.$ac_objext"'
4575 { (eval echo "$as_me:4575: \"$ac_try\"") >&5
4578 echo "$as_me:4578: \$? = $ac_status" >&5
4579 (exit "$ac_status"); }; }; then
4582 echo "$as_me: failed program was:" >&5
4583 cat "conftest.$ac_ext" >&5
4584 cf_cv_posix_c_source=no
4586 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4587 CFLAGS="$cf_save_CFLAGS"
4588 CPPFLAGS="$cf_save_CPPFLAGS"
4591 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4594 echo "$as_me:4594: result: $cf_cv_posix_c_source" >&5
4595 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4597 if test "$cf_cv_posix_c_source" != no ; then
4598 CFLAGS="$cf_trim_CFLAGS"
4599 CPPFLAGS="$cf_trim_CPPFLAGS"
4604 cf_new_extra_cppflags=
4606 for cf_add_cflags in $cf_cv_posix_c_source
4608 case "$cf_fix_cppflags" in
4610 case "$cf_add_cflags" in
4611 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4612 case "$cf_add_cflags" in
4614 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4616 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4617 && test -z "${cf_tst_cflags}" \
4618 && cf_fix_cppflags=yes
4620 if test "$cf_fix_cppflags" = yes ; then
4622 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4623 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4626 elif test "${cf_tst_cflags}" = "\"'" ; then
4628 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4629 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4639 case "$cf_add_cflags" in
4641 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4643 CPPFLAGS=`echo "$CPPFLAGS" | \
4644 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4645 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4650 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4651 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4658 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4659 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4666 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4667 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4669 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4671 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4672 && test -z "${cf_tst_cflags}" \
4673 && cf_fix_cppflags=no
4678 if test -n "$cf_new_cflags" ; then
4680 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4681 CFLAGS="${CFLAGS}$cf_new_cflags"
4685 if test -n "$cf_new_cppflags" ; then
4687 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4688 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4692 if test -n "$cf_new_extra_cppflags" ; then
4694 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4695 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4701 fi # cf_cv_posix_visible
4705 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4708 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
4709 cf_xopen_source="-D_BSD_SOURCE"
4713 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
4716 cf_xopen_source="-D_OSF_SOURCE"
4719 cf_xopen_source="-D_QNX_SOURCE"
4722 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
4725 cf_xopen_source="-D__EXTENSIONS__"
4726 cf_cv_xopen_source=broken
4728 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
4734 echo "$as_me:4734: checking if we should define _XOPEN_SOURCE" >&5
4735 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4736 if test "${cf_cv_xopen_source+set}" = set; then
4737 echo $ECHO_N "(cached) $ECHO_C" >&6
4740 cat >"conftest.$ac_ext" <<_ACEOF
4741 #line 4741 "configure"
4742 #include "confdefs.h"
4746 #include <sys/types.h>
4752 #ifndef _XOPEN_SOURCE
4759 rm -f "conftest.$ac_objext"
4760 if { (eval echo "$as_me:4760: \"$ac_compile\"") >&5
4761 (eval $ac_compile) 2>&5
4763 echo "$as_me:4763: \$? = $ac_status" >&5
4764 (exit "$ac_status"); } &&
4765 { ac_try='test -s "conftest.$ac_objext"'
4766 { (eval echo "$as_me:4766: \"$ac_try\"") >&5
4769 echo "$as_me:4769: \$? = $ac_status" >&5
4770 (exit "$ac_status"); }; }; then
4771 cf_cv_xopen_source=no
4773 echo "$as_me: failed program was:" >&5
4774 cat "conftest.$ac_ext" >&5
4777 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4778 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4780 cat >"conftest.$ac_ext" <<_ACEOF
4781 #line 4781 "configure"
4782 #include "confdefs.h"
4786 #include <sys/types.h>
4792 #ifdef _XOPEN_SOURCE
4799 rm -f "conftest.$ac_objext"
4800 if { (eval echo "$as_me:4800: \"$ac_compile\"") >&5
4801 (eval $ac_compile) 2>&5
4803 echo "$as_me:4803: \$? = $ac_status" >&5
4804 (exit "$ac_status"); } &&
4805 { ac_try='test -s "conftest.$ac_objext"'
4806 { (eval echo "$as_me:4806: \"$ac_try\"") >&5
4809 echo "$as_me:4809: \$? = $ac_status" >&5
4810 (exit "$ac_status"); }; }; then
4811 cf_cv_xopen_source=no
4813 echo "$as_me: failed program was:" >&5
4814 cat "conftest.$ac_ext" >&5
4815 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4817 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4821 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4824 echo "$as_me:4824: result: $cf_cv_xopen_source" >&5
4825 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4827 if test "$cf_cv_xopen_source" != no ; then
4829 CFLAGS=`echo "$CFLAGS" | \
4830 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4831 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4833 CPPFLAGS=`echo "$CPPFLAGS" | \
4834 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4835 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4837 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4842 cf_new_extra_cppflags=
4844 for cf_add_cflags in $cf_temp_xopen_source
4846 case "$cf_fix_cppflags" in
4848 case "$cf_add_cflags" in
4849 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4850 case "$cf_add_cflags" in
4852 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4854 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4855 && test -z "${cf_tst_cflags}" \
4856 && cf_fix_cppflags=yes
4858 if test "$cf_fix_cppflags" = yes ; then
4860 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4861 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4864 elif test "${cf_tst_cflags}" = "\"'" ; then
4866 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4867 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4877 case "$cf_add_cflags" in
4879 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4881 CPPFLAGS=`echo "$CPPFLAGS" | \
4882 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4883 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4888 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4889 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4896 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4897 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4904 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4905 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4907 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4909 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4910 && test -z "${cf_tst_cflags}" \
4911 && cf_fix_cppflags=no
4916 if test -n "$cf_new_cflags" ; then
4918 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4919 CFLAGS="${CFLAGS}$cf_new_cflags"
4923 if test -n "$cf_new_cppflags" ; then
4925 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4926 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4930 if test -n "$cf_new_extra_cppflags" ; then
4932 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4933 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4939 if test "$cf_cv_posix_visible" = no; then
4941 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4943 cf_save_CFLAGS="$CFLAGS"
4944 cf_save_CPPFLAGS="$CPPFLAGS"
4946 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4947 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4948 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4950 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4951 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4952 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4954 echo "$as_me:4954: checking if we should define _POSIX_C_SOURCE" >&5
4955 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4956 if test "${cf_cv_posix_c_source+set}" = set; then
4957 echo $ECHO_N "(cached) $ECHO_C" >&6
4960 echo "${as_me:-configure}:4960: testing if the symbol is already defined go no further ..." 1>&5
4962 cat >"conftest.$ac_ext" <<_ACEOF
4963 #line 4963 "configure"
4964 #include "confdefs.h"
4965 #include <sys/types.h>
4970 #ifndef _POSIX_C_SOURCE
4977 rm -f "conftest.$ac_objext"
4978 if { (eval echo "$as_me:4978: \"$ac_compile\"") >&5
4979 (eval $ac_compile) 2>&5
4981 echo "$as_me:4981: \$? = $ac_status" >&5
4982 (exit "$ac_status"); } &&
4983 { ac_try='test -s "conftest.$ac_objext"'
4984 { (eval echo "$as_me:4984: \"$ac_try\"") >&5
4987 echo "$as_me:4987: \$? = $ac_status" >&5
4988 (exit "$ac_status"); }; }; then
4989 cf_cv_posix_c_source=no
4991 echo "$as_me: failed program was:" >&5
4992 cat "conftest.$ac_ext" >&5
4993 cf_want_posix_source=no
4994 case .$cf_POSIX_C_SOURCE in
4996 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4999 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
5000 cf_want_posix_source=yes
5003 cf_want_posix_source=yes
5006 if test "$cf_want_posix_source" = yes ; then
5007 cat >"conftest.$ac_ext" <<_ACEOF
5008 #line 5008 "configure"
5009 #include "confdefs.h"
5010 #include <sys/types.h>
5015 #ifdef _POSIX_SOURCE
5022 rm -f "conftest.$ac_objext"
5023 if { (eval echo "$as_me:5023: \"$ac_compile\"") >&5
5024 (eval $ac_compile) 2>&5
5026 echo "$as_me:5026: \$? = $ac_status" >&5
5027 (exit "$ac_status"); } &&
5028 { ac_try='test -s "conftest.$ac_objext"'
5029 { (eval echo "$as_me:5029: \"$ac_try\"") >&5
5032 echo "$as_me:5032: \$? = $ac_status" >&5
5033 (exit "$ac_status"); }; }; then
5036 echo "$as_me: failed program was:" >&5
5037 cat "conftest.$ac_ext" >&5
5038 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
5040 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5043 echo "${as_me:-configure}:5043: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
5045 CFLAGS="$cf_trim_CFLAGS"
5046 CPPFLAGS="$cf_trim_CPPFLAGS"
5048 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5049 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
5051 echo "${as_me:-configure}:5051: testing if the second compile does not leave our definition intact error ..." 1>&5
5053 cat >"conftest.$ac_ext" <<_ACEOF
5054 #line 5054 "configure"
5055 #include "confdefs.h"
5056 #include <sys/types.h>
5061 #ifndef _POSIX_C_SOURCE
5068 rm -f "conftest.$ac_objext"
5069 if { (eval echo "$as_me:5069: \"$ac_compile\"") >&5
5070 (eval $ac_compile) 2>&5
5072 echo "$as_me:5072: \$? = $ac_status" >&5
5073 (exit "$ac_status"); } &&
5074 { ac_try='test -s "conftest.$ac_objext"'
5075 { (eval echo "$as_me:5075: \"$ac_try\"") >&5
5078 echo "$as_me:5078: \$? = $ac_status" >&5
5079 (exit "$ac_status"); }; }; then
5082 echo "$as_me: failed program was:" >&5
5083 cat "conftest.$ac_ext" >&5
5084 cf_cv_posix_c_source=no
5086 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5087 CFLAGS="$cf_save_CFLAGS"
5088 CPPFLAGS="$cf_save_CPPFLAGS"
5091 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5094 echo "$as_me:5094: result: $cf_cv_posix_c_source" >&5
5095 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
5097 if test "$cf_cv_posix_c_source" != no ; then
5098 CFLAGS="$cf_trim_CFLAGS"
5099 CPPFLAGS="$cf_trim_CPPFLAGS"
5104 cf_new_extra_cppflags=
5106 for cf_add_cflags in $cf_cv_posix_c_source
5108 case "$cf_fix_cppflags" in
5110 case "$cf_add_cflags" in
5111 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5112 case "$cf_add_cflags" in
5114 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5116 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5117 && test -z "${cf_tst_cflags}" \
5118 && cf_fix_cppflags=yes
5120 if test "$cf_fix_cppflags" = yes ; then
5122 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5123 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5126 elif test "${cf_tst_cflags}" = "\"'" ; then
5128 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5129 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5139 case "$cf_add_cflags" in
5141 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5143 CPPFLAGS=`echo "$CPPFLAGS" | \
5144 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5145 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5150 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5151 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5158 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5159 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5166 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5167 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5169 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5171 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5172 && test -z "${cf_tst_cflags}" \
5173 && cf_fix_cppflags=no
5178 if test -n "$cf_new_cflags" ; then
5180 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5181 CFLAGS="${CFLAGS}$cf_new_cflags"
5185 if test -n "$cf_new_cppflags" ; then
5187 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5188 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5192 if test -n "$cf_new_extra_cppflags" ; then
5194 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5195 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5201 fi # cf_cv_posix_visible
5206 if test -n "$cf_xopen_source" ; then
5211 cf_new_extra_cppflags=
5213 for cf_add_cflags in $cf_xopen_source
5215 case "$cf_fix_cppflags" in
5217 case "$cf_add_cflags" in
5218 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5219 case "$cf_add_cflags" in
5221 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5223 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5224 && test -z "${cf_tst_cflags}" \
5225 && cf_fix_cppflags=yes
5227 if test "$cf_fix_cppflags" = yes ; then
5229 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5230 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5233 elif test "${cf_tst_cflags}" = "\"'" ; then
5235 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5236 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5246 case "$cf_add_cflags" in
5248 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5250 CPPFLAGS=`echo "$CPPFLAGS" | \
5251 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5252 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5257 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5258 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5265 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5266 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5273 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5274 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5276 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5278 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5279 && test -z "${cf_tst_cflags}" \
5280 && cf_fix_cppflags=no
5285 if test -n "$cf_new_cflags" ; then
5286 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
5288 echo "${as_me:-configure}:5288: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
5290 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5291 CFLAGS="${CFLAGS}$cf_new_cflags"
5295 if test -n "$cf_new_cppflags" ; then
5296 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
5298 echo "${as_me:-configure}:5298: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
5300 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5301 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5305 if test -n "$cf_new_extra_cppflags" ; then
5306 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
5308 echo "${as_me:-configure}:5308: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
5310 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5311 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5317 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
5318 echo "$as_me:5318: checking if _XOPEN_SOURCE really is set" >&5
5319 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
5320 cat >"conftest.$ac_ext" <<_ACEOF
5321 #line 5321 "configure"
5322 #include "confdefs.h"
5328 #ifndef _XOPEN_SOURCE
5335 rm -f "conftest.$ac_objext"
5336 if { (eval echo "$as_me:5336: \"$ac_compile\"") >&5
5337 (eval $ac_compile) 2>&5
5339 echo "$as_me:5339: \$? = $ac_status" >&5
5340 (exit "$ac_status"); } &&
5341 { ac_try='test -s "conftest.$ac_objext"'
5342 { (eval echo "$as_me:5342: \"$ac_try\"") >&5
5345 echo "$as_me:5345: \$? = $ac_status" >&5
5346 (exit "$ac_status"); }; }; then
5347 cf_XOPEN_SOURCE_set=yes
5349 echo "$as_me: failed program was:" >&5
5350 cat "conftest.$ac_ext" >&5
5351 cf_XOPEN_SOURCE_set=no
5353 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5354 echo "$as_me:5354: result: $cf_XOPEN_SOURCE_set" >&5
5355 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
5356 if test "$cf_XOPEN_SOURCE_set" = yes
5358 cat >"conftest.$ac_ext" <<_ACEOF
5359 #line 5359 "configure"
5360 #include "confdefs.h"
5366 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
5373 rm -f "conftest.$ac_objext"
5374 if { (eval echo "$as_me:5374: \"$ac_compile\"") >&5
5375 (eval $ac_compile) 2>&5
5377 echo "$as_me:5377: \$? = $ac_status" >&5
5378 (exit "$ac_status"); } &&
5379 { ac_try='test -s "conftest.$ac_objext"'
5380 { (eval echo "$as_me:5380: \"$ac_try\"") >&5
5383 echo "$as_me:5383: \$? = $ac_status" >&5
5384 (exit "$ac_status"); }; }; then
5385 cf_XOPEN_SOURCE_set_ok=yes
5387 echo "$as_me: failed program was:" >&5
5388 cat "conftest.$ac_ext" >&5
5389 cf_XOPEN_SOURCE_set_ok=no
5391 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5392 if test "$cf_XOPEN_SOURCE_set_ok" = no
5394 { echo "$as_me:5394: WARNING: _XOPEN_SOURCE is lower than requested" >&5
5395 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
5399 echo "$as_me:5399: checking if we should define _XOPEN_SOURCE" >&5
5400 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
5401 if test "${cf_cv_xopen_source+set}" = set; then
5402 echo $ECHO_N "(cached) $ECHO_C" >&6
5405 cat >"conftest.$ac_ext" <<_ACEOF
5406 #line 5406 "configure"
5407 #include "confdefs.h"
5411 #include <sys/types.h>
5417 #ifndef _XOPEN_SOURCE
5424 rm -f "conftest.$ac_objext"
5425 if { (eval echo "$as_me:5425: \"$ac_compile\"") >&5
5426 (eval $ac_compile) 2>&5
5428 echo "$as_me:5428: \$? = $ac_status" >&5
5429 (exit "$ac_status"); } &&
5430 { ac_try='test -s "conftest.$ac_objext"'
5431 { (eval echo "$as_me:5431: \"$ac_try\"") >&5
5434 echo "$as_me:5434: \$? = $ac_status" >&5
5435 (exit "$ac_status"); }; }; then
5436 cf_cv_xopen_source=no
5438 echo "$as_me: failed program was:" >&5
5439 cat "conftest.$ac_ext" >&5
5442 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5443 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
5445 cat >"conftest.$ac_ext" <<_ACEOF
5446 #line 5446 "configure"
5447 #include "confdefs.h"
5451 #include <sys/types.h>
5457 #ifdef _XOPEN_SOURCE
5464 rm -f "conftest.$ac_objext"
5465 if { (eval echo "$as_me:5465: \"$ac_compile\"") >&5
5466 (eval $ac_compile) 2>&5
5468 echo "$as_me:5468: \$? = $ac_status" >&5
5469 (exit "$ac_status"); } &&
5470 { ac_try='test -s "conftest.$ac_objext"'
5471 { (eval echo "$as_me:5471: \"$ac_try\"") >&5
5474 echo "$as_me:5474: \$? = $ac_status" >&5
5475 (exit "$ac_status"); }; }; then
5476 cf_cv_xopen_source=no
5478 echo "$as_me: failed program was:" >&5
5479 cat "conftest.$ac_ext" >&5
5480 cf_cv_xopen_source=$cf_XOPEN_SOURCE
5482 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5486 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5489 echo "$as_me:5489: result: $cf_cv_xopen_source" >&5
5490 echo "${ECHO_T}$cf_cv_xopen_source" >&6
5492 if test "$cf_cv_xopen_source" != no ; then
5494 CFLAGS=`echo "$CFLAGS" | \
5495 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5496 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5498 CPPFLAGS=`echo "$CPPFLAGS" | \
5499 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5500 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5502 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
5507 cf_new_extra_cppflags=
5509 for cf_add_cflags in $cf_temp_xopen_source
5511 case "$cf_fix_cppflags" in
5513 case "$cf_add_cflags" in
5514 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5515 case "$cf_add_cflags" in
5517 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5519 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5520 && test -z "${cf_tst_cflags}" \
5521 && cf_fix_cppflags=yes
5523 if test "$cf_fix_cppflags" = yes ; then
5525 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5526 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5529 elif test "${cf_tst_cflags}" = "\"'" ; then
5531 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5532 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5542 case "$cf_add_cflags" in
5544 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5546 CPPFLAGS=`echo "$CPPFLAGS" | \
5547 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5548 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5553 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5554 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5561 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5562 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5569 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5570 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5572 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5574 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5575 && test -z "${cf_tst_cflags}" \
5576 && cf_fix_cppflags=no
5581 if test -n "$cf_new_cflags" ; then
5583 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5584 CFLAGS="${CFLAGS}$cf_new_cflags"
5588 if test -n "$cf_new_cppflags" ; then
5590 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5591 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5595 if test -n "$cf_new_extra_cppflags" ; then
5597 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5598 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5606 fi # cf_cv_posix_visible
5608 echo "$as_me:5608: checking for signal global datatype" >&5
5609 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
5610 if test "${cf_cv_sig_atomic_t+set}" = set; then
5611 echo $ECHO_N "(cached) $ECHO_C" >&6
5615 "volatile sig_atomic_t" \
5619 cat >"conftest.$ac_ext" <<_ACEOF
5620 #line 5620 "configure"
5621 #include "confdefs.h"
5623 #include <sys/types.h>
5629 static void handler(int sig)
5637 signal(SIGINT, handler);
5643 rm -f "conftest.$ac_objext"
5644 if { (eval echo "$as_me:5644: \"$ac_compile\"") >&5
5645 (eval $ac_compile) 2>&5
5647 echo "$as_me:5647: \$? = $ac_status" >&5
5648 (exit "$ac_status"); } &&
5649 { ac_try='test -s "conftest.$ac_objext"'
5650 { (eval echo "$as_me:5650: \"$ac_try\"") >&5
5653 echo "$as_me:5653: \$? = $ac_status" >&5
5654 (exit "$ac_status"); }; }; then
5655 cf_cv_sig_atomic_t=$cf_type
5657 echo "$as_me: failed program was:" >&5
5658 cat "conftest.$ac_ext" >&5
5659 cf_cv_sig_atomic_t=no
5661 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5662 test "$cf_cv_sig_atomic_t" != no && break
5667 echo "$as_me:5667: result: $cf_cv_sig_atomic_t" >&5
5668 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
5669 test "$cf_cv_sig_atomic_t" != no &&
5670 cat >>confdefs.h <<EOF
5671 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
5674 # Work around breakage on OS X
5676 echo "$as_me:5676: checking if SIGWINCH is defined" >&5
5677 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
5678 if test "${cf_cv_define_sigwinch+set}" = set; then
5679 echo $ECHO_N "(cached) $ECHO_C" >&6
5682 cat >"conftest.$ac_ext" <<_ACEOF
5683 #line 5683 "configure"
5684 #include "confdefs.h"
5686 #include <sys/types.h>
5687 #include <sys/signal.h>
5692 int x = SIGWINCH; (void)x
5697 rm -f "conftest.$ac_objext"
5698 if { (eval echo "$as_me:5698: \"$ac_compile\"") >&5
5699 (eval $ac_compile) 2>&5
5701 echo "$as_me:5701: \$? = $ac_status" >&5
5702 (exit "$ac_status"); } &&
5703 { ac_try='test -s "conftest.$ac_objext"'
5704 { (eval echo "$as_me:5704: \"$ac_try\"") >&5
5707 echo "$as_me:5707: \$? = $ac_status" >&5
5708 (exit "$ac_status"); }; }; then
5709 cf_cv_define_sigwinch=yes
5711 echo "$as_me: failed program was:" >&5
5712 cat "conftest.$ac_ext" >&5
5713 cat >"conftest.$ac_ext" <<_ACEOF
5714 #line 5714 "configure"
5715 #include "confdefs.h"
5717 #undef _XOPEN_SOURCE
5718 #undef _POSIX_SOURCE
5719 #undef _POSIX_C_SOURCE
5720 #include <sys/types.h>
5721 #include <sys/signal.h>
5726 int x = SIGWINCH; (void)x
5731 rm -f "conftest.$ac_objext"
5732 if { (eval echo "$as_me:5732: \"$ac_compile\"") >&5
5733 (eval $ac_compile) 2>&5
5735 echo "$as_me:5735: \$? = $ac_status" >&5
5736 (exit "$ac_status"); } &&
5737 { ac_try='test -s "conftest.$ac_objext"'
5738 { (eval echo "$as_me:5738: \"$ac_try\"") >&5
5741 echo "$as_me:5741: \$? = $ac_status" >&5
5742 (exit "$ac_status"); }; }; then
5743 cf_cv_define_sigwinch=maybe
5745 echo "$as_me: failed program was:" >&5
5746 cat "conftest.$ac_ext" >&5
5747 cf_cv_define_sigwinch=no
5749 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5752 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5755 echo "$as_me:5755: result: $cf_cv_define_sigwinch" >&5
5756 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
5758 if test "$cf_cv_define_sigwinch" = maybe ; then
5759 echo "$as_me:5759: checking for actual SIGWINCH definition" >&5
5760 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
5761 if test "${cf_cv_fixup_sigwinch+set}" = set; then
5762 echo $ECHO_N "(cached) $ECHO_C" >&6
5765 cf_cv_fixup_sigwinch=unknown
5767 while test "$cf_sigwinch" != 1
5769 cat >"conftest.$ac_ext" <<_ACEOF
5770 #line 5770 "configure"
5771 #include "confdefs.h"
5773 #undef _XOPEN_SOURCE
5774 #undef _POSIX_SOURCE
5775 #undef _POSIX_C_SOURCE
5776 #include <sys/types.h>
5777 #include <sys/signal.h>
5783 #if SIGWINCH != $cf_sigwinch
5786 int x = SIGWINCH; (void)x
5791 rm -f "conftest.$ac_objext"
5792 if { (eval echo "$as_me:5792: \"$ac_compile\"") >&5
5793 (eval $ac_compile) 2>&5
5795 echo "$as_me:5795: \$? = $ac_status" >&5
5796 (exit "$ac_status"); } &&
5797 { ac_try='test -s "conftest.$ac_objext"'
5798 { (eval echo "$as_me:5798: \"$ac_try\"") >&5
5801 echo "$as_me:5801: \$? = $ac_status" >&5
5802 (exit "$ac_status"); }; }; then
5803 cf_cv_fixup_sigwinch=$cf_sigwinch
5806 echo "$as_me: failed program was:" >&5
5807 cat "conftest.$ac_ext" >&5
5809 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5811 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
5815 echo "$as_me:5815: result: $cf_cv_fixup_sigwinch" >&5
5816 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
5818 if test "$cf_cv_fixup_sigwinch" != unknown ; then
5819 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
5823 # Checks for CODESET support.
5825 echo "$as_me:5825: checking for nl_langinfo and CODESET" >&5
5826 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
5827 if test "${am_cv_langinfo_codeset+set}" = set; then
5828 echo $ECHO_N "(cached) $ECHO_C" >&6
5830 cat >"conftest.$ac_ext" <<_ACEOF
5831 #line 5831 "configure"
5832 #include "confdefs.h"
5833 #include <langinfo.h>
5837 char* cs = nl_langinfo(CODESET); (void)cs
5842 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5843 if { (eval echo "$as_me:5843: \"$ac_link\"") >&5
5844 (eval $ac_link) 2>&5
5846 echo "$as_me:5846: \$? = $ac_status" >&5
5847 (exit "$ac_status"); } &&
5848 { ac_try='test -s "conftest$ac_exeext"'
5849 { (eval echo "$as_me:5849: \"$ac_try\"") >&5
5852 echo "$as_me:5852: \$? = $ac_status" >&5
5853 (exit "$ac_status"); }; }; then
5854 am_cv_langinfo_codeset=yes
5856 echo "$as_me: failed program was:" >&5
5857 cat "conftest.$ac_ext" >&5
5858 am_cv_langinfo_codeset=no
5860 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5863 echo "$as_me:5863: result: $am_cv_langinfo_codeset" >&5
5864 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
5865 if test "$am_cv_langinfo_codeset" = yes; then
5867 cat >>confdefs.h <<\EOF
5868 #define HAVE_LANGINFO_CODESET 1
5873 echo "$as_me:5873: checking if you want to use pkg-config" >&5
5874 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
5876 # Check whether --with-pkg-config or --without-pkg-config was given.
5877 if test "${with_pkg_config+set}" = set; then
5878 withval="$with_pkg_config"
5879 cf_pkg_config=$withval
5883 echo "$as_me:5883: result: $cf_pkg_config" >&5
5884 echo "${ECHO_T}$cf_pkg_config" >&6
5886 case "$cf_pkg_config" in
5892 if test -n "$ac_tool_prefix"; then
5893 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5894 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5895 echo "$as_me:5895: checking for $ac_word" >&5
5896 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5897 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
5898 echo $ECHO_N "(cached) $ECHO_C" >&6
5902 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5905 ac_save_IFS=$IFS; IFS=$ac_path_separator
5907 for ac_dir in $ac_dummy; do
5909 test -z "$ac_dir" && ac_dir=.
5910 if $as_executable_p "$ac_dir/$ac_word"; then
5911 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
5912 echo "$as_me:5912: found $ac_dir/$ac_word" >&5
5920 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5922 if test -n "$PKG_CONFIG"; then
5923 echo "$as_me:5923: result: $PKG_CONFIG" >&5
5924 echo "${ECHO_T}$PKG_CONFIG" >&6
5926 echo "$as_me:5926: result: no" >&5
5927 echo "${ECHO_T}no" >&6
5931 if test -z "$ac_cv_path_PKG_CONFIG"; then
5932 ac_pt_PKG_CONFIG=$PKG_CONFIG
5933 # Extract the first word of "pkg-config", so it can be a program name with args.
5934 set dummy pkg-config; ac_word=$2
5935 echo "$as_me:5935: checking for $ac_word" >&5
5936 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5937 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
5938 echo $ECHO_N "(cached) $ECHO_C" >&6
5940 case $ac_pt_PKG_CONFIG in
5942 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5945 ac_save_IFS=$IFS; IFS=$ac_path_separator
5947 for ac_dir in $ac_dummy; do
5949 test -z "$ac_dir" && ac_dir=.
5950 if $as_executable_p "$ac_dir/$ac_word"; then
5951 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
5952 echo "$as_me:5952: found $ac_dir/$ac_word" >&5
5957 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
5961 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5963 if test -n "$ac_pt_PKG_CONFIG"; then
5964 echo "$as_me:5964: result: $ac_pt_PKG_CONFIG" >&5
5965 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
5967 echo "$as_me:5967: result: no" >&5
5968 echo "${ECHO_T}no" >&6
5971 PKG_CONFIG=$ac_pt_PKG_CONFIG
5973 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5982 test -z "$PKG_CONFIG" && PKG_CONFIG=none
5983 if test "$PKG_CONFIG" != none ; then
5985 if test "x$prefix" != xNONE; then
5986 cf_path_syntax="$prefix"
5988 cf_path_syntax="$ac_default_prefix"
5991 case ".$PKG_CONFIG" in
5996 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5998 (.\$\{*prefix\}*|.\$\{*dir\}*)
5999 eval PKG_CONFIG="$PKG_CONFIG"
6000 case ".$PKG_CONFIG" in
6002 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
6007 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
6010 { { echo "$as_me:6010: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
6011 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
6012 { (exit 1); exit 1; }; }
6016 elif test "x$cf_pkg_config" != xno ; then
6017 { echo "$as_me:6017: WARNING: pkg-config is not installed" >&5
6018 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
6021 echo "$as_me:6021: checking if you want to see long compiling messages" >&5
6022 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
6024 # Check whether --enable-echo or --disable-echo was given.
6025 if test "${enable_echo+set}" = set; then
6026 enableval="$enable_echo"
6027 test "$enableval" != no && enableval=yes
6028 if test "$enableval" != "yes" ; then
6031 ECHO_LD='@echo linking $@;'
6032 RULE_CC='@echo compiling $<'
6033 SHOW_CC='@echo compiling $@'
6055 echo "$as_me:6055: result: $enableval" >&5
6056 echo "${ECHO_T}$enableval" >&6
6058 echo "$as_me:6058: checking for ncurses wrap-prefix" >&5
6059 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
6061 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
6062 if test "${with_ncurses_wrap_prefix+set}" = set; then
6063 withval="$with_ncurses_wrap_prefix"
6064 NCURSES_WRAP_PREFIX=$withval
6066 NCURSES_WRAP_PREFIX=_nc_
6068 echo "$as_me:6068: result: $NCURSES_WRAP_PREFIX" >&5
6069 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
6071 echo "$as_me:6071: checking if you want to check for wide-character functions" >&5
6072 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
6074 # Check whether --enable-widec or --disable-widec was given.
6075 if test "${enable_widec+set}" = set; then
6076 enableval="$enable_widec"
6077 test "$enableval" != no && enableval=yes
6078 if test "$enableval" != "yes" ; then
6088 echo "$as_me:6088: result: $cf_enable_widec" >&5
6089 echo "${ECHO_T}$cf_enable_widec" >&6
6091 echo "$as_me:6091: checking for specific curses-directory" >&5
6092 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
6094 # Check whether --with-curses-dir or --without-curses-dir was given.
6095 if test "${with_curses_dir+set}" = set; then
6096 withval="$with_curses_dir"
6097 cf_cv_curses_dir=$withval
6101 echo "$as_me:6101: result: $cf_cv_curses_dir" >&5
6102 echo "${ECHO_T}$cf_cv_curses_dir" >&6
6104 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6107 if test "x$prefix" != xNONE; then
6108 cf_path_syntax="$prefix"
6110 cf_path_syntax="$ac_default_prefix"
6118 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
6120 (.\$\{*prefix\}*|.\$\{*dir\}*)
6121 eval withval="$withval"
6124 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
6129 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
6132 { { echo "$as_me:6132: error: expected a pathname, not \"$withval\"" >&5
6133 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6134 { (exit 1); exit 1; }; }
6138 if test -d "$cf_cv_curses_dir"
6141 if test -n "$cf_cv_curses_dir/include" ; then
6142 for cf_add_incdir in $cf_cv_curses_dir/include
6144 while test "$cf_add_incdir" != /usr/include
6146 if test -d "$cf_add_incdir"
6149 if test -n "$CFLAGS$CPPFLAGS" ; then
6150 # a loop is needed to ensure we can add subdirs of existing dirs
6151 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6152 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6153 cf_have_incdir=yes; break
6158 if test "$cf_have_incdir" = no ; then
6159 if test "$cf_add_incdir" = /usr/local/include ; then
6160 if test "$GCC" = yes
6162 cf_save_CPPFLAGS=$CPPFLAGS
6164 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6165 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6167 cat >"conftest.$ac_ext" <<_ACEOF
6168 #line 6168 "configure"
6169 #include "confdefs.h"
6179 rm -f "conftest.$ac_objext"
6180 if { (eval echo "$as_me:6180: \"$ac_compile\"") >&5
6181 (eval $ac_compile) 2>&5
6183 echo "$as_me:6183: \$? = $ac_status" >&5
6184 (exit "$ac_status"); } &&
6185 { ac_try='test -s "conftest.$ac_objext"'
6186 { (eval echo "$as_me:6186: \"$ac_try\"") >&5
6189 echo "$as_me:6189: \$? = $ac_status" >&5
6190 (exit "$ac_status"); }; }; then
6193 echo "$as_me: failed program was:" >&5
6194 cat "conftest.$ac_ext" >&5
6197 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6198 CPPFLAGS=$cf_save_CPPFLAGS
6203 if test "$cf_have_incdir" = no ; then
6204 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6206 echo "${as_me:-configure}:6206: testing adding $cf_add_incdir to include-path ..." 1>&5
6208 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6210 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
6211 test "$cf_top_incdir" = "$cf_add_incdir" && break
6212 cf_add_incdir="$cf_top_incdir"
6223 if test -n "$cf_cv_curses_dir/lib" ; then
6224 for cf_add_libdir in $cf_cv_curses_dir/lib
6226 if test "$cf_add_libdir" = /usr/lib ; then
6228 elif test -d "$cf_add_libdir"
6231 if test -n "$LDFLAGS$LIBS" ; then
6232 # a loop is needed to ensure we can add subdirs of existing dirs
6233 for cf_test_libdir in $LDFLAGS $LIBS ; do
6234 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6235 cf_have_libdir=yes; break
6239 if test "$cf_have_libdir" = no ; then
6240 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6242 echo "${as_me:-configure}:6242: testing adding $cf_add_libdir to library-path ..." 1>&5
6244 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6255 echo "$as_me:6255: checking for specified curses library type" >&5
6256 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
6258 # Check whether --with-screen or --without-screen was given.
6259 if test "${with_screen+set}" = set; then
6260 withval="$with_screen"
6261 cf_cv_screen=$withval
6264 # Check whether --with-ncursesw or --without-ncursesw was given.
6265 if test "${with_ncursesw+set}" = set; then
6266 withval="$with_ncursesw"
6267 cf_cv_screen=ncursesw
6270 # Check whether --with-ncurses or --without-ncurses was given.
6271 if test "${with_ncurses+set}" = set; then
6272 withval="$with_ncurses"
6273 cf_cv_screen=ncurses
6276 # Check whether --with-pdcurses or --without-pdcurses was given.
6277 if test "${with_pdcurses+set}" = set; then
6278 withval="$with_pdcurses"
6279 cf_cv_screen=pdcurses
6282 # Check whether --with-curses-colr or --without-curses-colr was given.
6283 if test "${with_curses_colr+set}" = set; then
6284 withval="$with_curses_colr"
6285 cf_cv_screen=curses_colr
6288 # Check whether --with-curses-5lib or --without-curses-5lib was given.
6289 if test "${with_curses_5lib+set}" = set; then
6290 withval="$with_curses_5lib"
6291 cf_cv_screen=curses_5lib
6299 echo "$as_me:6299: result: $cf_cv_screen" >&5
6300 echo "${ECHO_T}$cf_cv_screen" >&6
6302 case $cf_cv_screen in
6305 echo "$as_me:6305: checking for extra include directories" >&5
6306 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
6307 if test "${cf_cv_curses_incdir+set}" = set; then
6308 echo $ECHO_N "(cached) $ECHO_C" >&6
6311 cf_cv_curses_incdir=no
6314 if test "x$cf_cv_screen" = "xcurses_colr"
6316 test -d /usr/include/curses_colr && \
6317 cf_cv_curses_incdir="-I/usr/include/curses_colr"
6321 if test "x$cf_cv_screen" = "xcurses_5lib"
6323 test -d /usr/5lib && \
6324 test -d /usr/5include && \
6325 cf_cv_curses_incdir="-I/usr/5include"
6331 echo "$as_me:6331: result: $cf_cv_curses_incdir" >&5
6332 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
6333 if test "$cf_cv_curses_incdir" != no
6336 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6337 CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
6341 echo "$as_me:6341: checking if we have identified curses headers" >&5
6342 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6343 if test "${cf_cv_ncurses_header+set}" = set; then
6344 echo $ECHO_N "(cached) $ECHO_C" >&6
6347 cf_cv_ncurses_header=none
6350 curses.h ncurses/ncurses.h ncurses/curses.h
6352 cat >"conftest.$ac_ext" <<_ACEOF
6353 #line 6353 "configure"
6354 #include "confdefs.h"
6355 #include <${cf_header}>
6359 initscr(); tgoto("?", 0,0)
6364 rm -f "conftest.$ac_objext"
6365 if { (eval echo "$as_me:6365: \"$ac_compile\"") >&5
6366 (eval $ac_compile) 2>&5
6368 echo "$as_me:6368: \$? = $ac_status" >&5
6369 (exit "$ac_status"); } &&
6370 { ac_try='test -s "conftest.$ac_objext"'
6371 { (eval echo "$as_me:6371: \"$ac_try\"") >&5
6374 echo "$as_me:6374: \$? = $ac_status" >&5
6375 (exit "$ac_status"); }; }; then
6376 cf_cv_ncurses_header=$cf_header; break
6378 echo "$as_me: failed program was:" >&5
6379 cat "conftest.$ac_ext" >&5
6381 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6385 echo "$as_me:6385: result: $cf_cv_ncurses_header" >&5
6386 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6388 if test "$cf_cv_ncurses_header" = none ; then
6389 { { echo "$as_me:6389: error: No curses header-files found" >&5
6390 echo "$as_me: error: No curses header-files found" >&2;}
6391 { (exit 1); exit 1; }; }
6394 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6396 for ac_header in $cf_cv_ncurses_header
6398 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6399 echo "$as_me:6399: checking for $ac_header" >&5
6400 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6401 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6402 echo $ECHO_N "(cached) $ECHO_C" >&6
6404 cat >"conftest.$ac_ext" <<_ACEOF
6405 #line 6405 "configure"
6406 #include "confdefs.h"
6407 #include <$ac_header>
6409 if { (eval echo "$as_me:6409: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6410 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6412 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6414 cat conftest.err >&5
6415 echo "$as_me:6415: \$? = $ac_status" >&5
6416 (exit "$ac_status"); } >/dev/null; then
6417 if test -s conftest.err; then
6418 ac_cpp_err=$ac_c_preproc_warn_flag
6425 if test -z "$ac_cpp_err"; then
6426 eval "$as_ac_Header=yes"
6428 echo "$as_me: failed program was:" >&5
6429 cat "conftest.$ac_ext" >&5
6430 eval "$as_ac_Header=no"
6432 rm -f conftest.err "conftest.$ac_ext"
6434 echo "$as_me:6434: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6435 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6436 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6437 cat >>confdefs.h <<EOF
6438 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6444 echo "$as_me:6444: checking for terminfo header" >&5
6445 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6446 if test "${cf_cv_term_header+set}" = set; then
6447 echo $ECHO_N "(cached) $ECHO_C" >&6
6450 case "${cf_cv_ncurses_header}" in
6451 (*/ncurses.h|*/ncursesw.h)
6452 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6455 cf_term_header=term.h
6459 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6461 cat >"conftest.$ac_ext" <<_ACEOF
6462 #line 6462 "configure"
6463 #include "confdefs.h"
6465 #include <${cf_cv_ncurses_header:-curses.h}>
6471 int x = auto_left_margin; (void)x
6476 rm -f "conftest.$ac_objext"
6477 if { (eval echo "$as_me:6477: \"$ac_compile\"") >&5
6478 (eval $ac_compile) 2>&5
6480 echo "$as_me:6480: \$? = $ac_status" >&5
6481 (exit "$ac_status"); } &&
6482 { ac_try='test -s "conftest.$ac_objext"'
6483 { (eval echo "$as_me:6483: \"$ac_try\"") >&5
6486 echo "$as_me:6486: \$? = $ac_status" >&5
6487 (exit "$ac_status"); }; }; then
6489 cf_cv_term_header="$cf_test"
6491 echo "$as_me: failed program was:" >&5
6492 cat "conftest.$ac_ext" >&5
6494 cf_cv_term_header=unknown
6497 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6498 test "$cf_cv_term_header" != unknown && break
6502 echo "$as_me:6502: result: $cf_cv_term_header" >&5
6503 echo "${ECHO_T}$cf_cv_term_header" >&6
6505 # Set definitions to allow ifdef'ing to accommodate subdirectories
6507 case "$cf_cv_term_header" in
6510 cat >>confdefs.h <<\EOF
6511 #define HAVE_TERM_H 1
6517 case "$cf_cv_term_header" in
6520 cat >>confdefs.h <<\EOF
6521 #define HAVE_NCURSES_TERM_H 1
6527 cat >>confdefs.h <<\EOF
6528 #define HAVE_NCURSESW_TERM_H 1
6534 echo "$as_me:6534: checking for ncurses version" >&5
6535 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6536 if test "${cf_cv_ncurses_version+set}" = set; then
6537 echo $ECHO_N "(cached) $ECHO_C" >&6
6540 cf_cv_ncurses_version=no
6542 rm -f "$cf_tempfile"
6543 if test "$cross_compiling" = yes; then
6545 # This will not work if the preprocessor splits the line after the
6546 # Autoconf token. The 'unproto' program does that.
6547 cat > "conftest.$ac_ext" <<EOF
6548 #include <${cf_cv_ncurses_header:-curses.h}>
6550 #ifdef NCURSES_VERSION
6551 Autoconf NCURSES_VERSION
6559 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6560 { (eval echo "$as_me:6560: \"$cf_try\"") >&5
6563 echo "$as_me:6563: \$? = $ac_status" >&5
6564 (exit "$ac_status"); }
6565 if test -f conftest.out ; then
6566 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
6567 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6572 cat >"conftest.$ac_ext" <<_ACEOF
6573 #line 6573 "configure"
6574 #include "confdefs.h"
6576 #include <${cf_cv_ncurses_header:-curses.h}>
6580 FILE *fp = fopen("$cf_tempfile", "w");
6581 #ifdef NCURSES_VERSION
6582 # ifdef NCURSES_VERSION_PATCH
6583 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6585 fprintf(fp, "%s\\n", NCURSES_VERSION);
6589 fprintf(fp, "old\\n");
6594 ${cf_cv_main_return:-return}(0);
6597 rm -f "conftest$ac_exeext"
6598 if { (eval echo "$as_me:6598: \"$ac_link\"") >&5
6599 (eval $ac_link) 2>&5
6601 echo "$as_me:6601: \$? = $ac_status" >&5
6602 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6603 { (eval echo "$as_me:6603: \"$ac_try\"") >&5
6606 echo "$as_me:6606: \$? = $ac_status" >&5
6607 (exit "$ac_status"); }; }; then
6609 cf_cv_ncurses_version=`cat $cf_tempfile`
6611 echo "$as_me: program exited with status $ac_status" >&5
6612 echo "$as_me: failed program was:" >&5
6613 cat "conftest.$ac_ext" >&5
6615 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6617 rm -f "$cf_tempfile"
6620 echo "$as_me:6620: result: $cf_cv_ncurses_version" >&5
6621 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6622 test "$cf_cv_ncurses_version" = no ||
6623 cat >>confdefs.h <<\EOF
6627 echo "$as_me:6627: checking if we have identified curses libraries" >&5
6628 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
6629 cat >"conftest.$ac_ext" <<_ACEOF
6630 #line 6630 "configure"
6631 #include "confdefs.h"
6632 #include <${cf_cv_ncurses_header:-curses.h}>
6636 initscr(); tgoto("?", 0,0)
6641 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6642 if { (eval echo "$as_me:6642: \"$ac_link\"") >&5
6643 (eval $ac_link) 2>&5
6645 echo "$as_me:6645: \$? = $ac_status" >&5
6646 (exit "$ac_status"); } &&
6647 { ac_try='test -s "conftest$ac_exeext"'
6648 { (eval echo "$as_me:6648: \"$ac_try\"") >&5
6651 echo "$as_me:6651: \$? = $ac_status" >&5
6652 (exit "$ac_status"); }; }; then
6655 echo "$as_me: failed program was:" >&5
6656 cat "conftest.$ac_ext" >&5
6659 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6660 echo "$as_me:6660: result: $cf_result" >&5
6661 echo "${ECHO_T}$cf_result" >&6
6663 if test "$cf_result" = no ; then
6666 echo "$as_me:6666: checking for tgoto in -lmytinfo" >&5
6667 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6668 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6669 echo $ECHO_N "(cached) $ECHO_C" >&6
6671 ac_check_lib_save_LIBS=$LIBS
6672 LIBS="-lmytinfo $LIBS"
6673 cat >"conftest.$ac_ext" <<_ACEOF
6674 #line 6674 "configure"
6675 #include "confdefs.h"
6677 /* Override any gcc2 internal prototype to avoid an error. */
6681 /* We use char because int might match the return type of a gcc2
6682 builtin and then its argument prototype would still apply. */
6692 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6693 if { (eval echo "$as_me:6693: \"$ac_link\"") >&5
6694 (eval $ac_link) 2>&5
6696 echo "$as_me:6696: \$? = $ac_status" >&5
6697 (exit "$ac_status"); } &&
6698 { ac_try='test -s "conftest$ac_exeext"'
6699 { (eval echo "$as_me:6699: \"$ac_try\"") >&5
6702 echo "$as_me:6702: \$? = $ac_status" >&5
6703 (exit "$ac_status"); }; }; then
6704 ac_cv_lib_mytinfo_tgoto=yes
6706 echo "$as_me: failed program was:" >&5
6707 cat "conftest.$ac_ext" >&5
6708 ac_cv_lib_mytinfo_tgoto=no
6710 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6711 LIBS=$ac_check_lib_save_LIBS
6713 echo "$as_me:6713: result: $ac_cv_lib_mytinfo_tgoto" >&5
6714 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6715 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6720 for cf_add_1lib in -lmytinfo; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6722 for cf_add_1lib in $cf_add_0lib; do
6723 for cf_add_2lib in $cf_add_libs; do
6724 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6729 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6737 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
6738 # next (1998), and xcurses "newer" (2000). There is no header file for
6739 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
6740 # term.h) for cur_colr
6741 if test "x$cf_cv_screen" = "xcurses_colr"
6743 echo "$as_me:6743: checking for initscr in -lcur_colr" >&5
6744 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
6745 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
6746 echo $ECHO_N "(cached) $ECHO_C" >&6
6748 ac_check_lib_save_LIBS=$LIBS
6749 LIBS="-lcur_colr $LIBS"
6750 cat >"conftest.$ac_ext" <<_ACEOF
6751 #line 6751 "configure"
6752 #include "confdefs.h"
6754 /* Override any gcc2 internal prototype to avoid an error. */
6758 /* We use char because int might match the return type of a gcc2
6759 builtin and then its argument prototype would still apply. */
6769 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6770 if { (eval echo "$as_me:6770: \"$ac_link\"") >&5
6771 (eval $ac_link) 2>&5
6773 echo "$as_me:6773: \$? = $ac_status" >&5
6774 (exit "$ac_status"); } &&
6775 { ac_try='test -s "conftest$ac_exeext"'
6776 { (eval echo "$as_me:6776: \"$ac_try\"") >&5
6779 echo "$as_me:6779: \$? = $ac_status" >&5
6780 (exit "$ac_status"); }; }; then
6781 ac_cv_lib_cur_colr_initscr=yes
6783 echo "$as_me: failed program was:" >&5
6784 cat "conftest.$ac_ext" >&5
6785 ac_cv_lib_cur_colr_initscr=no
6787 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6788 LIBS=$ac_check_lib_save_LIBS
6790 echo "$as_me:6790: result: $ac_cv_lib_cur_colr_initscr" >&5
6791 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
6792 if test "$ac_cv_lib_cur_colr_initscr" = yes; then
6797 for cf_add_1lib in -lcur_colr; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6799 for cf_add_1lib in $cf_add_0lib; do
6800 for cf_add_2lib in $cf_add_libs; do
6801 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6806 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6810 ac_cv_func_initscr=yes
6814 echo "$as_me:6814: checking for initscr in -lHcurses" >&5
6815 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
6816 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
6817 echo $ECHO_N "(cached) $ECHO_C" >&6
6819 ac_check_lib_save_LIBS=$LIBS
6820 LIBS="-lHcurses $LIBS"
6821 cat >"conftest.$ac_ext" <<_ACEOF
6822 #line 6822 "configure"
6823 #include "confdefs.h"
6825 /* Override any gcc2 internal prototype to avoid an error. */
6829 /* We use char because int might match the return type of a gcc2
6830 builtin and then its argument prototype would still apply. */
6840 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6841 if { (eval echo "$as_me:6841: \"$ac_link\"") >&5
6842 (eval $ac_link) 2>&5
6844 echo "$as_me:6844: \$? = $ac_status" >&5
6845 (exit "$ac_status"); } &&
6846 { ac_try='test -s "conftest$ac_exeext"'
6847 { (eval echo "$as_me:6847: \"$ac_try\"") >&5
6850 echo "$as_me:6850: \$? = $ac_status" >&5
6851 (exit "$ac_status"); }; }; then
6852 ac_cv_lib_Hcurses_initscr=yes
6854 echo "$as_me: failed program was:" >&5
6855 cat "conftest.$ac_ext" >&5
6856 ac_cv_lib_Hcurses_initscr=no
6858 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6859 LIBS=$ac_check_lib_save_LIBS
6861 echo "$as_me:6861: result: $ac_cv_lib_Hcurses_initscr" >&5
6862 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
6863 if test "$ac_cv_lib_Hcurses_initscr" = yes; then
6865 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
6870 for cf_add_1lib in -lHcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6872 for cf_add_1lib in $cf_add_0lib; do
6873 for cf_add_2lib in $cf_add_libs; do
6874 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6879 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6883 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6884 CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
6886 ac_cv_func_initscr=yes
6895 case `arch 2>/dev/null` in
6900 if test -n "/lib64" ; then
6901 for cf_add_libdir in /lib64
6903 if test "$cf_add_libdir" = /usr/lib ; then
6905 elif test -d "$cf_add_libdir"
6908 if test -n "$LDFLAGS$LIBS" ; then
6909 # a loop is needed to ensure we can add subdirs of existing dirs
6910 for cf_test_libdir in $LDFLAGS $LIBS ; do
6911 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6912 cf_have_libdir=yes; break
6916 if test "$cf_have_libdir" = no ; then
6917 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6919 echo "${as_me:-configure}:6919: testing adding $cf_add_libdir to library-path ..." 1>&5
6921 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6929 if test -n "/lib" ; then
6930 for cf_add_libdir in /lib
6932 if test "$cf_add_libdir" = /usr/lib ; then
6934 elif test -d "$cf_add_libdir"
6937 if test -n "$LDFLAGS$LIBS" ; then
6938 # a loop is needed to ensure we can add subdirs of existing dirs
6939 for cf_test_libdir in $LDFLAGS $LIBS ; do
6940 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6941 cf_have_libdir=yes; break
6945 if test "$cf_have_libdir" = no ; then
6946 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6948 echo "${as_me:-configure}:6948: testing adding $cf_add_libdir to library-path ..." 1>&5
6950 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6960 if test -n "/lib" ; then
6961 for cf_add_libdir in /lib
6963 if test "$cf_add_libdir" = /usr/lib ; then
6965 elif test -d "$cf_add_libdir"
6968 if test -n "$LDFLAGS$LIBS" ; then
6969 # a loop is needed to ensure we can add subdirs of existing dirs
6970 for cf_test_libdir in $LDFLAGS $LIBS ; do
6971 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6972 cf_have_libdir=yes; break
6976 if test "$cf_have_libdir" = no ; then
6977 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6979 echo "${as_me:-configure}:6979: testing adding $cf_add_libdir to library-path ..." 1>&5
6981 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6991 if test "x$cf_cv_screen" = "xcurses_5lib"
6993 if test -d /usr/5lib ; then
6995 if test -n "/usr/5lib" ; then
6996 for cf_add_libdir in /usr/5lib
6998 if test "$cf_add_libdir" = /usr/lib ; then
7000 elif test -d "$cf_add_libdir"
7003 if test -n "$LDFLAGS$LIBS" ; then
7004 # a loop is needed to ensure we can add subdirs of existing dirs
7005 for cf_test_libdir in $LDFLAGS $LIBS ; do
7006 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7007 cf_have_libdir=yes; break
7011 if test "$cf_have_libdir" = no ; then
7012 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7014 echo "${as_me:-configure}:7014: testing adding $cf_add_libdir to library-path ..." 1>&5
7016 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7025 for cf_add_1lib in -lcurses -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7027 for cf_add_1lib in $cf_add_0lib; do
7028 for cf_add_2lib in $cf_add_libs; do
7029 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7034 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7040 ac_cv_func_initscr=yes
7044 if test ".$ac_cv_func_initscr" != .yes ; then
7045 cf_save_LIBS="$LIBS"
7047 if test ".${cf_cv_ncurses_version:-no}" != .no
7049 cf_check_list="ncurses curses cursesX"
7051 cf_check_list="cursesX curses ncurses"
7054 # Check for library containing tgoto. Do this before curses library
7055 # because it may be needed to link the test-case for initscr.
7056 if test "x$cf_term_lib" = x
7058 echo "$as_me:7058: checking for tgoto" >&5
7059 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
7060 if test "${ac_cv_func_tgoto+set}" = set; then
7061 echo $ECHO_N "(cached) $ECHO_C" >&6
7063 cat >"conftest.$ac_ext" <<_ACEOF
7064 #line 7064 "configure"
7065 #include "confdefs.h"
7066 #define tgoto autoconf_temporary
7067 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
7074 /* We use char because int might match the return type of a gcc2
7075 builtin and then its argument prototype would still apply. */
7082 /* The GNU C library defines stubs for functions which it implements
7083 to always fail with ENOSYS. Some functions are actually named
7084 something starting with __ and the normal name is an alias. */
7085 #if defined (__stub_tgoto) || defined (__stub___tgoto)
7086 #error found stub for tgoto
7094 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7095 if { (eval echo "$as_me:7095: \"$ac_link\"") >&5
7096 (eval $ac_link) 2>&5
7098 echo "$as_me:7098: \$? = $ac_status" >&5
7099 (exit "$ac_status"); } &&
7100 { ac_try='test -s "conftest$ac_exeext"'
7101 { (eval echo "$as_me:7101: \"$ac_try\"") >&5
7104 echo "$as_me:7104: \$? = $ac_status" >&5
7105 (exit "$ac_status"); }; }; then
7106 ac_cv_func_tgoto=yes
7108 echo "$as_me: failed program was:" >&5
7109 cat "conftest.$ac_ext" >&5
7112 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7114 echo "$as_me:7114: result: $ac_cv_func_tgoto" >&5
7115 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
7116 if test "$ac_cv_func_tgoto" = yes; then
7117 cf_term_lib=predefined
7120 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
7122 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
7123 echo "$as_me:7123: checking for tgoto in -l$cf_term_lib" >&5
7124 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
7125 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
7126 echo $ECHO_N "(cached) $ECHO_C" >&6
7128 ac_check_lib_save_LIBS=$LIBS
7129 LIBS="-l$cf_term_lib $LIBS"
7130 cat >"conftest.$ac_ext" <<_ACEOF
7131 #line 7131 "configure"
7132 #include "confdefs.h"
7134 /* Override any gcc2 internal prototype to avoid an error. */
7138 /* We use char because int might match the return type of a gcc2
7139 builtin and then its argument prototype would still apply. */
7149 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7150 if { (eval echo "$as_me:7150: \"$ac_link\"") >&5
7151 (eval $ac_link) 2>&5
7153 echo "$as_me:7153: \$? = $ac_status" >&5
7154 (exit "$ac_status"); } &&
7155 { ac_try='test -s "conftest$ac_exeext"'
7156 { (eval echo "$as_me:7156: \"$ac_try\"") >&5
7159 echo "$as_me:7159: \$? = $ac_status" >&5
7160 (exit "$ac_status"); }; }; then
7161 eval "$as_ac_Lib=yes"
7163 echo "$as_me: failed program was:" >&5
7164 cat "conftest.$ac_ext" >&5
7165 eval "$as_ac_Lib=no"
7167 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7168 LIBS=$ac_check_lib_save_LIBS
7170 echo "$as_me:7170: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
7171 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
7172 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
7174 : "${cf_nculib_root:=$cf_term_lib}"
7185 # Check for library containing initscr
7186 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
7187 if test "x$cf_curs_lib" = x
7189 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
7191 LIBS="-l$cf_curs_lib $cf_save_LIBS"
7192 if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
7193 echo "$as_me:7193: checking if we can link with $cf_curs_lib library" >&5
7194 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
7195 cat >"conftest.$ac_ext" <<_ACEOF
7196 #line 7196 "configure"
7197 #include "confdefs.h"
7198 #include <${cf_cv_ncurses_header:-curses.h}>
7207 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7208 if { (eval echo "$as_me:7208: \"$ac_link\"") >&5
7209 (eval $ac_link) 2>&5
7211 echo "$as_me:7211: \$? = $ac_status" >&5
7212 (exit "$ac_status"); } &&
7213 { ac_try='test -s "conftest$ac_exeext"'
7214 { (eval echo "$as_me:7214: \"$ac_try\"") >&5
7217 echo "$as_me:7217: \$? = $ac_status" >&5
7218 (exit "$ac_status"); }; }; then
7221 echo "$as_me: failed program was:" >&5
7222 cat "conftest.$ac_ext" >&5
7225 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7226 echo "$as_me:7226: result: $cf_result" >&5
7227 echo "${ECHO_T}$cf_result" >&6
7228 test "$cf_result" = yes && break
7229 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
7231 elif test "$cf_term_lib" != predefined ; then
7232 echo "$as_me:7232: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
7233 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
7234 cat >"conftest.$ac_ext" <<_ACEOF
7235 #line 7235 "configure"
7236 #include "confdefs.h"
7237 #include <${cf_cv_ncurses_header:-curses.h}>
7241 initscr(); tgoto((char *)0, 0, 0);
7246 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7247 if { (eval echo "$as_me:7247: \"$ac_link\"") >&5
7248 (eval $ac_link) 2>&5
7250 echo "$as_me:7250: \$? = $ac_status" >&5
7251 (exit "$ac_status"); } &&
7252 { ac_try='test -s "conftest$ac_exeext"'
7253 { (eval echo "$as_me:7253: \"$ac_try\"") >&5
7256 echo "$as_me:7256: \$? = $ac_status" >&5
7257 (exit "$ac_status"); }; }; then
7260 echo "$as_me: failed program was:" >&5
7261 cat "conftest.$ac_ext" >&5
7263 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
7264 cat >"conftest.$ac_ext" <<_ACEOF
7265 #line 7265 "configure"
7266 #include "confdefs.h"
7267 #include <${cf_cv_ncurses_header:-curses.h}>
7276 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7277 if { (eval echo "$as_me:7277: \"$ac_link\"") >&5
7278 (eval $ac_link) 2>&5
7280 echo "$as_me:7280: \$? = $ac_status" >&5
7281 (exit "$ac_status"); } &&
7282 { ac_try='test -s "conftest$ac_exeext"'
7283 { (eval echo "$as_me:7283: \"$ac_try\"") >&5
7286 echo "$as_me:7286: \$? = $ac_status" >&5
7287 (exit "$ac_status"); }; }; then
7290 echo "$as_me: failed program was:" >&5
7291 cat "conftest.$ac_ext" >&5
7294 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7297 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7298 echo "$as_me:7298: result: $cf_result" >&5
7299 echo "${ECHO_T}$cf_result" >&6
7300 test "$cf_result" != error && break
7304 test "$cf_curs_lib" = unknown && { { echo "$as_me:7304: error: no curses library found" >&5
7305 echo "$as_me: error: no curses library found" >&2;}
7306 { (exit 1); exit 1; }; }
7313 echo "$as_me:7313: checking for multibyte character support" >&5
7314 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7315 if test "${cf_cv_utf8_lib+set}" = set; then
7316 echo $ECHO_N "(cached) $ECHO_C" >&6
7319 cf_save_LIBS="$LIBS"
7320 cat >"conftest.$ac_ext" <<_ACEOF
7321 #line 7321 "configure"
7322 #include "confdefs.h"
7333 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7334 if { (eval echo "$as_me:7334: \"$ac_link\"") >&5
7335 (eval $ac_link) 2>&5
7337 echo "$as_me:7337: \$? = $ac_status" >&5
7338 (exit "$ac_status"); } &&
7339 { ac_try='test -s "conftest$ac_exeext"'
7340 { (eval echo "$as_me:7340: \"$ac_try\"") >&5
7343 echo "$as_me:7343: \$? = $ac_status" >&5
7344 (exit "$ac_status"); }; }; then
7347 echo "$as_me: failed program was:" >&5
7348 cat "conftest.$ac_ext" >&5
7350 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7351 # will be set on completion of the AC_TRY_LINK below.
7352 cf_cv_header_path_utf8=
7353 cf_cv_library_path_utf8=
7355 echo "${as_me:-configure}:7355: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7357 cf_save_LIBS="$LIBS"
7359 cat >"conftest.$ac_ext" <<_ACEOF
7360 #line 7360 "configure"
7361 #include "confdefs.h"
7363 #include <libutf8.h>
7372 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7373 if { (eval echo "$as_me:7373: \"$ac_link\"") >&5
7374 (eval $ac_link) 2>&5
7376 echo "$as_me:7376: \$? = $ac_status" >&5
7377 (exit "$ac_status"); } &&
7378 { ac_try='test -s "conftest$ac_exeext"'
7379 { (eval echo "$as_me:7379: \"$ac_try\"") >&5
7382 echo "$as_me:7382: \$? = $ac_status" >&5
7383 (exit "$ac_status"); }; }; then
7385 cf_cv_find_linkage_utf8=yes
7386 cf_cv_header_path_utf8=/usr/include
7387 cf_cv_library_path_utf8=/usr/lib
7390 echo "$as_me: failed program was:" >&5
7391 cat "conftest.$ac_ext" >&5
7393 LIBS="-lutf8 $cf_save_LIBS"
7395 cat >"conftest.$ac_ext" <<_ACEOF
7396 #line 7396 "configure"
7397 #include "confdefs.h"
7399 #include <libutf8.h>
7408 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7409 if { (eval echo "$as_me:7409: \"$ac_link\"") >&5
7410 (eval $ac_link) 2>&5
7412 echo "$as_me:7412: \$? = $ac_status" >&5
7413 (exit "$ac_status"); } &&
7414 { ac_try='test -s "conftest$ac_exeext"'
7415 { (eval echo "$as_me:7415: \"$ac_try\"") >&5
7418 echo "$as_me:7418: \$? = $ac_status" >&5
7419 (exit "$ac_status"); }; }; then
7421 cf_cv_find_linkage_utf8=yes
7422 cf_cv_header_path_utf8=/usr/include
7423 cf_cv_library_path_utf8=/usr/lib
7424 cf_cv_library_file_utf8="-lutf8"
7427 echo "$as_me: failed program was:" >&5
7428 cat "conftest.$ac_ext" >&5
7430 cf_cv_find_linkage_utf8=no
7431 LIBS="$cf_save_LIBS"
7433 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
7435 echo "${as_me:-configure}:7435: testing find linkage for utf8 library ..." 1>&5
7437 echo "${as_me:-configure}:7437: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7439 cf_save_CPPFLAGS="$CPPFLAGS"
7440 cf_test_CPPFLAGS="$CPPFLAGS"
7444 # collect the current set of include-directories from compiler flags
7445 cf_header_path_list=""
7446 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7447 for cf_header_path in $CPPFLAGS $CFLAGS
7449 case "$cf_header_path" in
7451 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7453 test "x$cf_header_path" != "xNONE" && \
7454 test -d "$cf_header_path" && \
7456 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7457 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
7458 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
7459 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
7460 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
7461 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7464 cf_header_path_list="$cf_header_path_list $cf_search"
7470 # add the variations for the package we are looking for
7474 test "x$prefix" != "xNONE" && \
7475 test -d "$prefix" && \
7477 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7478 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
7479 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
7480 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
7481 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
7482 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
7485 for cf_subdir_prefix in \
7494 test "x$cf_subdir_prefix" != "x$prefix" && \
7495 test -d "$cf_subdir_prefix" && \
7496 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7497 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7498 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
7499 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
7500 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
7501 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
7502 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
7507 test "$includedir" != NONE && \
7508 test "$includedir" != "/usr/include" && \
7509 test -d "$includedir" && {
7510 test -d "$includedir" && cf_search="$cf_search $includedir"
7511 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
7514 test "$oldincludedir" != NONE && \
7515 test "$oldincludedir" != "/usr/include" && \
7516 test -d "$oldincludedir" && {
7517 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
7518 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
7521 cf_search="$cf_search $cf_header_path_list"
7523 for cf_cv_header_path_utf8 in $cf_search
7525 if test -d "$cf_cv_header_path_utf8" ; then
7526 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
7528 echo "${as_me:-configure}:7528: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7530 CPPFLAGS="$cf_save_CPPFLAGS"
7532 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7533 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
7535 cat >"conftest.$ac_ext" <<_ACEOF
7536 #line 7536 "configure"
7537 #include "confdefs.h"
7539 #include <libutf8.h>
7548 rm -f "conftest.$ac_objext"
7549 if { (eval echo "$as_me:7549: \"$ac_compile\"") >&5
7550 (eval $ac_compile) 2>&5
7552 echo "$as_me:7552: \$? = $ac_status" >&5
7553 (exit "$ac_status"); } &&
7554 { ac_try='test -s "conftest.$ac_objext"'
7555 { (eval echo "$as_me:7555: \"$ac_try\"") >&5
7558 echo "$as_me:7558: \$? = $ac_status" >&5
7559 (exit "$ac_status"); }; }; then
7561 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7563 echo "${as_me:-configure}:7563: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7565 cf_cv_find_linkage_utf8=maybe
7566 cf_test_CPPFLAGS="$CPPFLAGS"
7569 echo "$as_me: failed program was:" >&5
7570 cat "conftest.$ac_ext" >&5
7572 CPPFLAGS="$cf_save_CPPFLAGS"
7575 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7579 if test "$cf_cv_find_linkage_utf8" = maybe ; then
7581 echo "${as_me:-configure}:7581: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7583 cf_save_LIBS="$LIBS"
7584 cf_save_LDFLAGS="$LDFLAGS"
7586 if test "$cf_cv_find_linkage_utf8" != yes ; then
7589 cf_library_path_list=""
7590 if test -n "${LDFLAGS}${LIBS}" ; then
7591 for cf_library_path in $LDFLAGS $LIBS
7593 case "$cf_library_path" in
7595 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7597 test "x$cf_library_path" != "xNONE" && \
7598 test -d "$cf_library_path" && \
7600 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7601 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
7602 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
7603 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7604 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
7605 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7608 cf_library_path_list="$cf_library_path_list $cf_search"
7616 test "x$prefix" != "xNONE" && \
7617 test -d "$prefix" && \
7619 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7620 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
7621 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
7622 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
7623 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
7624 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
7627 for cf_subdir_prefix in \
7636 test "x$cf_subdir_prefix" != "x$prefix" && \
7637 test -d "$cf_subdir_prefix" && \
7638 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7639 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7640 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
7641 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
7642 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
7643 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
7644 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
7649 cf_search="$cf_library_path_list $cf_search"
7651 for cf_cv_library_path_utf8 in $cf_search
7653 if test -d "$cf_cv_library_path_utf8" ; then
7654 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7656 echo "${as_me:-configure}:7656: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7658 CPPFLAGS="$cf_test_CPPFLAGS"
7659 LIBS="-lutf8 $cf_save_LIBS"
7660 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7661 cat >"conftest.$ac_ext" <<_ACEOF
7662 #line 7662 "configure"
7663 #include "confdefs.h"
7665 #include <libutf8.h>
7674 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7675 if { (eval echo "$as_me:7675: \"$ac_link\"") >&5
7676 (eval $ac_link) 2>&5
7678 echo "$as_me:7678: \$? = $ac_status" >&5
7679 (exit "$ac_status"); } &&
7680 { ac_try='test -s "conftest$ac_exeext"'
7681 { (eval echo "$as_me:7681: \"$ac_try\"") >&5
7684 echo "$as_me:7684: \$? = $ac_status" >&5
7685 (exit "$ac_status"); }; }; then
7687 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7689 echo "${as_me:-configure}:7689: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7691 cf_cv_find_linkage_utf8=yes
7692 cf_cv_library_file_utf8="-lutf8"
7695 echo "$as_me: failed program was:" >&5
7696 cat "conftest.$ac_ext" >&5
7698 CPPFLAGS="$cf_save_CPPFLAGS"
7699 LIBS="$cf_save_LIBS"
7700 LDFLAGS="$cf_save_LDFLAGS"
7703 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7706 CPPFLAGS="$cf_save_CPPFLAGS"
7707 LDFLAGS="$cf_save_LDFLAGS"
7711 cf_cv_find_linkage_utf8=no
7715 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7718 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7720 LIBS="$cf_save_LIBS"
7722 if test "$cf_cv_find_linkage_utf8" = yes ; then
7723 cf_cv_utf8_lib=add-on
7729 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7731 echo "$as_me:7731: result: $cf_cv_utf8_lib" >&5
7732 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7734 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7736 if test "$cf_cv_utf8_lib" = "add-on" ; then
7738 cat >>confdefs.h <<\EOF
7739 #define HAVE_LIBUTF8_H 1
7742 if test -n "$cf_cv_header_path_utf8" ; then
7743 for cf_add_incdir in $cf_cv_header_path_utf8
7745 while test "$cf_add_incdir" != /usr/include
7747 if test -d "$cf_add_incdir"
7750 if test -n "$CFLAGS$CPPFLAGS" ; then
7751 # a loop is needed to ensure we can add subdirs of existing dirs
7752 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7753 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7754 cf_have_incdir=yes; break
7759 if test "$cf_have_incdir" = no ; then
7760 if test "$cf_add_incdir" = /usr/local/include ; then
7761 if test "$GCC" = yes
7763 cf_save_CPPFLAGS=$CPPFLAGS
7765 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7766 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7768 cat >"conftest.$ac_ext" <<_ACEOF
7769 #line 7769 "configure"
7770 #include "confdefs.h"
7780 rm -f "conftest.$ac_objext"
7781 if { (eval echo "$as_me:7781: \"$ac_compile\"") >&5
7782 (eval $ac_compile) 2>&5
7784 echo "$as_me:7784: \$? = $ac_status" >&5
7785 (exit "$ac_status"); } &&
7786 { ac_try='test -s "conftest.$ac_objext"'
7787 { (eval echo "$as_me:7787: \"$ac_try\"") >&5
7790 echo "$as_me:7790: \$? = $ac_status" >&5
7791 (exit "$ac_status"); }; }; then
7794 echo "$as_me: failed program was:" >&5
7795 cat "conftest.$ac_ext" >&5
7798 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7799 CPPFLAGS=$cf_save_CPPFLAGS
7804 if test "$cf_have_incdir" = no ; then
7805 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7807 echo "${as_me:-configure}:7807: testing adding $cf_add_incdir to include-path ..." 1>&5
7809 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7811 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7812 test "$cf_top_incdir" = "$cf_add_incdir" && break
7813 cf_add_incdir="$cf_top_incdir"
7824 if test -n "$cf_cv_library_path_utf8" ; then
7825 for cf_add_libdir in $cf_cv_library_path_utf8
7827 if test "$cf_add_libdir" = /usr/lib ; then
7829 elif test -d "$cf_add_libdir"
7832 if test -n "$LDFLAGS$LIBS" ; then
7833 # a loop is needed to ensure we can add subdirs of existing dirs
7834 for cf_test_libdir in $LDFLAGS $LIBS ; do
7835 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7836 cf_have_libdir=yes; break
7840 if test "$cf_have_libdir" = no ; then
7841 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7843 echo "${as_me:-configure}:7843: testing adding $cf_add_libdir to library-path ..." 1>&5
7845 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7854 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7856 for cf_add_1lib in $cf_add_0lib; do
7857 for cf_add_2lib in $cf_add_libs; do
7858 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7863 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7869 cf_ncuconfig_root=$cf_cv_screen
7870 cf_have_ncuconfig=no
7872 if test "x${PKG_CONFIG:=none}" != xnone; then
7873 echo "$as_me:7873: checking pkg-config for $cf_ncuconfig_root" >&5
7874 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7875 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7876 echo "$as_me:7876: result: yes" >&5
7877 echo "${ECHO_T}yes" >&6
7879 echo "$as_me:7879: checking if the $cf_ncuconfig_root package files work" >&5
7880 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7881 cf_have_ncuconfig=unknown
7883 cf_save_CFLAGS="$CFLAGS"
7884 cf_save_CPPFLAGS="$CPPFLAGS"
7885 cf_save_LIBS="$LIBS"
7887 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7888 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7890 # while -W for passing linker flags is prevalent, it is not "standard".
7891 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7892 # incompatible _and_ non-standard -W option which gives an error. Work
7893 # around that pitfall.
7894 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7900 cf_new_extra_cppflags=
7902 for cf_add_cflags in $cf_pkg_cflags
7904 case "$cf_fix_cppflags" in
7906 case "$cf_add_cflags" in
7907 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7908 case "$cf_add_cflags" in
7910 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7912 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7913 && test -z "${cf_tst_cflags}" \
7914 && cf_fix_cppflags=yes
7916 if test "$cf_fix_cppflags" = yes ; then
7918 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7919 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7922 elif test "${cf_tst_cflags}" = "\"'" ; then
7924 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7925 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7935 case "$cf_add_cflags" in
7937 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7939 CPPFLAGS=`echo "$CPPFLAGS" | \
7940 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7941 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7946 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7947 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7954 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7955 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7962 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7963 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7965 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7967 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7968 && test -z "${cf_tst_cflags}" \
7969 && cf_fix_cppflags=no
7974 if test -n "$cf_new_cflags" ; then
7976 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7977 CFLAGS="${CFLAGS}$cf_new_cflags"
7981 if test -n "$cf_new_cppflags" ; then
7983 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7984 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7988 if test -n "$cf_new_extra_cppflags" ; then
7990 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7991 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7998 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8000 for cf_add_1lib in $cf_add_0lib; do
8001 for cf_add_2lib in $cf_add_libs; do
8002 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8007 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8011 cat >"conftest.$ac_ext" <<_ACEOF
8012 #line 8012 "configure"
8013 #include "confdefs.h"
8014 #include <${cf_cv_ncurses_header:-curses.h}>
8018 initscr(); mousemask(0,0); tigetstr((char *)0);
8023 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8024 if { (eval echo "$as_me:8024: \"$ac_link\"") >&5
8025 (eval $ac_link) 2>&5
8027 echo "$as_me:8027: \$? = $ac_status" >&5
8028 (exit "$ac_status"); } &&
8029 { ac_try='test -s "conftest$ac_exeext"'
8030 { (eval echo "$as_me:8030: \"$ac_try\"") >&5
8033 echo "$as_me:8033: \$? = $ac_status" >&5
8034 (exit "$ac_status"); }; }; then
8035 if test "$cross_compiling" = yes; then
8036 cf_test_ncuconfig=maybe
8038 cat >"conftest.$ac_ext" <<_ACEOF
8039 #line 8039 "configure"
8040 #include "confdefs.h"
8041 #include <${cf_cv_ncurses_header:-curses.h}>
8043 { char *xx = curses_version(); return (xx == 0); }
8045 rm -f "conftest$ac_exeext"
8046 if { (eval echo "$as_me:8046: \"$ac_link\"") >&5
8047 (eval $ac_link) 2>&5
8049 echo "$as_me:8049: \$? = $ac_status" >&5
8050 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8051 { (eval echo "$as_me:8051: \"$ac_try\"") >&5
8054 echo "$as_me:8054: \$? = $ac_status" >&5
8055 (exit "$ac_status"); }; }; then
8056 cf_test_ncuconfig=yes
8058 echo "$as_me: program exited with status $ac_status" >&5
8059 echo "$as_me: failed program was:" >&5
8060 cat "conftest.$ac_ext" >&5
8061 cf_test_ncuconfig=no
8063 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8066 echo "$as_me: failed program was:" >&5
8067 cat "conftest.$ac_ext" >&5
8068 cf_test_ncuconfig=no
8070 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8072 CFLAGS="$cf_save_CFLAGS"
8073 CPPFLAGS="$cf_save_CPPFLAGS"
8074 LIBS="$cf_save_LIBS"
8076 if test "x$cf_test_ncuconfig" != xyes; then
8077 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
8078 cf_pkg_cflags="$cf_temp"
8079 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
8080 cf_pkg_libs="$cf_temp"
8088 cf_new_extra_cppflags=
8090 for cf_add_cflags in $cf_pkg_cflags
8092 case "$cf_fix_cppflags" in
8094 case "$cf_add_cflags" in
8095 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8096 case "$cf_add_cflags" in
8098 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8100 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8101 && test -z "${cf_tst_cflags}" \
8102 && cf_fix_cppflags=yes
8104 if test "$cf_fix_cppflags" = yes ; then
8106 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8107 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8110 elif test "${cf_tst_cflags}" = "\"'" ; then
8112 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8113 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8123 case "$cf_add_cflags" in
8125 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8127 CPPFLAGS=`echo "$CPPFLAGS" | \
8128 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8129 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8134 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8135 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8142 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8143 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8150 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8151 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8153 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8155 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8156 && test -z "${cf_tst_cflags}" \
8157 && cf_fix_cppflags=no
8162 if test -n "$cf_new_cflags" ; then
8164 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8165 CFLAGS="${CFLAGS}$cf_new_cflags"
8169 if test -n "$cf_new_cppflags" ; then
8171 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8172 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8176 if test -n "$cf_new_extra_cppflags" ; then
8178 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8179 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8186 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8188 for cf_add_1lib in $cf_add_0lib; do
8189 for cf_add_2lib in $cf_add_libs; do
8190 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8195 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8199 cat >"conftest.$ac_ext" <<_ACEOF
8200 #line 8200 "configure"
8201 #include "confdefs.h"
8202 #include <${cf_cv_ncurses_header:-curses.h}>
8206 initscr(); mousemask(0,0); tigetstr((char *)0);
8211 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8212 if { (eval echo "$as_me:8212: \"$ac_link\"") >&5
8213 (eval $ac_link) 2>&5
8215 echo "$as_me:8215: \$? = $ac_status" >&5
8216 (exit "$ac_status"); } &&
8217 { ac_try='test -s "conftest$ac_exeext"'
8218 { (eval echo "$as_me:8218: \"$ac_try\"") >&5
8221 echo "$as_me:8221: \$? = $ac_status" >&5
8222 (exit "$ac_status"); }; }; then
8223 if test "$cross_compiling" = yes; then
8224 cf_have_ncuconfig=maybe
8226 cat >"conftest.$ac_ext" <<_ACEOF
8227 #line 8227 "configure"
8228 #include "confdefs.h"
8229 #include <${cf_cv_ncurses_header:-curses.h}>
8231 { char *xx = curses_version(); return (xx == 0); }
8233 rm -f "conftest$ac_exeext"
8234 if { (eval echo "$as_me:8234: \"$ac_link\"") >&5
8235 (eval $ac_link) 2>&5
8237 echo "$as_me:8237: \$? = $ac_status" >&5
8238 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8239 { (eval echo "$as_me:8239: \"$ac_try\"") >&5
8242 echo "$as_me:8242: \$? = $ac_status" >&5
8243 (exit "$ac_status"); }; }; then
8244 cf_have_ncuconfig=yes
8246 echo "$as_me: program exited with status $ac_status" >&5
8247 echo "$as_me: failed program was:" >&5
8248 cat "conftest.$ac_ext" >&5
8249 cf_have_ncuconfig=no
8251 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8254 echo "$as_me: failed program was:" >&5
8255 cat "conftest.$ac_ext" >&5
8256 cf_have_ncuconfig=no
8258 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8259 echo "$as_me:8259: result: $cf_have_ncuconfig" >&5
8260 echo "${ECHO_T}$cf_have_ncuconfig" >&6
8261 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
8262 if test "$cf_have_ncuconfig" != "yes"
8264 CPPFLAGS="$cf_save_CPPFLAGS"
8265 LIBS="$cf_save_LIBS"
8266 NCURSES_CONFIG_PKG=none
8269 cat >>confdefs.h <<\EOF
8273 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
8275 echo "$as_me:8275: checking for terminfo header" >&5
8276 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8277 if test "${cf_cv_term_header+set}" = set; then
8278 echo $ECHO_N "(cached) $ECHO_C" >&6
8281 case "${cf_cv_ncurses_header}" in
8282 (*/ncurses.h|*/ncursesw.h)
8283 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8286 cf_term_header=term.h
8290 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8292 cat >"conftest.$ac_ext" <<_ACEOF
8293 #line 8293 "configure"
8294 #include "confdefs.h"
8296 #include <${cf_cv_ncurses_header:-curses.h}>
8302 int x = auto_left_margin; (void)x
8307 rm -f "conftest.$ac_objext"
8308 if { (eval echo "$as_me:8308: \"$ac_compile\"") >&5
8309 (eval $ac_compile) 2>&5
8311 echo "$as_me:8311: \$? = $ac_status" >&5
8312 (exit "$ac_status"); } &&
8313 { ac_try='test -s "conftest.$ac_objext"'
8314 { (eval echo "$as_me:8314: \"$ac_try\"") >&5
8317 echo "$as_me:8317: \$? = $ac_status" >&5
8318 (exit "$ac_status"); }; }; then
8320 cf_cv_term_header="$cf_test"
8322 echo "$as_me: failed program was:" >&5
8323 cat "conftest.$ac_ext" >&5
8325 cf_cv_term_header=unknown
8328 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8329 test "$cf_cv_term_header" != unknown && break
8333 echo "$as_me:8333: result: $cf_cv_term_header" >&5
8334 echo "${ECHO_T}$cf_cv_term_header" >&6
8336 # Set definitions to allow ifdef'ing to accommodate subdirectories
8338 case "$cf_cv_term_header" in
8341 cat >>confdefs.h <<\EOF
8342 #define HAVE_TERM_H 1
8348 case "$cf_cv_term_header" in
8351 cat >>confdefs.h <<\EOF
8352 #define HAVE_NCURSES_TERM_H 1
8358 cat >>confdefs.h <<\EOF
8359 #define HAVE_NCURSESW_TERM_H 1
8368 echo "$as_me:8368: result: no" >&5
8369 echo "${ECHO_T}no" >&6
8370 NCURSES_CONFIG_PKG=none
8373 NCURSES_CONFIG_PKG=none
8376 if test "x$cf_have_ncuconfig" = "xno"; then
8377 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
8379 if test -n "$ac_tool_prefix"; then
8380 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8382 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8383 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8384 echo "$as_me:8384: checking for $ac_word" >&5
8385 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8386 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8387 echo $ECHO_N "(cached) $ECHO_C" >&6
8389 if test -n "$NCURSES_CONFIG"; then
8390 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8392 ac_save_IFS=$IFS; IFS=$ac_path_separator
8394 for ac_dir in $ac_dummy; do
8396 test -z "$ac_dir" && ac_dir=.
8397 $as_executable_p "$ac_dir/$ac_word" || continue
8398 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8399 echo "$as_me:8399: found $ac_dir/$ac_word" >&5
8405 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8406 if test -n "$NCURSES_CONFIG"; then
8407 echo "$as_me:8407: result: $NCURSES_CONFIG" >&5
8408 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8410 echo "$as_me:8410: result: no" >&5
8411 echo "${ECHO_T}no" >&6
8414 test -n "$NCURSES_CONFIG" && break
8417 if test -z "$NCURSES_CONFIG"; then
8418 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8419 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8421 # Extract the first word of "$ac_prog", so it can be a program name with args.
8422 set dummy $ac_prog; ac_word=$2
8423 echo "$as_me:8423: checking for $ac_word" >&5
8424 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8425 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8426 echo $ECHO_N "(cached) $ECHO_C" >&6
8428 if test -n "$ac_ct_NCURSES_CONFIG"; then
8429 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8431 ac_save_IFS=$IFS; IFS=$ac_path_separator
8433 for ac_dir in $ac_dummy; do
8435 test -z "$ac_dir" && ac_dir=.
8436 $as_executable_p "$ac_dir/$ac_word" || continue
8437 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8438 echo "$as_me:8438: found $ac_dir/$ac_word" >&5
8444 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8445 if test -n "$ac_ct_NCURSES_CONFIG"; then
8446 echo "$as_me:8446: result: $ac_ct_NCURSES_CONFIG" >&5
8447 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8449 echo "$as_me:8449: result: no" >&5
8450 echo "${ECHO_T}no" >&6
8453 test -n "$ac_ct_NCURSES_CONFIG" && break
8455 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8457 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8460 if test "$NCURSES_CONFIG" != none ; then
8465 cf_new_extra_cppflags=
8467 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
8469 case "$cf_fix_cppflags" in
8471 case "$cf_add_cflags" in
8472 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8473 case "$cf_add_cflags" in
8475 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8477 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8478 && test -z "${cf_tst_cflags}" \
8479 && cf_fix_cppflags=yes
8481 if test "$cf_fix_cppflags" = yes ; then
8483 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8484 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8487 elif test "${cf_tst_cflags}" = "\"'" ; then
8489 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8490 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8500 case "$cf_add_cflags" in
8502 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8504 CPPFLAGS=`echo "$CPPFLAGS" | \
8505 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8506 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8511 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8512 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8519 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8520 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8527 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8528 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8530 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8532 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8533 && test -z "${cf_tst_cflags}" \
8534 && cf_fix_cppflags=no
8539 if test -n "$cf_new_cflags" ; then
8541 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8542 CFLAGS="${CFLAGS}$cf_new_cflags"
8546 if test -n "$cf_new_cppflags" ; then
8548 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8549 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8553 if test -n "$cf_new_extra_cppflags" ; then
8555 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8556 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8563 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8565 for cf_add_1lib in $cf_add_0lib; do
8566 for cf_add_2lib in $cf_add_libs; do
8567 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8572 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8576 # even with config script, some packages use no-override for curses.h
8578 echo "$as_me:8578: checking if we have identified curses headers" >&5
8579 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8580 if test "${cf_cv_ncurses_header+set}" = set; then
8581 echo $ECHO_N "(cached) $ECHO_C" >&6
8584 cf_cv_ncurses_header=none
8586 ncurses.h $cf_cv_screen/ncurses.h \
8587 curses.h $cf_cv_screen/curses.h
8589 cat >"conftest.$ac_ext" <<_ACEOF
8590 #line 8590 "configure"
8591 #include "confdefs.h"
8592 #include <${cf_header}>
8596 initscr(); tgoto("?", 0,0)
8601 rm -f "conftest.$ac_objext"
8602 if { (eval echo "$as_me:8602: \"$ac_compile\"") >&5
8603 (eval $ac_compile) 2>&5
8605 echo "$as_me:8605: \$? = $ac_status" >&5
8606 (exit "$ac_status"); } &&
8607 { ac_try='test -s "conftest.$ac_objext"'
8608 { (eval echo "$as_me:8608: \"$ac_try\"") >&5
8611 echo "$as_me:8611: \$? = $ac_status" >&5
8612 (exit "$ac_status"); }; }; then
8613 cf_cv_ncurses_header=$cf_header; break
8615 echo "$as_me: failed program was:" >&5
8616 cat "conftest.$ac_ext" >&5
8618 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8622 echo "$as_me:8622: result: $cf_cv_ncurses_header" >&5
8623 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8625 if test "$cf_cv_ncurses_header" = none ; then
8626 { { echo "$as_me:8626: error: No curses header-files found" >&5
8627 echo "$as_me: error: No curses header-files found" >&2;}
8628 { (exit 1); exit 1; }; }
8631 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8633 for ac_header in $cf_cv_ncurses_header
8635 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8636 echo "$as_me:8636: checking for $ac_header" >&5
8637 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8638 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8639 echo $ECHO_N "(cached) $ECHO_C" >&6
8641 cat >"conftest.$ac_ext" <<_ACEOF
8642 #line 8642 "configure"
8643 #include "confdefs.h"
8644 #include <$ac_header>
8646 if { (eval echo "$as_me:8646: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8647 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8649 $EGREP -v '^ *\+' conftest.er1 >conftest.err
8651 cat conftest.err >&5
8652 echo "$as_me:8652: \$? = $ac_status" >&5
8653 (exit "$ac_status"); } >/dev/null; then
8654 if test -s conftest.err; then
8655 ac_cpp_err=$ac_c_preproc_warn_flag
8662 if test -z "$ac_cpp_err"; then
8663 eval "$as_ac_Header=yes"
8665 echo "$as_me: failed program was:" >&5
8666 cat "conftest.$ac_ext" >&5
8667 eval "$as_ac_Header=no"
8669 rm -f conftest.err "conftest.$ac_ext"
8671 echo "$as_me:8671: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8672 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8673 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8674 cat >>confdefs.h <<EOF
8675 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8681 cat >>confdefs.h <<\EOF
8685 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8687 cat >>confdefs.h <<EOF
8688 #define $cf_nculib_ROOT 1
8691 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
8695 cf_ncuhdr_root=$cf_cv_screen
8697 test -n "$cf_cv_curses_dir" && \
8698 test "$cf_cv_curses_dir" != "no" && { \
8700 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8701 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8703 while test "$cf_add_incdir" != /usr/include
8705 if test -d "$cf_add_incdir"
8708 if test -n "$CFLAGS$CPPFLAGS" ; then
8709 # a loop is needed to ensure we can add subdirs of existing dirs
8710 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8711 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8712 cf_have_incdir=yes; break
8717 if test "$cf_have_incdir" = no ; then
8718 if test "$cf_add_incdir" = /usr/local/include ; then
8719 if test "$GCC" = yes
8721 cf_save_CPPFLAGS=$CPPFLAGS
8723 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8724 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8726 cat >"conftest.$ac_ext" <<_ACEOF
8727 #line 8727 "configure"
8728 #include "confdefs.h"
8738 rm -f "conftest.$ac_objext"
8739 if { (eval echo "$as_me:8739: \"$ac_compile\"") >&5
8740 (eval $ac_compile) 2>&5
8742 echo "$as_me:8742: \$? = $ac_status" >&5
8743 (exit "$ac_status"); } &&
8744 { ac_try='test -s "conftest.$ac_objext"'
8745 { (eval echo "$as_me:8745: \"$ac_try\"") >&5
8748 echo "$as_me:8748: \$? = $ac_status" >&5
8749 (exit "$ac_status"); }; }; then
8752 echo "$as_me: failed program was:" >&5
8753 cat "conftest.$ac_ext" >&5
8756 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8757 CPPFLAGS=$cf_save_CPPFLAGS
8762 if test "$cf_have_incdir" = no ; then
8763 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8765 echo "${as_me:-configure}:8765: testing adding $cf_add_incdir to include-path ..." 1>&5
8767 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8769 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8770 test "$cf_top_incdir" = "$cf_add_incdir" && break
8771 cf_add_incdir="$cf_top_incdir"
8784 echo "$as_me:8784: checking for $cf_ncuhdr_root header in include-path" >&5
8785 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8786 if test "${cf_cv_ncurses_h+set}" = set; then
8787 echo $ECHO_N "(cached) $ECHO_C" >&6
8790 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8791 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
8792 for cf_header in $cf_header_list
8795 cat >"conftest.$ac_ext" <<_ACEOF
8796 #line 8796 "configure"
8797 #include "confdefs.h"
8799 #include <$cf_header>
8804 #ifdef NCURSES_VERSION
8806 printf("%s\\n", NCURSES_VERSION);
8819 rm -f "conftest.$ac_objext"
8820 if { (eval echo "$as_me:8820: \"$ac_compile\"") >&5
8821 (eval $ac_compile) 2>&5
8823 echo "$as_me:8823: \$? = $ac_status" >&5
8824 (exit "$ac_status"); } &&
8825 { ac_try='test -s "conftest.$ac_objext"'
8826 { (eval echo "$as_me:8826: \"$ac_try\"") >&5
8829 echo "$as_me:8829: \$? = $ac_status" >&5
8830 (exit "$ac_status"); }; }; then
8831 cf_cv_ncurses_h=$cf_header
8834 echo "$as_me: failed program was:" >&5
8835 cat "conftest.$ac_ext" >&5
8838 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8840 test "$cf_cv_ncurses_h" != no && break
8844 echo "$as_me:8844: result: $cf_cv_ncurses_h" >&5
8845 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8847 if test "$cf_cv_ncurses_h" != no ; then
8848 cf_cv_ncurses_header=$cf_cv_ncurses_h
8851 echo "$as_me:8851: checking for $cf_ncuhdr_root include-path" >&5
8852 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8853 if test "${cf_cv_ncurses_h2+set}" = set; then
8854 echo $ECHO_N "(cached) $ECHO_C" >&6
8857 test -n "$verbose" && echo
8861 # collect the current set of include-directories from compiler flags
8862 cf_header_path_list=""
8863 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8864 for cf_header_path in $CPPFLAGS $CFLAGS
8866 case "$cf_header_path" in
8868 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8870 test "x$cf_header_path" != "xNONE" && \
8871 test -d "$cf_header_path" && \
8873 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8874 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8875 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8876 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8877 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8878 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"
8881 cf_header_path_list="$cf_header_path_list $cf_search"
8887 # add the variations for the package we are looking for
8891 test "x$prefix" != "xNONE" && \
8892 test -d "$prefix" && \
8894 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8895 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8896 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8897 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8898 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8899 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8902 for cf_subdir_prefix in \
8911 test "x$cf_subdir_prefix" != "x$prefix" && \
8912 test -d "$cf_subdir_prefix" && \
8913 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8914 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8915 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8916 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8917 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8918 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8919 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"
8924 test "$includedir" != NONE && \
8925 test "$includedir" != "/usr/include" && \
8926 test -d "$includedir" && {
8927 test -d "$includedir" && cf_search="$cf_search $includedir"
8928 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8931 test "$oldincludedir" != NONE && \
8932 test "$oldincludedir" != "/usr/include" && \
8933 test -d "$oldincludedir" && {
8934 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8935 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8938 cf_search="$cf_search $cf_header_path_list"
8940 test -n "$verbose" && echo "search path $cf_search"
8941 cf_save2_CPPFLAGS="$CPPFLAGS"
8942 for cf_incdir in $cf_search
8945 if test -n "$cf_incdir" ; then
8946 for cf_add_incdir in $cf_incdir
8948 while test "$cf_add_incdir" != /usr/include
8950 if test -d "$cf_add_incdir"
8953 if test -n "$CFLAGS$CPPFLAGS" ; then
8954 # a loop is needed to ensure we can add subdirs of existing dirs
8955 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8956 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8957 cf_have_incdir=yes; break
8962 if test "$cf_have_incdir" = no ; then
8963 if test "$cf_add_incdir" = /usr/local/include ; then
8964 if test "$GCC" = yes
8966 cf_save_CPPFLAGS=$CPPFLAGS
8968 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8969 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8971 cat >"conftest.$ac_ext" <<_ACEOF
8972 #line 8972 "configure"
8973 #include "confdefs.h"
8983 rm -f "conftest.$ac_objext"
8984 if { (eval echo "$as_me:8984: \"$ac_compile\"") >&5
8985 (eval $ac_compile) 2>&5
8987 echo "$as_me:8987: \$? = $ac_status" >&5
8988 (exit "$ac_status"); } &&
8989 { ac_try='test -s "conftest.$ac_objext"'
8990 { (eval echo "$as_me:8990: \"$ac_try\"") >&5
8993 echo "$as_me:8993: \$? = $ac_status" >&5
8994 (exit "$ac_status"); }; }; then
8997 echo "$as_me: failed program was:" >&5
8998 cat "conftest.$ac_ext" >&5
9001 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9002 CPPFLAGS=$cf_save_CPPFLAGS
9007 if test "$cf_have_incdir" = no ; then
9008 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9010 echo "${as_me:-configure}:9010: testing adding $cf_add_incdir to include-path ..." 1>&5
9012 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9014 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9015 test "$cf_top_incdir" = "$cf_add_incdir" && break
9016 cf_add_incdir="$cf_top_incdir"
9032 cat >"conftest.$ac_ext" <<_ACEOF
9033 #line 9033 "configure"
9034 #include "confdefs.h"
9036 #include <$cf_header>
9041 #ifdef NCURSES_VERSION
9043 printf("%s\\n", NCURSES_VERSION);
9056 rm -f "conftest.$ac_objext"
9057 if { (eval echo "$as_me:9057: \"$ac_compile\"") >&5
9058 (eval $ac_compile) 2>&5
9060 echo "$as_me:9060: \$? = $ac_status" >&5
9061 (exit "$ac_status"); } &&
9062 { ac_try='test -s "conftest.$ac_objext"'
9063 { (eval echo "$as_me:9063: \"$ac_try\"") >&5
9066 echo "$as_me:9066: \$? = $ac_status" >&5
9067 (exit "$ac_status"); }; }; then
9068 cf_cv_ncurses_h2=$cf_header
9071 echo "$as_me: failed program was:" >&5
9072 cat "conftest.$ac_ext" >&5
9075 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9077 if test "$cf_cv_ncurses_h2" != no ; then
9078 cf_cv_ncurses_h2=$cf_incdir/$cf_header
9079 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
9082 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
9084 CPPFLAGS="$cf_save2_CPPFLAGS"
9085 test "$cf_cv_ncurses_h2" != no && break
9087 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9087: error: not found" >&5
9088 echo "$as_me: error: not found" >&2;}
9089 { (exit 1); exit 1; }; }
9092 echo "$as_me:9092: result: $cf_cv_ncurses_h2" >&5
9093 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
9095 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
9096 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
9097 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
9098 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
9101 if test -n "$cf_1st_incdir" ; then
9102 for cf_add_incdir in $cf_1st_incdir
9104 while test "$cf_add_incdir" != /usr/include
9106 if test -d "$cf_add_incdir"
9109 if test -n "$CFLAGS$CPPFLAGS" ; then
9110 # a loop is needed to ensure we can add subdirs of existing dirs
9111 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9112 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9113 cf_have_incdir=yes; break
9118 if test "$cf_have_incdir" = no ; then
9119 if test "$cf_add_incdir" = /usr/local/include ; then
9120 if test "$GCC" = yes
9122 cf_save_CPPFLAGS=$CPPFLAGS
9124 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9125 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9127 cat >"conftest.$ac_ext" <<_ACEOF
9128 #line 9128 "configure"
9129 #include "confdefs.h"
9139 rm -f "conftest.$ac_objext"
9140 if { (eval echo "$as_me:9140: \"$ac_compile\"") >&5
9141 (eval $ac_compile) 2>&5
9143 echo "$as_me:9143: \$? = $ac_status" >&5
9144 (exit "$ac_status"); } &&
9145 { ac_try='test -s "conftest.$ac_objext"'
9146 { (eval echo "$as_me:9146: \"$ac_try\"") >&5
9149 echo "$as_me:9149: \$? = $ac_status" >&5
9150 (exit "$ac_status"); }; }; then
9153 echo "$as_me: failed program was:" >&5
9154 cat "conftest.$ac_ext" >&5
9157 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9158 CPPFLAGS=$cf_save_CPPFLAGS
9163 if test "$cf_have_incdir" = no ; then
9164 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9166 echo "${as_me:-configure}:9166: testing adding $cf_add_incdir to include-path ..." 1>&5
9168 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9170 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9171 test "$cf_top_incdir" = "$cf_add_incdir" && break
9172 cf_add_incdir="$cf_top_incdir"
9185 # Set definitions to allow ifdef'ing for ncurses.h
9187 case "$cf_cv_ncurses_header" in
9190 cat >>confdefs.h <<\EOF
9191 #define HAVE_NCURSES_H 1
9197 case "$cf_cv_ncurses_header" in
9198 (ncurses/curses.h|ncurses/ncurses.h)
9200 cat >>confdefs.h <<\EOF
9201 #define HAVE_NCURSES_NCURSES_H 1
9205 (ncursesw/curses.h|ncursesw/ncurses.h)
9207 cat >>confdefs.h <<\EOF
9208 #define HAVE_NCURSESW_NCURSES_H 1
9214 echo "$as_me:9214: checking for terminfo header" >&5
9215 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9216 if test "${cf_cv_term_header+set}" = set; then
9217 echo $ECHO_N "(cached) $ECHO_C" >&6
9220 case "${cf_cv_ncurses_header}" in
9221 (*/ncurses.h|*/ncursesw.h)
9222 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9225 cf_term_header=term.h
9229 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9231 cat >"conftest.$ac_ext" <<_ACEOF
9232 #line 9232 "configure"
9233 #include "confdefs.h"
9235 #include <${cf_cv_ncurses_header:-curses.h}>
9241 int x = auto_left_margin; (void)x
9246 rm -f "conftest.$ac_objext"
9247 if { (eval echo "$as_me:9247: \"$ac_compile\"") >&5
9248 (eval $ac_compile) 2>&5
9250 echo "$as_me:9250: \$? = $ac_status" >&5
9251 (exit "$ac_status"); } &&
9252 { ac_try='test -s "conftest.$ac_objext"'
9253 { (eval echo "$as_me:9253: \"$ac_try\"") >&5
9256 echo "$as_me:9256: \$? = $ac_status" >&5
9257 (exit "$ac_status"); }; }; then
9259 cf_cv_term_header="$cf_test"
9261 echo "$as_me: failed program was:" >&5
9262 cat "conftest.$ac_ext" >&5
9264 cf_cv_term_header=unknown
9267 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9268 test "$cf_cv_term_header" != unknown && break
9272 echo "$as_me:9272: result: $cf_cv_term_header" >&5
9273 echo "${ECHO_T}$cf_cv_term_header" >&6
9275 # Set definitions to allow ifdef'ing to accommodate subdirectories
9277 case "$cf_cv_term_header" in
9280 cat >>confdefs.h <<\EOF
9281 #define HAVE_TERM_H 1
9287 case "$cf_cv_term_header" in
9290 cat >>confdefs.h <<\EOF
9291 #define HAVE_NCURSES_TERM_H 1
9297 cat >>confdefs.h <<\EOF
9298 #define HAVE_NCURSESW_TERM_H 1
9304 # some applications need this, but should check for NCURSES_VERSION
9306 cat >>confdefs.h <<\EOF
9310 echo "$as_me:9310: checking for ncurses version" >&5
9311 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9312 if test "${cf_cv_ncurses_version+set}" = set; then
9313 echo $ECHO_N "(cached) $ECHO_C" >&6
9316 cf_cv_ncurses_version=no
9318 rm -f "$cf_tempfile"
9319 if test "$cross_compiling" = yes; then
9321 # This will not work if the preprocessor splits the line after the
9322 # Autoconf token. The 'unproto' program does that.
9323 cat > "conftest.$ac_ext" <<EOF
9324 #include <${cf_cv_ncurses_header:-curses.h}>
9326 #ifdef NCURSES_VERSION
9327 Autoconf NCURSES_VERSION
9335 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9336 { (eval echo "$as_me:9336: \"$cf_try\"") >&5
9339 echo "$as_me:9339: \$? = $ac_status" >&5
9340 (exit "$ac_status"); }
9341 if test -f conftest.out ; then
9342 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
9343 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9348 cat >"conftest.$ac_ext" <<_ACEOF
9349 #line 9349 "configure"
9350 #include "confdefs.h"
9352 #include <${cf_cv_ncurses_header:-curses.h}>
9356 FILE *fp = fopen("$cf_tempfile", "w");
9357 #ifdef NCURSES_VERSION
9358 # ifdef NCURSES_VERSION_PATCH
9359 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9361 fprintf(fp, "%s\\n", NCURSES_VERSION);
9365 fprintf(fp, "old\\n");
9370 ${cf_cv_main_return:-return}(0);
9373 rm -f "conftest$ac_exeext"
9374 if { (eval echo "$as_me:9374: \"$ac_link\"") >&5
9375 (eval $ac_link) 2>&5
9377 echo "$as_me:9377: \$? = $ac_status" >&5
9378 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9379 { (eval echo "$as_me:9379: \"$ac_try\"") >&5
9382 echo "$as_me:9382: \$? = $ac_status" >&5
9383 (exit "$ac_status"); }; }; then
9385 cf_cv_ncurses_version=`cat $cf_tempfile`
9387 echo "$as_me: program exited with status $ac_status" >&5
9388 echo "$as_me: failed program was:" >&5
9389 cat "conftest.$ac_ext" >&5
9391 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9393 rm -f "$cf_tempfile"
9396 echo "$as_me:9396: result: $cf_cv_ncurses_version" >&5
9397 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9398 test "$cf_cv_ncurses_version" = no ||
9399 cat >>confdefs.h <<\EOF
9403 cf_nculib_root=$cf_cv_screen
9404 # This works, except for the special case where we find gpm, but
9405 # ncurses is in a nonstandard location via $LIBS, and we really want
9408 cf_ncurses_SAVE="$LIBS"
9409 echo "$as_me:9409: checking for Gpm_Open in -lgpm" >&5
9410 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9411 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9412 echo $ECHO_N "(cached) $ECHO_C" >&6
9414 ac_check_lib_save_LIBS=$LIBS
9416 cat >"conftest.$ac_ext" <<_ACEOF
9417 #line 9417 "configure"
9418 #include "confdefs.h"
9420 /* Override any gcc2 internal prototype to avoid an error. */
9424 /* We use char because int might match the return type of a gcc2
9425 builtin and then its argument prototype would still apply. */
9435 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9436 if { (eval echo "$as_me:9436: \"$ac_link\"") >&5
9437 (eval $ac_link) 2>&5
9439 echo "$as_me:9439: \$? = $ac_status" >&5
9440 (exit "$ac_status"); } &&
9441 { ac_try='test -s "conftest$ac_exeext"'
9442 { (eval echo "$as_me:9442: \"$ac_try\"") >&5
9445 echo "$as_me:9445: \$? = $ac_status" >&5
9446 (exit "$ac_status"); }; }; then
9447 ac_cv_lib_gpm_Gpm_Open=yes
9449 echo "$as_me: failed program was:" >&5
9450 cat "conftest.$ac_ext" >&5
9451 ac_cv_lib_gpm_Gpm_Open=no
9453 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9454 LIBS=$ac_check_lib_save_LIBS
9456 echo "$as_me:9456: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9457 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9458 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
9459 echo "$as_me:9459: checking for initscr in -lgpm" >&5
9460 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9461 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9462 echo $ECHO_N "(cached) $ECHO_C" >&6
9464 ac_check_lib_save_LIBS=$LIBS
9466 cat >"conftest.$ac_ext" <<_ACEOF
9467 #line 9467 "configure"
9468 #include "confdefs.h"
9470 /* Override any gcc2 internal prototype to avoid an error. */
9474 /* We use char because int might match the return type of a gcc2
9475 builtin and then its argument prototype would still apply. */
9485 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9486 if { (eval echo "$as_me:9486: \"$ac_link\"") >&5
9487 (eval $ac_link) 2>&5
9489 echo "$as_me:9489: \$? = $ac_status" >&5
9490 (exit "$ac_status"); } &&
9491 { ac_try='test -s "conftest$ac_exeext"'
9492 { (eval echo "$as_me:9492: \"$ac_try\"") >&5
9495 echo "$as_me:9495: \$? = $ac_status" >&5
9496 (exit "$ac_status"); }; }; then
9497 ac_cv_lib_gpm_initscr=yes
9499 echo "$as_me: failed program was:" >&5
9500 cat "conftest.$ac_ext" >&5
9501 ac_cv_lib_gpm_initscr=no
9503 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9504 LIBS=$ac_check_lib_save_LIBS
9506 echo "$as_me:9506: result: $ac_cv_lib_gpm_initscr" >&5
9507 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9508 if test "$ac_cv_lib_gpm_initscr" = yes; then
9509 LIBS="$cf_ncurses_SAVE"
9511 cf_ncurses_LIBS="-lgpm"
9518 # This is only necessary if you are linking against an obsolete
9519 # version of ncurses (but it should do no harm, since it's static).
9520 if test "$cf_nculib_root" = ncurses ; then
9521 echo "$as_me:9521: checking for tgoto in -lmytinfo" >&5
9522 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9523 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9524 echo $ECHO_N "(cached) $ECHO_C" >&6
9526 ac_check_lib_save_LIBS=$LIBS
9527 LIBS="-lmytinfo $LIBS"
9528 cat >"conftest.$ac_ext" <<_ACEOF
9529 #line 9529 "configure"
9530 #include "confdefs.h"
9532 /* Override any gcc2 internal prototype to avoid an error. */
9536 /* We use char because int might match the return type of a gcc2
9537 builtin and then its argument prototype would still apply. */
9547 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9548 if { (eval echo "$as_me:9548: \"$ac_link\"") >&5
9549 (eval $ac_link) 2>&5
9551 echo "$as_me:9551: \$? = $ac_status" >&5
9552 (exit "$ac_status"); } &&
9553 { ac_try='test -s "conftest$ac_exeext"'
9554 { (eval echo "$as_me:9554: \"$ac_try\"") >&5
9557 echo "$as_me:9557: \$? = $ac_status" >&5
9558 (exit "$ac_status"); }; }; then
9559 ac_cv_lib_mytinfo_tgoto=yes
9561 echo "$as_me: failed program was:" >&5
9562 cat "conftest.$ac_ext" >&5
9563 ac_cv_lib_mytinfo_tgoto=no
9565 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9566 LIBS=$ac_check_lib_save_LIBS
9568 echo "$as_me:9568: result: $ac_cv_lib_mytinfo_tgoto" >&5
9569 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9570 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
9571 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9581 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9583 for cf_add_1lib in $cf_add_0lib; do
9584 for cf_add_2lib in $cf_add_libs; do
9585 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9590 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9594 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
9600 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9602 for cf_add_1lib in $cf_add_0lib; do
9603 for cf_add_2lib in $cf_add_libs; do
9604 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9609 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9615 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
9617 echo "$as_me:9617: checking for initscr" >&5
9618 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9619 if test "${ac_cv_func_initscr+set}" = set; then
9620 echo $ECHO_N "(cached) $ECHO_C" >&6
9622 cat >"conftest.$ac_ext" <<_ACEOF
9623 #line 9623 "configure"
9624 #include "confdefs.h"
9625 #define initscr autoconf_temporary
9626 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9633 /* We use char because int might match the return type of a gcc2
9634 builtin and then its argument prototype would still apply. */
9635 char initscr (void);
9641 /* The GNU C library defines stubs for functions which it implements
9642 to always fail with ENOSYS. Some functions are actually named
9643 something starting with __ and the normal name is an alias. */
9644 #if defined (__stub_initscr) || defined (__stub___initscr)
9645 #error found stub for initscr
9653 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9654 if { (eval echo "$as_me:9654: \"$ac_link\"") >&5
9655 (eval $ac_link) 2>&5
9657 echo "$as_me:9657: \$? = $ac_status" >&5
9658 (exit "$ac_status"); } &&
9659 { ac_try='test -s "conftest$ac_exeext"'
9660 { (eval echo "$as_me:9660: \"$ac_try\"") >&5
9663 echo "$as_me:9663: \$? = $ac_status" >&5
9664 (exit "$ac_status"); }; }; then
9665 ac_cv_func_initscr=yes
9667 echo "$as_me: failed program was:" >&5
9668 cat "conftest.$ac_ext" >&5
9669 ac_cv_func_initscr=no
9671 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9673 echo "$as_me:9673: result: $ac_cv_func_initscr" >&5
9674 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9675 if test "$ac_cv_func_initscr" = yes; then
9676 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9679 cf_save_LIBS="$LIBS"
9680 echo "$as_me:9680: checking for initscr in -l$cf_nculib_root" >&5
9681 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9682 LIBS="-l$cf_nculib_root $LIBS"
9683 cat >"conftest.$ac_ext" <<_ACEOF
9684 #line 9684 "configure"
9685 #include "confdefs.h"
9686 #include <${cf_cv_ncurses_header:-curses.h}>
9695 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9696 if { (eval echo "$as_me:9696: \"$ac_link\"") >&5
9697 (eval $ac_link) 2>&5
9699 echo "$as_me:9699: \$? = $ac_status" >&5
9700 (exit "$ac_status"); } &&
9701 { ac_try='test -s "conftest$ac_exeext"'
9702 { (eval echo "$as_me:9702: \"$ac_try\"") >&5
9705 echo "$as_me:9705: \$? = $ac_status" >&5
9706 (exit "$ac_status"); }; }; then
9707 echo "$as_me:9707: result: yes" >&5
9708 echo "${ECHO_T}yes" >&6
9709 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9712 echo "$as_me: failed program was:" >&5
9713 cat "conftest.$ac_ext" >&5
9714 echo "$as_me:9714: result: no" >&5
9715 echo "${ECHO_T}no" >&6
9718 cf_library_path_list=""
9719 if test -n "${LDFLAGS}${LIBS}" ; then
9720 for cf_library_path in $LDFLAGS $LIBS
9722 case "$cf_library_path" in
9724 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9726 test "x$cf_library_path" != "xNONE" && \
9727 test -d "$cf_library_path" && \
9729 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9730 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
9731 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9732 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9733 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9734 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"
9737 cf_library_path_list="$cf_library_path_list $cf_search"
9745 test "x$prefix" != "xNONE" && \
9746 test -d "$prefix" && \
9748 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9749 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
9750 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9751 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9752 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9753 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9756 for cf_subdir_prefix in \
9765 test "x$cf_subdir_prefix" != "x$prefix" && \
9766 test -d "$cf_subdir_prefix" && \
9767 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9768 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9769 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
9770 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9771 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9772 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9773 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"
9778 cf_search="$cf_library_path_list $cf_search"
9780 for cf_libdir in $cf_search
9782 echo "$as_me:9782: checking for -l$cf_nculib_root in $cf_libdir" >&5
9783 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9784 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9785 cat >"conftest.$ac_ext" <<_ACEOF
9786 #line 9786 "configure"
9787 #include "confdefs.h"
9788 #include <${cf_cv_ncurses_header:-curses.h}>
9797 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9798 if { (eval echo "$as_me:9798: \"$ac_link\"") >&5
9799 (eval $ac_link) 2>&5
9801 echo "$as_me:9801: \$? = $ac_status" >&5
9802 (exit "$ac_status"); } &&
9803 { ac_try='test -s "conftest$ac_exeext"'
9804 { (eval echo "$as_me:9804: \"$ac_try\"") >&5
9807 echo "$as_me:9807: \$? = $ac_status" >&5
9808 (exit "$ac_status"); }; }; then
9809 echo "$as_me:9809: result: yes" >&5
9810 echo "${ECHO_T}yes" >&6
9811 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9814 echo "$as_me: failed program was:" >&5
9815 cat "conftest.$ac_ext" >&5
9816 echo "$as_me:9816: result: no" >&5
9817 echo "${ECHO_T}no" >&6
9818 LIBS="$cf_save_LIBS"
9820 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9824 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9828 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
9830 if test "$cf_found_library" = no ; then
9831 { { echo "$as_me:9831: error: Cannot link $cf_nculib_root library" >&5
9832 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9833 { (exit 1); exit 1; }; }
9838 if test -n "$cf_ncurses_LIBS" ; then
9839 echo "$as_me:9839: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9840 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9841 cf_ncurses_SAVE="$LIBS"
9842 for p in $cf_ncurses_LIBS ; do
9843 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
9844 if test "$q" != "$LIBS" ; then
9848 cat >"conftest.$ac_ext" <<_ACEOF
9849 #line 9849 "configure"
9850 #include "confdefs.h"
9851 #include <${cf_cv_ncurses_header:-curses.h}>
9855 initscr(); mousemask(0,0); tigetstr((char *)0);
9860 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9861 if { (eval echo "$as_me:9861: \"$ac_link\"") >&5
9862 (eval $ac_link) 2>&5
9864 echo "$as_me:9864: \$? = $ac_status" >&5
9865 (exit "$ac_status"); } &&
9866 { ac_try='test -s "conftest$ac_exeext"'
9867 { (eval echo "$as_me:9867: \"$ac_try\"") >&5
9870 echo "$as_me:9870: \$? = $ac_status" >&5
9871 (exit "$ac_status"); }; }; then
9872 echo "$as_me:9872: result: yes" >&5
9873 echo "${ECHO_T}yes" >&6
9875 echo "$as_me: failed program was:" >&5
9876 cat "conftest.$ac_ext" >&5
9877 echo "$as_me:9877: result: no" >&5
9878 echo "${ECHO_T}no" >&6
9879 LIBS="$cf_ncurses_SAVE"
9881 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9884 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9886 cat >>confdefs.h <<EOF
9887 #define $cf_nculib_ROOT 1
9898 cf_ncuconfig_root=$cf_cv_screen
9899 cf_have_ncuconfig=no
9901 if test "x${PKG_CONFIG:=none}" != xnone; then
9902 echo "$as_me:9902: checking pkg-config for $cf_ncuconfig_root" >&5
9903 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9904 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9905 echo "$as_me:9905: result: yes" >&5
9906 echo "${ECHO_T}yes" >&6
9908 echo "$as_me:9908: checking if the $cf_ncuconfig_root package files work" >&5
9909 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9910 cf_have_ncuconfig=unknown
9912 cf_save_CFLAGS="$CFLAGS"
9913 cf_save_CPPFLAGS="$CPPFLAGS"
9914 cf_save_LIBS="$LIBS"
9916 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
9917 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9919 # while -W for passing linker flags is prevalent, it is not "standard".
9920 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9921 # incompatible _and_ non-standard -W option which gives an error. Work
9922 # around that pitfall.
9923 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9929 cf_new_extra_cppflags=
9931 for cf_add_cflags in $cf_pkg_cflags
9933 case "$cf_fix_cppflags" in
9935 case "$cf_add_cflags" in
9936 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9937 case "$cf_add_cflags" in
9939 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9941 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9942 && test -z "${cf_tst_cflags}" \
9943 && cf_fix_cppflags=yes
9945 if test "$cf_fix_cppflags" = yes ; then
9947 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9948 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9951 elif test "${cf_tst_cflags}" = "\"'" ; then
9953 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9954 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9964 case "$cf_add_cflags" in
9966 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9968 CPPFLAGS=`echo "$CPPFLAGS" | \
9969 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9970 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9975 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9976 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9983 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9984 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9991 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9992 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9994 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9996 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9997 && test -z "${cf_tst_cflags}" \
9998 && cf_fix_cppflags=no
10003 if test -n "$cf_new_cflags" ; then
10005 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10006 CFLAGS="${CFLAGS}$cf_new_cflags"
10010 if test -n "$cf_new_cppflags" ; then
10012 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10013 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10017 if test -n "$cf_new_extra_cppflags" ; then
10019 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10020 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10024 cf_add_libs="$LIBS"
10027 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10028 # filter duplicates
10029 for cf_add_1lib in $cf_add_0lib; do
10030 for cf_add_2lib in $cf_add_libs; do
10031 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10036 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10038 LIBS="$cf_add_libs"
10040 cat >"conftest.$ac_ext" <<_ACEOF
10041 #line 10041 "configure"
10042 #include "confdefs.h"
10043 #include <${cf_cv_ncurses_header:-curses.h}>
10047 initscr(); mousemask(0,0); tigetstr((char *)0);
10052 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10053 if { (eval echo "$as_me:10053: \"$ac_link\"") >&5
10054 (eval $ac_link) 2>&5
10056 echo "$as_me:10056: \$? = $ac_status" >&5
10057 (exit "$ac_status"); } &&
10058 { ac_try='test -s "conftest$ac_exeext"'
10059 { (eval echo "$as_me:10059: \"$ac_try\"") >&5
10060 (eval $ac_try) 2>&5
10062 echo "$as_me:10062: \$? = $ac_status" >&5
10063 (exit "$ac_status"); }; }; then
10064 if test "$cross_compiling" = yes; then
10065 cf_test_ncuconfig=maybe
10067 cat >"conftest.$ac_ext" <<_ACEOF
10068 #line 10068 "configure"
10069 #include "confdefs.h"
10070 #include <${cf_cv_ncurses_header:-curses.h}>
10072 { char *xx = curses_version(); return (xx == 0); }
10074 rm -f "conftest$ac_exeext"
10075 if { (eval echo "$as_me:10075: \"$ac_link\"") >&5
10076 (eval $ac_link) 2>&5
10078 echo "$as_me:10078: \$? = $ac_status" >&5
10079 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10080 { (eval echo "$as_me:10080: \"$ac_try\"") >&5
10081 (eval $ac_try) 2>&5
10083 echo "$as_me:10083: \$? = $ac_status" >&5
10084 (exit "$ac_status"); }; }; then
10085 cf_test_ncuconfig=yes
10087 echo "$as_me: program exited with status $ac_status" >&5
10088 echo "$as_me: failed program was:" >&5
10089 cat "conftest.$ac_ext" >&5
10090 cf_test_ncuconfig=no
10092 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10095 echo "$as_me: failed program was:" >&5
10096 cat "conftest.$ac_ext" >&5
10097 cf_test_ncuconfig=no
10099 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10101 CFLAGS="$cf_save_CFLAGS"
10102 CPPFLAGS="$cf_save_CPPFLAGS"
10103 LIBS="$cf_save_LIBS"
10105 if test "x$cf_test_ncuconfig" != xyes; then
10106 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
10107 cf_pkg_cflags="$cf_temp"
10108 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
10109 cf_pkg_libs="$cf_temp"
10117 cf_new_extra_cppflags=
10119 for cf_add_cflags in $cf_pkg_cflags
10121 case "$cf_fix_cppflags" in
10123 case "$cf_add_cflags" in
10124 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10125 case "$cf_add_cflags" in
10127 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10129 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10130 && test -z "${cf_tst_cflags}" \
10131 && cf_fix_cppflags=yes
10133 if test "$cf_fix_cppflags" = yes ; then
10135 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10136 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10139 elif test "${cf_tst_cflags}" = "\"'" ; then
10141 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10142 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10148 case "$CPPFLAGS" in
10152 case "$cf_add_cflags" in
10154 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10156 CPPFLAGS=`echo "$CPPFLAGS" | \
10157 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10158 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10163 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10164 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10171 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10172 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10179 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10180 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10182 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10184 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10185 && test -z "${cf_tst_cflags}" \
10186 && cf_fix_cppflags=no
10191 if test -n "$cf_new_cflags" ; then
10193 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10194 CFLAGS="${CFLAGS}$cf_new_cflags"
10198 if test -n "$cf_new_cppflags" ; then
10200 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10201 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10205 if test -n "$cf_new_extra_cppflags" ; then
10207 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10208 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10212 cf_add_libs="$LIBS"
10215 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10216 # filter duplicates
10217 for cf_add_1lib in $cf_add_0lib; do
10218 for cf_add_2lib in $cf_add_libs; do
10219 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10224 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10226 LIBS="$cf_add_libs"
10228 cat >"conftest.$ac_ext" <<_ACEOF
10229 #line 10229 "configure"
10230 #include "confdefs.h"
10231 #include <${cf_cv_ncurses_header:-curses.h}>
10235 initscr(); mousemask(0,0); tigetstr((char *)0);
10240 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10241 if { (eval echo "$as_me:10241: \"$ac_link\"") >&5
10242 (eval $ac_link) 2>&5
10244 echo "$as_me:10244: \$? = $ac_status" >&5
10245 (exit "$ac_status"); } &&
10246 { ac_try='test -s "conftest$ac_exeext"'
10247 { (eval echo "$as_me:10247: \"$ac_try\"") >&5
10248 (eval $ac_try) 2>&5
10250 echo "$as_me:10250: \$? = $ac_status" >&5
10251 (exit "$ac_status"); }; }; then
10252 if test "$cross_compiling" = yes; then
10253 cf_have_ncuconfig=maybe
10255 cat >"conftest.$ac_ext" <<_ACEOF
10256 #line 10256 "configure"
10257 #include "confdefs.h"
10258 #include <${cf_cv_ncurses_header:-curses.h}>
10260 { char *xx = curses_version(); return (xx == 0); }
10262 rm -f "conftest$ac_exeext"
10263 if { (eval echo "$as_me:10263: \"$ac_link\"") >&5
10264 (eval $ac_link) 2>&5
10266 echo "$as_me:10266: \$? = $ac_status" >&5
10267 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10268 { (eval echo "$as_me:10268: \"$ac_try\"") >&5
10269 (eval $ac_try) 2>&5
10271 echo "$as_me:10271: \$? = $ac_status" >&5
10272 (exit "$ac_status"); }; }; then
10273 cf_have_ncuconfig=yes
10275 echo "$as_me: program exited with status $ac_status" >&5
10276 echo "$as_me: failed program was:" >&5
10277 cat "conftest.$ac_ext" >&5
10278 cf_have_ncuconfig=no
10280 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10283 echo "$as_me: failed program was:" >&5
10284 cat "conftest.$ac_ext" >&5
10285 cf_have_ncuconfig=no
10287 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10288 echo "$as_me:10288: result: $cf_have_ncuconfig" >&5
10289 echo "${ECHO_T}$cf_have_ncuconfig" >&6
10290 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
10291 if test "$cf_have_ncuconfig" != "yes"
10293 CPPFLAGS="$cf_save_CPPFLAGS"
10294 LIBS="$cf_save_LIBS"
10295 NCURSES_CONFIG_PKG=none
10298 cat >>confdefs.h <<\EOF
10302 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
10304 echo "$as_me:10304: checking for terminfo header" >&5
10305 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10306 if test "${cf_cv_term_header+set}" = set; then
10307 echo $ECHO_N "(cached) $ECHO_C" >&6
10310 case "${cf_cv_ncurses_header}" in
10311 (*/ncurses.h|*/ncursesw.h)
10312 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10315 cf_term_header=term.h
10319 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10321 cat >"conftest.$ac_ext" <<_ACEOF
10322 #line 10322 "configure"
10323 #include "confdefs.h"
10325 #include <${cf_cv_ncurses_header:-curses.h}>
10326 #include <$cf_test>
10331 int x = auto_left_margin; (void)x
10336 rm -f "conftest.$ac_objext"
10337 if { (eval echo "$as_me:10337: \"$ac_compile\"") >&5
10338 (eval $ac_compile) 2>&5
10340 echo "$as_me:10340: \$? = $ac_status" >&5
10341 (exit "$ac_status"); } &&
10342 { ac_try='test -s "conftest.$ac_objext"'
10343 { (eval echo "$as_me:10343: \"$ac_try\"") >&5
10344 (eval $ac_try) 2>&5
10346 echo "$as_me:10346: \$? = $ac_status" >&5
10347 (exit "$ac_status"); }; }; then
10349 cf_cv_term_header="$cf_test"
10351 echo "$as_me: failed program was:" >&5
10352 cat "conftest.$ac_ext" >&5
10354 cf_cv_term_header=unknown
10357 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10358 test "$cf_cv_term_header" != unknown && break
10362 echo "$as_me:10362: result: $cf_cv_term_header" >&5
10363 echo "${ECHO_T}$cf_cv_term_header" >&6
10365 # Set definitions to allow ifdef'ing to accommodate subdirectories
10367 case "$cf_cv_term_header" in
10370 cat >>confdefs.h <<\EOF
10371 #define HAVE_TERM_H 1
10377 case "$cf_cv_term_header" in
10380 cat >>confdefs.h <<\EOF
10381 #define HAVE_NCURSES_TERM_H 1
10387 cat >>confdefs.h <<\EOF
10388 #define HAVE_NCURSESW_TERM_H 1
10397 echo "$as_me:10397: result: no" >&5
10398 echo "${ECHO_T}no" >&6
10399 NCURSES_CONFIG_PKG=none
10402 NCURSES_CONFIG_PKG=none
10405 if test "x$cf_have_ncuconfig" = "xno"; then
10406 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
10408 if test -n "$ac_tool_prefix"; then
10409 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10411 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
10412 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
10413 echo "$as_me:10413: checking for $ac_word" >&5
10414 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10415 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
10416 echo $ECHO_N "(cached) $ECHO_C" >&6
10418 if test -n "$NCURSES_CONFIG"; then
10419 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
10421 ac_save_IFS=$IFS; IFS=$ac_path_separator
10423 for ac_dir in $ac_dummy; do
10425 test -z "$ac_dir" && ac_dir=.
10426 $as_executable_p "$ac_dir/$ac_word" || continue
10427 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
10428 echo "$as_me:10428: found $ac_dir/$ac_word" >&5
10434 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
10435 if test -n "$NCURSES_CONFIG"; then
10436 echo "$as_me:10436: result: $NCURSES_CONFIG" >&5
10437 echo "${ECHO_T}$NCURSES_CONFIG" >&6
10439 echo "$as_me:10439: result: no" >&5
10440 echo "${ECHO_T}no" >&6
10443 test -n "$NCURSES_CONFIG" && break
10446 if test -z "$NCURSES_CONFIG"; then
10447 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
10448 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10450 # Extract the first word of "$ac_prog", so it can be a program name with args.
10451 set dummy $ac_prog; ac_word=$2
10452 echo "$as_me:10452: checking for $ac_word" >&5
10453 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10454 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
10455 echo $ECHO_N "(cached) $ECHO_C" >&6
10457 if test -n "$ac_ct_NCURSES_CONFIG"; then
10458 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
10460 ac_save_IFS=$IFS; IFS=$ac_path_separator
10462 for ac_dir in $ac_dummy; do
10464 test -z "$ac_dir" && ac_dir=.
10465 $as_executable_p "$ac_dir/$ac_word" || continue
10466 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
10467 echo "$as_me:10467: found $ac_dir/$ac_word" >&5
10473 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
10474 if test -n "$ac_ct_NCURSES_CONFIG"; then
10475 echo "$as_me:10475: result: $ac_ct_NCURSES_CONFIG" >&5
10476 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
10478 echo "$as_me:10478: result: no" >&5
10479 echo "${ECHO_T}no" >&6
10482 test -n "$ac_ct_NCURSES_CONFIG" && break
10484 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
10486 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
10489 if test "$NCURSES_CONFIG" != none ; then
10494 cf_new_extra_cppflags=
10496 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
10498 case "$cf_fix_cppflags" in
10500 case "$cf_add_cflags" in
10501 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10502 case "$cf_add_cflags" in
10504 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10506 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10507 && test -z "${cf_tst_cflags}" \
10508 && cf_fix_cppflags=yes
10510 if test "$cf_fix_cppflags" = yes ; then
10512 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10513 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10516 elif test "${cf_tst_cflags}" = "\"'" ; then
10518 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10519 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10525 case "$CPPFLAGS" in
10529 case "$cf_add_cflags" in
10531 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10533 CPPFLAGS=`echo "$CPPFLAGS" | \
10534 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10535 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10540 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10541 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10548 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10549 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10556 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10557 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10559 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10561 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10562 && test -z "${cf_tst_cflags}" \
10563 && cf_fix_cppflags=no
10568 if test -n "$cf_new_cflags" ; then
10570 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10571 CFLAGS="${CFLAGS}$cf_new_cflags"
10575 if test -n "$cf_new_cppflags" ; then
10577 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10578 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10582 if test -n "$cf_new_extra_cppflags" ; then
10584 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10585 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10589 cf_add_libs="$LIBS"
10592 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10593 # filter duplicates
10594 for cf_add_1lib in $cf_add_0lib; do
10595 for cf_add_2lib in $cf_add_libs; do
10596 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10601 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10603 LIBS="$cf_add_libs"
10605 # even with config script, some packages use no-override for curses.h
10607 echo "$as_me:10607: checking if we have identified curses headers" >&5
10608 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10609 if test "${cf_cv_ncurses_header+set}" = set; then
10610 echo $ECHO_N "(cached) $ECHO_C" >&6
10613 cf_cv_ncurses_header=none
10615 ncurses.h $cf_cv_screen/ncurses.h \
10616 curses.h $cf_cv_screen/curses.h
10618 cat >"conftest.$ac_ext" <<_ACEOF
10619 #line 10619 "configure"
10620 #include "confdefs.h"
10621 #include <${cf_header}>
10625 initscr(); tgoto("?", 0,0)
10630 rm -f "conftest.$ac_objext"
10631 if { (eval echo "$as_me:10631: \"$ac_compile\"") >&5
10632 (eval $ac_compile) 2>&5
10634 echo "$as_me:10634: \$? = $ac_status" >&5
10635 (exit "$ac_status"); } &&
10636 { ac_try='test -s "conftest.$ac_objext"'
10637 { (eval echo "$as_me:10637: \"$ac_try\"") >&5
10638 (eval $ac_try) 2>&5
10640 echo "$as_me:10640: \$? = $ac_status" >&5
10641 (exit "$ac_status"); }; }; then
10642 cf_cv_ncurses_header=$cf_header; break
10644 echo "$as_me: failed program was:" >&5
10645 cat "conftest.$ac_ext" >&5
10647 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10651 echo "$as_me:10651: result: $cf_cv_ncurses_header" >&5
10652 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10654 if test "$cf_cv_ncurses_header" = none ; then
10655 { { echo "$as_me:10655: error: No curses header-files found" >&5
10656 echo "$as_me: error: No curses header-files found" >&2;}
10657 { (exit 1); exit 1; }; }
10660 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10662 for ac_header in $cf_cv_ncurses_header
10664 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10665 echo "$as_me:10665: checking for $ac_header" >&5
10666 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10667 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10668 echo $ECHO_N "(cached) $ECHO_C" >&6
10670 cat >"conftest.$ac_ext" <<_ACEOF
10671 #line 10671 "configure"
10672 #include "confdefs.h"
10673 #include <$ac_header>
10675 if { (eval echo "$as_me:10675: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10676 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10678 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10680 cat conftest.err >&5
10681 echo "$as_me:10681: \$? = $ac_status" >&5
10682 (exit "$ac_status"); } >/dev/null; then
10683 if test -s conftest.err; then
10684 ac_cpp_err=$ac_c_preproc_warn_flag
10691 if test -z "$ac_cpp_err"; then
10692 eval "$as_ac_Header=yes"
10694 echo "$as_me: failed program was:" >&5
10695 cat "conftest.$ac_ext" >&5
10696 eval "$as_ac_Header=no"
10698 rm -f conftest.err "conftest.$ac_ext"
10700 echo "$as_me:10700: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10701 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10702 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10703 cat >>confdefs.h <<EOF
10704 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10710 cat >>confdefs.h <<\EOF
10714 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10716 cat >>confdefs.h <<EOF
10717 #define $cf_nculib_ROOT 1
10720 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
10724 cf_ncuhdr_root=$cf_cv_screen
10726 test -n "$cf_cv_curses_dir" && \
10727 test "$cf_cv_curses_dir" != "no" && { \
10729 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
10730 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
10732 while test "$cf_add_incdir" != /usr/include
10734 if test -d "$cf_add_incdir"
10737 if test -n "$CFLAGS$CPPFLAGS" ; then
10738 # a loop is needed to ensure we can add subdirs of existing dirs
10739 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10740 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10741 cf_have_incdir=yes; break
10746 if test "$cf_have_incdir" = no ; then
10747 if test "$cf_add_incdir" = /usr/local/include ; then
10748 if test "$GCC" = yes
10750 cf_save_CPPFLAGS=$CPPFLAGS
10752 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10753 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10755 cat >"conftest.$ac_ext" <<_ACEOF
10756 #line 10756 "configure"
10757 #include "confdefs.h"
10767 rm -f "conftest.$ac_objext"
10768 if { (eval echo "$as_me:10768: \"$ac_compile\"") >&5
10769 (eval $ac_compile) 2>&5
10771 echo "$as_me:10771: \$? = $ac_status" >&5
10772 (exit "$ac_status"); } &&
10773 { ac_try='test -s "conftest.$ac_objext"'
10774 { (eval echo "$as_me:10774: \"$ac_try\"") >&5
10775 (eval $ac_try) 2>&5
10777 echo "$as_me:10777: \$? = $ac_status" >&5
10778 (exit "$ac_status"); }; }; then
10781 echo "$as_me: failed program was:" >&5
10782 cat "conftest.$ac_ext" >&5
10785 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10786 CPPFLAGS=$cf_save_CPPFLAGS
10791 if test "$cf_have_incdir" = no ; then
10792 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10794 echo "${as_me:-configure}:10794: testing adding $cf_add_incdir to include-path ..." 1>&5
10796 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10798 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10799 test "$cf_top_incdir" = "$cf_add_incdir" && break
10800 cf_add_incdir="$cf_top_incdir"
10813 echo "$as_me:10813: checking for $cf_ncuhdr_root header in include-path" >&5
10814 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10815 if test "${cf_cv_ncurses_h+set}" = set; then
10816 echo $ECHO_N "(cached) $ECHO_C" >&6
10819 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10820 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
10821 for cf_header in $cf_header_list
10824 cat >"conftest.$ac_ext" <<_ACEOF
10825 #line 10825 "configure"
10826 #include "confdefs.h"
10828 #include <$cf_header>
10833 #ifdef NCURSES_VERSION
10835 printf("%s\\n", NCURSES_VERSION);
10848 rm -f "conftest.$ac_objext"
10849 if { (eval echo "$as_me:10849: \"$ac_compile\"") >&5
10850 (eval $ac_compile) 2>&5
10852 echo "$as_me:10852: \$? = $ac_status" >&5
10853 (exit "$ac_status"); } &&
10854 { ac_try='test -s "conftest.$ac_objext"'
10855 { (eval echo "$as_me:10855: \"$ac_try\"") >&5
10856 (eval $ac_try) 2>&5
10858 echo "$as_me:10858: \$? = $ac_status" >&5
10859 (exit "$ac_status"); }; }; then
10860 cf_cv_ncurses_h=$cf_header
10863 echo "$as_me: failed program was:" >&5
10864 cat "conftest.$ac_ext" >&5
10867 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10869 test "$cf_cv_ncurses_h" != no && break
10873 echo "$as_me:10873: result: $cf_cv_ncurses_h" >&5
10874 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10876 if test "$cf_cv_ncurses_h" != no ; then
10877 cf_cv_ncurses_header=$cf_cv_ncurses_h
10880 echo "$as_me:10880: checking for $cf_ncuhdr_root include-path" >&5
10881 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10882 if test "${cf_cv_ncurses_h2+set}" = set; then
10883 echo $ECHO_N "(cached) $ECHO_C" >&6
10886 test -n "$verbose" && echo
10890 # collect the current set of include-directories from compiler flags
10891 cf_header_path_list=""
10892 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10893 for cf_header_path in $CPPFLAGS $CFLAGS
10895 case "$cf_header_path" in
10897 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10899 test "x$cf_header_path" != "xNONE" && \
10900 test -d "$cf_header_path" && \
10902 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10903 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
10904 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10905 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10906 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10907 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"
10910 cf_header_path_list="$cf_header_path_list $cf_search"
10916 # add the variations for the package we are looking for
10920 test "x$prefix" != "xNONE" && \
10921 test -d "$prefix" && \
10923 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10924 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
10925 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10926 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10927 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10928 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10931 for cf_subdir_prefix in \
10940 test "x$cf_subdir_prefix" != "x$prefix" && \
10941 test -d "$cf_subdir_prefix" && \
10942 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10943 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10944 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
10945 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10946 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10947 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10948 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"
10953 test "$includedir" != NONE && \
10954 test "$includedir" != "/usr/include" && \
10955 test -d "$includedir" && {
10956 test -d "$includedir" && cf_search="$cf_search $includedir"
10957 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10960 test "$oldincludedir" != NONE && \
10961 test "$oldincludedir" != "/usr/include" && \
10962 test -d "$oldincludedir" && {
10963 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
10964 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10967 cf_search="$cf_search $cf_header_path_list"
10969 test -n "$verbose" && echo "search path $cf_search"
10970 cf_save2_CPPFLAGS="$CPPFLAGS"
10971 for cf_incdir in $cf_search
10974 if test -n "$cf_incdir" ; then
10975 for cf_add_incdir in $cf_incdir
10977 while test "$cf_add_incdir" != /usr/include
10979 if test -d "$cf_add_incdir"
10982 if test -n "$CFLAGS$CPPFLAGS" ; then
10983 # a loop is needed to ensure we can add subdirs of existing dirs
10984 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10985 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10986 cf_have_incdir=yes; break
10991 if test "$cf_have_incdir" = no ; then
10992 if test "$cf_add_incdir" = /usr/local/include ; then
10993 if test "$GCC" = yes
10995 cf_save_CPPFLAGS=$CPPFLAGS
10997 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10998 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11000 cat >"conftest.$ac_ext" <<_ACEOF
11001 #line 11001 "configure"
11002 #include "confdefs.h"
11012 rm -f "conftest.$ac_objext"
11013 if { (eval echo "$as_me:11013: \"$ac_compile\"") >&5
11014 (eval $ac_compile) 2>&5
11016 echo "$as_me:11016: \$? = $ac_status" >&5
11017 (exit "$ac_status"); } &&
11018 { ac_try='test -s "conftest.$ac_objext"'
11019 { (eval echo "$as_me:11019: \"$ac_try\"") >&5
11020 (eval $ac_try) 2>&5
11022 echo "$as_me:11022: \$? = $ac_status" >&5
11023 (exit "$ac_status"); }; }; then
11026 echo "$as_me: failed program was:" >&5
11027 cat "conftest.$ac_ext" >&5
11030 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11031 CPPFLAGS=$cf_save_CPPFLAGS
11036 if test "$cf_have_incdir" = no ; then
11037 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11039 echo "${as_me:-configure}:11039: testing adding $cf_add_incdir to include-path ..." 1>&5
11041 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11043 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11044 test "$cf_top_incdir" = "$cf_add_incdir" && break
11045 cf_add_incdir="$cf_top_incdir"
11061 cat >"conftest.$ac_ext" <<_ACEOF
11062 #line 11062 "configure"
11063 #include "confdefs.h"
11065 #include <$cf_header>
11070 #ifdef NCURSES_VERSION
11072 printf("%s\\n", NCURSES_VERSION);
11085 rm -f "conftest.$ac_objext"
11086 if { (eval echo "$as_me:11086: \"$ac_compile\"") >&5
11087 (eval $ac_compile) 2>&5
11089 echo "$as_me:11089: \$? = $ac_status" >&5
11090 (exit "$ac_status"); } &&
11091 { ac_try='test -s "conftest.$ac_objext"'
11092 { (eval echo "$as_me:11092: \"$ac_try\"") >&5
11093 (eval $ac_try) 2>&5
11095 echo "$as_me:11095: \$? = $ac_status" >&5
11096 (exit "$ac_status"); }; }; then
11097 cf_cv_ncurses_h2=$cf_header
11100 echo "$as_me: failed program was:" >&5
11101 cat "conftest.$ac_ext" >&5
11102 cf_cv_ncurses_h2=no
11104 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11106 if test "$cf_cv_ncurses_h2" != no ; then
11107 cf_cv_ncurses_h2=$cf_incdir/$cf_header
11108 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
11111 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
11113 CPPFLAGS="$cf_save2_CPPFLAGS"
11114 test "$cf_cv_ncurses_h2" != no && break
11116 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:11116: error: not found" >&5
11117 echo "$as_me: error: not found" >&2;}
11118 { (exit 1); exit 1; }; }
11121 echo "$as_me:11121: result: $cf_cv_ncurses_h2" >&5
11122 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
11124 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
11125 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
11126 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
11127 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
11130 if test -n "$cf_1st_incdir" ; then
11131 for cf_add_incdir in $cf_1st_incdir
11133 while test "$cf_add_incdir" != /usr/include
11135 if test -d "$cf_add_incdir"
11138 if test -n "$CFLAGS$CPPFLAGS" ; then
11139 # a loop is needed to ensure we can add subdirs of existing dirs
11140 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11141 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11142 cf_have_incdir=yes; break
11147 if test "$cf_have_incdir" = no ; then
11148 if test "$cf_add_incdir" = /usr/local/include ; then
11149 if test "$GCC" = yes
11151 cf_save_CPPFLAGS=$CPPFLAGS
11153 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11154 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11156 cat >"conftest.$ac_ext" <<_ACEOF
11157 #line 11157 "configure"
11158 #include "confdefs.h"
11168 rm -f "conftest.$ac_objext"
11169 if { (eval echo "$as_me:11169: \"$ac_compile\"") >&5
11170 (eval $ac_compile) 2>&5
11172 echo "$as_me:11172: \$? = $ac_status" >&5
11173 (exit "$ac_status"); } &&
11174 { ac_try='test -s "conftest.$ac_objext"'
11175 { (eval echo "$as_me:11175: \"$ac_try\"") >&5
11176 (eval $ac_try) 2>&5
11178 echo "$as_me:11178: \$? = $ac_status" >&5
11179 (exit "$ac_status"); }; }; then
11182 echo "$as_me: failed program was:" >&5
11183 cat "conftest.$ac_ext" >&5
11186 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11187 CPPFLAGS=$cf_save_CPPFLAGS
11192 if test "$cf_have_incdir" = no ; then
11193 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11195 echo "${as_me:-configure}:11195: testing adding $cf_add_incdir to include-path ..." 1>&5
11197 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11199 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11200 test "$cf_top_incdir" = "$cf_add_incdir" && break
11201 cf_add_incdir="$cf_top_incdir"
11214 # Set definitions to allow ifdef'ing for ncurses.h
11216 case "$cf_cv_ncurses_header" in
11219 cat >>confdefs.h <<\EOF
11220 #define HAVE_NCURSES_H 1
11226 case "$cf_cv_ncurses_header" in
11227 (ncurses/curses.h|ncurses/ncurses.h)
11229 cat >>confdefs.h <<\EOF
11230 #define HAVE_NCURSES_NCURSES_H 1
11234 (ncursesw/curses.h|ncursesw/ncurses.h)
11236 cat >>confdefs.h <<\EOF
11237 #define HAVE_NCURSESW_NCURSES_H 1
11243 echo "$as_me:11243: checking for terminfo header" >&5
11244 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
11245 if test "${cf_cv_term_header+set}" = set; then
11246 echo $ECHO_N "(cached) $ECHO_C" >&6
11249 case "${cf_cv_ncurses_header}" in
11250 (*/ncurses.h|*/ncursesw.h)
11251 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
11254 cf_term_header=term.h
11258 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
11260 cat >"conftest.$ac_ext" <<_ACEOF
11261 #line 11261 "configure"
11262 #include "confdefs.h"
11264 #include <${cf_cv_ncurses_header:-curses.h}>
11265 #include <$cf_test>
11270 int x = auto_left_margin; (void)x
11275 rm -f "conftest.$ac_objext"
11276 if { (eval echo "$as_me:11276: \"$ac_compile\"") >&5
11277 (eval $ac_compile) 2>&5
11279 echo "$as_me:11279: \$? = $ac_status" >&5
11280 (exit "$ac_status"); } &&
11281 { ac_try='test -s "conftest.$ac_objext"'
11282 { (eval echo "$as_me:11282: \"$ac_try\"") >&5
11283 (eval $ac_try) 2>&5
11285 echo "$as_me:11285: \$? = $ac_status" >&5
11286 (exit "$ac_status"); }; }; then
11288 cf_cv_term_header="$cf_test"
11290 echo "$as_me: failed program was:" >&5
11291 cat "conftest.$ac_ext" >&5
11293 cf_cv_term_header=unknown
11296 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11297 test "$cf_cv_term_header" != unknown && break
11301 echo "$as_me:11301: result: $cf_cv_term_header" >&5
11302 echo "${ECHO_T}$cf_cv_term_header" >&6
11304 # Set definitions to allow ifdef'ing to accommodate subdirectories
11306 case "$cf_cv_term_header" in
11309 cat >>confdefs.h <<\EOF
11310 #define HAVE_TERM_H 1
11316 case "$cf_cv_term_header" in
11319 cat >>confdefs.h <<\EOF
11320 #define HAVE_NCURSES_TERM_H 1
11326 cat >>confdefs.h <<\EOF
11327 #define HAVE_NCURSESW_TERM_H 1
11333 # some applications need this, but should check for NCURSES_VERSION
11335 cat >>confdefs.h <<\EOF
11339 echo "$as_me:11339: checking for ncurses version" >&5
11340 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
11341 if test "${cf_cv_ncurses_version+set}" = set; then
11342 echo $ECHO_N "(cached) $ECHO_C" >&6
11345 cf_cv_ncurses_version=no
11347 rm -f "$cf_tempfile"
11348 if test "$cross_compiling" = yes; then
11350 # This will not work if the preprocessor splits the line after the
11351 # Autoconf token. The 'unproto' program does that.
11352 cat > "conftest.$ac_ext" <<EOF
11353 #include <${cf_cv_ncurses_header:-curses.h}>
11355 #ifdef NCURSES_VERSION
11356 Autoconf NCURSES_VERSION
11364 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
11365 { (eval echo "$as_me:11365: \"$cf_try\"") >&5
11366 (eval $cf_try) 2>&5
11368 echo "$as_me:11368: \$? = $ac_status" >&5
11369 (exit "$ac_status"); }
11370 if test -f conftest.out ; then
11371 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
11372 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
11377 cat >"conftest.$ac_ext" <<_ACEOF
11378 #line 11378 "configure"
11379 #include "confdefs.h"
11381 #include <${cf_cv_ncurses_header:-curses.h}>
11385 FILE *fp = fopen("$cf_tempfile", "w");
11386 #ifdef NCURSES_VERSION
11387 # ifdef NCURSES_VERSION_PATCH
11388 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
11390 fprintf(fp, "%s\\n", NCURSES_VERSION);
11393 # ifdef __NCURSES_H
11394 fprintf(fp, "old\\n");
11399 ${cf_cv_main_return:-return}(0);
11402 rm -f "conftest$ac_exeext"
11403 if { (eval echo "$as_me:11403: \"$ac_link\"") >&5
11404 (eval $ac_link) 2>&5
11406 echo "$as_me:11406: \$? = $ac_status" >&5
11407 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
11408 { (eval echo "$as_me:11408: \"$ac_try\"") >&5
11409 (eval $ac_try) 2>&5
11411 echo "$as_me:11411: \$? = $ac_status" >&5
11412 (exit "$ac_status"); }; }; then
11414 cf_cv_ncurses_version=`cat $cf_tempfile`
11416 echo "$as_me: program exited with status $ac_status" >&5
11417 echo "$as_me: failed program was:" >&5
11418 cat "conftest.$ac_ext" >&5
11420 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
11422 rm -f "$cf_tempfile"
11425 echo "$as_me:11425: result: $cf_cv_ncurses_version" >&5
11426 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
11427 test "$cf_cv_ncurses_version" = no ||
11428 cat >>confdefs.h <<\EOF
11432 cf_nculib_root=$cf_cv_screen
11433 # This works, except for the special case where we find gpm, but
11434 # ncurses is in a nonstandard location via $LIBS, and we really want
11437 cf_ncurses_SAVE="$LIBS"
11438 echo "$as_me:11438: checking for Gpm_Open in -lgpm" >&5
11439 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
11440 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
11441 echo $ECHO_N "(cached) $ECHO_C" >&6
11443 ac_check_lib_save_LIBS=$LIBS
11445 cat >"conftest.$ac_ext" <<_ACEOF
11446 #line 11446 "configure"
11447 #include "confdefs.h"
11449 /* Override any gcc2 internal prototype to avoid an error. */
11453 /* We use char because int might match the return type of a gcc2
11454 builtin and then its argument prototype would still apply. */
11464 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11465 if { (eval echo "$as_me:11465: \"$ac_link\"") >&5
11466 (eval $ac_link) 2>&5
11468 echo "$as_me:11468: \$? = $ac_status" >&5
11469 (exit "$ac_status"); } &&
11470 { ac_try='test -s "conftest$ac_exeext"'
11471 { (eval echo "$as_me:11471: \"$ac_try\"") >&5
11472 (eval $ac_try) 2>&5
11474 echo "$as_me:11474: \$? = $ac_status" >&5
11475 (exit "$ac_status"); }; }; then
11476 ac_cv_lib_gpm_Gpm_Open=yes
11478 echo "$as_me: failed program was:" >&5
11479 cat "conftest.$ac_ext" >&5
11480 ac_cv_lib_gpm_Gpm_Open=no
11482 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11483 LIBS=$ac_check_lib_save_LIBS
11485 echo "$as_me:11485: result: $ac_cv_lib_gpm_Gpm_Open" >&5
11486 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
11487 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
11488 echo "$as_me:11488: checking for initscr in -lgpm" >&5
11489 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
11490 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
11491 echo $ECHO_N "(cached) $ECHO_C" >&6
11493 ac_check_lib_save_LIBS=$LIBS
11495 cat >"conftest.$ac_ext" <<_ACEOF
11496 #line 11496 "configure"
11497 #include "confdefs.h"
11499 /* Override any gcc2 internal prototype to avoid an error. */
11503 /* We use char because int might match the return type of a gcc2
11504 builtin and then its argument prototype would still apply. */
11514 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11515 if { (eval echo "$as_me:11515: \"$ac_link\"") >&5
11516 (eval $ac_link) 2>&5
11518 echo "$as_me:11518: \$? = $ac_status" >&5
11519 (exit "$ac_status"); } &&
11520 { ac_try='test -s "conftest$ac_exeext"'
11521 { (eval echo "$as_me:11521: \"$ac_try\"") >&5
11522 (eval $ac_try) 2>&5
11524 echo "$as_me:11524: \$? = $ac_status" >&5
11525 (exit "$ac_status"); }; }; then
11526 ac_cv_lib_gpm_initscr=yes
11528 echo "$as_me: failed program was:" >&5
11529 cat "conftest.$ac_ext" >&5
11530 ac_cv_lib_gpm_initscr=no
11532 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11533 LIBS=$ac_check_lib_save_LIBS
11535 echo "$as_me:11535: result: $ac_cv_lib_gpm_initscr" >&5
11536 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
11537 if test "$ac_cv_lib_gpm_initscr" = yes; then
11538 LIBS="$cf_ncurses_SAVE"
11540 cf_ncurses_LIBS="-lgpm"
11547 # This is only necessary if you are linking against an obsolete
11548 # version of ncurses (but it should do no harm, since it's static).
11549 if test "$cf_nculib_root" = ncurses ; then
11550 echo "$as_me:11550: checking for tgoto in -lmytinfo" >&5
11551 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
11552 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
11553 echo $ECHO_N "(cached) $ECHO_C" >&6
11555 ac_check_lib_save_LIBS=$LIBS
11556 LIBS="-lmytinfo $LIBS"
11557 cat >"conftest.$ac_ext" <<_ACEOF
11558 #line 11558 "configure"
11559 #include "confdefs.h"
11561 /* Override any gcc2 internal prototype to avoid an error. */
11565 /* We use char because int might match the return type of a gcc2
11566 builtin and then its argument prototype would still apply. */
11576 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11577 if { (eval echo "$as_me:11577: \"$ac_link\"") >&5
11578 (eval $ac_link) 2>&5
11580 echo "$as_me:11580: \$? = $ac_status" >&5
11581 (exit "$ac_status"); } &&
11582 { ac_try='test -s "conftest$ac_exeext"'
11583 { (eval echo "$as_me:11583: \"$ac_try\"") >&5
11584 (eval $ac_try) 2>&5
11586 echo "$as_me:11586: \$? = $ac_status" >&5
11587 (exit "$ac_status"); }; }; then
11588 ac_cv_lib_mytinfo_tgoto=yes
11590 echo "$as_me: failed program was:" >&5
11591 cat "conftest.$ac_ext" >&5
11592 ac_cv_lib_mytinfo_tgoto=no
11594 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11595 LIBS=$ac_check_lib_save_LIBS
11597 echo "$as_me:11597: result: $ac_cv_lib_mytinfo_tgoto" >&5
11598 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11599 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
11600 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
11607 cf_add_libs="$LIBS"
11610 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11611 # filter duplicates
11612 for cf_add_1lib in $cf_add_0lib; do
11613 for cf_add_2lib in $cf_add_libs; do
11614 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11619 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11621 LIBS="$cf_add_libs"
11623 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
11626 cf_add_libs="$LIBS"
11629 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11630 # filter duplicates
11631 for cf_add_1lib in $cf_add_0lib; do
11632 for cf_add_2lib in $cf_add_libs; do
11633 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11638 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11640 LIBS="$cf_add_libs"
11644 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
11646 echo "$as_me:11646: checking for initscr" >&5
11647 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
11648 if test "${ac_cv_func_initscr+set}" = set; then
11649 echo $ECHO_N "(cached) $ECHO_C" >&6
11651 cat >"conftest.$ac_ext" <<_ACEOF
11652 #line 11652 "configure"
11653 #include "confdefs.h"
11654 #define initscr autoconf_temporary
11655 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11662 /* We use char because int might match the return type of a gcc2
11663 builtin and then its argument prototype would still apply. */
11664 char initscr (void);
11670 /* The GNU C library defines stubs for functions which it implements
11671 to always fail with ENOSYS. Some functions are actually named
11672 something starting with __ and the normal name is an alias. */
11673 #if defined (__stub_initscr) || defined (__stub___initscr)
11674 #error found stub for initscr
11682 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11683 if { (eval echo "$as_me:11683: \"$ac_link\"") >&5
11684 (eval $ac_link) 2>&5
11686 echo "$as_me:11686: \$? = $ac_status" >&5
11687 (exit "$ac_status"); } &&
11688 { ac_try='test -s "conftest$ac_exeext"'
11689 { (eval echo "$as_me:11689: \"$ac_try\"") >&5
11690 (eval $ac_try) 2>&5
11692 echo "$as_me:11692: \$? = $ac_status" >&5
11693 (exit "$ac_status"); }; }; then
11694 ac_cv_func_initscr=yes
11696 echo "$as_me: failed program was:" >&5
11697 cat "conftest.$ac_ext" >&5
11698 ac_cv_func_initscr=no
11700 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11702 echo "$as_me:11702: result: $ac_cv_func_initscr" >&5
11703 echo "${ECHO_T}$ac_cv_func_initscr" >&6
11704 if test "$ac_cv_func_initscr" = yes; then
11705 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11708 cf_save_LIBS="$LIBS"
11709 echo "$as_me:11709: checking for initscr in -l$cf_nculib_root" >&5
11710 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
11711 LIBS="-l$cf_nculib_root $LIBS"
11712 cat >"conftest.$ac_ext" <<_ACEOF
11713 #line 11713 "configure"
11714 #include "confdefs.h"
11715 #include <${cf_cv_ncurses_header:-curses.h}>
11724 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11725 if { (eval echo "$as_me:11725: \"$ac_link\"") >&5
11726 (eval $ac_link) 2>&5
11728 echo "$as_me:11728: \$? = $ac_status" >&5
11729 (exit "$ac_status"); } &&
11730 { ac_try='test -s "conftest$ac_exeext"'
11731 { (eval echo "$as_me:11731: \"$ac_try\"") >&5
11732 (eval $ac_try) 2>&5
11734 echo "$as_me:11734: \$? = $ac_status" >&5
11735 (exit "$ac_status"); }; }; then
11736 echo "$as_me:11736: result: yes" >&5
11737 echo "${ECHO_T}yes" >&6
11738 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11741 echo "$as_me: failed program was:" >&5
11742 cat "conftest.$ac_ext" >&5
11743 echo "$as_me:11743: result: no" >&5
11744 echo "${ECHO_T}no" >&6
11747 cf_library_path_list=""
11748 if test -n "${LDFLAGS}${LIBS}" ; then
11749 for cf_library_path in $LDFLAGS $LIBS
11751 case "$cf_library_path" in
11753 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11755 test "x$cf_library_path" != "xNONE" && \
11756 test -d "$cf_library_path" && \
11758 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11759 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
11760 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11761 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11762 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11763 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"
11766 cf_library_path_list="$cf_library_path_list $cf_search"
11774 test "x$prefix" != "xNONE" && \
11775 test -d "$prefix" && \
11777 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11778 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
11779 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11780 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11781 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11782 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11785 for cf_subdir_prefix in \
11794 test "x$cf_subdir_prefix" != "x$prefix" && \
11795 test -d "$cf_subdir_prefix" && \
11796 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11797 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11798 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
11799 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11800 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11801 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11802 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"
11807 cf_search="$cf_library_path_list $cf_search"
11809 for cf_libdir in $cf_search
11811 echo "$as_me:11811: checking for -l$cf_nculib_root in $cf_libdir" >&5
11812 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11813 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11814 cat >"conftest.$ac_ext" <<_ACEOF
11815 #line 11815 "configure"
11816 #include "confdefs.h"
11817 #include <${cf_cv_ncurses_header:-curses.h}>
11826 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11827 if { (eval echo "$as_me:11827: \"$ac_link\"") >&5
11828 (eval $ac_link) 2>&5
11830 echo "$as_me:11830: \$? = $ac_status" >&5
11831 (exit "$ac_status"); } &&
11832 { ac_try='test -s "conftest$ac_exeext"'
11833 { (eval echo "$as_me:11833: \"$ac_try\"") >&5
11834 (eval $ac_try) 2>&5
11836 echo "$as_me:11836: \$? = $ac_status" >&5
11837 (exit "$ac_status"); }; }; then
11838 echo "$as_me:11838: result: yes" >&5
11839 echo "${ECHO_T}yes" >&6
11840 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11843 echo "$as_me: failed program was:" >&5
11844 cat "conftest.$ac_ext" >&5
11845 echo "$as_me:11845: result: no" >&5
11846 echo "${ECHO_T}no" >&6
11847 LIBS="$cf_save_LIBS"
11849 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11853 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11857 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
11859 if test "$cf_found_library" = no ; then
11860 { { echo "$as_me:11860: error: Cannot link $cf_nculib_root library" >&5
11861 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11862 { (exit 1); exit 1; }; }
11867 if test -n "$cf_ncurses_LIBS" ; then
11868 echo "$as_me:11868: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11869 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11870 cf_ncurses_SAVE="$LIBS"
11871 for p in $cf_ncurses_LIBS ; do
11872 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
11873 if test "$q" != "$LIBS" ; then
11877 cat >"conftest.$ac_ext" <<_ACEOF
11878 #line 11878 "configure"
11879 #include "confdefs.h"
11880 #include <${cf_cv_ncurses_header:-curses.h}>
11884 initscr(); mousemask(0,0); tigetstr((char *)0);
11889 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11890 if { (eval echo "$as_me:11890: \"$ac_link\"") >&5
11891 (eval $ac_link) 2>&5
11893 echo "$as_me:11893: \$? = $ac_status" >&5
11894 (exit "$ac_status"); } &&
11895 { ac_try='test -s "conftest$ac_exeext"'
11896 { (eval echo "$as_me:11896: \"$ac_try\"") >&5
11897 (eval $ac_try) 2>&5
11899 echo "$as_me:11899: \$? = $ac_status" >&5
11900 (exit "$ac_status"); }; }; then
11901 echo "$as_me:11901: result: yes" >&5
11902 echo "${ECHO_T}yes" >&6
11904 echo "$as_me: failed program was:" >&5
11905 cat "conftest.$ac_ext" >&5
11906 echo "$as_me:11906: result: no" >&5
11907 echo "${ECHO_T}no" >&6
11908 LIBS="$cf_ncurses_SAVE"
11910 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11913 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11915 cat >>confdefs.h <<EOF
11916 #define $cf_nculib_ROOT 1
11921 NCURSES_CONFIG=none
11926 echo "$as_me:11926: checking for X" >&5
11927 echo $ECHO_N "checking for X... $ECHO_C" >&6
11929 # Check whether --with-x or --without-x was given.
11930 if test "${with_x+set}" = set; then
11934 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
11935 if test "x$with_x" = xno; then
11936 # The user explicitly disabled X.
11939 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
11940 # Both variables are already set.
11943 if test "${ac_cv_have_x+set}" = set; then
11944 echo $ECHO_N "(cached) $ECHO_C" >&6
11946 # One or both of the vars are not set, and there is no cached value.
11947 ac_x_includes=no ac_x_libraries=no
11948 rm -fr conftest.dir
11949 if mkdir conftest.dir; then
11951 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
11952 cat >Imakefile <<'EOF'
11954 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
11956 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
11957 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
11958 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
11959 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
11960 for ac_extension in a so sl dylib dll; do
11961 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
11962 test -f "$ac_im_libdir/libX11.$ac_extension"; then
11963 ac_im_usrlibdir=$ac_im_libdir; break
11966 # Screen out bogus values from the imake configuration. They are
11967 # bogus both because they are the default anyway, and because
11968 # using them would break gcc on systems where it needs fixed includes.
11969 case $ac_im_incroot in
11971 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
11973 case $ac_im_usrlibdir in
11974 /usr/lib | /lib) ;;
11975 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
11979 rm -fr conftest.dir
11982 # Standard set of common directories for X headers.
11983 # Check X11 before X11Rn because it is often a symlink to the current release.
12000 /usr/local/X11/include
12001 /usr/local/X11R7/include
12002 /usr/local/X11R6/include
12003 /usr/local/X11R5/include
12004 /usr/local/X11R4/include
12006 /usr/local/include/X11
12007 /usr/local/include/X11R7
12008 /usr/local/include/X11R6
12009 /usr/local/include/X11R5
12010 /usr/local/include/X11R4
12014 /usr/XFree86/include/X11
12018 /usr/unsupported/include
12019 /usr/athena/include
12020 /usr/local/x11r5/include
12021 /usr/lpp/Xamples/include
12023 /usr/openwin/include
12024 /usr/openwin/share/include'
12026 if test "$ac_x_includes" = no; then
12027 # Guess where to find include files, by looking for Intrinsic.h.
12028 # First, try using that file with no special directory specified.
12029 cat >"conftest.$ac_ext" <<_ACEOF
12030 #line 12030 "configure"
12031 #include "confdefs.h"
12032 #include <X11/Intrinsic.h>
12034 if { (eval echo "$as_me:12034: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12035 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12037 $EGREP -v '^ *\+' conftest.er1 >conftest.err
12039 cat conftest.err >&5
12040 echo "$as_me:12040: \$? = $ac_status" >&5
12041 (exit "$ac_status"); } >/dev/null; then
12042 if test -s conftest.err; then
12043 ac_cpp_err=$ac_c_preproc_warn_flag
12050 if test -z "$ac_cpp_err"; then
12051 # We can compile using X headers with no special include directory.
12054 echo "$as_me: failed program was:" >&5
12055 cat "conftest.$ac_ext" >&5
12056 for ac_dir in $ac_x_header_dirs; do
12057 if test -r "$ac_dir/X11/Intrinsic.h"; then
12058 ac_x_includes=$ac_dir
12063 rm -f conftest.err "conftest.$ac_ext"
12064 fi # $ac_x_includes = no
12066 if test "$ac_x_libraries" = no; then
12067 # Check for the libraries.
12068 # See if we find them without any special options.
12069 # Don't add to $LIBS permanently.
12072 cat >"conftest.$ac_ext" <<_ACEOF
12073 #line 12073 "configure"
12074 #include "confdefs.h"
12075 #include <X11/Intrinsic.h>
12084 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12085 if { (eval echo "$as_me:12085: \"$ac_link\"") >&5
12086 (eval $ac_link) 2>&5
12088 echo "$as_me:12088: \$? = $ac_status" >&5
12089 (exit "$ac_status"); } &&
12090 { ac_try='test -s "conftest$ac_exeext"'
12091 { (eval echo "$as_me:12091: \"$ac_try\"") >&5
12092 (eval $ac_try) 2>&5
12094 echo "$as_me:12094: \$? = $ac_status" >&5
12095 (exit "$ac_status"); }; }; then
12097 # We can link X programs with no special library path.
12100 echo "$as_me: failed program was:" >&5
12101 cat "conftest.$ac_ext" >&5
12103 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
12105 # Don't even attempt the hair of trying to link an X program!
12106 for ac_extension in a so sl dylib dll; do
12107 if test -r "$ac_dir/libXt.$ac_extension"; then
12108 ac_x_libraries=$ac_dir
12114 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12115 fi # $ac_x_libraries = no
12117 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
12118 # Didn't find X anywhere. Cache the known absence of X.
12119 ac_cv_have_x="have_x=no"
12121 # Record where we found X for the cache.
12122 ac_cv_have_x="have_x=yes \
12123 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
12128 eval "$ac_cv_have_x"
12131 if test "$have_x" != yes; then
12132 echo "$as_me:12132: result: $have_x" >&5
12133 echo "${ECHO_T}$have_x" >&6
12136 # If each of the values was on the command line, it overrides each guess.
12137 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
12138 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
12139 # Update the cache value to reflect the command line values.
12140 ac_cv_have_x="have_x=yes \
12141 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
12142 echo "$as_me:12142: result: libraries $x_libraries, headers $x_includes" >&5
12143 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
12146 if test "$no_x" = yes; then
12147 # Not all programs may use this symbol, but it does not hurt to define it.
12149 cat >>confdefs.h <<\EOF
12150 #define X_DISPLAY_MISSING 1
12158 if test -n "$x_includes"; then
12159 X_CFLAGS="$X_CFLAGS -I$x_includes"
12162 # It would also be nice to do this for all -L options, not just this one.
12163 if test -n "$x_libraries"; then
12164 X_LIBS="$X_LIBS -L$x_libraries"
12165 # For Solaris; some versions of Sun CC require a space after -R and
12166 # others require no space. Words are not sufficient . . . .
12167 case `(uname -sr) 2>/dev/null` in
12169 echo "$as_me:12169: checking whether -R must be followed by a space" >&5
12170 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
12171 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
12172 cat >"conftest.$ac_ext" <<_ACEOF
12173 #line 12173 "configure"
12174 #include "confdefs.h"
12184 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12185 if { (eval echo "$as_me:12185: \"$ac_link\"") >&5
12186 (eval $ac_link) 2>&5
12188 echo "$as_me:12188: \$? = $ac_status" >&5
12189 (exit "$ac_status"); } &&
12190 { ac_try='test -s "conftest$ac_exeext"'
12191 { (eval echo "$as_me:12191: \"$ac_try\"") >&5
12192 (eval $ac_try) 2>&5
12194 echo "$as_me:12194: \$? = $ac_status" >&5
12195 (exit "$ac_status"); }; }; then
12198 echo "$as_me: failed program was:" >&5
12199 cat "conftest.$ac_ext" >&5
12202 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12203 if test $ac_R_nospace = yes; then
12204 echo "$as_me:12204: result: no" >&5
12205 echo "${ECHO_T}no" >&6
12206 X_LIBS="$X_LIBS -R$x_libraries"
12208 LIBS="$ac_xsave_LIBS -R $x_libraries"
12209 cat >"conftest.$ac_ext" <<_ACEOF
12210 #line 12210 "configure"
12211 #include "confdefs.h"
12221 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12222 if { (eval echo "$as_me:12222: \"$ac_link\"") >&5
12223 (eval $ac_link) 2>&5
12225 echo "$as_me:12225: \$? = $ac_status" >&5
12226 (exit "$ac_status"); } &&
12227 { ac_try='test -s "conftest$ac_exeext"'
12228 { (eval echo "$as_me:12228: \"$ac_try\"") >&5
12229 (eval $ac_try) 2>&5
12231 echo "$as_me:12231: \$? = $ac_status" >&5
12232 (exit "$ac_status"); }; }; then
12235 echo "$as_me: failed program was:" >&5
12236 cat "conftest.$ac_ext" >&5
12239 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12240 if test $ac_R_space = yes; then
12241 echo "$as_me:12241: result: yes" >&5
12242 echo "${ECHO_T}yes" >&6
12243 X_LIBS="$X_LIBS -R $x_libraries"
12245 echo "$as_me:12245: result: neither works" >&5
12246 echo "${ECHO_T}neither works" >&6
12249 LIBS=$ac_xsave_LIBS
12253 # Check for system-dependent libraries X programs must link with.
12254 # Do this before checking for the system-independent R6 libraries
12255 # (-lICE), since we may need -lsocket or whatever for X linking.
12257 if test "$ISC" = yes; then
12258 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
12260 # Martyn Johnson says this is needed for Ultrix, if the X
12261 # libraries were built with DECnet support. And Karl Berry says
12262 # the Alpha needs dnet_stub (dnet does not exist).
12263 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
12264 cat >"conftest.$ac_ext" <<_ACEOF
12265 #line 12265 "configure"
12266 #include "confdefs.h"
12268 /* Override any gcc2 internal prototype to avoid an error. */
12272 /* We use char because int might match the return type of a gcc2
12273 builtin and then its argument prototype would still apply. */
12274 char XOpenDisplay ();
12283 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12284 if { (eval echo "$as_me:12284: \"$ac_link\"") >&5
12285 (eval $ac_link) 2>&5
12287 echo "$as_me:12287: \$? = $ac_status" >&5
12288 (exit "$ac_status"); } &&
12289 { ac_try='test -s "conftest$ac_exeext"'
12290 { (eval echo "$as_me:12290: \"$ac_try\"") >&5
12291 (eval $ac_try) 2>&5
12293 echo "$as_me:12293: \$? = $ac_status" >&5
12294 (exit "$ac_status"); }; }; then
12297 echo "$as_me: failed program was:" >&5
12298 cat "conftest.$ac_ext" >&5
12299 echo "$as_me:12299: checking for dnet_ntoa in -ldnet" >&5
12300 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
12301 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
12302 echo $ECHO_N "(cached) $ECHO_C" >&6
12304 ac_check_lib_save_LIBS=$LIBS
12305 LIBS="-ldnet $LIBS"
12306 cat >"conftest.$ac_ext" <<_ACEOF
12307 #line 12307 "configure"
12308 #include "confdefs.h"
12310 /* Override any gcc2 internal prototype to avoid an error. */
12314 /* We use char because int might match the return type of a gcc2
12315 builtin and then its argument prototype would still apply. */
12325 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12326 if { (eval echo "$as_me:12326: \"$ac_link\"") >&5
12327 (eval $ac_link) 2>&5
12329 echo "$as_me:12329: \$? = $ac_status" >&5
12330 (exit "$ac_status"); } &&
12331 { ac_try='test -s "conftest$ac_exeext"'
12332 { (eval echo "$as_me:12332: \"$ac_try\"") >&5
12333 (eval $ac_try) 2>&5
12335 echo "$as_me:12335: \$? = $ac_status" >&5
12336 (exit "$ac_status"); }; }; then
12337 ac_cv_lib_dnet_dnet_ntoa=yes
12339 echo "$as_me: failed program was:" >&5
12340 cat "conftest.$ac_ext" >&5
12341 ac_cv_lib_dnet_dnet_ntoa=no
12343 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12344 LIBS=$ac_check_lib_save_LIBS
12346 echo "$as_me:12346: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
12347 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
12348 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
12349 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
12352 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
12353 echo "$as_me:12353: checking for dnet_ntoa in -ldnet_stub" >&5
12354 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
12355 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
12356 echo $ECHO_N "(cached) $ECHO_C" >&6
12358 ac_check_lib_save_LIBS=$LIBS
12359 LIBS="-ldnet_stub $LIBS"
12360 cat >"conftest.$ac_ext" <<_ACEOF
12361 #line 12361 "configure"
12362 #include "confdefs.h"
12364 /* Override any gcc2 internal prototype to avoid an error. */
12368 /* We use char because int might match the return type of a gcc2
12369 builtin and then its argument prototype would still apply. */
12379 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12380 if { (eval echo "$as_me:12380: \"$ac_link\"") >&5
12381 (eval $ac_link) 2>&5
12383 echo "$as_me:12383: \$? = $ac_status" >&5
12384 (exit "$ac_status"); } &&
12385 { ac_try='test -s "conftest$ac_exeext"'
12386 { (eval echo "$as_me:12386: \"$ac_try\"") >&5
12387 (eval $ac_try) 2>&5
12389 echo "$as_me:12389: \$? = $ac_status" >&5
12390 (exit "$ac_status"); }; }; then
12391 ac_cv_lib_dnet_stub_dnet_ntoa=yes
12393 echo "$as_me: failed program was:" >&5
12394 cat "conftest.$ac_ext" >&5
12395 ac_cv_lib_dnet_stub_dnet_ntoa=no
12397 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12398 LIBS=$ac_check_lib_save_LIBS
12400 echo "$as_me:12400: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
12401 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
12402 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
12403 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
12408 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12409 LIBS="$ac_xsave_LIBS"
12411 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
12412 # to get the SysV transport functions.
12413 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
12415 # The nsl library prevents programs from opening the X display
12416 # on Irix 5.2, according to T.E. Dickey.
12417 # The functions gethostbyname, getservbyname, and inet_addr are
12418 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
12419 echo "$as_me:12419: checking for gethostbyname" >&5
12420 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
12421 if test "${ac_cv_func_gethostbyname+set}" = set; then
12422 echo $ECHO_N "(cached) $ECHO_C" >&6
12424 cat >"conftest.$ac_ext" <<_ACEOF
12425 #line 12425 "configure"
12426 #include "confdefs.h"
12427 #define gethostbyname autoconf_temporary
12428 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12429 #undef gethostbyname
12435 /* We use char because int might match the return type of a gcc2
12436 builtin and then its argument prototype would still apply. */
12437 char gethostbyname (void);
12443 /* The GNU C library defines stubs for functions which it implements
12444 to always fail with ENOSYS. Some functions are actually named
12445 something starting with __ and the normal name is an alias. */
12446 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
12447 #error found stub for gethostbyname
12450 return gethostbyname ();
12455 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12456 if { (eval echo "$as_me:12456: \"$ac_link\"") >&5
12457 (eval $ac_link) 2>&5
12459 echo "$as_me:12459: \$? = $ac_status" >&5
12460 (exit "$ac_status"); } &&
12461 { ac_try='test -s "conftest$ac_exeext"'
12462 { (eval echo "$as_me:12462: \"$ac_try\"") >&5
12463 (eval $ac_try) 2>&5
12465 echo "$as_me:12465: \$? = $ac_status" >&5
12466 (exit "$ac_status"); }; }; then
12467 ac_cv_func_gethostbyname=yes
12469 echo "$as_me: failed program was:" >&5
12470 cat "conftest.$ac_ext" >&5
12471 ac_cv_func_gethostbyname=no
12473 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12475 echo "$as_me:12475: result: $ac_cv_func_gethostbyname" >&5
12476 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
12478 if test $ac_cv_func_gethostbyname = no; then
12479 echo "$as_me:12479: checking for gethostbyname in -lnsl" >&5
12480 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
12481 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
12482 echo $ECHO_N "(cached) $ECHO_C" >&6
12484 ac_check_lib_save_LIBS=$LIBS
12486 cat >"conftest.$ac_ext" <<_ACEOF
12487 #line 12487 "configure"
12488 #include "confdefs.h"
12490 /* Override any gcc2 internal prototype to avoid an error. */
12494 /* We use char because int might match the return type of a gcc2
12495 builtin and then its argument prototype would still apply. */
12496 char gethostbyname ();
12505 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12506 if { (eval echo "$as_me:12506: \"$ac_link\"") >&5
12507 (eval $ac_link) 2>&5
12509 echo "$as_me:12509: \$? = $ac_status" >&5
12510 (exit "$ac_status"); } &&
12511 { ac_try='test -s "conftest$ac_exeext"'
12512 { (eval echo "$as_me:12512: \"$ac_try\"") >&5
12513 (eval $ac_try) 2>&5
12515 echo "$as_me:12515: \$? = $ac_status" >&5
12516 (exit "$ac_status"); }; }; then
12517 ac_cv_lib_nsl_gethostbyname=yes
12519 echo "$as_me: failed program was:" >&5
12520 cat "conftest.$ac_ext" >&5
12521 ac_cv_lib_nsl_gethostbyname=no
12523 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12524 LIBS=$ac_check_lib_save_LIBS
12526 echo "$as_me:12526: result: $ac_cv_lib_nsl_gethostbyname" >&5
12527 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
12528 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
12529 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
12532 if test $ac_cv_lib_nsl_gethostbyname = no; then
12533 echo "$as_me:12533: checking for gethostbyname in -lbsd" >&5
12534 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
12535 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
12536 echo $ECHO_N "(cached) $ECHO_C" >&6
12538 ac_check_lib_save_LIBS=$LIBS
12540 cat >"conftest.$ac_ext" <<_ACEOF
12541 #line 12541 "configure"
12542 #include "confdefs.h"
12544 /* Override any gcc2 internal prototype to avoid an error. */
12548 /* We use char because int might match the return type of a gcc2
12549 builtin and then its argument prototype would still apply. */
12550 char gethostbyname ();
12559 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12560 if { (eval echo "$as_me:12560: \"$ac_link\"") >&5
12561 (eval $ac_link) 2>&5
12563 echo "$as_me:12563: \$? = $ac_status" >&5
12564 (exit "$ac_status"); } &&
12565 { ac_try='test -s "conftest$ac_exeext"'
12566 { (eval echo "$as_me:12566: \"$ac_try\"") >&5
12567 (eval $ac_try) 2>&5
12569 echo "$as_me:12569: \$? = $ac_status" >&5
12570 (exit "$ac_status"); }; }; then
12571 ac_cv_lib_bsd_gethostbyname=yes
12573 echo "$as_me: failed program was:" >&5
12574 cat "conftest.$ac_ext" >&5
12575 ac_cv_lib_bsd_gethostbyname=no
12577 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12578 LIBS=$ac_check_lib_save_LIBS
12580 echo "$as_me:12580: result: $ac_cv_lib_bsd_gethostbyname" >&5
12581 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
12582 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
12583 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
12589 # lieder@skyler.mavd.honeywell.com says without -lsocket,
12590 # socket/setsockopt and other routines are undefined under SCO ODT
12591 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
12592 # on later versions), says Simon Leinen: it contains gethostby*
12593 # variants that don't use the nameserver (or something). -lsocket
12594 # must be given before -lnsl if both are needed. We assume that
12595 # if connect needs -lnsl, so does gethostbyname.
12596 echo "$as_me:12596: checking for connect" >&5
12597 echo $ECHO_N "checking for connect... $ECHO_C" >&6
12598 if test "${ac_cv_func_connect+set}" = set; then
12599 echo $ECHO_N "(cached) $ECHO_C" >&6
12601 cat >"conftest.$ac_ext" <<_ACEOF
12602 #line 12602 "configure"
12603 #include "confdefs.h"
12604 #define connect autoconf_temporary
12605 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12612 /* We use char because int might match the return type of a gcc2
12613 builtin and then its argument prototype would still apply. */
12614 char connect (void);
12620 /* The GNU C library defines stubs for functions which it implements
12621 to always fail with ENOSYS. Some functions are actually named
12622 something starting with __ and the normal name is an alias. */
12623 #if defined (__stub_connect) || defined (__stub___connect)
12624 #error found stub for connect
12632 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12633 if { (eval echo "$as_me:12633: \"$ac_link\"") >&5
12634 (eval $ac_link) 2>&5
12636 echo "$as_me:12636: \$? = $ac_status" >&5
12637 (exit "$ac_status"); } &&
12638 { ac_try='test -s "conftest$ac_exeext"'
12639 { (eval echo "$as_me:12639: \"$ac_try\"") >&5
12640 (eval $ac_try) 2>&5
12642 echo "$as_me:12642: \$? = $ac_status" >&5
12643 (exit "$ac_status"); }; }; then
12644 ac_cv_func_connect=yes
12646 echo "$as_me: failed program was:" >&5
12647 cat "conftest.$ac_ext" >&5
12648 ac_cv_func_connect=no
12650 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12652 echo "$as_me:12652: result: $ac_cv_func_connect" >&5
12653 echo "${ECHO_T}$ac_cv_func_connect" >&6
12655 if test $ac_cv_func_connect = no; then
12656 echo "$as_me:12656: checking for connect in -lsocket" >&5
12657 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
12658 if test "${ac_cv_lib_socket_connect+set}" = set; then
12659 echo $ECHO_N "(cached) $ECHO_C" >&6
12661 ac_check_lib_save_LIBS=$LIBS
12662 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
12663 cat >"conftest.$ac_ext" <<_ACEOF
12664 #line 12664 "configure"
12665 #include "confdefs.h"
12667 /* Override any gcc2 internal prototype to avoid an error. */
12671 /* We use char because int might match the return type of a gcc2
12672 builtin and then its argument prototype would still apply. */
12682 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12683 if { (eval echo "$as_me:12683: \"$ac_link\"") >&5
12684 (eval $ac_link) 2>&5
12686 echo "$as_me:12686: \$? = $ac_status" >&5
12687 (exit "$ac_status"); } &&
12688 { ac_try='test -s "conftest$ac_exeext"'
12689 { (eval echo "$as_me:12689: \"$ac_try\"") >&5
12690 (eval $ac_try) 2>&5
12692 echo "$as_me:12692: \$? = $ac_status" >&5
12693 (exit "$ac_status"); }; }; then
12694 ac_cv_lib_socket_connect=yes
12696 echo "$as_me: failed program was:" >&5
12697 cat "conftest.$ac_ext" >&5
12698 ac_cv_lib_socket_connect=no
12700 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12701 LIBS=$ac_check_lib_save_LIBS
12703 echo "$as_me:12703: result: $ac_cv_lib_socket_connect" >&5
12704 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
12705 if test "$ac_cv_lib_socket_connect" = yes; then
12706 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
12711 # Guillermo Gomez says -lposix is necessary on A/UX.
12712 echo "$as_me:12712: checking for remove" >&5
12713 echo $ECHO_N "checking for remove... $ECHO_C" >&6
12714 if test "${ac_cv_func_remove+set}" = set; then
12715 echo $ECHO_N "(cached) $ECHO_C" >&6
12717 cat >"conftest.$ac_ext" <<_ACEOF
12718 #line 12718 "configure"
12719 #include "confdefs.h"
12720 #define remove autoconf_temporary
12721 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12728 /* We use char because int might match the return type of a gcc2
12729 builtin and then its argument prototype would still apply. */
12730 char remove (void);
12736 /* The GNU C library defines stubs for functions which it implements
12737 to always fail with ENOSYS. Some functions are actually named
12738 something starting with __ and the normal name is an alias. */
12739 #if defined (__stub_remove) || defined (__stub___remove)
12740 #error found stub for remove
12748 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12749 if { (eval echo "$as_me:12749: \"$ac_link\"") >&5
12750 (eval $ac_link) 2>&5
12752 echo "$as_me:12752: \$? = $ac_status" >&5
12753 (exit "$ac_status"); } &&
12754 { ac_try='test -s "conftest$ac_exeext"'
12755 { (eval echo "$as_me:12755: \"$ac_try\"") >&5
12756 (eval $ac_try) 2>&5
12758 echo "$as_me:12758: \$? = $ac_status" >&5
12759 (exit "$ac_status"); }; }; then
12760 ac_cv_func_remove=yes
12762 echo "$as_me: failed program was:" >&5
12763 cat "conftest.$ac_ext" >&5
12764 ac_cv_func_remove=no
12766 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12768 echo "$as_me:12768: result: $ac_cv_func_remove" >&5
12769 echo "${ECHO_T}$ac_cv_func_remove" >&6
12771 if test $ac_cv_func_remove = no; then
12772 echo "$as_me:12772: checking for remove in -lposix" >&5
12773 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
12774 if test "${ac_cv_lib_posix_remove+set}" = set; then
12775 echo $ECHO_N "(cached) $ECHO_C" >&6
12777 ac_check_lib_save_LIBS=$LIBS
12778 LIBS="-lposix $LIBS"
12779 cat >"conftest.$ac_ext" <<_ACEOF
12780 #line 12780 "configure"
12781 #include "confdefs.h"
12783 /* Override any gcc2 internal prototype to avoid an error. */
12787 /* We use char because int might match the return type of a gcc2
12788 builtin and then its argument prototype would still apply. */
12798 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12799 if { (eval echo "$as_me:12799: \"$ac_link\"") >&5
12800 (eval $ac_link) 2>&5
12802 echo "$as_me:12802: \$? = $ac_status" >&5
12803 (exit "$ac_status"); } &&
12804 { ac_try='test -s "conftest$ac_exeext"'
12805 { (eval echo "$as_me:12805: \"$ac_try\"") >&5
12806 (eval $ac_try) 2>&5
12808 echo "$as_me:12808: \$? = $ac_status" >&5
12809 (exit "$ac_status"); }; }; then
12810 ac_cv_lib_posix_remove=yes
12812 echo "$as_me: failed program was:" >&5
12813 cat "conftest.$ac_ext" >&5
12814 ac_cv_lib_posix_remove=no
12816 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12817 LIBS=$ac_check_lib_save_LIBS
12819 echo "$as_me:12819: result: $ac_cv_lib_posix_remove" >&5
12820 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
12821 if test "$ac_cv_lib_posix_remove" = yes; then
12822 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
12827 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
12828 echo "$as_me:12828: checking for shmat" >&5
12829 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
12830 if test "${ac_cv_func_shmat+set}" = set; then
12831 echo $ECHO_N "(cached) $ECHO_C" >&6
12833 cat >"conftest.$ac_ext" <<_ACEOF
12834 #line 12834 "configure"
12835 #include "confdefs.h"
12836 #define shmat autoconf_temporary
12837 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12844 /* We use char because int might match the return type of a gcc2
12845 builtin and then its argument prototype would still apply. */
12852 /* The GNU C library defines stubs for functions which it implements
12853 to always fail with ENOSYS. Some functions are actually named
12854 something starting with __ and the normal name is an alias. */
12855 #if defined (__stub_shmat) || defined (__stub___shmat)
12856 #error found stub for shmat
12864 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12865 if { (eval echo "$as_me:12865: \"$ac_link\"") >&5
12866 (eval $ac_link) 2>&5
12868 echo "$as_me:12868: \$? = $ac_status" >&5
12869 (exit "$ac_status"); } &&
12870 { ac_try='test -s "conftest$ac_exeext"'
12871 { (eval echo "$as_me:12871: \"$ac_try\"") >&5
12872 (eval $ac_try) 2>&5
12874 echo "$as_me:12874: \$? = $ac_status" >&5
12875 (exit "$ac_status"); }; }; then
12876 ac_cv_func_shmat=yes
12878 echo "$as_me: failed program was:" >&5
12879 cat "conftest.$ac_ext" >&5
12880 ac_cv_func_shmat=no
12882 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12884 echo "$as_me:12884: result: $ac_cv_func_shmat" >&5
12885 echo "${ECHO_T}$ac_cv_func_shmat" >&6
12887 if test $ac_cv_func_shmat = no; then
12888 echo "$as_me:12888: checking for shmat in -lipc" >&5
12889 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
12890 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
12891 echo $ECHO_N "(cached) $ECHO_C" >&6
12893 ac_check_lib_save_LIBS=$LIBS
12895 cat >"conftest.$ac_ext" <<_ACEOF
12896 #line 12896 "configure"
12897 #include "confdefs.h"
12899 /* Override any gcc2 internal prototype to avoid an error. */
12903 /* We use char because int might match the return type of a gcc2
12904 builtin and then its argument prototype would still apply. */
12914 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12915 if { (eval echo "$as_me:12915: \"$ac_link\"") >&5
12916 (eval $ac_link) 2>&5
12918 echo "$as_me:12918: \$? = $ac_status" >&5
12919 (exit "$ac_status"); } &&
12920 { ac_try='test -s "conftest$ac_exeext"'
12921 { (eval echo "$as_me:12921: \"$ac_try\"") >&5
12922 (eval $ac_try) 2>&5
12924 echo "$as_me:12924: \$? = $ac_status" >&5
12925 (exit "$ac_status"); }; }; then
12926 ac_cv_lib_ipc_shmat=yes
12928 echo "$as_me: failed program was:" >&5
12929 cat "conftest.$ac_ext" >&5
12930 ac_cv_lib_ipc_shmat=no
12932 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12933 LIBS=$ac_check_lib_save_LIBS
12935 echo "$as_me:12935: result: $ac_cv_lib_ipc_shmat" >&5
12936 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
12937 if test "$ac_cv_lib_ipc_shmat" = yes; then
12938 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
12944 # Check for libraries that X11R6 Xt/Xaw programs need.
12945 ac_save_LDFLAGS=$LDFLAGS
12946 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
12947 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
12948 # check for ICE first), but we must link in the order -lSM -lICE or
12949 # we get undefined symbols. So assume we have SM if we have ICE.
12950 # These have to be linked with before -lX11, unlike the other
12951 # libraries we check for below, so use a different variable.
12952 # John Interrante, Karl Berry
12953 echo "$as_me:12953: checking for IceConnectionNumber in -lICE" >&5
12954 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
12955 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
12956 echo $ECHO_N "(cached) $ECHO_C" >&6
12958 ac_check_lib_save_LIBS=$LIBS
12959 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
12960 cat >"conftest.$ac_ext" <<_ACEOF
12961 #line 12961 "configure"
12962 #include "confdefs.h"
12964 /* Override any gcc2 internal prototype to avoid an error. */
12968 /* We use char because int might match the return type of a gcc2
12969 builtin and then its argument prototype would still apply. */
12970 char IceConnectionNumber ();
12974 IceConnectionNumber ();
12979 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12980 if { (eval echo "$as_me:12980: \"$ac_link\"") >&5
12981 (eval $ac_link) 2>&5
12983 echo "$as_me:12983: \$? = $ac_status" >&5
12984 (exit "$ac_status"); } &&
12985 { ac_try='test -s "conftest$ac_exeext"'
12986 { (eval echo "$as_me:12986: \"$ac_try\"") >&5
12987 (eval $ac_try) 2>&5
12989 echo "$as_me:12989: \$? = $ac_status" >&5
12990 (exit "$ac_status"); }; }; then
12991 ac_cv_lib_ICE_IceConnectionNumber=yes
12993 echo "$as_me: failed program was:" >&5
12994 cat "conftest.$ac_ext" >&5
12995 ac_cv_lib_ICE_IceConnectionNumber=no
12997 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12998 LIBS=$ac_check_lib_save_LIBS
13000 echo "$as_me:13000: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
13001 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
13002 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
13003 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
13006 LDFLAGS=$ac_save_LDFLAGS
13010 cf_x_athena=${cf_x_athena:-Xaw}
13012 echo "$as_me:13012: checking if you want to link with Xaw 3d library" >&5
13013 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
13016 # Check whether --with-Xaw3d or --without-Xaw3d was given.
13017 if test "${with_Xaw3d+set}" = set; then
13018 withval="$with_Xaw3d"
13021 if test "$withval" = yes ; then
13023 echo "$as_me:13023: result: yes" >&5
13024 echo "${ECHO_T}yes" >&6
13026 echo "$as_me:13026: result: no" >&5
13027 echo "${ECHO_T}no" >&6
13030 echo "$as_me:13030: checking if you want to link with Xaw 3d xft library" >&5
13031 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
13034 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
13035 if test "${with_Xaw3dxft+set}" = set; then
13036 withval="$with_Xaw3dxft"
13039 if test "$withval" = yes ; then
13040 cf_x_athena=Xaw3dxft
13041 echo "$as_me:13041: result: yes" >&5
13042 echo "${ECHO_T}yes" >&6
13044 echo "$as_me:13044: result: no" >&5
13045 echo "${ECHO_T}no" >&6
13048 echo "$as_me:13048: checking if you want to link with neXT Athena library" >&5
13049 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
13052 # Check whether --with-neXtaw or --without-neXtaw was given.
13053 if test "${with_neXtaw+set}" = set; then
13054 withval="$with_neXtaw"
13057 if test "$withval" = yes ; then
13059 echo "$as_me:13059: result: yes" >&5
13060 echo "${ECHO_T}yes" >&6
13062 echo "$as_me:13062: result: no" >&5
13063 echo "${ECHO_T}no" >&6
13066 echo "$as_me:13066: checking if you want to link with Athena-Plus library" >&5
13067 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
13070 # Check whether --with-XawPlus or --without-XawPlus was given.
13071 if test "${with_XawPlus+set}" = set; then
13072 withval="$with_XawPlus"
13075 if test "$withval" = yes ; then
13076 cf_x_athena=XawPlus
13077 echo "$as_me:13077: result: yes" >&5
13078 echo "${ECHO_T}yes" >&6
13080 echo "$as_me:13080: result: no" >&5
13081 echo "${ECHO_T}no" >&6
13086 if test "$PKG_CONFIG" != none ; then
13088 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
13089 for cf_athena_pkg in \
13092 ${cf_x_athena}-devel \
13093 lib${cf_x_athena} \
13094 lib${cf_x_athena}-devel
13097 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_athena_pkg"; then
13098 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
13100 echo "${as_me:-configure}:13100: testing found package $cf_athena_pkg ..." 1>&5
13102 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_athena_pkg" 2>/dev/null`"
13103 cf_pkgconfig_libs="`$PKG_CONFIG --libs "$cf_athena_pkg" 2>/dev/null`"
13104 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
13106 echo "${as_me:-configure}:13106: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13108 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
13110 echo "${as_me:-configure}:13110: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
13115 cf_new_extra_cppflags=
13117 for cf_add_cflags in $cf_pkgconfig_incs
13119 case "$cf_fix_cppflags" in
13121 case "$cf_add_cflags" in
13122 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13123 case "$cf_add_cflags" in
13125 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13127 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13128 && test -z "${cf_tst_cflags}" \
13129 && cf_fix_cppflags=yes
13131 if test "$cf_fix_cppflags" = yes ; then
13133 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13134 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13137 elif test "${cf_tst_cflags}" = "\"'" ; then
13139 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13140 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13146 case "$CPPFLAGS" in
13150 case "$cf_add_cflags" in
13152 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13154 CPPFLAGS=`echo "$CPPFLAGS" | \
13155 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13156 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13161 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13162 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13169 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13170 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13177 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13178 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13180 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13182 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13183 && test -z "${cf_tst_cflags}" \
13184 && cf_fix_cppflags=no
13189 if test -n "$cf_new_cflags" ; then
13191 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13192 CFLAGS="${CFLAGS}$cf_new_cflags"
13196 if test -n "$cf_new_cppflags" ; then
13198 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13199 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13203 if test -n "$cf_new_extra_cppflags" ; then
13205 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13206 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13210 cf_add_libs="$LIBS"
13213 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13214 # filter duplicates
13215 for cf_add_1lib in $cf_add_0lib; do
13216 for cf_add_2lib in $cf_add_libs; do
13217 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13222 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13224 LIBS="$cf_add_libs"
13226 cf_x_athena_lib="$cf_pkgconfig_libs"
13228 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13230 cat >>confdefs.h <<EOF
13231 #define $cf_x_athena_LIBS 1
13234 for cf_trim_lib in Xmu Xt X11
13237 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13238 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13239 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13241 echo "${as_me:-configure}:13241: testing ..trimmed $LIBS ..." 1>&5
13247 echo "$as_me:13247: checking for usable $cf_x_athena/Xmu package" >&5
13248 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
13249 if test "${cf_cv_xaw_compat+set}" = set; then
13250 echo $ECHO_N "(cached) $ECHO_C" >&6
13253 cat >"conftest.$ac_ext" <<_ACEOF
13254 #line 13254 "configure"
13255 #include "confdefs.h"
13257 #include <X11/Xmu/CharSet.h>
13263 int check = XmuCompareISOLatin1("big", "small");
13270 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13271 if { (eval echo "$as_me:13271: \"$ac_link\"") >&5
13272 (eval $ac_link) 2>&5
13274 echo "$as_me:13274: \$? = $ac_status" >&5
13275 (exit "$ac_status"); } &&
13276 { ac_try='test -s "conftest$ac_exeext"'
13277 { (eval echo "$as_me:13277: \"$ac_try\"") >&5
13278 (eval $ac_try) 2>&5
13280 echo "$as_me:13280: \$? = $ac_status" >&5
13281 (exit "$ac_status"); }; }; then
13282 cf_cv_xaw_compat=yes
13284 echo "$as_me: failed program was:" >&5
13285 cat "conftest.$ac_ext" >&5
13286 cf_cv_xaw_compat=no
13288 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13290 echo "$as_me:13290: result: $cf_cv_xaw_compat" >&5
13291 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
13293 if test "$cf_cv_xaw_compat" = no
13295 # workaround for broken ".pc" files...
13296 case "$cf_x_athena_lib" in
13300 test -n "$verbose" && echo " work around broken package" 1>&6
13302 echo "${as_me:-configure}:13302: testing work around broken package ..." 1>&5
13304 cf_save_xmu="$LIBS"
13305 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
13307 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xmu"; then
13308 test -n "$verbose" && echo " found package xmu" 1>&6
13310 echo "${as_me:-configure}:13310: testing found package xmu ..." 1>&5
13312 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xmu" 2>/dev/null`"
13313 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xmu" 2>/dev/null`"
13314 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
13316 echo "${as_me:-configure}:13316: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13318 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
13320 echo "${as_me:-configure}:13320: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
13325 cf_new_extra_cppflags=
13327 for cf_add_cflags in $cf_pkgconfig_incs
13329 case "$cf_fix_cppflags" in
13331 case "$cf_add_cflags" in
13332 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13333 case "$cf_add_cflags" in
13335 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13337 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13338 && test -z "${cf_tst_cflags}" \
13339 && cf_fix_cppflags=yes
13341 if test "$cf_fix_cppflags" = yes ; then
13343 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13344 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13347 elif test "${cf_tst_cflags}" = "\"'" ; then
13349 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13350 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13356 case "$CPPFLAGS" in
13360 case "$cf_add_cflags" in
13362 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13364 CPPFLAGS=`echo "$CPPFLAGS" | \
13365 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13366 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13371 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13372 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13379 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13380 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13387 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13388 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13390 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13392 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13393 && test -z "${cf_tst_cflags}" \
13394 && cf_fix_cppflags=no
13399 if test -n "$cf_new_cflags" ; then
13401 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13402 CFLAGS="${CFLAGS}$cf_new_cflags"
13406 if test -n "$cf_new_cppflags" ; then
13408 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13409 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13413 if test -n "$cf_new_extra_cppflags" ; then
13415 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13416 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13420 cf_add_libs="$LIBS"
13423 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13424 # filter duplicates
13425 for cf_add_1lib in $cf_add_0lib; do
13426 for cf_add_2lib in $cf_add_libs; do
13427 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13432 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13434 LIBS="$cf_add_libs"
13436 LIBS="$cf_save_xmu"
13438 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13440 echo "${as_me:-configure}:13440: testing ...before $LIBS ..." 1>&5
13442 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
13443 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13445 echo "${as_me:-configure}:13445: testing ...after $LIBS ..." 1>&5
13451 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13453 echo "${as_me:-configure}:13453: testing ...before $LIBS ..." 1>&5
13455 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
13456 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13458 echo "${as_me:-configure}:13458: testing ...after $LIBS ..." 1>&5
13462 for cf_trim_lib in Xmu Xt X11
13465 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13466 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13467 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13469 echo "${as_me:-configure}:13469: testing ..trimmed $LIBS ..." 1>&5
13489 if test -z "$cf_x_athena_lib" ; then
13491 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
13492 test -n "$verbose" && echo " found package Xext" 1>&6
13494 echo "${as_me:-configure}:13494: testing found package Xext ..." 1>&5
13496 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
13497 cf_pkgconfig_libs="`$PKG_CONFIG --libs "Xext" 2>/dev/null`"
13498 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
13500 echo "${as_me:-configure}:13500: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13502 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
13504 echo "${as_me:-configure}:13504: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
13509 cf_new_extra_cppflags=
13511 for cf_add_cflags in $cf_pkgconfig_incs
13513 case "$cf_fix_cppflags" in
13515 case "$cf_add_cflags" in
13516 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13517 case "$cf_add_cflags" in
13519 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13521 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13522 && test -z "${cf_tst_cflags}" \
13523 && cf_fix_cppflags=yes
13525 if test "$cf_fix_cppflags" = yes ; then
13527 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13528 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13531 elif test "${cf_tst_cflags}" = "\"'" ; then
13533 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13534 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13540 case "$CPPFLAGS" in
13544 case "$cf_add_cflags" in
13546 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13548 CPPFLAGS=`echo "$CPPFLAGS" | \
13549 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13550 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13555 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13556 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13563 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13564 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13571 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13572 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13574 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13576 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13577 && test -z "${cf_tst_cflags}" \
13578 && cf_fix_cppflags=no
13583 if test -n "$cf_new_cflags" ; then
13585 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13586 CFLAGS="${CFLAGS}$cf_new_cflags"
13590 if test -n "$cf_new_cppflags" ; then
13592 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13593 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13597 if test -n "$cf_new_extra_cppflags" ; then
13599 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13600 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13604 cf_add_libs="$LIBS"
13607 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13608 # filter duplicates
13609 for cf_add_1lib in $cf_add_0lib; do
13610 for cf_add_2lib in $cf_add_libs; do
13611 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13616 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13618 LIBS="$cf_add_libs"
13625 echo "$as_me:13625: checking for XextCreateExtension in -lXext" >&5
13626 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
13627 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
13628 echo $ECHO_N "(cached) $ECHO_C" >&6
13630 ac_check_lib_save_LIBS=$LIBS
13631 LIBS="-lXext $LIBS"
13632 cat >"conftest.$ac_ext" <<_ACEOF
13633 #line 13633 "configure"
13634 #include "confdefs.h"
13636 /* Override any gcc2 internal prototype to avoid an error. */
13640 /* We use char because int might match the return type of a gcc2
13641 builtin and then its argument prototype would still apply. */
13642 char XextCreateExtension ();
13646 XextCreateExtension ();
13651 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13652 if { (eval echo "$as_me:13652: \"$ac_link\"") >&5
13653 (eval $ac_link) 2>&5
13655 echo "$as_me:13655: \$? = $ac_status" >&5
13656 (exit "$ac_status"); } &&
13657 { ac_try='test -s "conftest$ac_exeext"'
13658 { (eval echo "$as_me:13658: \"$ac_try\"") >&5
13659 (eval $ac_try) 2>&5
13661 echo "$as_me:13661: \$? = $ac_status" >&5
13662 (exit "$ac_status"); }; }; then
13663 ac_cv_lib_Xext_XextCreateExtension=yes
13665 echo "$as_me: failed program was:" >&5
13666 cat "conftest.$ac_ext" >&5
13667 ac_cv_lib_Xext_XextCreateExtension=no
13669 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13670 LIBS=$ac_check_lib_save_LIBS
13672 echo "$as_me:13672: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
13673 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
13674 if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
13676 cf_add_libs="$LIBS"
13679 for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13680 # filter duplicates
13681 for cf_add_1lib in $cf_add_0lib; do
13682 for cf_add_2lib in $cf_add_libs; do
13683 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13688 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13690 LIBS="$cf_add_libs"
13696 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
13697 # in some cases has installed dummy files in the former, other cases replaced
13698 # it with a link to the new location). This complicates the configure script.
13699 # Check for that pitfall, and recover using pkg-config
13701 # If none of these are set, the configuration is almost certainly broken.
13702 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
13705 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
13706 test -n "$verbose" && echo " found package x11" 1>&6
13708 echo "${as_me:-configure}:13708: testing found package x11 ..." 1>&5
13710 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
13711 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
13712 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
13714 echo "${as_me:-configure}:13714: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13716 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
13718 echo "${as_me:-configure}:13718: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
13723 cf_new_extra_cppflags=
13725 for cf_add_cflags in $cf_pkgconfig_incs
13727 case "$cf_fix_cppflags" in
13729 case "$cf_add_cflags" in
13730 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13731 case "$cf_add_cflags" in
13733 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13735 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13736 && test -z "${cf_tst_cflags}" \
13737 && cf_fix_cppflags=yes
13739 if test "$cf_fix_cppflags" = yes ; then
13741 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13742 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13745 elif test "${cf_tst_cflags}" = "\"'" ; then
13747 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13748 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13754 case "$CPPFLAGS" in
13758 case "$cf_add_cflags" in
13760 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13762 CPPFLAGS=`echo "$CPPFLAGS" | \
13763 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13764 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13769 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13770 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13777 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13778 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13785 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13786 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13788 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13790 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13791 && test -z "${cf_tst_cflags}" \
13792 && cf_fix_cppflags=no
13797 if test -n "$cf_new_cflags" ; then
13799 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13800 CFLAGS="${CFLAGS}$cf_new_cflags"
13804 if test -n "$cf_new_cppflags" ; then
13806 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13807 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13811 if test -n "$cf_new_extra_cppflags" ; then
13813 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13814 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13818 cf_add_libs="$LIBS"
13821 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13822 # filter duplicates
13823 for cf_add_1lib in $cf_add_0lib; do
13824 for cf_add_2lib in $cf_add_libs; do
13825 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13830 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13832 LIBS="$cf_add_libs"
13838 { echo "$as_me:13838: WARNING: unable to find X11 library" >&5
13839 echo "$as_me: WARNING: unable to find X11 library" >&2;}
13842 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
13843 test -n "$verbose" && echo " found package ice" 1>&6
13845 echo "${as_me:-configure}:13845: testing found package ice ..." 1>&5
13847 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
13848 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
13849 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
13851 echo "${as_me:-configure}:13851: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13853 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
13855 echo "${as_me:-configure}:13855: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
13860 cf_new_extra_cppflags=
13862 for cf_add_cflags in $cf_pkgconfig_incs
13864 case "$cf_fix_cppflags" in
13866 case "$cf_add_cflags" in
13867 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13868 case "$cf_add_cflags" in
13870 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13872 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13873 && test -z "${cf_tst_cflags}" \
13874 && cf_fix_cppflags=yes
13876 if test "$cf_fix_cppflags" = yes ; then
13878 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13879 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13882 elif test "${cf_tst_cflags}" = "\"'" ; then
13884 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13885 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13891 case "$CPPFLAGS" in
13895 case "$cf_add_cflags" in
13897 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13899 CPPFLAGS=`echo "$CPPFLAGS" | \
13900 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13901 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13906 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13907 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13914 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13915 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13922 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13923 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13925 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13927 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13928 && test -z "${cf_tst_cflags}" \
13929 && cf_fix_cppflags=no
13934 if test -n "$cf_new_cflags" ; then
13936 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13937 CFLAGS="${CFLAGS}$cf_new_cflags"
13941 if test -n "$cf_new_cppflags" ; then
13943 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13944 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13948 if test -n "$cf_new_extra_cppflags" ; then
13950 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13951 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13955 cf_add_libs="$LIBS"
13958 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13959 # filter duplicates
13960 for cf_add_1lib in $cf_add_0lib; do
13961 for cf_add_2lib in $cf_add_libs; do
13962 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13967 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13969 LIBS="$cf_add_libs"
13975 { echo "$as_me:13975: WARNING: unable to find ICE library" >&5
13976 echo "$as_me: WARNING: unable to find ICE library" >&2;}
13979 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
13980 test -n "$verbose" && echo " found package sm" 1>&6
13982 echo "${as_me:-configure}:13982: testing found package sm ..." 1>&5
13984 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
13985 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
13986 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
13988 echo "${as_me:-configure}:13988: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13990 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
13992 echo "${as_me:-configure}:13992: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
13997 cf_new_extra_cppflags=
13999 for cf_add_cflags in $cf_pkgconfig_incs
14001 case "$cf_fix_cppflags" in
14003 case "$cf_add_cflags" in
14004 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14005 case "$cf_add_cflags" in
14007 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14009 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14010 && test -z "${cf_tst_cflags}" \
14011 && cf_fix_cppflags=yes
14013 if test "$cf_fix_cppflags" = yes ; then
14015 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14016 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14019 elif test "${cf_tst_cflags}" = "\"'" ; then
14021 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14022 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14028 case "$CPPFLAGS" in
14032 case "$cf_add_cflags" in
14034 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14036 CPPFLAGS=`echo "$CPPFLAGS" | \
14037 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14038 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14043 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14044 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14051 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14052 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14059 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14060 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14062 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14064 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14065 && test -z "${cf_tst_cflags}" \
14066 && cf_fix_cppflags=no
14071 if test -n "$cf_new_cflags" ; then
14073 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14074 CFLAGS="${CFLAGS}$cf_new_cflags"
14078 if test -n "$cf_new_cppflags" ; then
14080 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14081 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14085 if test -n "$cf_new_extra_cppflags" ; then
14087 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14088 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14092 cf_add_libs="$LIBS"
14095 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14096 # filter duplicates
14097 for cf_add_1lib in $cf_add_0lib; do
14098 for cf_add_2lib in $cf_add_libs; do
14099 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14104 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14106 LIBS="$cf_add_libs"
14112 { echo "$as_me:14112: WARNING: unable to find SM library" >&5
14113 echo "$as_me: WARNING: unable to find SM library" >&2;}
14116 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
14117 test -n "$verbose" && echo " found package xt" 1>&6
14119 echo "${as_me:-configure}:14119: testing found package xt ..." 1>&5
14121 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
14122 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
14123 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
14125 echo "${as_me:-configure}:14125: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14127 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
14129 echo "${as_me:-configure}:14129: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
14134 cf_new_extra_cppflags=
14136 for cf_add_cflags in $cf_pkgconfig_incs
14138 case "$cf_fix_cppflags" in
14140 case "$cf_add_cflags" in
14141 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14142 case "$cf_add_cflags" in
14144 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14146 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14147 && test -z "${cf_tst_cflags}" \
14148 && cf_fix_cppflags=yes
14150 if test "$cf_fix_cppflags" = yes ; then
14152 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14153 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14156 elif test "${cf_tst_cflags}" = "\"'" ; then
14158 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14159 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14165 case "$CPPFLAGS" in
14169 case "$cf_add_cflags" in
14171 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14173 CPPFLAGS=`echo "$CPPFLAGS" | \
14174 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14175 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14180 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14181 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14188 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14189 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14196 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14197 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14199 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14201 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14202 && test -z "${cf_tst_cflags}" \
14203 && cf_fix_cppflags=no
14208 if test -n "$cf_new_cflags" ; then
14210 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14211 CFLAGS="${CFLAGS}$cf_new_cflags"
14215 if test -n "$cf_new_cppflags" ; then
14217 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14218 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14222 if test -n "$cf_new_extra_cppflags" ; then
14224 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14225 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14229 cf_add_libs="$LIBS"
14232 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14233 # filter duplicates
14234 for cf_add_1lib in $cf_add_0lib; do
14235 for cf_add_2lib in $cf_add_libs; do
14236 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14241 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14243 LIBS="$cf_add_libs"
14249 { echo "$as_me:14249: WARNING: unable to find Xt library" >&5
14250 echo "$as_me: WARNING: unable to find Xt library" >&2;}
14254 LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
14259 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
14260 test -n "$verbose" && echo " found package xt" 1>&6
14262 echo "${as_me:-configure}:14262: testing found package xt ..." 1>&5
14264 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
14265 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
14266 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
14268 echo "${as_me:-configure}:14268: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14270 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
14272 echo "${as_me:-configure}:14272: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
14277 cf_new_extra_cppflags=
14279 for cf_add_cflags in $cf_pkgconfig_incs
14281 case "$cf_fix_cppflags" in
14283 case "$cf_add_cflags" in
14284 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14285 case "$cf_add_cflags" in
14287 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14289 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14290 && test -z "${cf_tst_cflags}" \
14291 && cf_fix_cppflags=yes
14293 if test "$cf_fix_cppflags" = yes ; then
14295 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14296 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14299 elif test "${cf_tst_cflags}" = "\"'" ; then
14301 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14302 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14308 case "$CPPFLAGS" in
14312 case "$cf_add_cflags" in
14314 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14316 CPPFLAGS=`echo "$CPPFLAGS" | \
14317 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14318 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14323 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14324 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14331 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14332 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14339 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14340 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14342 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14344 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14345 && test -z "${cf_tst_cflags}" \
14346 && cf_fix_cppflags=no
14351 if test -n "$cf_new_cflags" ; then
14353 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14354 CFLAGS="${CFLAGS}$cf_new_cflags"
14358 if test -n "$cf_new_cppflags" ; then
14360 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14361 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14365 if test -n "$cf_new_extra_cppflags" ; then
14367 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14368 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14372 cf_add_libs="$LIBS"
14375 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14376 # filter duplicates
14377 for cf_add_1lib in $cf_add_0lib; do
14378 for cf_add_2lib in $cf_add_libs; do
14379 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14384 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14386 LIBS="$cf_add_libs"
14392 # we have an "xt" package, but it may omit Xt's dependency on X11
14393 echo "$as_me:14393: checking for usable X dependency" >&5
14394 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
14395 if test "${cf_cv_xt_x11_compat+set}" = set; then
14396 echo $ECHO_N "(cached) $ECHO_C" >&6
14399 cat >"conftest.$ac_ext" <<_ACEOF
14400 #line 14400 "configure"
14401 #include "confdefs.h"
14403 #include <X11/Xlib.h>
14409 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
14410 int rc2 = XClearWindow((Display*) 0, (Window) 0);
14411 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
14412 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
14418 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14419 if { (eval echo "$as_me:14419: \"$ac_link\"") >&5
14420 (eval $ac_link) 2>&5
14422 echo "$as_me:14422: \$? = $ac_status" >&5
14423 (exit "$ac_status"); } &&
14424 { ac_try='test -s "conftest$ac_exeext"'
14425 { (eval echo "$as_me:14425: \"$ac_try\"") >&5
14426 (eval $ac_try) 2>&5
14428 echo "$as_me:14428: \$? = $ac_status" >&5
14429 (exit "$ac_status"); }; }; then
14430 cf_cv_xt_x11_compat=yes
14432 echo "$as_me: failed program was:" >&5
14433 cat "conftest.$ac_ext" >&5
14434 cf_cv_xt_x11_compat=no
14436 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14438 echo "$as_me:14438: result: $cf_cv_xt_x11_compat" >&5
14439 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
14440 if test "$cf_cv_xt_x11_compat" = no
14442 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
14444 echo "${as_me:-configure}:14444: testing work around broken X11 dependency ..." 1>&5
14446 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
14448 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
14449 test -n "$verbose" && echo " found package x11" 1>&6
14451 echo "${as_me:-configure}:14451: testing found package x11 ..." 1>&5
14453 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
14454 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
14455 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
14457 echo "${as_me:-configure}:14457: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14459 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
14461 echo "${as_me:-configure}:14461: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
14466 cf_new_extra_cppflags=
14468 for cf_add_cflags in $cf_pkgconfig_incs
14470 case "$cf_fix_cppflags" in
14472 case "$cf_add_cflags" in
14473 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14474 case "$cf_add_cflags" in
14476 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14478 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14479 && test -z "${cf_tst_cflags}" \
14480 && cf_fix_cppflags=yes
14482 if test "$cf_fix_cppflags" = yes ; then
14484 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14485 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14488 elif test "${cf_tst_cflags}" = "\"'" ; then
14490 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14491 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14497 case "$CPPFLAGS" in
14501 case "$cf_add_cflags" in
14503 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14505 CPPFLAGS=`echo "$CPPFLAGS" | \
14506 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14507 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14512 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14513 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14520 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14521 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14528 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14529 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14531 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14533 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14534 && test -z "${cf_tst_cflags}" \
14535 && cf_fix_cppflags=no
14540 if test -n "$cf_new_cflags" ; then
14542 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14543 CFLAGS="${CFLAGS}$cf_new_cflags"
14547 if test -n "$cf_new_cppflags" ; then
14549 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14550 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14554 if test -n "$cf_new_extra_cppflags" ; then
14556 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14557 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14561 cf_add_libs="$LIBS"
14564 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14565 # filter duplicates
14566 for cf_add_1lib in $cf_add_0lib; do
14567 for cf_add_2lib in $cf_add_libs; do
14568 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14573 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14575 LIBS="$cf_add_libs"
14582 test -n "$verbose" && echo " ...before $LIBS" 1>&6
14584 echo "${as_me:-configure}:14584: testing ...before $LIBS ..." 1>&5
14586 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
14587 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14589 echo "${as_me:-configure}:14589: testing ...after $LIBS ..." 1>&5
14597 echo "$as_me:14597: checking for usable X Toolkit package" >&5
14598 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
14599 if test "${cf_cv_xt_ice_compat+set}" = set; then
14600 echo $ECHO_N "(cached) $ECHO_C" >&6
14603 cat >"conftest.$ac_ext" <<_ACEOF
14604 #line 14604 "configure"
14605 #include "confdefs.h"
14607 #include <X11/Shell.h>
14612 int num = IceConnectionNumber(0); (void) num
14618 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14619 if { (eval echo "$as_me:14619: \"$ac_link\"") >&5
14620 (eval $ac_link) 2>&5
14622 echo "$as_me:14622: \$? = $ac_status" >&5
14623 (exit "$ac_status"); } &&
14624 { ac_try='test -s "conftest$ac_exeext"'
14625 { (eval echo "$as_me:14625: \"$ac_try\"") >&5
14626 (eval $ac_try) 2>&5
14628 echo "$as_me:14628: \$? = $ac_status" >&5
14629 (exit "$ac_status"); }; }; then
14630 cf_cv_xt_ice_compat=yes
14632 echo "$as_me: failed program was:" >&5
14633 cat "conftest.$ac_ext" >&5
14634 cf_cv_xt_ice_compat=no
14636 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14638 echo "$as_me:14638: result: $cf_cv_xt_ice_compat" >&5
14639 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
14641 if test "$cf_cv_xt_ice_compat" = no
14643 # workaround for broken ".pc" files used for X Toolkit.
14644 case "x$X_PRE_LIBS" in
14650 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
14652 echo "${as_me:-configure}:14652: testing work around broken ICE dependency ..." 1>&5
14654 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
14655 test -n "$verbose" && echo " found package ice" 1>&6
14657 echo "${as_me:-configure}:14657: testing found package ice ..." 1>&5
14659 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
14660 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
14661 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
14663 echo "${as_me:-configure}:14663: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14665 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
14667 echo "${as_me:-configure}:14667: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
14672 cf_new_extra_cppflags=
14674 for cf_add_cflags in $cf_pkgconfig_incs
14676 case "$cf_fix_cppflags" in
14678 case "$cf_add_cflags" in
14679 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14680 case "$cf_add_cflags" in
14682 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14684 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14685 && test -z "${cf_tst_cflags}" \
14686 && cf_fix_cppflags=yes
14688 if test "$cf_fix_cppflags" = yes ; then
14690 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14691 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14694 elif test "${cf_tst_cflags}" = "\"'" ; then
14696 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14697 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14703 case "$CPPFLAGS" in
14707 case "$cf_add_cflags" in
14709 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14711 CPPFLAGS=`echo "$CPPFLAGS" | \
14712 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14713 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14718 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14719 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14726 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14727 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14734 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14735 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14737 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14739 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14740 && test -z "${cf_tst_cflags}" \
14741 && cf_fix_cppflags=no
14746 if test -n "$cf_new_cflags" ; then
14748 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14749 CFLAGS="${CFLAGS}$cf_new_cflags"
14753 if test -n "$cf_new_cppflags" ; then
14755 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14756 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14760 if test -n "$cf_new_extra_cppflags" ; then
14762 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14763 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14767 cf_add_libs="$LIBS"
14770 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14771 # filter duplicates
14772 for cf_add_1lib in $cf_add_0lib; do
14773 for cf_add_2lib in $cf_add_libs; do
14774 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14779 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14781 LIBS="$cf_add_libs"
14783 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
14784 test -n "$verbose" && echo " found package sm" 1>&6
14786 echo "${as_me:-configure}:14786: testing found package sm ..." 1>&5
14788 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
14789 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
14790 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
14792 echo "${as_me:-configure}:14792: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14794 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
14796 echo "${as_me:-configure}:14796: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
14801 cf_new_extra_cppflags=
14803 for cf_add_cflags in $cf_pkgconfig_incs
14805 case "$cf_fix_cppflags" in
14807 case "$cf_add_cflags" in
14808 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14809 case "$cf_add_cflags" in
14811 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14813 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14814 && test -z "${cf_tst_cflags}" \
14815 && cf_fix_cppflags=yes
14817 if test "$cf_fix_cppflags" = yes ; then
14819 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14820 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14823 elif test "${cf_tst_cflags}" = "\"'" ; then
14825 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14826 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14832 case "$CPPFLAGS" in
14836 case "$cf_add_cflags" in
14838 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14840 CPPFLAGS=`echo "$CPPFLAGS" | \
14841 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14842 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14847 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14848 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14855 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14856 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14863 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14864 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14866 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14868 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14869 && test -z "${cf_tst_cflags}" \
14870 && cf_fix_cppflags=no
14875 if test -n "$cf_new_cflags" ; then
14877 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14878 CFLAGS="${CFLAGS}$cf_new_cflags"
14882 if test -n "$cf_new_cppflags" ; then
14884 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14885 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14889 if test -n "$cf_new_extra_cppflags" ; then
14891 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14892 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14896 cf_add_libs="$LIBS"
14899 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14900 # filter duplicates
14901 for cf_add_1lib in $cf_add_0lib; do
14902 for cf_add_2lib in $cf_add_libs; do
14903 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14908 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14910 LIBS="$cf_add_libs"
14923 test -n "$verbose" && echo " ...before $LIBS" 1>&6
14925 echo "${as_me:-configure}:14925: testing ...before $LIBS ..." 1>&5
14927 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
14928 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14930 echo "${as_me:-configure}:14930: testing ...after $LIBS ..." 1>&5
14946 LDFLAGS="$X_LIBS $LDFLAGS"
14948 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
14950 echo "${as_me:-configure}:14950: testing checking additions to CFLAGS ..." 1>&5
14952 cf_check_cflags="$CFLAGS"
14953 cf_check_cppflags="$CPPFLAGS"
14958 cf_new_extra_cppflags=
14960 for cf_add_cflags in $X_CFLAGS
14962 case "$cf_fix_cppflags" in
14964 case "$cf_add_cflags" in
14965 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14966 case "$cf_add_cflags" in
14968 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14970 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14971 && test -z "${cf_tst_cflags}" \
14972 && cf_fix_cppflags=yes
14974 if test "$cf_fix_cppflags" = yes ; then
14976 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14977 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14980 elif test "${cf_tst_cflags}" = "\"'" ; then
14982 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14983 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14989 case "$CPPFLAGS" in
14993 case "$cf_add_cflags" in
14995 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14997 CPPFLAGS=`echo "$CPPFLAGS" | \
14998 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14999 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15004 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15005 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15012 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15013 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15020 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15021 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15023 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15025 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15026 && test -z "${cf_tst_cflags}" \
15027 && cf_fix_cppflags=no
15032 if test -n "$cf_new_cflags" ; then
15033 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
15035 echo "${as_me:-configure}:15035: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
15037 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15038 CFLAGS="${CFLAGS}$cf_new_cflags"
15042 if test -n "$cf_new_cppflags" ; then
15043 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
15045 echo "${as_me:-configure}:15045: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
15047 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15048 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15052 if test -n "$cf_new_extra_cppflags" ; then
15053 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
15055 echo "${as_me:-configure}:15055: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
15057 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15058 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15062 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
15063 cat >"conftest.$ac_ext" <<_ACEOF
15064 #line 15064 "configure"
15065 #include "confdefs.h"
15070 printf("Hello world");
15075 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15076 if { (eval echo "$as_me:15076: \"$ac_link\"") >&5
15077 (eval $ac_link) 2>&5
15079 echo "$as_me:15079: \$? = $ac_status" >&5
15080 (exit "$ac_status"); } &&
15081 { ac_try='test -s "conftest$ac_exeext"'
15082 { (eval echo "$as_me:15082: \"$ac_try\"") >&5
15083 (eval $ac_try) 2>&5
15085 echo "$as_me:15085: \$? = $ac_status" >&5
15086 (exit "$ac_status"); }; }; then
15089 echo "$as_me: failed program was:" >&5
15090 cat "conftest.$ac_ext" >&5
15091 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
15093 echo "${as_me:-configure}:15093: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
15095 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
15096 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
15098 echo "${as_me:-configure}:15098: testing but keeping change to \$CPPFLAGS ..." 1>&5
15101 CFLAGS="$cf_check_cflags"
15103 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15106 echo "$as_me:15106: checking for XOpenDisplay" >&5
15107 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
15108 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
15109 echo $ECHO_N "(cached) $ECHO_C" >&6
15111 cat >"conftest.$ac_ext" <<_ACEOF
15112 #line 15112 "configure"
15113 #include "confdefs.h"
15114 #define XOpenDisplay autoconf_temporary
15115 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15116 #undef XOpenDisplay
15122 /* We use char because int might match the return type of a gcc2
15123 builtin and then its argument prototype would still apply. */
15124 char XOpenDisplay (void);
15130 /* The GNU C library defines stubs for functions which it implements
15131 to always fail with ENOSYS. Some functions are actually named
15132 something starting with __ and the normal name is an alias. */
15133 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
15134 #error found stub for XOpenDisplay
15137 return XOpenDisplay ();
15142 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15143 if { (eval echo "$as_me:15143: \"$ac_link\"") >&5
15144 (eval $ac_link) 2>&5
15146 echo "$as_me:15146: \$? = $ac_status" >&5
15147 (exit "$ac_status"); } &&
15148 { ac_try='test -s "conftest$ac_exeext"'
15149 { (eval echo "$as_me:15149: \"$ac_try\"") >&5
15150 (eval $ac_try) 2>&5
15152 echo "$as_me:15152: \$? = $ac_status" >&5
15153 (exit "$ac_status"); }; }; then
15154 ac_cv_func_XOpenDisplay=yes
15156 echo "$as_me: failed program was:" >&5
15157 cat "conftest.$ac_ext" >&5
15158 ac_cv_func_XOpenDisplay=no
15160 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15162 echo "$as_me:15162: result: $ac_cv_func_XOpenDisplay" >&5
15163 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
15164 if test "$ac_cv_func_XOpenDisplay" = yes; then
15168 echo "$as_me:15168: checking for XOpenDisplay in -lX11" >&5
15169 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
15170 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
15171 echo $ECHO_N "(cached) $ECHO_C" >&6
15173 ac_check_lib_save_LIBS=$LIBS
15175 cat >"conftest.$ac_ext" <<_ACEOF
15176 #line 15176 "configure"
15177 #include "confdefs.h"
15179 /* Override any gcc2 internal prototype to avoid an error. */
15183 /* We use char because int might match the return type of a gcc2
15184 builtin and then its argument prototype would still apply. */
15185 char XOpenDisplay ();
15194 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15195 if { (eval echo "$as_me:15195: \"$ac_link\"") >&5
15196 (eval $ac_link) 2>&5
15198 echo "$as_me:15198: \$? = $ac_status" >&5
15199 (exit "$ac_status"); } &&
15200 { ac_try='test -s "conftest$ac_exeext"'
15201 { (eval echo "$as_me:15201: \"$ac_try\"") >&5
15202 (eval $ac_try) 2>&5
15204 echo "$as_me:15204: \$? = $ac_status" >&5
15205 (exit "$ac_status"); }; }; then
15206 ac_cv_lib_X11_XOpenDisplay=yes
15208 echo "$as_me: failed program was:" >&5
15209 cat "conftest.$ac_ext" >&5
15210 ac_cv_lib_X11_XOpenDisplay=no
15212 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15213 LIBS=$ac_check_lib_save_LIBS
15215 echo "$as_me:15215: result: $ac_cv_lib_X11_XOpenDisplay" >&5
15216 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
15217 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
15219 cf_add_libs="$LIBS"
15222 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15223 # filter duplicates
15224 for cf_add_1lib in $cf_add_0lib; do
15225 for cf_add_2lib in $cf_add_libs; do
15226 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15231 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15233 LIBS="$cf_add_libs"
15239 echo "$as_me:15239: checking for XtAppInitialize" >&5
15240 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
15241 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
15242 echo $ECHO_N "(cached) $ECHO_C" >&6
15244 cat >"conftest.$ac_ext" <<_ACEOF
15245 #line 15245 "configure"
15246 #include "confdefs.h"
15247 #define XtAppInitialize autoconf_temporary
15248 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15249 #undef XtAppInitialize
15255 /* We use char because int might match the return type of a gcc2
15256 builtin and then its argument prototype would still apply. */
15257 char XtAppInitialize (void);
15263 /* The GNU C library defines stubs for functions which it implements
15264 to always fail with ENOSYS. Some functions are actually named
15265 something starting with __ and the normal name is an alias. */
15266 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
15267 #error found stub for XtAppInitialize
15270 return XtAppInitialize ();
15275 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15276 if { (eval echo "$as_me:15276: \"$ac_link\"") >&5
15277 (eval $ac_link) 2>&5
15279 echo "$as_me:15279: \$? = $ac_status" >&5
15280 (exit "$ac_status"); } &&
15281 { ac_try='test -s "conftest$ac_exeext"'
15282 { (eval echo "$as_me:15282: \"$ac_try\"") >&5
15283 (eval $ac_try) 2>&5
15285 echo "$as_me:15285: \$? = $ac_status" >&5
15286 (exit "$ac_status"); }; }; then
15287 ac_cv_func_XtAppInitialize=yes
15289 echo "$as_me: failed program was:" >&5
15290 cat "conftest.$ac_ext" >&5
15291 ac_cv_func_XtAppInitialize=no
15293 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15295 echo "$as_me:15295: result: $ac_cv_func_XtAppInitialize" >&5
15296 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
15297 if test "$ac_cv_func_XtAppInitialize" = yes; then
15301 echo "$as_me:15301: checking for XtAppInitialize in -lXt" >&5
15302 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
15303 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
15304 echo $ECHO_N "(cached) $ECHO_C" >&6
15306 ac_check_lib_save_LIBS=$LIBS
15308 cat >"conftest.$ac_ext" <<_ACEOF
15309 #line 15309 "configure"
15310 #include "confdefs.h"
15312 /* Override any gcc2 internal prototype to avoid an error. */
15316 /* We use char because int might match the return type of a gcc2
15317 builtin and then its argument prototype would still apply. */
15318 char XtAppInitialize ();
15322 XtAppInitialize ();
15327 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15328 if { (eval echo "$as_me:15328: \"$ac_link\"") >&5
15329 (eval $ac_link) 2>&5
15331 echo "$as_me:15331: \$? = $ac_status" >&5
15332 (exit "$ac_status"); } &&
15333 { ac_try='test -s "conftest$ac_exeext"'
15334 { (eval echo "$as_me:15334: \"$ac_try\"") >&5
15335 (eval $ac_try) 2>&5
15337 echo "$as_me:15337: \$? = $ac_status" >&5
15338 (exit "$ac_status"); }; }; then
15339 ac_cv_lib_Xt_XtAppInitialize=yes
15341 echo "$as_me: failed program was:" >&5
15342 cat "conftest.$ac_ext" >&5
15343 ac_cv_lib_Xt_XtAppInitialize=no
15345 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15346 LIBS=$ac_check_lib_save_LIBS
15348 echo "$as_me:15348: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
15349 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
15350 if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
15352 cat >>confdefs.h <<\EOF
15353 #define HAVE_LIBXT 1
15364 if test "$cf_have_X_LIBS" = no ; then
15365 { echo "$as_me:15365: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15366 test program. You will have to check and add the proper libraries by hand
15368 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15369 test program. You will have to check and add the proper libraries by hand
15370 to makefile." >&2;}
15373 cf_x_athena_root=$cf_x_athena
15376 for cf_path in default \
15377 /usr/contrib/X11R6 \
15378 /usr/contrib/X11R5 \
15382 if test -z "$cf_x_athena_inc" ; then
15384 cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
15385 cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
15386 cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
15387 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15388 for cf_X_CFLAGS in $X_CFLAGS
15390 case "x$cf_X_CFLAGS" in
15392 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15395 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15400 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
15401 if test "$cf_path" != default ; then
15403 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15404 CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
15406 echo "$as_me:15406: checking for $cf_test in $cf_path" >&5
15407 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
15409 echo "$as_me:15409: checking for $cf_test" >&5
15410 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
15412 cat >"conftest.$ac_ext" <<_ACEOF
15413 #line 15413 "configure"
15414 #include "confdefs.h"
15416 #include <X11/Intrinsic.h>
15417 #include <$cf_test>
15426 rm -f "conftest.$ac_objext"
15427 if { (eval echo "$as_me:15427: \"$ac_compile\"") >&5
15428 (eval $ac_compile) 2>&5
15430 echo "$as_me:15430: \$? = $ac_status" >&5
15431 (exit "$ac_status"); } &&
15432 { ac_try='test -s "conftest.$ac_objext"'
15433 { (eval echo "$as_me:15433: \"$ac_try\"") >&5
15434 (eval $ac_try) 2>&5
15436 echo "$as_me:15436: \$? = $ac_status" >&5
15437 (exit "$ac_status"); }; }; then
15440 echo "$as_me: failed program was:" >&5
15441 cat "conftest.$ac_ext" >&5
15444 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15445 echo "$as_me:15445: result: $cf_result" >&5
15446 echo "${ECHO_T}$cf_result" >&6
15448 LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
15449 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
15450 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
15452 if test "$cf_result" = yes ; then
15453 test "$cf_path" = default && cf_x_athena_inc=default
15454 test "$cf_path" != default && cf_x_athena_inc="$cf_path/include"
15460 if test -z "$cf_x_athena_inc" ; then
15461 { echo "$as_me:15461: WARNING: Unable to find Athena header files" >&5
15462 echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
15463 elif test "$cf_x_athena_inc" != default ; then
15465 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15466 CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
15470 cf_x_athena_root=$cf_x_athena
15473 for cf_path in default \
15474 /usr/contrib/X11R6 \
15475 /usr/contrib/X11R5 \
15480 ${cf_x_athena_root} \
15481 ${cf_x_athena_root}7 \
15482 ${cf_x_athena_root}6
15485 "-l$cf_lib -lXmu" \
15486 "-l$cf_lib -lXpm -lXmu" \
15487 "-l${cf_lib}_s -lXmu_s"
15489 test -n "$cf_x_athena_lib" && break
15491 cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
15492 cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
15493 cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
15494 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15495 for cf_X_CFLAGS in $X_CFLAGS
15497 case "x$cf_X_CFLAGS" in
15499 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15502 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15507 cf_test=XawSimpleMenuAddGlobalActions
15508 test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
15510 cf_add_libs="$LIBS"
15513 for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15514 # filter duplicates
15515 for cf_add_1lib in $cf_add_0lib; do
15516 for cf_add_2lib in $cf_add_libs; do
15517 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15522 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15524 LIBS="$cf_add_libs"
15526 echo "$as_me:15526: checking for $cf_test in $cf_libs" >&5
15527 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
15528 cat >"conftest.$ac_ext" <<_ACEOF
15529 #line 15529 "configure"
15530 #include "confdefs.h"
15532 #include <X11/Intrinsic.h>
15533 #include <X11/$cf_x_athena_root/SimpleMenu.h>
15539 $cf_test((XtAppContext) 0)
15544 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15545 if { (eval echo "$as_me:15545: \"$ac_link\"") >&5
15546 (eval $ac_link) 2>&5
15548 echo "$as_me:15548: \$? = $ac_status" >&5
15549 (exit "$ac_status"); } &&
15550 { ac_try='test -s "conftest$ac_exeext"'
15551 { (eval echo "$as_me:15551: \"$ac_try\"") >&5
15552 (eval $ac_try) 2>&5
15554 echo "$as_me:15554: \$? = $ac_status" >&5
15555 (exit "$ac_status"); }; }; then
15558 echo "$as_me: failed program was:" >&5
15559 cat "conftest.$ac_ext" >&5
15562 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15563 echo "$as_me:15563: result: $cf_result" >&5
15564 echo "${ECHO_T}$cf_result" >&6
15566 LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
15567 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
15568 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
15570 if test "$cf_result" = yes ; then
15571 cf_x_athena_lib="$cf_libs"
15575 test -n "$cf_x_athena_lib" && break
15579 if test -z "$cf_x_athena_lib" ; then
15580 { { echo "$as_me:15580: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
15581 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
15582 { (exit 1); exit 1; }; }
15585 cf_add_libs="$LIBS"
15588 for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15589 # filter duplicates
15590 for cf_add_1lib in $cf_add_0lib; do
15591 for cf_add_2lib in $cf_add_libs; do
15592 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15597 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15599 LIBS="$cf_add_libs"
15601 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15603 cat >>confdefs.h <<EOF
15604 #define $cf_x_athena_LIBS 1
15609 if test -n "$ac_tool_prefix"; then
15610 for ac_prog in xcurses-config
15612 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
15613 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
15614 echo "$as_me:15614: checking for $ac_word" >&5
15615 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15616 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
15617 echo $ECHO_N "(cached) $ECHO_C" >&6
15619 if test -n "$XCURSES_CONFIG"; then
15620 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
15622 ac_save_IFS=$IFS; IFS=$ac_path_separator
15624 for ac_dir in $ac_dummy; do
15626 test -z "$ac_dir" && ac_dir=.
15627 $as_executable_p "$ac_dir/$ac_word" || continue
15628 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
15629 echo "$as_me:15629: found $ac_dir/$ac_word" >&5
15635 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
15636 if test -n "$XCURSES_CONFIG"; then
15637 echo "$as_me:15637: result: $XCURSES_CONFIG" >&5
15638 echo "${ECHO_T}$XCURSES_CONFIG" >&6
15640 echo "$as_me:15640: result: no" >&5
15641 echo "${ECHO_T}no" >&6
15644 test -n "$XCURSES_CONFIG" && break
15647 if test -z "$XCURSES_CONFIG"; then
15648 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
15649 for ac_prog in xcurses-config
15651 # Extract the first word of "$ac_prog", so it can be a program name with args.
15652 set dummy $ac_prog; ac_word=$2
15653 echo "$as_me:15653: checking for $ac_word" >&5
15654 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15655 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
15656 echo $ECHO_N "(cached) $ECHO_C" >&6
15658 if test -n "$ac_ct_XCURSES_CONFIG"; then
15659 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
15661 ac_save_IFS=$IFS; IFS=$ac_path_separator
15663 for ac_dir in $ac_dummy; do
15665 test -z "$ac_dir" && ac_dir=.
15666 $as_executable_p "$ac_dir/$ac_word" || continue
15667 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
15668 echo "$as_me:15668: found $ac_dir/$ac_word" >&5
15674 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
15675 if test -n "$ac_ct_XCURSES_CONFIG"; then
15676 echo "$as_me:15676: result: $ac_ct_XCURSES_CONFIG" >&5
15677 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
15679 echo "$as_me:15679: result: no" >&5
15680 echo "${ECHO_T}no" >&6
15683 test -n "$ac_ct_XCURSES_CONFIG" && break
15685 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
15687 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
15690 if test "$XCURSES_CONFIG" != none ; then
15695 cf_new_extra_cppflags=
15697 for cf_add_cflags in `$XCURSES_CONFIG --cflags`
15699 case "$cf_fix_cppflags" in
15701 case "$cf_add_cflags" in
15702 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15703 case "$cf_add_cflags" in
15705 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15707 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15708 && test -z "${cf_tst_cflags}" \
15709 && cf_fix_cppflags=yes
15711 if test "$cf_fix_cppflags" = yes ; then
15713 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15714 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15717 elif test "${cf_tst_cflags}" = "\"'" ; then
15719 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15720 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15726 case "$CPPFLAGS" in
15730 case "$cf_add_cflags" in
15732 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15734 CPPFLAGS=`echo "$CPPFLAGS" | \
15735 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15736 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15741 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15742 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15749 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15750 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15757 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15758 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15760 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15762 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15763 && test -z "${cf_tst_cflags}" \
15764 && cf_fix_cppflags=no
15769 if test -n "$cf_new_cflags" ; then
15771 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15772 CFLAGS="${CFLAGS}$cf_new_cflags"
15776 if test -n "$cf_new_cppflags" ; then
15778 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15779 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15783 if test -n "$cf_new_extra_cppflags" ; then
15785 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15786 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15790 cf_add_libs="$LIBS"
15793 for cf_add_1lib in `$XCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15794 # filter duplicates
15795 for cf_add_1lib in $cf_add_0lib; do
15796 for cf_add_2lib in $cf_add_libs; do
15797 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15802 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15804 LIBS="$cf_add_libs"
15806 cf_cv_lib_XCurses=yes
15810 LDFLAGS="$LDFLAGS $X_LIBS"
15812 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
15814 echo "${as_me:-configure}:15814: testing checking additions to CFLAGS ..." 1>&5
15816 cf_check_cflags="$CFLAGS"
15817 cf_check_cppflags="$CPPFLAGS"
15822 cf_new_extra_cppflags=
15824 for cf_add_cflags in $X_CFLAGS
15826 case "$cf_fix_cppflags" in
15828 case "$cf_add_cflags" in
15829 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15830 case "$cf_add_cflags" in
15832 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15834 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15835 && test -z "${cf_tst_cflags}" \
15836 && cf_fix_cppflags=yes
15838 if test "$cf_fix_cppflags" = yes ; then
15840 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15841 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15844 elif test "${cf_tst_cflags}" = "\"'" ; then
15846 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15847 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15853 case "$CPPFLAGS" in
15857 case "$cf_add_cflags" in
15859 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15861 CPPFLAGS=`echo "$CPPFLAGS" | \
15862 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15863 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15868 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15869 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15876 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15877 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15884 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15885 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15887 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15889 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15890 && test -z "${cf_tst_cflags}" \
15891 && cf_fix_cppflags=no
15896 if test -n "$cf_new_cflags" ; then
15897 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
15899 echo "${as_me:-configure}:15899: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
15901 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15902 CFLAGS="${CFLAGS}$cf_new_cflags"
15906 if test -n "$cf_new_cppflags" ; then
15907 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
15909 echo "${as_me:-configure}:15909: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
15911 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15912 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15916 if test -n "$cf_new_extra_cppflags" ; then
15917 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
15919 echo "${as_me:-configure}:15919: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
15921 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15922 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15926 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
15927 cat >"conftest.$ac_ext" <<_ACEOF
15928 #line 15928 "configure"
15929 #include "confdefs.h"
15934 printf("Hello world");
15939 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15940 if { (eval echo "$as_me:15940: \"$ac_link\"") >&5
15941 (eval $ac_link) 2>&5
15943 echo "$as_me:15943: \$? = $ac_status" >&5
15944 (exit "$ac_status"); } &&
15945 { ac_try='test -s "conftest$ac_exeext"'
15946 { (eval echo "$as_me:15946: \"$ac_try\"") >&5
15947 (eval $ac_try) 2>&5
15949 echo "$as_me:15949: \$? = $ac_status" >&5
15950 (exit "$ac_status"); }; }; then
15953 echo "$as_me: failed program was:" >&5
15954 cat "conftest.$ac_ext" >&5
15955 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
15957 echo "${as_me:-configure}:15957: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
15959 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
15960 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
15962 echo "${as_me:-configure}:15962: testing but keeping change to \$CPPFLAGS ..." 1>&5
15965 CFLAGS="$cf_check_cflags"
15967 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15970 echo "$as_me:15970: checking for XOpenDisplay in -lX11" >&5
15971 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
15972 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
15973 echo $ECHO_N "(cached) $ECHO_C" >&6
15975 ac_check_lib_save_LIBS=$LIBS
15976 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
15977 cat >"conftest.$ac_ext" <<_ACEOF
15978 #line 15978 "configure"
15979 #include "confdefs.h"
15981 /* Override any gcc2 internal prototype to avoid an error. */
15985 /* We use char because int might match the return type of a gcc2
15986 builtin and then its argument prototype would still apply. */
15987 char XOpenDisplay ();
15996 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15997 if { (eval echo "$as_me:15997: \"$ac_link\"") >&5
15998 (eval $ac_link) 2>&5
16000 echo "$as_me:16000: \$? = $ac_status" >&5
16001 (exit "$ac_status"); } &&
16002 { ac_try='test -s "conftest$ac_exeext"'
16003 { (eval echo "$as_me:16003: \"$ac_try\"") >&5
16004 (eval $ac_try) 2>&5
16006 echo "$as_me:16006: \$? = $ac_status" >&5
16007 (exit "$ac_status"); }; }; then
16008 ac_cv_lib_X11_XOpenDisplay=yes
16010 echo "$as_me: failed program was:" >&5
16011 cat "conftest.$ac_ext" >&5
16012 ac_cv_lib_X11_XOpenDisplay=no
16014 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16015 LIBS=$ac_check_lib_save_LIBS
16017 echo "$as_me:16017: result: $ac_cv_lib_X11_XOpenDisplay" >&5
16018 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
16019 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
16021 cf_add_libs="$LIBS"
16024 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16025 # filter duplicates
16026 for cf_add_1lib in $cf_add_0lib; do
16027 for cf_add_2lib in $cf_add_libs; do
16028 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16033 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16035 LIBS="$cf_add_libs"
16039 echo "$as_me:16039: checking for XCurses library" >&5
16040 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
16041 if test "${cf_cv_lib_XCurses+set}" = set; then
16042 echo $ECHO_N "(cached) $ECHO_C" >&6
16045 cf_add_libs="$LIBS"
16048 for cf_add_1lib in -lXCurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16049 # filter duplicates
16050 for cf_add_1lib in $cf_add_0lib; do
16051 for cf_add_2lib in $cf_add_libs; do
16052 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16057 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16059 LIBS="$cf_add_libs"
16061 cat >"conftest.$ac_ext" <<_ACEOF
16062 #line 16062 "configure"
16063 #include "confdefs.h"
16065 #include <xcurses.h>
16066 char *XCursesProgramName = "test";
16076 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16077 if { (eval echo "$as_me:16077: \"$ac_link\"") >&5
16078 (eval $ac_link) 2>&5
16080 echo "$as_me:16080: \$? = $ac_status" >&5
16081 (exit "$ac_status"); } &&
16082 { ac_try='test -s "conftest$ac_exeext"'
16083 { (eval echo "$as_me:16083: \"$ac_try\"") >&5
16084 (eval $ac_try) 2>&5
16086 echo "$as_me:16086: \$? = $ac_status" >&5
16087 (exit "$ac_status"); }; }; then
16088 cf_cv_lib_XCurses=yes
16090 echo "$as_me: failed program was:" >&5
16091 cat "conftest.$ac_ext" >&5
16092 cf_cv_lib_XCurses=no
16094 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16097 echo "$as_me:16097: result: $cf_cv_lib_XCurses" >&5
16098 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
16102 if test "$cf_cv_lib_XCurses" = yes ; then
16104 cat >>confdefs.h <<\EOF
16108 cat >>confdefs.h <<\EOF
16112 echo "$as_me:16112: checking for xcurses.h" >&5
16113 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
16114 if test "${ac_cv_header_xcurses_h+set}" = set; then
16115 echo $ECHO_N "(cached) $ECHO_C" >&6
16117 cat >"conftest.$ac_ext" <<_ACEOF
16118 #line 16118 "configure"
16119 #include "confdefs.h"
16120 #include <xcurses.h>
16122 if { (eval echo "$as_me:16122: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16123 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16125 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16127 cat conftest.err >&5
16128 echo "$as_me:16128: \$? = $ac_status" >&5
16129 (exit "$ac_status"); } >/dev/null; then
16130 if test -s conftest.err; then
16131 ac_cpp_err=$ac_c_preproc_warn_flag
16138 if test -z "$ac_cpp_err"; then
16139 ac_cv_header_xcurses_h=yes
16141 echo "$as_me: failed program was:" >&5
16142 cat "conftest.$ac_ext" >&5
16143 ac_cv_header_xcurses_h=no
16145 rm -f conftest.err "conftest.$ac_ext"
16147 echo "$as_me:16147: result: $ac_cv_header_xcurses_h" >&5
16148 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
16149 if test "$ac_cv_header_xcurses_h" = yes; then
16151 cat >>confdefs.h <<\EOF
16152 #define HAVE_XCURSES 1
16158 { { echo "$as_me:16158: error: Cannot link with XCurses" >&5
16159 echo "$as_me: error: Cannot link with XCurses" >&2;}
16160 { (exit 1); exit 1; }; }
16165 { { echo "$as_me:16165: error: unexpected screen-value: $cf_cv_screen" >&5
16166 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
16167 { (exit 1); exit 1; }; }
16171 : ${cf_nculib_root:=$cf_cv_screen}
16172 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
16173 echo "$as_me:16173: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
16174 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
16175 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16176 echo $ECHO_N "(cached) $ECHO_C" >&6
16178 ac_check_lib_save_LIBS=$LIBS
16179 LIBS="-l$cf_nculib_root $LIBS"
16180 cat >"conftest.$ac_ext" <<_ACEOF
16181 #line 16181 "configure"
16182 #include "confdefs.h"
16184 /* Override any gcc2 internal prototype to avoid an error. */
16188 /* We use char because int might match the return type of a gcc2
16189 builtin and then its argument prototype would still apply. */
16190 char _nc_init_pthreads ();
16194 _nc_init_pthreads ();
16199 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16200 if { (eval echo "$as_me:16200: \"$ac_link\"") >&5
16201 (eval $ac_link) 2>&5
16203 echo "$as_me:16203: \$? = $ac_status" >&5
16204 (exit "$ac_status"); } &&
16205 { ac_try='test -s "conftest$ac_exeext"'
16206 { (eval echo "$as_me:16206: \"$ac_try\"") >&5
16207 (eval $ac_try) 2>&5
16209 echo "$as_me:16209: \$? = $ac_status" >&5
16210 (exit "$ac_status"); }; }; then
16211 eval "$as_ac_Lib=yes"
16213 echo "$as_me: failed program was:" >&5
16214 cat "conftest.$ac_ext" >&5
16215 eval "$as_ac_Lib=no"
16217 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16218 LIBS=$ac_check_lib_save_LIBS
16220 echo "$as_me:16220: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
16221 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
16222 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
16223 cf_cv_ncurses_pthreads=yes
16225 cf_cv_ncurses_pthreads=no
16228 if test "$cf_cv_ncurses_pthreads" = yes
16231 cf_add_libs="$LIBS"
16234 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16235 # filter duplicates
16236 for cf_add_1lib in $cf_add_0lib; do
16237 for cf_add_2lib in $cf_add_libs; do
16238 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16243 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16245 LIBS="$cf_add_libs"
16249 case $cf_cv_screen in
16251 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
16255 echo "$as_me:16255: checking for X11 rgb file" >&5
16256 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
16258 # Check whether --with-x11-rgb or --without-x11-rgb was given.
16259 if test "${with_x11_rgb+set}" = set; then
16260 withval="$with_x11_rgb"
16266 if test "x$RGB_PATH" = xauto
16268 RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
16270 /opt/local/share/X11/rgb.txt \
16271 /opt/X11/share/X11/rgb.txt \
16272 /usr/share/X11/rgb.txt \
16273 /usr/X11/share/X11/rgb.txt \
16274 /usr/X11/lib/X11/rgb.txt \
16275 /usr/lib/X11/rgb.txt \
16277 /usr/pkg/lib/X11/rgb.txt \
16278 /usr/X11R7/lib/X11/rgb.txt \
16279 /usr/X11R6/lib/X11/rgb.txt \
16280 /usr/X11R5/lib/X11/rgb.txt \
16281 /usr/X11R4/lib/X11/rgb.txt \
16282 /usr/local/lib/X11/rgb.txt \
16283 /usr/local/share/X11/rgb.txt \
16284 /usr/lib64/X11/rgb.txt
16286 if test -f "$cf_path" ; then
16287 RGB_PATH="$cf_path"
16294 if test "x$prefix" != xNONE; then
16295 cf_path_syntax="$prefix"
16297 cf_path_syntax="$ac_default_prefix"
16300 case ".$cf_path" in
16301 (.\$\(*\)*|.\'*\'*)
16305 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
16307 (.\$\{*prefix\}*|.\$\{*dir\}*)
16308 eval cf_path="$cf_path"
16309 case ".$cf_path" in
16311 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
16316 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
16319 { { echo "$as_me:16319: error: expected a pathname, not \"$cf_path\"" >&5
16320 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
16321 { (exit 1); exit 1; }; }
16327 echo "$as_me:16327: result: $RGB_PATH" >&5
16328 echo "${ECHO_T}$RGB_PATH" >&6
16330 cat >>confdefs.h <<EOF
16331 #define RGB_PATH "$cf_path"
16335 if test "$RGB_PATH" = no
16342 case $cf_cv_screen in
16344 cf_default_panel=no
16347 cf_default_tinfo=no
16349 (xcurses|bsdcurses)
16350 cf_default_panel=no
16353 cf_default_tinfo=yes
16356 cf_default_panel=yes
16357 cf_default_form=yes
16358 cf_default_menu=yes
16359 cf_default_tinfo=yes
16360 case $cf_cv_screen in
16362 cf_curses_headers="nc_alloc.h nomacros.h term_entry.h"
16368 echo "$as_me:16368: checking for desired basename for form library" >&5
16369 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
16371 # Check whether --with-form-libname or --without-form-libname was given.
16372 if test "${with_form_libname+set}" = set; then
16373 withval="$with_form_libname"
16374 with_lib_basename=$withval
16376 with_lib_basename=form
16378 FORM_NAME="$with_lib_basename"
16380 case "x$FORM_NAME" in
16388 echo "$as_me:16388: result: $FORM_NAME" >&5
16389 echo "${ECHO_T}$FORM_NAME" >&6
16391 echo "$as_me:16391: checking for desired basename for menu library" >&5
16392 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
16394 # Check whether --with-menu-libname or --without-menu-libname was given.
16395 if test "${with_menu_libname+set}" = set; then
16396 withval="$with_menu_libname"
16397 with_lib_basename=$withval
16399 with_lib_basename=menu
16401 MENU_NAME="$with_lib_basename"
16403 case "x$MENU_NAME" in
16411 echo "$as_me:16411: result: $MENU_NAME" >&5
16412 echo "${ECHO_T}$MENU_NAME" >&6
16414 echo "$as_me:16414: checking for desired basename for panel library" >&5
16415 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
16417 # Check whether --with-panel-libname or --without-panel-libname was given.
16418 if test "${with_panel_libname+set}" = set; then
16419 withval="$with_panel_libname"
16420 with_lib_basename=$withval
16422 with_lib_basename=panel
16424 PANEL_NAME="$with_lib_basename"
16426 case "x$PANEL_NAME" in
16434 echo "$as_me:16434: result: $PANEL_NAME" >&5
16435 echo "${ECHO_T}$PANEL_NAME" >&6
16437 echo "$as_me:16437: checking if you want to check for panel functions" >&5
16438 echo $ECHO_N "checking if you want to check for panel functions... $ECHO_C" >&6
16440 # Check whether --enable-panel or --disable-panel was given.
16441 if test "${enable_panel+set}" = set; then
16442 enableval="$enable_panel"
16443 test "$enableval" != no && enableval=yes
16444 if test "$enableval" != "yes" ; then
16447 cf_enable_panel=$cf_default_panel
16451 cf_enable_panel=$cf_default_panel
16454 echo "$as_me:16454: result: $cf_enable_panel" >&5
16455 echo "${ECHO_T}$cf_enable_panel" >&6
16456 if test $cf_enable_panel = yes
16459 cf_have_curses_lib=no
16461 : ${NCURSES_CONFIG_PKG:=none}
16462 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16464 elif test "x${PKG_CONFIG:=none}" != xnone; then
16465 echo "$as_me:16465: checking pkg-config for $PANEL_NAME$cf_cv_libtype" >&5
16466 echo $ECHO_N "checking pkg-config for $PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
16467 if "$PKG_CONFIG" --exists "$PANEL_NAME$cf_cv_libtype" ; then
16468 echo "$as_me:16468: result: yes" >&5
16469 echo "${ECHO_T}yes" >&6
16471 echo "$as_me:16471: checking if the $PANEL_NAME$cf_cv_libtype package files work" >&5
16472 echo $ECHO_N "checking if the $PANEL_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
16474 cf_save_CPPFLAGS="$CPPFLAGS"
16475 cf_save_LIBS="$LIBS"
16480 cf_new_extra_cppflags=
16482 for cf_add_cflags in `$PKG_CONFIG --cflags "$PANEL_NAME$cf_cv_libtype"`
16484 case "$cf_fix_cppflags" in
16486 case "$cf_add_cflags" in
16487 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16488 case "$cf_add_cflags" in
16490 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16492 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16493 && test -z "${cf_tst_cflags}" \
16494 && cf_fix_cppflags=yes
16496 if test "$cf_fix_cppflags" = yes ; then
16498 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16499 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16502 elif test "${cf_tst_cflags}" = "\"'" ; then
16504 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16505 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16511 case "$CPPFLAGS" in
16515 case "$cf_add_cflags" in
16517 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16519 CPPFLAGS=`echo "$CPPFLAGS" | \
16520 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16521 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16526 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16527 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16534 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16535 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16542 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16543 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16545 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16547 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16548 && test -z "${cf_tst_cflags}" \
16549 && cf_fix_cppflags=no
16554 if test -n "$cf_new_cflags" ; then
16556 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16557 CFLAGS="${CFLAGS}$cf_new_cflags"
16561 if test -n "$cf_new_cppflags" ; then
16563 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16564 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16568 if test -n "$cf_new_extra_cppflags" ; then
16570 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16571 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16575 cf_add_libs="$LIBS"
16578 for cf_add_1lib in `$PKG_CONFIG --libs "$PANEL_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16579 # filter duplicates
16580 for cf_add_1lib in $cf_add_0lib; do
16581 for cf_add_2lib in $cf_add_libs; do
16582 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16587 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16589 LIBS="$cf_add_libs"
16591 cat >"conftest.$ac_ext" <<_ACEOF
16592 #line 16592 "configure"
16593 #include "confdefs.h"
16594 #include <$PANEL_NAME.h>
16598 (void) new_panel ( 0 );
16603 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16604 if { (eval echo "$as_me:16604: \"$ac_link\"") >&5
16605 (eval $ac_link) 2>&5
16607 echo "$as_me:16607: \$? = $ac_status" >&5
16608 (exit "$ac_status"); } &&
16609 { ac_try='test -s "conftest$ac_exeext"'
16610 { (eval echo "$as_me:16610: \"$ac_try\"") >&5
16611 (eval $ac_try) 2>&5
16613 echo "$as_me:16613: \$? = $ac_status" >&5
16614 (exit "$ac_status"); }; }; then
16615 if test "$cross_compiling" = yes; then
16616 cf_have_curses_lib=maybe
16618 cat >"conftest.$ac_ext" <<_ACEOF
16619 #line 16619 "configure"
16620 #include "confdefs.h"
16621 #include <$PANEL_NAME.h>
16623 { (void) new_panel ( 0 ); return 0; }
16625 rm -f "conftest$ac_exeext"
16626 if { (eval echo "$as_me:16626: \"$ac_link\"") >&5
16627 (eval $ac_link) 2>&5
16629 echo "$as_me:16629: \$? = $ac_status" >&5
16630 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16631 { (eval echo "$as_me:16631: \"$ac_try\"") >&5
16632 (eval $ac_try) 2>&5
16634 echo "$as_me:16634: \$? = $ac_status" >&5
16635 (exit "$ac_status"); }; }; then
16636 cf_have_curses_lib=yes
16638 echo "$as_me: program exited with status $ac_status" >&5
16639 echo "$as_me: failed program was:" >&5
16640 cat "conftest.$ac_ext" >&5
16641 cf_have_curses_lib=no
16643 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16646 echo "$as_me: failed program was:" >&5
16647 cat "conftest.$ac_ext" >&5
16648 cf_have_curses_lib=no
16650 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16651 echo "$as_me:16651: result: $cf_have_curses_lib" >&5
16652 echo "${ECHO_T}$cf_have_curses_lib" >&6
16653 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
16654 if test "$cf_have_curses_lib" != "yes"
16656 CPPFLAGS="$cf_save_CPPFLAGS"
16657 LIBS="$cf_save_LIBS"
16660 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16662 cat >>confdefs.h <<EOF
16663 #define $cf_upper 1
16669 if test "$cf_have_curses_lib" = no; then
16670 as_ac_Lib=`echo "ac_cv_lib_$PANEL_NAME$cf_cv_libtype''_new_panel" | $as_tr_sh`
16671 echo "$as_me:16671: checking for new_panel in -l$PANEL_NAME$cf_cv_libtype" >&5
16672 echo $ECHO_N "checking for new_panel in -l$PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
16673 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16674 echo $ECHO_N "(cached) $ECHO_C" >&6
16676 ac_check_lib_save_LIBS=$LIBS
16677 LIBS="-l$PANEL_NAME$cf_cv_libtype $LIBS"
16678 cat >"conftest.$ac_ext" <<_ACEOF
16679 #line 16679 "configure"
16680 #include "confdefs.h"
16682 /* Override any gcc2 internal prototype to avoid an error. */
16686 /* We use char because int might match the return type of a gcc2
16687 builtin and then its argument prototype would still apply. */
16697 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16698 if { (eval echo "$as_me:16698: \"$ac_link\"") >&5
16699 (eval $ac_link) 2>&5
16701 echo "$as_me:16701: \$? = $ac_status" >&5
16702 (exit "$ac_status"); } &&
16703 { ac_try='test -s "conftest$ac_exeext"'
16704 { (eval echo "$as_me:16704: \"$ac_try\"") >&5
16705 (eval $ac_try) 2>&5
16707 echo "$as_me:16707: \$? = $ac_status" >&5
16708 (exit "$ac_status"); }; }; then
16709 eval "$as_ac_Lib=yes"
16711 echo "$as_me: failed program was:" >&5
16712 cat "conftest.$ac_ext" >&5
16713 eval "$as_ac_Lib=no"
16715 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16716 LIBS=$ac_check_lib_save_LIBS
16718 echo "$as_me:16718: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
16719 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
16720 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
16722 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16724 cf_add_libs="$LIBS"
16727 for cf_add_1lib in -l$PANEL_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16728 # filter duplicates
16729 for cf_add_1lib in $cf_add_0lib; do
16730 for cf_add_2lib in $cf_add_libs; do
16731 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16736 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16738 LIBS="$cf_add_libs"
16740 cat >>confdefs.h <<EOF
16741 #define $cf_upper 1
16748 cf_curses_headers="$cf_curses_headers panel.h"
16751 echo "$as_me:16751: checking if you want to check for menu functions" >&5
16752 echo $ECHO_N "checking if you want to check for menu functions... $ECHO_C" >&6
16754 # Check whether --enable-menu or --disable-menu was given.
16755 if test "${enable_menu+set}" = set; then
16756 enableval="$enable_menu"
16757 test "$enableval" != no && enableval=yes
16758 if test "$enableval" != "yes" ; then
16761 cf_enable_menu=$cf_default_menu
16765 cf_enable_menu=$cf_default_menu
16768 echo "$as_me:16768: result: $cf_enable_menu" >&5
16769 echo "${ECHO_T}$cf_enable_menu" >&6
16770 if test $cf_enable_menu = yes
16772 case $cf_cv_screen in
16777 echo "$as_me:16777: checking for NetBSD menu.h" >&5
16778 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
16779 if test "${cf_cv_netbsd_menu_h+set}" = set; then
16780 echo $ECHO_N "(cached) $ECHO_C" >&6
16783 cat >"conftest.$ac_ext" <<_ACEOF
16784 #line 16784 "configure"
16785 #include "confdefs.h"
16787 #include <${cf_cv_ncurses_header:-curses.h}>
16795 int y = menu->max_item_width;
16801 rm -f "conftest.$ac_objext"
16802 if { (eval echo "$as_me:16802: \"$ac_compile\"") >&5
16803 (eval $ac_compile) 2>&5
16805 echo "$as_me:16805: \$? = $ac_status" >&5
16806 (exit "$ac_status"); } &&
16807 { ac_try='test -s "conftest.$ac_objext"'
16808 { (eval echo "$as_me:16808: \"$ac_try\"") >&5
16809 (eval $ac_try) 2>&5
16811 echo "$as_me:16811: \$? = $ac_status" >&5
16812 (exit "$ac_status"); }; }; then
16813 cf_cv_netbsd_menu_h=yes
16816 echo "$as_me: failed program was:" >&5
16817 cat "conftest.$ac_ext" >&5
16818 cf_cv_netbsd_menu_h=no
16820 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16823 echo "$as_me:16823: result: $cf_cv_netbsd_menu_h" >&5
16824 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
16826 test "$cf_cv_netbsd_menu_h" = yes &&
16827 cat >>confdefs.h <<\EOF
16828 #define HAVE_NETBSD_MENU_H 1
16834 cf_have_curses_lib=no
16836 : ${NCURSES_CONFIG_PKG:=none}
16837 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16839 elif test "x${PKG_CONFIG:=none}" != xnone; then
16840 echo "$as_me:16840: checking pkg-config for $MENU_NAME$cf_cv_libtype" >&5
16841 echo $ECHO_N "checking pkg-config for $MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
16842 if "$PKG_CONFIG" --exists "$MENU_NAME$cf_cv_libtype" ; then
16843 echo "$as_me:16843: result: yes" >&5
16844 echo "${ECHO_T}yes" >&6
16846 echo "$as_me:16846: checking if the $MENU_NAME$cf_cv_libtype package files work" >&5
16847 echo $ECHO_N "checking if the $MENU_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
16849 cf_save_CPPFLAGS="$CPPFLAGS"
16850 cf_save_LIBS="$LIBS"
16855 cf_new_extra_cppflags=
16857 for cf_add_cflags in `$PKG_CONFIG --cflags "$MENU_NAME$cf_cv_libtype"`
16859 case "$cf_fix_cppflags" in
16861 case "$cf_add_cflags" in
16862 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16863 case "$cf_add_cflags" in
16865 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16867 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16868 && test -z "${cf_tst_cflags}" \
16869 && cf_fix_cppflags=yes
16871 if test "$cf_fix_cppflags" = yes ; then
16873 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16874 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16877 elif test "${cf_tst_cflags}" = "\"'" ; then
16879 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16880 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16886 case "$CPPFLAGS" in
16890 case "$cf_add_cflags" in
16892 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16894 CPPFLAGS=`echo "$CPPFLAGS" | \
16895 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16896 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16901 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16902 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16909 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16910 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16917 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16918 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16920 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16922 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16923 && test -z "${cf_tst_cflags}" \
16924 && cf_fix_cppflags=no
16929 if test -n "$cf_new_cflags" ; then
16931 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16932 CFLAGS="${CFLAGS}$cf_new_cflags"
16936 if test -n "$cf_new_cppflags" ; then
16938 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16939 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16943 if test -n "$cf_new_extra_cppflags" ; then
16945 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16946 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16950 cf_add_libs="$LIBS"
16953 for cf_add_1lib in `$PKG_CONFIG --libs "$MENU_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16954 # filter duplicates
16955 for cf_add_1lib in $cf_add_0lib; do
16956 for cf_add_2lib in $cf_add_libs; do
16957 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16962 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16964 LIBS="$cf_add_libs"
16966 cat >"conftest.$ac_ext" <<_ACEOF
16967 #line 16967 "configure"
16968 #include "confdefs.h"
16969 #include <$MENU_NAME.h>
16973 (void) menu_driver ( 0,0 );
16978 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16979 if { (eval echo "$as_me:16979: \"$ac_link\"") >&5
16980 (eval $ac_link) 2>&5
16982 echo "$as_me:16982: \$? = $ac_status" >&5
16983 (exit "$ac_status"); } &&
16984 { ac_try='test -s "conftest$ac_exeext"'
16985 { (eval echo "$as_me:16985: \"$ac_try\"") >&5
16986 (eval $ac_try) 2>&5
16988 echo "$as_me:16988: \$? = $ac_status" >&5
16989 (exit "$ac_status"); }; }; then
16990 if test "$cross_compiling" = yes; then
16991 cf_have_curses_lib=maybe
16993 cat >"conftest.$ac_ext" <<_ACEOF
16994 #line 16994 "configure"
16995 #include "confdefs.h"
16996 #include <$MENU_NAME.h>
16998 { (void) menu_driver ( 0,0 ); return 0; }
17000 rm -f "conftest$ac_exeext"
17001 if { (eval echo "$as_me:17001: \"$ac_link\"") >&5
17002 (eval $ac_link) 2>&5
17004 echo "$as_me:17004: \$? = $ac_status" >&5
17005 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17006 { (eval echo "$as_me:17006: \"$ac_try\"") >&5
17007 (eval $ac_try) 2>&5
17009 echo "$as_me:17009: \$? = $ac_status" >&5
17010 (exit "$ac_status"); }; }; then
17011 cf_have_curses_lib=yes
17013 echo "$as_me: program exited with status $ac_status" >&5
17014 echo "$as_me: failed program was:" >&5
17015 cat "conftest.$ac_ext" >&5
17016 cf_have_curses_lib=no
17018 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17021 echo "$as_me: failed program was:" >&5
17022 cat "conftest.$ac_ext" >&5
17023 cf_have_curses_lib=no
17025 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17026 echo "$as_me:17026: result: $cf_have_curses_lib" >&5
17027 echo "${ECHO_T}$cf_have_curses_lib" >&6
17028 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17029 if test "$cf_have_curses_lib" != "yes"
17031 CPPFLAGS="$cf_save_CPPFLAGS"
17032 LIBS="$cf_save_LIBS"
17035 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17037 cat >>confdefs.h <<EOF
17038 #define $cf_upper 1
17044 if test "$cf_have_curses_lib" = no; then
17045 as_ac_Lib=`echo "ac_cv_lib_$MENU_NAME$cf_cv_libtype''_menu_driver" | $as_tr_sh`
17046 echo "$as_me:17046: checking for menu_driver in -l$MENU_NAME$cf_cv_libtype" >&5
17047 echo $ECHO_N "checking for menu_driver in -l$MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
17048 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17049 echo $ECHO_N "(cached) $ECHO_C" >&6
17051 ac_check_lib_save_LIBS=$LIBS
17052 LIBS="-l$MENU_NAME$cf_cv_libtype $LIBS"
17053 cat >"conftest.$ac_ext" <<_ACEOF
17054 #line 17054 "configure"
17055 #include "confdefs.h"
17057 /* Override any gcc2 internal prototype to avoid an error. */
17061 /* We use char because int might match the return type of a gcc2
17062 builtin and then its argument prototype would still apply. */
17063 char menu_driver ();
17072 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17073 if { (eval echo "$as_me:17073: \"$ac_link\"") >&5
17074 (eval $ac_link) 2>&5
17076 echo "$as_me:17076: \$? = $ac_status" >&5
17077 (exit "$ac_status"); } &&
17078 { ac_try='test -s "conftest$ac_exeext"'
17079 { (eval echo "$as_me:17079: \"$ac_try\"") >&5
17080 (eval $ac_try) 2>&5
17082 echo "$as_me:17082: \$? = $ac_status" >&5
17083 (exit "$ac_status"); }; }; then
17084 eval "$as_ac_Lib=yes"
17086 echo "$as_me: failed program was:" >&5
17087 cat "conftest.$ac_ext" >&5
17088 eval "$as_ac_Lib=no"
17090 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17091 LIBS=$ac_check_lib_save_LIBS
17093 echo "$as_me:17093: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
17094 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
17095 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
17097 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17099 cf_add_libs="$LIBS"
17102 for cf_add_1lib in -l$MENU_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17103 # filter duplicates
17104 for cf_add_1lib in $cf_add_0lib; do
17105 for cf_add_2lib in $cf_add_libs; do
17106 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17111 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17113 LIBS="$cf_add_libs"
17115 cat >>confdefs.h <<EOF
17116 #define $cf_upper 1
17123 cf_curses_headers="$cf_curses_headers menu.h"
17126 echo "$as_me:17126: checking if you want to check for form functions" >&5
17127 echo $ECHO_N "checking if you want to check for form functions... $ECHO_C" >&6
17129 # Check whether --enable-form or --disable-form was given.
17130 if test "${enable_form+set}" = set; then
17131 enableval="$enable_form"
17132 test "$enableval" != no && enableval=yes
17133 if test "$enableval" != "yes" ; then
17136 cf_enable_form=$cf_default_form
17140 cf_enable_form=$cf_default_form
17143 echo "$as_me:17143: result: $cf_enable_form" >&5
17144 echo "${ECHO_T}$cf_enable_form" >&6
17145 if test $cf_enable_form = yes
17147 case $cf_cv_screen in
17152 echo "$as_me:17152: checking for NetBSD form.h" >&5
17153 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
17154 if test "${cf_cv_netbsd_form_h+set}" = set; then
17155 echo $ECHO_N "(cached) $ECHO_C" >&6
17158 cat >"conftest.$ac_ext" <<_ACEOF
17159 #line 17159 "configure"
17160 #include "confdefs.h"
17162 #include <${cf_cv_ncurses_header:-curses.h}>
17170 int y = current_field(form)->cursor_ypos;
17171 int x = current_field(form)->cursor_xpos;
17177 rm -f "conftest.$ac_objext"
17178 if { (eval echo "$as_me:17178: \"$ac_compile\"") >&5
17179 (eval $ac_compile) 2>&5
17181 echo "$as_me:17181: \$? = $ac_status" >&5
17182 (exit "$ac_status"); } &&
17183 { ac_try='test -s "conftest.$ac_objext"'
17184 { (eval echo "$as_me:17184: \"$ac_try\"") >&5
17185 (eval $ac_try) 2>&5
17187 echo "$as_me:17187: \$? = $ac_status" >&5
17188 (exit "$ac_status"); }; }; then
17189 cf_cv_netbsd_form_h=yes
17192 echo "$as_me: failed program was:" >&5
17193 cat "conftest.$ac_ext" >&5
17194 cf_cv_netbsd_form_h=no
17196 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17199 echo "$as_me:17199: result: $cf_cv_netbsd_form_h" >&5
17200 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
17202 test "$cf_cv_netbsd_form_h" = yes &&
17203 cat >>confdefs.h <<\EOF
17204 #define HAVE_NETBSD_FORM_H 1
17210 cf_have_curses_lib=no
17212 : ${NCURSES_CONFIG_PKG:=none}
17213 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
17215 elif test "x${PKG_CONFIG:=none}" != xnone; then
17216 echo "$as_me:17216: checking pkg-config for $FORM_NAME$cf_cv_libtype" >&5
17217 echo $ECHO_N "checking pkg-config for $FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
17218 if "$PKG_CONFIG" --exists "$FORM_NAME$cf_cv_libtype" ; then
17219 echo "$as_me:17219: result: yes" >&5
17220 echo "${ECHO_T}yes" >&6
17222 echo "$as_me:17222: checking if the $FORM_NAME$cf_cv_libtype package files work" >&5
17223 echo $ECHO_N "checking if the $FORM_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
17225 cf_save_CPPFLAGS="$CPPFLAGS"
17226 cf_save_LIBS="$LIBS"
17231 cf_new_extra_cppflags=
17233 for cf_add_cflags in `$PKG_CONFIG --cflags "$FORM_NAME$cf_cv_libtype"`
17235 case "$cf_fix_cppflags" in
17237 case "$cf_add_cflags" in
17238 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17239 case "$cf_add_cflags" in
17241 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17243 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17244 && test -z "${cf_tst_cflags}" \
17245 && cf_fix_cppflags=yes
17247 if test "$cf_fix_cppflags" = yes ; then
17249 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17250 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17253 elif test "${cf_tst_cflags}" = "\"'" ; then
17255 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17256 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17262 case "$CPPFLAGS" in
17266 case "$cf_add_cflags" in
17268 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17270 CPPFLAGS=`echo "$CPPFLAGS" | \
17271 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17272 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17277 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17278 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17285 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17286 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17293 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17294 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17296 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17298 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17299 && test -z "${cf_tst_cflags}" \
17300 && cf_fix_cppflags=no
17305 if test -n "$cf_new_cflags" ; then
17307 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17308 CFLAGS="${CFLAGS}$cf_new_cflags"
17312 if test -n "$cf_new_cppflags" ; then
17314 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17315 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17319 if test -n "$cf_new_extra_cppflags" ; then
17321 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17322 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17326 cf_add_libs="$LIBS"
17329 for cf_add_1lib in `$PKG_CONFIG --libs "$FORM_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17330 # filter duplicates
17331 for cf_add_1lib in $cf_add_0lib; do
17332 for cf_add_2lib in $cf_add_libs; do
17333 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17338 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17340 LIBS="$cf_add_libs"
17342 cat >"conftest.$ac_ext" <<_ACEOF
17343 #line 17343 "configure"
17344 #include "confdefs.h"
17345 #include <$FORM_NAME.h>
17349 (void) form_driver ( 0,0 );
17354 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17355 if { (eval echo "$as_me:17355: \"$ac_link\"") >&5
17356 (eval $ac_link) 2>&5
17358 echo "$as_me:17358: \$? = $ac_status" >&5
17359 (exit "$ac_status"); } &&
17360 { ac_try='test -s "conftest$ac_exeext"'
17361 { (eval echo "$as_me:17361: \"$ac_try\"") >&5
17362 (eval $ac_try) 2>&5
17364 echo "$as_me:17364: \$? = $ac_status" >&5
17365 (exit "$ac_status"); }; }; then
17366 if test "$cross_compiling" = yes; then
17367 cf_have_curses_lib=maybe
17369 cat >"conftest.$ac_ext" <<_ACEOF
17370 #line 17370 "configure"
17371 #include "confdefs.h"
17372 #include <$FORM_NAME.h>
17374 { (void) form_driver ( 0,0 ); return 0; }
17376 rm -f "conftest$ac_exeext"
17377 if { (eval echo "$as_me:17377: \"$ac_link\"") >&5
17378 (eval $ac_link) 2>&5
17380 echo "$as_me:17380: \$? = $ac_status" >&5
17381 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17382 { (eval echo "$as_me:17382: \"$ac_try\"") >&5
17383 (eval $ac_try) 2>&5
17385 echo "$as_me:17385: \$? = $ac_status" >&5
17386 (exit "$ac_status"); }; }; then
17387 cf_have_curses_lib=yes
17389 echo "$as_me: program exited with status $ac_status" >&5
17390 echo "$as_me: failed program was:" >&5
17391 cat "conftest.$ac_ext" >&5
17392 cf_have_curses_lib=no
17394 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17397 echo "$as_me: failed program was:" >&5
17398 cat "conftest.$ac_ext" >&5
17399 cf_have_curses_lib=no
17401 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17402 echo "$as_me:17402: result: $cf_have_curses_lib" >&5
17403 echo "${ECHO_T}$cf_have_curses_lib" >&6
17404 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17405 if test "$cf_have_curses_lib" != "yes"
17407 CPPFLAGS="$cf_save_CPPFLAGS"
17408 LIBS="$cf_save_LIBS"
17411 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17413 cat >>confdefs.h <<EOF
17414 #define $cf_upper 1
17420 if test "$cf_have_curses_lib" = no; then
17421 as_ac_Lib=`echo "ac_cv_lib_$FORM_NAME$cf_cv_libtype''_form_driver" | $as_tr_sh`
17422 echo "$as_me:17422: checking for form_driver in -l$FORM_NAME$cf_cv_libtype" >&5
17423 echo $ECHO_N "checking for form_driver in -l$FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
17424 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17425 echo $ECHO_N "(cached) $ECHO_C" >&6
17427 ac_check_lib_save_LIBS=$LIBS
17428 LIBS="-l$FORM_NAME$cf_cv_libtype $LIBS"
17429 cat >"conftest.$ac_ext" <<_ACEOF
17430 #line 17430 "configure"
17431 #include "confdefs.h"
17433 /* Override any gcc2 internal prototype to avoid an error. */
17437 /* We use char because int might match the return type of a gcc2
17438 builtin and then its argument prototype would still apply. */
17439 char form_driver ();
17448 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17449 if { (eval echo "$as_me:17449: \"$ac_link\"") >&5
17450 (eval $ac_link) 2>&5
17452 echo "$as_me:17452: \$? = $ac_status" >&5
17453 (exit "$ac_status"); } &&
17454 { ac_try='test -s "conftest$ac_exeext"'
17455 { (eval echo "$as_me:17455: \"$ac_try\"") >&5
17456 (eval $ac_try) 2>&5
17458 echo "$as_me:17458: \$? = $ac_status" >&5
17459 (exit "$ac_status"); }; }; then
17460 eval "$as_ac_Lib=yes"
17462 echo "$as_me: failed program was:" >&5
17463 cat "conftest.$ac_ext" >&5
17464 eval "$as_ac_Lib=no"
17466 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17467 LIBS=$ac_check_lib_save_LIBS
17469 echo "$as_me:17469: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
17470 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
17471 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
17473 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17475 cf_add_libs="$LIBS"
17478 for cf_add_1lib in -l$FORM_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17479 # filter duplicates
17480 for cf_add_1lib in $cf_add_0lib; do
17481 for cf_add_2lib in $cf_add_libs; do
17482 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17487 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17489 LIBS="$cf_add_libs"
17491 cat >>confdefs.h <<EOF
17492 #define $cf_upper 1
17499 cf_curses_headers="$cf_curses_headers form.h"
17502 # look for curses-related headers
17504 for ac_header in $cf_curses_headers
17506 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17507 echo "$as_me:17507: checking for $ac_header" >&5
17508 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17509 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17510 echo $ECHO_N "(cached) $ECHO_C" >&6
17512 cat >"conftest.$ac_ext" <<_ACEOF
17513 #line 17513 "configure"
17514 #include "confdefs.h"
17515 #include <$ac_header>
17517 if { (eval echo "$as_me:17517: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17518 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17520 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17522 cat conftest.err >&5
17523 echo "$as_me:17523: \$? = $ac_status" >&5
17524 (exit "$ac_status"); } >/dev/null; then
17525 if test -s conftest.err; then
17526 ac_cpp_err=$ac_c_preproc_warn_flag
17533 if test -z "$ac_cpp_err"; then
17534 eval "$as_ac_Header=yes"
17536 echo "$as_me: failed program was:" >&5
17537 cat "conftest.$ac_ext" >&5
17538 eval "$as_ac_Header=no"
17540 rm -f conftest.err "conftest.$ac_ext"
17542 echo "$as_me:17542: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17543 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17544 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17545 cat >>confdefs.h <<EOF
17546 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17552 echo "$as_me:17552: checking for ANSI C header files" >&5
17553 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
17554 if test "${ac_cv_header_stdc+set}" = set; then
17555 echo $ECHO_N "(cached) $ECHO_C" >&6
17557 cat >"conftest.$ac_ext" <<_ACEOF
17558 #line 17558 "configure"
17559 #include "confdefs.h"
17560 #include <stdlib.h>
17561 #include <stdarg.h>
17562 #include <string.h>
17566 if { (eval echo "$as_me:17566: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17567 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17569 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17571 cat conftest.err >&5
17572 echo "$as_me:17572: \$? = $ac_status" >&5
17573 (exit "$ac_status"); } >/dev/null; then
17574 if test -s conftest.err; then
17575 ac_cpp_err=$ac_c_preproc_warn_flag
17582 if test -z "$ac_cpp_err"; then
17583 ac_cv_header_stdc=yes
17585 echo "$as_me: failed program was:" >&5
17586 cat "conftest.$ac_ext" >&5
17587 ac_cv_header_stdc=no
17589 rm -f conftest.err "conftest.$ac_ext"
17591 if test $ac_cv_header_stdc = yes; then
17592 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
17593 cat >"conftest.$ac_ext" <<_ACEOF
17594 #line 17594 "configure"
17595 #include "confdefs.h"
17596 #include <string.h>
17599 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17600 $EGREP "memchr" >/dev/null 2>&1; then
17603 ac_cv_header_stdc=no
17609 if test $ac_cv_header_stdc = yes; then
17610 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
17611 cat >"conftest.$ac_ext" <<_ACEOF
17612 #line 17612 "configure"
17613 #include "confdefs.h"
17614 #include <stdlib.h>
17617 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17618 $EGREP "free" >/dev/null 2>&1; then
17621 ac_cv_header_stdc=no
17627 if test $ac_cv_header_stdc = yes; then
17628 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
17629 if test "$cross_compiling" = yes; then
17632 cat >"conftest.$ac_ext" <<_ACEOF
17633 #line 17633 "configure"
17634 #include "confdefs.h"
17636 #if ((' ' & 0x0FF) == 0x020)
17637 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
17638 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
17640 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
17641 || ('j' <= (c) && (c) <= 'r') \
17642 || ('s' <= (c) && (c) <= 'z'))
17643 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
17646 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
17651 for (i = 0; i < 256; i++)
17652 if (XOR (islower (i), ISLOWER (i))
17653 || toupper (i) != TOUPPER (i))
17654 $ac_main_return(2);
17655 $ac_main_return (0);
17658 rm -f "conftest$ac_exeext"
17659 if { (eval echo "$as_me:17659: \"$ac_link\"") >&5
17660 (eval $ac_link) 2>&5
17662 echo "$as_me:17662: \$? = $ac_status" >&5
17663 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17664 { (eval echo "$as_me:17664: \"$ac_try\"") >&5
17665 (eval $ac_try) 2>&5
17667 echo "$as_me:17667: \$? = $ac_status" >&5
17668 (exit "$ac_status"); }; }; then
17671 echo "$as_me: program exited with status $ac_status" >&5
17672 echo "$as_me: failed program was:" >&5
17673 cat "conftest.$ac_ext" >&5
17674 ac_cv_header_stdc=no
17676 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17680 echo "$as_me:17680: result: $ac_cv_header_stdc" >&5
17681 echo "${ECHO_T}$ac_cv_header_stdc" >&6
17682 if test $ac_cv_header_stdc = yes; then
17684 cat >>confdefs.h <<\EOF
17685 #define STDC_HEADERS 1
17690 echo "$as_me:17690: checking whether time.h and sys/time.h may both be included" >&5
17691 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17692 if test "${ac_cv_header_time+set}" = set; then
17693 echo $ECHO_N "(cached) $ECHO_C" >&6
17695 cat >"conftest.$ac_ext" <<_ACEOF
17696 #line 17696 "configure"
17697 #include "confdefs.h"
17698 #include <sys/types.h>
17699 #include <sys/time.h>
17705 if ((struct tm *) 0)
17711 rm -f "conftest.$ac_objext"
17712 if { (eval echo "$as_me:17712: \"$ac_compile\"") >&5
17713 (eval $ac_compile) 2>&5
17715 echo "$as_me:17715: \$? = $ac_status" >&5
17716 (exit "$ac_status"); } &&
17717 { ac_try='test -s "conftest.$ac_objext"'
17718 { (eval echo "$as_me:17718: \"$ac_try\"") >&5
17719 (eval $ac_try) 2>&5
17721 echo "$as_me:17721: \$? = $ac_status" >&5
17722 (exit "$ac_status"); }; }; then
17723 ac_cv_header_time=yes
17725 echo "$as_me: failed program was:" >&5
17726 cat "conftest.$ac_ext" >&5
17727 ac_cv_header_time=no
17729 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17731 echo "$as_me:17731: result: $ac_cv_header_time" >&5
17732 echo "${ECHO_T}$ac_cv_header_time" >&6
17733 if test $ac_cv_header_time = yes; then
17735 cat >>confdefs.h <<\EOF
17736 #define TIME_WITH_SYS_TIME 1
17754 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17755 echo "$as_me:17755: checking for $ac_header" >&5
17756 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17757 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17758 echo $ECHO_N "(cached) $ECHO_C" >&6
17760 cat >"conftest.$ac_ext" <<_ACEOF
17761 #line 17761 "configure"
17762 #include "confdefs.h"
17763 #include <$ac_header>
17765 if { (eval echo "$as_me:17765: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17766 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17768 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17770 cat conftest.err >&5
17771 echo "$as_me:17771: \$? = $ac_status" >&5
17772 (exit "$ac_status"); } >/dev/null; then
17773 if test -s conftest.err; then
17774 ac_cpp_err=$ac_c_preproc_warn_flag
17781 if test -z "$ac_cpp_err"; then
17782 eval "$as_ac_Header=yes"
17784 echo "$as_me: failed program was:" >&5
17785 cat "conftest.$ac_ext" >&5
17786 eval "$as_ac_Header=no"
17788 rm -f conftest.err "conftest.$ac_ext"
17790 echo "$as_me:17790: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17791 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17792 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17793 cat >>confdefs.h <<EOF
17794 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17800 for ac_header in unistd.h getopt.h
17802 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17803 echo "$as_me:17803: checking for $ac_header" >&5
17804 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17805 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17806 echo $ECHO_N "(cached) $ECHO_C" >&6
17808 cat >"conftest.$ac_ext" <<_ACEOF
17809 #line 17809 "configure"
17810 #include "confdefs.h"
17811 #include <$ac_header>
17813 if { (eval echo "$as_me:17813: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17814 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17816 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17818 cat conftest.err >&5
17819 echo "$as_me:17819: \$? = $ac_status" >&5
17820 (exit "$ac_status"); } >/dev/null; then
17821 if test -s conftest.err; then
17822 ac_cpp_err=$ac_c_preproc_warn_flag
17829 if test -z "$ac_cpp_err"; then
17830 eval "$as_ac_Header=yes"
17832 echo "$as_me: failed program was:" >&5
17833 cat "conftest.$ac_ext" >&5
17834 eval "$as_ac_Header=no"
17836 rm -f conftest.err "conftest.$ac_ext"
17838 echo "$as_me:17838: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17839 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17840 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17841 cat >>confdefs.h <<EOF
17842 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17848 echo "$as_me:17848: checking for header declaring getopt variables" >&5
17849 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
17850 if test "${cf_cv_getopt_header+set}" = set; then
17851 echo $ECHO_N "(cached) $ECHO_C" >&6
17854 cf_cv_getopt_header=none
17855 for cf_header in stdio.h stdlib.h unistd.h getopt.h
17857 cat >"conftest.$ac_ext" <<_ACEOF
17858 #line 17858 "configure"
17859 #include "confdefs.h"
17861 #include <$cf_header>
17865 int x = optind; char *y = optarg
17870 rm -f "conftest.$ac_objext"
17871 if { (eval echo "$as_me:17871: \"$ac_compile\"") >&5
17872 (eval $ac_compile) 2>&5
17874 echo "$as_me:17874: \$? = $ac_status" >&5
17875 (exit "$ac_status"); } &&
17876 { ac_try='test -s "conftest.$ac_objext"'
17877 { (eval echo "$as_me:17877: \"$ac_try\"") >&5
17878 (eval $ac_try) 2>&5
17880 echo "$as_me:17880: \$? = $ac_status" >&5
17881 (exit "$ac_status"); }; }; then
17882 cf_cv_getopt_header=$cf_header
17885 echo "$as_me: failed program was:" >&5
17886 cat "conftest.$ac_ext" >&5
17888 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17892 echo "$as_me:17892: result: $cf_cv_getopt_header" >&5
17893 echo "${ECHO_T}$cf_cv_getopt_header" >&6
17894 if test "$cf_cv_getopt_header" != none ; then
17896 cat >>confdefs.h <<\EOF
17897 #define HAVE_GETOPT_HEADER 1
17901 if test "$cf_cv_getopt_header" = getopt.h ; then
17903 cat >>confdefs.h <<\EOF
17904 #define NEED_GETOPT_H 1
17918 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17919 echo "$as_me:17919: checking for $ac_func" >&5
17920 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17921 if eval "test \"\${$as_ac_var+set}\" = set"; then
17922 echo $ECHO_N "(cached) $ECHO_C" >&6
17924 cat >"conftest.$ac_ext" <<_ACEOF
17925 #line 17925 "configure"
17926 #include "confdefs.h"
17927 #define $ac_func autoconf_temporary
17928 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17935 /* We use char because int might match the return type of a gcc2
17936 builtin and then its argument prototype would still apply. */
17937 char $ac_func (void);
17943 /* The GNU C library defines stubs for functions which it implements
17944 to always fail with ENOSYS. Some functions are actually named
17945 something starting with __ and the normal name is an alias. */
17946 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17947 #error found stub for $ac_func
17950 return $ac_func ();
17955 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17956 if { (eval echo "$as_me:17956: \"$ac_link\"") >&5
17957 (eval $ac_link) 2>&5
17959 echo "$as_me:17959: \$? = $ac_status" >&5
17960 (exit "$ac_status"); } &&
17961 { ac_try='test -s "conftest$ac_exeext"'
17962 { (eval echo "$as_me:17962: \"$ac_try\"") >&5
17963 (eval $ac_try) 2>&5
17965 echo "$as_me:17965: \$? = $ac_status" >&5
17966 (exit "$ac_status"); }; }; then
17967 eval "$as_ac_var=yes"
17969 echo "$as_me: failed program was:" >&5
17970 cat "conftest.$ac_ext" >&5
17971 eval "$as_ac_var=no"
17973 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17975 echo "$as_me:17975: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17976 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17977 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17978 cat >>confdefs.h <<EOF
17979 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17985 # use a compile-check to work with ncurses*-config and subdirectory includes
17986 echo "$as_me:17986: checking if we can use termcap.h" >&5
17987 echo $ECHO_N "checking if we can use termcap.h... $ECHO_C" >&6
17988 if test "${cf_cv_have_termcap_h+set}" = set; then
17989 echo $ECHO_N "(cached) $ECHO_C" >&6
17992 cat >"conftest.$ac_ext" <<_ACEOF
17993 #line 17993 "configure"
17994 #include "confdefs.h"
17996 #include <curses.h>
17997 #ifdef NCURSES_VERSION
17998 #undef NCURSES_VERSION
18000 #include <termcap.h>
18001 #ifndef NCURSES_VERSION
18002 #error wrong header
18013 rm -f "conftest.$ac_objext"
18014 if { (eval echo "$as_me:18014: \"$ac_compile\"") >&5
18015 (eval $ac_compile) 2>&5
18017 echo "$as_me:18017: \$? = $ac_status" >&5
18018 (exit "$ac_status"); } &&
18019 { ac_try='test -s "conftest.$ac_objext"'
18020 { (eval echo "$as_me:18020: \"$ac_try\"") >&5
18021 (eval $ac_try) 2>&5
18023 echo "$as_me:18023: \$? = $ac_status" >&5
18024 (exit "$ac_status"); }; }; then
18025 cf_cv_have_termcap_h=yes
18027 echo "$as_me: failed program was:" >&5
18028 cat "conftest.$ac_ext" >&5
18029 cf_cv_have_termcap_h=no
18031 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18033 echo "$as_me:18033: result: $cf_cv_have_termcap_h" >&5
18034 echo "${ECHO_T}$cf_cv_have_termcap_h" >&6
18035 if test "x$cf_cv_have_termcap_h" = xyes
18038 cat >>confdefs.h <<\EOF
18039 #define HAVE_TERMCAP_H 1
18043 echo "$as_me:18043: checking if we can use ncurses/termcap.h" >&5
18044 echo $ECHO_N "checking if we can use ncurses/termcap.h... $ECHO_C" >&6
18045 if test "${cf_cv_have_ncurses_termcap_h+set}" = set; then
18046 echo $ECHO_N "(cached) $ECHO_C" >&6
18049 cat >"conftest.$ac_ext" <<_ACEOF
18050 #line 18050 "configure"
18051 #include "confdefs.h"
18053 #include <ncurses/curses.h>
18054 #ifdef NCURSES_VERSION
18055 #undef NCURSES_VERSION
18057 #include <ncurses/termcap.h>
18058 #ifndef NCURSES_VERSION
18059 #error wrong header
18070 rm -f "conftest.$ac_objext"
18071 if { (eval echo "$as_me:18071: \"$ac_compile\"") >&5
18072 (eval $ac_compile) 2>&5
18074 echo "$as_me:18074: \$? = $ac_status" >&5
18075 (exit "$ac_status"); } &&
18076 { ac_try='test -s "conftest.$ac_objext"'
18077 { (eval echo "$as_me:18077: \"$ac_try\"") >&5
18078 (eval $ac_try) 2>&5
18080 echo "$as_me:18080: \$? = $ac_status" >&5
18081 (exit "$ac_status"); }; }; then
18082 cf_cv_have_ncurses_termcap_h=yes
18084 echo "$as_me: failed program was:" >&5
18085 cat "conftest.$ac_ext" >&5
18086 cf_cv_have_ncurses_termcap_h=no
18088 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18090 echo "$as_me:18090: result: $cf_cv_have_ncurses_termcap_h" >&5
18091 echo "${ECHO_T}$cf_cv_have_ncurses_termcap_h" >&6
18092 test "x$cf_cv_have_ncurses_termcap_h" = xyes &&
18093 cat >>confdefs.h <<\EOF
18094 #define HAVE_NCURSES_TERMCAP_H 1
18099 if test "x$ac_cv_func_getopt" = xno; then
18100 { { echo "$as_me:18100: error: getopt is required for building programs" >&5
18101 echo "$as_me: error: getopt is required for building programs" >&2;}
18102 { (exit 1); exit 1; }; }
18105 if test "$cf_enable_widec" = yes; then
18118 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18119 echo "$as_me:18119: checking for $ac_func" >&5
18120 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18121 if eval "test \"\${$as_ac_var+set}\" = set"; then
18122 echo $ECHO_N "(cached) $ECHO_C" >&6
18124 cat >"conftest.$ac_ext" <<_ACEOF
18125 #line 18125 "configure"
18126 #include "confdefs.h"
18127 #define $ac_func autoconf_temporary
18128 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
18135 /* We use char because int might match the return type of a gcc2
18136 builtin and then its argument prototype would still apply. */
18137 char $ac_func (void);
18143 /* The GNU C library defines stubs for functions which it implements
18144 to always fail with ENOSYS. Some functions are actually named
18145 something starting with __ and the normal name is an alias. */
18146 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18147 #error found stub for $ac_func
18150 return $ac_func ();
18155 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18156 if { (eval echo "$as_me:18156: \"$ac_link\"") >&5
18157 (eval $ac_link) 2>&5
18159 echo "$as_me:18159: \$? = $ac_status" >&5
18160 (exit "$ac_status"); } &&
18161 { ac_try='test -s "conftest$ac_exeext"'
18162 { (eval echo "$as_me:18162: \"$ac_try\"") >&5
18163 (eval $ac_try) 2>&5
18165 echo "$as_me:18165: \$? = $ac_status" >&5
18166 (exit "$ac_status"); }; }; then
18167 eval "$as_ac_var=yes"
18169 echo "$as_me: failed program was:" >&5
18170 cat "conftest.$ac_ext" >&5
18171 eval "$as_ac_var=no"
18173 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18175 echo "$as_me:18175: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18176 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18177 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18178 cat >>confdefs.h <<EOF
18179 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18187 echo "$as_me:18187: checking definition to turn on extended curses functions" >&5
18188 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
18189 if test "${cf_cv_need_xopen_extension+set}" = set; then
18190 echo $ECHO_N "(cached) $ECHO_C" >&6
18193 cf_cv_need_xopen_extension=unknown
18194 cat >"conftest.$ac_ext" <<_ACEOF
18195 #line 18195 "configure"
18196 #include "confdefs.h"
18198 #include <stdlib.h>
18199 #include <${cf_cv_ncurses_header:-curses.h}>
18204 #if defined(NCURSES_VERSION_PATCH)
18205 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
18209 #ifdef NCURSES_VERSION
18211 int check2 = curs_set((int)sizeof(check));
18213 long x = winnstr(stdscr, "", 0);
18215 #ifdef NCURSES_VERSION
18218 getbegyx(stdscr, y1, x1);
18227 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18228 if { (eval echo "$as_me:18228: \"$ac_link\"") >&5
18229 (eval $ac_link) 2>&5
18231 echo "$as_me:18231: \$? = $ac_status" >&5
18232 (exit "$ac_status"); } &&
18233 { ac_try='test -s "conftest$ac_exeext"'
18234 { (eval echo "$as_me:18234: \"$ac_try\"") >&5
18235 (eval $ac_try) 2>&5
18237 echo "$as_me:18237: \$? = $ac_status" >&5
18238 (exit "$ac_status"); }; }; then
18239 cf_cv_need_xopen_extension=none
18241 echo "$as_me: failed program was:" >&5
18242 cat "conftest.$ac_ext" >&5
18244 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
18246 cat >"conftest.$ac_ext" <<_ACEOF
18247 #line 18247 "configure"
18248 #include "confdefs.h"
18250 #define $cf_try_xopen_extension 1
18251 #include <stdlib.h>
18252 #include <${cf_cv_ncurses_header:-curses.h}>
18257 #ifdef NCURSES_VERSION
18259 int check2 = curs_set((int)sizeof(check));
18261 long x = winnstr(stdscr, "", 0);
18263 getbegyx(stdscr, y1, x1);
18264 #ifdef NCURSES_VERSION
18275 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18276 if { (eval echo "$as_me:18276: \"$ac_link\"") >&5
18277 (eval $ac_link) 2>&5
18279 echo "$as_me:18279: \$? = $ac_status" >&5
18280 (exit "$ac_status"); } &&
18281 { ac_try='test -s "conftest$ac_exeext"'
18282 { (eval echo "$as_me:18282: \"$ac_try\"") >&5
18283 (eval $ac_try) 2>&5
18285 echo "$as_me:18285: \$? = $ac_status" >&5
18286 (exit "$ac_status"); }; }; then
18287 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
18289 echo "$as_me: failed program was:" >&5
18290 cat "conftest.$ac_ext" >&5
18292 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18296 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18299 echo "$as_me:18299: result: $cf_cv_need_xopen_extension" >&5
18300 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
18302 case "$cf_cv_need_xopen_extension" in
18305 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18306 CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
18311 echo "$as_me:18311: checking for term.h" >&5
18312 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
18313 if test "${cf_cv_term_header+set}" = set; then
18314 echo $ECHO_N "(cached) $ECHO_C" >&6
18317 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
18318 # for <term.h> if we do not find the variant.
18320 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
18322 case "${cf_cv_ncurses_header:-curses.h}" in
18324 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
18325 cf_header_list="$cf_header_item $cf_header_list"
18329 for cf_header in $cf_header_list
18331 cat >"conftest.$ac_ext" <<_ACEOF
18332 #line 18332 "configure"
18333 #include "confdefs.h"
18335 #include <${cf_cv_ncurses_header:-curses.h}>
18336 #include <${cf_header}>
18345 rm -f "conftest.$ac_objext"
18346 if { (eval echo "$as_me:18346: \"$ac_compile\"") >&5
18347 (eval $ac_compile) 2>&5
18349 echo "$as_me:18349: \$? = $ac_status" >&5
18350 (exit "$ac_status"); } &&
18351 { ac_try='test -s "conftest.$ac_objext"'
18352 { (eval echo "$as_me:18352: \"$ac_try\"") >&5
18353 (eval $ac_try) 2>&5
18355 echo "$as_me:18355: \$? = $ac_status" >&5
18356 (exit "$ac_status"); }; }; then
18357 cf_cv_term_header=$cf_header
18360 echo "$as_me: failed program was:" >&5
18361 cat "conftest.$ac_ext" >&5
18362 cf_cv_term_header=no
18364 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18367 case "$cf_cv_term_header" in
18369 # If curses is ncurses, some packagers still mess it up by trying to make
18370 # us use GNU termcap. This handles the most common case.
18371 for cf_header in ncurses/term.h ncursesw/term.h
18373 cat >"conftest.$ac_ext" <<_ACEOF
18374 #line 18374 "configure"
18375 #include "confdefs.h"
18377 #include <${cf_cv_ncurses_header:-curses.h}>
18378 #ifdef NCURSES_VERSION
18379 #include <${cf_header}>
18391 rm -f "conftest.$ac_objext"
18392 if { (eval echo "$as_me:18392: \"$ac_compile\"") >&5
18393 (eval $ac_compile) 2>&5
18395 echo "$as_me:18395: \$? = $ac_status" >&5
18396 (exit "$ac_status"); } &&
18397 { ac_try='test -s "conftest.$ac_objext"'
18398 { (eval echo "$as_me:18398: \"$ac_try\"") >&5
18399 (eval $ac_try) 2>&5
18401 echo "$as_me:18401: \$? = $ac_status" >&5
18402 (exit "$ac_status"); }; }; then
18403 cf_cv_term_header=$cf_header
18406 echo "$as_me: failed program was:" >&5
18407 cat "conftest.$ac_ext" >&5
18408 cf_cv_term_header=no
18410 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18416 echo "$as_me:18416: result: $cf_cv_term_header" >&5
18417 echo "${ECHO_T}$cf_cv_term_header" >&6
18419 case "$cf_cv_term_header" in
18422 cat >>confdefs.h <<\EOF
18423 #define HAVE_TERM_H 1
18429 cat >>confdefs.h <<\EOF
18430 #define HAVE_NCURSES_TERM_H 1
18436 cat >>confdefs.h <<\EOF
18437 #define HAVE_NCURSESW_TERM_H 1
18443 echo "$as_me:18443: checking for unctrl.h" >&5
18444 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
18445 if test "${cf_cv_unctrl_header+set}" = set; then
18446 echo $ECHO_N "(cached) $ECHO_C" >&6
18449 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
18450 # for <unctrl.h> if we do not find the variant.
18452 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
18454 case "${cf_cv_ncurses_header:-curses.h}" in
18456 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
18457 cf_header_list="$cf_header_item $cf_header_list"
18461 for cf_header in $cf_header_list
18463 cat >"conftest.$ac_ext" <<_ACEOF
18464 #line 18464 "configure"
18465 #include "confdefs.h"
18467 #include <${cf_cv_ncurses_header:-curses.h}>
18468 #include <${cf_header}>
18477 rm -f "conftest.$ac_objext"
18478 if { (eval echo "$as_me:18478: \"$ac_compile\"") >&5
18479 (eval $ac_compile) 2>&5
18481 echo "$as_me:18481: \$? = $ac_status" >&5
18482 (exit "$ac_status"); } &&
18483 { ac_try='test -s "conftest.$ac_objext"'
18484 { (eval echo "$as_me:18484: \"$ac_try\"") >&5
18485 (eval $ac_try) 2>&5
18487 echo "$as_me:18487: \$? = $ac_status" >&5
18488 (exit "$ac_status"); }; }; then
18489 cf_cv_unctrl_header=$cf_header
18492 echo "$as_me: failed program was:" >&5
18493 cat "conftest.$ac_ext" >&5
18494 cf_cv_unctrl_header=no
18496 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18500 echo "$as_me:18500: result: $cf_cv_unctrl_header" >&5
18501 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
18503 case "$cf_cv_unctrl_header" in
18505 { echo "$as_me:18505: WARNING: unctrl.h header not found" >&5
18506 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
18510 case "$cf_cv_unctrl_header" in
18513 cat >>confdefs.h <<\EOF
18514 #define HAVE_UNCTRL_H 1
18520 cat >>confdefs.h <<\EOF
18521 #define HAVE_NCURSES_UNCTRL_H 1
18525 (ncursesw/unctrl.h)
18527 cat >>confdefs.h <<\EOF
18528 #define HAVE_NCURSESW_UNCTRL_H 1
18536 assume_default_colors \
18553 init_extended_color \
18561 reset_color_pairs \
18577 use_default_colors \
18579 use_extended_names \
18595 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18597 echo "$as_me:18597: checking for ${cf_func}" >&5
18598 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
18600 echo "${as_me:-configure}:18600: testing ${cf_func} ..." 1>&5
18602 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
18603 echo $ECHO_N "(cached) $ECHO_C" >&6
18606 eval cf_result='$ac_cv_func_'$cf_func
18607 if test ".$cf_result" != ".no"; then
18608 cat >"conftest.$ac_ext" <<_ACEOF
18609 #line 18609 "configure"
18610 #include "confdefs.h"
18612 #ifdef HAVE_XCURSES
18613 #include <xcurses.h>
18614 char * XCursesProgramName = "test";
18616 #include <${cf_cv_ncurses_header:-curses.h}>
18617 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
18618 #include <ncursesw/term.h>
18619 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
18620 #include <ncurses/term.h>
18621 #elif defined(HAVE_TERM_H)
18631 long foo = (long)(&${cf_func});
18632 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
18633 if (foo + 1234L > 5678L)
18634 ${cf_cv_main_return:-return}(foo != 0);
18641 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18642 if { (eval echo "$as_me:18642: \"$ac_link\"") >&5
18643 (eval $ac_link) 2>&5
18645 echo "$as_me:18645: \$? = $ac_status" >&5
18646 (exit "$ac_status"); } &&
18647 { ac_try='test -s "conftest$ac_exeext"'
18648 { (eval echo "$as_me:18648: \"$ac_try\"") >&5
18649 (eval $ac_try) 2>&5
18651 echo "$as_me:18651: \$? = $ac_status" >&5
18652 (exit "$ac_status"); }; }; then
18655 echo "$as_me: failed program was:" >&5
18656 cat "conftest.$ac_ext" >&5
18659 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18661 eval 'cf_cv_func_'$cf_func'="$cf_result"'
18665 # use the computed/retrieved cache-value:
18666 eval 'cf_result=$cf_cv_func_'$cf_func
18667 echo "$as_me:18667: result: $cf_result" >&5
18668 echo "${ECHO_T}$cf_result" >&6
18669 if test "$cf_result" != no; then
18670 cat >>confdefs.h <<EOF
18671 #define HAVE_${cf_tr_func} 1
18677 for cf_func in tputs
18680 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18682 echo "$as_me:18682: checking for ${cf_func}" >&5
18683 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
18685 echo "${as_me:-configure}:18685: testing ${cf_func} ..." 1>&5
18687 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
18688 echo $ECHO_N "(cached) $ECHO_C" >&6
18691 eval cf_result='$ac_cv_func_'$cf_func
18692 if test ".$cf_result" != ".no"; then
18693 cat >"conftest.$ac_ext" <<_ACEOF
18694 #line 18694 "configure"
18695 #include "confdefs.h"
18697 #ifdef HAVE_XCURSES
18698 #include <xcurses.h>
18699 char * XCursesProgramName = "test";
18701 #include <${cf_cv_ncurses_header:-curses.h}>
18702 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
18703 #include <ncursesw/term.h>
18704 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
18705 #include <ncurses/term.h>
18706 #elif defined(HAVE_TERM_H)
18716 long foo = (long)(&${cf_func});
18717 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
18718 if (foo + 1234L > 5678L)
18719 ${cf_cv_main_return:-return}(foo != 0);
18726 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18727 if { (eval echo "$as_me:18727: \"$ac_link\"") >&5
18728 (eval $ac_link) 2>&5
18730 echo "$as_me:18730: \$? = $ac_status" >&5
18731 (exit "$ac_status"); } &&
18732 { ac_try='test -s "conftest$ac_exeext"'
18733 { (eval echo "$as_me:18733: \"$ac_try\"") >&5
18734 (eval $ac_try) 2>&5
18736 echo "$as_me:18736: \$? = $ac_status" >&5
18737 (exit "$ac_status"); }; }; then
18740 echo "$as_me: failed program was:" >&5
18741 cat "conftest.$ac_ext" >&5
18744 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18746 eval 'cf_cv_func_'$cf_func'="$cf_result"'
18750 # use the computed/retrieved cache-value:
18751 eval 'cf_result=$cf_cv_func_'$cf_func
18752 echo "$as_me:18752: result: $cf_result" >&5
18753 echo "${ECHO_T}$cf_result" >&6
18754 if test "$cf_result" != no; then
18755 cat >>confdefs.h <<EOF
18756 #define HAVE_${cf_tr_func} 1
18762 if test "x$cf_cv_func_tputs" = xyes
18765 for cf_arg in int char
18767 for cf_ret in int void
18769 if test "$cf_ret" = void
18771 cf_return="/* nothing */"
18773 cf_return="return value"
18775 cat >"conftest.$ac_ext" <<_ACEOF
18776 #line 18776 "configure"
18777 #include "confdefs.h"
18779 #include <${cf_cv_ncurses_header:-curses.h}>
18780 #include <$cf_cv_term_header>
18782 static $cf_ret outc($cf_arg value) { $cf_return; }
18788 tputs("hello", 0, outc);
18789 ${cf_cv_main_return:-return}(0);
18795 rm -f "conftest.$ac_objext"
18796 if { (eval echo "$as_me:18796: \"$ac_compile\"") >&5
18797 (eval $ac_compile) 2>&5
18799 echo "$as_me:18799: \$? = $ac_status" >&5
18800 (exit "$ac_status"); } &&
18801 { ac_try='test -s "conftest.$ac_objext"'
18802 { (eval echo "$as_me:18802: \"$ac_try\"") >&5
18803 (eval $ac_try) 2>&5
18805 echo "$as_me:18805: \$? = $ac_status" >&5
18806 (exit "$ac_status"); }; }; then
18808 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
18810 echo "${as_me:-configure}:18810: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
18812 cat >>confdefs.h <<EOF
18813 #define TPUTS_ARG $cf_arg
18814 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
18815 #define TPUTS_RETURN(value) $cf_return
18821 echo "$as_me: failed program was:" >&5
18822 cat "conftest.$ac_ext" >&5
18824 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18826 test "$cf_done" = yes && break
18830 echo "$as_me:18830: checking for ncurses extended functions" >&5
18831 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
18832 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
18833 echo $ECHO_N "(cached) $ECHO_C" >&6
18836 cat >"conftest.$ac_ext" <<_ACEOF
18837 #line 18837 "configure"
18838 #include "confdefs.h"
18840 #include <${cf_cv_ncurses_header:-curses.h}>
18845 int x = NCURSES_EXT_FUNCS
18851 rm -f "conftest.$ac_objext"
18852 if { (eval echo "$as_me:18852: \"$ac_compile\"") >&5
18853 (eval $ac_compile) 2>&5
18855 echo "$as_me:18855: \$? = $ac_status" >&5
18856 (exit "$ac_status"); } &&
18857 { ac_try='test -s "conftest.$ac_objext"'
18858 { (eval echo "$as_me:18858: \"$ac_try\"") >&5
18859 (eval $ac_try) 2>&5
18861 echo "$as_me:18861: \$? = $ac_status" >&5
18862 (exit "$ac_status"); }; }; then
18863 cf_cv_ncurses_ext_funcs=defined
18865 echo "$as_me: failed program was:" >&5
18866 cat "conftest.$ac_ext" >&5
18868 cat >"conftest.$ac_ext" <<_ACEOF
18869 #line 18869 "configure"
18870 #include "confdefs.h"
18872 #include <${cf_cv_ncurses_header:-curses.h}>
18877 (void) assume_default_colors (0, 0);
18878 (void) curses_version ();
18879 (void) define_key (0, 0);
18880 (void) is_term_resized (0, 0);
18881 (void) key_defined (0);
18882 (void) keybound (0, 0);
18883 (void) keyok (0, 0);
18884 (void) resize_term (0, 0);
18885 (void) resizeterm (0, 0);
18886 (void) use_default_colors ();
18887 (void) use_extended_names (0);
18888 (void) wresize (0, 0, 0);
18893 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18894 if { (eval echo "$as_me:18894: \"$ac_link\"") >&5
18895 (eval $ac_link) 2>&5
18897 echo "$as_me:18897: \$? = $ac_status" >&5
18898 (exit "$ac_status"); } &&
18899 { ac_try='test -s "conftest$ac_exeext"'
18900 { (eval echo "$as_me:18900: \"$ac_try\"") >&5
18901 (eval $ac_try) 2>&5
18903 echo "$as_me:18903: \$? = $ac_status" >&5
18904 (exit "$ac_status"); }; }; then
18905 cf_cv_ncurses_ext_funcs=yes
18907 echo "$as_me: failed program was:" >&5
18908 cat "conftest.$ac_ext" >&5
18909 cf_cv_ncurses_ext_funcs=no
18911 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18914 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18917 echo "$as_me:18917: result: $cf_cv_ncurses_ext_funcs" >&5
18918 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
18919 test "$cf_cv_ncurses_ext_funcs" = yes &&
18920 cat >>confdefs.h <<\EOF
18921 #define NCURSES_EXT_FUNCS 1
18924 if test "$cf_enable_widec" = yes
18926 # workaround for systems with ncurses before 20111029, due to change of
18927 # feature test macro from _XPG5 to _XOPEN_SOURCE
18928 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
18931 echo "$as_me:18931: checking if _XPG5 should be defined to enable wide-characters" >&5
18932 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
18934 cat >"conftest.$ac_ext" <<_ACEOF
18935 #line 18935 "configure"
18936 #include "confdefs.h"
18938 #include <${cf_cv_ncurses_header:-curses.h}>
18947 rm -f "conftest.$ac_objext"
18948 if { (eval echo "$as_me:18948: \"$ac_compile\"") >&5
18949 (eval $ac_compile) 2>&5
18951 echo "$as_me:18951: \$? = $ac_status" >&5
18952 (exit "$ac_status"); } &&
18953 { ac_try='test -s "conftest.$ac_objext"'
18954 { (eval echo "$as_me:18954: \"$ac_try\"") >&5
18955 (eval $ac_try) 2>&5
18957 echo "$as_me:18957: \$? = $ac_status" >&5
18958 (exit "$ac_status"); }; }; then
18961 echo "$as_me: failed program was:" >&5
18962 cat "conftest.$ac_ext" >&5
18963 cf_save_cppflags="$CPPFLAGS"
18964 CPPFLAGS="$CPPFLAGS -D_XPG5"
18965 cat >"conftest.$ac_ext" <<_ACEOF
18966 #line 18966 "configure"
18967 #include "confdefs.h"
18969 #include <${cf_cv_ncurses_header:-curses.h}>
18978 rm -f "conftest.$ac_objext"
18979 if { (eval echo "$as_me:18979: \"$ac_compile\"") >&5
18980 (eval $ac_compile) 2>&5
18982 echo "$as_me:18982: \$? = $ac_status" >&5
18983 (exit "$ac_status"); } &&
18984 { ac_try='test -s "conftest.$ac_objext"'
18985 { (eval echo "$as_me:18985: \"$ac_try\"") >&5
18986 (eval $ac_try) 2>&5
18988 echo "$as_me:18988: \$? = $ac_status" >&5
18989 (exit "$ac_status"); }; }; then
18992 echo "$as_me: failed program was:" >&5
18993 cat "conftest.$ac_ext" >&5
18995 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18996 CPPFLAGS="$cf_save_cppflags"
18998 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18999 echo "$as_me:18999: result: $cf_define_xpg5" >&5
19000 echo "${ECHO_T}$cf_define_xpg5" >&6
19002 if test "$cf_define_xpg5" = yes
19004 CPPFLAGS="$CPPFLAGS -D_XPG5"
19008 echo "$as_me:19008: checking for wide-character functions" >&5
19009 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
19010 if test "${cf_cv_widechar_funcs+set}" = set; then
19011 echo $ECHO_N "(cached) $ECHO_C" >&6
19014 cat >"conftest.$ac_ext" <<_ACEOF
19015 #line 19015 "configure"
19016 #include "confdefs.h"
19018 #include <${cf_cv_ncurses_header:-curses.h}>
19023 static wchar_t src_wchar[2];
19024 static cchar_t dst_cchar;
19025 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
19031 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19032 if { (eval echo "$as_me:19032: \"$ac_link\"") >&5
19033 (eval $ac_link) 2>&5
19035 echo "$as_me:19035: \$? = $ac_status" >&5
19036 (exit "$ac_status"); } &&
19037 { ac_try='test -s "conftest$ac_exeext"'
19038 { (eval echo "$as_me:19038: \"$ac_try\"") >&5
19039 (eval $ac_try) 2>&5
19041 echo "$as_me:19041: \$? = $ac_status" >&5
19042 (exit "$ac_status"); }; }; then
19043 cf_cv_widechar_funcs=yes
19045 echo "$as_me: failed program was:" >&5
19046 cat "conftest.$ac_ext" >&5
19047 cf_cv_widechar_funcs=no
19049 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19052 echo "$as_me:19052: result: $cf_cv_widechar_funcs" >&5
19053 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
19054 if test "$cf_cv_widechar_funcs" != no ; then
19056 cat >>confdefs.h <<\EOF
19057 #define USE_WIDEC_SUPPORT 1
19061 cat >>confdefs.h <<\EOF
19062 #define USE_WIDEC_SUPPORT 0
19067 cat >>confdefs.h <<\EOF
19068 #define USE_WIDEC_SUPPORT 0
19073 echo "$as_me:19073: checking if $cf_cv_screen library uses pthreads" >&5
19074 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
19075 if test "${cf_cv_use_pthreads+set}" = set; then
19076 echo $ECHO_N "(cached) $ECHO_C" >&6
19079 cat >"conftest.$ac_ext" <<_ACEOF
19080 #line 19080 "configure"
19081 #include "confdefs.h"
19083 #include <${cf_cv_ncurses_header:-curses.h}>
19084 extern void _nc_init_pthreads(void);
19091 _nc_init_pthreads();
19097 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19098 if { (eval echo "$as_me:19098: \"$ac_link\"") >&5
19099 (eval $ac_link) 2>&5
19101 echo "$as_me:19101: \$? = $ac_status" >&5
19102 (exit "$ac_status"); } &&
19103 { ac_try='test -s "conftest$ac_exeext"'
19104 { (eval echo "$as_me:19104: \"$ac_try\"") >&5
19105 (eval $ac_try) 2>&5
19107 echo "$as_me:19107: \$? = $ac_status" >&5
19108 (exit "$ac_status"); }; }; then
19109 cf_cv_use_pthreads=yes
19111 echo "$as_me: failed program was:" >&5
19112 cat "conftest.$ac_ext" >&5
19113 cf_cv_use_pthreads=no
19115 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19118 echo "$as_me:19118: result: $cf_cv_use_pthreads" >&5
19119 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
19120 test $cf_cv_use_pthreads = yes &&
19121 cat >>confdefs.h <<\EOF
19122 #define USE_PTHREADS 1
19125 echo "$as_me:19125: checking if sys/time.h works with sys/select.h" >&5
19126 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
19127 if test "${cf_cv_sys_time_select+set}" = set; then
19128 echo $ECHO_N "(cached) $ECHO_C" >&6
19131 cat >"conftest.$ac_ext" <<_ACEOF
19132 #line 19132 "configure"
19133 #include "confdefs.h"
19135 #include <sys/types.h>
19136 #ifdef HAVE_SYS_TIME_H
19137 #include <sys/time.h>
19139 #ifdef HAVE_SYS_SELECT_H
19140 #include <sys/select.h>
19151 rm -f "conftest.$ac_objext"
19152 if { (eval echo "$as_me:19152: \"$ac_compile\"") >&5
19153 (eval $ac_compile) 2>&5
19155 echo "$as_me:19155: \$? = $ac_status" >&5
19156 (exit "$ac_status"); } &&
19157 { ac_try='test -s "conftest.$ac_objext"'
19158 { (eval echo "$as_me:19158: \"$ac_try\"") >&5
19159 (eval $ac_try) 2>&5
19161 echo "$as_me:19161: \$? = $ac_status" >&5
19162 (exit "$ac_status"); }; }; then
19163 cf_cv_sys_time_select=yes
19165 echo "$as_me: failed program was:" >&5
19166 cat "conftest.$ac_ext" >&5
19167 cf_cv_sys_time_select=no
19169 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19173 echo "$as_me:19173: result: $cf_cv_sys_time_select" >&5
19174 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
19175 test "$cf_cv_sys_time_select" = yes &&
19176 cat >>confdefs.h <<\EOF
19177 #define HAVE_SYS_TIME_SELECT 1
19180 # special check for test/ditto.c
19182 echo "$as_me:19182: checking for openpty in -lutil" >&5
19183 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
19184 if test "${ac_cv_lib_util_openpty+set}" = set; then
19185 echo $ECHO_N "(cached) $ECHO_C" >&6
19187 ac_check_lib_save_LIBS=$LIBS
19188 LIBS="-lutil $LIBS"
19189 cat >"conftest.$ac_ext" <<_ACEOF
19190 #line 19190 "configure"
19191 #include "confdefs.h"
19193 /* Override any gcc2 internal prototype to avoid an error. */
19197 /* We use char because int might match the return type of a gcc2
19198 builtin and then its argument prototype would still apply. */
19208 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19209 if { (eval echo "$as_me:19209: \"$ac_link\"") >&5
19210 (eval $ac_link) 2>&5
19212 echo "$as_me:19212: \$? = $ac_status" >&5
19213 (exit "$ac_status"); } &&
19214 { ac_try='test -s "conftest$ac_exeext"'
19215 { (eval echo "$as_me:19215: \"$ac_try\"") >&5
19216 (eval $ac_try) 2>&5
19218 echo "$as_me:19218: \$? = $ac_status" >&5
19219 (exit "$ac_status"); }; }; then
19220 ac_cv_lib_util_openpty=yes
19222 echo "$as_me: failed program was:" >&5
19223 cat "conftest.$ac_ext" >&5
19224 ac_cv_lib_util_openpty=no
19226 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19227 LIBS=$ac_check_lib_save_LIBS
19229 echo "$as_me:19229: result: $ac_cv_lib_util_openpty" >&5
19230 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
19231 if test "$ac_cv_lib_util_openpty" = yes; then
19237 echo "$as_me:19237: checking for openpty header" >&5
19238 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
19239 if test "${cf_cv_func_openpty+set}" = set; then
19240 echo $ECHO_N "(cached) $ECHO_C" >&6
19243 cf_save_LIBS="$LIBS"
19244 test "$cf_cv_lib_util" = yes && {
19245 cf_add_libs="$LIBS"
19248 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19249 # filter duplicates
19250 for cf_add_1lib in $cf_add_0lib; do
19251 for cf_add_2lib in $cf_add_libs; do
19252 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19257 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19259 LIBS="$cf_add_libs"
19261 for cf_header in pty.h libutil.h util.h
19263 cat >"conftest.$ac_ext" <<_ACEOF
19264 #line 19264 "configure"
19265 #include "confdefs.h"
19267 #include <$cf_header>
19273 int x = openpty((int *)0, (int *)0, (char *)0,
19274 (struct termios *)0, (struct winsize *)0);
19280 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19281 if { (eval echo "$as_me:19281: \"$ac_link\"") >&5
19282 (eval $ac_link) 2>&5
19284 echo "$as_me:19284: \$? = $ac_status" >&5
19285 (exit "$ac_status"); } &&
19286 { ac_try='test -s "conftest$ac_exeext"'
19287 { (eval echo "$as_me:19287: \"$ac_try\"") >&5
19288 (eval $ac_try) 2>&5
19290 echo "$as_me:19290: \$? = $ac_status" >&5
19291 (exit "$ac_status"); }; }; then
19293 cf_cv_func_openpty=$cf_header
19297 echo "$as_me: failed program was:" >&5
19298 cat "conftest.$ac_ext" >&5
19300 cf_cv_func_openpty=no
19303 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19305 LIBS="$cf_save_LIBS"
19308 echo "$as_me:19308: result: $cf_cv_func_openpty" >&5
19309 echo "${ECHO_T}$cf_cv_func_openpty" >&6
19311 if test "$cf_cv_func_openpty" != no ; then
19313 cat >>confdefs.h <<EOF
19314 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
19317 cat >>confdefs.h <<\EOF
19318 #define USE_XTERM_PTY 1
19321 if test "x$cf_cv_lib_util" = xyes ; then
19323 cf_add_libs="$TEST_LIBS"
19326 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19327 # filter duplicates
19328 for cf_add_1lib in $cf_add_0lib; do
19329 for cf_add_2lib in $cf_add_libs; do
19330 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19335 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19337 TEST_LIBS="$cf_add_libs"
19342 echo "$as_me:19342: checking for function curses_version" >&5
19343 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
19344 if test "${cf_cv_func_curses_version+set}" = set; then
19345 echo $ECHO_N "(cached) $ECHO_C" >&6
19348 if test "$cross_compiling" = yes; then
19349 cf_cv_func_curses_version=unknown
19351 cat >"conftest.$ac_ext" <<_ACEOF
19352 #line 19352 "configure"
19353 #include "confdefs.h"
19355 #include <${cf_cv_ncurses_header:-curses.h}>
19359 sprintf(temp, "%s\\n", curses_version());
19360 ${cf_cv_main_return:-return}(0);
19364 rm -f "conftest$ac_exeext"
19365 if { (eval echo "$as_me:19365: \"$ac_link\"") >&5
19366 (eval $ac_link) 2>&5
19368 echo "$as_me:19368: \$? = $ac_status" >&5
19369 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
19370 { (eval echo "$as_me:19370: \"$ac_try\"") >&5
19371 (eval $ac_try) 2>&5
19373 echo "$as_me:19373: \$? = $ac_status" >&5
19374 (exit "$ac_status"); }; }; then
19375 cf_cv_func_curses_version=yes
19378 echo "$as_me: program exited with status $ac_status" >&5
19379 echo "$as_me: failed program was:" >&5
19380 cat "conftest.$ac_ext" >&5
19381 cf_cv_func_curses_version=no
19384 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
19388 echo "$as_me:19388: result: $cf_cv_func_curses_version" >&5
19389 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
19390 test "$cf_cv_func_curses_version" = yes &&
19391 cat >>confdefs.h <<\EOF
19392 #define HAVE_CURSES_VERSION 1
19395 echo "$as_me:19395: checking for alternate character set array" >&5
19396 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
19397 if test "${cf_cv_curses_acs_map+set}" = set; then
19398 echo $ECHO_N "(cached) $ECHO_C" >&6
19401 cf_cv_curses_acs_map=unknown
19402 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
19404 cat >"conftest.$ac_ext" <<_ACEOF
19405 #line 19405 "configure"
19406 #include "confdefs.h"
19408 #include <${cf_cv_ncurses_header:-curses.h}>
19414 ${name}['k'] = ACS_PLUS
19420 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19421 if { (eval echo "$as_me:19421: \"$ac_link\"") >&5
19422 (eval $ac_link) 2>&5
19424 echo "$as_me:19424: \$? = $ac_status" >&5
19425 (exit "$ac_status"); } &&
19426 { ac_try='test -s "conftest$ac_exeext"'
19427 { (eval echo "$as_me:19427: \"$ac_try\"") >&5
19428 (eval $ac_try) 2>&5
19430 echo "$as_me:19430: \$? = $ac_status" >&5
19431 (exit "$ac_status"); }; }; then
19432 cf_cv_curses_acs_map=$name; break
19434 echo "$as_me: failed program was:" >&5
19435 cat "conftest.$ac_ext" >&5
19437 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19441 echo "$as_me:19441: result: $cf_cv_curses_acs_map" >&5
19442 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
19444 test "$cf_cv_curses_acs_map" != unknown &&
19445 cat >>confdefs.h <<EOF
19446 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
19449 if test "$cf_enable_widec" = yes; then
19451 echo "$as_me:19451: checking for wide alternate character set array" >&5
19452 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
19453 if test "${cf_cv_curses_wacs_map+set}" = set; then
19454 echo $ECHO_N "(cached) $ECHO_C" >&6
19457 cf_cv_curses_wacs_map=unknown
19458 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
19460 cat >"conftest.$ac_ext" <<_ACEOF
19461 #line 19461 "configure"
19462 #include "confdefs.h"
19464 #ifndef _XOPEN_SOURCE_EXTENDED
19465 #define _XOPEN_SOURCE_EXTENDED
19467 #include <${cf_cv_ncurses_header:-curses.h}>
19471 void *foo = &(${name}['k']); (void)foo
19476 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19477 if { (eval echo "$as_me:19477: \"$ac_link\"") >&5
19478 (eval $ac_link) 2>&5
19480 echo "$as_me:19480: \$? = $ac_status" >&5
19481 (exit "$ac_status"); } &&
19482 { ac_try='test -s "conftest$ac_exeext"'
19483 { (eval echo "$as_me:19483: \"$ac_try\"") >&5
19484 (eval $ac_try) 2>&5
19486 echo "$as_me:19486: \$? = $ac_status" >&5
19487 (exit "$ac_status"); }; }; then
19488 cf_cv_curses_wacs_map=$name
19491 echo "$as_me: failed program was:" >&5
19492 cat "conftest.$ac_ext" >&5
19494 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19497 echo "$as_me:19497: result: $cf_cv_curses_wacs_map" >&5
19498 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
19500 test "$cf_cv_curses_wacs_map" != unknown &&
19501 cat >>confdefs.h <<EOF
19502 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
19505 echo "$as_me:19505: checking for wide alternate character constants" >&5
19506 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
19507 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
19508 echo $ECHO_N "(cached) $ECHO_C" >&6
19511 cf_cv_curses_wacs_symbols=no
19512 if test "$cf_cv_curses_wacs_map" != unknown
19514 cat >"conftest.$ac_ext" <<_ACEOF
19515 #line 19515 "configure"
19516 #include "confdefs.h"
19518 #ifndef _XOPEN_SOURCE_EXTENDED
19519 #define _XOPEN_SOURCE_EXTENDED
19521 #include <${cf_cv_ncurses_header:-curses.h}>
19525 cchar_t *foo = WACS_PLUS;
19526 ${cf_cv_curses_wacs_map}['k'] = *WACS_PLUS; (void)foo
19531 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19532 if { (eval echo "$as_me:19532: \"$ac_link\"") >&5
19533 (eval $ac_link) 2>&5
19535 echo "$as_me:19535: \$? = $ac_status" >&5
19536 (exit "$ac_status"); } &&
19537 { ac_try='test -s "conftest$ac_exeext"'
19538 { (eval echo "$as_me:19538: \"$ac_try\"") >&5
19539 (eval $ac_try) 2>&5
19541 echo "$as_me:19541: \$? = $ac_status" >&5
19542 (exit "$ac_status"); }; }; then
19543 cf_cv_curses_wacs_symbols=yes
19545 echo "$as_me: failed program was:" >&5
19546 cat "conftest.$ac_ext" >&5
19548 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19550 cat >"conftest.$ac_ext" <<_ACEOF
19551 #line 19551 "configure"
19552 #include "confdefs.h"
19554 #ifndef _XOPEN_SOURCE_EXTENDED
19555 #define _XOPEN_SOURCE_EXTENDED
19557 #include <${cf_cv_ncurses_header:-curses.h}>
19561 cchar_t *foo = WACS_PLUS; (void)foo
19566 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19567 if { (eval echo "$as_me:19567: \"$ac_link\"") >&5
19568 (eval $ac_link) 2>&5
19570 echo "$as_me:19570: \$? = $ac_status" >&5
19571 (exit "$ac_status"); } &&
19572 { ac_try='test -s "conftest$ac_exeext"'
19573 { (eval echo "$as_me:19573: \"$ac_try\"") >&5
19574 (eval $ac_try) 2>&5
19576 echo "$as_me:19576: \$? = $ac_status" >&5
19577 (exit "$ac_status"); }; }; then
19578 cf_cv_curses_wacs_symbols=yes
19580 echo "$as_me: failed program was:" >&5
19581 cat "conftest.$ac_ext" >&5
19583 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19587 echo "$as_me:19587: result: $cf_cv_curses_wacs_symbols" >&5
19588 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
19590 test "$cf_cv_curses_wacs_symbols" != no &&
19591 cat >>confdefs.h <<\EOF
19592 #define CURSES_WACS_SYMBOLS 1
19597 echo "$as_me:19597: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19598 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19599 cat >"conftest.$ac_ext" <<_ACEOF
19600 #line 19600 "configure"
19601 #include "confdefs.h"
19603 #ifndef _XOPEN_SOURCE_EXTENDED
19604 #define _XOPEN_SOURCE_EXTENDED
19606 #include <${cf_cv_ncurses_header:-curses.h}>
19617 rm -f "conftest.$ac_objext"
19618 if { (eval echo "$as_me:19618: \"$ac_compile\"") >&5
19619 (eval $ac_compile) 2>&5
19621 echo "$as_me:19621: \$? = $ac_status" >&5
19622 (exit "$ac_status"); } &&
19623 { ac_try='test -s "conftest.$ac_objext"'
19624 { (eval echo "$as_me:19624: \"$ac_try\"") >&5
19625 (eval $ac_try) 2>&5
19627 echo "$as_me:19627: \$? = $ac_status" >&5
19628 (exit "$ac_status"); }; }; then
19631 echo "$as_me: failed program was:" >&5
19632 cat "conftest.$ac_ext" >&5
19635 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19636 echo "$as_me:19636: result: $cf_result" >&5
19637 echo "${ECHO_T}$cf_result" >&6
19638 if test "$cf_result" = yes ; then
19640 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19642 cat >>confdefs.h <<EOF
19643 #define $cf_result 1
19648 cat >>confdefs.h <<EOF
19649 #define attr_t long
19654 if test "$cf_enable_widec" = yes; then
19656 # This is needed on Tru64 5.0 to declare mbstate_t
19657 echo "$as_me:19657: checking if we must include wchar.h to declare mbstate_t" >&5
19658 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
19659 if test "${cf_cv_mbstate_t+set}" = set; then
19660 echo $ECHO_N "(cached) $ECHO_C" >&6
19663 cat >"conftest.$ac_ext" <<_ACEOF
19664 #line 19664 "configure"
19665 #include "confdefs.h"
19667 #include <stdlib.h>
19668 #include <stdarg.h>
19670 #ifdef HAVE_LIBUTF8_H
19671 #include <libutf8.h>
19681 rm -f "conftest.$ac_objext"
19682 if { (eval echo "$as_me:19682: \"$ac_compile\"") >&5
19683 (eval $ac_compile) 2>&5
19685 echo "$as_me:19685: \$? = $ac_status" >&5
19686 (exit "$ac_status"); } &&
19687 { ac_try='test -s "conftest.$ac_objext"'
19688 { (eval echo "$as_me:19688: \"$ac_try\"") >&5
19689 (eval $ac_try) 2>&5
19691 echo "$as_me:19691: \$? = $ac_status" >&5
19692 (exit "$ac_status"); }; }; then
19695 echo "$as_me: failed program was:" >&5
19696 cat "conftest.$ac_ext" >&5
19697 cat >"conftest.$ac_ext" <<_ACEOF
19698 #line 19698 "configure"
19699 #include "confdefs.h"
19701 #include <stdlib.h>
19702 #include <stdarg.h>
19705 #ifdef HAVE_LIBUTF8_H
19706 #include <libutf8.h>
19716 rm -f "conftest.$ac_objext"
19717 if { (eval echo "$as_me:19717: \"$ac_compile\"") >&5
19718 (eval $ac_compile) 2>&5
19720 echo "$as_me:19720: \$? = $ac_status" >&5
19721 (exit "$ac_status"); } &&
19722 { ac_try='test -s "conftest.$ac_objext"'
19723 { (eval echo "$as_me:19723: \"$ac_try\"") >&5
19724 (eval $ac_try) 2>&5
19726 echo "$as_me:19726: \$? = $ac_status" >&5
19727 (exit "$ac_status"); }; }; then
19728 cf_cv_mbstate_t=yes
19730 echo "$as_me: failed program was:" >&5
19731 cat "conftest.$ac_ext" >&5
19732 cf_cv_mbstate_t=unknown
19734 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19736 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19738 echo "$as_me:19738: result: $cf_cv_mbstate_t" >&5
19739 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
19741 if test "$cf_cv_mbstate_t" = yes ; then
19743 cat >>confdefs.h <<\EOF
19744 #define NEED_WCHAR_H 1
19750 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
19751 if test "$cf_cv_mbstate_t" = unknown ; then
19752 NCURSES_MBSTATE_T=1
19755 # if we find mbstate_t in either place, use substitution to provide a fallback.
19756 if test "$cf_cv_mbstate_t" != unknown ; then
19757 NCURSES_OK_MBSTATE_T=1
19760 # This is needed on Tru64 5.0 to declare wchar_t
19761 echo "$as_me:19761: checking if we must include wchar.h to declare wchar_t" >&5
19762 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
19763 if test "${cf_cv_wchar_t+set}" = set; then
19764 echo $ECHO_N "(cached) $ECHO_C" >&6
19767 cat >"conftest.$ac_ext" <<_ACEOF
19768 #line 19768 "configure"
19769 #include "confdefs.h"
19771 #include <stdlib.h>
19772 #include <stdarg.h>
19774 #ifdef HAVE_LIBUTF8_H
19775 #include <libutf8.h>
19785 rm -f "conftest.$ac_objext"
19786 if { (eval echo "$as_me:19786: \"$ac_compile\"") >&5
19787 (eval $ac_compile) 2>&5
19789 echo "$as_me:19789: \$? = $ac_status" >&5
19790 (exit "$ac_status"); } &&
19791 { ac_try='test -s "conftest.$ac_objext"'
19792 { (eval echo "$as_me:19792: \"$ac_try\"") >&5
19793 (eval $ac_try) 2>&5
19795 echo "$as_me:19795: \$? = $ac_status" >&5
19796 (exit "$ac_status"); }; }; then
19799 echo "$as_me: failed program was:" >&5
19800 cat "conftest.$ac_ext" >&5
19801 cat >"conftest.$ac_ext" <<_ACEOF
19802 #line 19802 "configure"
19803 #include "confdefs.h"
19805 #include <stdlib.h>
19806 #include <stdarg.h>
19809 #ifdef HAVE_LIBUTF8_H
19810 #include <libutf8.h>
19820 rm -f "conftest.$ac_objext"
19821 if { (eval echo "$as_me:19821: \"$ac_compile\"") >&5
19822 (eval $ac_compile) 2>&5
19824 echo "$as_me:19824: \$? = $ac_status" >&5
19825 (exit "$ac_status"); } &&
19826 { ac_try='test -s "conftest.$ac_objext"'
19827 { (eval echo "$as_me:19827: \"$ac_try\"") >&5
19828 (eval $ac_try) 2>&5
19830 echo "$as_me:19830: \$? = $ac_status" >&5
19831 (exit "$ac_status"); }; }; then
19834 echo "$as_me: failed program was:" >&5
19835 cat "conftest.$ac_ext" >&5
19836 cf_cv_wchar_t=unknown
19838 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19840 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19842 echo "$as_me:19842: result: $cf_cv_wchar_t" >&5
19843 echo "${ECHO_T}$cf_cv_wchar_t" >&6
19845 if test "$cf_cv_wchar_t" = yes ; then
19847 cat >>confdefs.h <<\EOF
19848 #define NEED_WCHAR_H 1
19854 # if we do not find wchar_t in either place, use substitution to provide a fallback.
19855 if test "$cf_cv_wchar_t" = unknown ; then
19859 # if we find wchar_t in either place, use substitution to provide a fallback.
19860 if test "$cf_cv_wchar_t" != unknown ; then
19861 NCURSES_OK_WCHAR_T=1
19864 # This is needed on Tru64 5.0 to declare wint_t
19865 echo "$as_me:19865: checking if we must include wchar.h to declare wint_t" >&5
19866 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
19867 if test "${cf_cv_wint_t+set}" = set; then
19868 echo $ECHO_N "(cached) $ECHO_C" >&6
19871 cat >"conftest.$ac_ext" <<_ACEOF
19872 #line 19872 "configure"
19873 #include "confdefs.h"
19875 #include <stdlib.h>
19876 #include <stdarg.h>
19878 #ifdef HAVE_LIBUTF8_H
19879 #include <libutf8.h>
19889 rm -f "conftest.$ac_objext"
19890 if { (eval echo "$as_me:19890: \"$ac_compile\"") >&5
19891 (eval $ac_compile) 2>&5
19893 echo "$as_me:19893: \$? = $ac_status" >&5
19894 (exit "$ac_status"); } &&
19895 { ac_try='test -s "conftest.$ac_objext"'
19896 { (eval echo "$as_me:19896: \"$ac_try\"") >&5
19897 (eval $ac_try) 2>&5
19899 echo "$as_me:19899: \$? = $ac_status" >&5
19900 (exit "$ac_status"); }; }; then
19903 echo "$as_me: failed program was:" >&5
19904 cat "conftest.$ac_ext" >&5
19905 cat >"conftest.$ac_ext" <<_ACEOF
19906 #line 19906 "configure"
19907 #include "confdefs.h"
19909 #include <stdlib.h>
19910 #include <stdarg.h>
19913 #ifdef HAVE_LIBUTF8_H
19914 #include <libutf8.h>
19924 rm -f "conftest.$ac_objext"
19925 if { (eval echo "$as_me:19925: \"$ac_compile\"") >&5
19926 (eval $ac_compile) 2>&5
19928 echo "$as_me:19928: \$? = $ac_status" >&5
19929 (exit "$ac_status"); } &&
19930 { ac_try='test -s "conftest.$ac_objext"'
19931 { (eval echo "$as_me:19931: \"$ac_try\"") >&5
19932 (eval $ac_try) 2>&5
19934 echo "$as_me:19934: \$? = $ac_status" >&5
19935 (exit "$ac_status"); }; }; then
19938 echo "$as_me: failed program was:" >&5
19939 cat "conftest.$ac_ext" >&5
19940 cf_cv_wint_t=unknown
19942 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19944 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19946 echo "$as_me:19946: result: $cf_cv_wint_t" >&5
19947 echo "${ECHO_T}$cf_cv_wint_t" >&6
19949 if test "$cf_cv_wint_t" = yes ; then
19951 cat >>confdefs.h <<\EOF
19952 #define NEED_WCHAR_H 1
19958 # if we do not find wint_t in either place, use substitution to provide a fallback.
19959 if test "$cf_cv_wint_t" = unknown ; then
19963 # if we find wint_t in either place, use substitution to provide a fallback.
19964 if test "$cf_cv_wint_t" != unknown ; then
19965 NCURSES_OK_WINT_T=1
19968 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
19970 echo "$as_me:19970: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19971 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19972 cat >"conftest.$ac_ext" <<_ACEOF
19973 #line 19973 "configure"
19974 #include "confdefs.h"
19976 #ifndef _XOPEN_SOURCE_EXTENDED
19977 #define _XOPEN_SOURCE_EXTENDED
19979 #include <${cf_cv_ncurses_header:-curses.h}>
19990 rm -f "conftest.$ac_objext"
19991 if { (eval echo "$as_me:19991: \"$ac_compile\"") >&5
19992 (eval $ac_compile) 2>&5
19994 echo "$as_me:19994: \$? = $ac_status" >&5
19995 (exit "$ac_status"); } &&
19996 { ac_try='test -s "conftest.$ac_objext"'
19997 { (eval echo "$as_me:19997: \"$ac_try\"") >&5
19998 (eval $ac_try) 2>&5
20000 echo "$as_me:20000: \$? = $ac_status" >&5
20001 (exit "$ac_status"); }; }; then
20004 echo "$as_me: failed program was:" >&5
20005 cat "conftest.$ac_ext" >&5
20008 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20009 echo "$as_me:20009: result: $cf_result" >&5
20010 echo "${ECHO_T}$cf_result" >&6
20011 if test "$cf_result" = yes ; then
20013 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20015 cat >>confdefs.h <<EOF
20016 #define $cf_result 1
20021 cat >>confdefs.h <<EOF
20022 #define mbstate_t long
20029 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
20031 echo "$as_me:20031: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20032 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20033 cat >"conftest.$ac_ext" <<_ACEOF
20034 #line 20034 "configure"
20035 #include "confdefs.h"
20037 #ifndef _XOPEN_SOURCE_EXTENDED
20038 #define _XOPEN_SOURCE_EXTENDED
20040 #include <${cf_cv_ncurses_header:-curses.h}>
20051 rm -f "conftest.$ac_objext"
20052 if { (eval echo "$as_me:20052: \"$ac_compile\"") >&5
20053 (eval $ac_compile) 2>&5
20055 echo "$as_me:20055: \$? = $ac_status" >&5
20056 (exit "$ac_status"); } &&
20057 { ac_try='test -s "conftest.$ac_objext"'
20058 { (eval echo "$as_me:20058: \"$ac_try\"") >&5
20059 (eval $ac_try) 2>&5
20061 echo "$as_me:20061: \$? = $ac_status" >&5
20062 (exit "$ac_status"); }; }; then
20065 echo "$as_me: failed program was:" >&5
20066 cat "conftest.$ac_ext" >&5
20069 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20070 echo "$as_me:20070: result: $cf_result" >&5
20071 echo "${ECHO_T}$cf_result" >&6
20072 if test "$cf_result" = yes ; then
20074 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20076 cat >>confdefs.h <<EOF
20077 #define $cf_result 1
20082 cat >>confdefs.h <<EOF
20083 #define wchar_t long
20090 if test "$NCURSES_OK_WINT_T" = 0 ; then
20092 echo "$as_me:20092: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20093 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20094 cat >"conftest.$ac_ext" <<_ACEOF
20095 #line 20095 "configure"
20096 #include "confdefs.h"
20098 #ifndef _XOPEN_SOURCE_EXTENDED
20099 #define _XOPEN_SOURCE_EXTENDED
20101 #include <${cf_cv_ncurses_header:-curses.h}>
20112 rm -f "conftest.$ac_objext"
20113 if { (eval echo "$as_me:20113: \"$ac_compile\"") >&5
20114 (eval $ac_compile) 2>&5
20116 echo "$as_me:20116: \$? = $ac_status" >&5
20117 (exit "$ac_status"); } &&
20118 { ac_try='test -s "conftest.$ac_objext"'
20119 { (eval echo "$as_me:20119: \"$ac_try\"") >&5
20120 (eval $ac_try) 2>&5
20122 echo "$as_me:20122: \$? = $ac_status" >&5
20123 (exit "$ac_status"); }; }; then
20126 echo "$as_me: failed program was:" >&5
20127 cat "conftest.$ac_ext" >&5
20130 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20131 echo "$as_me:20131: result: $cf_result" >&5
20132 echo "${ECHO_T}$cf_result" >&6
20133 if test "$cf_result" = yes ; then
20135 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20137 cat >>confdefs.h <<EOF
20138 #define $cf_result 1
20143 cat >>confdefs.h <<EOF
20144 #define wint_t long
20160 echo "$as_me:20160: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
20161 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20163 cat >"conftest.$ac_ext" <<_ACEOF
20164 #line 20164 "configure"
20165 #include "confdefs.h"
20167 #ifdef HAVE_XCURSES
20168 #include <xcurses.h>
20169 char * XCursesProgramName = "test";
20171 #include <${cf_cv_ncurses_header:-curses.h}>
20172 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20173 #include <ncursesw/term.h>
20174 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20175 #include <ncurses/term.h>
20176 #elif defined(HAVE_TERM_H)
20185 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20186 const void *foo = (const void *)($cf_data);
20188 const void *foo = &($cf_data);
20190 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20196 rm -f "conftest.$ac_objext"
20197 if { (eval echo "$as_me:20197: \"$ac_compile\"") >&5
20198 (eval $ac_compile) 2>&5
20200 echo "$as_me:20200: \$? = $ac_status" >&5
20201 (exit "$ac_status"); } &&
20202 { ac_try='test -s "conftest.$ac_objext"'
20203 { (eval echo "$as_me:20203: \"$ac_try\"") >&5
20204 (eval $ac_try) 2>&5
20206 echo "$as_me:20206: \$? = $ac_status" >&5
20207 (exit "$ac_status"); }; }; then
20211 echo "$as_me: failed program was:" >&5
20212 cat "conftest.$ac_ext" >&5
20215 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20216 echo "$as_me:20216: result: $cf_result" >&5
20217 echo "${ECHO_T}$cf_result" >&6
20219 if test "$cf_result" = yes ; then
20221 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20223 cat >>confdefs.h <<EOF
20224 #define $cf_result 1
20228 echo "$as_me:20228: checking for data $cf_data in library" >&5
20229 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
20230 # BSD linkers insist on making weak linkage, but resolve at runtime.
20231 if test "$cross_compiling" = yes; then
20234 cat >"conftest.$ac_ext" <<_ACEOF
20235 #line 20235 "configure"
20236 #include "confdefs.h"
20238 #ifdef HAVE_XCURSES
20239 #include <xcurses.h>
20240 char * XCursesProgramName = "test";
20242 #include <${cf_cv_ncurses_header:-curses.h}>
20243 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20244 #include <ncursesw/term.h>
20245 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20246 #include <ncurses/term.h>
20247 #elif defined(HAVE_TERM_H)
20252 extern char $cf_data;
20259 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20260 const void *foo = (const void *)($cf_data);
20262 const void *foo = &($cf_data);
20264 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20266 ${cf_cv_main_return:-return}(foo == 0);
20273 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20274 if { (eval echo "$as_me:20274: \"$ac_link\"") >&5
20275 (eval $ac_link) 2>&5
20277 echo "$as_me:20277: \$? = $ac_status" >&5
20278 (exit "$ac_status"); } &&
20279 { ac_try='test -s "conftest$ac_exeext"'
20280 { (eval echo "$as_me:20280: \"$ac_try\"") >&5
20281 (eval $ac_try) 2>&5
20283 echo "$as_me:20283: \$? = $ac_status" >&5
20284 (exit "$ac_status"); }; }; then
20287 echo "$as_me: failed program was:" >&5
20288 cat "conftest.$ac_ext" >&5
20291 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20294 cat >"conftest.$ac_ext" <<_ACEOF
20295 #line 20295 "configure"
20296 #include "confdefs.h"
20298 #ifdef HAVE_XCURSES
20299 #include <xcurses.h>
20300 char * XCursesProgramName = "test";
20302 #include <${cf_cv_ncurses_header:-curses.h}>
20303 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20304 #include <ncursesw/term.h>
20305 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20306 #include <ncurses/term.h>
20307 #elif defined(HAVE_TERM_H)
20312 extern char $cf_data;
20316 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20317 const void *foo = (const void *)($cf_data);
20319 const void *foo = &($cf_data);
20321 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20323 ${cf_cv_main_return:-return}(foo == 0);
20326 rm -f "conftest$ac_exeext"
20327 if { (eval echo "$as_me:20327: \"$ac_link\"") >&5
20328 (eval $ac_link) 2>&5
20330 echo "$as_me:20330: \$? = $ac_status" >&5
20331 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20332 { (eval echo "$as_me:20332: \"$ac_try\"") >&5
20333 (eval $ac_try) 2>&5
20335 echo "$as_me:20335: \$? = $ac_status" >&5
20336 (exit "$ac_status"); }; }; then
20340 echo "$as_me: program exited with status $ac_status" >&5
20341 echo "$as_me: failed program was:" >&5
20342 cat "conftest.$ac_ext" >&5
20345 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20347 echo "$as_me:20347: result: $cf_result" >&5
20348 echo "${ECHO_T}$cf_result" >&6
20349 if test "$cf_result" = yes ; then
20351 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20353 cat >>confdefs.h <<EOF
20354 #define $cf_result 1
20357 # do not exit loop here, since we prefer system's declarations
20362 if test -n "$with_screen" && test "x$with_screen" = "xpdcurses"
20364 echo "$as_me:20364: checking for X" >&5
20365 echo $ECHO_N "checking for X... $ECHO_C" >&6
20367 # Check whether --with-x or --without-x was given.
20368 if test "${with_x+set}" = set; then
20372 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
20373 if test "x$with_x" = xno; then
20374 # The user explicitly disabled X.
20377 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
20378 # Both variables are already set.
20381 if test "${ac_cv_have_x+set}" = set; then
20382 echo $ECHO_N "(cached) $ECHO_C" >&6
20384 # One or both of the vars are not set, and there is no cached value.
20385 ac_x_includes=no ac_x_libraries=no
20386 rm -fr conftest.dir
20387 if mkdir conftest.dir; then
20389 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
20390 cat >Imakefile <<'EOF'
20392 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
20394 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
20395 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
20396 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
20397 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
20398 for ac_extension in a so sl dylib dll; do
20399 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
20400 test -f "$ac_im_libdir/libX11.$ac_extension"; then
20401 ac_im_usrlibdir=$ac_im_libdir; break
20404 # Screen out bogus values from the imake configuration. They are
20405 # bogus both because they are the default anyway, and because
20406 # using them would break gcc on systems where it needs fixed includes.
20407 case $ac_im_incroot in
20409 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
20411 case $ac_im_usrlibdir in
20412 /usr/lib | /lib) ;;
20413 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
20417 rm -fr conftest.dir
20420 # Standard set of common directories for X headers.
20421 # Check X11 before X11Rn because it is often a symlink to the current release.
20438 /usr/local/X11/include
20439 /usr/local/X11R7/include
20440 /usr/local/X11R6/include
20441 /usr/local/X11R5/include
20442 /usr/local/X11R4/include
20444 /usr/local/include/X11
20445 /usr/local/include/X11R7
20446 /usr/local/include/X11R6
20447 /usr/local/include/X11R5
20448 /usr/local/include/X11R4
20452 /usr/XFree86/include/X11
20456 /usr/unsupported/include
20457 /usr/athena/include
20458 /usr/local/x11r5/include
20459 /usr/lpp/Xamples/include
20461 /usr/openwin/include
20462 /usr/openwin/share/include'
20464 if test "$ac_x_includes" = no; then
20465 # Guess where to find include files, by looking for Intrinsic.h.
20466 # First, try using that file with no special directory specified.
20467 cat >"conftest.$ac_ext" <<_ACEOF
20468 #line 20468 "configure"
20469 #include "confdefs.h"
20470 #include <X11/Intrinsic.h>
20472 if { (eval echo "$as_me:20472: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20473 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20475 $EGREP -v '^ *\+' conftest.er1 >conftest.err
20477 cat conftest.err >&5
20478 echo "$as_me:20478: \$? = $ac_status" >&5
20479 (exit "$ac_status"); } >/dev/null; then
20480 if test -s conftest.err; then
20481 ac_cpp_err=$ac_c_preproc_warn_flag
20488 if test -z "$ac_cpp_err"; then
20489 # We can compile using X headers with no special include directory.
20492 echo "$as_me: failed program was:" >&5
20493 cat "conftest.$ac_ext" >&5
20494 for ac_dir in $ac_x_header_dirs; do
20495 if test -r "$ac_dir/X11/Intrinsic.h"; then
20496 ac_x_includes=$ac_dir
20501 rm -f conftest.err "conftest.$ac_ext"
20502 fi # $ac_x_includes = no
20504 if test "$ac_x_libraries" = no; then
20505 # Check for the libraries.
20506 # See if we find them without any special options.
20507 # Don't add to $LIBS permanently.
20510 cat >"conftest.$ac_ext" <<_ACEOF
20511 #line 20511 "configure"
20512 #include "confdefs.h"
20513 #include <X11/Intrinsic.h>
20522 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20523 if { (eval echo "$as_me:20523: \"$ac_link\"") >&5
20524 (eval $ac_link) 2>&5
20526 echo "$as_me:20526: \$? = $ac_status" >&5
20527 (exit "$ac_status"); } &&
20528 { ac_try='test -s "conftest$ac_exeext"'
20529 { (eval echo "$as_me:20529: \"$ac_try\"") >&5
20530 (eval $ac_try) 2>&5
20532 echo "$as_me:20532: \$? = $ac_status" >&5
20533 (exit "$ac_status"); }; }; then
20535 # We can link X programs with no special library path.
20538 echo "$as_me: failed program was:" >&5
20539 cat "conftest.$ac_ext" >&5
20541 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
20543 # Don't even attempt the hair of trying to link an X program!
20544 for ac_extension in a so sl dylib dll; do
20545 if test -r "$ac_dir/libXt.$ac_extension"; then
20546 ac_x_libraries=$ac_dir
20552 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20553 fi # $ac_x_libraries = no
20555 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
20556 # Didn't find X anywhere. Cache the known absence of X.
20557 ac_cv_have_x="have_x=no"
20559 # Record where we found X for the cache.
20560 ac_cv_have_x="have_x=yes \
20561 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
20566 eval "$ac_cv_have_x"
20569 if test "$have_x" != yes; then
20570 echo "$as_me:20570: result: $have_x" >&5
20571 echo "${ECHO_T}$have_x" >&6
20574 # If each of the values was on the command line, it overrides each guess.
20575 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
20576 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
20577 # Update the cache value to reflect the command line values.
20578 ac_cv_have_x="have_x=yes \
20579 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
20580 echo "$as_me:20580: result: libraries $x_libraries, headers $x_includes" >&5
20581 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
20584 if test "$no_x" = yes; then
20585 # Not all programs may use this symbol, but it does not hurt to define it.
20587 cat >>confdefs.h <<\EOF
20588 #define X_DISPLAY_MISSING 1
20596 if test -n "$x_includes"; then
20597 X_CFLAGS="$X_CFLAGS -I$x_includes"
20600 # It would also be nice to do this for all -L options, not just this one.
20601 if test -n "$x_libraries"; then
20602 X_LIBS="$X_LIBS -L$x_libraries"
20603 # For Solaris; some versions of Sun CC require a space after -R and
20604 # others require no space. Words are not sufficient . . . .
20605 case `(uname -sr) 2>/dev/null` in
20607 echo "$as_me:20607: checking whether -R must be followed by a space" >&5
20608 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
20609 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
20610 cat >"conftest.$ac_ext" <<_ACEOF
20611 #line 20611 "configure"
20612 #include "confdefs.h"
20622 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20623 if { (eval echo "$as_me:20623: \"$ac_link\"") >&5
20624 (eval $ac_link) 2>&5
20626 echo "$as_me:20626: \$? = $ac_status" >&5
20627 (exit "$ac_status"); } &&
20628 { ac_try='test -s "conftest$ac_exeext"'
20629 { (eval echo "$as_me:20629: \"$ac_try\"") >&5
20630 (eval $ac_try) 2>&5
20632 echo "$as_me:20632: \$? = $ac_status" >&5
20633 (exit "$ac_status"); }; }; then
20636 echo "$as_me: failed program was:" >&5
20637 cat "conftest.$ac_ext" >&5
20640 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20641 if test $ac_R_nospace = yes; then
20642 echo "$as_me:20642: result: no" >&5
20643 echo "${ECHO_T}no" >&6
20644 X_LIBS="$X_LIBS -R$x_libraries"
20646 LIBS="$ac_xsave_LIBS -R $x_libraries"
20647 cat >"conftest.$ac_ext" <<_ACEOF
20648 #line 20648 "configure"
20649 #include "confdefs.h"
20659 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20660 if { (eval echo "$as_me:20660: \"$ac_link\"") >&5
20661 (eval $ac_link) 2>&5
20663 echo "$as_me:20663: \$? = $ac_status" >&5
20664 (exit "$ac_status"); } &&
20665 { ac_try='test -s "conftest$ac_exeext"'
20666 { (eval echo "$as_me:20666: \"$ac_try\"") >&5
20667 (eval $ac_try) 2>&5
20669 echo "$as_me:20669: \$? = $ac_status" >&5
20670 (exit "$ac_status"); }; }; then
20673 echo "$as_me: failed program was:" >&5
20674 cat "conftest.$ac_ext" >&5
20677 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20678 if test $ac_R_space = yes; then
20679 echo "$as_me:20679: result: yes" >&5
20680 echo "${ECHO_T}yes" >&6
20681 X_LIBS="$X_LIBS -R $x_libraries"
20683 echo "$as_me:20683: result: neither works" >&5
20684 echo "${ECHO_T}neither works" >&6
20687 LIBS=$ac_xsave_LIBS
20691 # Check for system-dependent libraries X programs must link with.
20692 # Do this before checking for the system-independent R6 libraries
20693 # (-lICE), since we may need -lsocket or whatever for X linking.
20695 if test "$ISC" = yes; then
20696 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
20698 # Martyn Johnson says this is needed for Ultrix, if the X
20699 # libraries were built with DECnet support. And Karl Berry says
20700 # the Alpha needs dnet_stub (dnet does not exist).
20701 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
20702 cat >"conftest.$ac_ext" <<_ACEOF
20703 #line 20703 "configure"
20704 #include "confdefs.h"
20706 /* Override any gcc2 internal prototype to avoid an error. */
20710 /* We use char because int might match the return type of a gcc2
20711 builtin and then its argument prototype would still apply. */
20712 char XOpenDisplay ();
20721 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20722 if { (eval echo "$as_me:20722: \"$ac_link\"") >&5
20723 (eval $ac_link) 2>&5
20725 echo "$as_me:20725: \$? = $ac_status" >&5
20726 (exit "$ac_status"); } &&
20727 { ac_try='test -s "conftest$ac_exeext"'
20728 { (eval echo "$as_me:20728: \"$ac_try\"") >&5
20729 (eval $ac_try) 2>&5
20731 echo "$as_me:20731: \$? = $ac_status" >&5
20732 (exit "$ac_status"); }; }; then
20735 echo "$as_me: failed program was:" >&5
20736 cat "conftest.$ac_ext" >&5
20737 echo "$as_me:20737: checking for dnet_ntoa in -ldnet" >&5
20738 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
20739 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
20740 echo $ECHO_N "(cached) $ECHO_C" >&6
20742 ac_check_lib_save_LIBS=$LIBS
20743 LIBS="-ldnet $LIBS"
20744 cat >"conftest.$ac_ext" <<_ACEOF
20745 #line 20745 "configure"
20746 #include "confdefs.h"
20748 /* Override any gcc2 internal prototype to avoid an error. */
20752 /* We use char because int might match the return type of a gcc2
20753 builtin and then its argument prototype would still apply. */
20763 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20764 if { (eval echo "$as_me:20764: \"$ac_link\"") >&5
20765 (eval $ac_link) 2>&5
20767 echo "$as_me:20767: \$? = $ac_status" >&5
20768 (exit "$ac_status"); } &&
20769 { ac_try='test -s "conftest$ac_exeext"'
20770 { (eval echo "$as_me:20770: \"$ac_try\"") >&5
20771 (eval $ac_try) 2>&5
20773 echo "$as_me:20773: \$? = $ac_status" >&5
20774 (exit "$ac_status"); }; }; then
20775 ac_cv_lib_dnet_dnet_ntoa=yes
20777 echo "$as_me: failed program was:" >&5
20778 cat "conftest.$ac_ext" >&5
20779 ac_cv_lib_dnet_dnet_ntoa=no
20781 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20782 LIBS=$ac_check_lib_save_LIBS
20784 echo "$as_me:20784: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
20785 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
20786 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
20787 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
20790 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
20791 echo "$as_me:20791: checking for dnet_ntoa in -ldnet_stub" >&5
20792 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
20793 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
20794 echo $ECHO_N "(cached) $ECHO_C" >&6
20796 ac_check_lib_save_LIBS=$LIBS
20797 LIBS="-ldnet_stub $LIBS"
20798 cat >"conftest.$ac_ext" <<_ACEOF
20799 #line 20799 "configure"
20800 #include "confdefs.h"
20802 /* Override any gcc2 internal prototype to avoid an error. */
20806 /* We use char because int might match the return type of a gcc2
20807 builtin and then its argument prototype would still apply. */
20817 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20818 if { (eval echo "$as_me:20818: \"$ac_link\"") >&5
20819 (eval $ac_link) 2>&5
20821 echo "$as_me:20821: \$? = $ac_status" >&5
20822 (exit "$ac_status"); } &&
20823 { ac_try='test -s "conftest$ac_exeext"'
20824 { (eval echo "$as_me:20824: \"$ac_try\"") >&5
20825 (eval $ac_try) 2>&5
20827 echo "$as_me:20827: \$? = $ac_status" >&5
20828 (exit "$ac_status"); }; }; then
20829 ac_cv_lib_dnet_stub_dnet_ntoa=yes
20831 echo "$as_me: failed program was:" >&5
20832 cat "conftest.$ac_ext" >&5
20833 ac_cv_lib_dnet_stub_dnet_ntoa=no
20835 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20836 LIBS=$ac_check_lib_save_LIBS
20838 echo "$as_me:20838: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
20839 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
20840 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
20841 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
20846 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20847 LIBS="$ac_xsave_LIBS"
20849 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
20850 # to get the SysV transport functions.
20851 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
20853 # The nsl library prevents programs from opening the X display
20854 # on Irix 5.2, according to T.E. Dickey.
20855 # The functions gethostbyname, getservbyname, and inet_addr are
20856 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
20857 echo "$as_me:20857: checking for gethostbyname" >&5
20858 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
20859 if test "${ac_cv_func_gethostbyname+set}" = set; then
20860 echo $ECHO_N "(cached) $ECHO_C" >&6
20862 cat >"conftest.$ac_ext" <<_ACEOF
20863 #line 20863 "configure"
20864 #include "confdefs.h"
20865 #define gethostbyname autoconf_temporary
20866 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
20867 #undef gethostbyname
20873 /* We use char because int might match the return type of a gcc2
20874 builtin and then its argument prototype would still apply. */
20875 char gethostbyname (void);
20881 /* The GNU C library defines stubs for functions which it implements
20882 to always fail with ENOSYS. Some functions are actually named
20883 something starting with __ and the normal name is an alias. */
20884 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
20885 #error found stub for gethostbyname
20888 return gethostbyname ();
20893 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20894 if { (eval echo "$as_me:20894: \"$ac_link\"") >&5
20895 (eval $ac_link) 2>&5
20897 echo "$as_me:20897: \$? = $ac_status" >&5
20898 (exit "$ac_status"); } &&
20899 { ac_try='test -s "conftest$ac_exeext"'
20900 { (eval echo "$as_me:20900: \"$ac_try\"") >&5
20901 (eval $ac_try) 2>&5
20903 echo "$as_me:20903: \$? = $ac_status" >&5
20904 (exit "$ac_status"); }; }; then
20905 ac_cv_func_gethostbyname=yes
20907 echo "$as_me: failed program was:" >&5
20908 cat "conftest.$ac_ext" >&5
20909 ac_cv_func_gethostbyname=no
20911 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20913 echo "$as_me:20913: result: $ac_cv_func_gethostbyname" >&5
20914 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
20916 if test $ac_cv_func_gethostbyname = no; then
20917 echo "$as_me:20917: checking for gethostbyname in -lnsl" >&5
20918 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
20919 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
20920 echo $ECHO_N "(cached) $ECHO_C" >&6
20922 ac_check_lib_save_LIBS=$LIBS
20924 cat >"conftest.$ac_ext" <<_ACEOF
20925 #line 20925 "configure"
20926 #include "confdefs.h"
20928 /* Override any gcc2 internal prototype to avoid an error. */
20932 /* We use char because int might match the return type of a gcc2
20933 builtin and then its argument prototype would still apply. */
20934 char gethostbyname ();
20943 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20944 if { (eval echo "$as_me:20944: \"$ac_link\"") >&5
20945 (eval $ac_link) 2>&5
20947 echo "$as_me:20947: \$? = $ac_status" >&5
20948 (exit "$ac_status"); } &&
20949 { ac_try='test -s "conftest$ac_exeext"'
20950 { (eval echo "$as_me:20950: \"$ac_try\"") >&5
20951 (eval $ac_try) 2>&5
20953 echo "$as_me:20953: \$? = $ac_status" >&5
20954 (exit "$ac_status"); }; }; then
20955 ac_cv_lib_nsl_gethostbyname=yes
20957 echo "$as_me: failed program was:" >&5
20958 cat "conftest.$ac_ext" >&5
20959 ac_cv_lib_nsl_gethostbyname=no
20961 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20962 LIBS=$ac_check_lib_save_LIBS
20964 echo "$as_me:20964: result: $ac_cv_lib_nsl_gethostbyname" >&5
20965 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
20966 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
20967 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
20970 if test $ac_cv_lib_nsl_gethostbyname = no; then
20971 echo "$as_me:20971: checking for gethostbyname in -lbsd" >&5
20972 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
20973 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
20974 echo $ECHO_N "(cached) $ECHO_C" >&6
20976 ac_check_lib_save_LIBS=$LIBS
20978 cat >"conftest.$ac_ext" <<_ACEOF
20979 #line 20979 "configure"
20980 #include "confdefs.h"
20982 /* Override any gcc2 internal prototype to avoid an error. */
20986 /* We use char because int might match the return type of a gcc2
20987 builtin and then its argument prototype would still apply. */
20988 char gethostbyname ();
20997 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20998 if { (eval echo "$as_me:20998: \"$ac_link\"") >&5
20999 (eval $ac_link) 2>&5
21001 echo "$as_me:21001: \$? = $ac_status" >&5
21002 (exit "$ac_status"); } &&
21003 { ac_try='test -s "conftest$ac_exeext"'
21004 { (eval echo "$as_me:21004: \"$ac_try\"") >&5
21005 (eval $ac_try) 2>&5
21007 echo "$as_me:21007: \$? = $ac_status" >&5
21008 (exit "$ac_status"); }; }; then
21009 ac_cv_lib_bsd_gethostbyname=yes
21011 echo "$as_me: failed program was:" >&5
21012 cat "conftest.$ac_ext" >&5
21013 ac_cv_lib_bsd_gethostbyname=no
21015 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21016 LIBS=$ac_check_lib_save_LIBS
21018 echo "$as_me:21018: result: $ac_cv_lib_bsd_gethostbyname" >&5
21019 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
21020 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
21021 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
21027 # lieder@skyler.mavd.honeywell.com says without -lsocket,
21028 # socket/setsockopt and other routines are undefined under SCO ODT
21029 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
21030 # on later versions), says Simon Leinen: it contains gethostby*
21031 # variants that don't use the nameserver (or something). -lsocket
21032 # must be given before -lnsl if both are needed. We assume that
21033 # if connect needs -lnsl, so does gethostbyname.
21034 echo "$as_me:21034: checking for connect" >&5
21035 echo $ECHO_N "checking for connect... $ECHO_C" >&6
21036 if test "${ac_cv_func_connect+set}" = set; then
21037 echo $ECHO_N "(cached) $ECHO_C" >&6
21039 cat >"conftest.$ac_ext" <<_ACEOF
21040 #line 21040 "configure"
21041 #include "confdefs.h"
21042 #define connect autoconf_temporary
21043 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21050 /* We use char because int might match the return type of a gcc2
21051 builtin and then its argument prototype would still apply. */
21052 char connect (void);
21058 /* The GNU C library defines stubs for functions which it implements
21059 to always fail with ENOSYS. Some functions are actually named
21060 something starting with __ and the normal name is an alias. */
21061 #if defined (__stub_connect) || defined (__stub___connect)
21062 #error found stub for connect
21070 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21071 if { (eval echo "$as_me:21071: \"$ac_link\"") >&5
21072 (eval $ac_link) 2>&5
21074 echo "$as_me:21074: \$? = $ac_status" >&5
21075 (exit "$ac_status"); } &&
21076 { ac_try='test -s "conftest$ac_exeext"'
21077 { (eval echo "$as_me:21077: \"$ac_try\"") >&5
21078 (eval $ac_try) 2>&5
21080 echo "$as_me:21080: \$? = $ac_status" >&5
21081 (exit "$ac_status"); }; }; then
21082 ac_cv_func_connect=yes
21084 echo "$as_me: failed program was:" >&5
21085 cat "conftest.$ac_ext" >&5
21086 ac_cv_func_connect=no
21088 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21090 echo "$as_me:21090: result: $ac_cv_func_connect" >&5
21091 echo "${ECHO_T}$ac_cv_func_connect" >&6
21093 if test $ac_cv_func_connect = no; then
21094 echo "$as_me:21094: checking for connect in -lsocket" >&5
21095 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
21096 if test "${ac_cv_lib_socket_connect+set}" = set; then
21097 echo $ECHO_N "(cached) $ECHO_C" >&6
21099 ac_check_lib_save_LIBS=$LIBS
21100 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
21101 cat >"conftest.$ac_ext" <<_ACEOF
21102 #line 21102 "configure"
21103 #include "confdefs.h"
21105 /* Override any gcc2 internal prototype to avoid an error. */
21109 /* We use char because int might match the return type of a gcc2
21110 builtin and then its argument prototype would still apply. */
21120 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21121 if { (eval echo "$as_me:21121: \"$ac_link\"") >&5
21122 (eval $ac_link) 2>&5
21124 echo "$as_me:21124: \$? = $ac_status" >&5
21125 (exit "$ac_status"); } &&
21126 { ac_try='test -s "conftest$ac_exeext"'
21127 { (eval echo "$as_me:21127: \"$ac_try\"") >&5
21128 (eval $ac_try) 2>&5
21130 echo "$as_me:21130: \$? = $ac_status" >&5
21131 (exit "$ac_status"); }; }; then
21132 ac_cv_lib_socket_connect=yes
21134 echo "$as_me: failed program was:" >&5
21135 cat "conftest.$ac_ext" >&5
21136 ac_cv_lib_socket_connect=no
21138 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21139 LIBS=$ac_check_lib_save_LIBS
21141 echo "$as_me:21141: result: $ac_cv_lib_socket_connect" >&5
21142 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
21143 if test "$ac_cv_lib_socket_connect" = yes; then
21144 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
21149 # Guillermo Gomez says -lposix is necessary on A/UX.
21150 echo "$as_me:21150: checking for remove" >&5
21151 echo $ECHO_N "checking for remove... $ECHO_C" >&6
21152 if test "${ac_cv_func_remove+set}" = set; then
21153 echo $ECHO_N "(cached) $ECHO_C" >&6
21155 cat >"conftest.$ac_ext" <<_ACEOF
21156 #line 21156 "configure"
21157 #include "confdefs.h"
21158 #define remove autoconf_temporary
21159 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21166 /* We use char because int might match the return type of a gcc2
21167 builtin and then its argument prototype would still apply. */
21168 char remove (void);
21174 /* The GNU C library defines stubs for functions which it implements
21175 to always fail with ENOSYS. Some functions are actually named
21176 something starting with __ and the normal name is an alias. */
21177 #if defined (__stub_remove) || defined (__stub___remove)
21178 #error found stub for remove
21186 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21187 if { (eval echo "$as_me:21187: \"$ac_link\"") >&5
21188 (eval $ac_link) 2>&5
21190 echo "$as_me:21190: \$? = $ac_status" >&5
21191 (exit "$ac_status"); } &&
21192 { ac_try='test -s "conftest$ac_exeext"'
21193 { (eval echo "$as_me:21193: \"$ac_try\"") >&5
21194 (eval $ac_try) 2>&5
21196 echo "$as_me:21196: \$? = $ac_status" >&5
21197 (exit "$ac_status"); }; }; then
21198 ac_cv_func_remove=yes
21200 echo "$as_me: failed program was:" >&5
21201 cat "conftest.$ac_ext" >&5
21202 ac_cv_func_remove=no
21204 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21206 echo "$as_me:21206: result: $ac_cv_func_remove" >&5
21207 echo "${ECHO_T}$ac_cv_func_remove" >&6
21209 if test $ac_cv_func_remove = no; then
21210 echo "$as_me:21210: checking for remove in -lposix" >&5
21211 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
21212 if test "${ac_cv_lib_posix_remove+set}" = set; then
21213 echo $ECHO_N "(cached) $ECHO_C" >&6
21215 ac_check_lib_save_LIBS=$LIBS
21216 LIBS="-lposix $LIBS"
21217 cat >"conftest.$ac_ext" <<_ACEOF
21218 #line 21218 "configure"
21219 #include "confdefs.h"
21221 /* Override any gcc2 internal prototype to avoid an error. */
21225 /* We use char because int might match the return type of a gcc2
21226 builtin and then its argument prototype would still apply. */
21236 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21237 if { (eval echo "$as_me:21237: \"$ac_link\"") >&5
21238 (eval $ac_link) 2>&5
21240 echo "$as_me:21240: \$? = $ac_status" >&5
21241 (exit "$ac_status"); } &&
21242 { ac_try='test -s "conftest$ac_exeext"'
21243 { (eval echo "$as_me:21243: \"$ac_try\"") >&5
21244 (eval $ac_try) 2>&5
21246 echo "$as_me:21246: \$? = $ac_status" >&5
21247 (exit "$ac_status"); }; }; then
21248 ac_cv_lib_posix_remove=yes
21250 echo "$as_me: failed program was:" >&5
21251 cat "conftest.$ac_ext" >&5
21252 ac_cv_lib_posix_remove=no
21254 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21255 LIBS=$ac_check_lib_save_LIBS
21257 echo "$as_me:21257: result: $ac_cv_lib_posix_remove" >&5
21258 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
21259 if test "$ac_cv_lib_posix_remove" = yes; then
21260 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
21265 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
21266 echo "$as_me:21266: checking for shmat" >&5
21267 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
21268 if test "${ac_cv_func_shmat+set}" = set; then
21269 echo $ECHO_N "(cached) $ECHO_C" >&6
21271 cat >"conftest.$ac_ext" <<_ACEOF
21272 #line 21272 "configure"
21273 #include "confdefs.h"
21274 #define shmat autoconf_temporary
21275 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21282 /* We use char because int might match the return type of a gcc2
21283 builtin and then its argument prototype would still apply. */
21290 /* The GNU C library defines stubs for functions which it implements
21291 to always fail with ENOSYS. Some functions are actually named
21292 something starting with __ and the normal name is an alias. */
21293 #if defined (__stub_shmat) || defined (__stub___shmat)
21294 #error found stub for shmat
21302 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21303 if { (eval echo "$as_me:21303: \"$ac_link\"") >&5
21304 (eval $ac_link) 2>&5
21306 echo "$as_me:21306: \$? = $ac_status" >&5
21307 (exit "$ac_status"); } &&
21308 { ac_try='test -s "conftest$ac_exeext"'
21309 { (eval echo "$as_me:21309: \"$ac_try\"") >&5
21310 (eval $ac_try) 2>&5
21312 echo "$as_me:21312: \$? = $ac_status" >&5
21313 (exit "$ac_status"); }; }; then
21314 ac_cv_func_shmat=yes
21316 echo "$as_me: failed program was:" >&5
21317 cat "conftest.$ac_ext" >&5
21318 ac_cv_func_shmat=no
21320 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21322 echo "$as_me:21322: result: $ac_cv_func_shmat" >&5
21323 echo "${ECHO_T}$ac_cv_func_shmat" >&6
21325 if test $ac_cv_func_shmat = no; then
21326 echo "$as_me:21326: checking for shmat in -lipc" >&5
21327 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
21328 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
21329 echo $ECHO_N "(cached) $ECHO_C" >&6
21331 ac_check_lib_save_LIBS=$LIBS
21333 cat >"conftest.$ac_ext" <<_ACEOF
21334 #line 21334 "configure"
21335 #include "confdefs.h"
21337 /* Override any gcc2 internal prototype to avoid an error. */
21341 /* We use char because int might match the return type of a gcc2
21342 builtin and then its argument prototype would still apply. */
21352 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21353 if { (eval echo "$as_me:21353: \"$ac_link\"") >&5
21354 (eval $ac_link) 2>&5
21356 echo "$as_me:21356: \$? = $ac_status" >&5
21357 (exit "$ac_status"); } &&
21358 { ac_try='test -s "conftest$ac_exeext"'
21359 { (eval echo "$as_me:21359: \"$ac_try\"") >&5
21360 (eval $ac_try) 2>&5
21362 echo "$as_me:21362: \$? = $ac_status" >&5
21363 (exit "$ac_status"); }; }; then
21364 ac_cv_lib_ipc_shmat=yes
21366 echo "$as_me: failed program was:" >&5
21367 cat "conftest.$ac_ext" >&5
21368 ac_cv_lib_ipc_shmat=no
21370 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21371 LIBS=$ac_check_lib_save_LIBS
21373 echo "$as_me:21373: result: $ac_cv_lib_ipc_shmat" >&5
21374 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
21375 if test "$ac_cv_lib_ipc_shmat" = yes; then
21376 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
21382 # Check for libraries that X11R6 Xt/Xaw programs need.
21383 ac_save_LDFLAGS=$LDFLAGS
21384 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
21385 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
21386 # check for ICE first), but we must link in the order -lSM -lICE or
21387 # we get undefined symbols. So assume we have SM if we have ICE.
21388 # These have to be linked with before -lX11, unlike the other
21389 # libraries we check for below, so use a different variable.
21390 # John Interrante, Karl Berry
21391 echo "$as_me:21391: checking for IceConnectionNumber in -lICE" >&5
21392 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
21393 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
21394 echo $ECHO_N "(cached) $ECHO_C" >&6
21396 ac_check_lib_save_LIBS=$LIBS
21397 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
21398 cat >"conftest.$ac_ext" <<_ACEOF
21399 #line 21399 "configure"
21400 #include "confdefs.h"
21402 /* Override any gcc2 internal prototype to avoid an error. */
21406 /* We use char because int might match the return type of a gcc2
21407 builtin and then its argument prototype would still apply. */
21408 char IceConnectionNumber ();
21412 IceConnectionNumber ();
21417 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21418 if { (eval echo "$as_me:21418: \"$ac_link\"") >&5
21419 (eval $ac_link) 2>&5
21421 echo "$as_me:21421: \$? = $ac_status" >&5
21422 (exit "$ac_status"); } &&
21423 { ac_try='test -s "conftest$ac_exeext"'
21424 { (eval echo "$as_me:21424: \"$ac_try\"") >&5
21425 (eval $ac_try) 2>&5
21427 echo "$as_me:21427: \$? = $ac_status" >&5
21428 (exit "$ac_status"); }; }; then
21429 ac_cv_lib_ICE_IceConnectionNumber=yes
21431 echo "$as_me: failed program was:" >&5
21432 cat "conftest.$ac_ext" >&5
21433 ac_cv_lib_ICE_IceConnectionNumber=no
21435 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21436 LIBS=$ac_check_lib_save_LIBS
21438 echo "$as_me:21438: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
21439 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
21440 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
21441 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
21444 LDFLAGS=$ac_save_LDFLAGS
21450 if test "$GCC" = yes || test "$GXX" = yes
21453 if test "$GCC" = yes || test "$GXX" = yes
21457 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
21459 echo "${as_me:-configure}:21459: testing repairing CFLAGS: $CFLAGS ..." 1>&5
21462 for cf_temp_scan in $CFLAGS
21464 case "x$cf_temp_scan" in
21467 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
21468 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
21473 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
21474 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
21479 CFLAGS="$cf_temp_flags"
21480 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
21482 echo "${as_me:-configure}:21482: testing ... fixed $CFLAGS ..." 1>&5
21484 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
21486 echo "${as_me:-configure}:21486: testing ... extra $EXTRA_CFLAGS ..." 1>&5
21492 if test "$GCC" = yes || test "$GXX" = yes
21496 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
21498 echo "${as_me:-configure}:21498: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
21501 for cf_temp_scan in $CPPFLAGS
21503 case "x$cf_temp_scan" in
21506 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
21507 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
21512 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
21513 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
21518 CPPFLAGS="$cf_temp_flags"
21519 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
21521 echo "${as_me:-configure}:21521: testing ... fixed $CPPFLAGS ..." 1>&5
21523 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
21525 echo "${as_me:-configure}:21525: testing ... extra $EXTRA_CFLAGS ..." 1>&5
21531 if test "$GCC" = yes || test "$GXX" = yes
21535 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
21537 echo "${as_me:-configure}:21537: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
21540 for cf_temp_scan in $LDFLAGS
21542 case "x$cf_temp_scan" in
21545 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
21546 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
21551 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
21552 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
21557 LDFLAGS="$cf_temp_flags"
21558 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
21560 echo "${as_me:-configure}:21560: testing ... fixed $LDFLAGS ..." 1>&5
21562 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
21564 echo "${as_me:-configure}:21564: testing ... extra $EXTRA_CFLAGS ..." 1>&5
21570 echo "$as_me:21570: checking if you want to turn on gcc warnings" >&5
21571 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
21573 # Check whether --enable-warnings or --disable-warnings was given.
21574 if test "${enable_warnings+set}" = set; then
21575 enableval="$enable_warnings"
21576 test "$enableval" != yes && enableval=no
21577 if test "$enableval" != "no" ; then
21578 enable_warnings=yes
21587 echo "$as_me:21587: result: $enable_warnings" >&5
21588 echo "${ECHO_T}$enable_warnings" >&6
21589 if test "$enable_warnings" = "yes"
21592 if test "$GCC" = yes || test "$GXX" = yes
21594 cat > conftest.i <<EOF
21596 #define GCC_PRINTF 0
21599 #define GCC_SCANF 0
21601 #ifndef GCC_NORETURN
21602 #define GCC_NORETURN /* nothing */
21605 #define GCC_UNUSED /* nothing */
21608 if test "$GCC" = yes
21610 { echo "$as_me:21610: checking for $CC __attribute__ directives..." >&5
21611 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
21612 cat > "conftest.$ac_ext" <<EOF
21613 #line 21613 "${as_me:-configure}"
21614 #include "confdefs.h"
21615 #include "conftest.h"
21616 #include "conftest.i"
21618 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
21620 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
21623 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
21625 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
21627 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
21628 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
21629 extern GCC_NORETURN void foo(void);
21630 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
21632 cf_printf_attribute=no
21633 cf_scanf_attribute=no
21634 for cf_attribute in scanf printf unused noreturn
21637 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21639 cf_directive="__attribute__(($cf_attribute))"
21640 echo "checking for $CC $cf_directive" 1>&5
21642 case "$cf_attribute" in
21644 cf_printf_attribute=yes
21645 cat >conftest.h <<EOF
21646 #define GCC_$cf_ATTRIBUTE 1
21650 cf_scanf_attribute=yes
21651 cat >conftest.h <<EOF
21652 #define GCC_$cf_ATTRIBUTE 1
21656 cat >conftest.h <<EOF
21657 #define GCC_$cf_ATTRIBUTE $cf_directive
21662 if { (eval echo "$as_me:21662: \"$ac_compile\"") >&5
21663 (eval $ac_compile) 2>&5
21665 echo "$as_me:21665: \$? = $ac_status" >&5
21666 (exit "$ac_status"); }; then
21667 test -n "$verbose" && echo "$as_me:21667: result: ... $cf_attribute" >&5
21668 echo "${ECHO_T}... $cf_attribute" >&6
21669 cat conftest.h >>confdefs.h
21670 case "$cf_attribute" in
21673 cat >>confdefs.h <<EOF
21674 #define GCC_NORETURN $cf_directive
21679 cf_value='/* nothing */'
21680 if test "$cf_printf_attribute" != no ; then
21681 cf_value='__attribute__((format(printf,fmt,var)))'
21683 cat >>confdefs.h <<\EOF
21684 #define GCC_PRINTF 1
21689 cat >>confdefs.h <<EOF
21690 #define GCC_PRINTFLIKE(fmt,var) $cf_value
21695 cf_value='/* nothing */'
21696 if test "$cf_scanf_attribute" != no ; then
21697 cf_value='__attribute__((format(scanf,fmt,var)))'
21699 cat >>confdefs.h <<\EOF
21700 #define GCC_SCANF 1
21705 cat >>confdefs.h <<EOF
21706 #define GCC_SCANFLIKE(fmt,var) $cf_value
21712 cat >>confdefs.h <<EOF
21713 #define GCC_UNUSED $cf_directive
21721 ${FGREP-fgrep} define conftest.i >>confdefs.h
21726 if test "x$have_x" = xyes; then
21728 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
21729 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
21730 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
21731 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
21732 for cf_X_CFLAGS in $X_CFLAGS
21734 case "x$cf_X_CFLAGS" in
21736 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
21739 CFLAGS="$CFLAGS $cf_X_CFLAGS"
21744 cat >"conftest.$ac_ext" <<_ACEOF
21745 #line 21745 "configure"
21746 #include "confdefs.h"
21748 #include <stdlib.h>
21749 #include <X11/Intrinsic.h>
21754 String foo = malloc(1); (void)foo
21759 rm -f "conftest.$ac_objext"
21760 if { (eval echo "$as_me:21760: \"$ac_compile\"") >&5
21761 (eval $ac_compile) 2>&5
21763 echo "$as_me:21763: \$? = $ac_status" >&5
21764 (exit "$ac_status"); } &&
21765 { ac_try='test -s "conftest.$ac_objext"'
21766 { (eval echo "$as_me:21766: \"$ac_try\"") >&5
21767 (eval $ac_try) 2>&5
21769 echo "$as_me:21769: \$? = $ac_status" >&5
21770 (exit "$ac_status"); }; }; then
21772 echo "$as_me:21772: checking for X11/Xt const-feature" >&5
21773 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
21774 if test "${cf_cv_const_x_string+set}" = set; then
21775 echo $ECHO_N "(cached) $ECHO_C" >&6
21778 cat >"conftest.$ac_ext" <<_ACEOF
21779 #line 21779 "configure"
21780 #include "confdefs.h"
21782 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
21783 #undef XTSTRINGDEFINES /* X11R5 and later */
21784 #include <stdlib.h>
21785 #include <X11/Intrinsic.h>
21790 String foo = malloc(1); *foo = 0
21795 rm -f "conftest.$ac_objext"
21796 if { (eval echo "$as_me:21796: \"$ac_compile\"") >&5
21797 (eval $ac_compile) 2>&5
21799 echo "$as_me:21799: \$? = $ac_status" >&5
21800 (exit "$ac_status"); } &&
21801 { ac_try='test -s "conftest.$ac_objext"'
21802 { (eval echo "$as_me:21802: \"$ac_try\"") >&5
21803 (eval $ac_try) 2>&5
21805 echo "$as_me:21805: \$? = $ac_status" >&5
21806 (exit "$ac_status"); }; }; then
21808 cf_cv_const_x_string=no
21811 echo "$as_me: failed program was:" >&5
21812 cat "conftest.$ac_ext" >&5
21814 cf_cv_const_x_string=yes
21817 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21820 echo "$as_me:21820: result: $cf_cv_const_x_string" >&5
21821 echo "${ECHO_T}$cf_cv_const_x_string" >&6
21823 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
21824 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
21825 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
21827 case "$cf_cv_const_x_string" in
21830 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21831 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
21836 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21837 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
21843 echo "$as_me: failed program was:" >&5
21844 cat "conftest.$ac_ext" >&5
21846 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21848 cat > "conftest.$ac_ext" <<EOF
21849 #line 21849 "${as_me:-configure}"
21850 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
21852 if test "$INTEL_COMPILER" = yes
21854 # The "-wdXXX" options suppress warnings:
21855 # remark #1419: external declaration in primary source file
21856 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
21857 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
21858 # remark #193: zero used for undefined preprocessing identifier
21859 # remark #593: variable "curs_sb_left_arrow" was set but never used
21860 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
21861 # remark #869: parameter "tw" was never referenced
21862 # remark #981: operands are evaluated in unspecified order
21863 # warning #279: controlling expression is constant
21865 { echo "$as_me:21865: checking for $CC warning options..." >&5
21866 echo "$as_me: checking for $CC warning options..." >&6;}
21867 cf_save_CFLAGS="$CFLAGS"
21868 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
21880 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
21881 if { (eval echo "$as_me:21881: \"$ac_compile\"") >&5
21882 (eval $ac_compile) 2>&5
21884 echo "$as_me:21884: \$? = $ac_status" >&5
21885 (exit "$ac_status"); }; then
21886 test -n "$verbose" && echo "$as_me:21886: result: ... -$cf_opt" >&5
21887 echo "${ECHO_T}... -$cf_opt" >&6
21888 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
21891 CFLAGS="$cf_save_CFLAGS"
21892 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
21894 { echo "$as_me:21894: checking for $CC warning options..." >&5
21895 echo "$as_me: checking for $CC warning options..." >&6;}
21896 cf_save_CFLAGS="$CFLAGS"
21898 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
21899 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
21900 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
21901 for cf_opt in W Wall \
21902 Wbad-function-cast \
21905 Wdeclaration-after-statement \
21908 Wmissing-declarations \
21909 Wmissing-prototypes \
21913 Wstrict-prototypes \
21914 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
21916 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
21917 if { (eval echo "$as_me:21917: \"$ac_compile\"") >&5
21918 (eval $ac_compile) 2>&5
21920 echo "$as_me:21920: \$? = $ac_status" >&5
21921 (exit "$ac_status"); }; then
21922 test -n "$verbose" && echo "$as_me:21922: result: ... -$cf_opt" >&5
21923 echo "${ECHO_T}... -$cf_opt" >&6
21926 case "$GCC_VERSION" in
21928 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
21930 echo "${as_me:-configure}:21930: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
21936 case "$GCC_VERSION" in
21938 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
21940 echo "${as_me:-configure}:21940: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
21946 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
21949 CFLAGS="$cf_save_CFLAGS"
21957 echo "$as_me:21957: checking if you want to use dmalloc for testing" >&5
21958 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
21960 # Check whether --with-dmalloc or --without-dmalloc was given.
21961 if test "${with_dmalloc+set}" = set; then
21962 withval="$with_dmalloc"
21964 cat >>confdefs.h <<EOF
21965 #define USE_DMALLOC 1
21968 : "${with_cflags:=-g}"
21969 : "${enable_leaks:=no}"
21974 echo "$as_me:21974: result: ${with_dmalloc:-no}" >&5
21975 echo "${ECHO_T}${with_dmalloc:-no}" >&6
21977 case ".$with_cflags" in
21987 cf_new_extra_cppflags=
21989 for cf_add_cflags in -g
21991 case "$cf_fix_cppflags" in
21993 case "$cf_add_cflags" in
21994 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21995 case "$cf_add_cflags" in
21997 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21999 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22000 && test -z "${cf_tst_cflags}" \
22001 && cf_fix_cppflags=yes
22003 if test "$cf_fix_cppflags" = yes ; then
22005 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22006 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22009 elif test "${cf_tst_cflags}" = "\"'" ; then
22011 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22012 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22018 case "$CPPFLAGS" in
22022 case "$cf_add_cflags" in
22024 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22026 CPPFLAGS=`echo "$CPPFLAGS" | \
22027 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22028 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22033 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22034 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22041 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22042 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22049 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22050 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22052 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22054 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22055 && test -z "${cf_tst_cflags}" \
22056 && cf_fix_cppflags=no
22061 if test -n "$cf_new_cflags" ; then
22063 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22064 CFLAGS="${CFLAGS}$cf_new_cflags"
22068 if test -n "$cf_new_cppflags" ; then
22070 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22071 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22075 if test -n "$cf_new_extra_cppflags" ; then
22077 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22078 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22087 if test "$with_dmalloc" = yes ; then
22088 echo "$as_me:22088: checking for dmalloc.h" >&5
22089 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
22090 if test "${ac_cv_header_dmalloc_h+set}" = set; then
22091 echo $ECHO_N "(cached) $ECHO_C" >&6
22093 cat >"conftest.$ac_ext" <<_ACEOF
22094 #line 22094 "configure"
22095 #include "confdefs.h"
22096 #include <dmalloc.h>
22098 if { (eval echo "$as_me:22098: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22099 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22101 $EGREP -v '^ *\+' conftest.er1 >conftest.err
22103 cat conftest.err >&5
22104 echo "$as_me:22104: \$? = $ac_status" >&5
22105 (exit "$ac_status"); } >/dev/null; then
22106 if test -s conftest.err; then
22107 ac_cpp_err=$ac_c_preproc_warn_flag
22114 if test -z "$ac_cpp_err"; then
22115 ac_cv_header_dmalloc_h=yes
22117 echo "$as_me: failed program was:" >&5
22118 cat "conftest.$ac_ext" >&5
22119 ac_cv_header_dmalloc_h=no
22121 rm -f conftest.err "conftest.$ac_ext"
22123 echo "$as_me:22123: result: $ac_cv_header_dmalloc_h" >&5
22124 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
22125 if test "$ac_cv_header_dmalloc_h" = yes; then
22127 echo "$as_me:22127: checking for dmalloc_debug in -ldmalloc" >&5
22128 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
22129 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
22130 echo $ECHO_N "(cached) $ECHO_C" >&6
22132 ac_check_lib_save_LIBS=$LIBS
22133 LIBS="-ldmalloc $LIBS"
22134 cat >"conftest.$ac_ext" <<_ACEOF
22135 #line 22135 "configure"
22136 #include "confdefs.h"
22138 /* Override any gcc2 internal prototype to avoid an error. */
22142 /* We use char because int might match the return type of a gcc2
22143 builtin and then its argument prototype would still apply. */
22144 char dmalloc_debug ();
22153 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22154 if { (eval echo "$as_me:22154: \"$ac_link\"") >&5
22155 (eval $ac_link) 2>&5
22157 echo "$as_me:22157: \$? = $ac_status" >&5
22158 (exit "$ac_status"); } &&
22159 { ac_try='test -s "conftest$ac_exeext"'
22160 { (eval echo "$as_me:22160: \"$ac_try\"") >&5
22161 (eval $ac_try) 2>&5
22163 echo "$as_me:22163: \$? = $ac_status" >&5
22164 (exit "$ac_status"); }; }; then
22165 ac_cv_lib_dmalloc_dmalloc_debug=yes
22167 echo "$as_me: failed program was:" >&5
22168 cat "conftest.$ac_ext" >&5
22169 ac_cv_lib_dmalloc_dmalloc_debug=no
22171 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22172 LIBS=$ac_check_lib_save_LIBS
22174 echo "$as_me:22174: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
22175 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
22176 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
22177 cat >>confdefs.h <<EOF
22178 #define HAVE_LIBDMALLOC 1
22181 LIBS="-ldmalloc $LIBS"
22189 echo "$as_me:22189: checking if you want to use dbmalloc for testing" >&5
22190 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
22192 # Check whether --with-dbmalloc or --without-dbmalloc was given.
22193 if test "${with_dbmalloc+set}" = set; then
22194 withval="$with_dbmalloc"
22196 cat >>confdefs.h <<EOF
22197 #define USE_DBMALLOC 1
22200 : "${with_cflags:=-g}"
22201 : "${enable_leaks:=no}"
22206 echo "$as_me:22206: result: ${with_dbmalloc:-no}" >&5
22207 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
22209 case ".$with_cflags" in
22219 cf_new_extra_cppflags=
22221 for cf_add_cflags in -g
22223 case "$cf_fix_cppflags" in
22225 case "$cf_add_cflags" in
22226 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22227 case "$cf_add_cflags" in
22229 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22231 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22232 && test -z "${cf_tst_cflags}" \
22233 && cf_fix_cppflags=yes
22235 if test "$cf_fix_cppflags" = yes ; then
22237 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22238 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22241 elif test "${cf_tst_cflags}" = "\"'" ; then
22243 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22244 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22250 case "$CPPFLAGS" in
22254 case "$cf_add_cflags" in
22256 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22258 CPPFLAGS=`echo "$CPPFLAGS" | \
22259 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22260 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22265 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22266 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22273 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22274 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22281 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22282 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22284 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22286 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22287 && test -z "${cf_tst_cflags}" \
22288 && cf_fix_cppflags=no
22293 if test -n "$cf_new_cflags" ; then
22295 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22296 CFLAGS="${CFLAGS}$cf_new_cflags"
22300 if test -n "$cf_new_cppflags" ; then
22302 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22303 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22307 if test -n "$cf_new_extra_cppflags" ; then
22309 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22310 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22319 if test "$with_dbmalloc" = yes ; then
22320 echo "$as_me:22320: checking for dbmalloc.h" >&5
22321 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
22322 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
22323 echo $ECHO_N "(cached) $ECHO_C" >&6
22325 cat >"conftest.$ac_ext" <<_ACEOF
22326 #line 22326 "configure"
22327 #include "confdefs.h"
22328 #include <dbmalloc.h>
22330 if { (eval echo "$as_me:22330: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22331 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22333 $EGREP -v '^ *\+' conftest.er1 >conftest.err
22335 cat conftest.err >&5
22336 echo "$as_me:22336: \$? = $ac_status" >&5
22337 (exit "$ac_status"); } >/dev/null; then
22338 if test -s conftest.err; then
22339 ac_cpp_err=$ac_c_preproc_warn_flag
22346 if test -z "$ac_cpp_err"; then
22347 ac_cv_header_dbmalloc_h=yes
22349 echo "$as_me: failed program was:" >&5
22350 cat "conftest.$ac_ext" >&5
22351 ac_cv_header_dbmalloc_h=no
22353 rm -f conftest.err "conftest.$ac_ext"
22355 echo "$as_me:22355: result: $ac_cv_header_dbmalloc_h" >&5
22356 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
22357 if test "$ac_cv_header_dbmalloc_h" = yes; then
22359 echo "$as_me:22359: checking for debug_malloc in -ldbmalloc" >&5
22360 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
22361 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
22362 echo $ECHO_N "(cached) $ECHO_C" >&6
22364 ac_check_lib_save_LIBS=$LIBS
22365 LIBS="-ldbmalloc $LIBS"
22366 cat >"conftest.$ac_ext" <<_ACEOF
22367 #line 22367 "configure"
22368 #include "confdefs.h"
22370 /* Override any gcc2 internal prototype to avoid an error. */
22374 /* We use char because int might match the return type of a gcc2
22375 builtin and then its argument prototype would still apply. */
22376 char debug_malloc ();
22385 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22386 if { (eval echo "$as_me:22386: \"$ac_link\"") >&5
22387 (eval $ac_link) 2>&5
22389 echo "$as_me:22389: \$? = $ac_status" >&5
22390 (exit "$ac_status"); } &&
22391 { ac_try='test -s "conftest$ac_exeext"'
22392 { (eval echo "$as_me:22392: \"$ac_try\"") >&5
22393 (eval $ac_try) 2>&5
22395 echo "$as_me:22395: \$? = $ac_status" >&5
22396 (exit "$ac_status"); }; }; then
22397 ac_cv_lib_dbmalloc_debug_malloc=yes
22399 echo "$as_me: failed program was:" >&5
22400 cat "conftest.$ac_ext" >&5
22401 ac_cv_lib_dbmalloc_debug_malloc=no
22403 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22404 LIBS=$ac_check_lib_save_LIBS
22406 echo "$as_me:22406: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
22407 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
22408 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
22409 cat >>confdefs.h <<EOF
22410 #define HAVE_LIBDBMALLOC 1
22413 LIBS="-ldbmalloc $LIBS"
22421 echo "$as_me:22421: checking if you want to use valgrind for testing" >&5
22422 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
22424 # Check whether --with-valgrind or --without-valgrind was given.
22425 if test "${with_valgrind+set}" = set; then
22426 withval="$with_valgrind"
22428 cat >>confdefs.h <<EOF
22429 #define USE_VALGRIND 1
22432 : "${with_cflags:=-g}"
22433 : "${enable_leaks:=no}"
22438 echo "$as_me:22438: result: ${with_valgrind:-no}" >&5
22439 echo "${ECHO_T}${with_valgrind:-no}" >&6
22441 case ".$with_cflags" in
22451 cf_new_extra_cppflags=
22453 for cf_add_cflags in -g
22455 case "$cf_fix_cppflags" in
22457 case "$cf_add_cflags" in
22458 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22459 case "$cf_add_cflags" in
22461 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22463 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22464 && test -z "${cf_tst_cflags}" \
22465 && cf_fix_cppflags=yes
22467 if test "$cf_fix_cppflags" = yes ; then
22469 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22470 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22473 elif test "${cf_tst_cflags}" = "\"'" ; then
22475 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22476 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22482 case "$CPPFLAGS" in
22486 case "$cf_add_cflags" in
22488 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22490 CPPFLAGS=`echo "$CPPFLAGS" | \
22491 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22492 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22497 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22498 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22505 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22506 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22513 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22514 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22516 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22518 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22519 && test -z "${cf_tst_cflags}" \
22520 && cf_fix_cppflags=no
22525 if test -n "$cf_new_cflags" ; then
22527 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22528 CFLAGS="${CFLAGS}$cf_new_cflags"
22532 if test -n "$cf_new_cppflags" ; then
22534 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22535 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22539 if test -n "$cf_new_extra_cppflags" ; then
22541 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22542 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22551 echo "$as_me:22551: checking if you want to perform memory-leak testing" >&5
22552 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
22554 # Check whether --enable-leaks or --disable-leaks was given.
22555 if test "${enable_leaks+set}" = set; then
22556 enableval="$enable_leaks"
22557 enable_leaks=$enableval
22561 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
22562 echo "$as_me:22562: result: $with_no_leaks" >&5
22563 echo "${ECHO_T}$with_no_leaks" >&6
22565 if test "$enable_leaks" = no ; then
22567 cat >>confdefs.h <<\EOF
22571 cat >>confdefs.h <<\EOF
22572 #define YY_NO_LEAKS 1
22578 if test "x$cf_cv_enable_rpath" != xno
22580 echo "$as_me:22580: checking for an rpath option" >&5
22581 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
22582 case "$cf_cv_system_name" in
22584 if test "$GCC" = yes; then
22585 LD_RPATH_OPT="-Wl,-rpath,"
22587 LD_RPATH_OPT="-rpath "
22590 (linux*|gnu*|k*bsd*-gnu|freebsd*)
22591 LD_RPATH_OPT="-Wl,-rpath,"
22593 (openbsd[2-9].*|mirbsd*)
22594 LD_RPATH_OPT="-Wl,-rpath,"
22597 LD_RPATH_OPT="-rpath "
22600 LD_RPATH_OPT="-Wl,-rpath,"
22603 LD_RPATH_OPT="-rpath "
22611 echo "$as_me:22611: result: $LD_RPATH_OPT" >&5
22612 echo "${ECHO_T}$LD_RPATH_OPT" >&6
22614 case "x$LD_RPATH_OPT" in
22616 echo "$as_me:22616: checking if we need a space after rpath option" >&5
22617 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
22618 cf_save_LIBS="$LIBS"
22620 cf_add_libs="$LIBS"
22623 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22624 # filter duplicates
22625 for cf_add_1lib in $cf_add_0lib; do
22626 for cf_add_2lib in $cf_add_libs; do
22627 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22632 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22634 LIBS="$cf_add_libs"
22636 cat >"conftest.$ac_ext" <<_ACEOF
22637 #line 22637 "configure"
22638 #include "confdefs.h"
22648 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22649 if { (eval echo "$as_me:22649: \"$ac_link\"") >&5
22650 (eval $ac_link) 2>&5
22652 echo "$as_me:22652: \$? = $ac_status" >&5
22653 (exit "$ac_status"); } &&
22654 { ac_try='test -s "conftest$ac_exeext"'
22655 { (eval echo "$as_me:22655: \"$ac_try\"") >&5
22656 (eval $ac_try) 2>&5
22658 echo "$as_me:22658: \$? = $ac_status" >&5
22659 (exit "$ac_status"); }; }; then
22662 echo "$as_me: failed program was:" >&5
22663 cat "conftest.$ac_ext" >&5
22666 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22667 LIBS="$cf_save_LIBS"
22668 echo "$as_me:22668: result: $cf_rpath_space" >&5
22669 echo "${ECHO_T}$cf_rpath_space" >&6
22670 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
22675 echo "$as_me:22675: checking if rpath-hack should be disabled" >&5
22676 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
22678 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
22679 if test "${enable_rpath_hack+set}" = set; then
22680 enableval="$enable_rpath_hack"
22681 test "$enableval" != no && enableval=yes
22682 if test "$enableval" != "yes" ; then
22683 enable_rpath_hack=no
22685 enable_rpath_hack=yes
22689 enable_rpath_hack=yes
22692 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
22693 echo "$as_me:22693: result: $cf_disable_rpath_hack" >&5
22694 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
22696 if test "$enable_rpath_hack" = yes ; then
22698 echo "$as_me:22698: checking for updated LDFLAGS" >&5
22699 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
22700 if test -n "$LD_RPATH_OPT" ; then
22701 echo "$as_me:22701: result: maybe" >&5
22702 echo "${ECHO_T}maybe" >&6
22706 # Extract the first word of "$ac_prog", so it can be a program name with args.
22707 set dummy $ac_prog; ac_word=$2
22708 echo "$as_me:22708: checking for $ac_word" >&5
22709 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22710 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
22711 echo $ECHO_N "(cached) $ECHO_C" >&6
22713 if test -n "$cf_ldd_prog"; then
22714 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
22716 ac_save_IFS=$IFS; IFS=$ac_path_separator
22718 for ac_dir in $ac_dummy; do
22720 test -z "$ac_dir" && ac_dir=.
22721 $as_executable_p "$ac_dir/$ac_word" || continue
22722 ac_cv_prog_cf_ldd_prog="$ac_prog"
22723 echo "$as_me:22723: found $ac_dir/$ac_word" >&5
22729 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
22730 if test -n "$cf_ldd_prog"; then
22731 echo "$as_me:22731: result: $cf_ldd_prog" >&5
22732 echo "${ECHO_T}$cf_ldd_prog" >&6
22734 echo "$as_me:22734: result: no" >&5
22735 echo "${ECHO_T}no" >&6
22738 test -n "$cf_ldd_prog" && break
22740 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
22742 cf_rpath_list="/usr/lib /lib"
22743 if test "$cf_ldd_prog" != no
22747 cat >"conftest.$ac_ext" <<_ACEOF
22748 #line 22748 "configure"
22749 #include "confdefs.h"
22759 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22760 if { (eval echo "$as_me:22760: \"$ac_link\"") >&5
22761 (eval $ac_link) 2>&5
22763 echo "$as_me:22763: \$? = $ac_status" >&5
22764 (exit "$ac_status"); } &&
22765 { ac_try='test -s "conftest$ac_exeext"'
22766 { (eval echo "$as_me:22766: \"$ac_try\"") >&5
22767 (eval $ac_try) 2>&5
22769 echo "$as_me:22769: \$? = $ac_status" >&5
22770 (exit "$ac_status"); }; }; then
22771 cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
22772 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
22774 echo "$as_me: failed program was:" >&5
22775 cat "conftest.$ac_ext" >&5
22777 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22779 # If we passed the link-test, but get a "not found" on a given library,
22780 # this could be due to inept reconfiguration of gcc to make it only
22781 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
22782 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
22783 # /usr/local libraries.
22784 if test -n "$cf_rpath_oops"
22786 for cf_rpath_src in $cf_rpath_oops
22788 for cf_rpath_dir in \
22793 if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
22795 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
22797 echo "${as_me:-configure}:22797: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
22799 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
22807 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
22809 echo "${as_me:-configure}:22809: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
22811 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
22813 echo "${as_me:-configure}:22813: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
22816 for cf_rpath_src in $LDFLAGS
22818 case "$cf_rpath_src" in
22821 # check if this refers to a directory which we will ignore
22823 if test -n "$cf_rpath_list"
22825 for cf_rpath_item in $cf_rpath_list
22827 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
22835 if test "$cf_rpath_skip" = no
22837 # transform the option
22838 if test "$LD_RPATH_OPT" = "-R " ; then
22839 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
22841 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
22844 # if we have not already added this, add it now
22845 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
22846 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
22848 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
22850 echo "${as_me:-configure}:22850: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
22852 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
22857 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
22859 LDFLAGS=$cf_rpath_dst
22861 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
22863 echo "${as_me:-configure}:22863: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
22865 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
22867 echo "${as_me:-configure}:22867: testing ...checking LIBS $LIBS ..." 1>&5
22870 for cf_rpath_src in $LIBS
22872 case "$cf_rpath_src" in
22875 # check if this refers to a directory which we will ignore
22877 if test -n "$cf_rpath_list"
22879 for cf_rpath_item in $cf_rpath_list
22881 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
22889 if test "$cf_rpath_skip" = no
22891 # transform the option
22892 if test "$LD_RPATH_OPT" = "-R " ; then
22893 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
22895 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
22898 # if we have not already added this, add it now
22899 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
22900 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
22902 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
22904 echo "${as_me:-configure}:22904: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
22906 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
22911 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
22915 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
22917 echo "${as_me:-configure}:22917: testing ...checked LIBS $LIBS ..." 1>&5
22919 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
22921 echo "${as_me:-configure}:22921: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
22924 echo "$as_me:22924: result: no" >&5
22925 echo "${ECHO_T}no" >&6
22933 ac_config_files="$ac_config_files Makefile"
22934 ac_config_commands="$ac_config_commands default"
22935 cat >confcache <<\_ACEOF
22936 # This file is a shell script that caches the results of configure
22937 # tests run on this system so they can be shared between configure
22938 # scripts and configure runs, see configure's option --config-cache.
22939 # It is not useful on other systems. If it contains results you don't
22940 # want to keep, you may remove or edit it.
22942 # config.status only pays attention to the cache file if you give it
22943 # the --recheck option to rerun configure.
22945 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22946 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22947 # following values.
22951 # The following way of writing the cache mishandles newlines in values,
22952 # but we know of no workaround that is simple, portable, and efficient.
22953 # So, don't put newlines in cache variables' values.
22954 # Ultrix sh set writes to stderr and can't be redirected directly,
22955 # and sets the high bit in the cache file unless we assign to the vars.
22958 case `(ac_space=' '; set | grep ac_space) 2>&1` in
22960 # `set' does not quote correctly, so add quotes (double-quote
22961 # substitution turns \\\\ into \\, and sed turns \\ into \).
22964 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22967 # `set' quotes correctly as required by POSIX, so do not add quotes.
22969 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22976 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22978 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22980 if cmp -s $cache_file confcache; then :; else
22981 if test -w $cache_file; then
22982 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22983 cat confcache >$cache_file
22985 echo "not updating unwritable cache $cache_file"
22990 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22991 # Let make expand exec_prefix.
22992 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22994 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22995 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22996 # trailing colons and then remove the whole line if VPATH becomes empty
22997 # (actually we leave an empty line to preserve line numbers).
22998 if test "x$srcdir" = x.; then
22999 ac_vpsub='/^[ ]*VPATH[ ]*=/{
23000 s/:*\$(srcdir):*/:/;
23001 s/:*\${srcdir}:*/:/;
23003 s/^\([^=]*=[ ]*\):*/\1/;
23009 DEFS=-DHAVE_CONFIG_H
23011 : "${CONFIG_STATUS=./config.status}"
23012 ac_clean_files_save=$ac_clean_files
23013 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23014 { echo "$as_me:23014: creating $CONFIG_STATUS" >&5
23015 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23016 cat >"$CONFIG_STATUS" <<_ACEOF
23018 # Generated automatically by configure.
23019 # Run this file to recreate the current configuration.
23020 # Compiler output produced by configure, useful for debugging
23021 # configure, is in config.log if it exists.
23024 SHELL=\${CONFIG_SHELL-$SHELL}
23025 ac_cs_invocation="\$0 \$@"
23027 CLICOLOR_FORCE= GREP_OPTIONS=
23028 unset CLICOLOR_FORCE GREP_OPTIONS
23031 cat >>"$CONFIG_STATUS" <<\_ACEOF
23032 # Be Bourne compatible
23033 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23036 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23040 # Name of the executable.
23041 as_me=`echo "$0" |sed 's,.*[\\/],,'`
23043 if expr a : '\(a\)' >/dev/null 2>&1; then
23049 rm -f conf$$ conf$$.exe conf$$.file
23051 if ln -s conf$$.file conf$$ 2>/dev/null; then
23052 # We could just check for DJGPP; but this test a) works b) is more generic
23053 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23054 if test -f conf$$.exe; then
23055 # Don't use ln at all; we don't have any links
23060 elif ln conf$$.file conf$$ 2>/dev/null; then
23065 rm -f conf$$ conf$$.exe conf$$.file
23067 as_executable_p="test -f"
23069 # Support unset when possible.
23070 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
23077 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
23078 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
23079 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
23080 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
23081 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
23082 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
23083 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
23084 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
23087 # We need space, tab and new line, in precisely that order.
23093 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
23099 # Files that config.status was made for.
23100 if test -n "$ac_config_files"; then
23101 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
23104 if test -n "$ac_config_headers"; then
23105 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
23108 if test -n "$ac_config_links"; then
23109 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
23112 if test -n "$ac_config_commands"; then
23113 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
23116 cat >>"$CONFIG_STATUS" <<\EOF
23119 \`$as_me' instantiates files from templates according to the
23120 current configuration.
23122 Usage: $0 [OPTIONS] [FILE]...
23124 -h, --help print this help, then exit
23125 -V, --version print version number, then exit
23126 -d, --debug don't remove temporary files
23127 --recheck update $as_me by reconfiguring in the same conditions
23128 --file=FILE[:TEMPLATE]
23129 instantiate the configuration file FILE
23130 --header=FILE[:TEMPLATE]
23131 instantiate the configuration header FILE
23133 Configuration files:
23136 Configuration headers:
23139 Configuration commands:
23142 Report bugs to <dickey@invisible-island.net>."
23145 cat >>"$CONFIG_STATUS" <<EOF
23148 configured by $0, generated by GNU Autoconf 2.52.20210105,
23149 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23151 Copyright 2003-2020,2021 Thomas E. Dickey
23152 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
23153 Free Software Foundation, Inc.
23154 This config.status script is free software; the Free Software Foundation
23155 gives unlimited permission to copy, distribute and modify it."
23160 cat >>"$CONFIG_STATUS" <<\EOF
23161 # If no file are specified by the user, then we need to provide default
23162 # value. By we need to know if files were specified by the user.
23168 ac_option=`expr "x$1" : 'x\([^=]*\)='`
23169 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23171 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
23175 *) # This is not an option, so the user has probably given explicit
23177 ac_need_defaults=false;;
23181 # Handling of the options.
23183 cat >>"$CONFIG_STATUS" <<EOF
23184 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23185 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
23186 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
23188 cat >>"$CONFIG_STATUS" <<\EOF
23189 --version | --vers* | -V )
23190 echo "$ac_cs_version"; exit 0 ;;
23192 # Conflict between --help and --header
23193 { { echo "$as_me:23193: error: ambiguous option: $1
23194 Try \`$0 --help' for more information." >&5
23195 echo "$as_me: error: ambiguous option: $1
23196 Try \`$0 --help' for more information." >&2;}
23197 { (exit 1); exit 1; }; };;
23198 --help | --hel | -h )
23199 echo "$ac_cs_usage"; exit 0 ;;
23200 --debug | --d* | -d )
23202 --file | --fil | --fi | --f )
23204 CONFIG_FILES="$CONFIG_FILES $1"
23205 ac_need_defaults=false;;
23206 --header | --heade | --head | --hea )
23208 CONFIG_HEADERS="$CONFIG_HEADERS $1"
23209 ac_need_defaults=false;;
23211 # This is an error.
23212 -*) { { echo "$as_me:23212: error: unrecognized option: $1
23213 Try \`$0 --help' for more information." >&5
23214 echo "$as_me: error: unrecognized option: $1
23215 Try \`$0 --help' for more information." >&2;}
23216 { (exit 1); exit 1; }; } ;;
23218 *) ac_config_targets="$ac_config_targets $1" ;;
23227 ## ----------------------- ##
23228 ## Running config.status. ##
23229 ## ----------------------- ##
23231 This file was extended by $as_me 2.52.20210105, executed with
23232 CONFIG_FILES = $CONFIG_FILES
23233 CONFIG_HEADERS = $CONFIG_HEADERS
23234 CONFIG_LINKS = $CONFIG_LINKS
23235 CONFIG_COMMANDS = $CONFIG_COMMANDS
23236 > "$ac_cs_invocation"
23237 on `(hostname || uname -n) 2>/dev/null | sed 1q`
23242 cat >>"$CONFIG_STATUS" <<EOF
23244 # INIT-COMMANDS section.
23254 cat >>"$CONFIG_STATUS" <<\EOF
23255 for ac_config_target in $ac_config_targets
23257 case "$ac_config_target" in
23258 # Handling of arguments.
23259 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23260 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23261 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
23262 *) { { echo "$as_me:23262: error: invalid argument: $ac_config_target" >&5
23263 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23264 { (exit 1); exit 1; }; };;
23268 # If the user did not use the arguments to specify the items to instantiate,
23269 # then the envvar interface is used. Set only those that are not.
23270 # We use the long form for the default assignment because of an extremely
23271 # bizarre bug on SunOS 4.1.3.
23272 if "$ac_need_defaults"; then
23273 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23274 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23275 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23278 # Create a temporary directory, and hook for its removal unless debugging.
23281 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23282 trap '{ (exit 1); exit 1; }' 1 2 13 15
23285 # Create a (secure) tmp directory for tmp files.
23288 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
23289 test -n "$tmp" && test -d "$tmp"
23292 tmp=$TMPDIR/cs$$-$RANDOM
23293 (umask 077 && mkdir $tmp)
23296 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
23297 { (exit 1); exit 1; }
23302 cat >>"$CONFIG_STATUS" <<EOF
23305 # CONFIG_FILES section.
23308 # No need to generate the scripts if there are no CONFIG_FILES.
23309 # This happens for instance when ./config.status config.h
23310 if test -n "\$CONFIG_FILES"; then
23311 # Protect against being on the right side of a sed subst in config.status.
23312 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23313 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23314 s,@SHELL@,$SHELL,;t t
23315 s,@exec_prefix@,$exec_prefix,;t t
23316 s,@prefix@,$prefix,;t t
23317 s,@program_transform_name@,$program_transform_name,;t t
23318 s,@bindir@,$bindir,;t t
23319 s,@sbindir@,$sbindir,;t t
23320 s,@libexecdir@,$libexecdir,;t t
23321 s,@datarootdir@,$datarootdir,;t t
23322 s,@datadir@,$datadir,;t t
23323 s,@sysconfdir@,$sysconfdir,;t t
23324 s,@sharedstatedir@,$sharedstatedir,;t t
23325 s,@localstatedir@,$localstatedir,;t t
23326 s,@runstatedir@,$runstatedir,;t t
23327 s,@libdir@,$libdir,;t t
23328 s,@includedir@,$includedir,;t t
23329 s,@oldincludedir@,$oldincludedir,;t t
23330 s,@infodir@,$infodir,;t t
23331 s,@mandir@,$mandir,;t t
23332 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23333 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23334 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23335 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23336 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23337 s,@build_alias@,$build_alias,;t t
23338 s,@host_alias@,$host_alias,;t t
23339 s,@target_alias@,$target_alias,;t t
23340 s,@ECHO_C@,$ECHO_C,;t t
23341 s,@ECHO_N@,$ECHO_N,;t t
23342 s,@ECHO_T@,$ECHO_T,;t t
23343 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23344 s,@DEFS@,$DEFS,;t t
23345 s,@LIBS@,$LIBS,;t t
23346 s,@build@,$build,;t t
23347 s,@build_cpu@,$build_cpu,;t t
23348 s,@build_vendor@,$build_vendor,;t t
23349 s,@build_os@,$build_os,;t t
23350 s,@host@,$host,;t t
23351 s,@host_cpu@,$host_cpu,;t t
23352 s,@host_vendor@,$host_vendor,;t t
23353 s,@host_os@,$host_os,;t t
23354 s,@SET_MAKE@,$SET_MAKE,;t t
23356 s,@CFLAGS@,$CFLAGS,;t t
23357 s,@LDFLAGS@,$LDFLAGS,;t t
23358 s,@CPPFLAGS@,$CPPFLAGS,;t t
23359 s,@ac_ct_CC@,$ac_ct_CC,;t t
23360 s,@EXEEXT@,$EXEEXT,;t t
23361 s,@OBJEXT@,$OBJEXT,;t t
23362 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
23364 s,@GREP@,$GREP,;t t
23365 s,@EGREP@,$EGREP,;t t
23367 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23368 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23369 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
23370 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
23371 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
23372 s,@LINT@,$LINT,;t t
23373 s,@LINT_OPTS@,$LINT_OPTS,;t t
23374 s,@CTAGS@,$CTAGS,;t t
23375 s,@ETAGS@,$ETAGS,;t t
23376 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
23377 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
23378 s,@MATH_LIB@,$MATH_LIB,;t t
23379 s,@top_builddir@,$top_builddir,;t t
23380 s,@CC_G_OPT@,$CC_G_OPT,;t t
23381 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
23382 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
23383 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
23384 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
23386 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23387 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23388 s,@LD_MODEL@,$LD_MODEL,;t t
23389 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
23390 s,@LIBTOOL@,$LIBTOOL,;t t
23391 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
23392 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
23393 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
23394 s,@LIB_LINK@,$LIB_LINK,;t t
23395 s,@LINK_TESTS@,$LINK_TESTS,;t t
23396 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
23397 s,@PACKAGE@,$PACKAGE,;t t
23398 s,@PTHREAD@,$PTHREAD,;t t
23399 s,@TEST_ARGS@,$TEST_ARGS,;t t
23400 s,@TEST_DEPS@,$TEST_DEPS,;t t
23401 s,@TEST_LIBS@,$TEST_LIBS,;t t
23402 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23403 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23404 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
23405 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
23406 s,@includesubdir@,$includesubdir,;t t
23407 s,@FGREP@,$FGREP,;t t
23408 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
23409 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
23410 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
23411 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
23412 s,@ECHO_LT@,$ECHO_LT,;t t
23413 s,@ECHO_LD@,$ECHO_LD,;t t
23414 s,@RULE_CC@,$RULE_CC,;t t
23415 s,@SHOW_CC@,$SHOW_CC,;t t
23416 s,@ECHO_CC@,$ECHO_CC,;t t
23417 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
23418 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
23419 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
23420 s,@X_CFLAGS@,$X_CFLAGS,;t t
23421 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
23422 s,@X_LIBS@,$X_LIBS,;t t
23423 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
23424 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
23425 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
23426 s,@RGB_PATH@,$RGB_PATH,;t t
23427 s,@no_x11_rgb@,$no_x11_rgb,;t t
23428 s,@FORM_NAME@,$FORM_NAME,;t t
23429 s,@MENU_NAME@,$MENU_NAME,;t t
23430 s,@PANEL_NAME@,$PANEL_NAME,;t t
23431 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
23432 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
23433 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
23438 cat >>"$CONFIG_STATUS" <<\EOF
23439 # Split the substitutions into bite-sized pieces for seds with
23440 # small command number limits, like on Digital OSF/1 and HP-UX.
23441 ac_max_sed_lines=48
23442 ac_sed_frag=1 # Number of current file.
23443 ac_beg=1 # First line for current file.
23444 ac_end=$ac_max_sed_lines # Line after last line for current file.
23447 while "$ac_more_lines"; do
23448 if test "$ac_beg" -gt 1; then
23449 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23451 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23453 if test ! -s $tmp/subs.frag; then
23454 ac_more_lines=false
23456 # The purpose of the label and of the branching condition is to
23457 # speed up the sed processing (if there are no `@' at all, there
23458 # is no need to browse any of the substitutions).
23459 # These are the two extra sed commands mentioned above.
23461 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23462 # It is possible to make a multiline substitution using escaped newlines.
23463 # Ensure that we do not split the substitution between script fragments.
23465 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
23466 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
23467 if test -s $tmp/subs.next; then
23468 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
23469 if test ! -s $tmp/subs.edit; then
23470 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
23471 if test ! -s $tmp/subs.edit; then
23472 if test "$ac_beg" -gt 1; then
23473 ac_end=`expr "$ac_end" - 1`
23480 if test -z "$ac_sed_cmds"; then
23481 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23483 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23485 ac_sed_frag=`expr "$ac_sed_frag" + 1`
23487 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
23490 if test -z "$ac_sed_cmds"; then
23493 fi # test -n "$CONFIG_FILES"
23496 cat >>"$CONFIG_STATUS" <<\EOF
23497 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23498 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23500 - | *:- | *:-:* ) # input from stdin
23502 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23503 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23504 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23505 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23506 * ) ac_file_in=$ac_file.in ;;
23509 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23510 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23511 X"$ac_file" : 'X\(//\)[^/]' \| \
23512 X"$ac_file" : 'X\(//\)$' \| \
23513 X"$ac_file" : 'X\(/\)' \| \
23514 . : '\(.\)' 2>/dev/null ||
23516 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23517 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23518 /^X\(\/\/\)$/{ s//\1/; q; }
23519 /^X\(\/\).*/{ s//\1/; q; }
23521 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23522 { case "$ac_dir" in
23523 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23527 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23528 case $as_mkdir_dir in
23529 # Skip DOS drivespec
23530 ?:) as_incr_dir=$as_mkdir_dir ;;
23532 as_incr_dir=$as_incr_dir/$as_mkdir_dir
23533 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23538 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23539 # A "../" for each directory in $ac_dir_suffix.
23540 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23542 ac_dir_suffix= ac_dots=
23547 if test -z "$ac_dots"; then
23550 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
23552 [\\/]* | ?:[\\/]* )
23553 ac_srcdir="$srcdir$ac_dir_suffix";
23554 ac_top_srcdir="$srcdir" ;;
23555 *) # Relative path.
23556 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
23557 ac_top_srcdir="$ac_dots$srcdir" ;;
23561 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23562 *) ac_INSTALL=$ac_dots$INSTALL ;;
23565 if test x"$ac_file" != x-; then
23566 { echo "$as_me:23566: creating $ac_file" >&5
23567 echo "$as_me: creating $ac_file" >&6;}
23570 # Let's still pretend it is `configure' which instantiates (i.e., don't
23571 # use $as_me), people would be surprised to read:
23572 # /* config.h. Generated automatically by config.status. */
23573 configure_input="Generated automatically from `echo $ac_file_in |
23574 sed 's,.*/,,'` by configure."
23576 # First look for the input files in the build tree, otherwise in the
23578 ac_file_inputs=`IFS=:
23579 for f in $ac_file_in; do
23581 -) echo $tmp/stdin ;;
23583 # Absolute (can't be DOS-style, as IFS=:)
23584 test -f "$f" || { { echo "$as_me:23584: error: cannot find input file: $f" >&5
23585 echo "$as_me: error: cannot find input file: $f" >&2;}
23586 { (exit 1); exit 1; }; }
23589 if test -f "$f"; then
23592 elif test -f "$srcdir/$f"; then
23597 { { echo "$as_me:23597: error: cannot find input file: $f" >&5
23598 echo "$as_me: error: cannot find input file: $f" >&2;}
23599 { (exit 1); exit 1; }; }
23602 done` || { (exit 1); exit 1; }
23604 cat >>"$CONFIG_STATUS" <<\EOF
23605 ac_warn_datarootdir=no
23606 if test x"$ac_file" != x-; then
23607 for ac_item in $ac_file_inputs
23609 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
23610 if test -n "$ac_seen"; then
23611 ac_used=`grep '@datarootdir@' "$ac_item"`
23612 if test -z "$ac_used"; then
23613 { echo "$as_me:23613: WARNING: datarootdir was used implicitly but not set:
23615 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23617 ac_warn_datarootdir=yes
23620 ac_seen=`grep '${datarootdir}' "$ac_item"`
23621 if test -n "$ac_seen"; then
23622 { echo "$as_me:23622: WARNING: datarootdir was used explicitly but not set:
23624 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23626 ac_warn_datarootdir=yes
23631 if test "x$ac_warn_datarootdir" = xyes; then
23632 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23636 cat >>"$CONFIG_STATUS" <<EOF
23640 cat >>"$CONFIG_STATUS" <<\EOF
23642 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23643 s,@configure_input@,$configure_input,;t t
23644 s,@srcdir@,$ac_srcdir,;t t
23645 s,@top_srcdir@,$ac_top_srcdir,;t t
23646 s,@INSTALL@,$ac_INSTALL,;t t
23647 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23649 if test x"$ac_file" != x-; then
23650 cp "$tmp/out" "$ac_file"
23652 for ac_name in prefix exec_prefix datarootdir
23654 ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
23655 if test -n "$ac_seen"; then
23656 ac_init=`${EGREP-egrep} '[ ]*'$ac_name'[ ]*=' "$ac_file"`
23657 if test -z "$ac_init"; then
23658 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23659 { echo "$as_me:23659: WARNING: Variable $ac_name is used but was not set:
23661 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23666 ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
23667 ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
23668 if test -s $tmp/out; then
23669 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23670 { echo "$as_me:23670: WARNING: Some variables may not be substituted:
23672 echo "$as_me: WARNING: Some variables may not be substituted:
23682 cat >>"$CONFIG_STATUS" <<\EOF
23685 # CONFIG_HEADER section.
23688 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23689 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23691 # ac_d sets the value in "#define NAME VALUE" lines.
23692 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
23693 ac_dB='[ ].*$,\1#\2'
23696 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23697 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
23698 ac_iB='\([ ]\),\1#\2define\3'
23701 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23702 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
23703 ac_uB='$,\1#\2define\3'
23707 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23708 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23710 - | *:- | *:-:* ) # input from stdin
23712 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23713 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23714 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23715 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23716 * ) ac_file_in=$ac_file.in ;;
23719 test x"$ac_file" != x- && { echo "$as_me:23719: creating $ac_file" >&5
23720 echo "$as_me: creating $ac_file" >&6;}
23722 # First look for the input files in the build tree, otherwise in the
23724 ac_file_inputs=`IFS=:
23725 for f in $ac_file_in; do
23727 -) echo $tmp/stdin ;;
23729 # Absolute (can't be DOS-style, as IFS=:)
23730 test -f "$f" || { { echo "$as_me:23730: error: cannot find input file: $f" >&5
23731 echo "$as_me: error: cannot find input file: $f" >&2;}
23732 { (exit 1); exit 1; }; }
23735 if test -f "$f"; then
23738 elif test -f "$srcdir/$f"; then
23743 { { echo "$as_me:23743: error: cannot find input file: $f" >&5
23744 echo "$as_me: error: cannot find input file: $f" >&2;}
23745 { (exit 1); exit 1; }; }
23748 done` || { (exit 1); exit 1; }
23749 # Remove the trailing spaces.
23750 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
23754 # Transform confdefs.h into a list of #define's. We won't use it as a sed
23755 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
23756 # be either 'cat' or 'sort'.
23757 cat confdefs.h | uniq >conftest.vals
23759 # Break up conftest.vals because some shells have a limit on
23760 # the size of here documents, and old seds have small limits too.
23762 rm -f conftest.tail
23763 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
23764 while grep . conftest.vals >/dev/null
23766 # Write chunks of a limited-size here document to conftest.frag.
23767 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
23768 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
23769 echo 'CEOF' >> "$CONFIG_STATUS"
23770 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
23771 rm -f conftest.vals
23772 mv conftest.tail conftest.vals
23774 rm -f conftest.vals
23776 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23778 echo ' cat >> conftest.edit <<CEOF
23779 /@DEFS@/r conftest.frag
23782 sed -f conftest.edit $tmp/in > $tmp/out
23784 mv $tmp/out $tmp/in
23785 rm -f conftest.edit conftest.frag
23786 ' >> "$CONFIG_STATUS"
23788 cat >>"$CONFIG_STATUS" <<\EOF
23789 # Let's still pretend it is `configure' which instantiates (i.e., don't
23790 # use $as_me), people would be surprised to read:
23791 # /* config.h. Generated automatically by config.status. */
23792 if test x"$ac_file" = x-; then
23793 echo "/* Generated automatically by configure. */" >$tmp/config.h
23795 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
23797 cat $tmp/in >>$tmp/config.h
23799 if test x"$ac_file" != x-; then
23800 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
23801 { echo "$as_me:23801: $ac_file is unchanged" >&5
23802 echo "$as_me: $ac_file is unchanged" >&6;}
23804 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23805 X"$ac_file" : 'X\(//\)[^/]' \| \
23806 X"$ac_file" : 'X\(//\)$' \| \
23807 X"$ac_file" : 'X\(/\)' \| \
23808 . : '\(.\)' 2>/dev/null ||
23810 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23811 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23812 /^X\(\/\/\)$/{ s//\1/; q; }
23813 /^X\(\/\).*/{ s//\1/; q; }
23815 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23816 { case "$ac_dir" in
23817 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23821 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23822 case $as_mkdir_dir in
23823 # Skip DOS drivespec
23824 ?:) as_incr_dir=$as_mkdir_dir ;;
23826 as_incr_dir=$as_incr_dir/$as_mkdir_dir
23827 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23834 mv "$tmp/config.h" "$ac_file"
23838 rm -f $tmp/config.h
23842 cat >>"$CONFIG_STATUS" <<\EOF
23844 # CONFIG_COMMANDS section.
23846 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23847 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23848 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23855 if test ! -d "$srcdir/$cf_dir" ; then
23857 elif test -f "$srcdir/$cf_dir/programs" ; then
23858 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
23862 cat >>Makefile <<TEST_EOF
23864 # These rules are generated so we do not rely on suffix rules, which do not
23865 # work consistently for different make-programs (the '\$(MODEL)/' confuses
23866 # some, and the '\$x' confuses others).
23869 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
23872 cat >>Makefile <<TEST_EOF
23874 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
23875 \$(srcdir)/test.priv.h \\
23878 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) -DMODULE_NAME="$N" \$(srcdir)/$N.c
23882 if test -f ../config.guess && test -f ../config.sub
23884 cat >>Makefile <<TEST_EOF
23886 # if we used CF_INHERIT for getting these files, we can remove them
23888 rm -f config.guess config.sub
23896 cat >>"$CONFIG_STATUS" <<\EOF
23898 { (exit 0); exit 0; }
23900 chmod +x "$CONFIG_STATUS"
23901 ac_clean_files=$ac_clean_files_save
23903 # configure is writing to config.log, and then calls config.status.
23904 # config.status does its own redirection, appending to config.log.
23905 # Unfortunately, on DOS this fails, as config.log is still kept open
23906 # by configure, so config.status won't be able to write to it; its
23907 # output is simply discarded. So we exec the FD to /dev/null,
23908 # effectively closing config.log, so it can be properly (re)opened and
23909 # appended to by config.status. When coming back to configure, we
23910 # need to make the FD available again.
23911 if test "$no_create" != yes; then
23914 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
23916 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23917 # would make configure fail if this is the last instruction.
23918 "$ac_cs_success" || { (exit 1); exit 1; }