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 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
3405 cat >>confdefs.h <<\EOF
3406 #define HAVE_STDNORETURN_H 1
3409 cat >>confdefs.h <<EOF
3410 #define STDC_NORETURN _Noreturn
3413 HAVE_STDNORETURN_H=1
3415 HAVE_STDNORETURN_H=0
3418 if test "$GCC" = yes || test "$GXX" = yes
3420 cat > conftest.i <<EOF
3422 #define GCC_PRINTF 0
3427 #ifndef GCC_NORETURN
3428 #define GCC_NORETURN /* nothing */
3431 #define GCC_UNUSED /* nothing */
3434 if test "$GCC" = yes
3436 { echo "$as_me:3436: checking for $CC __attribute__ directives..." >&5
3437 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
3438 cat > "conftest.$ac_ext" <<EOF
3439 #line 3439 "${as_me:-configure}"
3440 #include "confdefs.h"
3441 #include "conftest.h"
3442 #include "conftest.i"
3444 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3446 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
3449 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
3451 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
3453 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
3454 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
3455 extern GCC_NORETURN void foo(void);
3456 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
3458 cf_printf_attribute=no
3459 cf_scanf_attribute=no
3460 for cf_attribute in scanf printf unused noreturn
3463 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3465 cf_directive="__attribute__(($cf_attribute))"
3466 echo "checking for $CC $cf_directive" 1>&5
3468 case "$cf_attribute" in
3470 cf_printf_attribute=yes
3471 cat >conftest.h <<EOF
3472 #define GCC_$cf_ATTRIBUTE 1
3476 cf_scanf_attribute=yes
3477 cat >conftest.h <<EOF
3478 #define GCC_$cf_ATTRIBUTE 1
3482 cat >conftest.h <<EOF
3483 #define GCC_$cf_ATTRIBUTE $cf_directive
3488 if { (eval echo "$as_me:3488: \"$ac_compile\"") >&5
3489 (eval $ac_compile) 2>&5
3491 echo "$as_me:3491: \$? = $ac_status" >&5
3492 (exit "$ac_status"); }; then
3493 test -n "$verbose" && echo "$as_me:3493: result: ... $cf_attribute" >&5
3494 echo "${ECHO_T}... $cf_attribute" >&6
3495 cat conftest.h >>confdefs.h
3496 case "$cf_attribute" in
3499 cat >>confdefs.h <<EOF
3500 #define GCC_NORETURN $cf_directive
3505 cf_value='/* nothing */'
3506 if test "$cf_printf_attribute" != no ; then
3507 cf_value='__attribute__((format(printf,fmt,var)))'
3509 cat >>confdefs.h <<\EOF
3510 #define GCC_PRINTF 1
3515 cat >>confdefs.h <<EOF
3516 #define GCC_PRINTFLIKE(fmt,var) $cf_value
3521 cf_value='/* nothing */'
3522 if test "$cf_scanf_attribute" != no ; then
3523 cf_value='__attribute__((format(scanf,fmt,var)))'
3525 cat >>confdefs.h <<\EOF
3531 cat >>confdefs.h <<EOF
3532 #define GCC_SCANFLIKE(fmt,var) $cf_value
3538 cat >>confdefs.h <<EOF
3539 #define GCC_UNUSED $cf_directive
3547 ${FGREP-fgrep} define conftest.i >>confdefs.h
3552 echo "$as_me:3552: checking if you want to work around bogus compiler/loader warnings" >&5
3553 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
3555 # Check whether --enable-string-hacks or --disable-string-hacks was given.
3556 if test "${enable_string_hacks+set}" = set; then
3557 enableval="$enable_string_hacks"
3558 enable_string_hacks=$enableval
3560 enable_string_hacks=no
3562 echo "$as_me:3562: result: $enable_string_hacks" >&5
3563 echo "${ECHO_T}$enable_string_hacks" >&6
3565 if test "x$enable_string_hacks" = "xyes"; then
3567 cat >>confdefs.h <<\EOF
3568 #define USE_STRING_HACKS 1
3571 { echo "$as_me:3571: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
3572 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
3573 echo "$as_me:3573: checking for strlcat" >&5
3574 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
3575 if test "${ac_cv_func_strlcat+set}" = set; then
3576 echo $ECHO_N "(cached) $ECHO_C" >&6
3578 cat >"conftest.$ac_ext" <<_ACEOF
3579 #line 3579 "configure"
3580 #include "confdefs.h"
3581 #define strlcat autoconf_temporary
3582 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3589 /* We use char because int might match the return type of a gcc2
3590 builtin and then its argument prototype would still apply. */
3591 char strlcat (void);
3597 /* The GNU C library defines stubs for functions which it implements
3598 to always fail with ENOSYS. Some functions are actually named
3599 something starting with __ and the normal name is an alias. */
3600 #if defined (__stub_strlcat) || defined (__stub___strlcat)
3601 #error found stub for strlcat
3609 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3610 if { (eval echo "$as_me:3610: \"$ac_link\"") >&5
3611 (eval $ac_link) 2>&5
3613 echo "$as_me:3613: \$? = $ac_status" >&5
3614 (exit "$ac_status"); } &&
3615 { ac_try='test -s "conftest$ac_exeext"'
3616 { (eval echo "$as_me:3616: \"$ac_try\"") >&5
3619 echo "$as_me:3619: \$? = $ac_status" >&5
3620 (exit "$ac_status"); }; }; then
3621 ac_cv_func_strlcat=yes
3623 echo "$as_me: failed program was:" >&5
3624 cat "conftest.$ac_ext" >&5
3625 ac_cv_func_strlcat=no
3627 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3629 echo "$as_me:3629: result: $ac_cv_func_strlcat" >&5
3630 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
3631 if test "$ac_cv_func_strlcat" = yes; then
3633 cat >>confdefs.h <<\EOF
3634 #define HAVE_STRLCAT 1
3639 echo "$as_me:3639: checking for strlcat in -lbsd" >&5
3640 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
3641 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
3642 echo $ECHO_N "(cached) $ECHO_C" >&6
3644 ac_check_lib_save_LIBS=$LIBS
3646 cat >"conftest.$ac_ext" <<_ACEOF
3647 #line 3647 "configure"
3648 #include "confdefs.h"
3650 /* Override any gcc2 internal prototype to avoid an error. */
3654 /* We use char because int might match the return type of a gcc2
3655 builtin and then its argument prototype would still apply. */
3665 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3666 if { (eval echo "$as_me:3666: \"$ac_link\"") >&5
3667 (eval $ac_link) 2>&5
3669 echo "$as_me:3669: \$? = $ac_status" >&5
3670 (exit "$ac_status"); } &&
3671 { ac_try='test -s "conftest$ac_exeext"'
3672 { (eval echo "$as_me:3672: \"$ac_try\"") >&5
3675 echo "$as_me:3675: \$? = $ac_status" >&5
3676 (exit "$ac_status"); }; }; then
3677 ac_cv_lib_bsd_strlcat=yes
3679 echo "$as_me: failed program was:" >&5
3680 cat "conftest.$ac_ext" >&5
3681 ac_cv_lib_bsd_strlcat=no
3683 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3684 LIBS=$ac_check_lib_save_LIBS
3686 echo "$as_me:3686: result: $ac_cv_lib_bsd_strlcat" >&5
3687 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
3688 if test "$ac_cv_lib_bsd_strlcat" = yes; then
3693 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
3695 for cf_add_1lib in $cf_add_0lib; do
3696 for cf_add_2lib in $cf_add_libs; do
3697 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
3702 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
3706 for ac_header in bsd/string.h
3708 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3709 echo "$as_me:3709: checking for $ac_header" >&5
3710 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3711 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3712 echo $ECHO_N "(cached) $ECHO_C" >&6
3714 cat >"conftest.$ac_ext" <<_ACEOF
3715 #line 3715 "configure"
3716 #include "confdefs.h"
3717 #include <$ac_header>
3719 if { (eval echo "$as_me:3719: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3720 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3722 $EGREP -v '^ *\+' conftest.er1 >conftest.err
3724 cat conftest.err >&5
3725 echo "$as_me:3725: \$? = $ac_status" >&5
3726 (exit "$ac_status"); } >/dev/null; then
3727 if test -s conftest.err; then
3728 ac_cpp_err=$ac_c_preproc_warn_flag
3735 if test -z "$ac_cpp_err"; then
3736 eval "$as_ac_Header=yes"
3738 echo "$as_me: failed program was:" >&5
3739 cat "conftest.$ac_ext" >&5
3740 eval "$as_ac_Header=no"
3742 rm -f conftest.err "conftest.$ac_ext"
3744 echo "$as_me:3744: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
3745 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
3746 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
3747 cat >>confdefs.h <<EOF
3748 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3754 cat >>confdefs.h <<\EOF
3755 #define HAVE_STRLCAT 1
3762 for ac_func in strlcpy snprintf
3764 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3765 echo "$as_me:3765: checking for $ac_func" >&5
3766 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3767 if eval "test \"\${$as_ac_var+set}\" = set"; then
3768 echo $ECHO_N "(cached) $ECHO_C" >&6
3770 cat >"conftest.$ac_ext" <<_ACEOF
3771 #line 3771 "configure"
3772 #include "confdefs.h"
3773 #define $ac_func autoconf_temporary
3774 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3781 /* We use char because int might match the return type of a gcc2
3782 builtin and then its argument prototype would still apply. */
3783 char $ac_func (void);
3789 /* The GNU C library defines stubs for functions which it implements
3790 to always fail with ENOSYS. Some functions are actually named
3791 something starting with __ and the normal name is an alias. */
3792 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3793 #error found stub for $ac_func
3801 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3802 if { (eval echo "$as_me:3802: \"$ac_link\"") >&5
3803 (eval $ac_link) 2>&5
3805 echo "$as_me:3805: \$? = $ac_status" >&5
3806 (exit "$ac_status"); } &&
3807 { ac_try='test -s "conftest$ac_exeext"'
3808 { (eval echo "$as_me:3808: \"$ac_try\"") >&5
3811 echo "$as_me:3811: \$? = $ac_status" >&5
3812 (exit "$ac_status"); }; }; then
3813 eval "$as_ac_var=yes"
3815 echo "$as_me: failed program was:" >&5
3816 cat "conftest.$ac_ext" >&5
3817 eval "$as_ac_var=no"
3819 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3821 echo "$as_me:3821: result: `eval echo '${'"$as_ac_var"'}'`" >&5
3822 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
3823 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
3824 cat >>confdefs.h <<EOF
3825 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3833 echo "$as_me:3833: checking if the POSIX test-macros are already defined" >&5
3834 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
3835 if test "${cf_cv_posix_visible+set}" = set; then
3836 echo $ECHO_N "(cached) $ECHO_C" >&6
3839 cat >"conftest.$ac_ext" <<_ACEOF
3840 #line 3840 "configure"
3841 #include "confdefs.h"
3847 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
3848 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
3849 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
3850 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
3851 #error conflicting symbols found
3858 rm -f "conftest.$ac_objext"
3859 if { (eval echo "$as_me:3859: \"$ac_compile\"") >&5
3860 (eval $ac_compile) 2>&5
3862 echo "$as_me:3862: \$? = $ac_status" >&5
3863 (exit "$ac_status"); } &&
3864 { ac_try='test -s "conftest.$ac_objext"'
3865 { (eval echo "$as_me:3865: \"$ac_try\"") >&5
3868 echo "$as_me:3868: \$? = $ac_status" >&5
3869 (exit "$ac_status"); }; }; then
3870 cf_cv_posix_visible=no
3872 echo "$as_me: failed program was:" >&5
3873 cat "conftest.$ac_ext" >&5
3874 cf_cv_posix_visible=yes
3876 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3879 echo "$as_me:3879: result: $cf_cv_posix_visible" >&5
3880 echo "${ECHO_T}$cf_cv_posix_visible" >&6
3882 if test "$cf_cv_posix_visible" = no; then
3885 cf_POSIX_C_SOURCE=199506L
3890 cf_xopen_source="-D_ALL_SOURCE"
3896 cf_xopen_source="-D_APPLE_C_SOURCE"
3899 cf_xopen_source="-D_DARWIN_C_SOURCE"
3902 (freebsd*|dragonfly*|midnightbsd*)
3903 # 5.x headers associate
3904 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3905 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3906 cf_POSIX_C_SOURCE=200112L
3908 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3911 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3914 cf_xopen_source="-D_HPUX_SOURCE"
3917 cf_xopen_source="-D_SGI_SOURCE"
3920 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3922 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3924 echo "$as_me:3924: checking if this is the GNU C library" >&5
3925 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3926 if test "${cf_cv_gnu_library+set}" = set; then
3927 echo $ECHO_N "(cached) $ECHO_C" >&6
3930 cat >"conftest.$ac_ext" <<_ACEOF
3931 #line 3931 "configure"
3932 #include "confdefs.h"
3933 #include <sys/types.h>
3938 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3940 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
3943 # error not GNU C library
3949 rm -f "conftest.$ac_objext"
3950 if { (eval echo "$as_me:3950: \"$ac_compile\"") >&5
3951 (eval $ac_compile) 2>&5
3953 echo "$as_me:3953: \$? = $ac_status" >&5
3954 (exit "$ac_status"); } &&
3955 { ac_try='test -s "conftest.$ac_objext"'
3956 { (eval echo "$as_me:3956: \"$ac_try\"") >&5
3959 echo "$as_me:3959: \$? = $ac_status" >&5
3960 (exit "$ac_status"); }; }; then
3961 cf_cv_gnu_library=yes
3963 echo "$as_me: failed program was:" >&5
3964 cat "conftest.$ac_ext" >&5
3965 cf_cv_gnu_library=no
3967 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3970 echo "$as_me:3970: result: $cf_cv_gnu_library" >&5
3971 echo "${ECHO_T}$cf_cv_gnu_library" >&6
3973 if test x$cf_cv_gnu_library = xyes; then
3975 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3976 # was changed to help a little. newlib incorporated the change about 4
3978 echo "$as_me:3978: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3979 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3980 if test "${cf_cv_gnu_library_219+set}" = set; then
3981 echo $ECHO_N "(cached) $ECHO_C" >&6
3986 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3987 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3989 cat >"conftest.$ac_ext" <<_ACEOF
3990 #line 3990 "configure"
3991 #include "confdefs.h"
3992 #include <sys/types.h>
3997 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
3999 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
4002 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
4008 rm -f "conftest.$ac_objext"
4009 if { (eval echo "$as_me:4009: \"$ac_compile\"") >&5
4010 (eval $ac_compile) 2>&5
4012 echo "$as_me:4012: \$? = $ac_status" >&5
4013 (exit "$ac_status"); } &&
4014 { ac_try='test -s "conftest.$ac_objext"'
4015 { (eval echo "$as_me:4015: \"$ac_try\"") >&5
4018 echo "$as_me:4018: \$? = $ac_status" >&5
4019 (exit "$ac_status"); }; }; then
4020 cf_cv_gnu_library_219=yes
4022 echo "$as_me: failed program was:" >&5
4023 cat "conftest.$ac_ext" >&5
4024 cf_cv_gnu_library_219=no
4026 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4030 echo "$as_me:4030: result: $cf_cv_gnu_library_219" >&5
4031 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
4033 if test "x$cf_cv_gnu_library_219" = xyes; then
4035 echo "$as_me:4035: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
4036 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
4037 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
4038 echo $ECHO_N "(cached) $ECHO_C" >&6
4044 cf_new_extra_cppflags=
4046 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
4048 case "$cf_fix_cppflags" in
4050 case "$cf_add_cflags" in
4051 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4052 case "$cf_add_cflags" in
4054 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4056 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4057 && test -z "${cf_tst_cflags}" \
4058 && cf_fix_cppflags=yes
4060 if test "$cf_fix_cppflags" = yes ; then
4062 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4063 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4066 elif test "${cf_tst_cflags}" = "\"'" ; then
4068 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4069 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4079 case "$cf_add_cflags" in
4081 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4083 CPPFLAGS=`echo "$CPPFLAGS" | \
4084 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4085 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4090 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4091 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4098 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4099 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4106 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4107 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4109 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4111 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4112 && test -z "${cf_tst_cflags}" \
4113 && cf_fix_cppflags=no
4118 if test -n "$cf_new_cflags" ; then
4120 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4121 CFLAGS="${CFLAGS}$cf_new_cflags"
4125 if test -n "$cf_new_cppflags" ; then
4127 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4128 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4132 if test -n "$cf_new_extra_cppflags" ; then
4134 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4135 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4139 cat >"conftest.$ac_ext" <<_ACEOF
4140 #line 4140 "configure"
4141 #include "confdefs.h"
4144 #include <sys/types.h>
4150 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
4153 # error GNU C library is too old
4159 rm -f "conftest.$ac_objext"
4160 if { (eval echo "$as_me:4160: \"$ac_compile\"") >&5
4161 (eval $ac_compile) 2>&5
4163 echo "$as_me:4163: \$? = $ac_status" >&5
4164 (exit "$ac_status"); } &&
4165 { ac_try='test -s "conftest.$ac_objext"'
4166 { (eval echo "$as_me:4166: \"$ac_try\"") >&5
4169 echo "$as_me:4169: \$? = $ac_status" >&5
4170 (exit "$ac_status"); }; }; then
4171 cf_cv_gnu_dftsrc_219=yes
4173 echo "$as_me: failed program was:" >&5
4174 cat "conftest.$ac_ext" >&5
4175 cf_cv_gnu_dftsrc_219=no
4177 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4180 echo "$as_me:4180: result: $cf_cv_gnu_dftsrc_219" >&5
4181 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
4182 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
4184 cf_cv_gnu_dftsrc_219=maybe
4187 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
4189 echo "$as_me:4189: checking if we must define _GNU_SOURCE" >&5
4190 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
4191 if test "${cf_cv_gnu_source+set}" = set; then
4192 echo $ECHO_N "(cached) $ECHO_C" >&6
4195 cat >"conftest.$ac_ext" <<_ACEOF
4196 #line 4196 "configure"
4197 #include "confdefs.h"
4198 #include <sys/types.h>
4203 #ifndef _XOPEN_SOURCE
4204 #error expected _XOPEN_SOURCE to be defined
4210 rm -f "conftest.$ac_objext"
4211 if { (eval echo "$as_me:4211: \"$ac_compile\"") >&5
4212 (eval $ac_compile) 2>&5
4214 echo "$as_me:4214: \$? = $ac_status" >&5
4215 (exit "$ac_status"); } &&
4216 { ac_try='test -s "conftest.$ac_objext"'
4217 { (eval echo "$as_me:4217: \"$ac_try\"") >&5
4220 echo "$as_me:4220: \$? = $ac_status" >&5
4221 (exit "$ac_status"); }; }; then
4224 echo "$as_me: failed program was:" >&5
4225 cat "conftest.$ac_ext" >&5
4231 cf_new_extra_cppflags=
4233 for cf_add_cflags in -D_GNU_SOURCE
4235 case "$cf_fix_cppflags" in
4237 case "$cf_add_cflags" in
4238 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4239 case "$cf_add_cflags" in
4241 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4243 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4244 && test -z "${cf_tst_cflags}" \
4245 && cf_fix_cppflags=yes
4247 if test "$cf_fix_cppflags" = yes ; then
4249 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4250 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4253 elif test "${cf_tst_cflags}" = "\"'" ; then
4255 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4256 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4266 case "$cf_add_cflags" in
4268 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4270 CPPFLAGS=`echo "$CPPFLAGS" | \
4271 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4272 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4277 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4278 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4285 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4286 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4293 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4294 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4296 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4298 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4299 && test -z "${cf_tst_cflags}" \
4300 && cf_fix_cppflags=no
4305 if test -n "$cf_new_cflags" ; then
4307 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4308 CFLAGS="${CFLAGS}$cf_new_cflags"
4312 if test -n "$cf_new_cppflags" ; then
4314 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4315 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4319 if test -n "$cf_new_extra_cppflags" ; then
4321 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4322 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4326 cat >"conftest.$ac_ext" <<_ACEOF
4327 #line 4327 "configure"
4328 #include "confdefs.h"
4329 #include <sys/types.h>
4334 #ifdef _XOPEN_SOURCE
4335 #error expected _XOPEN_SOURCE to be undefined
4341 rm -f "conftest.$ac_objext"
4342 if { (eval echo "$as_me:4342: \"$ac_compile\"") >&5
4343 (eval $ac_compile) 2>&5
4345 echo "$as_me:4345: \$? = $ac_status" >&5
4346 (exit "$ac_status"); } &&
4347 { ac_try='test -s "conftest.$ac_objext"'
4348 { (eval echo "$as_me:4348: \"$ac_try\"") >&5
4351 echo "$as_me:4351: \$? = $ac_status" >&5
4352 (exit "$ac_status"); }; }; then
4355 echo "$as_me: failed program was:" >&5
4356 cat "conftest.$ac_ext" >&5
4357 cf_cv_gnu_source=yes
4359 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4363 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4366 echo "$as_me:4366: result: $cf_cv_gnu_source" >&5
4367 echo "${ECHO_T}$cf_cv_gnu_source" >&6
4369 if test "$cf_cv_gnu_source" = yes
4371 echo "$as_me:4371: checking if we should also define _DEFAULT_SOURCE" >&5
4372 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
4373 if test "${cf_cv_default_source+set}" = set; then
4374 echo $ECHO_N "(cached) $ECHO_C" >&6
4377 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4378 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
4380 cat >"conftest.$ac_ext" <<_ACEOF
4381 #line 4381 "configure"
4382 #include "confdefs.h"
4383 #include <sys/types.h>
4388 #ifdef _DEFAULT_SOURCE
4389 #error expected _DEFAULT_SOURCE to be undefined
4395 rm -f "conftest.$ac_objext"
4396 if { (eval echo "$as_me:4396: \"$ac_compile\"") >&5
4397 (eval $ac_compile) 2>&5
4399 echo "$as_me:4399: \$? = $ac_status" >&5
4400 (exit "$ac_status"); } &&
4401 { ac_try='test -s "conftest.$ac_objext"'
4402 { (eval echo "$as_me:4402: \"$ac_try\"") >&5
4405 echo "$as_me:4405: \$? = $ac_status" >&5
4406 (exit "$ac_status"); }; }; then
4407 cf_cv_default_source=no
4409 echo "$as_me: failed program was:" >&5
4410 cat "conftest.$ac_ext" >&5
4411 cf_cv_default_source=yes
4413 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4416 echo "$as_me:4416: result: $cf_cv_default_source" >&5
4417 echo "${ECHO_T}$cf_cv_default_source" >&6
4418 if test "$cf_cv_default_source" = yes
4421 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4422 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
4432 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
4435 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
4438 if test "$cf_cv_posix_visible" = no; then
4440 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4442 cf_save_CFLAGS="$CFLAGS"
4443 cf_save_CPPFLAGS="$CPPFLAGS"
4445 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4446 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4447 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4449 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4450 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4451 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4453 echo "$as_me:4453: checking if we should define _POSIX_C_SOURCE" >&5
4454 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4455 if test "${cf_cv_posix_c_source+set}" = set; then
4456 echo $ECHO_N "(cached) $ECHO_C" >&6
4459 echo "${as_me:-configure}:4459: testing if the symbol is already defined go no further ..." 1>&5
4461 cat >"conftest.$ac_ext" <<_ACEOF
4462 #line 4462 "configure"
4463 #include "confdefs.h"
4464 #include <sys/types.h>
4469 #ifndef _POSIX_C_SOURCE
4476 rm -f "conftest.$ac_objext"
4477 if { (eval echo "$as_me:4477: \"$ac_compile\"") >&5
4478 (eval $ac_compile) 2>&5
4480 echo "$as_me:4480: \$? = $ac_status" >&5
4481 (exit "$ac_status"); } &&
4482 { ac_try='test -s "conftest.$ac_objext"'
4483 { (eval echo "$as_me:4483: \"$ac_try\"") >&5
4486 echo "$as_me:4486: \$? = $ac_status" >&5
4487 (exit "$ac_status"); }; }; then
4488 cf_cv_posix_c_source=no
4490 echo "$as_me: failed program was:" >&5
4491 cat "conftest.$ac_ext" >&5
4492 cf_want_posix_source=no
4493 case .$cf_POSIX_C_SOURCE in
4495 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4498 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4499 cf_want_posix_source=yes
4502 cf_want_posix_source=yes
4505 if test "$cf_want_posix_source" = yes ; then
4506 cat >"conftest.$ac_ext" <<_ACEOF
4507 #line 4507 "configure"
4508 #include "confdefs.h"
4509 #include <sys/types.h>
4514 #ifdef _POSIX_SOURCE
4521 rm -f "conftest.$ac_objext"
4522 if { (eval echo "$as_me:4522: \"$ac_compile\"") >&5
4523 (eval $ac_compile) 2>&5
4525 echo "$as_me:4525: \$? = $ac_status" >&5
4526 (exit "$ac_status"); } &&
4527 { ac_try='test -s "conftest.$ac_objext"'
4528 { (eval echo "$as_me:4528: \"$ac_try\"") >&5
4531 echo "$as_me:4531: \$? = $ac_status" >&5
4532 (exit "$ac_status"); }; }; then
4535 echo "$as_me: failed program was:" >&5
4536 cat "conftest.$ac_ext" >&5
4537 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4539 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4542 echo "${as_me:-configure}:4542: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4544 CFLAGS="$cf_trim_CFLAGS"
4545 CPPFLAGS="$cf_trim_CPPFLAGS"
4547 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4548 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4550 echo "${as_me:-configure}:4550: testing if the second compile does not leave our definition intact error ..." 1>&5
4552 cat >"conftest.$ac_ext" <<_ACEOF
4553 #line 4553 "configure"
4554 #include "confdefs.h"
4555 #include <sys/types.h>
4560 #ifndef _POSIX_C_SOURCE
4567 rm -f "conftest.$ac_objext"
4568 if { (eval echo "$as_me:4568: \"$ac_compile\"") >&5
4569 (eval $ac_compile) 2>&5
4571 echo "$as_me:4571: \$? = $ac_status" >&5
4572 (exit "$ac_status"); } &&
4573 { ac_try='test -s "conftest.$ac_objext"'
4574 { (eval echo "$as_me:4574: \"$ac_try\"") >&5
4577 echo "$as_me:4577: \$? = $ac_status" >&5
4578 (exit "$ac_status"); }; }; then
4581 echo "$as_me: failed program was:" >&5
4582 cat "conftest.$ac_ext" >&5
4583 cf_cv_posix_c_source=no
4585 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4586 CFLAGS="$cf_save_CFLAGS"
4587 CPPFLAGS="$cf_save_CPPFLAGS"
4590 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4593 echo "$as_me:4593: result: $cf_cv_posix_c_source" >&5
4594 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4596 if test "$cf_cv_posix_c_source" != no ; then
4597 CFLAGS="$cf_trim_CFLAGS"
4598 CPPFLAGS="$cf_trim_CPPFLAGS"
4603 cf_new_extra_cppflags=
4605 for cf_add_cflags in $cf_cv_posix_c_source
4607 case "$cf_fix_cppflags" in
4609 case "$cf_add_cflags" in
4610 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4611 case "$cf_add_cflags" in
4613 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4615 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4616 && test -z "${cf_tst_cflags}" \
4617 && cf_fix_cppflags=yes
4619 if test "$cf_fix_cppflags" = yes ; then
4621 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4622 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4625 elif test "${cf_tst_cflags}" = "\"'" ; then
4627 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4628 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4638 case "$cf_add_cflags" in
4640 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4642 CPPFLAGS=`echo "$CPPFLAGS" | \
4643 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4644 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4649 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4650 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4657 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4658 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4665 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4666 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4668 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4670 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4671 && test -z "${cf_tst_cflags}" \
4672 && cf_fix_cppflags=no
4677 if test -n "$cf_new_cflags" ; then
4679 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4680 CFLAGS="${CFLAGS}$cf_new_cflags"
4684 if test -n "$cf_new_cppflags" ; then
4686 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4687 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4691 if test -n "$cf_new_extra_cppflags" ; then
4693 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4694 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4700 fi # cf_cv_posix_visible
4704 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4707 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
4708 cf_xopen_source="-D_BSD_SOURCE"
4712 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
4715 cf_xopen_source="-D_OSF_SOURCE"
4718 cf_xopen_source="-D_QNX_SOURCE"
4721 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
4724 cf_xopen_source="-D__EXTENSIONS__"
4725 cf_cv_xopen_source=broken
4727 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
4733 echo "$as_me:4733: checking if we should define _XOPEN_SOURCE" >&5
4734 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4735 if test "${cf_cv_xopen_source+set}" = set; then
4736 echo $ECHO_N "(cached) $ECHO_C" >&6
4739 cat >"conftest.$ac_ext" <<_ACEOF
4740 #line 4740 "configure"
4741 #include "confdefs.h"
4745 #include <sys/types.h>
4751 #ifndef _XOPEN_SOURCE
4758 rm -f "conftest.$ac_objext"
4759 if { (eval echo "$as_me:4759: \"$ac_compile\"") >&5
4760 (eval $ac_compile) 2>&5
4762 echo "$as_me:4762: \$? = $ac_status" >&5
4763 (exit "$ac_status"); } &&
4764 { ac_try='test -s "conftest.$ac_objext"'
4765 { (eval echo "$as_me:4765: \"$ac_try\"") >&5
4768 echo "$as_me:4768: \$? = $ac_status" >&5
4769 (exit "$ac_status"); }; }; then
4770 cf_cv_xopen_source=no
4772 echo "$as_me: failed program was:" >&5
4773 cat "conftest.$ac_ext" >&5
4776 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4777 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4779 cat >"conftest.$ac_ext" <<_ACEOF
4780 #line 4780 "configure"
4781 #include "confdefs.h"
4785 #include <sys/types.h>
4791 #ifdef _XOPEN_SOURCE
4798 rm -f "conftest.$ac_objext"
4799 if { (eval echo "$as_me:4799: \"$ac_compile\"") >&5
4800 (eval $ac_compile) 2>&5
4802 echo "$as_me:4802: \$? = $ac_status" >&5
4803 (exit "$ac_status"); } &&
4804 { ac_try='test -s "conftest.$ac_objext"'
4805 { (eval echo "$as_me:4805: \"$ac_try\"") >&5
4808 echo "$as_me:4808: \$? = $ac_status" >&5
4809 (exit "$ac_status"); }; }; then
4810 cf_cv_xopen_source=no
4812 echo "$as_me: failed program was:" >&5
4813 cat "conftest.$ac_ext" >&5
4814 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4816 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4820 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4823 echo "$as_me:4823: result: $cf_cv_xopen_source" >&5
4824 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4826 if test "$cf_cv_xopen_source" != no ; then
4828 CFLAGS=`echo "$CFLAGS" | \
4829 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4830 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4832 CPPFLAGS=`echo "$CPPFLAGS" | \
4833 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4834 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4836 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4841 cf_new_extra_cppflags=
4843 for cf_add_cflags in $cf_temp_xopen_source
4845 case "$cf_fix_cppflags" in
4847 case "$cf_add_cflags" in
4848 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4849 case "$cf_add_cflags" in
4851 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4853 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4854 && test -z "${cf_tst_cflags}" \
4855 && cf_fix_cppflags=yes
4857 if test "$cf_fix_cppflags" = yes ; then
4859 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4860 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4863 elif test "${cf_tst_cflags}" = "\"'" ; then
4865 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4866 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4876 case "$cf_add_cflags" in
4878 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4880 CPPFLAGS=`echo "$CPPFLAGS" | \
4881 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4882 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4887 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4888 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4895 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4896 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4903 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4904 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4906 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4908 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4909 && test -z "${cf_tst_cflags}" \
4910 && cf_fix_cppflags=no
4915 if test -n "$cf_new_cflags" ; then
4917 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4918 CFLAGS="${CFLAGS}$cf_new_cflags"
4922 if test -n "$cf_new_cppflags" ; then
4924 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4925 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4929 if test -n "$cf_new_extra_cppflags" ; then
4931 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4932 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4938 if test "$cf_cv_posix_visible" = no; then
4940 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4942 cf_save_CFLAGS="$CFLAGS"
4943 cf_save_CPPFLAGS="$CPPFLAGS"
4945 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4946 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4947 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4949 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4950 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4951 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4953 echo "$as_me:4953: checking if we should define _POSIX_C_SOURCE" >&5
4954 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4955 if test "${cf_cv_posix_c_source+set}" = set; then
4956 echo $ECHO_N "(cached) $ECHO_C" >&6
4959 echo "${as_me:-configure}:4959: testing if the symbol is already defined go no further ..." 1>&5
4961 cat >"conftest.$ac_ext" <<_ACEOF
4962 #line 4962 "configure"
4963 #include "confdefs.h"
4964 #include <sys/types.h>
4969 #ifndef _POSIX_C_SOURCE
4976 rm -f "conftest.$ac_objext"
4977 if { (eval echo "$as_me:4977: \"$ac_compile\"") >&5
4978 (eval $ac_compile) 2>&5
4980 echo "$as_me:4980: \$? = $ac_status" >&5
4981 (exit "$ac_status"); } &&
4982 { ac_try='test -s "conftest.$ac_objext"'
4983 { (eval echo "$as_me:4983: \"$ac_try\"") >&5
4986 echo "$as_me:4986: \$? = $ac_status" >&5
4987 (exit "$ac_status"); }; }; then
4988 cf_cv_posix_c_source=no
4990 echo "$as_me: failed program was:" >&5
4991 cat "conftest.$ac_ext" >&5
4992 cf_want_posix_source=no
4993 case .$cf_POSIX_C_SOURCE in
4995 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4998 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4999 cf_want_posix_source=yes
5002 cf_want_posix_source=yes
5005 if test "$cf_want_posix_source" = yes ; then
5006 cat >"conftest.$ac_ext" <<_ACEOF
5007 #line 5007 "configure"
5008 #include "confdefs.h"
5009 #include <sys/types.h>
5014 #ifdef _POSIX_SOURCE
5021 rm -f "conftest.$ac_objext"
5022 if { (eval echo "$as_me:5022: \"$ac_compile\"") >&5
5023 (eval $ac_compile) 2>&5
5025 echo "$as_me:5025: \$? = $ac_status" >&5
5026 (exit "$ac_status"); } &&
5027 { ac_try='test -s "conftest.$ac_objext"'
5028 { (eval echo "$as_me:5028: \"$ac_try\"") >&5
5031 echo "$as_me:5031: \$? = $ac_status" >&5
5032 (exit "$ac_status"); }; }; then
5035 echo "$as_me: failed program was:" >&5
5036 cat "conftest.$ac_ext" >&5
5037 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
5039 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5042 echo "${as_me:-configure}:5042: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
5044 CFLAGS="$cf_trim_CFLAGS"
5045 CPPFLAGS="$cf_trim_CPPFLAGS"
5047 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5048 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
5050 echo "${as_me:-configure}:5050: testing if the second compile does not leave our definition intact error ..." 1>&5
5052 cat >"conftest.$ac_ext" <<_ACEOF
5053 #line 5053 "configure"
5054 #include "confdefs.h"
5055 #include <sys/types.h>
5060 #ifndef _POSIX_C_SOURCE
5067 rm -f "conftest.$ac_objext"
5068 if { (eval echo "$as_me:5068: \"$ac_compile\"") >&5
5069 (eval $ac_compile) 2>&5
5071 echo "$as_me:5071: \$? = $ac_status" >&5
5072 (exit "$ac_status"); } &&
5073 { ac_try='test -s "conftest.$ac_objext"'
5074 { (eval echo "$as_me:5074: \"$ac_try\"") >&5
5077 echo "$as_me:5077: \$? = $ac_status" >&5
5078 (exit "$ac_status"); }; }; then
5081 echo "$as_me: failed program was:" >&5
5082 cat "conftest.$ac_ext" >&5
5083 cf_cv_posix_c_source=no
5085 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5086 CFLAGS="$cf_save_CFLAGS"
5087 CPPFLAGS="$cf_save_CPPFLAGS"
5090 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5093 echo "$as_me:5093: result: $cf_cv_posix_c_source" >&5
5094 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
5096 if test "$cf_cv_posix_c_source" != no ; then
5097 CFLAGS="$cf_trim_CFLAGS"
5098 CPPFLAGS="$cf_trim_CPPFLAGS"
5103 cf_new_extra_cppflags=
5105 for cf_add_cflags in $cf_cv_posix_c_source
5107 case "$cf_fix_cppflags" in
5109 case "$cf_add_cflags" in
5110 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5111 case "$cf_add_cflags" in
5113 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5115 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5116 && test -z "${cf_tst_cflags}" \
5117 && cf_fix_cppflags=yes
5119 if test "$cf_fix_cppflags" = yes ; then
5121 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5122 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5125 elif test "${cf_tst_cflags}" = "\"'" ; then
5127 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5128 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5138 case "$cf_add_cflags" in
5140 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5142 CPPFLAGS=`echo "$CPPFLAGS" | \
5143 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5144 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5149 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5150 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5157 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5158 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5165 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5166 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5168 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5170 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5171 && test -z "${cf_tst_cflags}" \
5172 && cf_fix_cppflags=no
5177 if test -n "$cf_new_cflags" ; then
5179 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5180 CFLAGS="${CFLAGS}$cf_new_cflags"
5184 if test -n "$cf_new_cppflags" ; then
5186 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5187 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5191 if test -n "$cf_new_extra_cppflags" ; then
5193 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5194 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5200 fi # cf_cv_posix_visible
5205 if test -n "$cf_xopen_source" ; then
5210 cf_new_extra_cppflags=
5212 for cf_add_cflags in $cf_xopen_source
5214 case "$cf_fix_cppflags" in
5216 case "$cf_add_cflags" in
5217 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5218 case "$cf_add_cflags" in
5220 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5222 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5223 && test -z "${cf_tst_cflags}" \
5224 && cf_fix_cppflags=yes
5226 if test "$cf_fix_cppflags" = yes ; then
5228 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5229 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5232 elif test "${cf_tst_cflags}" = "\"'" ; then
5234 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5235 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5245 case "$cf_add_cflags" in
5247 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5249 CPPFLAGS=`echo "$CPPFLAGS" | \
5250 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5251 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5256 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5257 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5264 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5265 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5272 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5273 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5275 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5277 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5278 && test -z "${cf_tst_cflags}" \
5279 && cf_fix_cppflags=no
5284 if test -n "$cf_new_cflags" ; then
5285 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
5287 echo "${as_me:-configure}:5287: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
5289 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5290 CFLAGS="${CFLAGS}$cf_new_cflags"
5294 if test -n "$cf_new_cppflags" ; then
5295 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
5297 echo "${as_me:-configure}:5297: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
5299 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5300 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5304 if test -n "$cf_new_extra_cppflags" ; then
5305 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
5307 echo "${as_me:-configure}:5307: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
5309 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5310 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5316 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
5317 echo "$as_me:5317: checking if _XOPEN_SOURCE really is set" >&5
5318 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
5319 cat >"conftest.$ac_ext" <<_ACEOF
5320 #line 5320 "configure"
5321 #include "confdefs.h"
5327 #ifndef _XOPEN_SOURCE
5334 rm -f "conftest.$ac_objext"
5335 if { (eval echo "$as_me:5335: \"$ac_compile\"") >&5
5336 (eval $ac_compile) 2>&5
5338 echo "$as_me:5338: \$? = $ac_status" >&5
5339 (exit "$ac_status"); } &&
5340 { ac_try='test -s "conftest.$ac_objext"'
5341 { (eval echo "$as_me:5341: \"$ac_try\"") >&5
5344 echo "$as_me:5344: \$? = $ac_status" >&5
5345 (exit "$ac_status"); }; }; then
5346 cf_XOPEN_SOURCE_set=yes
5348 echo "$as_me: failed program was:" >&5
5349 cat "conftest.$ac_ext" >&5
5350 cf_XOPEN_SOURCE_set=no
5352 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5353 echo "$as_me:5353: result: $cf_XOPEN_SOURCE_set" >&5
5354 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
5355 if test "$cf_XOPEN_SOURCE_set" = yes
5357 cat >"conftest.$ac_ext" <<_ACEOF
5358 #line 5358 "configure"
5359 #include "confdefs.h"
5365 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
5372 rm -f "conftest.$ac_objext"
5373 if { (eval echo "$as_me:5373: \"$ac_compile\"") >&5
5374 (eval $ac_compile) 2>&5
5376 echo "$as_me:5376: \$? = $ac_status" >&5
5377 (exit "$ac_status"); } &&
5378 { ac_try='test -s "conftest.$ac_objext"'
5379 { (eval echo "$as_me:5379: \"$ac_try\"") >&5
5382 echo "$as_me:5382: \$? = $ac_status" >&5
5383 (exit "$ac_status"); }; }; then
5384 cf_XOPEN_SOURCE_set_ok=yes
5386 echo "$as_me: failed program was:" >&5
5387 cat "conftest.$ac_ext" >&5
5388 cf_XOPEN_SOURCE_set_ok=no
5390 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5391 if test "$cf_XOPEN_SOURCE_set_ok" = no
5393 { echo "$as_me:5393: WARNING: _XOPEN_SOURCE is lower than requested" >&5
5394 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
5398 echo "$as_me:5398: checking if we should define _XOPEN_SOURCE" >&5
5399 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
5400 if test "${cf_cv_xopen_source+set}" = set; then
5401 echo $ECHO_N "(cached) $ECHO_C" >&6
5404 cat >"conftest.$ac_ext" <<_ACEOF
5405 #line 5405 "configure"
5406 #include "confdefs.h"
5410 #include <sys/types.h>
5416 #ifndef _XOPEN_SOURCE
5423 rm -f "conftest.$ac_objext"
5424 if { (eval echo "$as_me:5424: \"$ac_compile\"") >&5
5425 (eval $ac_compile) 2>&5
5427 echo "$as_me:5427: \$? = $ac_status" >&5
5428 (exit "$ac_status"); } &&
5429 { ac_try='test -s "conftest.$ac_objext"'
5430 { (eval echo "$as_me:5430: \"$ac_try\"") >&5
5433 echo "$as_me:5433: \$? = $ac_status" >&5
5434 (exit "$ac_status"); }; }; then
5435 cf_cv_xopen_source=no
5437 echo "$as_me: failed program was:" >&5
5438 cat "conftest.$ac_ext" >&5
5441 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5442 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
5444 cat >"conftest.$ac_ext" <<_ACEOF
5445 #line 5445 "configure"
5446 #include "confdefs.h"
5450 #include <sys/types.h>
5456 #ifdef _XOPEN_SOURCE
5463 rm -f "conftest.$ac_objext"
5464 if { (eval echo "$as_me:5464: \"$ac_compile\"") >&5
5465 (eval $ac_compile) 2>&5
5467 echo "$as_me:5467: \$? = $ac_status" >&5
5468 (exit "$ac_status"); } &&
5469 { ac_try='test -s "conftest.$ac_objext"'
5470 { (eval echo "$as_me:5470: \"$ac_try\"") >&5
5473 echo "$as_me:5473: \$? = $ac_status" >&5
5474 (exit "$ac_status"); }; }; then
5475 cf_cv_xopen_source=no
5477 echo "$as_me: failed program was:" >&5
5478 cat "conftest.$ac_ext" >&5
5479 cf_cv_xopen_source=$cf_XOPEN_SOURCE
5481 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5485 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5488 echo "$as_me:5488: result: $cf_cv_xopen_source" >&5
5489 echo "${ECHO_T}$cf_cv_xopen_source" >&6
5491 if test "$cf_cv_xopen_source" != no ; then
5493 CFLAGS=`echo "$CFLAGS" | \
5494 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5495 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5497 CPPFLAGS=`echo "$CPPFLAGS" | \
5498 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5499 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5501 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
5506 cf_new_extra_cppflags=
5508 for cf_add_cflags in $cf_temp_xopen_source
5510 case "$cf_fix_cppflags" in
5512 case "$cf_add_cflags" in
5513 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5514 case "$cf_add_cflags" in
5516 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5518 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5519 && test -z "${cf_tst_cflags}" \
5520 && cf_fix_cppflags=yes
5522 if test "$cf_fix_cppflags" = yes ; then
5524 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5525 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5528 elif test "${cf_tst_cflags}" = "\"'" ; then
5530 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5531 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5541 case "$cf_add_cflags" in
5543 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5545 CPPFLAGS=`echo "$CPPFLAGS" | \
5546 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5547 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5552 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5553 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5560 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5561 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5568 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5569 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5571 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5573 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5574 && test -z "${cf_tst_cflags}" \
5575 && cf_fix_cppflags=no
5580 if test -n "$cf_new_cflags" ; then
5582 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5583 CFLAGS="${CFLAGS}$cf_new_cflags"
5587 if test -n "$cf_new_cppflags" ; then
5589 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5590 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5594 if test -n "$cf_new_extra_cppflags" ; then
5596 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5597 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5605 fi # cf_cv_posix_visible
5607 echo "$as_me:5607: checking for signal global datatype" >&5
5608 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
5609 if test "${cf_cv_sig_atomic_t+set}" = set; then
5610 echo $ECHO_N "(cached) $ECHO_C" >&6
5614 "volatile sig_atomic_t" \
5618 cat >"conftest.$ac_ext" <<_ACEOF
5619 #line 5619 "configure"
5620 #include "confdefs.h"
5622 #include <sys/types.h>
5628 static void handler(int sig)
5636 signal(SIGINT, handler);
5642 rm -f "conftest.$ac_objext"
5643 if { (eval echo "$as_me:5643: \"$ac_compile\"") >&5
5644 (eval $ac_compile) 2>&5
5646 echo "$as_me:5646: \$? = $ac_status" >&5
5647 (exit "$ac_status"); } &&
5648 { ac_try='test -s "conftest.$ac_objext"'
5649 { (eval echo "$as_me:5649: \"$ac_try\"") >&5
5652 echo "$as_me:5652: \$? = $ac_status" >&5
5653 (exit "$ac_status"); }; }; then
5654 cf_cv_sig_atomic_t=$cf_type
5656 echo "$as_me: failed program was:" >&5
5657 cat "conftest.$ac_ext" >&5
5658 cf_cv_sig_atomic_t=no
5660 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5661 test "$cf_cv_sig_atomic_t" != no && break
5666 echo "$as_me:5666: result: $cf_cv_sig_atomic_t" >&5
5667 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
5668 test "$cf_cv_sig_atomic_t" != no &&
5669 cat >>confdefs.h <<EOF
5670 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
5673 # Work around breakage on OS X
5675 echo "$as_me:5675: checking if SIGWINCH is defined" >&5
5676 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
5677 if test "${cf_cv_define_sigwinch+set}" = set; then
5678 echo $ECHO_N "(cached) $ECHO_C" >&6
5681 cat >"conftest.$ac_ext" <<_ACEOF
5682 #line 5682 "configure"
5683 #include "confdefs.h"
5685 #include <sys/types.h>
5686 #include <sys/signal.h>
5691 int x = SIGWINCH; (void)x
5696 rm -f "conftest.$ac_objext"
5697 if { (eval echo "$as_me:5697: \"$ac_compile\"") >&5
5698 (eval $ac_compile) 2>&5
5700 echo "$as_me:5700: \$? = $ac_status" >&5
5701 (exit "$ac_status"); } &&
5702 { ac_try='test -s "conftest.$ac_objext"'
5703 { (eval echo "$as_me:5703: \"$ac_try\"") >&5
5706 echo "$as_me:5706: \$? = $ac_status" >&5
5707 (exit "$ac_status"); }; }; then
5708 cf_cv_define_sigwinch=yes
5710 echo "$as_me: failed program was:" >&5
5711 cat "conftest.$ac_ext" >&5
5712 cat >"conftest.$ac_ext" <<_ACEOF
5713 #line 5713 "configure"
5714 #include "confdefs.h"
5716 #undef _XOPEN_SOURCE
5717 #undef _POSIX_SOURCE
5718 #undef _POSIX_C_SOURCE
5719 #include <sys/types.h>
5720 #include <sys/signal.h>
5725 int x = SIGWINCH; (void)x
5730 rm -f "conftest.$ac_objext"
5731 if { (eval echo "$as_me:5731: \"$ac_compile\"") >&5
5732 (eval $ac_compile) 2>&5
5734 echo "$as_me:5734: \$? = $ac_status" >&5
5735 (exit "$ac_status"); } &&
5736 { ac_try='test -s "conftest.$ac_objext"'
5737 { (eval echo "$as_me:5737: \"$ac_try\"") >&5
5740 echo "$as_me:5740: \$? = $ac_status" >&5
5741 (exit "$ac_status"); }; }; then
5742 cf_cv_define_sigwinch=maybe
5744 echo "$as_me: failed program was:" >&5
5745 cat "conftest.$ac_ext" >&5
5746 cf_cv_define_sigwinch=no
5748 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5751 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5754 echo "$as_me:5754: result: $cf_cv_define_sigwinch" >&5
5755 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
5757 if test "$cf_cv_define_sigwinch" = maybe ; then
5758 echo "$as_me:5758: checking for actual SIGWINCH definition" >&5
5759 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
5760 if test "${cf_cv_fixup_sigwinch+set}" = set; then
5761 echo $ECHO_N "(cached) $ECHO_C" >&6
5764 cf_cv_fixup_sigwinch=unknown
5766 while test "$cf_sigwinch" != 1
5768 cat >"conftest.$ac_ext" <<_ACEOF
5769 #line 5769 "configure"
5770 #include "confdefs.h"
5772 #undef _XOPEN_SOURCE
5773 #undef _POSIX_SOURCE
5774 #undef _POSIX_C_SOURCE
5775 #include <sys/types.h>
5776 #include <sys/signal.h>
5782 #if SIGWINCH != $cf_sigwinch
5785 int x = SIGWINCH; (void)x
5790 rm -f "conftest.$ac_objext"
5791 if { (eval echo "$as_me:5791: \"$ac_compile\"") >&5
5792 (eval $ac_compile) 2>&5
5794 echo "$as_me:5794: \$? = $ac_status" >&5
5795 (exit "$ac_status"); } &&
5796 { ac_try='test -s "conftest.$ac_objext"'
5797 { (eval echo "$as_me:5797: \"$ac_try\"") >&5
5800 echo "$as_me:5800: \$? = $ac_status" >&5
5801 (exit "$ac_status"); }; }; then
5802 cf_cv_fixup_sigwinch=$cf_sigwinch
5805 echo "$as_me: failed program was:" >&5
5806 cat "conftest.$ac_ext" >&5
5808 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5810 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
5814 echo "$as_me:5814: result: $cf_cv_fixup_sigwinch" >&5
5815 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
5817 if test "$cf_cv_fixup_sigwinch" != unknown ; then
5818 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
5822 # Checks for CODESET support.
5824 echo "$as_me:5824: checking for nl_langinfo and CODESET" >&5
5825 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
5826 if test "${am_cv_langinfo_codeset+set}" = set; then
5827 echo $ECHO_N "(cached) $ECHO_C" >&6
5829 cat >"conftest.$ac_ext" <<_ACEOF
5830 #line 5830 "configure"
5831 #include "confdefs.h"
5832 #include <langinfo.h>
5836 char* cs = nl_langinfo(CODESET); (void)cs
5841 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5842 if { (eval echo "$as_me:5842: \"$ac_link\"") >&5
5843 (eval $ac_link) 2>&5
5845 echo "$as_me:5845: \$? = $ac_status" >&5
5846 (exit "$ac_status"); } &&
5847 { ac_try='test -s "conftest$ac_exeext"'
5848 { (eval echo "$as_me:5848: \"$ac_try\"") >&5
5851 echo "$as_me:5851: \$? = $ac_status" >&5
5852 (exit "$ac_status"); }; }; then
5853 am_cv_langinfo_codeset=yes
5855 echo "$as_me: failed program was:" >&5
5856 cat "conftest.$ac_ext" >&5
5857 am_cv_langinfo_codeset=no
5859 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5862 echo "$as_me:5862: result: $am_cv_langinfo_codeset" >&5
5863 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
5864 if test "$am_cv_langinfo_codeset" = yes; then
5866 cat >>confdefs.h <<\EOF
5867 #define HAVE_LANGINFO_CODESET 1
5872 echo "$as_me:5872: checking if you want to use pkg-config" >&5
5873 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
5875 # Check whether --with-pkg-config or --without-pkg-config was given.
5876 if test "${with_pkg_config+set}" = set; then
5877 withval="$with_pkg_config"
5878 cf_pkg_config=$withval
5882 echo "$as_me:5882: result: $cf_pkg_config" >&5
5883 echo "${ECHO_T}$cf_pkg_config" >&6
5885 case "$cf_pkg_config" in
5891 if test -n "$ac_tool_prefix"; then
5892 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5893 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5894 echo "$as_me:5894: checking for $ac_word" >&5
5895 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5896 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
5897 echo $ECHO_N "(cached) $ECHO_C" >&6
5901 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5904 ac_save_IFS=$IFS; IFS=$ac_path_separator
5906 for ac_dir in $ac_dummy; do
5908 test -z "$ac_dir" && ac_dir=.
5909 if $as_executable_p "$ac_dir/$ac_word"; then
5910 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
5911 echo "$as_me:5911: found $ac_dir/$ac_word" >&5
5919 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5921 if test -n "$PKG_CONFIG"; then
5922 echo "$as_me:5922: result: $PKG_CONFIG" >&5
5923 echo "${ECHO_T}$PKG_CONFIG" >&6
5925 echo "$as_me:5925: result: no" >&5
5926 echo "${ECHO_T}no" >&6
5930 if test -z "$ac_cv_path_PKG_CONFIG"; then
5931 ac_pt_PKG_CONFIG=$PKG_CONFIG
5932 # Extract the first word of "pkg-config", so it can be a program name with args.
5933 set dummy pkg-config; ac_word=$2
5934 echo "$as_me:5934: checking for $ac_word" >&5
5935 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5936 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
5937 echo $ECHO_N "(cached) $ECHO_C" >&6
5939 case $ac_pt_PKG_CONFIG in
5941 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5944 ac_save_IFS=$IFS; IFS=$ac_path_separator
5946 for ac_dir in $ac_dummy; do
5948 test -z "$ac_dir" && ac_dir=.
5949 if $as_executable_p "$ac_dir/$ac_word"; then
5950 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
5951 echo "$as_me:5951: found $ac_dir/$ac_word" >&5
5956 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
5960 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5962 if test -n "$ac_pt_PKG_CONFIG"; then
5963 echo "$as_me:5963: result: $ac_pt_PKG_CONFIG" >&5
5964 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
5966 echo "$as_me:5966: result: no" >&5
5967 echo "${ECHO_T}no" >&6
5970 PKG_CONFIG=$ac_pt_PKG_CONFIG
5972 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5981 test -z "$PKG_CONFIG" && PKG_CONFIG=none
5982 if test "$PKG_CONFIG" != none ; then
5984 if test "x$prefix" != xNONE; then
5985 cf_path_syntax="$prefix"
5987 cf_path_syntax="$ac_default_prefix"
5990 case ".$PKG_CONFIG" in
5995 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5997 (.\$\{*prefix\}*|.\$\{*dir\}*)
5998 eval PKG_CONFIG="$PKG_CONFIG"
5999 case ".$PKG_CONFIG" in
6001 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
6006 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
6009 { { echo "$as_me:6009: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
6010 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
6011 { (exit 1); exit 1; }; }
6015 elif test "x$cf_pkg_config" != xno ; then
6016 { echo "$as_me:6016: WARNING: pkg-config is not installed" >&5
6017 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
6020 echo "$as_me:6020: checking if you want to see long compiling messages" >&5
6021 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
6023 # Check whether --enable-echo or --disable-echo was given.
6024 if test "${enable_echo+set}" = set; then
6025 enableval="$enable_echo"
6026 test "$enableval" != no && enableval=yes
6027 if test "$enableval" != "yes" ; then
6030 ECHO_LD='@echo linking $@;'
6031 RULE_CC='@echo compiling $<'
6032 SHOW_CC='@echo compiling $@'
6054 echo "$as_me:6054: result: $enableval" >&5
6055 echo "${ECHO_T}$enableval" >&6
6057 echo "$as_me:6057: checking for ncurses wrap-prefix" >&5
6058 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
6060 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
6061 if test "${with_ncurses_wrap_prefix+set}" = set; then
6062 withval="$with_ncurses_wrap_prefix"
6063 NCURSES_WRAP_PREFIX=$withval
6065 NCURSES_WRAP_PREFIX=_nc_
6067 echo "$as_me:6067: result: $NCURSES_WRAP_PREFIX" >&5
6068 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
6070 echo "$as_me:6070: checking if you want to check for wide-character functions" >&5
6071 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
6073 # Check whether --enable-widec or --disable-widec was given.
6074 if test "${enable_widec+set}" = set; then
6075 enableval="$enable_widec"
6076 test "$enableval" != no && enableval=yes
6077 if test "$enableval" != "yes" ; then
6087 echo "$as_me:6087: result: $cf_enable_widec" >&5
6088 echo "${ECHO_T}$cf_enable_widec" >&6
6090 echo "$as_me:6090: checking for specific curses-directory" >&5
6091 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
6093 # Check whether --with-curses-dir or --without-curses-dir was given.
6094 if test "${with_curses_dir+set}" = set; then
6095 withval="$with_curses_dir"
6096 cf_cv_curses_dir=$withval
6100 echo "$as_me:6100: result: $cf_cv_curses_dir" >&5
6101 echo "${ECHO_T}$cf_cv_curses_dir" >&6
6103 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6106 if test "x$prefix" != xNONE; then
6107 cf_path_syntax="$prefix"
6109 cf_path_syntax="$ac_default_prefix"
6117 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
6119 (.\$\{*prefix\}*|.\$\{*dir\}*)
6120 eval withval="$withval"
6123 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
6128 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
6131 { { echo "$as_me:6131: error: expected a pathname, not \"$withval\"" >&5
6132 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6133 { (exit 1); exit 1; }; }
6137 if test -d "$cf_cv_curses_dir"
6140 if test -n "$cf_cv_curses_dir/include" ; then
6141 for cf_add_incdir in $cf_cv_curses_dir/include
6143 while test "$cf_add_incdir" != /usr/include
6145 if test -d "$cf_add_incdir"
6148 if test -n "$CFLAGS$CPPFLAGS" ; then
6149 # a loop is needed to ensure we can add subdirs of existing dirs
6150 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6151 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6152 cf_have_incdir=yes; break
6157 if test "$cf_have_incdir" = no ; then
6158 if test "$cf_add_incdir" = /usr/local/include ; then
6159 if test "$GCC" = yes
6161 cf_save_CPPFLAGS=$CPPFLAGS
6163 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6164 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6166 cat >"conftest.$ac_ext" <<_ACEOF
6167 #line 6167 "configure"
6168 #include "confdefs.h"
6178 rm -f "conftest.$ac_objext"
6179 if { (eval echo "$as_me:6179: \"$ac_compile\"") >&5
6180 (eval $ac_compile) 2>&5
6182 echo "$as_me:6182: \$? = $ac_status" >&5
6183 (exit "$ac_status"); } &&
6184 { ac_try='test -s "conftest.$ac_objext"'
6185 { (eval echo "$as_me:6185: \"$ac_try\"") >&5
6188 echo "$as_me:6188: \$? = $ac_status" >&5
6189 (exit "$ac_status"); }; }; then
6192 echo "$as_me: failed program was:" >&5
6193 cat "conftest.$ac_ext" >&5
6196 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6197 CPPFLAGS=$cf_save_CPPFLAGS
6202 if test "$cf_have_incdir" = no ; then
6203 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6205 echo "${as_me:-configure}:6205: testing adding $cf_add_incdir to include-path ..." 1>&5
6207 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6209 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
6210 test "$cf_top_incdir" = "$cf_add_incdir" && break
6211 cf_add_incdir="$cf_top_incdir"
6222 if test -n "$cf_cv_curses_dir/lib" ; then
6223 for cf_add_libdir in $cf_cv_curses_dir/lib
6225 if test "$cf_add_libdir" = /usr/lib ; then
6227 elif test -d "$cf_add_libdir"
6230 if test -n "$LDFLAGS$LIBS" ; then
6231 # a loop is needed to ensure we can add subdirs of existing dirs
6232 for cf_test_libdir in $LDFLAGS $LIBS ; do
6233 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6234 cf_have_libdir=yes; break
6238 if test "$cf_have_libdir" = no ; then
6239 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6241 echo "${as_me:-configure}:6241: testing adding $cf_add_libdir to library-path ..." 1>&5
6243 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6254 echo "$as_me:6254: checking for specified curses library type" >&5
6255 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
6257 # Check whether --with-screen or --without-screen was given.
6258 if test "${with_screen+set}" = set; then
6259 withval="$with_screen"
6260 cf_cv_screen=$withval
6263 # Check whether --with-ncursesw or --without-ncursesw was given.
6264 if test "${with_ncursesw+set}" = set; then
6265 withval="$with_ncursesw"
6266 cf_cv_screen=ncursesw
6269 # Check whether --with-ncurses or --without-ncurses was given.
6270 if test "${with_ncurses+set}" = set; then
6271 withval="$with_ncurses"
6272 cf_cv_screen=ncurses
6275 # Check whether --with-pdcurses or --without-pdcurses was given.
6276 if test "${with_pdcurses+set}" = set; then
6277 withval="$with_pdcurses"
6278 cf_cv_screen=pdcurses
6281 # Check whether --with-curses-colr or --without-curses-colr was given.
6282 if test "${with_curses_colr+set}" = set; then
6283 withval="$with_curses_colr"
6284 cf_cv_screen=curses_colr
6287 # Check whether --with-curses-5lib or --without-curses-5lib was given.
6288 if test "${with_curses_5lib+set}" = set; then
6289 withval="$with_curses_5lib"
6290 cf_cv_screen=curses_5lib
6298 echo "$as_me:6298: result: $cf_cv_screen" >&5
6299 echo "${ECHO_T}$cf_cv_screen" >&6
6301 case $cf_cv_screen in
6304 echo "$as_me:6304: checking for extra include directories" >&5
6305 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
6306 if test "${cf_cv_curses_incdir+set}" = set; then
6307 echo $ECHO_N "(cached) $ECHO_C" >&6
6310 cf_cv_curses_incdir=no
6313 if test "x$cf_cv_screen" = "xcurses_colr"
6315 test -d /usr/include/curses_colr && \
6316 cf_cv_curses_incdir="-I/usr/include/curses_colr"
6320 if test "x$cf_cv_screen" = "xcurses_5lib"
6322 test -d /usr/5lib && \
6323 test -d /usr/5include && \
6324 cf_cv_curses_incdir="-I/usr/5include"
6330 echo "$as_me:6330: result: $cf_cv_curses_incdir" >&5
6331 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
6332 if test "$cf_cv_curses_incdir" != no
6335 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6336 CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
6340 echo "$as_me:6340: checking if we have identified curses headers" >&5
6341 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6342 if test "${cf_cv_ncurses_header+set}" = set; then
6343 echo $ECHO_N "(cached) $ECHO_C" >&6
6346 cf_cv_ncurses_header=none
6349 curses.h ncurses/ncurses.h ncurses/curses.h
6351 cat >"conftest.$ac_ext" <<_ACEOF
6352 #line 6352 "configure"
6353 #include "confdefs.h"
6354 #include <${cf_header}>
6358 initscr(); tgoto("?", 0,0)
6363 rm -f "conftest.$ac_objext"
6364 if { (eval echo "$as_me:6364: \"$ac_compile\"") >&5
6365 (eval $ac_compile) 2>&5
6367 echo "$as_me:6367: \$? = $ac_status" >&5
6368 (exit "$ac_status"); } &&
6369 { ac_try='test -s "conftest.$ac_objext"'
6370 { (eval echo "$as_me:6370: \"$ac_try\"") >&5
6373 echo "$as_me:6373: \$? = $ac_status" >&5
6374 (exit "$ac_status"); }; }; then
6375 cf_cv_ncurses_header=$cf_header; break
6377 echo "$as_me: failed program was:" >&5
6378 cat "conftest.$ac_ext" >&5
6380 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6384 echo "$as_me:6384: result: $cf_cv_ncurses_header" >&5
6385 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6387 if test "$cf_cv_ncurses_header" = none ; then
6388 { { echo "$as_me:6388: error: No curses header-files found" >&5
6389 echo "$as_me: error: No curses header-files found" >&2;}
6390 { (exit 1); exit 1; }; }
6393 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6395 for ac_header in $cf_cv_ncurses_header
6397 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6398 echo "$as_me:6398: checking for $ac_header" >&5
6399 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6400 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6401 echo $ECHO_N "(cached) $ECHO_C" >&6
6403 cat >"conftest.$ac_ext" <<_ACEOF
6404 #line 6404 "configure"
6405 #include "confdefs.h"
6406 #include <$ac_header>
6408 if { (eval echo "$as_me:6408: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6409 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6411 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6413 cat conftest.err >&5
6414 echo "$as_me:6414: \$? = $ac_status" >&5
6415 (exit "$ac_status"); } >/dev/null; then
6416 if test -s conftest.err; then
6417 ac_cpp_err=$ac_c_preproc_warn_flag
6424 if test -z "$ac_cpp_err"; then
6425 eval "$as_ac_Header=yes"
6427 echo "$as_me: failed program was:" >&5
6428 cat "conftest.$ac_ext" >&5
6429 eval "$as_ac_Header=no"
6431 rm -f conftest.err "conftest.$ac_ext"
6433 echo "$as_me:6433: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6434 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6435 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6436 cat >>confdefs.h <<EOF
6437 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6443 echo "$as_me:6443: checking for terminfo header" >&5
6444 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6445 if test "${cf_cv_term_header+set}" = set; then
6446 echo $ECHO_N "(cached) $ECHO_C" >&6
6449 case "${cf_cv_ncurses_header}" in
6450 (*/ncurses.h|*/ncursesw.h)
6451 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6454 cf_term_header=term.h
6458 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6460 cat >"conftest.$ac_ext" <<_ACEOF
6461 #line 6461 "configure"
6462 #include "confdefs.h"
6464 #include <${cf_cv_ncurses_header:-curses.h}>
6470 int x = auto_left_margin; (void)x
6475 rm -f "conftest.$ac_objext"
6476 if { (eval echo "$as_me:6476: \"$ac_compile\"") >&5
6477 (eval $ac_compile) 2>&5
6479 echo "$as_me:6479: \$? = $ac_status" >&5
6480 (exit "$ac_status"); } &&
6481 { ac_try='test -s "conftest.$ac_objext"'
6482 { (eval echo "$as_me:6482: \"$ac_try\"") >&5
6485 echo "$as_me:6485: \$? = $ac_status" >&5
6486 (exit "$ac_status"); }; }; then
6488 cf_cv_term_header="$cf_test"
6490 echo "$as_me: failed program was:" >&5
6491 cat "conftest.$ac_ext" >&5
6493 cf_cv_term_header=unknown
6496 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6497 test "$cf_cv_term_header" != unknown && break
6501 echo "$as_me:6501: result: $cf_cv_term_header" >&5
6502 echo "${ECHO_T}$cf_cv_term_header" >&6
6504 # Set definitions to allow ifdef'ing to accommodate subdirectories
6506 case "$cf_cv_term_header" in
6509 cat >>confdefs.h <<\EOF
6510 #define HAVE_TERM_H 1
6516 case "$cf_cv_term_header" in
6519 cat >>confdefs.h <<\EOF
6520 #define HAVE_NCURSES_TERM_H 1
6526 cat >>confdefs.h <<\EOF
6527 #define HAVE_NCURSESW_TERM_H 1
6533 echo "$as_me:6533: checking for ncurses version" >&5
6534 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6535 if test "${cf_cv_ncurses_version+set}" = set; then
6536 echo $ECHO_N "(cached) $ECHO_C" >&6
6539 cf_cv_ncurses_version=no
6541 rm -f "$cf_tempfile"
6542 if test "$cross_compiling" = yes; then
6544 # This will not work if the preprocessor splits the line after the
6545 # Autoconf token. The 'unproto' program does that.
6546 cat > "conftest.$ac_ext" <<EOF
6547 #include <${cf_cv_ncurses_header:-curses.h}>
6549 #ifdef NCURSES_VERSION
6550 Autoconf NCURSES_VERSION
6558 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6559 { (eval echo "$as_me:6559: \"$cf_try\"") >&5
6562 echo "$as_me:6562: \$? = $ac_status" >&5
6563 (exit "$ac_status"); }
6564 if test -f conftest.out ; then
6565 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
6566 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6571 cat >"conftest.$ac_ext" <<_ACEOF
6572 #line 6572 "configure"
6573 #include "confdefs.h"
6575 #include <${cf_cv_ncurses_header:-curses.h}>
6579 FILE *fp = fopen("$cf_tempfile", "w");
6580 #ifdef NCURSES_VERSION
6581 # ifdef NCURSES_VERSION_PATCH
6582 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6584 fprintf(fp, "%s\\n", NCURSES_VERSION);
6588 fprintf(fp, "old\\n");
6593 ${cf_cv_main_return:-return}(0);
6596 rm -f "conftest$ac_exeext"
6597 if { (eval echo "$as_me:6597: \"$ac_link\"") >&5
6598 (eval $ac_link) 2>&5
6600 echo "$as_me:6600: \$? = $ac_status" >&5
6601 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6602 { (eval echo "$as_me:6602: \"$ac_try\"") >&5
6605 echo "$as_me:6605: \$? = $ac_status" >&5
6606 (exit "$ac_status"); }; }; then
6608 cf_cv_ncurses_version=`cat $cf_tempfile`
6610 echo "$as_me: program exited with status $ac_status" >&5
6611 echo "$as_me: failed program was:" >&5
6612 cat "conftest.$ac_ext" >&5
6614 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6616 rm -f "$cf_tempfile"
6619 echo "$as_me:6619: result: $cf_cv_ncurses_version" >&5
6620 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6621 test "$cf_cv_ncurses_version" = no ||
6622 cat >>confdefs.h <<\EOF
6626 echo "$as_me:6626: checking if we have identified curses libraries" >&5
6627 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
6628 cat >"conftest.$ac_ext" <<_ACEOF
6629 #line 6629 "configure"
6630 #include "confdefs.h"
6631 #include <${cf_cv_ncurses_header:-curses.h}>
6635 initscr(); tgoto("?", 0,0)
6640 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6641 if { (eval echo "$as_me:6641: \"$ac_link\"") >&5
6642 (eval $ac_link) 2>&5
6644 echo "$as_me:6644: \$? = $ac_status" >&5
6645 (exit "$ac_status"); } &&
6646 { ac_try='test -s "conftest$ac_exeext"'
6647 { (eval echo "$as_me:6647: \"$ac_try\"") >&5
6650 echo "$as_me:6650: \$? = $ac_status" >&5
6651 (exit "$ac_status"); }; }; then
6654 echo "$as_me: failed program was:" >&5
6655 cat "conftest.$ac_ext" >&5
6658 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6659 echo "$as_me:6659: result: $cf_result" >&5
6660 echo "${ECHO_T}$cf_result" >&6
6662 if test "$cf_result" = no ; then
6665 echo "$as_me:6665: checking for tgoto in -lmytinfo" >&5
6666 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6667 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6668 echo $ECHO_N "(cached) $ECHO_C" >&6
6670 ac_check_lib_save_LIBS=$LIBS
6671 LIBS="-lmytinfo $LIBS"
6672 cat >"conftest.$ac_ext" <<_ACEOF
6673 #line 6673 "configure"
6674 #include "confdefs.h"
6676 /* Override any gcc2 internal prototype to avoid an error. */
6680 /* We use char because int might match the return type of a gcc2
6681 builtin and then its argument prototype would still apply. */
6691 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6692 if { (eval echo "$as_me:6692: \"$ac_link\"") >&5
6693 (eval $ac_link) 2>&5
6695 echo "$as_me:6695: \$? = $ac_status" >&5
6696 (exit "$ac_status"); } &&
6697 { ac_try='test -s "conftest$ac_exeext"'
6698 { (eval echo "$as_me:6698: \"$ac_try\"") >&5
6701 echo "$as_me:6701: \$? = $ac_status" >&5
6702 (exit "$ac_status"); }; }; then
6703 ac_cv_lib_mytinfo_tgoto=yes
6705 echo "$as_me: failed program was:" >&5
6706 cat "conftest.$ac_ext" >&5
6707 ac_cv_lib_mytinfo_tgoto=no
6709 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6710 LIBS=$ac_check_lib_save_LIBS
6712 echo "$as_me:6712: result: $ac_cv_lib_mytinfo_tgoto" >&5
6713 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6714 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6719 for cf_add_1lib in -lmytinfo; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6721 for cf_add_1lib in $cf_add_0lib; do
6722 for cf_add_2lib in $cf_add_libs; do
6723 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6728 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6736 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
6737 # next (1998), and xcurses "newer" (2000). There is no header file for
6738 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
6739 # term.h) for cur_colr
6740 if test "x$cf_cv_screen" = "xcurses_colr"
6742 echo "$as_me:6742: checking for initscr in -lcur_colr" >&5
6743 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
6744 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
6745 echo $ECHO_N "(cached) $ECHO_C" >&6
6747 ac_check_lib_save_LIBS=$LIBS
6748 LIBS="-lcur_colr $LIBS"
6749 cat >"conftest.$ac_ext" <<_ACEOF
6750 #line 6750 "configure"
6751 #include "confdefs.h"
6753 /* Override any gcc2 internal prototype to avoid an error. */
6757 /* We use char because int might match the return type of a gcc2
6758 builtin and then its argument prototype would still apply. */
6768 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6769 if { (eval echo "$as_me:6769: \"$ac_link\"") >&5
6770 (eval $ac_link) 2>&5
6772 echo "$as_me:6772: \$? = $ac_status" >&5
6773 (exit "$ac_status"); } &&
6774 { ac_try='test -s "conftest$ac_exeext"'
6775 { (eval echo "$as_me:6775: \"$ac_try\"") >&5
6778 echo "$as_me:6778: \$? = $ac_status" >&5
6779 (exit "$ac_status"); }; }; then
6780 ac_cv_lib_cur_colr_initscr=yes
6782 echo "$as_me: failed program was:" >&5
6783 cat "conftest.$ac_ext" >&5
6784 ac_cv_lib_cur_colr_initscr=no
6786 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6787 LIBS=$ac_check_lib_save_LIBS
6789 echo "$as_me:6789: result: $ac_cv_lib_cur_colr_initscr" >&5
6790 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
6791 if test "$ac_cv_lib_cur_colr_initscr" = yes; then
6796 for cf_add_1lib in -lcur_colr; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6798 for cf_add_1lib in $cf_add_0lib; do
6799 for cf_add_2lib in $cf_add_libs; do
6800 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6805 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6809 ac_cv_func_initscr=yes
6813 echo "$as_me:6813: checking for initscr in -lHcurses" >&5
6814 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
6815 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
6816 echo $ECHO_N "(cached) $ECHO_C" >&6
6818 ac_check_lib_save_LIBS=$LIBS
6819 LIBS="-lHcurses $LIBS"
6820 cat >"conftest.$ac_ext" <<_ACEOF
6821 #line 6821 "configure"
6822 #include "confdefs.h"
6824 /* Override any gcc2 internal prototype to avoid an error. */
6828 /* We use char because int might match the return type of a gcc2
6829 builtin and then its argument prototype would still apply. */
6839 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6840 if { (eval echo "$as_me:6840: \"$ac_link\"") >&5
6841 (eval $ac_link) 2>&5
6843 echo "$as_me:6843: \$? = $ac_status" >&5
6844 (exit "$ac_status"); } &&
6845 { ac_try='test -s "conftest$ac_exeext"'
6846 { (eval echo "$as_me:6846: \"$ac_try\"") >&5
6849 echo "$as_me:6849: \$? = $ac_status" >&5
6850 (exit "$ac_status"); }; }; then
6851 ac_cv_lib_Hcurses_initscr=yes
6853 echo "$as_me: failed program was:" >&5
6854 cat "conftest.$ac_ext" >&5
6855 ac_cv_lib_Hcurses_initscr=no
6857 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6858 LIBS=$ac_check_lib_save_LIBS
6860 echo "$as_me:6860: result: $ac_cv_lib_Hcurses_initscr" >&5
6861 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
6862 if test "$ac_cv_lib_Hcurses_initscr" = yes; then
6864 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
6869 for cf_add_1lib in -lHcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6871 for cf_add_1lib in $cf_add_0lib; do
6872 for cf_add_2lib in $cf_add_libs; do
6873 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6878 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6882 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6883 CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
6885 ac_cv_func_initscr=yes
6894 case `arch 2>/dev/null` in
6899 if test -n "/lib64" ; then
6900 for cf_add_libdir in /lib64
6902 if test "$cf_add_libdir" = /usr/lib ; then
6904 elif test -d "$cf_add_libdir"
6907 if test -n "$LDFLAGS$LIBS" ; then
6908 # a loop is needed to ensure we can add subdirs of existing dirs
6909 for cf_test_libdir in $LDFLAGS $LIBS ; do
6910 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6911 cf_have_libdir=yes; break
6915 if test "$cf_have_libdir" = no ; then
6916 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6918 echo "${as_me:-configure}:6918: testing adding $cf_add_libdir to library-path ..." 1>&5
6920 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6928 if test -n "/lib" ; then
6929 for cf_add_libdir in /lib
6931 if test "$cf_add_libdir" = /usr/lib ; then
6933 elif test -d "$cf_add_libdir"
6936 if test -n "$LDFLAGS$LIBS" ; then
6937 # a loop is needed to ensure we can add subdirs of existing dirs
6938 for cf_test_libdir in $LDFLAGS $LIBS ; do
6939 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6940 cf_have_libdir=yes; break
6944 if test "$cf_have_libdir" = no ; then
6945 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6947 echo "${as_me:-configure}:6947: testing adding $cf_add_libdir to library-path ..." 1>&5
6949 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6959 if test -n "/lib" ; then
6960 for cf_add_libdir in /lib
6962 if test "$cf_add_libdir" = /usr/lib ; then
6964 elif test -d "$cf_add_libdir"
6967 if test -n "$LDFLAGS$LIBS" ; then
6968 # a loop is needed to ensure we can add subdirs of existing dirs
6969 for cf_test_libdir in $LDFLAGS $LIBS ; do
6970 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6971 cf_have_libdir=yes; break
6975 if test "$cf_have_libdir" = no ; then
6976 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6978 echo "${as_me:-configure}:6978: testing adding $cf_add_libdir to library-path ..." 1>&5
6980 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6990 if test "x$cf_cv_screen" = "xcurses_5lib"
6992 if test -d /usr/5lib ; then
6994 if test -n "/usr/5lib" ; then
6995 for cf_add_libdir in /usr/5lib
6997 if test "$cf_add_libdir" = /usr/lib ; then
6999 elif test -d "$cf_add_libdir"
7002 if test -n "$LDFLAGS$LIBS" ; then
7003 # a loop is needed to ensure we can add subdirs of existing dirs
7004 for cf_test_libdir in $LDFLAGS $LIBS ; do
7005 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7006 cf_have_libdir=yes; break
7010 if test "$cf_have_libdir" = no ; then
7011 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7013 echo "${as_me:-configure}:7013: testing adding $cf_add_libdir to library-path ..." 1>&5
7015 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7024 for cf_add_1lib in -lcurses -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7026 for cf_add_1lib in $cf_add_0lib; do
7027 for cf_add_2lib in $cf_add_libs; do
7028 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7033 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7039 ac_cv_func_initscr=yes
7043 if test ".$ac_cv_func_initscr" != .yes ; then
7044 cf_save_LIBS="$LIBS"
7046 if test ".${cf_cv_ncurses_version:-no}" != .no
7048 cf_check_list="ncurses curses cursesX"
7050 cf_check_list="cursesX curses ncurses"
7053 # Check for library containing tgoto. Do this before curses library
7054 # because it may be needed to link the test-case for initscr.
7055 if test "x$cf_term_lib" = x
7057 echo "$as_me:7057: checking for tgoto" >&5
7058 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
7059 if test "${ac_cv_func_tgoto+set}" = set; then
7060 echo $ECHO_N "(cached) $ECHO_C" >&6
7062 cat >"conftest.$ac_ext" <<_ACEOF
7063 #line 7063 "configure"
7064 #include "confdefs.h"
7065 #define tgoto autoconf_temporary
7066 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
7073 /* We use char because int might match the return type of a gcc2
7074 builtin and then its argument prototype would still apply. */
7081 /* The GNU C library defines stubs for functions which it implements
7082 to always fail with ENOSYS. Some functions are actually named
7083 something starting with __ and the normal name is an alias. */
7084 #if defined (__stub_tgoto) || defined (__stub___tgoto)
7085 #error found stub for tgoto
7093 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7094 if { (eval echo "$as_me:7094: \"$ac_link\"") >&5
7095 (eval $ac_link) 2>&5
7097 echo "$as_me:7097: \$? = $ac_status" >&5
7098 (exit "$ac_status"); } &&
7099 { ac_try='test -s "conftest$ac_exeext"'
7100 { (eval echo "$as_me:7100: \"$ac_try\"") >&5
7103 echo "$as_me:7103: \$? = $ac_status" >&5
7104 (exit "$ac_status"); }; }; then
7105 ac_cv_func_tgoto=yes
7107 echo "$as_me: failed program was:" >&5
7108 cat "conftest.$ac_ext" >&5
7111 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7113 echo "$as_me:7113: result: $ac_cv_func_tgoto" >&5
7114 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
7115 if test "$ac_cv_func_tgoto" = yes; then
7116 cf_term_lib=predefined
7119 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
7121 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
7122 echo "$as_me:7122: checking for tgoto in -l$cf_term_lib" >&5
7123 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
7124 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
7125 echo $ECHO_N "(cached) $ECHO_C" >&6
7127 ac_check_lib_save_LIBS=$LIBS
7128 LIBS="-l$cf_term_lib $LIBS"
7129 cat >"conftest.$ac_ext" <<_ACEOF
7130 #line 7130 "configure"
7131 #include "confdefs.h"
7133 /* Override any gcc2 internal prototype to avoid an error. */
7137 /* We use char because int might match the return type of a gcc2
7138 builtin and then its argument prototype would still apply. */
7148 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7149 if { (eval echo "$as_me:7149: \"$ac_link\"") >&5
7150 (eval $ac_link) 2>&5
7152 echo "$as_me:7152: \$? = $ac_status" >&5
7153 (exit "$ac_status"); } &&
7154 { ac_try='test -s "conftest$ac_exeext"'
7155 { (eval echo "$as_me:7155: \"$ac_try\"") >&5
7158 echo "$as_me:7158: \$? = $ac_status" >&5
7159 (exit "$ac_status"); }; }; then
7160 eval "$as_ac_Lib=yes"
7162 echo "$as_me: failed program was:" >&5
7163 cat "conftest.$ac_ext" >&5
7164 eval "$as_ac_Lib=no"
7166 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7167 LIBS=$ac_check_lib_save_LIBS
7169 echo "$as_me:7169: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
7170 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
7171 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
7173 : "${cf_nculib_root:=$cf_term_lib}"
7184 # Check for library containing initscr
7185 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
7186 if test "x$cf_curs_lib" = x
7188 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
7190 LIBS="-l$cf_curs_lib $cf_save_LIBS"
7191 if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
7192 echo "$as_me:7192: checking if we can link with $cf_curs_lib library" >&5
7193 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
7194 cat >"conftest.$ac_ext" <<_ACEOF
7195 #line 7195 "configure"
7196 #include "confdefs.h"
7197 #include <${cf_cv_ncurses_header:-curses.h}>
7206 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7207 if { (eval echo "$as_me:7207: \"$ac_link\"") >&5
7208 (eval $ac_link) 2>&5
7210 echo "$as_me:7210: \$? = $ac_status" >&5
7211 (exit "$ac_status"); } &&
7212 { ac_try='test -s "conftest$ac_exeext"'
7213 { (eval echo "$as_me:7213: \"$ac_try\"") >&5
7216 echo "$as_me:7216: \$? = $ac_status" >&5
7217 (exit "$ac_status"); }; }; then
7220 echo "$as_me: failed program was:" >&5
7221 cat "conftest.$ac_ext" >&5
7224 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7225 echo "$as_me:7225: result: $cf_result" >&5
7226 echo "${ECHO_T}$cf_result" >&6
7227 test "$cf_result" = yes && break
7228 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
7230 elif test "$cf_term_lib" != predefined ; then
7231 echo "$as_me:7231: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
7232 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
7233 cat >"conftest.$ac_ext" <<_ACEOF
7234 #line 7234 "configure"
7235 #include "confdefs.h"
7236 #include <${cf_cv_ncurses_header:-curses.h}>
7240 initscr(); tgoto((char *)0, 0, 0);
7245 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7246 if { (eval echo "$as_me:7246: \"$ac_link\"") >&5
7247 (eval $ac_link) 2>&5
7249 echo "$as_me:7249: \$? = $ac_status" >&5
7250 (exit "$ac_status"); } &&
7251 { ac_try='test -s "conftest$ac_exeext"'
7252 { (eval echo "$as_me:7252: \"$ac_try\"") >&5
7255 echo "$as_me:7255: \$? = $ac_status" >&5
7256 (exit "$ac_status"); }; }; then
7259 echo "$as_me: failed program was:" >&5
7260 cat "conftest.$ac_ext" >&5
7262 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
7263 cat >"conftest.$ac_ext" <<_ACEOF
7264 #line 7264 "configure"
7265 #include "confdefs.h"
7266 #include <${cf_cv_ncurses_header:-curses.h}>
7275 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7276 if { (eval echo "$as_me:7276: \"$ac_link\"") >&5
7277 (eval $ac_link) 2>&5
7279 echo "$as_me:7279: \$? = $ac_status" >&5
7280 (exit "$ac_status"); } &&
7281 { ac_try='test -s "conftest$ac_exeext"'
7282 { (eval echo "$as_me:7282: \"$ac_try\"") >&5
7285 echo "$as_me:7285: \$? = $ac_status" >&5
7286 (exit "$ac_status"); }; }; then
7289 echo "$as_me: failed program was:" >&5
7290 cat "conftest.$ac_ext" >&5
7293 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7296 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7297 echo "$as_me:7297: result: $cf_result" >&5
7298 echo "${ECHO_T}$cf_result" >&6
7299 test "$cf_result" != error && break
7303 test "$cf_curs_lib" = unknown && { { echo "$as_me:7303: error: no curses library found" >&5
7304 echo "$as_me: error: no curses library found" >&2;}
7305 { (exit 1); exit 1; }; }
7312 echo "$as_me:7312: checking for multibyte character support" >&5
7313 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7314 if test "${cf_cv_utf8_lib+set}" = set; then
7315 echo $ECHO_N "(cached) $ECHO_C" >&6
7318 cf_save_LIBS="$LIBS"
7319 cat >"conftest.$ac_ext" <<_ACEOF
7320 #line 7320 "configure"
7321 #include "confdefs.h"
7332 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7333 if { (eval echo "$as_me:7333: \"$ac_link\"") >&5
7334 (eval $ac_link) 2>&5
7336 echo "$as_me:7336: \$? = $ac_status" >&5
7337 (exit "$ac_status"); } &&
7338 { ac_try='test -s "conftest$ac_exeext"'
7339 { (eval echo "$as_me:7339: \"$ac_try\"") >&5
7342 echo "$as_me:7342: \$? = $ac_status" >&5
7343 (exit "$ac_status"); }; }; then
7346 echo "$as_me: failed program was:" >&5
7347 cat "conftest.$ac_ext" >&5
7349 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7350 # will be set on completion of the AC_TRY_LINK below.
7351 cf_cv_header_path_utf8=
7352 cf_cv_library_path_utf8=
7354 echo "${as_me:-configure}:7354: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7356 cf_save_LIBS="$LIBS"
7358 cat >"conftest.$ac_ext" <<_ACEOF
7359 #line 7359 "configure"
7360 #include "confdefs.h"
7362 #include <libutf8.h>
7371 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7372 if { (eval echo "$as_me:7372: \"$ac_link\"") >&5
7373 (eval $ac_link) 2>&5
7375 echo "$as_me:7375: \$? = $ac_status" >&5
7376 (exit "$ac_status"); } &&
7377 { ac_try='test -s "conftest$ac_exeext"'
7378 { (eval echo "$as_me:7378: \"$ac_try\"") >&5
7381 echo "$as_me:7381: \$? = $ac_status" >&5
7382 (exit "$ac_status"); }; }; then
7384 cf_cv_find_linkage_utf8=yes
7385 cf_cv_header_path_utf8=/usr/include
7386 cf_cv_library_path_utf8=/usr/lib
7389 echo "$as_me: failed program was:" >&5
7390 cat "conftest.$ac_ext" >&5
7392 LIBS="-lutf8 $cf_save_LIBS"
7394 cat >"conftest.$ac_ext" <<_ACEOF
7395 #line 7395 "configure"
7396 #include "confdefs.h"
7398 #include <libutf8.h>
7407 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7408 if { (eval echo "$as_me:7408: \"$ac_link\"") >&5
7409 (eval $ac_link) 2>&5
7411 echo "$as_me:7411: \$? = $ac_status" >&5
7412 (exit "$ac_status"); } &&
7413 { ac_try='test -s "conftest$ac_exeext"'
7414 { (eval echo "$as_me:7414: \"$ac_try\"") >&5
7417 echo "$as_me:7417: \$? = $ac_status" >&5
7418 (exit "$ac_status"); }; }; then
7420 cf_cv_find_linkage_utf8=yes
7421 cf_cv_header_path_utf8=/usr/include
7422 cf_cv_library_path_utf8=/usr/lib
7423 cf_cv_library_file_utf8="-lutf8"
7426 echo "$as_me: failed program was:" >&5
7427 cat "conftest.$ac_ext" >&5
7429 cf_cv_find_linkage_utf8=no
7430 LIBS="$cf_save_LIBS"
7432 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
7434 echo "${as_me:-configure}:7434: testing find linkage for utf8 library ..." 1>&5
7436 echo "${as_me:-configure}:7436: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7438 cf_save_CPPFLAGS="$CPPFLAGS"
7439 cf_test_CPPFLAGS="$CPPFLAGS"
7443 # collect the current set of include-directories from compiler flags
7444 cf_header_path_list=""
7445 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7446 for cf_header_path in $CPPFLAGS $CFLAGS
7448 case "$cf_header_path" in
7450 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7452 test "x$cf_header_path" != "xNONE" && \
7453 test -d "$cf_header_path" && \
7455 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7456 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
7457 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
7458 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
7459 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
7460 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7463 cf_header_path_list="$cf_header_path_list $cf_search"
7469 # add the variations for the package we are looking for
7473 test "x$prefix" != "xNONE" && \
7474 test -d "$prefix" && \
7476 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7477 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
7478 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
7479 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
7480 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
7481 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
7484 for cf_subdir_prefix in \
7493 test "x$cf_subdir_prefix" != "x$prefix" && \
7494 test -d "$cf_subdir_prefix" && \
7495 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7496 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7497 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
7498 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
7499 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
7500 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
7501 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
7506 test "$includedir" != NONE && \
7507 test "$includedir" != "/usr/include" && \
7508 test -d "$includedir" && {
7509 test -d "$includedir" && cf_search="$cf_search $includedir"
7510 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
7513 test "$oldincludedir" != NONE && \
7514 test "$oldincludedir" != "/usr/include" && \
7515 test -d "$oldincludedir" && {
7516 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
7517 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
7520 cf_search="$cf_search $cf_header_path_list"
7522 for cf_cv_header_path_utf8 in $cf_search
7524 if test -d "$cf_cv_header_path_utf8" ; then
7525 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
7527 echo "${as_me:-configure}:7527: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7529 CPPFLAGS="$cf_save_CPPFLAGS"
7531 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7532 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
7534 cat >"conftest.$ac_ext" <<_ACEOF
7535 #line 7535 "configure"
7536 #include "confdefs.h"
7538 #include <libutf8.h>
7547 rm -f "conftest.$ac_objext"
7548 if { (eval echo "$as_me:7548: \"$ac_compile\"") >&5
7549 (eval $ac_compile) 2>&5
7551 echo "$as_me:7551: \$? = $ac_status" >&5
7552 (exit "$ac_status"); } &&
7553 { ac_try='test -s "conftest.$ac_objext"'
7554 { (eval echo "$as_me:7554: \"$ac_try\"") >&5
7557 echo "$as_me:7557: \$? = $ac_status" >&5
7558 (exit "$ac_status"); }; }; then
7560 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7562 echo "${as_me:-configure}:7562: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7564 cf_cv_find_linkage_utf8=maybe
7565 cf_test_CPPFLAGS="$CPPFLAGS"
7568 echo "$as_me: failed program was:" >&5
7569 cat "conftest.$ac_ext" >&5
7571 CPPFLAGS="$cf_save_CPPFLAGS"
7574 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7578 if test "$cf_cv_find_linkage_utf8" = maybe ; then
7580 echo "${as_me:-configure}:7580: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7582 cf_save_LIBS="$LIBS"
7583 cf_save_LDFLAGS="$LDFLAGS"
7585 if test "$cf_cv_find_linkage_utf8" != yes ; then
7588 cf_library_path_list=""
7589 if test -n "${LDFLAGS}${LIBS}" ; then
7590 for cf_library_path in $LDFLAGS $LIBS
7592 case "$cf_library_path" in
7594 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7596 test "x$cf_library_path" != "xNONE" && \
7597 test -d "$cf_library_path" && \
7599 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7600 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
7601 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
7602 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7603 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
7604 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7607 cf_library_path_list="$cf_library_path_list $cf_search"
7615 test "x$prefix" != "xNONE" && \
7616 test -d "$prefix" && \
7618 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7619 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
7620 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
7621 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
7622 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
7623 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
7626 for cf_subdir_prefix in \
7635 test "x$cf_subdir_prefix" != "x$prefix" && \
7636 test -d "$cf_subdir_prefix" && \
7637 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7638 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7639 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
7640 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
7641 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
7642 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
7643 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
7648 cf_search="$cf_library_path_list $cf_search"
7650 for cf_cv_library_path_utf8 in $cf_search
7652 if test -d "$cf_cv_library_path_utf8" ; then
7653 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7655 echo "${as_me:-configure}:7655: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7657 CPPFLAGS="$cf_test_CPPFLAGS"
7658 LIBS="-lutf8 $cf_save_LIBS"
7659 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7660 cat >"conftest.$ac_ext" <<_ACEOF
7661 #line 7661 "configure"
7662 #include "confdefs.h"
7664 #include <libutf8.h>
7673 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7674 if { (eval echo "$as_me:7674: \"$ac_link\"") >&5
7675 (eval $ac_link) 2>&5
7677 echo "$as_me:7677: \$? = $ac_status" >&5
7678 (exit "$ac_status"); } &&
7679 { ac_try='test -s "conftest$ac_exeext"'
7680 { (eval echo "$as_me:7680: \"$ac_try\"") >&5
7683 echo "$as_me:7683: \$? = $ac_status" >&5
7684 (exit "$ac_status"); }; }; then
7686 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7688 echo "${as_me:-configure}:7688: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7690 cf_cv_find_linkage_utf8=yes
7691 cf_cv_library_file_utf8="-lutf8"
7694 echo "$as_me: failed program was:" >&5
7695 cat "conftest.$ac_ext" >&5
7697 CPPFLAGS="$cf_save_CPPFLAGS"
7698 LIBS="$cf_save_LIBS"
7699 LDFLAGS="$cf_save_LDFLAGS"
7702 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7705 CPPFLAGS="$cf_save_CPPFLAGS"
7706 LDFLAGS="$cf_save_LDFLAGS"
7710 cf_cv_find_linkage_utf8=no
7714 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7717 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7719 LIBS="$cf_save_LIBS"
7721 if test "$cf_cv_find_linkage_utf8" = yes ; then
7722 cf_cv_utf8_lib=add-on
7728 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7730 echo "$as_me:7730: result: $cf_cv_utf8_lib" >&5
7731 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7733 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7735 if test "$cf_cv_utf8_lib" = "add-on" ; then
7737 cat >>confdefs.h <<\EOF
7738 #define HAVE_LIBUTF8_H 1
7741 if test -n "$cf_cv_header_path_utf8" ; then
7742 for cf_add_incdir in $cf_cv_header_path_utf8
7744 while test "$cf_add_incdir" != /usr/include
7746 if test -d "$cf_add_incdir"
7749 if test -n "$CFLAGS$CPPFLAGS" ; then
7750 # a loop is needed to ensure we can add subdirs of existing dirs
7751 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7752 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7753 cf_have_incdir=yes; break
7758 if test "$cf_have_incdir" = no ; then
7759 if test "$cf_add_incdir" = /usr/local/include ; then
7760 if test "$GCC" = yes
7762 cf_save_CPPFLAGS=$CPPFLAGS
7764 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7765 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7767 cat >"conftest.$ac_ext" <<_ACEOF
7768 #line 7768 "configure"
7769 #include "confdefs.h"
7779 rm -f "conftest.$ac_objext"
7780 if { (eval echo "$as_me:7780: \"$ac_compile\"") >&5
7781 (eval $ac_compile) 2>&5
7783 echo "$as_me:7783: \$? = $ac_status" >&5
7784 (exit "$ac_status"); } &&
7785 { ac_try='test -s "conftest.$ac_objext"'
7786 { (eval echo "$as_me:7786: \"$ac_try\"") >&5
7789 echo "$as_me:7789: \$? = $ac_status" >&5
7790 (exit "$ac_status"); }; }; then
7793 echo "$as_me: failed program was:" >&5
7794 cat "conftest.$ac_ext" >&5
7797 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7798 CPPFLAGS=$cf_save_CPPFLAGS
7803 if test "$cf_have_incdir" = no ; then
7804 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7806 echo "${as_me:-configure}:7806: testing adding $cf_add_incdir to include-path ..." 1>&5
7808 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7810 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7811 test "$cf_top_incdir" = "$cf_add_incdir" && break
7812 cf_add_incdir="$cf_top_incdir"
7823 if test -n "$cf_cv_library_path_utf8" ; then
7824 for cf_add_libdir in $cf_cv_library_path_utf8
7826 if test "$cf_add_libdir" = /usr/lib ; then
7828 elif test -d "$cf_add_libdir"
7831 if test -n "$LDFLAGS$LIBS" ; then
7832 # a loop is needed to ensure we can add subdirs of existing dirs
7833 for cf_test_libdir in $LDFLAGS $LIBS ; do
7834 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7835 cf_have_libdir=yes; break
7839 if test "$cf_have_libdir" = no ; then
7840 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7842 echo "${as_me:-configure}:7842: testing adding $cf_add_libdir to library-path ..." 1>&5
7844 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7853 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7855 for cf_add_1lib in $cf_add_0lib; do
7856 for cf_add_2lib in $cf_add_libs; do
7857 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7862 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7868 cf_ncuconfig_root=$cf_cv_screen
7869 cf_have_ncuconfig=no
7871 if test "x${PKG_CONFIG:=none}" != xnone; then
7872 echo "$as_me:7872: checking pkg-config for $cf_ncuconfig_root" >&5
7873 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7874 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7875 echo "$as_me:7875: result: yes" >&5
7876 echo "${ECHO_T}yes" >&6
7878 echo "$as_me:7878: checking if the $cf_ncuconfig_root package files work" >&5
7879 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7880 cf_have_ncuconfig=unknown
7882 cf_save_CFLAGS="$CFLAGS"
7883 cf_save_CPPFLAGS="$CPPFLAGS"
7884 cf_save_LIBS="$LIBS"
7886 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7887 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7889 # while -W for passing linker flags is prevalent, it is not "standard".
7890 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7891 # incompatible _and_ non-standard -W option which gives an error. Work
7892 # around that pitfall.
7893 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7899 cf_new_extra_cppflags=
7901 for cf_add_cflags in $cf_pkg_cflags
7903 case "$cf_fix_cppflags" in
7905 case "$cf_add_cflags" in
7906 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7907 case "$cf_add_cflags" in
7909 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7911 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7912 && test -z "${cf_tst_cflags}" \
7913 && cf_fix_cppflags=yes
7915 if test "$cf_fix_cppflags" = yes ; then
7917 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7918 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7921 elif test "${cf_tst_cflags}" = "\"'" ; then
7923 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7924 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7934 case "$cf_add_cflags" in
7936 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7938 CPPFLAGS=`echo "$CPPFLAGS" | \
7939 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7940 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7945 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7946 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7953 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7954 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7961 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7962 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7964 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7966 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7967 && test -z "${cf_tst_cflags}" \
7968 && cf_fix_cppflags=no
7973 if test -n "$cf_new_cflags" ; then
7975 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7976 CFLAGS="${CFLAGS}$cf_new_cflags"
7980 if test -n "$cf_new_cppflags" ; then
7982 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7983 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7987 if test -n "$cf_new_extra_cppflags" ; then
7989 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7990 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7997 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7999 for cf_add_1lib in $cf_add_0lib; do
8000 for cf_add_2lib in $cf_add_libs; do
8001 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8006 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8010 cat >"conftest.$ac_ext" <<_ACEOF
8011 #line 8011 "configure"
8012 #include "confdefs.h"
8013 #include <${cf_cv_ncurses_header:-curses.h}>
8017 initscr(); mousemask(0,0); tigetstr((char *)0);
8022 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8023 if { (eval echo "$as_me:8023: \"$ac_link\"") >&5
8024 (eval $ac_link) 2>&5
8026 echo "$as_me:8026: \$? = $ac_status" >&5
8027 (exit "$ac_status"); } &&
8028 { ac_try='test -s "conftest$ac_exeext"'
8029 { (eval echo "$as_me:8029: \"$ac_try\"") >&5
8032 echo "$as_me:8032: \$? = $ac_status" >&5
8033 (exit "$ac_status"); }; }; then
8034 if test "$cross_compiling" = yes; then
8035 cf_test_ncuconfig=maybe
8037 cat >"conftest.$ac_ext" <<_ACEOF
8038 #line 8038 "configure"
8039 #include "confdefs.h"
8040 #include <${cf_cv_ncurses_header:-curses.h}>
8042 { char *xx = curses_version(); return (xx == 0); }
8044 rm -f "conftest$ac_exeext"
8045 if { (eval echo "$as_me:8045: \"$ac_link\"") >&5
8046 (eval $ac_link) 2>&5
8048 echo "$as_me:8048: \$? = $ac_status" >&5
8049 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8050 { (eval echo "$as_me:8050: \"$ac_try\"") >&5
8053 echo "$as_me:8053: \$? = $ac_status" >&5
8054 (exit "$ac_status"); }; }; then
8055 cf_test_ncuconfig=yes
8057 echo "$as_me: program exited with status $ac_status" >&5
8058 echo "$as_me: failed program was:" >&5
8059 cat "conftest.$ac_ext" >&5
8060 cf_test_ncuconfig=no
8062 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8065 echo "$as_me: failed program was:" >&5
8066 cat "conftest.$ac_ext" >&5
8067 cf_test_ncuconfig=no
8069 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8071 CFLAGS="$cf_save_CFLAGS"
8072 CPPFLAGS="$cf_save_CPPFLAGS"
8073 LIBS="$cf_save_LIBS"
8075 if test "x$cf_test_ncuconfig" != xyes; then
8076 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
8077 cf_pkg_cflags="$cf_temp"
8078 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
8079 cf_pkg_libs="$cf_temp"
8087 cf_new_extra_cppflags=
8089 for cf_add_cflags in $cf_pkg_cflags
8091 case "$cf_fix_cppflags" in
8093 case "$cf_add_cflags" in
8094 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8095 case "$cf_add_cflags" in
8097 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8099 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8100 && test -z "${cf_tst_cflags}" \
8101 && cf_fix_cppflags=yes
8103 if test "$cf_fix_cppflags" = yes ; then
8105 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8106 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8109 elif test "${cf_tst_cflags}" = "\"'" ; then
8111 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8112 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8122 case "$cf_add_cflags" in
8124 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8126 CPPFLAGS=`echo "$CPPFLAGS" | \
8127 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8128 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8133 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8134 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8141 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8142 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8149 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8150 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8152 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8154 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8155 && test -z "${cf_tst_cflags}" \
8156 && cf_fix_cppflags=no
8161 if test -n "$cf_new_cflags" ; then
8163 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8164 CFLAGS="${CFLAGS}$cf_new_cflags"
8168 if test -n "$cf_new_cppflags" ; then
8170 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8171 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8175 if test -n "$cf_new_extra_cppflags" ; then
8177 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8178 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8185 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8187 for cf_add_1lib in $cf_add_0lib; do
8188 for cf_add_2lib in $cf_add_libs; do
8189 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8194 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8198 cat >"conftest.$ac_ext" <<_ACEOF
8199 #line 8199 "configure"
8200 #include "confdefs.h"
8201 #include <${cf_cv_ncurses_header:-curses.h}>
8205 initscr(); mousemask(0,0); tigetstr((char *)0);
8210 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8211 if { (eval echo "$as_me:8211: \"$ac_link\"") >&5
8212 (eval $ac_link) 2>&5
8214 echo "$as_me:8214: \$? = $ac_status" >&5
8215 (exit "$ac_status"); } &&
8216 { ac_try='test -s "conftest$ac_exeext"'
8217 { (eval echo "$as_me:8217: \"$ac_try\"") >&5
8220 echo "$as_me:8220: \$? = $ac_status" >&5
8221 (exit "$ac_status"); }; }; then
8222 if test "$cross_compiling" = yes; then
8223 cf_have_ncuconfig=maybe
8225 cat >"conftest.$ac_ext" <<_ACEOF
8226 #line 8226 "configure"
8227 #include "confdefs.h"
8228 #include <${cf_cv_ncurses_header:-curses.h}>
8230 { char *xx = curses_version(); return (xx == 0); }
8232 rm -f "conftest$ac_exeext"
8233 if { (eval echo "$as_me:8233: \"$ac_link\"") >&5
8234 (eval $ac_link) 2>&5
8236 echo "$as_me:8236: \$? = $ac_status" >&5
8237 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8238 { (eval echo "$as_me:8238: \"$ac_try\"") >&5
8241 echo "$as_me:8241: \$? = $ac_status" >&5
8242 (exit "$ac_status"); }; }; then
8243 cf_have_ncuconfig=yes
8245 echo "$as_me: program exited with status $ac_status" >&5
8246 echo "$as_me: failed program was:" >&5
8247 cat "conftest.$ac_ext" >&5
8248 cf_have_ncuconfig=no
8250 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8253 echo "$as_me: failed program was:" >&5
8254 cat "conftest.$ac_ext" >&5
8255 cf_have_ncuconfig=no
8257 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8258 echo "$as_me:8258: result: $cf_have_ncuconfig" >&5
8259 echo "${ECHO_T}$cf_have_ncuconfig" >&6
8260 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
8261 if test "$cf_have_ncuconfig" != "yes"
8263 CPPFLAGS="$cf_save_CPPFLAGS"
8264 LIBS="$cf_save_LIBS"
8265 NCURSES_CONFIG_PKG=none
8268 cat >>confdefs.h <<\EOF
8272 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
8274 echo "$as_me:8274: checking for terminfo header" >&5
8275 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8276 if test "${cf_cv_term_header+set}" = set; then
8277 echo $ECHO_N "(cached) $ECHO_C" >&6
8280 case "${cf_cv_ncurses_header}" in
8281 (*/ncurses.h|*/ncursesw.h)
8282 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8285 cf_term_header=term.h
8289 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8291 cat >"conftest.$ac_ext" <<_ACEOF
8292 #line 8292 "configure"
8293 #include "confdefs.h"
8295 #include <${cf_cv_ncurses_header:-curses.h}>
8301 int x = auto_left_margin; (void)x
8306 rm -f "conftest.$ac_objext"
8307 if { (eval echo "$as_me:8307: \"$ac_compile\"") >&5
8308 (eval $ac_compile) 2>&5
8310 echo "$as_me:8310: \$? = $ac_status" >&5
8311 (exit "$ac_status"); } &&
8312 { ac_try='test -s "conftest.$ac_objext"'
8313 { (eval echo "$as_me:8313: \"$ac_try\"") >&5
8316 echo "$as_me:8316: \$? = $ac_status" >&5
8317 (exit "$ac_status"); }; }; then
8319 cf_cv_term_header="$cf_test"
8321 echo "$as_me: failed program was:" >&5
8322 cat "conftest.$ac_ext" >&5
8324 cf_cv_term_header=unknown
8327 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8328 test "$cf_cv_term_header" != unknown && break
8332 echo "$as_me:8332: result: $cf_cv_term_header" >&5
8333 echo "${ECHO_T}$cf_cv_term_header" >&6
8335 # Set definitions to allow ifdef'ing to accommodate subdirectories
8337 case "$cf_cv_term_header" in
8340 cat >>confdefs.h <<\EOF
8341 #define HAVE_TERM_H 1
8347 case "$cf_cv_term_header" in
8350 cat >>confdefs.h <<\EOF
8351 #define HAVE_NCURSES_TERM_H 1
8357 cat >>confdefs.h <<\EOF
8358 #define HAVE_NCURSESW_TERM_H 1
8367 echo "$as_me:8367: result: no" >&5
8368 echo "${ECHO_T}no" >&6
8369 NCURSES_CONFIG_PKG=none
8372 NCURSES_CONFIG_PKG=none
8375 if test "x$cf_have_ncuconfig" = "xno"; then
8376 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
8378 if test -n "$ac_tool_prefix"; then
8379 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8381 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8382 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8383 echo "$as_me:8383: checking for $ac_word" >&5
8384 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8385 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8386 echo $ECHO_N "(cached) $ECHO_C" >&6
8388 if test -n "$NCURSES_CONFIG"; then
8389 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8391 ac_save_IFS=$IFS; IFS=$ac_path_separator
8393 for ac_dir in $ac_dummy; do
8395 test -z "$ac_dir" && ac_dir=.
8396 $as_executable_p "$ac_dir/$ac_word" || continue
8397 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8398 echo "$as_me:8398: found $ac_dir/$ac_word" >&5
8404 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8405 if test -n "$NCURSES_CONFIG"; then
8406 echo "$as_me:8406: result: $NCURSES_CONFIG" >&5
8407 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8409 echo "$as_me:8409: result: no" >&5
8410 echo "${ECHO_T}no" >&6
8413 test -n "$NCURSES_CONFIG" && break
8416 if test -z "$NCURSES_CONFIG"; then
8417 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8418 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8420 # Extract the first word of "$ac_prog", so it can be a program name with args.
8421 set dummy $ac_prog; ac_word=$2
8422 echo "$as_me:8422: checking for $ac_word" >&5
8423 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8424 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8425 echo $ECHO_N "(cached) $ECHO_C" >&6
8427 if test -n "$ac_ct_NCURSES_CONFIG"; then
8428 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8430 ac_save_IFS=$IFS; IFS=$ac_path_separator
8432 for ac_dir in $ac_dummy; do
8434 test -z "$ac_dir" && ac_dir=.
8435 $as_executable_p "$ac_dir/$ac_word" || continue
8436 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8437 echo "$as_me:8437: found $ac_dir/$ac_word" >&5
8443 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8444 if test -n "$ac_ct_NCURSES_CONFIG"; then
8445 echo "$as_me:8445: result: $ac_ct_NCURSES_CONFIG" >&5
8446 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8448 echo "$as_me:8448: result: no" >&5
8449 echo "${ECHO_T}no" >&6
8452 test -n "$ac_ct_NCURSES_CONFIG" && break
8454 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8456 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8459 if test "$NCURSES_CONFIG" != none ; then
8464 cf_new_extra_cppflags=
8466 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
8468 case "$cf_fix_cppflags" in
8470 case "$cf_add_cflags" in
8471 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8472 case "$cf_add_cflags" in
8474 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8476 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8477 && test -z "${cf_tst_cflags}" \
8478 && cf_fix_cppflags=yes
8480 if test "$cf_fix_cppflags" = yes ; then
8482 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8483 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8486 elif test "${cf_tst_cflags}" = "\"'" ; then
8488 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8489 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8499 case "$cf_add_cflags" in
8501 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8503 CPPFLAGS=`echo "$CPPFLAGS" | \
8504 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8505 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8510 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8511 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8518 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8519 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8526 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8527 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8529 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8531 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8532 && test -z "${cf_tst_cflags}" \
8533 && cf_fix_cppflags=no
8538 if test -n "$cf_new_cflags" ; then
8540 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8541 CFLAGS="${CFLAGS}$cf_new_cflags"
8545 if test -n "$cf_new_cppflags" ; then
8547 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8548 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8552 if test -n "$cf_new_extra_cppflags" ; then
8554 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8555 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8562 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8564 for cf_add_1lib in $cf_add_0lib; do
8565 for cf_add_2lib in $cf_add_libs; do
8566 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8571 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8575 # even with config script, some packages use no-override for curses.h
8577 echo "$as_me:8577: checking if we have identified curses headers" >&5
8578 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8579 if test "${cf_cv_ncurses_header+set}" = set; then
8580 echo $ECHO_N "(cached) $ECHO_C" >&6
8583 cf_cv_ncurses_header=none
8585 ncurses.h $cf_cv_screen/ncurses.h \
8586 curses.h $cf_cv_screen/curses.h
8588 cat >"conftest.$ac_ext" <<_ACEOF
8589 #line 8589 "configure"
8590 #include "confdefs.h"
8591 #include <${cf_header}>
8595 initscr(); tgoto("?", 0,0)
8600 rm -f "conftest.$ac_objext"
8601 if { (eval echo "$as_me:8601: \"$ac_compile\"") >&5
8602 (eval $ac_compile) 2>&5
8604 echo "$as_me:8604: \$? = $ac_status" >&5
8605 (exit "$ac_status"); } &&
8606 { ac_try='test -s "conftest.$ac_objext"'
8607 { (eval echo "$as_me:8607: \"$ac_try\"") >&5
8610 echo "$as_me:8610: \$? = $ac_status" >&5
8611 (exit "$ac_status"); }; }; then
8612 cf_cv_ncurses_header=$cf_header; break
8614 echo "$as_me: failed program was:" >&5
8615 cat "conftest.$ac_ext" >&5
8617 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8621 echo "$as_me:8621: result: $cf_cv_ncurses_header" >&5
8622 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8624 if test "$cf_cv_ncurses_header" = none ; then
8625 { { echo "$as_me:8625: error: No curses header-files found" >&5
8626 echo "$as_me: error: No curses header-files found" >&2;}
8627 { (exit 1); exit 1; }; }
8630 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8632 for ac_header in $cf_cv_ncurses_header
8634 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8635 echo "$as_me:8635: checking for $ac_header" >&5
8636 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8637 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8638 echo $ECHO_N "(cached) $ECHO_C" >&6
8640 cat >"conftest.$ac_ext" <<_ACEOF
8641 #line 8641 "configure"
8642 #include "confdefs.h"
8643 #include <$ac_header>
8645 if { (eval echo "$as_me:8645: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8646 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8648 $EGREP -v '^ *\+' conftest.er1 >conftest.err
8650 cat conftest.err >&5
8651 echo "$as_me:8651: \$? = $ac_status" >&5
8652 (exit "$ac_status"); } >/dev/null; then
8653 if test -s conftest.err; then
8654 ac_cpp_err=$ac_c_preproc_warn_flag
8661 if test -z "$ac_cpp_err"; then
8662 eval "$as_ac_Header=yes"
8664 echo "$as_me: failed program was:" >&5
8665 cat "conftest.$ac_ext" >&5
8666 eval "$as_ac_Header=no"
8668 rm -f conftest.err "conftest.$ac_ext"
8670 echo "$as_me:8670: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8671 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8672 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8673 cat >>confdefs.h <<EOF
8674 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8680 cat >>confdefs.h <<\EOF
8684 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8686 cat >>confdefs.h <<EOF
8687 #define $cf_nculib_ROOT 1
8690 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
8694 cf_ncuhdr_root=$cf_cv_screen
8696 test -n "$cf_cv_curses_dir" && \
8697 test "$cf_cv_curses_dir" != "no" && { \
8699 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8700 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8702 while test "$cf_add_incdir" != /usr/include
8704 if test -d "$cf_add_incdir"
8707 if test -n "$CFLAGS$CPPFLAGS" ; then
8708 # a loop is needed to ensure we can add subdirs of existing dirs
8709 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8710 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8711 cf_have_incdir=yes; break
8716 if test "$cf_have_incdir" = no ; then
8717 if test "$cf_add_incdir" = /usr/local/include ; then
8718 if test "$GCC" = yes
8720 cf_save_CPPFLAGS=$CPPFLAGS
8722 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8723 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8725 cat >"conftest.$ac_ext" <<_ACEOF
8726 #line 8726 "configure"
8727 #include "confdefs.h"
8737 rm -f "conftest.$ac_objext"
8738 if { (eval echo "$as_me:8738: \"$ac_compile\"") >&5
8739 (eval $ac_compile) 2>&5
8741 echo "$as_me:8741: \$? = $ac_status" >&5
8742 (exit "$ac_status"); } &&
8743 { ac_try='test -s "conftest.$ac_objext"'
8744 { (eval echo "$as_me:8744: \"$ac_try\"") >&5
8747 echo "$as_me:8747: \$? = $ac_status" >&5
8748 (exit "$ac_status"); }; }; then
8751 echo "$as_me: failed program was:" >&5
8752 cat "conftest.$ac_ext" >&5
8755 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8756 CPPFLAGS=$cf_save_CPPFLAGS
8761 if test "$cf_have_incdir" = no ; then
8762 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8764 echo "${as_me:-configure}:8764: testing adding $cf_add_incdir to include-path ..." 1>&5
8766 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8768 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8769 test "$cf_top_incdir" = "$cf_add_incdir" && break
8770 cf_add_incdir="$cf_top_incdir"
8783 echo "$as_me:8783: checking for $cf_ncuhdr_root header in include-path" >&5
8784 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8785 if test "${cf_cv_ncurses_h+set}" = set; then
8786 echo $ECHO_N "(cached) $ECHO_C" >&6
8789 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8790 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
8791 for cf_header in $cf_header_list
8794 cat >"conftest.$ac_ext" <<_ACEOF
8795 #line 8795 "configure"
8796 #include "confdefs.h"
8798 #include <$cf_header>
8803 #ifdef NCURSES_VERSION
8805 printf("%s\\n", NCURSES_VERSION);
8818 rm -f "conftest.$ac_objext"
8819 if { (eval echo "$as_me:8819: \"$ac_compile\"") >&5
8820 (eval $ac_compile) 2>&5
8822 echo "$as_me:8822: \$? = $ac_status" >&5
8823 (exit "$ac_status"); } &&
8824 { ac_try='test -s "conftest.$ac_objext"'
8825 { (eval echo "$as_me:8825: \"$ac_try\"") >&5
8828 echo "$as_me:8828: \$? = $ac_status" >&5
8829 (exit "$ac_status"); }; }; then
8830 cf_cv_ncurses_h=$cf_header
8833 echo "$as_me: failed program was:" >&5
8834 cat "conftest.$ac_ext" >&5
8837 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8839 test "$cf_cv_ncurses_h" != no && break
8843 echo "$as_me:8843: result: $cf_cv_ncurses_h" >&5
8844 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8846 if test "$cf_cv_ncurses_h" != no ; then
8847 cf_cv_ncurses_header=$cf_cv_ncurses_h
8850 echo "$as_me:8850: checking for $cf_ncuhdr_root include-path" >&5
8851 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8852 if test "${cf_cv_ncurses_h2+set}" = set; then
8853 echo $ECHO_N "(cached) $ECHO_C" >&6
8856 test -n "$verbose" && echo
8860 # collect the current set of include-directories from compiler flags
8861 cf_header_path_list=""
8862 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8863 for cf_header_path in $CPPFLAGS $CFLAGS
8865 case "$cf_header_path" in
8867 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8869 test "x$cf_header_path" != "xNONE" && \
8870 test -d "$cf_header_path" && \
8872 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8873 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8874 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8875 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8876 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8877 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"
8880 cf_header_path_list="$cf_header_path_list $cf_search"
8886 # add the variations for the package we are looking for
8890 test "x$prefix" != "xNONE" && \
8891 test -d "$prefix" && \
8893 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8894 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8895 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8896 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8897 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8898 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8901 for cf_subdir_prefix in \
8910 test "x$cf_subdir_prefix" != "x$prefix" && \
8911 test -d "$cf_subdir_prefix" && \
8912 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8913 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8914 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8915 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8916 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8917 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8918 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"
8923 test "$includedir" != NONE && \
8924 test "$includedir" != "/usr/include" && \
8925 test -d "$includedir" && {
8926 test -d "$includedir" && cf_search="$cf_search $includedir"
8927 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8930 test "$oldincludedir" != NONE && \
8931 test "$oldincludedir" != "/usr/include" && \
8932 test -d "$oldincludedir" && {
8933 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8934 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8937 cf_search="$cf_search $cf_header_path_list"
8939 test -n "$verbose" && echo "search path $cf_search"
8940 cf_save2_CPPFLAGS="$CPPFLAGS"
8941 for cf_incdir in $cf_search
8944 if test -n "$cf_incdir" ; then
8945 for cf_add_incdir in $cf_incdir
8947 while test "$cf_add_incdir" != /usr/include
8949 if test -d "$cf_add_incdir"
8952 if test -n "$CFLAGS$CPPFLAGS" ; then
8953 # a loop is needed to ensure we can add subdirs of existing dirs
8954 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8955 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8956 cf_have_incdir=yes; break
8961 if test "$cf_have_incdir" = no ; then
8962 if test "$cf_add_incdir" = /usr/local/include ; then
8963 if test "$GCC" = yes
8965 cf_save_CPPFLAGS=$CPPFLAGS
8967 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8968 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8970 cat >"conftest.$ac_ext" <<_ACEOF
8971 #line 8971 "configure"
8972 #include "confdefs.h"
8982 rm -f "conftest.$ac_objext"
8983 if { (eval echo "$as_me:8983: \"$ac_compile\"") >&5
8984 (eval $ac_compile) 2>&5
8986 echo "$as_me:8986: \$? = $ac_status" >&5
8987 (exit "$ac_status"); } &&
8988 { ac_try='test -s "conftest.$ac_objext"'
8989 { (eval echo "$as_me:8989: \"$ac_try\"") >&5
8992 echo "$as_me:8992: \$? = $ac_status" >&5
8993 (exit "$ac_status"); }; }; then
8996 echo "$as_me: failed program was:" >&5
8997 cat "conftest.$ac_ext" >&5
9000 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9001 CPPFLAGS=$cf_save_CPPFLAGS
9006 if test "$cf_have_incdir" = no ; then
9007 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9009 echo "${as_me:-configure}:9009: testing adding $cf_add_incdir to include-path ..." 1>&5
9011 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9013 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9014 test "$cf_top_incdir" = "$cf_add_incdir" && break
9015 cf_add_incdir="$cf_top_incdir"
9031 cat >"conftest.$ac_ext" <<_ACEOF
9032 #line 9032 "configure"
9033 #include "confdefs.h"
9035 #include <$cf_header>
9040 #ifdef NCURSES_VERSION
9042 printf("%s\\n", NCURSES_VERSION);
9055 rm -f "conftest.$ac_objext"
9056 if { (eval echo "$as_me:9056: \"$ac_compile\"") >&5
9057 (eval $ac_compile) 2>&5
9059 echo "$as_me:9059: \$? = $ac_status" >&5
9060 (exit "$ac_status"); } &&
9061 { ac_try='test -s "conftest.$ac_objext"'
9062 { (eval echo "$as_me:9062: \"$ac_try\"") >&5
9065 echo "$as_me:9065: \$? = $ac_status" >&5
9066 (exit "$ac_status"); }; }; then
9067 cf_cv_ncurses_h2=$cf_header
9070 echo "$as_me: failed program was:" >&5
9071 cat "conftest.$ac_ext" >&5
9074 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9076 if test "$cf_cv_ncurses_h2" != no ; then
9077 cf_cv_ncurses_h2=$cf_incdir/$cf_header
9078 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
9081 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
9083 CPPFLAGS="$cf_save2_CPPFLAGS"
9084 test "$cf_cv_ncurses_h2" != no && break
9086 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9086: error: not found" >&5
9087 echo "$as_me: error: not found" >&2;}
9088 { (exit 1); exit 1; }; }
9091 echo "$as_me:9091: result: $cf_cv_ncurses_h2" >&5
9092 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
9094 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
9095 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
9096 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
9097 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
9100 if test -n "$cf_1st_incdir" ; then
9101 for cf_add_incdir in $cf_1st_incdir
9103 while test "$cf_add_incdir" != /usr/include
9105 if test -d "$cf_add_incdir"
9108 if test -n "$CFLAGS$CPPFLAGS" ; then
9109 # a loop is needed to ensure we can add subdirs of existing dirs
9110 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9111 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9112 cf_have_incdir=yes; break
9117 if test "$cf_have_incdir" = no ; then
9118 if test "$cf_add_incdir" = /usr/local/include ; then
9119 if test "$GCC" = yes
9121 cf_save_CPPFLAGS=$CPPFLAGS
9123 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9124 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9126 cat >"conftest.$ac_ext" <<_ACEOF
9127 #line 9127 "configure"
9128 #include "confdefs.h"
9138 rm -f "conftest.$ac_objext"
9139 if { (eval echo "$as_me:9139: \"$ac_compile\"") >&5
9140 (eval $ac_compile) 2>&5
9142 echo "$as_me:9142: \$? = $ac_status" >&5
9143 (exit "$ac_status"); } &&
9144 { ac_try='test -s "conftest.$ac_objext"'
9145 { (eval echo "$as_me:9145: \"$ac_try\"") >&5
9148 echo "$as_me:9148: \$? = $ac_status" >&5
9149 (exit "$ac_status"); }; }; then
9152 echo "$as_me: failed program was:" >&5
9153 cat "conftest.$ac_ext" >&5
9156 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9157 CPPFLAGS=$cf_save_CPPFLAGS
9162 if test "$cf_have_incdir" = no ; then
9163 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9165 echo "${as_me:-configure}:9165: testing adding $cf_add_incdir to include-path ..." 1>&5
9167 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9169 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9170 test "$cf_top_incdir" = "$cf_add_incdir" && break
9171 cf_add_incdir="$cf_top_incdir"
9184 # Set definitions to allow ifdef'ing for ncurses.h
9186 case "$cf_cv_ncurses_header" in
9189 cat >>confdefs.h <<\EOF
9190 #define HAVE_NCURSES_H 1
9196 case "$cf_cv_ncurses_header" in
9197 (ncurses/curses.h|ncurses/ncurses.h)
9199 cat >>confdefs.h <<\EOF
9200 #define HAVE_NCURSES_NCURSES_H 1
9204 (ncursesw/curses.h|ncursesw/ncurses.h)
9206 cat >>confdefs.h <<\EOF
9207 #define HAVE_NCURSESW_NCURSES_H 1
9213 echo "$as_me:9213: checking for terminfo header" >&5
9214 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9215 if test "${cf_cv_term_header+set}" = set; then
9216 echo $ECHO_N "(cached) $ECHO_C" >&6
9219 case "${cf_cv_ncurses_header}" in
9220 (*/ncurses.h|*/ncursesw.h)
9221 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9224 cf_term_header=term.h
9228 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9230 cat >"conftest.$ac_ext" <<_ACEOF
9231 #line 9231 "configure"
9232 #include "confdefs.h"
9234 #include <${cf_cv_ncurses_header:-curses.h}>
9240 int x = auto_left_margin; (void)x
9245 rm -f "conftest.$ac_objext"
9246 if { (eval echo "$as_me:9246: \"$ac_compile\"") >&5
9247 (eval $ac_compile) 2>&5
9249 echo "$as_me:9249: \$? = $ac_status" >&5
9250 (exit "$ac_status"); } &&
9251 { ac_try='test -s "conftest.$ac_objext"'
9252 { (eval echo "$as_me:9252: \"$ac_try\"") >&5
9255 echo "$as_me:9255: \$? = $ac_status" >&5
9256 (exit "$ac_status"); }; }; then
9258 cf_cv_term_header="$cf_test"
9260 echo "$as_me: failed program was:" >&5
9261 cat "conftest.$ac_ext" >&5
9263 cf_cv_term_header=unknown
9266 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9267 test "$cf_cv_term_header" != unknown && break
9271 echo "$as_me:9271: result: $cf_cv_term_header" >&5
9272 echo "${ECHO_T}$cf_cv_term_header" >&6
9274 # Set definitions to allow ifdef'ing to accommodate subdirectories
9276 case "$cf_cv_term_header" in
9279 cat >>confdefs.h <<\EOF
9280 #define HAVE_TERM_H 1
9286 case "$cf_cv_term_header" in
9289 cat >>confdefs.h <<\EOF
9290 #define HAVE_NCURSES_TERM_H 1
9296 cat >>confdefs.h <<\EOF
9297 #define HAVE_NCURSESW_TERM_H 1
9303 # some applications need this, but should check for NCURSES_VERSION
9305 cat >>confdefs.h <<\EOF
9309 echo "$as_me:9309: checking for ncurses version" >&5
9310 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9311 if test "${cf_cv_ncurses_version+set}" = set; then
9312 echo $ECHO_N "(cached) $ECHO_C" >&6
9315 cf_cv_ncurses_version=no
9317 rm -f "$cf_tempfile"
9318 if test "$cross_compiling" = yes; then
9320 # This will not work if the preprocessor splits the line after the
9321 # Autoconf token. The 'unproto' program does that.
9322 cat > "conftest.$ac_ext" <<EOF
9323 #include <${cf_cv_ncurses_header:-curses.h}>
9325 #ifdef NCURSES_VERSION
9326 Autoconf NCURSES_VERSION
9334 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9335 { (eval echo "$as_me:9335: \"$cf_try\"") >&5
9338 echo "$as_me:9338: \$? = $ac_status" >&5
9339 (exit "$ac_status"); }
9340 if test -f conftest.out ; then
9341 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
9342 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9347 cat >"conftest.$ac_ext" <<_ACEOF
9348 #line 9348 "configure"
9349 #include "confdefs.h"
9351 #include <${cf_cv_ncurses_header:-curses.h}>
9355 FILE *fp = fopen("$cf_tempfile", "w");
9356 #ifdef NCURSES_VERSION
9357 # ifdef NCURSES_VERSION_PATCH
9358 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9360 fprintf(fp, "%s\\n", NCURSES_VERSION);
9364 fprintf(fp, "old\\n");
9369 ${cf_cv_main_return:-return}(0);
9372 rm -f "conftest$ac_exeext"
9373 if { (eval echo "$as_me:9373: \"$ac_link\"") >&5
9374 (eval $ac_link) 2>&5
9376 echo "$as_me:9376: \$? = $ac_status" >&5
9377 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9378 { (eval echo "$as_me:9378: \"$ac_try\"") >&5
9381 echo "$as_me:9381: \$? = $ac_status" >&5
9382 (exit "$ac_status"); }; }; then
9384 cf_cv_ncurses_version=`cat $cf_tempfile`
9386 echo "$as_me: program exited with status $ac_status" >&5
9387 echo "$as_me: failed program was:" >&5
9388 cat "conftest.$ac_ext" >&5
9390 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9392 rm -f "$cf_tempfile"
9395 echo "$as_me:9395: result: $cf_cv_ncurses_version" >&5
9396 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9397 test "$cf_cv_ncurses_version" = no ||
9398 cat >>confdefs.h <<\EOF
9402 cf_nculib_root=$cf_cv_screen
9403 # This works, except for the special case where we find gpm, but
9404 # ncurses is in a nonstandard location via $LIBS, and we really want
9407 cf_ncurses_SAVE="$LIBS"
9408 echo "$as_me:9408: checking for Gpm_Open in -lgpm" >&5
9409 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9410 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9411 echo $ECHO_N "(cached) $ECHO_C" >&6
9413 ac_check_lib_save_LIBS=$LIBS
9415 cat >"conftest.$ac_ext" <<_ACEOF
9416 #line 9416 "configure"
9417 #include "confdefs.h"
9419 /* Override any gcc2 internal prototype to avoid an error. */
9423 /* We use char because int might match the return type of a gcc2
9424 builtin and then its argument prototype would still apply. */
9434 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9435 if { (eval echo "$as_me:9435: \"$ac_link\"") >&5
9436 (eval $ac_link) 2>&5
9438 echo "$as_me:9438: \$? = $ac_status" >&5
9439 (exit "$ac_status"); } &&
9440 { ac_try='test -s "conftest$ac_exeext"'
9441 { (eval echo "$as_me:9441: \"$ac_try\"") >&5
9444 echo "$as_me:9444: \$? = $ac_status" >&5
9445 (exit "$ac_status"); }; }; then
9446 ac_cv_lib_gpm_Gpm_Open=yes
9448 echo "$as_me: failed program was:" >&5
9449 cat "conftest.$ac_ext" >&5
9450 ac_cv_lib_gpm_Gpm_Open=no
9452 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9453 LIBS=$ac_check_lib_save_LIBS
9455 echo "$as_me:9455: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9456 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9457 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
9458 echo "$as_me:9458: checking for initscr in -lgpm" >&5
9459 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9460 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9461 echo $ECHO_N "(cached) $ECHO_C" >&6
9463 ac_check_lib_save_LIBS=$LIBS
9465 cat >"conftest.$ac_ext" <<_ACEOF
9466 #line 9466 "configure"
9467 #include "confdefs.h"
9469 /* Override any gcc2 internal prototype to avoid an error. */
9473 /* We use char because int might match the return type of a gcc2
9474 builtin and then its argument prototype would still apply. */
9484 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9485 if { (eval echo "$as_me:9485: \"$ac_link\"") >&5
9486 (eval $ac_link) 2>&5
9488 echo "$as_me:9488: \$? = $ac_status" >&5
9489 (exit "$ac_status"); } &&
9490 { ac_try='test -s "conftest$ac_exeext"'
9491 { (eval echo "$as_me:9491: \"$ac_try\"") >&5
9494 echo "$as_me:9494: \$? = $ac_status" >&5
9495 (exit "$ac_status"); }; }; then
9496 ac_cv_lib_gpm_initscr=yes
9498 echo "$as_me: failed program was:" >&5
9499 cat "conftest.$ac_ext" >&5
9500 ac_cv_lib_gpm_initscr=no
9502 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9503 LIBS=$ac_check_lib_save_LIBS
9505 echo "$as_me:9505: result: $ac_cv_lib_gpm_initscr" >&5
9506 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9507 if test "$ac_cv_lib_gpm_initscr" = yes; then
9508 LIBS="$cf_ncurses_SAVE"
9510 cf_ncurses_LIBS="-lgpm"
9517 # This is only necessary if you are linking against an obsolete
9518 # version of ncurses (but it should do no harm, since it's static).
9519 if test "$cf_nculib_root" = ncurses ; then
9520 echo "$as_me:9520: checking for tgoto in -lmytinfo" >&5
9521 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9522 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9523 echo $ECHO_N "(cached) $ECHO_C" >&6
9525 ac_check_lib_save_LIBS=$LIBS
9526 LIBS="-lmytinfo $LIBS"
9527 cat >"conftest.$ac_ext" <<_ACEOF
9528 #line 9528 "configure"
9529 #include "confdefs.h"
9531 /* Override any gcc2 internal prototype to avoid an error. */
9535 /* We use char because int might match the return type of a gcc2
9536 builtin and then its argument prototype would still apply. */
9546 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9547 if { (eval echo "$as_me:9547: \"$ac_link\"") >&5
9548 (eval $ac_link) 2>&5
9550 echo "$as_me:9550: \$? = $ac_status" >&5
9551 (exit "$ac_status"); } &&
9552 { ac_try='test -s "conftest$ac_exeext"'
9553 { (eval echo "$as_me:9553: \"$ac_try\"") >&5
9556 echo "$as_me:9556: \$? = $ac_status" >&5
9557 (exit "$ac_status"); }; }; then
9558 ac_cv_lib_mytinfo_tgoto=yes
9560 echo "$as_me: failed program was:" >&5
9561 cat "conftest.$ac_ext" >&5
9562 ac_cv_lib_mytinfo_tgoto=no
9564 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9565 LIBS=$ac_check_lib_save_LIBS
9567 echo "$as_me:9567: result: $ac_cv_lib_mytinfo_tgoto" >&5
9568 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9569 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
9570 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9580 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9582 for cf_add_1lib in $cf_add_0lib; do
9583 for cf_add_2lib in $cf_add_libs; do
9584 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9589 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9593 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
9599 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9601 for cf_add_1lib in $cf_add_0lib; do
9602 for cf_add_2lib in $cf_add_libs; do
9603 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9608 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9614 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
9616 echo "$as_me:9616: checking for initscr" >&5
9617 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9618 if test "${ac_cv_func_initscr+set}" = set; then
9619 echo $ECHO_N "(cached) $ECHO_C" >&6
9621 cat >"conftest.$ac_ext" <<_ACEOF
9622 #line 9622 "configure"
9623 #include "confdefs.h"
9624 #define initscr autoconf_temporary
9625 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9632 /* We use char because int might match the return type of a gcc2
9633 builtin and then its argument prototype would still apply. */
9634 char initscr (void);
9640 /* The GNU C library defines stubs for functions which it implements
9641 to always fail with ENOSYS. Some functions are actually named
9642 something starting with __ and the normal name is an alias. */
9643 #if defined (__stub_initscr) || defined (__stub___initscr)
9644 #error found stub for initscr
9652 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9653 if { (eval echo "$as_me:9653: \"$ac_link\"") >&5
9654 (eval $ac_link) 2>&5
9656 echo "$as_me:9656: \$? = $ac_status" >&5
9657 (exit "$ac_status"); } &&
9658 { ac_try='test -s "conftest$ac_exeext"'
9659 { (eval echo "$as_me:9659: \"$ac_try\"") >&5
9662 echo "$as_me:9662: \$? = $ac_status" >&5
9663 (exit "$ac_status"); }; }; then
9664 ac_cv_func_initscr=yes
9666 echo "$as_me: failed program was:" >&5
9667 cat "conftest.$ac_ext" >&5
9668 ac_cv_func_initscr=no
9670 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9672 echo "$as_me:9672: result: $ac_cv_func_initscr" >&5
9673 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9674 if test "$ac_cv_func_initscr" = yes; then
9675 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9678 cf_save_LIBS="$LIBS"
9679 echo "$as_me:9679: checking for initscr in -l$cf_nculib_root" >&5
9680 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9681 LIBS="-l$cf_nculib_root $LIBS"
9682 cat >"conftest.$ac_ext" <<_ACEOF
9683 #line 9683 "configure"
9684 #include "confdefs.h"
9685 #include <${cf_cv_ncurses_header:-curses.h}>
9694 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9695 if { (eval echo "$as_me:9695: \"$ac_link\"") >&5
9696 (eval $ac_link) 2>&5
9698 echo "$as_me:9698: \$? = $ac_status" >&5
9699 (exit "$ac_status"); } &&
9700 { ac_try='test -s "conftest$ac_exeext"'
9701 { (eval echo "$as_me:9701: \"$ac_try\"") >&5
9704 echo "$as_me:9704: \$? = $ac_status" >&5
9705 (exit "$ac_status"); }; }; then
9706 echo "$as_me:9706: result: yes" >&5
9707 echo "${ECHO_T}yes" >&6
9708 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9711 echo "$as_me: failed program was:" >&5
9712 cat "conftest.$ac_ext" >&5
9713 echo "$as_me:9713: result: no" >&5
9714 echo "${ECHO_T}no" >&6
9717 cf_library_path_list=""
9718 if test -n "${LDFLAGS}${LIBS}" ; then
9719 for cf_library_path in $LDFLAGS $LIBS
9721 case "$cf_library_path" in
9723 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9725 test "x$cf_library_path" != "xNONE" && \
9726 test -d "$cf_library_path" && \
9728 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9729 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
9730 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9731 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9732 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9733 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"
9736 cf_library_path_list="$cf_library_path_list $cf_search"
9744 test "x$prefix" != "xNONE" && \
9745 test -d "$prefix" && \
9747 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9748 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
9749 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9750 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9751 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9752 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9755 for cf_subdir_prefix in \
9764 test "x$cf_subdir_prefix" != "x$prefix" && \
9765 test -d "$cf_subdir_prefix" && \
9766 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9767 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9768 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
9769 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9770 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9771 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9772 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"
9777 cf_search="$cf_library_path_list $cf_search"
9779 for cf_libdir in $cf_search
9781 echo "$as_me:9781: checking for -l$cf_nculib_root in $cf_libdir" >&5
9782 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9783 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9784 cat >"conftest.$ac_ext" <<_ACEOF
9785 #line 9785 "configure"
9786 #include "confdefs.h"
9787 #include <${cf_cv_ncurses_header:-curses.h}>
9796 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9797 if { (eval echo "$as_me:9797: \"$ac_link\"") >&5
9798 (eval $ac_link) 2>&5
9800 echo "$as_me:9800: \$? = $ac_status" >&5
9801 (exit "$ac_status"); } &&
9802 { ac_try='test -s "conftest$ac_exeext"'
9803 { (eval echo "$as_me:9803: \"$ac_try\"") >&5
9806 echo "$as_me:9806: \$? = $ac_status" >&5
9807 (exit "$ac_status"); }; }; then
9808 echo "$as_me:9808: result: yes" >&5
9809 echo "${ECHO_T}yes" >&6
9810 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9813 echo "$as_me: failed program was:" >&5
9814 cat "conftest.$ac_ext" >&5
9815 echo "$as_me:9815: result: no" >&5
9816 echo "${ECHO_T}no" >&6
9817 LIBS="$cf_save_LIBS"
9819 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9823 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9827 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
9829 if test "$cf_found_library" = no ; then
9830 { { echo "$as_me:9830: error: Cannot link $cf_nculib_root library" >&5
9831 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9832 { (exit 1); exit 1; }; }
9837 if test -n "$cf_ncurses_LIBS" ; then
9838 echo "$as_me:9838: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9839 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9840 cf_ncurses_SAVE="$LIBS"
9841 for p in $cf_ncurses_LIBS ; do
9842 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
9843 if test "$q" != "$LIBS" ; then
9847 cat >"conftest.$ac_ext" <<_ACEOF
9848 #line 9848 "configure"
9849 #include "confdefs.h"
9850 #include <${cf_cv_ncurses_header:-curses.h}>
9854 initscr(); mousemask(0,0); tigetstr((char *)0);
9859 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9860 if { (eval echo "$as_me:9860: \"$ac_link\"") >&5
9861 (eval $ac_link) 2>&5
9863 echo "$as_me:9863: \$? = $ac_status" >&5
9864 (exit "$ac_status"); } &&
9865 { ac_try='test -s "conftest$ac_exeext"'
9866 { (eval echo "$as_me:9866: \"$ac_try\"") >&5
9869 echo "$as_me:9869: \$? = $ac_status" >&5
9870 (exit "$ac_status"); }; }; then
9871 echo "$as_me:9871: result: yes" >&5
9872 echo "${ECHO_T}yes" >&6
9874 echo "$as_me: failed program was:" >&5
9875 cat "conftest.$ac_ext" >&5
9876 echo "$as_me:9876: result: no" >&5
9877 echo "${ECHO_T}no" >&6
9878 LIBS="$cf_ncurses_SAVE"
9880 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9883 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9885 cat >>confdefs.h <<EOF
9886 #define $cf_nculib_ROOT 1
9897 cf_ncuconfig_root=$cf_cv_screen
9898 cf_have_ncuconfig=no
9900 if test "x${PKG_CONFIG:=none}" != xnone; then
9901 echo "$as_me:9901: checking pkg-config for $cf_ncuconfig_root" >&5
9902 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9903 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9904 echo "$as_me:9904: result: yes" >&5
9905 echo "${ECHO_T}yes" >&6
9907 echo "$as_me:9907: checking if the $cf_ncuconfig_root package files work" >&5
9908 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9909 cf_have_ncuconfig=unknown
9911 cf_save_CFLAGS="$CFLAGS"
9912 cf_save_CPPFLAGS="$CPPFLAGS"
9913 cf_save_LIBS="$LIBS"
9915 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
9916 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9918 # while -W for passing linker flags is prevalent, it is not "standard".
9919 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9920 # incompatible _and_ non-standard -W option which gives an error. Work
9921 # around that pitfall.
9922 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9928 cf_new_extra_cppflags=
9930 for cf_add_cflags in $cf_pkg_cflags
9932 case "$cf_fix_cppflags" in
9934 case "$cf_add_cflags" in
9935 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9936 case "$cf_add_cflags" in
9938 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9940 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9941 && test -z "${cf_tst_cflags}" \
9942 && cf_fix_cppflags=yes
9944 if test "$cf_fix_cppflags" = yes ; then
9946 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9947 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9950 elif test "${cf_tst_cflags}" = "\"'" ; then
9952 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9953 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9963 case "$cf_add_cflags" in
9965 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9967 CPPFLAGS=`echo "$CPPFLAGS" | \
9968 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9969 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9974 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9975 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9982 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9983 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9990 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9991 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9993 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9995 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9996 && test -z "${cf_tst_cflags}" \
9997 && cf_fix_cppflags=no
10002 if test -n "$cf_new_cflags" ; then
10004 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10005 CFLAGS="${CFLAGS}$cf_new_cflags"
10009 if test -n "$cf_new_cppflags" ; then
10011 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10012 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10016 if test -n "$cf_new_extra_cppflags" ; then
10018 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10019 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10023 cf_add_libs="$LIBS"
10026 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10027 # filter duplicates
10028 for cf_add_1lib in $cf_add_0lib; do
10029 for cf_add_2lib in $cf_add_libs; do
10030 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10035 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10037 LIBS="$cf_add_libs"
10039 cat >"conftest.$ac_ext" <<_ACEOF
10040 #line 10040 "configure"
10041 #include "confdefs.h"
10042 #include <${cf_cv_ncurses_header:-curses.h}>
10046 initscr(); mousemask(0,0); tigetstr((char *)0);
10051 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10052 if { (eval echo "$as_me:10052: \"$ac_link\"") >&5
10053 (eval $ac_link) 2>&5
10055 echo "$as_me:10055: \$? = $ac_status" >&5
10056 (exit "$ac_status"); } &&
10057 { ac_try='test -s "conftest$ac_exeext"'
10058 { (eval echo "$as_me:10058: \"$ac_try\"") >&5
10059 (eval $ac_try) 2>&5
10061 echo "$as_me:10061: \$? = $ac_status" >&5
10062 (exit "$ac_status"); }; }; then
10063 if test "$cross_compiling" = yes; then
10064 cf_test_ncuconfig=maybe
10066 cat >"conftest.$ac_ext" <<_ACEOF
10067 #line 10067 "configure"
10068 #include "confdefs.h"
10069 #include <${cf_cv_ncurses_header:-curses.h}>
10071 { char *xx = curses_version(); return (xx == 0); }
10073 rm -f "conftest$ac_exeext"
10074 if { (eval echo "$as_me:10074: \"$ac_link\"") >&5
10075 (eval $ac_link) 2>&5
10077 echo "$as_me:10077: \$? = $ac_status" >&5
10078 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10079 { (eval echo "$as_me:10079: \"$ac_try\"") >&5
10080 (eval $ac_try) 2>&5
10082 echo "$as_me:10082: \$? = $ac_status" >&5
10083 (exit "$ac_status"); }; }; then
10084 cf_test_ncuconfig=yes
10086 echo "$as_me: program exited with status $ac_status" >&5
10087 echo "$as_me: failed program was:" >&5
10088 cat "conftest.$ac_ext" >&5
10089 cf_test_ncuconfig=no
10091 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10094 echo "$as_me: failed program was:" >&5
10095 cat "conftest.$ac_ext" >&5
10096 cf_test_ncuconfig=no
10098 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10100 CFLAGS="$cf_save_CFLAGS"
10101 CPPFLAGS="$cf_save_CPPFLAGS"
10102 LIBS="$cf_save_LIBS"
10104 if test "x$cf_test_ncuconfig" != xyes; then
10105 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
10106 cf_pkg_cflags="$cf_temp"
10107 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
10108 cf_pkg_libs="$cf_temp"
10116 cf_new_extra_cppflags=
10118 for cf_add_cflags in $cf_pkg_cflags
10120 case "$cf_fix_cppflags" in
10122 case "$cf_add_cflags" in
10123 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10124 case "$cf_add_cflags" in
10126 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10128 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10129 && test -z "${cf_tst_cflags}" \
10130 && cf_fix_cppflags=yes
10132 if test "$cf_fix_cppflags" = yes ; then
10134 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10135 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10138 elif test "${cf_tst_cflags}" = "\"'" ; then
10140 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10141 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10147 case "$CPPFLAGS" in
10151 case "$cf_add_cflags" in
10153 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10155 CPPFLAGS=`echo "$CPPFLAGS" | \
10156 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10157 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10162 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10163 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10170 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10171 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10178 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10179 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10181 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10183 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10184 && test -z "${cf_tst_cflags}" \
10185 && cf_fix_cppflags=no
10190 if test -n "$cf_new_cflags" ; then
10192 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10193 CFLAGS="${CFLAGS}$cf_new_cflags"
10197 if test -n "$cf_new_cppflags" ; then
10199 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10200 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10204 if test -n "$cf_new_extra_cppflags" ; then
10206 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10207 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10211 cf_add_libs="$LIBS"
10214 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10215 # filter duplicates
10216 for cf_add_1lib in $cf_add_0lib; do
10217 for cf_add_2lib in $cf_add_libs; do
10218 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10223 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10225 LIBS="$cf_add_libs"
10227 cat >"conftest.$ac_ext" <<_ACEOF
10228 #line 10228 "configure"
10229 #include "confdefs.h"
10230 #include <${cf_cv_ncurses_header:-curses.h}>
10234 initscr(); mousemask(0,0); tigetstr((char *)0);
10239 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10240 if { (eval echo "$as_me:10240: \"$ac_link\"") >&5
10241 (eval $ac_link) 2>&5
10243 echo "$as_me:10243: \$? = $ac_status" >&5
10244 (exit "$ac_status"); } &&
10245 { ac_try='test -s "conftest$ac_exeext"'
10246 { (eval echo "$as_me:10246: \"$ac_try\"") >&5
10247 (eval $ac_try) 2>&5
10249 echo "$as_me:10249: \$? = $ac_status" >&5
10250 (exit "$ac_status"); }; }; then
10251 if test "$cross_compiling" = yes; then
10252 cf_have_ncuconfig=maybe
10254 cat >"conftest.$ac_ext" <<_ACEOF
10255 #line 10255 "configure"
10256 #include "confdefs.h"
10257 #include <${cf_cv_ncurses_header:-curses.h}>
10259 { char *xx = curses_version(); return (xx == 0); }
10261 rm -f "conftest$ac_exeext"
10262 if { (eval echo "$as_me:10262: \"$ac_link\"") >&5
10263 (eval $ac_link) 2>&5
10265 echo "$as_me:10265: \$? = $ac_status" >&5
10266 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10267 { (eval echo "$as_me:10267: \"$ac_try\"") >&5
10268 (eval $ac_try) 2>&5
10270 echo "$as_me:10270: \$? = $ac_status" >&5
10271 (exit "$ac_status"); }; }; then
10272 cf_have_ncuconfig=yes
10274 echo "$as_me: program exited with status $ac_status" >&5
10275 echo "$as_me: failed program was:" >&5
10276 cat "conftest.$ac_ext" >&5
10277 cf_have_ncuconfig=no
10279 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10282 echo "$as_me: failed program was:" >&5
10283 cat "conftest.$ac_ext" >&5
10284 cf_have_ncuconfig=no
10286 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10287 echo "$as_me:10287: result: $cf_have_ncuconfig" >&5
10288 echo "${ECHO_T}$cf_have_ncuconfig" >&6
10289 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
10290 if test "$cf_have_ncuconfig" != "yes"
10292 CPPFLAGS="$cf_save_CPPFLAGS"
10293 LIBS="$cf_save_LIBS"
10294 NCURSES_CONFIG_PKG=none
10297 cat >>confdefs.h <<\EOF
10301 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
10303 echo "$as_me:10303: checking for terminfo header" >&5
10304 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10305 if test "${cf_cv_term_header+set}" = set; then
10306 echo $ECHO_N "(cached) $ECHO_C" >&6
10309 case "${cf_cv_ncurses_header}" in
10310 (*/ncurses.h|*/ncursesw.h)
10311 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10314 cf_term_header=term.h
10318 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10320 cat >"conftest.$ac_ext" <<_ACEOF
10321 #line 10321 "configure"
10322 #include "confdefs.h"
10324 #include <${cf_cv_ncurses_header:-curses.h}>
10325 #include <$cf_test>
10330 int x = auto_left_margin; (void)x
10335 rm -f "conftest.$ac_objext"
10336 if { (eval echo "$as_me:10336: \"$ac_compile\"") >&5
10337 (eval $ac_compile) 2>&5
10339 echo "$as_me:10339: \$? = $ac_status" >&5
10340 (exit "$ac_status"); } &&
10341 { ac_try='test -s "conftest.$ac_objext"'
10342 { (eval echo "$as_me:10342: \"$ac_try\"") >&5
10343 (eval $ac_try) 2>&5
10345 echo "$as_me:10345: \$? = $ac_status" >&5
10346 (exit "$ac_status"); }; }; then
10348 cf_cv_term_header="$cf_test"
10350 echo "$as_me: failed program was:" >&5
10351 cat "conftest.$ac_ext" >&5
10353 cf_cv_term_header=unknown
10356 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10357 test "$cf_cv_term_header" != unknown && break
10361 echo "$as_me:10361: result: $cf_cv_term_header" >&5
10362 echo "${ECHO_T}$cf_cv_term_header" >&6
10364 # Set definitions to allow ifdef'ing to accommodate subdirectories
10366 case "$cf_cv_term_header" in
10369 cat >>confdefs.h <<\EOF
10370 #define HAVE_TERM_H 1
10376 case "$cf_cv_term_header" in
10379 cat >>confdefs.h <<\EOF
10380 #define HAVE_NCURSES_TERM_H 1
10386 cat >>confdefs.h <<\EOF
10387 #define HAVE_NCURSESW_TERM_H 1
10396 echo "$as_me:10396: result: no" >&5
10397 echo "${ECHO_T}no" >&6
10398 NCURSES_CONFIG_PKG=none
10401 NCURSES_CONFIG_PKG=none
10404 if test "x$cf_have_ncuconfig" = "xno"; then
10405 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
10407 if test -n "$ac_tool_prefix"; then
10408 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10410 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
10411 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
10412 echo "$as_me:10412: checking for $ac_word" >&5
10413 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10414 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
10415 echo $ECHO_N "(cached) $ECHO_C" >&6
10417 if test -n "$NCURSES_CONFIG"; then
10418 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
10420 ac_save_IFS=$IFS; IFS=$ac_path_separator
10422 for ac_dir in $ac_dummy; do
10424 test -z "$ac_dir" && ac_dir=.
10425 $as_executable_p "$ac_dir/$ac_word" || continue
10426 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
10427 echo "$as_me:10427: found $ac_dir/$ac_word" >&5
10433 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
10434 if test -n "$NCURSES_CONFIG"; then
10435 echo "$as_me:10435: result: $NCURSES_CONFIG" >&5
10436 echo "${ECHO_T}$NCURSES_CONFIG" >&6
10438 echo "$as_me:10438: result: no" >&5
10439 echo "${ECHO_T}no" >&6
10442 test -n "$NCURSES_CONFIG" && break
10445 if test -z "$NCURSES_CONFIG"; then
10446 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
10447 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10449 # Extract the first word of "$ac_prog", so it can be a program name with args.
10450 set dummy $ac_prog; ac_word=$2
10451 echo "$as_me:10451: checking for $ac_word" >&5
10452 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10453 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
10454 echo $ECHO_N "(cached) $ECHO_C" >&6
10456 if test -n "$ac_ct_NCURSES_CONFIG"; then
10457 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
10459 ac_save_IFS=$IFS; IFS=$ac_path_separator
10461 for ac_dir in $ac_dummy; do
10463 test -z "$ac_dir" && ac_dir=.
10464 $as_executable_p "$ac_dir/$ac_word" || continue
10465 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
10466 echo "$as_me:10466: found $ac_dir/$ac_word" >&5
10472 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
10473 if test -n "$ac_ct_NCURSES_CONFIG"; then
10474 echo "$as_me:10474: result: $ac_ct_NCURSES_CONFIG" >&5
10475 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
10477 echo "$as_me:10477: result: no" >&5
10478 echo "${ECHO_T}no" >&6
10481 test -n "$ac_ct_NCURSES_CONFIG" && break
10483 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
10485 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
10488 if test "$NCURSES_CONFIG" != none ; then
10493 cf_new_extra_cppflags=
10495 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
10497 case "$cf_fix_cppflags" in
10499 case "$cf_add_cflags" in
10500 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10501 case "$cf_add_cflags" in
10503 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10505 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10506 && test -z "${cf_tst_cflags}" \
10507 && cf_fix_cppflags=yes
10509 if test "$cf_fix_cppflags" = yes ; then
10511 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10512 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10515 elif test "${cf_tst_cflags}" = "\"'" ; then
10517 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10518 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10524 case "$CPPFLAGS" in
10528 case "$cf_add_cflags" in
10530 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10532 CPPFLAGS=`echo "$CPPFLAGS" | \
10533 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10534 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10539 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10540 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10547 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10548 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10555 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10556 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10558 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10560 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10561 && test -z "${cf_tst_cflags}" \
10562 && cf_fix_cppflags=no
10567 if test -n "$cf_new_cflags" ; then
10569 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10570 CFLAGS="${CFLAGS}$cf_new_cflags"
10574 if test -n "$cf_new_cppflags" ; then
10576 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10577 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10581 if test -n "$cf_new_extra_cppflags" ; then
10583 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10584 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10588 cf_add_libs="$LIBS"
10591 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10592 # filter duplicates
10593 for cf_add_1lib in $cf_add_0lib; do
10594 for cf_add_2lib in $cf_add_libs; do
10595 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10600 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10602 LIBS="$cf_add_libs"
10604 # even with config script, some packages use no-override for curses.h
10606 echo "$as_me:10606: checking if we have identified curses headers" >&5
10607 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10608 if test "${cf_cv_ncurses_header+set}" = set; then
10609 echo $ECHO_N "(cached) $ECHO_C" >&6
10612 cf_cv_ncurses_header=none
10614 ncurses.h $cf_cv_screen/ncurses.h \
10615 curses.h $cf_cv_screen/curses.h
10617 cat >"conftest.$ac_ext" <<_ACEOF
10618 #line 10618 "configure"
10619 #include "confdefs.h"
10620 #include <${cf_header}>
10624 initscr(); tgoto("?", 0,0)
10629 rm -f "conftest.$ac_objext"
10630 if { (eval echo "$as_me:10630: \"$ac_compile\"") >&5
10631 (eval $ac_compile) 2>&5
10633 echo "$as_me:10633: \$? = $ac_status" >&5
10634 (exit "$ac_status"); } &&
10635 { ac_try='test -s "conftest.$ac_objext"'
10636 { (eval echo "$as_me:10636: \"$ac_try\"") >&5
10637 (eval $ac_try) 2>&5
10639 echo "$as_me:10639: \$? = $ac_status" >&5
10640 (exit "$ac_status"); }; }; then
10641 cf_cv_ncurses_header=$cf_header; break
10643 echo "$as_me: failed program was:" >&5
10644 cat "conftest.$ac_ext" >&5
10646 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10650 echo "$as_me:10650: result: $cf_cv_ncurses_header" >&5
10651 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10653 if test "$cf_cv_ncurses_header" = none ; then
10654 { { echo "$as_me:10654: error: No curses header-files found" >&5
10655 echo "$as_me: error: No curses header-files found" >&2;}
10656 { (exit 1); exit 1; }; }
10659 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10661 for ac_header in $cf_cv_ncurses_header
10663 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10664 echo "$as_me:10664: checking for $ac_header" >&5
10665 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10666 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10667 echo $ECHO_N "(cached) $ECHO_C" >&6
10669 cat >"conftest.$ac_ext" <<_ACEOF
10670 #line 10670 "configure"
10671 #include "confdefs.h"
10672 #include <$ac_header>
10674 if { (eval echo "$as_me:10674: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10675 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10677 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10679 cat conftest.err >&5
10680 echo "$as_me:10680: \$? = $ac_status" >&5
10681 (exit "$ac_status"); } >/dev/null; then
10682 if test -s conftest.err; then
10683 ac_cpp_err=$ac_c_preproc_warn_flag
10690 if test -z "$ac_cpp_err"; then
10691 eval "$as_ac_Header=yes"
10693 echo "$as_me: failed program was:" >&5
10694 cat "conftest.$ac_ext" >&5
10695 eval "$as_ac_Header=no"
10697 rm -f conftest.err "conftest.$ac_ext"
10699 echo "$as_me:10699: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10700 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10701 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10702 cat >>confdefs.h <<EOF
10703 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10709 cat >>confdefs.h <<\EOF
10713 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10715 cat >>confdefs.h <<EOF
10716 #define $cf_nculib_ROOT 1
10719 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
10723 cf_ncuhdr_root=$cf_cv_screen
10725 test -n "$cf_cv_curses_dir" && \
10726 test "$cf_cv_curses_dir" != "no" && { \
10728 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
10729 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
10731 while test "$cf_add_incdir" != /usr/include
10733 if test -d "$cf_add_incdir"
10736 if test -n "$CFLAGS$CPPFLAGS" ; then
10737 # a loop is needed to ensure we can add subdirs of existing dirs
10738 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10739 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10740 cf_have_incdir=yes; break
10745 if test "$cf_have_incdir" = no ; then
10746 if test "$cf_add_incdir" = /usr/local/include ; then
10747 if test "$GCC" = yes
10749 cf_save_CPPFLAGS=$CPPFLAGS
10751 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10752 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10754 cat >"conftest.$ac_ext" <<_ACEOF
10755 #line 10755 "configure"
10756 #include "confdefs.h"
10766 rm -f "conftest.$ac_objext"
10767 if { (eval echo "$as_me:10767: \"$ac_compile\"") >&5
10768 (eval $ac_compile) 2>&5
10770 echo "$as_me:10770: \$? = $ac_status" >&5
10771 (exit "$ac_status"); } &&
10772 { ac_try='test -s "conftest.$ac_objext"'
10773 { (eval echo "$as_me:10773: \"$ac_try\"") >&5
10774 (eval $ac_try) 2>&5
10776 echo "$as_me:10776: \$? = $ac_status" >&5
10777 (exit "$ac_status"); }; }; then
10780 echo "$as_me: failed program was:" >&5
10781 cat "conftest.$ac_ext" >&5
10784 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10785 CPPFLAGS=$cf_save_CPPFLAGS
10790 if test "$cf_have_incdir" = no ; then
10791 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10793 echo "${as_me:-configure}:10793: testing adding $cf_add_incdir to include-path ..." 1>&5
10795 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10797 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10798 test "$cf_top_incdir" = "$cf_add_incdir" && break
10799 cf_add_incdir="$cf_top_incdir"
10812 echo "$as_me:10812: checking for $cf_ncuhdr_root header in include-path" >&5
10813 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10814 if test "${cf_cv_ncurses_h+set}" = set; then
10815 echo $ECHO_N "(cached) $ECHO_C" >&6
10818 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10819 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
10820 for cf_header in $cf_header_list
10823 cat >"conftest.$ac_ext" <<_ACEOF
10824 #line 10824 "configure"
10825 #include "confdefs.h"
10827 #include <$cf_header>
10832 #ifdef NCURSES_VERSION
10834 printf("%s\\n", NCURSES_VERSION);
10847 rm -f "conftest.$ac_objext"
10848 if { (eval echo "$as_me:10848: \"$ac_compile\"") >&5
10849 (eval $ac_compile) 2>&5
10851 echo "$as_me:10851: \$? = $ac_status" >&5
10852 (exit "$ac_status"); } &&
10853 { ac_try='test -s "conftest.$ac_objext"'
10854 { (eval echo "$as_me:10854: \"$ac_try\"") >&5
10855 (eval $ac_try) 2>&5
10857 echo "$as_me:10857: \$? = $ac_status" >&5
10858 (exit "$ac_status"); }; }; then
10859 cf_cv_ncurses_h=$cf_header
10862 echo "$as_me: failed program was:" >&5
10863 cat "conftest.$ac_ext" >&5
10866 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10868 test "$cf_cv_ncurses_h" != no && break
10872 echo "$as_me:10872: result: $cf_cv_ncurses_h" >&5
10873 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10875 if test "$cf_cv_ncurses_h" != no ; then
10876 cf_cv_ncurses_header=$cf_cv_ncurses_h
10879 echo "$as_me:10879: checking for $cf_ncuhdr_root include-path" >&5
10880 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10881 if test "${cf_cv_ncurses_h2+set}" = set; then
10882 echo $ECHO_N "(cached) $ECHO_C" >&6
10885 test -n "$verbose" && echo
10889 # collect the current set of include-directories from compiler flags
10890 cf_header_path_list=""
10891 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10892 for cf_header_path in $CPPFLAGS $CFLAGS
10894 case "$cf_header_path" in
10896 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10898 test "x$cf_header_path" != "xNONE" && \
10899 test -d "$cf_header_path" && \
10901 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10902 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
10903 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10904 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10905 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10906 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"
10909 cf_header_path_list="$cf_header_path_list $cf_search"
10915 # add the variations for the package we are looking for
10919 test "x$prefix" != "xNONE" && \
10920 test -d "$prefix" && \
10922 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10923 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
10924 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10925 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10926 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10927 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10930 for cf_subdir_prefix in \
10939 test "x$cf_subdir_prefix" != "x$prefix" && \
10940 test -d "$cf_subdir_prefix" && \
10941 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10942 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10943 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
10944 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10945 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10946 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10947 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"
10952 test "$includedir" != NONE && \
10953 test "$includedir" != "/usr/include" && \
10954 test -d "$includedir" && {
10955 test -d "$includedir" && cf_search="$cf_search $includedir"
10956 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10959 test "$oldincludedir" != NONE && \
10960 test "$oldincludedir" != "/usr/include" && \
10961 test -d "$oldincludedir" && {
10962 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
10963 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10966 cf_search="$cf_search $cf_header_path_list"
10968 test -n "$verbose" && echo "search path $cf_search"
10969 cf_save2_CPPFLAGS="$CPPFLAGS"
10970 for cf_incdir in $cf_search
10973 if test -n "$cf_incdir" ; then
10974 for cf_add_incdir in $cf_incdir
10976 while test "$cf_add_incdir" != /usr/include
10978 if test -d "$cf_add_incdir"
10981 if test -n "$CFLAGS$CPPFLAGS" ; then
10982 # a loop is needed to ensure we can add subdirs of existing dirs
10983 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10984 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10985 cf_have_incdir=yes; break
10990 if test "$cf_have_incdir" = no ; then
10991 if test "$cf_add_incdir" = /usr/local/include ; then
10992 if test "$GCC" = yes
10994 cf_save_CPPFLAGS=$CPPFLAGS
10996 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10997 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10999 cat >"conftest.$ac_ext" <<_ACEOF
11000 #line 11000 "configure"
11001 #include "confdefs.h"
11011 rm -f "conftest.$ac_objext"
11012 if { (eval echo "$as_me:11012: \"$ac_compile\"") >&5
11013 (eval $ac_compile) 2>&5
11015 echo "$as_me:11015: \$? = $ac_status" >&5
11016 (exit "$ac_status"); } &&
11017 { ac_try='test -s "conftest.$ac_objext"'
11018 { (eval echo "$as_me:11018: \"$ac_try\"") >&5
11019 (eval $ac_try) 2>&5
11021 echo "$as_me:11021: \$? = $ac_status" >&5
11022 (exit "$ac_status"); }; }; then
11025 echo "$as_me: failed program was:" >&5
11026 cat "conftest.$ac_ext" >&5
11029 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11030 CPPFLAGS=$cf_save_CPPFLAGS
11035 if test "$cf_have_incdir" = no ; then
11036 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11038 echo "${as_me:-configure}:11038: testing adding $cf_add_incdir to include-path ..." 1>&5
11040 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11042 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11043 test "$cf_top_incdir" = "$cf_add_incdir" && break
11044 cf_add_incdir="$cf_top_incdir"
11060 cat >"conftest.$ac_ext" <<_ACEOF
11061 #line 11061 "configure"
11062 #include "confdefs.h"
11064 #include <$cf_header>
11069 #ifdef NCURSES_VERSION
11071 printf("%s\\n", NCURSES_VERSION);
11084 rm -f "conftest.$ac_objext"
11085 if { (eval echo "$as_me:11085: \"$ac_compile\"") >&5
11086 (eval $ac_compile) 2>&5
11088 echo "$as_me:11088: \$? = $ac_status" >&5
11089 (exit "$ac_status"); } &&
11090 { ac_try='test -s "conftest.$ac_objext"'
11091 { (eval echo "$as_me:11091: \"$ac_try\"") >&5
11092 (eval $ac_try) 2>&5
11094 echo "$as_me:11094: \$? = $ac_status" >&5
11095 (exit "$ac_status"); }; }; then
11096 cf_cv_ncurses_h2=$cf_header
11099 echo "$as_me: failed program was:" >&5
11100 cat "conftest.$ac_ext" >&5
11101 cf_cv_ncurses_h2=no
11103 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11105 if test "$cf_cv_ncurses_h2" != no ; then
11106 cf_cv_ncurses_h2=$cf_incdir/$cf_header
11107 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
11110 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
11112 CPPFLAGS="$cf_save2_CPPFLAGS"
11113 test "$cf_cv_ncurses_h2" != no && break
11115 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:11115: error: not found" >&5
11116 echo "$as_me: error: not found" >&2;}
11117 { (exit 1); exit 1; }; }
11120 echo "$as_me:11120: result: $cf_cv_ncurses_h2" >&5
11121 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
11123 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
11124 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
11125 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
11126 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
11129 if test -n "$cf_1st_incdir" ; then
11130 for cf_add_incdir in $cf_1st_incdir
11132 while test "$cf_add_incdir" != /usr/include
11134 if test -d "$cf_add_incdir"
11137 if test -n "$CFLAGS$CPPFLAGS" ; then
11138 # a loop is needed to ensure we can add subdirs of existing dirs
11139 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11140 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11141 cf_have_incdir=yes; break
11146 if test "$cf_have_incdir" = no ; then
11147 if test "$cf_add_incdir" = /usr/local/include ; then
11148 if test "$GCC" = yes
11150 cf_save_CPPFLAGS=$CPPFLAGS
11152 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11153 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11155 cat >"conftest.$ac_ext" <<_ACEOF
11156 #line 11156 "configure"
11157 #include "confdefs.h"
11167 rm -f "conftest.$ac_objext"
11168 if { (eval echo "$as_me:11168: \"$ac_compile\"") >&5
11169 (eval $ac_compile) 2>&5
11171 echo "$as_me:11171: \$? = $ac_status" >&5
11172 (exit "$ac_status"); } &&
11173 { ac_try='test -s "conftest.$ac_objext"'
11174 { (eval echo "$as_me:11174: \"$ac_try\"") >&5
11175 (eval $ac_try) 2>&5
11177 echo "$as_me:11177: \$? = $ac_status" >&5
11178 (exit "$ac_status"); }; }; then
11181 echo "$as_me: failed program was:" >&5
11182 cat "conftest.$ac_ext" >&5
11185 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11186 CPPFLAGS=$cf_save_CPPFLAGS
11191 if test "$cf_have_incdir" = no ; then
11192 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11194 echo "${as_me:-configure}:11194: testing adding $cf_add_incdir to include-path ..." 1>&5
11196 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11198 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11199 test "$cf_top_incdir" = "$cf_add_incdir" && break
11200 cf_add_incdir="$cf_top_incdir"
11213 # Set definitions to allow ifdef'ing for ncurses.h
11215 case "$cf_cv_ncurses_header" in
11218 cat >>confdefs.h <<\EOF
11219 #define HAVE_NCURSES_H 1
11225 case "$cf_cv_ncurses_header" in
11226 (ncurses/curses.h|ncurses/ncurses.h)
11228 cat >>confdefs.h <<\EOF
11229 #define HAVE_NCURSES_NCURSES_H 1
11233 (ncursesw/curses.h|ncursesw/ncurses.h)
11235 cat >>confdefs.h <<\EOF
11236 #define HAVE_NCURSESW_NCURSES_H 1
11242 echo "$as_me:11242: checking for terminfo header" >&5
11243 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
11244 if test "${cf_cv_term_header+set}" = set; then
11245 echo $ECHO_N "(cached) $ECHO_C" >&6
11248 case "${cf_cv_ncurses_header}" in
11249 (*/ncurses.h|*/ncursesw.h)
11250 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
11253 cf_term_header=term.h
11257 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
11259 cat >"conftest.$ac_ext" <<_ACEOF
11260 #line 11260 "configure"
11261 #include "confdefs.h"
11263 #include <${cf_cv_ncurses_header:-curses.h}>
11264 #include <$cf_test>
11269 int x = auto_left_margin; (void)x
11274 rm -f "conftest.$ac_objext"
11275 if { (eval echo "$as_me:11275: \"$ac_compile\"") >&5
11276 (eval $ac_compile) 2>&5
11278 echo "$as_me:11278: \$? = $ac_status" >&5
11279 (exit "$ac_status"); } &&
11280 { ac_try='test -s "conftest.$ac_objext"'
11281 { (eval echo "$as_me:11281: \"$ac_try\"") >&5
11282 (eval $ac_try) 2>&5
11284 echo "$as_me:11284: \$? = $ac_status" >&5
11285 (exit "$ac_status"); }; }; then
11287 cf_cv_term_header="$cf_test"
11289 echo "$as_me: failed program was:" >&5
11290 cat "conftest.$ac_ext" >&5
11292 cf_cv_term_header=unknown
11295 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11296 test "$cf_cv_term_header" != unknown && break
11300 echo "$as_me:11300: result: $cf_cv_term_header" >&5
11301 echo "${ECHO_T}$cf_cv_term_header" >&6
11303 # Set definitions to allow ifdef'ing to accommodate subdirectories
11305 case "$cf_cv_term_header" in
11308 cat >>confdefs.h <<\EOF
11309 #define HAVE_TERM_H 1
11315 case "$cf_cv_term_header" in
11318 cat >>confdefs.h <<\EOF
11319 #define HAVE_NCURSES_TERM_H 1
11325 cat >>confdefs.h <<\EOF
11326 #define HAVE_NCURSESW_TERM_H 1
11332 # some applications need this, but should check for NCURSES_VERSION
11334 cat >>confdefs.h <<\EOF
11338 echo "$as_me:11338: checking for ncurses version" >&5
11339 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
11340 if test "${cf_cv_ncurses_version+set}" = set; then
11341 echo $ECHO_N "(cached) $ECHO_C" >&6
11344 cf_cv_ncurses_version=no
11346 rm -f "$cf_tempfile"
11347 if test "$cross_compiling" = yes; then
11349 # This will not work if the preprocessor splits the line after the
11350 # Autoconf token. The 'unproto' program does that.
11351 cat > "conftest.$ac_ext" <<EOF
11352 #include <${cf_cv_ncurses_header:-curses.h}>
11354 #ifdef NCURSES_VERSION
11355 Autoconf NCURSES_VERSION
11363 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
11364 { (eval echo "$as_me:11364: \"$cf_try\"") >&5
11365 (eval $cf_try) 2>&5
11367 echo "$as_me:11367: \$? = $ac_status" >&5
11368 (exit "$ac_status"); }
11369 if test -f conftest.out ; then
11370 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
11371 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
11376 cat >"conftest.$ac_ext" <<_ACEOF
11377 #line 11377 "configure"
11378 #include "confdefs.h"
11380 #include <${cf_cv_ncurses_header:-curses.h}>
11384 FILE *fp = fopen("$cf_tempfile", "w");
11385 #ifdef NCURSES_VERSION
11386 # ifdef NCURSES_VERSION_PATCH
11387 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
11389 fprintf(fp, "%s\\n", NCURSES_VERSION);
11392 # ifdef __NCURSES_H
11393 fprintf(fp, "old\\n");
11398 ${cf_cv_main_return:-return}(0);
11401 rm -f "conftest$ac_exeext"
11402 if { (eval echo "$as_me:11402: \"$ac_link\"") >&5
11403 (eval $ac_link) 2>&5
11405 echo "$as_me:11405: \$? = $ac_status" >&5
11406 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
11407 { (eval echo "$as_me:11407: \"$ac_try\"") >&5
11408 (eval $ac_try) 2>&5
11410 echo "$as_me:11410: \$? = $ac_status" >&5
11411 (exit "$ac_status"); }; }; then
11413 cf_cv_ncurses_version=`cat $cf_tempfile`
11415 echo "$as_me: program exited with status $ac_status" >&5
11416 echo "$as_me: failed program was:" >&5
11417 cat "conftest.$ac_ext" >&5
11419 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
11421 rm -f "$cf_tempfile"
11424 echo "$as_me:11424: result: $cf_cv_ncurses_version" >&5
11425 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
11426 test "$cf_cv_ncurses_version" = no ||
11427 cat >>confdefs.h <<\EOF
11431 cf_nculib_root=$cf_cv_screen
11432 # This works, except for the special case where we find gpm, but
11433 # ncurses is in a nonstandard location via $LIBS, and we really want
11436 cf_ncurses_SAVE="$LIBS"
11437 echo "$as_me:11437: checking for Gpm_Open in -lgpm" >&5
11438 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
11439 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
11440 echo $ECHO_N "(cached) $ECHO_C" >&6
11442 ac_check_lib_save_LIBS=$LIBS
11444 cat >"conftest.$ac_ext" <<_ACEOF
11445 #line 11445 "configure"
11446 #include "confdefs.h"
11448 /* Override any gcc2 internal prototype to avoid an error. */
11452 /* We use char because int might match the return type of a gcc2
11453 builtin and then its argument prototype would still apply. */
11463 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11464 if { (eval echo "$as_me:11464: \"$ac_link\"") >&5
11465 (eval $ac_link) 2>&5
11467 echo "$as_me:11467: \$? = $ac_status" >&5
11468 (exit "$ac_status"); } &&
11469 { ac_try='test -s "conftest$ac_exeext"'
11470 { (eval echo "$as_me:11470: \"$ac_try\"") >&5
11471 (eval $ac_try) 2>&5
11473 echo "$as_me:11473: \$? = $ac_status" >&5
11474 (exit "$ac_status"); }; }; then
11475 ac_cv_lib_gpm_Gpm_Open=yes
11477 echo "$as_me: failed program was:" >&5
11478 cat "conftest.$ac_ext" >&5
11479 ac_cv_lib_gpm_Gpm_Open=no
11481 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11482 LIBS=$ac_check_lib_save_LIBS
11484 echo "$as_me:11484: result: $ac_cv_lib_gpm_Gpm_Open" >&5
11485 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
11486 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
11487 echo "$as_me:11487: checking for initscr in -lgpm" >&5
11488 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
11489 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
11490 echo $ECHO_N "(cached) $ECHO_C" >&6
11492 ac_check_lib_save_LIBS=$LIBS
11494 cat >"conftest.$ac_ext" <<_ACEOF
11495 #line 11495 "configure"
11496 #include "confdefs.h"
11498 /* Override any gcc2 internal prototype to avoid an error. */
11502 /* We use char because int might match the return type of a gcc2
11503 builtin and then its argument prototype would still apply. */
11513 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11514 if { (eval echo "$as_me:11514: \"$ac_link\"") >&5
11515 (eval $ac_link) 2>&5
11517 echo "$as_me:11517: \$? = $ac_status" >&5
11518 (exit "$ac_status"); } &&
11519 { ac_try='test -s "conftest$ac_exeext"'
11520 { (eval echo "$as_me:11520: \"$ac_try\"") >&5
11521 (eval $ac_try) 2>&5
11523 echo "$as_me:11523: \$? = $ac_status" >&5
11524 (exit "$ac_status"); }; }; then
11525 ac_cv_lib_gpm_initscr=yes
11527 echo "$as_me: failed program was:" >&5
11528 cat "conftest.$ac_ext" >&5
11529 ac_cv_lib_gpm_initscr=no
11531 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11532 LIBS=$ac_check_lib_save_LIBS
11534 echo "$as_me:11534: result: $ac_cv_lib_gpm_initscr" >&5
11535 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
11536 if test "$ac_cv_lib_gpm_initscr" = yes; then
11537 LIBS="$cf_ncurses_SAVE"
11539 cf_ncurses_LIBS="-lgpm"
11546 # This is only necessary if you are linking against an obsolete
11547 # version of ncurses (but it should do no harm, since it's static).
11548 if test "$cf_nculib_root" = ncurses ; then
11549 echo "$as_me:11549: checking for tgoto in -lmytinfo" >&5
11550 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
11551 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
11552 echo $ECHO_N "(cached) $ECHO_C" >&6
11554 ac_check_lib_save_LIBS=$LIBS
11555 LIBS="-lmytinfo $LIBS"
11556 cat >"conftest.$ac_ext" <<_ACEOF
11557 #line 11557 "configure"
11558 #include "confdefs.h"
11560 /* Override any gcc2 internal prototype to avoid an error. */
11564 /* We use char because int might match the return type of a gcc2
11565 builtin and then its argument prototype would still apply. */
11575 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11576 if { (eval echo "$as_me:11576: \"$ac_link\"") >&5
11577 (eval $ac_link) 2>&5
11579 echo "$as_me:11579: \$? = $ac_status" >&5
11580 (exit "$ac_status"); } &&
11581 { ac_try='test -s "conftest$ac_exeext"'
11582 { (eval echo "$as_me:11582: \"$ac_try\"") >&5
11583 (eval $ac_try) 2>&5
11585 echo "$as_me:11585: \$? = $ac_status" >&5
11586 (exit "$ac_status"); }; }; then
11587 ac_cv_lib_mytinfo_tgoto=yes
11589 echo "$as_me: failed program was:" >&5
11590 cat "conftest.$ac_ext" >&5
11591 ac_cv_lib_mytinfo_tgoto=no
11593 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11594 LIBS=$ac_check_lib_save_LIBS
11596 echo "$as_me:11596: result: $ac_cv_lib_mytinfo_tgoto" >&5
11597 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11598 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
11599 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
11606 cf_add_libs="$LIBS"
11609 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11610 # filter duplicates
11611 for cf_add_1lib in $cf_add_0lib; do
11612 for cf_add_2lib in $cf_add_libs; do
11613 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11618 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11620 LIBS="$cf_add_libs"
11622 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
11625 cf_add_libs="$LIBS"
11628 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11629 # filter duplicates
11630 for cf_add_1lib in $cf_add_0lib; do
11631 for cf_add_2lib in $cf_add_libs; do
11632 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11637 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11639 LIBS="$cf_add_libs"
11643 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
11645 echo "$as_me:11645: checking for initscr" >&5
11646 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
11647 if test "${ac_cv_func_initscr+set}" = set; then
11648 echo $ECHO_N "(cached) $ECHO_C" >&6
11650 cat >"conftest.$ac_ext" <<_ACEOF
11651 #line 11651 "configure"
11652 #include "confdefs.h"
11653 #define initscr autoconf_temporary
11654 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11661 /* We use char because int might match the return type of a gcc2
11662 builtin and then its argument prototype would still apply. */
11663 char initscr (void);
11669 /* The GNU C library defines stubs for functions which it implements
11670 to always fail with ENOSYS. Some functions are actually named
11671 something starting with __ and the normal name is an alias. */
11672 #if defined (__stub_initscr) || defined (__stub___initscr)
11673 #error found stub for initscr
11681 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11682 if { (eval echo "$as_me:11682: \"$ac_link\"") >&5
11683 (eval $ac_link) 2>&5
11685 echo "$as_me:11685: \$? = $ac_status" >&5
11686 (exit "$ac_status"); } &&
11687 { ac_try='test -s "conftest$ac_exeext"'
11688 { (eval echo "$as_me:11688: \"$ac_try\"") >&5
11689 (eval $ac_try) 2>&5
11691 echo "$as_me:11691: \$? = $ac_status" >&5
11692 (exit "$ac_status"); }; }; then
11693 ac_cv_func_initscr=yes
11695 echo "$as_me: failed program was:" >&5
11696 cat "conftest.$ac_ext" >&5
11697 ac_cv_func_initscr=no
11699 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11701 echo "$as_me:11701: result: $ac_cv_func_initscr" >&5
11702 echo "${ECHO_T}$ac_cv_func_initscr" >&6
11703 if test "$ac_cv_func_initscr" = yes; then
11704 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11707 cf_save_LIBS="$LIBS"
11708 echo "$as_me:11708: checking for initscr in -l$cf_nculib_root" >&5
11709 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
11710 LIBS="-l$cf_nculib_root $LIBS"
11711 cat >"conftest.$ac_ext" <<_ACEOF
11712 #line 11712 "configure"
11713 #include "confdefs.h"
11714 #include <${cf_cv_ncurses_header:-curses.h}>
11723 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11724 if { (eval echo "$as_me:11724: \"$ac_link\"") >&5
11725 (eval $ac_link) 2>&5
11727 echo "$as_me:11727: \$? = $ac_status" >&5
11728 (exit "$ac_status"); } &&
11729 { ac_try='test -s "conftest$ac_exeext"'
11730 { (eval echo "$as_me:11730: \"$ac_try\"") >&5
11731 (eval $ac_try) 2>&5
11733 echo "$as_me:11733: \$? = $ac_status" >&5
11734 (exit "$ac_status"); }; }; then
11735 echo "$as_me:11735: result: yes" >&5
11736 echo "${ECHO_T}yes" >&6
11737 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11740 echo "$as_me: failed program was:" >&5
11741 cat "conftest.$ac_ext" >&5
11742 echo "$as_me:11742: result: no" >&5
11743 echo "${ECHO_T}no" >&6
11746 cf_library_path_list=""
11747 if test -n "${LDFLAGS}${LIBS}" ; then
11748 for cf_library_path in $LDFLAGS $LIBS
11750 case "$cf_library_path" in
11752 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11754 test "x$cf_library_path" != "xNONE" && \
11755 test -d "$cf_library_path" && \
11757 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11758 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
11759 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11760 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11761 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11762 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"
11765 cf_library_path_list="$cf_library_path_list $cf_search"
11773 test "x$prefix" != "xNONE" && \
11774 test -d "$prefix" && \
11776 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11777 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
11778 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11779 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11780 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11781 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11784 for cf_subdir_prefix in \
11793 test "x$cf_subdir_prefix" != "x$prefix" && \
11794 test -d "$cf_subdir_prefix" && \
11795 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11796 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11797 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
11798 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11799 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11800 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11801 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"
11806 cf_search="$cf_library_path_list $cf_search"
11808 for cf_libdir in $cf_search
11810 echo "$as_me:11810: checking for -l$cf_nculib_root in $cf_libdir" >&5
11811 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11812 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11813 cat >"conftest.$ac_ext" <<_ACEOF
11814 #line 11814 "configure"
11815 #include "confdefs.h"
11816 #include <${cf_cv_ncurses_header:-curses.h}>
11825 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11826 if { (eval echo "$as_me:11826: \"$ac_link\"") >&5
11827 (eval $ac_link) 2>&5
11829 echo "$as_me:11829: \$? = $ac_status" >&5
11830 (exit "$ac_status"); } &&
11831 { ac_try='test -s "conftest$ac_exeext"'
11832 { (eval echo "$as_me:11832: \"$ac_try\"") >&5
11833 (eval $ac_try) 2>&5
11835 echo "$as_me:11835: \$? = $ac_status" >&5
11836 (exit "$ac_status"); }; }; then
11837 echo "$as_me:11837: result: yes" >&5
11838 echo "${ECHO_T}yes" >&6
11839 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11842 echo "$as_me: failed program was:" >&5
11843 cat "conftest.$ac_ext" >&5
11844 echo "$as_me:11844: result: no" >&5
11845 echo "${ECHO_T}no" >&6
11846 LIBS="$cf_save_LIBS"
11848 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11852 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11856 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
11858 if test "$cf_found_library" = no ; then
11859 { { echo "$as_me:11859: error: Cannot link $cf_nculib_root library" >&5
11860 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11861 { (exit 1); exit 1; }; }
11866 if test -n "$cf_ncurses_LIBS" ; then
11867 echo "$as_me:11867: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11868 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11869 cf_ncurses_SAVE="$LIBS"
11870 for p in $cf_ncurses_LIBS ; do
11871 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
11872 if test "$q" != "$LIBS" ; then
11876 cat >"conftest.$ac_ext" <<_ACEOF
11877 #line 11877 "configure"
11878 #include "confdefs.h"
11879 #include <${cf_cv_ncurses_header:-curses.h}>
11883 initscr(); mousemask(0,0); tigetstr((char *)0);
11888 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11889 if { (eval echo "$as_me:11889: \"$ac_link\"") >&5
11890 (eval $ac_link) 2>&5
11892 echo "$as_me:11892: \$? = $ac_status" >&5
11893 (exit "$ac_status"); } &&
11894 { ac_try='test -s "conftest$ac_exeext"'
11895 { (eval echo "$as_me:11895: \"$ac_try\"") >&5
11896 (eval $ac_try) 2>&5
11898 echo "$as_me:11898: \$? = $ac_status" >&5
11899 (exit "$ac_status"); }; }; then
11900 echo "$as_me:11900: result: yes" >&5
11901 echo "${ECHO_T}yes" >&6
11903 echo "$as_me: failed program was:" >&5
11904 cat "conftest.$ac_ext" >&5
11905 echo "$as_me:11905: result: no" >&5
11906 echo "${ECHO_T}no" >&6
11907 LIBS="$cf_ncurses_SAVE"
11909 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11912 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11914 cat >>confdefs.h <<EOF
11915 #define $cf_nculib_ROOT 1
11920 NCURSES_CONFIG=none
11925 echo "$as_me:11925: checking for X" >&5
11926 echo $ECHO_N "checking for X... $ECHO_C" >&6
11928 # Check whether --with-x or --without-x was given.
11929 if test "${with_x+set}" = set; then
11933 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
11934 if test "x$with_x" = xno; then
11935 # The user explicitly disabled X.
11938 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
11939 # Both variables are already set.
11942 if test "${ac_cv_have_x+set}" = set; then
11943 echo $ECHO_N "(cached) $ECHO_C" >&6
11945 # One or both of the vars are not set, and there is no cached value.
11946 ac_x_includes=no ac_x_libraries=no
11947 rm -fr conftest.dir
11948 if mkdir conftest.dir; then
11950 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
11951 cat >Imakefile <<'EOF'
11953 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
11955 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
11956 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
11957 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
11958 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
11959 for ac_extension in a so sl dylib dll; do
11960 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
11961 test -f "$ac_im_libdir/libX11.$ac_extension"; then
11962 ac_im_usrlibdir=$ac_im_libdir; break
11965 # Screen out bogus values from the imake configuration. They are
11966 # bogus both because they are the default anyway, and because
11967 # using them would break gcc on systems where it needs fixed includes.
11968 case $ac_im_incroot in
11970 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
11972 case $ac_im_usrlibdir in
11973 /usr/lib | /lib) ;;
11974 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
11978 rm -fr conftest.dir
11981 # Standard set of common directories for X headers.
11982 # Check X11 before X11Rn because it is often a symlink to the current release.
11999 /usr/local/X11/include
12000 /usr/local/X11R7/include
12001 /usr/local/X11R6/include
12002 /usr/local/X11R5/include
12003 /usr/local/X11R4/include
12005 /usr/local/include/X11
12006 /usr/local/include/X11R7
12007 /usr/local/include/X11R6
12008 /usr/local/include/X11R5
12009 /usr/local/include/X11R4
12013 /usr/XFree86/include/X11
12017 /usr/unsupported/include
12018 /usr/athena/include
12019 /usr/local/x11r5/include
12020 /usr/lpp/Xamples/include
12022 /usr/openwin/include
12023 /usr/openwin/share/include'
12025 if test "$ac_x_includes" = no; then
12026 # Guess where to find include files, by looking for Intrinsic.h.
12027 # First, try using that file with no special directory specified.
12028 cat >"conftest.$ac_ext" <<_ACEOF
12029 #line 12029 "configure"
12030 #include "confdefs.h"
12031 #include <X11/Intrinsic.h>
12033 if { (eval echo "$as_me:12033: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12034 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12036 $EGREP -v '^ *\+' conftest.er1 >conftest.err
12038 cat conftest.err >&5
12039 echo "$as_me:12039: \$? = $ac_status" >&5
12040 (exit "$ac_status"); } >/dev/null; then
12041 if test -s conftest.err; then
12042 ac_cpp_err=$ac_c_preproc_warn_flag
12049 if test -z "$ac_cpp_err"; then
12050 # We can compile using X headers with no special include directory.
12053 echo "$as_me: failed program was:" >&5
12054 cat "conftest.$ac_ext" >&5
12055 for ac_dir in $ac_x_header_dirs; do
12056 if test -r "$ac_dir/X11/Intrinsic.h"; then
12057 ac_x_includes=$ac_dir
12062 rm -f conftest.err "conftest.$ac_ext"
12063 fi # $ac_x_includes = no
12065 if test "$ac_x_libraries" = no; then
12066 # Check for the libraries.
12067 # See if we find them without any special options.
12068 # Don't add to $LIBS permanently.
12071 cat >"conftest.$ac_ext" <<_ACEOF
12072 #line 12072 "configure"
12073 #include "confdefs.h"
12074 #include <X11/Intrinsic.h>
12083 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12084 if { (eval echo "$as_me:12084: \"$ac_link\"") >&5
12085 (eval $ac_link) 2>&5
12087 echo "$as_me:12087: \$? = $ac_status" >&5
12088 (exit "$ac_status"); } &&
12089 { ac_try='test -s "conftest$ac_exeext"'
12090 { (eval echo "$as_me:12090: \"$ac_try\"") >&5
12091 (eval $ac_try) 2>&5
12093 echo "$as_me:12093: \$? = $ac_status" >&5
12094 (exit "$ac_status"); }; }; then
12096 # We can link X programs with no special library path.
12099 echo "$as_me: failed program was:" >&5
12100 cat "conftest.$ac_ext" >&5
12102 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
12104 # Don't even attempt the hair of trying to link an X program!
12105 for ac_extension in a so sl dylib dll; do
12106 if test -r "$ac_dir/libXt.$ac_extension"; then
12107 ac_x_libraries=$ac_dir
12113 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12114 fi # $ac_x_libraries = no
12116 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
12117 # Didn't find X anywhere. Cache the known absence of X.
12118 ac_cv_have_x="have_x=no"
12120 # Record where we found X for the cache.
12121 ac_cv_have_x="have_x=yes \
12122 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
12127 eval "$ac_cv_have_x"
12130 if test "$have_x" != yes; then
12131 echo "$as_me:12131: result: $have_x" >&5
12132 echo "${ECHO_T}$have_x" >&6
12135 # If each of the values was on the command line, it overrides each guess.
12136 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
12137 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
12138 # Update the cache value to reflect the command line values.
12139 ac_cv_have_x="have_x=yes \
12140 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
12141 echo "$as_me:12141: result: libraries $x_libraries, headers $x_includes" >&5
12142 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
12145 if test "$no_x" = yes; then
12146 # Not all programs may use this symbol, but it does not hurt to define it.
12148 cat >>confdefs.h <<\EOF
12149 #define X_DISPLAY_MISSING 1
12157 if test -n "$x_includes"; then
12158 X_CFLAGS="$X_CFLAGS -I$x_includes"
12161 # It would also be nice to do this for all -L options, not just this one.
12162 if test -n "$x_libraries"; then
12163 X_LIBS="$X_LIBS -L$x_libraries"
12164 # For Solaris; some versions of Sun CC require a space after -R and
12165 # others require no space. Words are not sufficient . . . .
12166 case `(uname -sr) 2>/dev/null` in
12168 echo "$as_me:12168: checking whether -R must be followed by a space" >&5
12169 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
12170 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
12171 cat >"conftest.$ac_ext" <<_ACEOF
12172 #line 12172 "configure"
12173 #include "confdefs.h"
12183 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12184 if { (eval echo "$as_me:12184: \"$ac_link\"") >&5
12185 (eval $ac_link) 2>&5
12187 echo "$as_me:12187: \$? = $ac_status" >&5
12188 (exit "$ac_status"); } &&
12189 { ac_try='test -s "conftest$ac_exeext"'
12190 { (eval echo "$as_me:12190: \"$ac_try\"") >&5
12191 (eval $ac_try) 2>&5
12193 echo "$as_me:12193: \$? = $ac_status" >&5
12194 (exit "$ac_status"); }; }; then
12197 echo "$as_me: failed program was:" >&5
12198 cat "conftest.$ac_ext" >&5
12201 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12202 if test $ac_R_nospace = yes; then
12203 echo "$as_me:12203: result: no" >&5
12204 echo "${ECHO_T}no" >&6
12205 X_LIBS="$X_LIBS -R$x_libraries"
12207 LIBS="$ac_xsave_LIBS -R $x_libraries"
12208 cat >"conftest.$ac_ext" <<_ACEOF
12209 #line 12209 "configure"
12210 #include "confdefs.h"
12220 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12221 if { (eval echo "$as_me:12221: \"$ac_link\"") >&5
12222 (eval $ac_link) 2>&5
12224 echo "$as_me:12224: \$? = $ac_status" >&5
12225 (exit "$ac_status"); } &&
12226 { ac_try='test -s "conftest$ac_exeext"'
12227 { (eval echo "$as_me:12227: \"$ac_try\"") >&5
12228 (eval $ac_try) 2>&5
12230 echo "$as_me:12230: \$? = $ac_status" >&5
12231 (exit "$ac_status"); }; }; then
12234 echo "$as_me: failed program was:" >&5
12235 cat "conftest.$ac_ext" >&5
12238 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12239 if test $ac_R_space = yes; then
12240 echo "$as_me:12240: result: yes" >&5
12241 echo "${ECHO_T}yes" >&6
12242 X_LIBS="$X_LIBS -R $x_libraries"
12244 echo "$as_me:12244: result: neither works" >&5
12245 echo "${ECHO_T}neither works" >&6
12248 LIBS=$ac_xsave_LIBS
12252 # Check for system-dependent libraries X programs must link with.
12253 # Do this before checking for the system-independent R6 libraries
12254 # (-lICE), since we may need -lsocket or whatever for X linking.
12256 if test "$ISC" = yes; then
12257 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
12259 # Martyn Johnson says this is needed for Ultrix, if the X
12260 # libraries were built with DECnet support. And Karl Berry says
12261 # the Alpha needs dnet_stub (dnet does not exist).
12262 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
12263 cat >"conftest.$ac_ext" <<_ACEOF
12264 #line 12264 "configure"
12265 #include "confdefs.h"
12267 /* Override any gcc2 internal prototype to avoid an error. */
12271 /* We use char because int might match the return type of a gcc2
12272 builtin and then its argument prototype would still apply. */
12273 char XOpenDisplay ();
12282 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12283 if { (eval echo "$as_me:12283: \"$ac_link\"") >&5
12284 (eval $ac_link) 2>&5
12286 echo "$as_me:12286: \$? = $ac_status" >&5
12287 (exit "$ac_status"); } &&
12288 { ac_try='test -s "conftest$ac_exeext"'
12289 { (eval echo "$as_me:12289: \"$ac_try\"") >&5
12290 (eval $ac_try) 2>&5
12292 echo "$as_me:12292: \$? = $ac_status" >&5
12293 (exit "$ac_status"); }; }; then
12296 echo "$as_me: failed program was:" >&5
12297 cat "conftest.$ac_ext" >&5
12298 echo "$as_me:12298: checking for dnet_ntoa in -ldnet" >&5
12299 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
12300 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
12301 echo $ECHO_N "(cached) $ECHO_C" >&6
12303 ac_check_lib_save_LIBS=$LIBS
12304 LIBS="-ldnet $LIBS"
12305 cat >"conftest.$ac_ext" <<_ACEOF
12306 #line 12306 "configure"
12307 #include "confdefs.h"
12309 /* Override any gcc2 internal prototype to avoid an error. */
12313 /* We use char because int might match the return type of a gcc2
12314 builtin and then its argument prototype would still apply. */
12324 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12325 if { (eval echo "$as_me:12325: \"$ac_link\"") >&5
12326 (eval $ac_link) 2>&5
12328 echo "$as_me:12328: \$? = $ac_status" >&5
12329 (exit "$ac_status"); } &&
12330 { ac_try='test -s "conftest$ac_exeext"'
12331 { (eval echo "$as_me:12331: \"$ac_try\"") >&5
12332 (eval $ac_try) 2>&5
12334 echo "$as_me:12334: \$? = $ac_status" >&5
12335 (exit "$ac_status"); }; }; then
12336 ac_cv_lib_dnet_dnet_ntoa=yes
12338 echo "$as_me: failed program was:" >&5
12339 cat "conftest.$ac_ext" >&5
12340 ac_cv_lib_dnet_dnet_ntoa=no
12342 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12343 LIBS=$ac_check_lib_save_LIBS
12345 echo "$as_me:12345: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
12346 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
12347 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
12348 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
12351 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
12352 echo "$as_me:12352: checking for dnet_ntoa in -ldnet_stub" >&5
12353 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
12354 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
12355 echo $ECHO_N "(cached) $ECHO_C" >&6
12357 ac_check_lib_save_LIBS=$LIBS
12358 LIBS="-ldnet_stub $LIBS"
12359 cat >"conftest.$ac_ext" <<_ACEOF
12360 #line 12360 "configure"
12361 #include "confdefs.h"
12363 /* Override any gcc2 internal prototype to avoid an error. */
12367 /* We use char because int might match the return type of a gcc2
12368 builtin and then its argument prototype would still apply. */
12378 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12379 if { (eval echo "$as_me:12379: \"$ac_link\"") >&5
12380 (eval $ac_link) 2>&5
12382 echo "$as_me:12382: \$? = $ac_status" >&5
12383 (exit "$ac_status"); } &&
12384 { ac_try='test -s "conftest$ac_exeext"'
12385 { (eval echo "$as_me:12385: \"$ac_try\"") >&5
12386 (eval $ac_try) 2>&5
12388 echo "$as_me:12388: \$? = $ac_status" >&5
12389 (exit "$ac_status"); }; }; then
12390 ac_cv_lib_dnet_stub_dnet_ntoa=yes
12392 echo "$as_me: failed program was:" >&5
12393 cat "conftest.$ac_ext" >&5
12394 ac_cv_lib_dnet_stub_dnet_ntoa=no
12396 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12397 LIBS=$ac_check_lib_save_LIBS
12399 echo "$as_me:12399: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
12400 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
12401 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
12402 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
12407 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12408 LIBS="$ac_xsave_LIBS"
12410 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
12411 # to get the SysV transport functions.
12412 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
12414 # The nsl library prevents programs from opening the X display
12415 # on Irix 5.2, according to T.E. Dickey.
12416 # The functions gethostbyname, getservbyname, and inet_addr are
12417 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
12418 echo "$as_me:12418: checking for gethostbyname" >&5
12419 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
12420 if test "${ac_cv_func_gethostbyname+set}" = set; then
12421 echo $ECHO_N "(cached) $ECHO_C" >&6
12423 cat >"conftest.$ac_ext" <<_ACEOF
12424 #line 12424 "configure"
12425 #include "confdefs.h"
12426 #define gethostbyname autoconf_temporary
12427 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12428 #undef gethostbyname
12434 /* We use char because int might match the return type of a gcc2
12435 builtin and then its argument prototype would still apply. */
12436 char gethostbyname (void);
12442 /* The GNU C library defines stubs for functions which it implements
12443 to always fail with ENOSYS. Some functions are actually named
12444 something starting with __ and the normal name is an alias. */
12445 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
12446 #error found stub for gethostbyname
12449 return gethostbyname ();
12454 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12455 if { (eval echo "$as_me:12455: \"$ac_link\"") >&5
12456 (eval $ac_link) 2>&5
12458 echo "$as_me:12458: \$? = $ac_status" >&5
12459 (exit "$ac_status"); } &&
12460 { ac_try='test -s "conftest$ac_exeext"'
12461 { (eval echo "$as_me:12461: \"$ac_try\"") >&5
12462 (eval $ac_try) 2>&5
12464 echo "$as_me:12464: \$? = $ac_status" >&5
12465 (exit "$ac_status"); }; }; then
12466 ac_cv_func_gethostbyname=yes
12468 echo "$as_me: failed program was:" >&5
12469 cat "conftest.$ac_ext" >&5
12470 ac_cv_func_gethostbyname=no
12472 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12474 echo "$as_me:12474: result: $ac_cv_func_gethostbyname" >&5
12475 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
12477 if test $ac_cv_func_gethostbyname = no; then
12478 echo "$as_me:12478: checking for gethostbyname in -lnsl" >&5
12479 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
12480 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
12481 echo $ECHO_N "(cached) $ECHO_C" >&6
12483 ac_check_lib_save_LIBS=$LIBS
12485 cat >"conftest.$ac_ext" <<_ACEOF
12486 #line 12486 "configure"
12487 #include "confdefs.h"
12489 /* Override any gcc2 internal prototype to avoid an error. */
12493 /* We use char because int might match the return type of a gcc2
12494 builtin and then its argument prototype would still apply. */
12495 char gethostbyname ();
12504 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12505 if { (eval echo "$as_me:12505: \"$ac_link\"") >&5
12506 (eval $ac_link) 2>&5
12508 echo "$as_me:12508: \$? = $ac_status" >&5
12509 (exit "$ac_status"); } &&
12510 { ac_try='test -s "conftest$ac_exeext"'
12511 { (eval echo "$as_me:12511: \"$ac_try\"") >&5
12512 (eval $ac_try) 2>&5
12514 echo "$as_me:12514: \$? = $ac_status" >&5
12515 (exit "$ac_status"); }; }; then
12516 ac_cv_lib_nsl_gethostbyname=yes
12518 echo "$as_me: failed program was:" >&5
12519 cat "conftest.$ac_ext" >&5
12520 ac_cv_lib_nsl_gethostbyname=no
12522 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12523 LIBS=$ac_check_lib_save_LIBS
12525 echo "$as_me:12525: result: $ac_cv_lib_nsl_gethostbyname" >&5
12526 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
12527 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
12528 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
12531 if test $ac_cv_lib_nsl_gethostbyname = no; then
12532 echo "$as_me:12532: checking for gethostbyname in -lbsd" >&5
12533 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
12534 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
12535 echo $ECHO_N "(cached) $ECHO_C" >&6
12537 ac_check_lib_save_LIBS=$LIBS
12539 cat >"conftest.$ac_ext" <<_ACEOF
12540 #line 12540 "configure"
12541 #include "confdefs.h"
12543 /* Override any gcc2 internal prototype to avoid an error. */
12547 /* We use char because int might match the return type of a gcc2
12548 builtin and then its argument prototype would still apply. */
12549 char gethostbyname ();
12558 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12559 if { (eval echo "$as_me:12559: \"$ac_link\"") >&5
12560 (eval $ac_link) 2>&5
12562 echo "$as_me:12562: \$? = $ac_status" >&5
12563 (exit "$ac_status"); } &&
12564 { ac_try='test -s "conftest$ac_exeext"'
12565 { (eval echo "$as_me:12565: \"$ac_try\"") >&5
12566 (eval $ac_try) 2>&5
12568 echo "$as_me:12568: \$? = $ac_status" >&5
12569 (exit "$ac_status"); }; }; then
12570 ac_cv_lib_bsd_gethostbyname=yes
12572 echo "$as_me: failed program was:" >&5
12573 cat "conftest.$ac_ext" >&5
12574 ac_cv_lib_bsd_gethostbyname=no
12576 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12577 LIBS=$ac_check_lib_save_LIBS
12579 echo "$as_me:12579: result: $ac_cv_lib_bsd_gethostbyname" >&5
12580 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
12581 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
12582 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
12588 # lieder@skyler.mavd.honeywell.com says without -lsocket,
12589 # socket/setsockopt and other routines are undefined under SCO ODT
12590 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
12591 # on later versions), says Simon Leinen: it contains gethostby*
12592 # variants that don't use the nameserver (or something). -lsocket
12593 # must be given before -lnsl if both are needed. We assume that
12594 # if connect needs -lnsl, so does gethostbyname.
12595 echo "$as_me:12595: checking for connect" >&5
12596 echo $ECHO_N "checking for connect... $ECHO_C" >&6
12597 if test "${ac_cv_func_connect+set}" = set; then
12598 echo $ECHO_N "(cached) $ECHO_C" >&6
12600 cat >"conftest.$ac_ext" <<_ACEOF
12601 #line 12601 "configure"
12602 #include "confdefs.h"
12603 #define connect autoconf_temporary
12604 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12611 /* We use char because int might match the return type of a gcc2
12612 builtin and then its argument prototype would still apply. */
12613 char connect (void);
12619 /* The GNU C library defines stubs for functions which it implements
12620 to always fail with ENOSYS. Some functions are actually named
12621 something starting with __ and the normal name is an alias. */
12622 #if defined (__stub_connect) || defined (__stub___connect)
12623 #error found stub for connect
12631 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12632 if { (eval echo "$as_me:12632: \"$ac_link\"") >&5
12633 (eval $ac_link) 2>&5
12635 echo "$as_me:12635: \$? = $ac_status" >&5
12636 (exit "$ac_status"); } &&
12637 { ac_try='test -s "conftest$ac_exeext"'
12638 { (eval echo "$as_me:12638: \"$ac_try\"") >&5
12639 (eval $ac_try) 2>&5
12641 echo "$as_me:12641: \$? = $ac_status" >&5
12642 (exit "$ac_status"); }; }; then
12643 ac_cv_func_connect=yes
12645 echo "$as_me: failed program was:" >&5
12646 cat "conftest.$ac_ext" >&5
12647 ac_cv_func_connect=no
12649 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12651 echo "$as_me:12651: result: $ac_cv_func_connect" >&5
12652 echo "${ECHO_T}$ac_cv_func_connect" >&6
12654 if test $ac_cv_func_connect = no; then
12655 echo "$as_me:12655: checking for connect in -lsocket" >&5
12656 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
12657 if test "${ac_cv_lib_socket_connect+set}" = set; then
12658 echo $ECHO_N "(cached) $ECHO_C" >&6
12660 ac_check_lib_save_LIBS=$LIBS
12661 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
12662 cat >"conftest.$ac_ext" <<_ACEOF
12663 #line 12663 "configure"
12664 #include "confdefs.h"
12666 /* Override any gcc2 internal prototype to avoid an error. */
12670 /* We use char because int might match the return type of a gcc2
12671 builtin and then its argument prototype would still apply. */
12681 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12682 if { (eval echo "$as_me:12682: \"$ac_link\"") >&5
12683 (eval $ac_link) 2>&5
12685 echo "$as_me:12685: \$? = $ac_status" >&5
12686 (exit "$ac_status"); } &&
12687 { ac_try='test -s "conftest$ac_exeext"'
12688 { (eval echo "$as_me:12688: \"$ac_try\"") >&5
12689 (eval $ac_try) 2>&5
12691 echo "$as_me:12691: \$? = $ac_status" >&5
12692 (exit "$ac_status"); }; }; then
12693 ac_cv_lib_socket_connect=yes
12695 echo "$as_me: failed program was:" >&5
12696 cat "conftest.$ac_ext" >&5
12697 ac_cv_lib_socket_connect=no
12699 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12700 LIBS=$ac_check_lib_save_LIBS
12702 echo "$as_me:12702: result: $ac_cv_lib_socket_connect" >&5
12703 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
12704 if test "$ac_cv_lib_socket_connect" = yes; then
12705 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
12710 # Guillermo Gomez says -lposix is necessary on A/UX.
12711 echo "$as_me:12711: checking for remove" >&5
12712 echo $ECHO_N "checking for remove... $ECHO_C" >&6
12713 if test "${ac_cv_func_remove+set}" = set; then
12714 echo $ECHO_N "(cached) $ECHO_C" >&6
12716 cat >"conftest.$ac_ext" <<_ACEOF
12717 #line 12717 "configure"
12718 #include "confdefs.h"
12719 #define remove autoconf_temporary
12720 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12727 /* We use char because int might match the return type of a gcc2
12728 builtin and then its argument prototype would still apply. */
12729 char remove (void);
12735 /* The GNU C library defines stubs for functions which it implements
12736 to always fail with ENOSYS. Some functions are actually named
12737 something starting with __ and the normal name is an alias. */
12738 #if defined (__stub_remove) || defined (__stub___remove)
12739 #error found stub for remove
12747 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12748 if { (eval echo "$as_me:12748: \"$ac_link\"") >&5
12749 (eval $ac_link) 2>&5
12751 echo "$as_me:12751: \$? = $ac_status" >&5
12752 (exit "$ac_status"); } &&
12753 { ac_try='test -s "conftest$ac_exeext"'
12754 { (eval echo "$as_me:12754: \"$ac_try\"") >&5
12755 (eval $ac_try) 2>&5
12757 echo "$as_me:12757: \$? = $ac_status" >&5
12758 (exit "$ac_status"); }; }; then
12759 ac_cv_func_remove=yes
12761 echo "$as_me: failed program was:" >&5
12762 cat "conftest.$ac_ext" >&5
12763 ac_cv_func_remove=no
12765 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12767 echo "$as_me:12767: result: $ac_cv_func_remove" >&5
12768 echo "${ECHO_T}$ac_cv_func_remove" >&6
12770 if test $ac_cv_func_remove = no; then
12771 echo "$as_me:12771: checking for remove in -lposix" >&5
12772 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
12773 if test "${ac_cv_lib_posix_remove+set}" = set; then
12774 echo $ECHO_N "(cached) $ECHO_C" >&6
12776 ac_check_lib_save_LIBS=$LIBS
12777 LIBS="-lposix $LIBS"
12778 cat >"conftest.$ac_ext" <<_ACEOF
12779 #line 12779 "configure"
12780 #include "confdefs.h"
12782 /* Override any gcc2 internal prototype to avoid an error. */
12786 /* We use char because int might match the return type of a gcc2
12787 builtin and then its argument prototype would still apply. */
12797 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12798 if { (eval echo "$as_me:12798: \"$ac_link\"") >&5
12799 (eval $ac_link) 2>&5
12801 echo "$as_me:12801: \$? = $ac_status" >&5
12802 (exit "$ac_status"); } &&
12803 { ac_try='test -s "conftest$ac_exeext"'
12804 { (eval echo "$as_me:12804: \"$ac_try\"") >&5
12805 (eval $ac_try) 2>&5
12807 echo "$as_me:12807: \$? = $ac_status" >&5
12808 (exit "$ac_status"); }; }; then
12809 ac_cv_lib_posix_remove=yes
12811 echo "$as_me: failed program was:" >&5
12812 cat "conftest.$ac_ext" >&5
12813 ac_cv_lib_posix_remove=no
12815 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12816 LIBS=$ac_check_lib_save_LIBS
12818 echo "$as_me:12818: result: $ac_cv_lib_posix_remove" >&5
12819 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
12820 if test "$ac_cv_lib_posix_remove" = yes; then
12821 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
12826 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
12827 echo "$as_me:12827: checking for shmat" >&5
12828 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
12829 if test "${ac_cv_func_shmat+set}" = set; then
12830 echo $ECHO_N "(cached) $ECHO_C" >&6
12832 cat >"conftest.$ac_ext" <<_ACEOF
12833 #line 12833 "configure"
12834 #include "confdefs.h"
12835 #define shmat autoconf_temporary
12836 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12843 /* We use char because int might match the return type of a gcc2
12844 builtin and then its argument prototype would still apply. */
12851 /* The GNU C library defines stubs for functions which it implements
12852 to always fail with ENOSYS. Some functions are actually named
12853 something starting with __ and the normal name is an alias. */
12854 #if defined (__stub_shmat) || defined (__stub___shmat)
12855 #error found stub for shmat
12863 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12864 if { (eval echo "$as_me:12864: \"$ac_link\"") >&5
12865 (eval $ac_link) 2>&5
12867 echo "$as_me:12867: \$? = $ac_status" >&5
12868 (exit "$ac_status"); } &&
12869 { ac_try='test -s "conftest$ac_exeext"'
12870 { (eval echo "$as_me:12870: \"$ac_try\"") >&5
12871 (eval $ac_try) 2>&5
12873 echo "$as_me:12873: \$? = $ac_status" >&5
12874 (exit "$ac_status"); }; }; then
12875 ac_cv_func_shmat=yes
12877 echo "$as_me: failed program was:" >&5
12878 cat "conftest.$ac_ext" >&5
12879 ac_cv_func_shmat=no
12881 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12883 echo "$as_me:12883: result: $ac_cv_func_shmat" >&5
12884 echo "${ECHO_T}$ac_cv_func_shmat" >&6
12886 if test $ac_cv_func_shmat = no; then
12887 echo "$as_me:12887: checking for shmat in -lipc" >&5
12888 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
12889 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
12890 echo $ECHO_N "(cached) $ECHO_C" >&6
12892 ac_check_lib_save_LIBS=$LIBS
12894 cat >"conftest.$ac_ext" <<_ACEOF
12895 #line 12895 "configure"
12896 #include "confdefs.h"
12898 /* Override any gcc2 internal prototype to avoid an error. */
12902 /* We use char because int might match the return type of a gcc2
12903 builtin and then its argument prototype would still apply. */
12913 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12914 if { (eval echo "$as_me:12914: \"$ac_link\"") >&5
12915 (eval $ac_link) 2>&5
12917 echo "$as_me:12917: \$? = $ac_status" >&5
12918 (exit "$ac_status"); } &&
12919 { ac_try='test -s "conftest$ac_exeext"'
12920 { (eval echo "$as_me:12920: \"$ac_try\"") >&5
12921 (eval $ac_try) 2>&5
12923 echo "$as_me:12923: \$? = $ac_status" >&5
12924 (exit "$ac_status"); }; }; then
12925 ac_cv_lib_ipc_shmat=yes
12927 echo "$as_me: failed program was:" >&5
12928 cat "conftest.$ac_ext" >&5
12929 ac_cv_lib_ipc_shmat=no
12931 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12932 LIBS=$ac_check_lib_save_LIBS
12934 echo "$as_me:12934: result: $ac_cv_lib_ipc_shmat" >&5
12935 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
12936 if test "$ac_cv_lib_ipc_shmat" = yes; then
12937 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
12943 # Check for libraries that X11R6 Xt/Xaw programs need.
12944 ac_save_LDFLAGS=$LDFLAGS
12945 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
12946 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
12947 # check for ICE first), but we must link in the order -lSM -lICE or
12948 # we get undefined symbols. So assume we have SM if we have ICE.
12949 # These have to be linked with before -lX11, unlike the other
12950 # libraries we check for below, so use a different variable.
12951 # John Interrante, Karl Berry
12952 echo "$as_me:12952: checking for IceConnectionNumber in -lICE" >&5
12953 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
12954 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
12955 echo $ECHO_N "(cached) $ECHO_C" >&6
12957 ac_check_lib_save_LIBS=$LIBS
12958 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
12959 cat >"conftest.$ac_ext" <<_ACEOF
12960 #line 12960 "configure"
12961 #include "confdefs.h"
12963 /* Override any gcc2 internal prototype to avoid an error. */
12967 /* We use char because int might match the return type of a gcc2
12968 builtin and then its argument prototype would still apply. */
12969 char IceConnectionNumber ();
12973 IceConnectionNumber ();
12978 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12979 if { (eval echo "$as_me:12979: \"$ac_link\"") >&5
12980 (eval $ac_link) 2>&5
12982 echo "$as_me:12982: \$? = $ac_status" >&5
12983 (exit "$ac_status"); } &&
12984 { ac_try='test -s "conftest$ac_exeext"'
12985 { (eval echo "$as_me:12985: \"$ac_try\"") >&5
12986 (eval $ac_try) 2>&5
12988 echo "$as_me:12988: \$? = $ac_status" >&5
12989 (exit "$ac_status"); }; }; then
12990 ac_cv_lib_ICE_IceConnectionNumber=yes
12992 echo "$as_me: failed program was:" >&5
12993 cat "conftest.$ac_ext" >&5
12994 ac_cv_lib_ICE_IceConnectionNumber=no
12996 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12997 LIBS=$ac_check_lib_save_LIBS
12999 echo "$as_me:12999: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
13000 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
13001 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
13002 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
13005 LDFLAGS=$ac_save_LDFLAGS
13009 cf_x_athena=${cf_x_athena:-Xaw}
13011 echo "$as_me:13011: checking if you want to link with Xaw 3d library" >&5
13012 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
13015 # Check whether --with-Xaw3d or --without-Xaw3d was given.
13016 if test "${with_Xaw3d+set}" = set; then
13017 withval="$with_Xaw3d"
13020 if test "$withval" = yes ; then
13022 echo "$as_me:13022: result: yes" >&5
13023 echo "${ECHO_T}yes" >&6
13025 echo "$as_me:13025: result: no" >&5
13026 echo "${ECHO_T}no" >&6
13029 echo "$as_me:13029: checking if you want to link with Xaw 3d xft library" >&5
13030 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
13033 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
13034 if test "${with_Xaw3dxft+set}" = set; then
13035 withval="$with_Xaw3dxft"
13038 if test "$withval" = yes ; then
13039 cf_x_athena=Xaw3dxft
13040 echo "$as_me:13040: result: yes" >&5
13041 echo "${ECHO_T}yes" >&6
13043 echo "$as_me:13043: result: no" >&5
13044 echo "${ECHO_T}no" >&6
13047 echo "$as_me:13047: checking if you want to link with neXT Athena library" >&5
13048 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
13051 # Check whether --with-neXtaw or --without-neXtaw was given.
13052 if test "${with_neXtaw+set}" = set; then
13053 withval="$with_neXtaw"
13056 if test "$withval" = yes ; then
13058 echo "$as_me:13058: result: yes" >&5
13059 echo "${ECHO_T}yes" >&6
13061 echo "$as_me:13061: result: no" >&5
13062 echo "${ECHO_T}no" >&6
13065 echo "$as_me:13065: checking if you want to link with Athena-Plus library" >&5
13066 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
13069 # Check whether --with-XawPlus or --without-XawPlus was given.
13070 if test "${with_XawPlus+set}" = set; then
13071 withval="$with_XawPlus"
13074 if test "$withval" = yes ; then
13075 cf_x_athena=XawPlus
13076 echo "$as_me:13076: result: yes" >&5
13077 echo "${ECHO_T}yes" >&6
13079 echo "$as_me:13079: result: no" >&5
13080 echo "${ECHO_T}no" >&6
13085 if test "$PKG_CONFIG" != none ; then
13087 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
13088 for cf_athena_pkg in \
13091 ${cf_x_athena}-devel \
13092 lib${cf_x_athena} \
13093 lib${cf_x_athena}-devel
13096 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_athena_pkg"; then
13097 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
13099 echo "${as_me:-configure}:13099: testing found package $cf_athena_pkg ..." 1>&5
13101 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_athena_pkg" 2>/dev/null`"
13102 cf_pkgconfig_libs="`$PKG_CONFIG --libs "$cf_athena_pkg" 2>/dev/null`"
13103 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
13105 echo "${as_me:-configure}:13105: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13107 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
13109 echo "${as_me:-configure}:13109: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
13114 cf_new_extra_cppflags=
13116 for cf_add_cflags in $cf_pkgconfig_incs
13118 case "$cf_fix_cppflags" in
13120 case "$cf_add_cflags" in
13121 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13122 case "$cf_add_cflags" in
13124 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13126 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13127 && test -z "${cf_tst_cflags}" \
13128 && cf_fix_cppflags=yes
13130 if test "$cf_fix_cppflags" = yes ; then
13132 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13133 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13136 elif test "${cf_tst_cflags}" = "\"'" ; then
13138 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13139 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13145 case "$CPPFLAGS" in
13149 case "$cf_add_cflags" in
13151 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13153 CPPFLAGS=`echo "$CPPFLAGS" | \
13154 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13155 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13160 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13161 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13168 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13169 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13176 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13177 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13179 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13181 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13182 && test -z "${cf_tst_cflags}" \
13183 && cf_fix_cppflags=no
13188 if test -n "$cf_new_cflags" ; then
13190 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13191 CFLAGS="${CFLAGS}$cf_new_cflags"
13195 if test -n "$cf_new_cppflags" ; then
13197 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13198 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13202 if test -n "$cf_new_extra_cppflags" ; then
13204 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13205 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13209 cf_add_libs="$LIBS"
13212 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13213 # filter duplicates
13214 for cf_add_1lib in $cf_add_0lib; do
13215 for cf_add_2lib in $cf_add_libs; do
13216 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13221 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13223 LIBS="$cf_add_libs"
13225 cf_x_athena_lib="$cf_pkgconfig_libs"
13227 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13229 cat >>confdefs.h <<EOF
13230 #define $cf_x_athena_LIBS 1
13233 for cf_trim_lib in Xmu Xt X11
13236 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13237 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13238 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13240 echo "${as_me:-configure}:13240: testing ..trimmed $LIBS ..." 1>&5
13246 echo "$as_me:13246: checking for usable $cf_x_athena/Xmu package" >&5
13247 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
13248 if test "${cf_cv_xaw_compat+set}" = set; then
13249 echo $ECHO_N "(cached) $ECHO_C" >&6
13252 cat >"conftest.$ac_ext" <<_ACEOF
13253 #line 13253 "configure"
13254 #include "confdefs.h"
13256 #include <X11/Xmu/CharSet.h>
13262 int check = XmuCompareISOLatin1("big", "small");
13269 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13270 if { (eval echo "$as_me:13270: \"$ac_link\"") >&5
13271 (eval $ac_link) 2>&5
13273 echo "$as_me:13273: \$? = $ac_status" >&5
13274 (exit "$ac_status"); } &&
13275 { ac_try='test -s "conftest$ac_exeext"'
13276 { (eval echo "$as_me:13276: \"$ac_try\"") >&5
13277 (eval $ac_try) 2>&5
13279 echo "$as_me:13279: \$? = $ac_status" >&5
13280 (exit "$ac_status"); }; }; then
13281 cf_cv_xaw_compat=yes
13283 echo "$as_me: failed program was:" >&5
13284 cat "conftest.$ac_ext" >&5
13285 cf_cv_xaw_compat=no
13287 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13289 echo "$as_me:13289: result: $cf_cv_xaw_compat" >&5
13290 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
13292 if test "$cf_cv_xaw_compat" = no
13294 # workaround for broken ".pc" files...
13295 case "$cf_x_athena_lib" in
13299 test -n "$verbose" && echo " work around broken package" 1>&6
13301 echo "${as_me:-configure}:13301: testing work around broken package ..." 1>&5
13303 cf_save_xmu="$LIBS"
13304 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
13306 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xmu"; then
13307 test -n "$verbose" && echo " found package xmu" 1>&6
13309 echo "${as_me:-configure}:13309: testing found package xmu ..." 1>&5
13311 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xmu" 2>/dev/null`"
13312 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xmu" 2>/dev/null`"
13313 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
13315 echo "${as_me:-configure}:13315: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13317 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
13319 echo "${as_me:-configure}:13319: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
13324 cf_new_extra_cppflags=
13326 for cf_add_cflags in $cf_pkgconfig_incs
13328 case "$cf_fix_cppflags" in
13330 case "$cf_add_cflags" in
13331 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13332 case "$cf_add_cflags" in
13334 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13336 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13337 && test -z "${cf_tst_cflags}" \
13338 && cf_fix_cppflags=yes
13340 if test "$cf_fix_cppflags" = yes ; then
13342 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13343 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13346 elif test "${cf_tst_cflags}" = "\"'" ; then
13348 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13349 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13355 case "$CPPFLAGS" in
13359 case "$cf_add_cflags" in
13361 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13363 CPPFLAGS=`echo "$CPPFLAGS" | \
13364 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13365 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13370 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13371 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13378 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13379 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13386 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13387 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13389 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13391 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13392 && test -z "${cf_tst_cflags}" \
13393 && cf_fix_cppflags=no
13398 if test -n "$cf_new_cflags" ; then
13400 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13401 CFLAGS="${CFLAGS}$cf_new_cflags"
13405 if test -n "$cf_new_cppflags" ; then
13407 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13408 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13412 if test -n "$cf_new_extra_cppflags" ; then
13414 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13415 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13419 cf_add_libs="$LIBS"
13422 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13423 # filter duplicates
13424 for cf_add_1lib in $cf_add_0lib; do
13425 for cf_add_2lib in $cf_add_libs; do
13426 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13431 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13433 LIBS="$cf_add_libs"
13435 LIBS="$cf_save_xmu"
13437 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13439 echo "${as_me:-configure}:13439: testing ...before $LIBS ..." 1>&5
13441 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
13442 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13444 echo "${as_me:-configure}:13444: testing ...after $LIBS ..." 1>&5
13450 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13452 echo "${as_me:-configure}:13452: testing ...before $LIBS ..." 1>&5
13454 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
13455 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13457 echo "${as_me:-configure}:13457: testing ...after $LIBS ..." 1>&5
13461 for cf_trim_lib in Xmu Xt X11
13464 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13465 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13466 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13468 echo "${as_me:-configure}:13468: testing ..trimmed $LIBS ..." 1>&5
13488 if test -z "$cf_x_athena_lib" ; then
13490 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
13491 test -n "$verbose" && echo " found package Xext" 1>&6
13493 echo "${as_me:-configure}:13493: testing found package Xext ..." 1>&5
13495 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
13496 cf_pkgconfig_libs="`$PKG_CONFIG --libs "Xext" 2>/dev/null`"
13497 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
13499 echo "${as_me:-configure}:13499: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13501 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
13503 echo "${as_me:-configure}:13503: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
13508 cf_new_extra_cppflags=
13510 for cf_add_cflags in $cf_pkgconfig_incs
13512 case "$cf_fix_cppflags" in
13514 case "$cf_add_cflags" in
13515 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13516 case "$cf_add_cflags" in
13518 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13520 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13521 && test -z "${cf_tst_cflags}" \
13522 && cf_fix_cppflags=yes
13524 if test "$cf_fix_cppflags" = yes ; then
13526 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13527 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13530 elif test "${cf_tst_cflags}" = "\"'" ; then
13532 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13533 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13539 case "$CPPFLAGS" in
13543 case "$cf_add_cflags" in
13545 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13547 CPPFLAGS=`echo "$CPPFLAGS" | \
13548 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13549 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13554 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13555 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13562 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13563 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13570 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13571 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13573 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13575 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13576 && test -z "${cf_tst_cflags}" \
13577 && cf_fix_cppflags=no
13582 if test -n "$cf_new_cflags" ; then
13584 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13585 CFLAGS="${CFLAGS}$cf_new_cflags"
13589 if test -n "$cf_new_cppflags" ; then
13591 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13592 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13596 if test -n "$cf_new_extra_cppflags" ; then
13598 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13599 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13603 cf_add_libs="$LIBS"
13606 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13607 # filter duplicates
13608 for cf_add_1lib in $cf_add_0lib; do
13609 for cf_add_2lib in $cf_add_libs; do
13610 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13615 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13617 LIBS="$cf_add_libs"
13624 echo "$as_me:13624: checking for XextCreateExtension in -lXext" >&5
13625 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
13626 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
13627 echo $ECHO_N "(cached) $ECHO_C" >&6
13629 ac_check_lib_save_LIBS=$LIBS
13630 LIBS="-lXext $LIBS"
13631 cat >"conftest.$ac_ext" <<_ACEOF
13632 #line 13632 "configure"
13633 #include "confdefs.h"
13635 /* Override any gcc2 internal prototype to avoid an error. */
13639 /* We use char because int might match the return type of a gcc2
13640 builtin and then its argument prototype would still apply. */
13641 char XextCreateExtension ();
13645 XextCreateExtension ();
13650 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13651 if { (eval echo "$as_me:13651: \"$ac_link\"") >&5
13652 (eval $ac_link) 2>&5
13654 echo "$as_me:13654: \$? = $ac_status" >&5
13655 (exit "$ac_status"); } &&
13656 { ac_try='test -s "conftest$ac_exeext"'
13657 { (eval echo "$as_me:13657: \"$ac_try\"") >&5
13658 (eval $ac_try) 2>&5
13660 echo "$as_me:13660: \$? = $ac_status" >&5
13661 (exit "$ac_status"); }; }; then
13662 ac_cv_lib_Xext_XextCreateExtension=yes
13664 echo "$as_me: failed program was:" >&5
13665 cat "conftest.$ac_ext" >&5
13666 ac_cv_lib_Xext_XextCreateExtension=no
13668 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13669 LIBS=$ac_check_lib_save_LIBS
13671 echo "$as_me:13671: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
13672 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
13673 if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
13675 cf_add_libs="$LIBS"
13678 for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13679 # filter duplicates
13680 for cf_add_1lib in $cf_add_0lib; do
13681 for cf_add_2lib in $cf_add_libs; do
13682 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13687 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13689 LIBS="$cf_add_libs"
13695 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
13696 # in some cases has installed dummy files in the former, other cases replaced
13697 # it with a link to the new location). This complicates the configure script.
13698 # Check for that pitfall, and recover using pkg-config
13700 # If none of these are set, the configuration is almost certainly broken.
13701 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
13704 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
13705 test -n "$verbose" && echo " found package x11" 1>&6
13707 echo "${as_me:-configure}:13707: testing found package x11 ..." 1>&5
13709 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
13710 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
13711 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
13713 echo "${as_me:-configure}:13713: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13715 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
13717 echo "${as_me:-configure}:13717: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
13722 cf_new_extra_cppflags=
13724 for cf_add_cflags in $cf_pkgconfig_incs
13726 case "$cf_fix_cppflags" in
13728 case "$cf_add_cflags" in
13729 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13730 case "$cf_add_cflags" in
13732 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13734 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13735 && test -z "${cf_tst_cflags}" \
13736 && cf_fix_cppflags=yes
13738 if test "$cf_fix_cppflags" = yes ; then
13740 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13741 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13744 elif test "${cf_tst_cflags}" = "\"'" ; then
13746 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13747 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13753 case "$CPPFLAGS" in
13757 case "$cf_add_cflags" in
13759 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13761 CPPFLAGS=`echo "$CPPFLAGS" | \
13762 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13763 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13768 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13769 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13776 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13777 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13784 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13785 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13787 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13789 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13790 && test -z "${cf_tst_cflags}" \
13791 && cf_fix_cppflags=no
13796 if test -n "$cf_new_cflags" ; then
13798 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13799 CFLAGS="${CFLAGS}$cf_new_cflags"
13803 if test -n "$cf_new_cppflags" ; then
13805 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13806 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13810 if test -n "$cf_new_extra_cppflags" ; then
13812 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13813 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13817 cf_add_libs="$LIBS"
13820 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13821 # filter duplicates
13822 for cf_add_1lib in $cf_add_0lib; do
13823 for cf_add_2lib in $cf_add_libs; do
13824 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13829 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13831 LIBS="$cf_add_libs"
13837 { echo "$as_me:13837: WARNING: unable to find X11 library" >&5
13838 echo "$as_me: WARNING: unable to find X11 library" >&2;}
13841 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
13842 test -n "$verbose" && echo " found package ice" 1>&6
13844 echo "${as_me:-configure}:13844: testing found package ice ..." 1>&5
13846 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
13847 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
13848 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
13850 echo "${as_me:-configure}:13850: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13852 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
13854 echo "${as_me:-configure}:13854: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
13859 cf_new_extra_cppflags=
13861 for cf_add_cflags in $cf_pkgconfig_incs
13863 case "$cf_fix_cppflags" in
13865 case "$cf_add_cflags" in
13866 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13867 case "$cf_add_cflags" in
13869 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13871 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13872 && test -z "${cf_tst_cflags}" \
13873 && cf_fix_cppflags=yes
13875 if test "$cf_fix_cppflags" = yes ; then
13877 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13878 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13881 elif test "${cf_tst_cflags}" = "\"'" ; then
13883 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13884 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13890 case "$CPPFLAGS" in
13894 case "$cf_add_cflags" in
13896 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13898 CPPFLAGS=`echo "$CPPFLAGS" | \
13899 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13900 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13905 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13906 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13913 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13914 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13921 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13922 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13924 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13926 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13927 && test -z "${cf_tst_cflags}" \
13928 && cf_fix_cppflags=no
13933 if test -n "$cf_new_cflags" ; then
13935 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13936 CFLAGS="${CFLAGS}$cf_new_cflags"
13940 if test -n "$cf_new_cppflags" ; then
13942 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13943 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13947 if test -n "$cf_new_extra_cppflags" ; then
13949 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13950 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13954 cf_add_libs="$LIBS"
13957 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13958 # filter duplicates
13959 for cf_add_1lib in $cf_add_0lib; do
13960 for cf_add_2lib in $cf_add_libs; do
13961 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13966 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13968 LIBS="$cf_add_libs"
13974 { echo "$as_me:13974: WARNING: unable to find ICE library" >&5
13975 echo "$as_me: WARNING: unable to find ICE library" >&2;}
13978 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
13979 test -n "$verbose" && echo " found package sm" 1>&6
13981 echo "${as_me:-configure}:13981: testing found package sm ..." 1>&5
13983 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
13984 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
13985 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
13987 echo "${as_me:-configure}:13987: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13989 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
13991 echo "${as_me:-configure}:13991: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
13996 cf_new_extra_cppflags=
13998 for cf_add_cflags in $cf_pkgconfig_incs
14000 case "$cf_fix_cppflags" in
14002 case "$cf_add_cflags" in
14003 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14004 case "$cf_add_cflags" in
14006 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14008 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14009 && test -z "${cf_tst_cflags}" \
14010 && cf_fix_cppflags=yes
14012 if test "$cf_fix_cppflags" = yes ; then
14014 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14015 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14018 elif test "${cf_tst_cflags}" = "\"'" ; then
14020 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14021 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14027 case "$CPPFLAGS" in
14031 case "$cf_add_cflags" in
14033 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14035 CPPFLAGS=`echo "$CPPFLAGS" | \
14036 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14037 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14042 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14043 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14050 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14051 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14058 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14059 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14061 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14063 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14064 && test -z "${cf_tst_cflags}" \
14065 && cf_fix_cppflags=no
14070 if test -n "$cf_new_cflags" ; then
14072 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14073 CFLAGS="${CFLAGS}$cf_new_cflags"
14077 if test -n "$cf_new_cppflags" ; then
14079 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14080 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14084 if test -n "$cf_new_extra_cppflags" ; then
14086 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14087 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14091 cf_add_libs="$LIBS"
14094 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14095 # filter duplicates
14096 for cf_add_1lib in $cf_add_0lib; do
14097 for cf_add_2lib in $cf_add_libs; do
14098 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14103 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14105 LIBS="$cf_add_libs"
14111 { echo "$as_me:14111: WARNING: unable to find SM library" >&5
14112 echo "$as_me: WARNING: unable to find SM library" >&2;}
14115 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
14116 test -n "$verbose" && echo " found package xt" 1>&6
14118 echo "${as_me:-configure}:14118: testing found package xt ..." 1>&5
14120 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
14121 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
14122 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
14124 echo "${as_me:-configure}:14124: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14126 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
14128 echo "${as_me:-configure}:14128: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
14133 cf_new_extra_cppflags=
14135 for cf_add_cflags in $cf_pkgconfig_incs
14137 case "$cf_fix_cppflags" in
14139 case "$cf_add_cflags" in
14140 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14141 case "$cf_add_cflags" in
14143 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14145 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14146 && test -z "${cf_tst_cflags}" \
14147 && cf_fix_cppflags=yes
14149 if test "$cf_fix_cppflags" = yes ; then
14151 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14152 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14155 elif test "${cf_tst_cflags}" = "\"'" ; then
14157 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14158 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14164 case "$CPPFLAGS" in
14168 case "$cf_add_cflags" in
14170 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14172 CPPFLAGS=`echo "$CPPFLAGS" | \
14173 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14174 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14179 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14180 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14187 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14188 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14195 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14196 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14198 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14200 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14201 && test -z "${cf_tst_cflags}" \
14202 && cf_fix_cppflags=no
14207 if test -n "$cf_new_cflags" ; then
14209 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14210 CFLAGS="${CFLAGS}$cf_new_cflags"
14214 if test -n "$cf_new_cppflags" ; then
14216 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14217 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14221 if test -n "$cf_new_extra_cppflags" ; then
14223 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14224 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14228 cf_add_libs="$LIBS"
14231 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14232 # filter duplicates
14233 for cf_add_1lib in $cf_add_0lib; do
14234 for cf_add_2lib in $cf_add_libs; do
14235 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14240 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14242 LIBS="$cf_add_libs"
14248 { echo "$as_me:14248: WARNING: unable to find Xt library" >&5
14249 echo "$as_me: WARNING: unable to find Xt library" >&2;}
14253 LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
14258 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
14259 test -n "$verbose" && echo " found package xt" 1>&6
14261 echo "${as_me:-configure}:14261: testing found package xt ..." 1>&5
14263 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
14264 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
14265 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
14267 echo "${as_me:-configure}:14267: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14269 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
14271 echo "${as_me:-configure}:14271: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
14276 cf_new_extra_cppflags=
14278 for cf_add_cflags in $cf_pkgconfig_incs
14280 case "$cf_fix_cppflags" in
14282 case "$cf_add_cflags" in
14283 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14284 case "$cf_add_cflags" in
14286 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14288 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14289 && test -z "${cf_tst_cflags}" \
14290 && cf_fix_cppflags=yes
14292 if test "$cf_fix_cppflags" = yes ; then
14294 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14295 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14298 elif test "${cf_tst_cflags}" = "\"'" ; then
14300 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14301 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14307 case "$CPPFLAGS" in
14311 case "$cf_add_cflags" in
14313 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14315 CPPFLAGS=`echo "$CPPFLAGS" | \
14316 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14317 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14322 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14323 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14330 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14331 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14338 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14339 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14341 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14343 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14344 && test -z "${cf_tst_cflags}" \
14345 && cf_fix_cppflags=no
14350 if test -n "$cf_new_cflags" ; then
14352 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14353 CFLAGS="${CFLAGS}$cf_new_cflags"
14357 if test -n "$cf_new_cppflags" ; then
14359 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14360 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14364 if test -n "$cf_new_extra_cppflags" ; then
14366 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14367 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14371 cf_add_libs="$LIBS"
14374 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14375 # filter duplicates
14376 for cf_add_1lib in $cf_add_0lib; do
14377 for cf_add_2lib in $cf_add_libs; do
14378 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14383 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14385 LIBS="$cf_add_libs"
14391 # we have an "xt" package, but it may omit Xt's dependency on X11
14392 echo "$as_me:14392: checking for usable X dependency" >&5
14393 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
14394 if test "${cf_cv_xt_x11_compat+set}" = set; then
14395 echo $ECHO_N "(cached) $ECHO_C" >&6
14398 cat >"conftest.$ac_ext" <<_ACEOF
14399 #line 14399 "configure"
14400 #include "confdefs.h"
14402 #include <X11/Xlib.h>
14408 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
14409 int rc2 = XClearWindow((Display*) 0, (Window) 0);
14410 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
14411 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
14417 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14418 if { (eval echo "$as_me:14418: \"$ac_link\"") >&5
14419 (eval $ac_link) 2>&5
14421 echo "$as_me:14421: \$? = $ac_status" >&5
14422 (exit "$ac_status"); } &&
14423 { ac_try='test -s "conftest$ac_exeext"'
14424 { (eval echo "$as_me:14424: \"$ac_try\"") >&5
14425 (eval $ac_try) 2>&5
14427 echo "$as_me:14427: \$? = $ac_status" >&5
14428 (exit "$ac_status"); }; }; then
14429 cf_cv_xt_x11_compat=yes
14431 echo "$as_me: failed program was:" >&5
14432 cat "conftest.$ac_ext" >&5
14433 cf_cv_xt_x11_compat=no
14435 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14437 echo "$as_me:14437: result: $cf_cv_xt_x11_compat" >&5
14438 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
14439 if test "$cf_cv_xt_x11_compat" = no
14441 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
14443 echo "${as_me:-configure}:14443: testing work around broken X11 dependency ..." 1>&5
14445 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
14447 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
14448 test -n "$verbose" && echo " found package x11" 1>&6
14450 echo "${as_me:-configure}:14450: testing found package x11 ..." 1>&5
14452 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
14453 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
14454 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
14456 echo "${as_me:-configure}:14456: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14458 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
14460 echo "${as_me:-configure}:14460: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
14465 cf_new_extra_cppflags=
14467 for cf_add_cflags in $cf_pkgconfig_incs
14469 case "$cf_fix_cppflags" in
14471 case "$cf_add_cflags" in
14472 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14473 case "$cf_add_cflags" in
14475 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14477 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14478 && test -z "${cf_tst_cflags}" \
14479 && cf_fix_cppflags=yes
14481 if test "$cf_fix_cppflags" = yes ; then
14483 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14484 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14487 elif test "${cf_tst_cflags}" = "\"'" ; then
14489 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14490 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14496 case "$CPPFLAGS" in
14500 case "$cf_add_cflags" in
14502 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14504 CPPFLAGS=`echo "$CPPFLAGS" | \
14505 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14506 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14511 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14512 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14519 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14520 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14527 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14528 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14530 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14532 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14533 && test -z "${cf_tst_cflags}" \
14534 && cf_fix_cppflags=no
14539 if test -n "$cf_new_cflags" ; then
14541 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14542 CFLAGS="${CFLAGS}$cf_new_cflags"
14546 if test -n "$cf_new_cppflags" ; then
14548 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14549 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14553 if test -n "$cf_new_extra_cppflags" ; then
14555 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14556 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14560 cf_add_libs="$LIBS"
14563 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14564 # filter duplicates
14565 for cf_add_1lib in $cf_add_0lib; do
14566 for cf_add_2lib in $cf_add_libs; do
14567 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14572 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14574 LIBS="$cf_add_libs"
14581 test -n "$verbose" && echo " ...before $LIBS" 1>&6
14583 echo "${as_me:-configure}:14583: testing ...before $LIBS ..." 1>&5
14585 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
14586 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14588 echo "${as_me:-configure}:14588: testing ...after $LIBS ..." 1>&5
14596 echo "$as_me:14596: checking for usable X Toolkit package" >&5
14597 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
14598 if test "${cf_cv_xt_ice_compat+set}" = set; then
14599 echo $ECHO_N "(cached) $ECHO_C" >&6
14602 cat >"conftest.$ac_ext" <<_ACEOF
14603 #line 14603 "configure"
14604 #include "confdefs.h"
14606 #include <X11/Shell.h>
14611 int num = IceConnectionNumber(0); (void) num
14617 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14618 if { (eval echo "$as_me:14618: \"$ac_link\"") >&5
14619 (eval $ac_link) 2>&5
14621 echo "$as_me:14621: \$? = $ac_status" >&5
14622 (exit "$ac_status"); } &&
14623 { ac_try='test -s "conftest$ac_exeext"'
14624 { (eval echo "$as_me:14624: \"$ac_try\"") >&5
14625 (eval $ac_try) 2>&5
14627 echo "$as_me:14627: \$? = $ac_status" >&5
14628 (exit "$ac_status"); }; }; then
14629 cf_cv_xt_ice_compat=yes
14631 echo "$as_me: failed program was:" >&5
14632 cat "conftest.$ac_ext" >&5
14633 cf_cv_xt_ice_compat=no
14635 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14637 echo "$as_me:14637: result: $cf_cv_xt_ice_compat" >&5
14638 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
14640 if test "$cf_cv_xt_ice_compat" = no
14642 # workaround for broken ".pc" files used for X Toolkit.
14643 case "x$X_PRE_LIBS" in
14649 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
14651 echo "${as_me:-configure}:14651: testing work around broken ICE dependency ..." 1>&5
14653 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
14654 test -n "$verbose" && echo " found package ice" 1>&6
14656 echo "${as_me:-configure}:14656: testing found package ice ..." 1>&5
14658 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
14659 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
14660 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
14662 echo "${as_me:-configure}:14662: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14664 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
14666 echo "${as_me:-configure}:14666: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
14671 cf_new_extra_cppflags=
14673 for cf_add_cflags in $cf_pkgconfig_incs
14675 case "$cf_fix_cppflags" in
14677 case "$cf_add_cflags" in
14678 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14679 case "$cf_add_cflags" in
14681 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14683 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14684 && test -z "${cf_tst_cflags}" \
14685 && cf_fix_cppflags=yes
14687 if test "$cf_fix_cppflags" = yes ; then
14689 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14690 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14693 elif test "${cf_tst_cflags}" = "\"'" ; then
14695 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14696 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14702 case "$CPPFLAGS" in
14706 case "$cf_add_cflags" in
14708 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14710 CPPFLAGS=`echo "$CPPFLAGS" | \
14711 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14712 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14717 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14718 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14725 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14726 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14733 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14734 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14736 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14738 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14739 && test -z "${cf_tst_cflags}" \
14740 && cf_fix_cppflags=no
14745 if test -n "$cf_new_cflags" ; then
14747 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14748 CFLAGS="${CFLAGS}$cf_new_cflags"
14752 if test -n "$cf_new_cppflags" ; then
14754 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14755 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14759 if test -n "$cf_new_extra_cppflags" ; then
14761 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14762 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14766 cf_add_libs="$LIBS"
14769 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14770 # filter duplicates
14771 for cf_add_1lib in $cf_add_0lib; do
14772 for cf_add_2lib in $cf_add_libs; do
14773 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14778 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14780 LIBS="$cf_add_libs"
14782 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
14783 test -n "$verbose" && echo " found package sm" 1>&6
14785 echo "${as_me:-configure}:14785: testing found package sm ..." 1>&5
14787 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
14788 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
14789 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
14791 echo "${as_me:-configure}:14791: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14793 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
14795 echo "${as_me:-configure}:14795: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
14800 cf_new_extra_cppflags=
14802 for cf_add_cflags in $cf_pkgconfig_incs
14804 case "$cf_fix_cppflags" in
14806 case "$cf_add_cflags" in
14807 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14808 case "$cf_add_cflags" in
14810 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14812 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14813 && test -z "${cf_tst_cflags}" \
14814 && cf_fix_cppflags=yes
14816 if test "$cf_fix_cppflags" = yes ; then
14818 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14819 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14822 elif test "${cf_tst_cflags}" = "\"'" ; then
14824 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14825 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14831 case "$CPPFLAGS" in
14835 case "$cf_add_cflags" in
14837 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14839 CPPFLAGS=`echo "$CPPFLAGS" | \
14840 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14841 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14846 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14847 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14854 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14855 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14862 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14863 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14865 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14867 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14868 && test -z "${cf_tst_cflags}" \
14869 && cf_fix_cppflags=no
14874 if test -n "$cf_new_cflags" ; then
14876 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14877 CFLAGS="${CFLAGS}$cf_new_cflags"
14881 if test -n "$cf_new_cppflags" ; then
14883 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14884 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14888 if test -n "$cf_new_extra_cppflags" ; then
14890 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14891 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14895 cf_add_libs="$LIBS"
14898 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14899 # filter duplicates
14900 for cf_add_1lib in $cf_add_0lib; do
14901 for cf_add_2lib in $cf_add_libs; do
14902 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14907 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14909 LIBS="$cf_add_libs"
14922 test -n "$verbose" && echo " ...before $LIBS" 1>&6
14924 echo "${as_me:-configure}:14924: testing ...before $LIBS ..." 1>&5
14926 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
14927 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14929 echo "${as_me:-configure}:14929: testing ...after $LIBS ..." 1>&5
14945 LDFLAGS="$X_LIBS $LDFLAGS"
14947 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
14949 echo "${as_me:-configure}:14949: testing checking additions to CFLAGS ..." 1>&5
14951 cf_check_cflags="$CFLAGS"
14952 cf_check_cppflags="$CPPFLAGS"
14957 cf_new_extra_cppflags=
14959 for cf_add_cflags in $X_CFLAGS
14961 case "$cf_fix_cppflags" in
14963 case "$cf_add_cflags" in
14964 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14965 case "$cf_add_cflags" in
14967 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14969 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14970 && test -z "${cf_tst_cflags}" \
14971 && cf_fix_cppflags=yes
14973 if test "$cf_fix_cppflags" = yes ; then
14975 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14976 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14979 elif test "${cf_tst_cflags}" = "\"'" ; then
14981 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14982 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14988 case "$CPPFLAGS" in
14992 case "$cf_add_cflags" in
14994 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14996 CPPFLAGS=`echo "$CPPFLAGS" | \
14997 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14998 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15003 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15004 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15011 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15012 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15019 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15020 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15022 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15024 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15025 && test -z "${cf_tst_cflags}" \
15026 && cf_fix_cppflags=no
15031 if test -n "$cf_new_cflags" ; then
15032 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
15034 echo "${as_me:-configure}:15034: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
15036 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15037 CFLAGS="${CFLAGS}$cf_new_cflags"
15041 if test -n "$cf_new_cppflags" ; then
15042 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
15044 echo "${as_me:-configure}:15044: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
15046 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15047 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15051 if test -n "$cf_new_extra_cppflags" ; then
15052 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
15054 echo "${as_me:-configure}:15054: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
15056 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15057 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15061 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
15062 cat >"conftest.$ac_ext" <<_ACEOF
15063 #line 15063 "configure"
15064 #include "confdefs.h"
15069 printf("Hello world");
15074 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15075 if { (eval echo "$as_me:15075: \"$ac_link\"") >&5
15076 (eval $ac_link) 2>&5
15078 echo "$as_me:15078: \$? = $ac_status" >&5
15079 (exit "$ac_status"); } &&
15080 { ac_try='test -s "conftest$ac_exeext"'
15081 { (eval echo "$as_me:15081: \"$ac_try\"") >&5
15082 (eval $ac_try) 2>&5
15084 echo "$as_me:15084: \$? = $ac_status" >&5
15085 (exit "$ac_status"); }; }; then
15088 echo "$as_me: failed program was:" >&5
15089 cat "conftest.$ac_ext" >&5
15090 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
15092 echo "${as_me:-configure}:15092: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
15094 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
15095 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
15097 echo "${as_me:-configure}:15097: testing but keeping change to \$CPPFLAGS ..." 1>&5
15100 CFLAGS="$cf_check_cflags"
15102 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15105 echo "$as_me:15105: checking for XOpenDisplay" >&5
15106 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
15107 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
15108 echo $ECHO_N "(cached) $ECHO_C" >&6
15110 cat >"conftest.$ac_ext" <<_ACEOF
15111 #line 15111 "configure"
15112 #include "confdefs.h"
15113 #define XOpenDisplay autoconf_temporary
15114 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15115 #undef XOpenDisplay
15121 /* We use char because int might match the return type of a gcc2
15122 builtin and then its argument prototype would still apply. */
15123 char XOpenDisplay (void);
15129 /* The GNU C library defines stubs for functions which it implements
15130 to always fail with ENOSYS. Some functions are actually named
15131 something starting with __ and the normal name is an alias. */
15132 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
15133 #error found stub for XOpenDisplay
15136 return XOpenDisplay ();
15141 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15142 if { (eval echo "$as_me:15142: \"$ac_link\"") >&5
15143 (eval $ac_link) 2>&5
15145 echo "$as_me:15145: \$? = $ac_status" >&5
15146 (exit "$ac_status"); } &&
15147 { ac_try='test -s "conftest$ac_exeext"'
15148 { (eval echo "$as_me:15148: \"$ac_try\"") >&5
15149 (eval $ac_try) 2>&5
15151 echo "$as_me:15151: \$? = $ac_status" >&5
15152 (exit "$ac_status"); }; }; then
15153 ac_cv_func_XOpenDisplay=yes
15155 echo "$as_me: failed program was:" >&5
15156 cat "conftest.$ac_ext" >&5
15157 ac_cv_func_XOpenDisplay=no
15159 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15161 echo "$as_me:15161: result: $ac_cv_func_XOpenDisplay" >&5
15162 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
15163 if test "$ac_cv_func_XOpenDisplay" = yes; then
15167 echo "$as_me:15167: checking for XOpenDisplay in -lX11" >&5
15168 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
15169 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
15170 echo $ECHO_N "(cached) $ECHO_C" >&6
15172 ac_check_lib_save_LIBS=$LIBS
15174 cat >"conftest.$ac_ext" <<_ACEOF
15175 #line 15175 "configure"
15176 #include "confdefs.h"
15178 /* Override any gcc2 internal prototype to avoid an error. */
15182 /* We use char because int might match the return type of a gcc2
15183 builtin and then its argument prototype would still apply. */
15184 char XOpenDisplay ();
15193 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15194 if { (eval echo "$as_me:15194: \"$ac_link\"") >&5
15195 (eval $ac_link) 2>&5
15197 echo "$as_me:15197: \$? = $ac_status" >&5
15198 (exit "$ac_status"); } &&
15199 { ac_try='test -s "conftest$ac_exeext"'
15200 { (eval echo "$as_me:15200: \"$ac_try\"") >&5
15201 (eval $ac_try) 2>&5
15203 echo "$as_me:15203: \$? = $ac_status" >&5
15204 (exit "$ac_status"); }; }; then
15205 ac_cv_lib_X11_XOpenDisplay=yes
15207 echo "$as_me: failed program was:" >&5
15208 cat "conftest.$ac_ext" >&5
15209 ac_cv_lib_X11_XOpenDisplay=no
15211 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15212 LIBS=$ac_check_lib_save_LIBS
15214 echo "$as_me:15214: result: $ac_cv_lib_X11_XOpenDisplay" >&5
15215 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
15216 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
15218 cf_add_libs="$LIBS"
15221 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15222 # filter duplicates
15223 for cf_add_1lib in $cf_add_0lib; do
15224 for cf_add_2lib in $cf_add_libs; do
15225 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15230 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15232 LIBS="$cf_add_libs"
15238 echo "$as_me:15238: checking for XtAppInitialize" >&5
15239 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
15240 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
15241 echo $ECHO_N "(cached) $ECHO_C" >&6
15243 cat >"conftest.$ac_ext" <<_ACEOF
15244 #line 15244 "configure"
15245 #include "confdefs.h"
15246 #define XtAppInitialize autoconf_temporary
15247 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15248 #undef XtAppInitialize
15254 /* We use char because int might match the return type of a gcc2
15255 builtin and then its argument prototype would still apply. */
15256 char XtAppInitialize (void);
15262 /* The GNU C library defines stubs for functions which it implements
15263 to always fail with ENOSYS. Some functions are actually named
15264 something starting with __ and the normal name is an alias. */
15265 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
15266 #error found stub for XtAppInitialize
15269 return XtAppInitialize ();
15274 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15275 if { (eval echo "$as_me:15275: \"$ac_link\"") >&5
15276 (eval $ac_link) 2>&5
15278 echo "$as_me:15278: \$? = $ac_status" >&5
15279 (exit "$ac_status"); } &&
15280 { ac_try='test -s "conftest$ac_exeext"'
15281 { (eval echo "$as_me:15281: \"$ac_try\"") >&5
15282 (eval $ac_try) 2>&5
15284 echo "$as_me:15284: \$? = $ac_status" >&5
15285 (exit "$ac_status"); }; }; then
15286 ac_cv_func_XtAppInitialize=yes
15288 echo "$as_me: failed program was:" >&5
15289 cat "conftest.$ac_ext" >&5
15290 ac_cv_func_XtAppInitialize=no
15292 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15294 echo "$as_me:15294: result: $ac_cv_func_XtAppInitialize" >&5
15295 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
15296 if test "$ac_cv_func_XtAppInitialize" = yes; then
15300 echo "$as_me:15300: checking for XtAppInitialize in -lXt" >&5
15301 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
15302 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
15303 echo $ECHO_N "(cached) $ECHO_C" >&6
15305 ac_check_lib_save_LIBS=$LIBS
15307 cat >"conftest.$ac_ext" <<_ACEOF
15308 #line 15308 "configure"
15309 #include "confdefs.h"
15311 /* Override any gcc2 internal prototype to avoid an error. */
15315 /* We use char because int might match the return type of a gcc2
15316 builtin and then its argument prototype would still apply. */
15317 char XtAppInitialize ();
15321 XtAppInitialize ();
15326 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15327 if { (eval echo "$as_me:15327: \"$ac_link\"") >&5
15328 (eval $ac_link) 2>&5
15330 echo "$as_me:15330: \$? = $ac_status" >&5
15331 (exit "$ac_status"); } &&
15332 { ac_try='test -s "conftest$ac_exeext"'
15333 { (eval echo "$as_me:15333: \"$ac_try\"") >&5
15334 (eval $ac_try) 2>&5
15336 echo "$as_me:15336: \$? = $ac_status" >&5
15337 (exit "$ac_status"); }; }; then
15338 ac_cv_lib_Xt_XtAppInitialize=yes
15340 echo "$as_me: failed program was:" >&5
15341 cat "conftest.$ac_ext" >&5
15342 ac_cv_lib_Xt_XtAppInitialize=no
15344 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15345 LIBS=$ac_check_lib_save_LIBS
15347 echo "$as_me:15347: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
15348 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
15349 if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
15351 cat >>confdefs.h <<\EOF
15352 #define HAVE_LIBXT 1
15363 if test "$cf_have_X_LIBS" = no ; then
15364 { echo "$as_me:15364: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15365 test program. You will have to check and add the proper libraries by hand
15367 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15368 test program. You will have to check and add the proper libraries by hand
15369 to makefile." >&2;}
15372 cf_x_athena_root=$cf_x_athena
15375 for cf_path in default \
15376 /usr/contrib/X11R6 \
15377 /usr/contrib/X11R5 \
15381 if test -z "$cf_x_athena_inc" ; then
15383 cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
15384 cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
15385 cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
15386 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15387 for cf_X_CFLAGS in $X_CFLAGS
15389 case "x$cf_X_CFLAGS" in
15391 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15394 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15399 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
15400 if test "$cf_path" != default ; then
15402 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15403 CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
15405 echo "$as_me:15405: checking for $cf_test in $cf_path" >&5
15406 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
15408 echo "$as_me:15408: checking for $cf_test" >&5
15409 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
15411 cat >"conftest.$ac_ext" <<_ACEOF
15412 #line 15412 "configure"
15413 #include "confdefs.h"
15415 #include <X11/Intrinsic.h>
15416 #include <$cf_test>
15425 rm -f "conftest.$ac_objext"
15426 if { (eval echo "$as_me:15426: \"$ac_compile\"") >&5
15427 (eval $ac_compile) 2>&5
15429 echo "$as_me:15429: \$? = $ac_status" >&5
15430 (exit "$ac_status"); } &&
15431 { ac_try='test -s "conftest.$ac_objext"'
15432 { (eval echo "$as_me:15432: \"$ac_try\"") >&5
15433 (eval $ac_try) 2>&5
15435 echo "$as_me:15435: \$? = $ac_status" >&5
15436 (exit "$ac_status"); }; }; then
15439 echo "$as_me: failed program was:" >&5
15440 cat "conftest.$ac_ext" >&5
15443 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15444 echo "$as_me:15444: result: $cf_result" >&5
15445 echo "${ECHO_T}$cf_result" >&6
15447 LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
15448 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
15449 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
15451 if test "$cf_result" = yes ; then
15452 test "$cf_path" = default && cf_x_athena_inc=default
15453 test "$cf_path" != default && cf_x_athena_inc="$cf_path/include"
15459 if test -z "$cf_x_athena_inc" ; then
15460 { echo "$as_me:15460: WARNING: Unable to find Athena header files" >&5
15461 echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
15462 elif test "$cf_x_athena_inc" != default ; then
15464 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15465 CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
15469 cf_x_athena_root=$cf_x_athena
15472 for cf_path in default \
15473 /usr/contrib/X11R6 \
15474 /usr/contrib/X11R5 \
15479 ${cf_x_athena_root} \
15480 ${cf_x_athena_root}7 \
15481 ${cf_x_athena_root}6
15484 "-l$cf_lib -lXmu" \
15485 "-l$cf_lib -lXpm -lXmu" \
15486 "-l${cf_lib}_s -lXmu_s"
15488 test -n "$cf_x_athena_lib" && break
15490 cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
15491 cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
15492 cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
15493 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15494 for cf_X_CFLAGS in $X_CFLAGS
15496 case "x$cf_X_CFLAGS" in
15498 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15501 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15506 cf_test=XawSimpleMenuAddGlobalActions
15507 test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
15509 cf_add_libs="$LIBS"
15512 for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15513 # filter duplicates
15514 for cf_add_1lib in $cf_add_0lib; do
15515 for cf_add_2lib in $cf_add_libs; do
15516 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15521 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15523 LIBS="$cf_add_libs"
15525 echo "$as_me:15525: checking for $cf_test in $cf_libs" >&5
15526 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
15527 cat >"conftest.$ac_ext" <<_ACEOF
15528 #line 15528 "configure"
15529 #include "confdefs.h"
15531 #include <X11/Intrinsic.h>
15532 #include <X11/$cf_x_athena_root/SimpleMenu.h>
15538 $cf_test((XtAppContext) 0)
15543 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15544 if { (eval echo "$as_me:15544: \"$ac_link\"") >&5
15545 (eval $ac_link) 2>&5
15547 echo "$as_me:15547: \$? = $ac_status" >&5
15548 (exit "$ac_status"); } &&
15549 { ac_try='test -s "conftest$ac_exeext"'
15550 { (eval echo "$as_me:15550: \"$ac_try\"") >&5
15551 (eval $ac_try) 2>&5
15553 echo "$as_me:15553: \$? = $ac_status" >&5
15554 (exit "$ac_status"); }; }; then
15557 echo "$as_me: failed program was:" >&5
15558 cat "conftest.$ac_ext" >&5
15561 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15562 echo "$as_me:15562: result: $cf_result" >&5
15563 echo "${ECHO_T}$cf_result" >&6
15565 LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
15566 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
15567 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
15569 if test "$cf_result" = yes ; then
15570 cf_x_athena_lib="$cf_libs"
15574 test -n "$cf_x_athena_lib" && break
15578 if test -z "$cf_x_athena_lib" ; then
15579 { { echo "$as_me:15579: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
15580 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
15581 { (exit 1); exit 1; }; }
15584 cf_add_libs="$LIBS"
15587 for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15588 # filter duplicates
15589 for cf_add_1lib in $cf_add_0lib; do
15590 for cf_add_2lib in $cf_add_libs; do
15591 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15596 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15598 LIBS="$cf_add_libs"
15600 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15602 cat >>confdefs.h <<EOF
15603 #define $cf_x_athena_LIBS 1
15608 if test -n "$ac_tool_prefix"; then
15609 for ac_prog in xcurses-config
15611 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
15612 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
15613 echo "$as_me:15613: checking for $ac_word" >&5
15614 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15615 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
15616 echo $ECHO_N "(cached) $ECHO_C" >&6
15618 if test -n "$XCURSES_CONFIG"; then
15619 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
15621 ac_save_IFS=$IFS; IFS=$ac_path_separator
15623 for ac_dir in $ac_dummy; do
15625 test -z "$ac_dir" && ac_dir=.
15626 $as_executable_p "$ac_dir/$ac_word" || continue
15627 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
15628 echo "$as_me:15628: found $ac_dir/$ac_word" >&5
15634 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
15635 if test -n "$XCURSES_CONFIG"; then
15636 echo "$as_me:15636: result: $XCURSES_CONFIG" >&5
15637 echo "${ECHO_T}$XCURSES_CONFIG" >&6
15639 echo "$as_me:15639: result: no" >&5
15640 echo "${ECHO_T}no" >&6
15643 test -n "$XCURSES_CONFIG" && break
15646 if test -z "$XCURSES_CONFIG"; then
15647 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
15648 for ac_prog in xcurses-config
15650 # Extract the first word of "$ac_prog", so it can be a program name with args.
15651 set dummy $ac_prog; ac_word=$2
15652 echo "$as_me:15652: checking for $ac_word" >&5
15653 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15654 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
15655 echo $ECHO_N "(cached) $ECHO_C" >&6
15657 if test -n "$ac_ct_XCURSES_CONFIG"; then
15658 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
15660 ac_save_IFS=$IFS; IFS=$ac_path_separator
15662 for ac_dir in $ac_dummy; do
15664 test -z "$ac_dir" && ac_dir=.
15665 $as_executable_p "$ac_dir/$ac_word" || continue
15666 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
15667 echo "$as_me:15667: found $ac_dir/$ac_word" >&5
15673 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
15674 if test -n "$ac_ct_XCURSES_CONFIG"; then
15675 echo "$as_me:15675: result: $ac_ct_XCURSES_CONFIG" >&5
15676 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
15678 echo "$as_me:15678: result: no" >&5
15679 echo "${ECHO_T}no" >&6
15682 test -n "$ac_ct_XCURSES_CONFIG" && break
15684 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
15686 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
15689 if test "$XCURSES_CONFIG" != none ; then
15694 cf_new_extra_cppflags=
15696 for cf_add_cflags in `$XCURSES_CONFIG --cflags`
15698 case "$cf_fix_cppflags" in
15700 case "$cf_add_cflags" in
15701 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15702 case "$cf_add_cflags" in
15704 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15706 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15707 && test -z "${cf_tst_cflags}" \
15708 && cf_fix_cppflags=yes
15710 if test "$cf_fix_cppflags" = yes ; then
15712 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15713 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15716 elif test "${cf_tst_cflags}" = "\"'" ; then
15718 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15719 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15725 case "$CPPFLAGS" in
15729 case "$cf_add_cflags" in
15731 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15733 CPPFLAGS=`echo "$CPPFLAGS" | \
15734 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15735 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15740 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15741 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15748 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15749 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15756 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15757 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15759 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15761 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15762 && test -z "${cf_tst_cflags}" \
15763 && cf_fix_cppflags=no
15768 if test -n "$cf_new_cflags" ; then
15770 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15771 CFLAGS="${CFLAGS}$cf_new_cflags"
15775 if test -n "$cf_new_cppflags" ; then
15777 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15778 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15782 if test -n "$cf_new_extra_cppflags" ; then
15784 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15785 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15789 cf_add_libs="$LIBS"
15792 for cf_add_1lib in `$XCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15793 # filter duplicates
15794 for cf_add_1lib in $cf_add_0lib; do
15795 for cf_add_2lib in $cf_add_libs; do
15796 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15801 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15803 LIBS="$cf_add_libs"
15805 cf_cv_lib_XCurses=yes
15809 LDFLAGS="$LDFLAGS $X_LIBS"
15811 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
15813 echo "${as_me:-configure}:15813: testing checking additions to CFLAGS ..." 1>&5
15815 cf_check_cflags="$CFLAGS"
15816 cf_check_cppflags="$CPPFLAGS"
15821 cf_new_extra_cppflags=
15823 for cf_add_cflags in $X_CFLAGS
15825 case "$cf_fix_cppflags" in
15827 case "$cf_add_cflags" in
15828 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15829 case "$cf_add_cflags" in
15831 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15833 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15834 && test -z "${cf_tst_cflags}" \
15835 && cf_fix_cppflags=yes
15837 if test "$cf_fix_cppflags" = yes ; then
15839 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15840 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15843 elif test "${cf_tst_cflags}" = "\"'" ; then
15845 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15846 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15852 case "$CPPFLAGS" in
15856 case "$cf_add_cflags" in
15858 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15860 CPPFLAGS=`echo "$CPPFLAGS" | \
15861 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15862 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15867 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15868 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15875 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15876 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15883 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15884 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15886 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15888 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15889 && test -z "${cf_tst_cflags}" \
15890 && cf_fix_cppflags=no
15895 if test -n "$cf_new_cflags" ; then
15896 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
15898 echo "${as_me:-configure}:15898: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
15900 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15901 CFLAGS="${CFLAGS}$cf_new_cflags"
15905 if test -n "$cf_new_cppflags" ; then
15906 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
15908 echo "${as_me:-configure}:15908: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
15910 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15911 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15915 if test -n "$cf_new_extra_cppflags" ; then
15916 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
15918 echo "${as_me:-configure}:15918: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
15920 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15921 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15925 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
15926 cat >"conftest.$ac_ext" <<_ACEOF
15927 #line 15927 "configure"
15928 #include "confdefs.h"
15933 printf("Hello world");
15938 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15939 if { (eval echo "$as_me:15939: \"$ac_link\"") >&5
15940 (eval $ac_link) 2>&5
15942 echo "$as_me:15942: \$? = $ac_status" >&5
15943 (exit "$ac_status"); } &&
15944 { ac_try='test -s "conftest$ac_exeext"'
15945 { (eval echo "$as_me:15945: \"$ac_try\"") >&5
15946 (eval $ac_try) 2>&5
15948 echo "$as_me:15948: \$? = $ac_status" >&5
15949 (exit "$ac_status"); }; }; then
15952 echo "$as_me: failed program was:" >&5
15953 cat "conftest.$ac_ext" >&5
15954 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
15956 echo "${as_me:-configure}:15956: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
15958 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
15959 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
15961 echo "${as_me:-configure}:15961: testing but keeping change to \$CPPFLAGS ..." 1>&5
15964 CFLAGS="$cf_check_cflags"
15966 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15969 echo "$as_me:15969: checking for XOpenDisplay in -lX11" >&5
15970 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
15971 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
15972 echo $ECHO_N "(cached) $ECHO_C" >&6
15974 ac_check_lib_save_LIBS=$LIBS
15975 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
15976 cat >"conftest.$ac_ext" <<_ACEOF
15977 #line 15977 "configure"
15978 #include "confdefs.h"
15980 /* Override any gcc2 internal prototype to avoid an error. */
15984 /* We use char because int might match the return type of a gcc2
15985 builtin and then its argument prototype would still apply. */
15986 char XOpenDisplay ();
15995 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15996 if { (eval echo "$as_me:15996: \"$ac_link\"") >&5
15997 (eval $ac_link) 2>&5
15999 echo "$as_me:15999: \$? = $ac_status" >&5
16000 (exit "$ac_status"); } &&
16001 { ac_try='test -s "conftest$ac_exeext"'
16002 { (eval echo "$as_me:16002: \"$ac_try\"") >&5
16003 (eval $ac_try) 2>&5
16005 echo "$as_me:16005: \$? = $ac_status" >&5
16006 (exit "$ac_status"); }; }; then
16007 ac_cv_lib_X11_XOpenDisplay=yes
16009 echo "$as_me: failed program was:" >&5
16010 cat "conftest.$ac_ext" >&5
16011 ac_cv_lib_X11_XOpenDisplay=no
16013 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16014 LIBS=$ac_check_lib_save_LIBS
16016 echo "$as_me:16016: result: $ac_cv_lib_X11_XOpenDisplay" >&5
16017 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
16018 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
16020 cf_add_libs="$LIBS"
16023 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16024 # filter duplicates
16025 for cf_add_1lib in $cf_add_0lib; do
16026 for cf_add_2lib in $cf_add_libs; do
16027 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16032 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16034 LIBS="$cf_add_libs"
16038 echo "$as_me:16038: checking for XCurses library" >&5
16039 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
16040 if test "${cf_cv_lib_XCurses+set}" = set; then
16041 echo $ECHO_N "(cached) $ECHO_C" >&6
16044 cf_add_libs="$LIBS"
16047 for cf_add_1lib in -lXCurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16048 # filter duplicates
16049 for cf_add_1lib in $cf_add_0lib; do
16050 for cf_add_2lib in $cf_add_libs; do
16051 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16056 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16058 LIBS="$cf_add_libs"
16060 cat >"conftest.$ac_ext" <<_ACEOF
16061 #line 16061 "configure"
16062 #include "confdefs.h"
16064 #include <xcurses.h>
16065 char *XCursesProgramName = "test";
16075 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16076 if { (eval echo "$as_me:16076: \"$ac_link\"") >&5
16077 (eval $ac_link) 2>&5
16079 echo "$as_me:16079: \$? = $ac_status" >&5
16080 (exit "$ac_status"); } &&
16081 { ac_try='test -s "conftest$ac_exeext"'
16082 { (eval echo "$as_me:16082: \"$ac_try\"") >&5
16083 (eval $ac_try) 2>&5
16085 echo "$as_me:16085: \$? = $ac_status" >&5
16086 (exit "$ac_status"); }; }; then
16087 cf_cv_lib_XCurses=yes
16089 echo "$as_me: failed program was:" >&5
16090 cat "conftest.$ac_ext" >&5
16091 cf_cv_lib_XCurses=no
16093 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16096 echo "$as_me:16096: result: $cf_cv_lib_XCurses" >&5
16097 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
16101 if test "$cf_cv_lib_XCurses" = yes ; then
16103 cat >>confdefs.h <<\EOF
16107 cat >>confdefs.h <<\EOF
16111 echo "$as_me:16111: checking for xcurses.h" >&5
16112 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
16113 if test "${ac_cv_header_xcurses_h+set}" = set; then
16114 echo $ECHO_N "(cached) $ECHO_C" >&6
16116 cat >"conftest.$ac_ext" <<_ACEOF
16117 #line 16117 "configure"
16118 #include "confdefs.h"
16119 #include <xcurses.h>
16121 if { (eval echo "$as_me:16121: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16122 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16124 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16126 cat conftest.err >&5
16127 echo "$as_me:16127: \$? = $ac_status" >&5
16128 (exit "$ac_status"); } >/dev/null; then
16129 if test -s conftest.err; then
16130 ac_cpp_err=$ac_c_preproc_warn_flag
16137 if test -z "$ac_cpp_err"; then
16138 ac_cv_header_xcurses_h=yes
16140 echo "$as_me: failed program was:" >&5
16141 cat "conftest.$ac_ext" >&5
16142 ac_cv_header_xcurses_h=no
16144 rm -f conftest.err "conftest.$ac_ext"
16146 echo "$as_me:16146: result: $ac_cv_header_xcurses_h" >&5
16147 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
16148 if test "$ac_cv_header_xcurses_h" = yes; then
16150 cat >>confdefs.h <<\EOF
16151 #define HAVE_XCURSES 1
16157 { { echo "$as_me:16157: error: Cannot link with XCurses" >&5
16158 echo "$as_me: error: Cannot link with XCurses" >&2;}
16159 { (exit 1); exit 1; }; }
16164 { { echo "$as_me:16164: error: unexpected screen-value: $cf_cv_screen" >&5
16165 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
16166 { (exit 1); exit 1; }; }
16170 : ${cf_nculib_root:=$cf_cv_screen}
16171 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
16172 echo "$as_me:16172: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
16173 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
16174 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16175 echo $ECHO_N "(cached) $ECHO_C" >&6
16177 ac_check_lib_save_LIBS=$LIBS
16178 LIBS="-l$cf_nculib_root $LIBS"
16179 cat >"conftest.$ac_ext" <<_ACEOF
16180 #line 16180 "configure"
16181 #include "confdefs.h"
16183 /* Override any gcc2 internal prototype to avoid an error. */
16187 /* We use char because int might match the return type of a gcc2
16188 builtin and then its argument prototype would still apply. */
16189 char _nc_init_pthreads ();
16193 _nc_init_pthreads ();
16198 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16199 if { (eval echo "$as_me:16199: \"$ac_link\"") >&5
16200 (eval $ac_link) 2>&5
16202 echo "$as_me:16202: \$? = $ac_status" >&5
16203 (exit "$ac_status"); } &&
16204 { ac_try='test -s "conftest$ac_exeext"'
16205 { (eval echo "$as_me:16205: \"$ac_try\"") >&5
16206 (eval $ac_try) 2>&5
16208 echo "$as_me:16208: \$? = $ac_status" >&5
16209 (exit "$ac_status"); }; }; then
16210 eval "$as_ac_Lib=yes"
16212 echo "$as_me: failed program was:" >&5
16213 cat "conftest.$ac_ext" >&5
16214 eval "$as_ac_Lib=no"
16216 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16217 LIBS=$ac_check_lib_save_LIBS
16219 echo "$as_me:16219: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
16220 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
16221 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
16222 cf_cv_ncurses_pthreads=yes
16224 cf_cv_ncurses_pthreads=no
16227 if test "$cf_cv_ncurses_pthreads" = yes
16230 cf_add_libs="$LIBS"
16233 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16234 # filter duplicates
16235 for cf_add_1lib in $cf_add_0lib; do
16236 for cf_add_2lib in $cf_add_libs; do
16237 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16242 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16244 LIBS="$cf_add_libs"
16248 case $cf_cv_screen in
16250 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
16254 echo "$as_me:16254: checking for X11 rgb file" >&5
16255 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
16257 # Check whether --with-x11-rgb or --without-x11-rgb was given.
16258 if test "${with_x11_rgb+set}" = set; then
16259 withval="$with_x11_rgb"
16265 if test "x$RGB_PATH" = xauto
16267 RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
16269 /opt/local/share/X11/rgb.txt \
16270 /opt/X11/share/X11/rgb.txt \
16271 /usr/share/X11/rgb.txt \
16272 /usr/X11/share/X11/rgb.txt \
16273 /usr/X11/lib/X11/rgb.txt \
16274 /usr/lib/X11/rgb.txt \
16276 /usr/pkg/lib/X11/rgb.txt \
16277 /usr/X11R7/lib/X11/rgb.txt \
16278 /usr/X11R6/lib/X11/rgb.txt \
16279 /usr/X11R5/lib/X11/rgb.txt \
16280 /usr/X11R4/lib/X11/rgb.txt \
16281 /usr/local/lib/X11/rgb.txt \
16282 /usr/local/share/X11/rgb.txt \
16283 /usr/lib64/X11/rgb.txt
16285 if test -f "$cf_path" ; then
16286 RGB_PATH="$cf_path"
16293 if test "x$prefix" != xNONE; then
16294 cf_path_syntax="$prefix"
16296 cf_path_syntax="$ac_default_prefix"
16299 case ".$cf_path" in
16300 (.\$\(*\)*|.\'*\'*)
16304 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
16306 (.\$\{*prefix\}*|.\$\{*dir\}*)
16307 eval cf_path="$cf_path"
16308 case ".$cf_path" in
16310 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
16315 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
16318 { { echo "$as_me:16318: error: expected a pathname, not \"$cf_path\"" >&5
16319 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
16320 { (exit 1); exit 1; }; }
16326 echo "$as_me:16326: result: $RGB_PATH" >&5
16327 echo "${ECHO_T}$RGB_PATH" >&6
16329 cat >>confdefs.h <<EOF
16330 #define RGB_PATH "$cf_path"
16334 if test "$RGB_PATH" = no
16341 case $cf_cv_screen in
16343 cf_default_panel=no
16346 cf_default_tinfo=no
16348 (xcurses|bsdcurses)
16349 cf_default_panel=no
16352 cf_default_tinfo=yes
16355 cf_default_panel=yes
16356 cf_default_form=yes
16357 cf_default_menu=yes
16358 cf_default_tinfo=yes
16359 case $cf_cv_screen in
16361 cf_curses_headers="nc_alloc.h nomacros.h term_entry.h"
16367 echo "$as_me:16367: checking for desired basename for form library" >&5
16368 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
16370 # Check whether --with-form-libname or --without-form-libname was given.
16371 if test "${with_form_libname+set}" = set; then
16372 withval="$with_form_libname"
16373 with_lib_basename=$withval
16375 with_lib_basename=form
16377 FORM_NAME="$with_lib_basename"
16379 case "x$FORM_NAME" in
16387 echo "$as_me:16387: result: $FORM_NAME" >&5
16388 echo "${ECHO_T}$FORM_NAME" >&6
16390 echo "$as_me:16390: checking for desired basename for menu library" >&5
16391 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
16393 # Check whether --with-menu-libname or --without-menu-libname was given.
16394 if test "${with_menu_libname+set}" = set; then
16395 withval="$with_menu_libname"
16396 with_lib_basename=$withval
16398 with_lib_basename=menu
16400 MENU_NAME="$with_lib_basename"
16402 case "x$MENU_NAME" in
16410 echo "$as_me:16410: result: $MENU_NAME" >&5
16411 echo "${ECHO_T}$MENU_NAME" >&6
16413 echo "$as_me:16413: checking for desired basename for panel library" >&5
16414 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
16416 # Check whether --with-panel-libname or --without-panel-libname was given.
16417 if test "${with_panel_libname+set}" = set; then
16418 withval="$with_panel_libname"
16419 with_lib_basename=$withval
16421 with_lib_basename=panel
16423 PANEL_NAME="$with_lib_basename"
16425 case "x$PANEL_NAME" in
16433 echo "$as_me:16433: result: $PANEL_NAME" >&5
16434 echo "${ECHO_T}$PANEL_NAME" >&6
16436 echo "$as_me:16436: checking if you want to check for panel functions" >&5
16437 echo $ECHO_N "checking if you want to check for panel functions... $ECHO_C" >&6
16439 # Check whether --enable-panel or --disable-panel was given.
16440 if test "${enable_panel+set}" = set; then
16441 enableval="$enable_panel"
16442 test "$enableval" != no && enableval=yes
16443 if test "$enableval" != "yes" ; then
16446 cf_enable_panel=$cf_default_panel
16450 cf_enable_panel=$cf_default_panel
16453 echo "$as_me:16453: result: $cf_enable_panel" >&5
16454 echo "${ECHO_T}$cf_enable_panel" >&6
16455 if test $cf_enable_panel = yes
16458 cf_have_curses_lib=no
16460 : ${NCURSES_CONFIG_PKG:=none}
16461 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16463 elif test "x${PKG_CONFIG:=none}" != xnone; then
16464 echo "$as_me:16464: checking pkg-config for $PANEL_NAME$cf_cv_libtype" >&5
16465 echo $ECHO_N "checking pkg-config for $PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
16466 if "$PKG_CONFIG" --exists "$PANEL_NAME$cf_cv_libtype" ; then
16467 echo "$as_me:16467: result: yes" >&5
16468 echo "${ECHO_T}yes" >&6
16470 echo "$as_me:16470: checking if the $PANEL_NAME$cf_cv_libtype package files work" >&5
16471 echo $ECHO_N "checking if the $PANEL_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
16473 cf_save_CPPFLAGS="$CPPFLAGS"
16474 cf_save_LIBS="$LIBS"
16479 cf_new_extra_cppflags=
16481 for cf_add_cflags in `$PKG_CONFIG --cflags "$PANEL_NAME$cf_cv_libtype"`
16483 case "$cf_fix_cppflags" in
16485 case "$cf_add_cflags" in
16486 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16487 case "$cf_add_cflags" in
16489 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16491 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16492 && test -z "${cf_tst_cflags}" \
16493 && cf_fix_cppflags=yes
16495 if test "$cf_fix_cppflags" = yes ; then
16497 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16498 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16501 elif test "${cf_tst_cflags}" = "\"'" ; then
16503 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16504 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16510 case "$CPPFLAGS" in
16514 case "$cf_add_cflags" in
16516 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16518 CPPFLAGS=`echo "$CPPFLAGS" | \
16519 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16520 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16525 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16526 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16533 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16534 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16541 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16542 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16544 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16546 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16547 && test -z "${cf_tst_cflags}" \
16548 && cf_fix_cppflags=no
16553 if test -n "$cf_new_cflags" ; then
16555 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16556 CFLAGS="${CFLAGS}$cf_new_cflags"
16560 if test -n "$cf_new_cppflags" ; then
16562 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16563 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16567 if test -n "$cf_new_extra_cppflags" ; then
16569 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16570 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16574 cf_add_libs="$LIBS"
16577 for cf_add_1lib in `$PKG_CONFIG --libs "$PANEL_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16578 # filter duplicates
16579 for cf_add_1lib in $cf_add_0lib; do
16580 for cf_add_2lib in $cf_add_libs; do
16581 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16586 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16588 LIBS="$cf_add_libs"
16590 cat >"conftest.$ac_ext" <<_ACEOF
16591 #line 16591 "configure"
16592 #include "confdefs.h"
16593 #include <$PANEL_NAME.h>
16597 (void) new_panel ( 0 );
16602 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16603 if { (eval echo "$as_me:16603: \"$ac_link\"") >&5
16604 (eval $ac_link) 2>&5
16606 echo "$as_me:16606: \$? = $ac_status" >&5
16607 (exit "$ac_status"); } &&
16608 { ac_try='test -s "conftest$ac_exeext"'
16609 { (eval echo "$as_me:16609: \"$ac_try\"") >&5
16610 (eval $ac_try) 2>&5
16612 echo "$as_me:16612: \$? = $ac_status" >&5
16613 (exit "$ac_status"); }; }; then
16614 if test "$cross_compiling" = yes; then
16615 cf_have_curses_lib=maybe
16617 cat >"conftest.$ac_ext" <<_ACEOF
16618 #line 16618 "configure"
16619 #include "confdefs.h"
16620 #include <$PANEL_NAME.h>
16622 { (void) new_panel ( 0 ); return 0; }
16624 rm -f "conftest$ac_exeext"
16625 if { (eval echo "$as_me:16625: \"$ac_link\"") >&5
16626 (eval $ac_link) 2>&5
16628 echo "$as_me:16628: \$? = $ac_status" >&5
16629 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16630 { (eval echo "$as_me:16630: \"$ac_try\"") >&5
16631 (eval $ac_try) 2>&5
16633 echo "$as_me:16633: \$? = $ac_status" >&5
16634 (exit "$ac_status"); }; }; then
16635 cf_have_curses_lib=yes
16637 echo "$as_me: program exited with status $ac_status" >&5
16638 echo "$as_me: failed program was:" >&5
16639 cat "conftest.$ac_ext" >&5
16640 cf_have_curses_lib=no
16642 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16645 echo "$as_me: failed program was:" >&5
16646 cat "conftest.$ac_ext" >&5
16647 cf_have_curses_lib=no
16649 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16650 echo "$as_me:16650: result: $cf_have_curses_lib" >&5
16651 echo "${ECHO_T}$cf_have_curses_lib" >&6
16652 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
16653 if test "$cf_have_curses_lib" != "yes"
16655 CPPFLAGS="$cf_save_CPPFLAGS"
16656 LIBS="$cf_save_LIBS"
16659 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16661 cat >>confdefs.h <<EOF
16662 #define $cf_upper 1
16668 if test "$cf_have_curses_lib" = no; then
16669 as_ac_Lib=`echo "ac_cv_lib_$PANEL_NAME$cf_cv_libtype''_new_panel" | $as_tr_sh`
16670 echo "$as_me:16670: checking for new_panel in -l$PANEL_NAME$cf_cv_libtype" >&5
16671 echo $ECHO_N "checking for new_panel in -l$PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
16672 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16673 echo $ECHO_N "(cached) $ECHO_C" >&6
16675 ac_check_lib_save_LIBS=$LIBS
16676 LIBS="-l$PANEL_NAME$cf_cv_libtype $LIBS"
16677 cat >"conftest.$ac_ext" <<_ACEOF
16678 #line 16678 "configure"
16679 #include "confdefs.h"
16681 /* Override any gcc2 internal prototype to avoid an error. */
16685 /* We use char because int might match the return type of a gcc2
16686 builtin and then its argument prototype would still apply. */
16696 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16697 if { (eval echo "$as_me:16697: \"$ac_link\"") >&5
16698 (eval $ac_link) 2>&5
16700 echo "$as_me:16700: \$? = $ac_status" >&5
16701 (exit "$ac_status"); } &&
16702 { ac_try='test -s "conftest$ac_exeext"'
16703 { (eval echo "$as_me:16703: \"$ac_try\"") >&5
16704 (eval $ac_try) 2>&5
16706 echo "$as_me:16706: \$? = $ac_status" >&5
16707 (exit "$ac_status"); }; }; then
16708 eval "$as_ac_Lib=yes"
16710 echo "$as_me: failed program was:" >&5
16711 cat "conftest.$ac_ext" >&5
16712 eval "$as_ac_Lib=no"
16714 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16715 LIBS=$ac_check_lib_save_LIBS
16717 echo "$as_me:16717: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
16718 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
16719 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
16721 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16723 cf_add_libs="$LIBS"
16726 for cf_add_1lib in -l$PANEL_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16727 # filter duplicates
16728 for cf_add_1lib in $cf_add_0lib; do
16729 for cf_add_2lib in $cf_add_libs; do
16730 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16735 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16737 LIBS="$cf_add_libs"
16739 cat >>confdefs.h <<EOF
16740 #define $cf_upper 1
16747 cf_curses_headers="$cf_curses_headers panel.h"
16750 echo "$as_me:16750: checking if you want to check for menu functions" >&5
16751 echo $ECHO_N "checking if you want to check for menu functions... $ECHO_C" >&6
16753 # Check whether --enable-menu or --disable-menu was given.
16754 if test "${enable_menu+set}" = set; then
16755 enableval="$enable_menu"
16756 test "$enableval" != no && enableval=yes
16757 if test "$enableval" != "yes" ; then
16760 cf_enable_menu=$cf_default_menu
16764 cf_enable_menu=$cf_default_menu
16767 echo "$as_me:16767: result: $cf_enable_menu" >&5
16768 echo "${ECHO_T}$cf_enable_menu" >&6
16769 if test $cf_enable_menu = yes
16771 case $cf_cv_screen in
16776 echo "$as_me:16776: checking for NetBSD menu.h" >&5
16777 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
16778 if test "${cf_cv_netbsd_menu_h+set}" = set; then
16779 echo $ECHO_N "(cached) $ECHO_C" >&6
16782 cat >"conftest.$ac_ext" <<_ACEOF
16783 #line 16783 "configure"
16784 #include "confdefs.h"
16786 #include <${cf_cv_ncurses_header:-curses.h}>
16794 int y = menu->max_item_width;
16800 rm -f "conftest.$ac_objext"
16801 if { (eval echo "$as_me:16801: \"$ac_compile\"") >&5
16802 (eval $ac_compile) 2>&5
16804 echo "$as_me:16804: \$? = $ac_status" >&5
16805 (exit "$ac_status"); } &&
16806 { ac_try='test -s "conftest.$ac_objext"'
16807 { (eval echo "$as_me:16807: \"$ac_try\"") >&5
16808 (eval $ac_try) 2>&5
16810 echo "$as_me:16810: \$? = $ac_status" >&5
16811 (exit "$ac_status"); }; }; then
16812 cf_cv_netbsd_menu_h=yes
16815 echo "$as_me: failed program was:" >&5
16816 cat "conftest.$ac_ext" >&5
16817 cf_cv_netbsd_menu_h=no
16819 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16822 echo "$as_me:16822: result: $cf_cv_netbsd_menu_h" >&5
16823 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
16825 test "$cf_cv_netbsd_menu_h" = yes &&
16826 cat >>confdefs.h <<\EOF
16827 #define HAVE_NETBSD_MENU_H 1
16833 cf_have_curses_lib=no
16835 : ${NCURSES_CONFIG_PKG:=none}
16836 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16838 elif test "x${PKG_CONFIG:=none}" != xnone; then
16839 echo "$as_me:16839: checking pkg-config for $MENU_NAME$cf_cv_libtype" >&5
16840 echo $ECHO_N "checking pkg-config for $MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
16841 if "$PKG_CONFIG" --exists "$MENU_NAME$cf_cv_libtype" ; then
16842 echo "$as_me:16842: result: yes" >&5
16843 echo "${ECHO_T}yes" >&6
16845 echo "$as_me:16845: checking if the $MENU_NAME$cf_cv_libtype package files work" >&5
16846 echo $ECHO_N "checking if the $MENU_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
16848 cf_save_CPPFLAGS="$CPPFLAGS"
16849 cf_save_LIBS="$LIBS"
16854 cf_new_extra_cppflags=
16856 for cf_add_cflags in `$PKG_CONFIG --cflags "$MENU_NAME$cf_cv_libtype"`
16858 case "$cf_fix_cppflags" in
16860 case "$cf_add_cflags" in
16861 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16862 case "$cf_add_cflags" in
16864 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16866 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16867 && test -z "${cf_tst_cflags}" \
16868 && cf_fix_cppflags=yes
16870 if test "$cf_fix_cppflags" = yes ; then
16872 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16873 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16876 elif test "${cf_tst_cflags}" = "\"'" ; then
16878 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16879 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16885 case "$CPPFLAGS" in
16889 case "$cf_add_cflags" in
16891 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16893 CPPFLAGS=`echo "$CPPFLAGS" | \
16894 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16895 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16900 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16901 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16908 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16909 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16916 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16917 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16919 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16921 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16922 && test -z "${cf_tst_cflags}" \
16923 && cf_fix_cppflags=no
16928 if test -n "$cf_new_cflags" ; then
16930 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16931 CFLAGS="${CFLAGS}$cf_new_cflags"
16935 if test -n "$cf_new_cppflags" ; then
16937 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16938 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16942 if test -n "$cf_new_extra_cppflags" ; then
16944 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16945 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16949 cf_add_libs="$LIBS"
16952 for cf_add_1lib in `$PKG_CONFIG --libs "$MENU_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16953 # filter duplicates
16954 for cf_add_1lib in $cf_add_0lib; do
16955 for cf_add_2lib in $cf_add_libs; do
16956 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16961 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16963 LIBS="$cf_add_libs"
16965 cat >"conftest.$ac_ext" <<_ACEOF
16966 #line 16966 "configure"
16967 #include "confdefs.h"
16968 #include <$MENU_NAME.h>
16972 (void) menu_driver ( 0,0 );
16977 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16978 if { (eval echo "$as_me:16978: \"$ac_link\"") >&5
16979 (eval $ac_link) 2>&5
16981 echo "$as_me:16981: \$? = $ac_status" >&5
16982 (exit "$ac_status"); } &&
16983 { ac_try='test -s "conftest$ac_exeext"'
16984 { (eval echo "$as_me:16984: \"$ac_try\"") >&5
16985 (eval $ac_try) 2>&5
16987 echo "$as_me:16987: \$? = $ac_status" >&5
16988 (exit "$ac_status"); }; }; then
16989 if test "$cross_compiling" = yes; then
16990 cf_have_curses_lib=maybe
16992 cat >"conftest.$ac_ext" <<_ACEOF
16993 #line 16993 "configure"
16994 #include "confdefs.h"
16995 #include <$MENU_NAME.h>
16997 { (void) menu_driver ( 0,0 ); return 0; }
16999 rm -f "conftest$ac_exeext"
17000 if { (eval echo "$as_me:17000: \"$ac_link\"") >&5
17001 (eval $ac_link) 2>&5
17003 echo "$as_me:17003: \$? = $ac_status" >&5
17004 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17005 { (eval echo "$as_me:17005: \"$ac_try\"") >&5
17006 (eval $ac_try) 2>&5
17008 echo "$as_me:17008: \$? = $ac_status" >&5
17009 (exit "$ac_status"); }; }; then
17010 cf_have_curses_lib=yes
17012 echo "$as_me: program exited with status $ac_status" >&5
17013 echo "$as_me: failed program was:" >&5
17014 cat "conftest.$ac_ext" >&5
17015 cf_have_curses_lib=no
17017 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17020 echo "$as_me: failed program was:" >&5
17021 cat "conftest.$ac_ext" >&5
17022 cf_have_curses_lib=no
17024 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17025 echo "$as_me:17025: result: $cf_have_curses_lib" >&5
17026 echo "${ECHO_T}$cf_have_curses_lib" >&6
17027 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17028 if test "$cf_have_curses_lib" != "yes"
17030 CPPFLAGS="$cf_save_CPPFLAGS"
17031 LIBS="$cf_save_LIBS"
17034 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17036 cat >>confdefs.h <<EOF
17037 #define $cf_upper 1
17043 if test "$cf_have_curses_lib" = no; then
17044 as_ac_Lib=`echo "ac_cv_lib_$MENU_NAME$cf_cv_libtype''_menu_driver" | $as_tr_sh`
17045 echo "$as_me:17045: checking for menu_driver in -l$MENU_NAME$cf_cv_libtype" >&5
17046 echo $ECHO_N "checking for menu_driver in -l$MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
17047 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17048 echo $ECHO_N "(cached) $ECHO_C" >&6
17050 ac_check_lib_save_LIBS=$LIBS
17051 LIBS="-l$MENU_NAME$cf_cv_libtype $LIBS"
17052 cat >"conftest.$ac_ext" <<_ACEOF
17053 #line 17053 "configure"
17054 #include "confdefs.h"
17056 /* Override any gcc2 internal prototype to avoid an error. */
17060 /* We use char because int might match the return type of a gcc2
17061 builtin and then its argument prototype would still apply. */
17062 char menu_driver ();
17071 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17072 if { (eval echo "$as_me:17072: \"$ac_link\"") >&5
17073 (eval $ac_link) 2>&5
17075 echo "$as_me:17075: \$? = $ac_status" >&5
17076 (exit "$ac_status"); } &&
17077 { ac_try='test -s "conftest$ac_exeext"'
17078 { (eval echo "$as_me:17078: \"$ac_try\"") >&5
17079 (eval $ac_try) 2>&5
17081 echo "$as_me:17081: \$? = $ac_status" >&5
17082 (exit "$ac_status"); }; }; then
17083 eval "$as_ac_Lib=yes"
17085 echo "$as_me: failed program was:" >&5
17086 cat "conftest.$ac_ext" >&5
17087 eval "$as_ac_Lib=no"
17089 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17090 LIBS=$ac_check_lib_save_LIBS
17092 echo "$as_me:17092: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
17093 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
17094 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
17096 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17098 cf_add_libs="$LIBS"
17101 for cf_add_1lib in -l$MENU_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17102 # filter duplicates
17103 for cf_add_1lib in $cf_add_0lib; do
17104 for cf_add_2lib in $cf_add_libs; do
17105 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17110 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17112 LIBS="$cf_add_libs"
17114 cat >>confdefs.h <<EOF
17115 #define $cf_upper 1
17122 cf_curses_headers="$cf_curses_headers menu.h"
17125 echo "$as_me:17125: checking if you want to check for form functions" >&5
17126 echo $ECHO_N "checking if you want to check for form functions... $ECHO_C" >&6
17128 # Check whether --enable-form or --disable-form was given.
17129 if test "${enable_form+set}" = set; then
17130 enableval="$enable_form"
17131 test "$enableval" != no && enableval=yes
17132 if test "$enableval" != "yes" ; then
17135 cf_enable_form=$cf_default_form
17139 cf_enable_form=$cf_default_form
17142 echo "$as_me:17142: result: $cf_enable_form" >&5
17143 echo "${ECHO_T}$cf_enable_form" >&6
17144 if test $cf_enable_form = yes
17146 case $cf_cv_screen in
17151 echo "$as_me:17151: checking for NetBSD form.h" >&5
17152 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
17153 if test "${cf_cv_netbsd_form_h+set}" = set; then
17154 echo $ECHO_N "(cached) $ECHO_C" >&6
17157 cat >"conftest.$ac_ext" <<_ACEOF
17158 #line 17158 "configure"
17159 #include "confdefs.h"
17161 #include <${cf_cv_ncurses_header:-curses.h}>
17169 int y = current_field(form)->cursor_ypos;
17170 int x = current_field(form)->cursor_xpos;
17176 rm -f "conftest.$ac_objext"
17177 if { (eval echo "$as_me:17177: \"$ac_compile\"") >&5
17178 (eval $ac_compile) 2>&5
17180 echo "$as_me:17180: \$? = $ac_status" >&5
17181 (exit "$ac_status"); } &&
17182 { ac_try='test -s "conftest.$ac_objext"'
17183 { (eval echo "$as_me:17183: \"$ac_try\"") >&5
17184 (eval $ac_try) 2>&5
17186 echo "$as_me:17186: \$? = $ac_status" >&5
17187 (exit "$ac_status"); }; }; then
17188 cf_cv_netbsd_form_h=yes
17191 echo "$as_me: failed program was:" >&5
17192 cat "conftest.$ac_ext" >&5
17193 cf_cv_netbsd_form_h=no
17195 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17198 echo "$as_me:17198: result: $cf_cv_netbsd_form_h" >&5
17199 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
17201 test "$cf_cv_netbsd_form_h" = yes &&
17202 cat >>confdefs.h <<\EOF
17203 #define HAVE_NETBSD_FORM_H 1
17209 cf_have_curses_lib=no
17211 : ${NCURSES_CONFIG_PKG:=none}
17212 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
17214 elif test "x${PKG_CONFIG:=none}" != xnone; then
17215 echo "$as_me:17215: checking pkg-config for $FORM_NAME$cf_cv_libtype" >&5
17216 echo $ECHO_N "checking pkg-config for $FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
17217 if "$PKG_CONFIG" --exists "$FORM_NAME$cf_cv_libtype" ; then
17218 echo "$as_me:17218: result: yes" >&5
17219 echo "${ECHO_T}yes" >&6
17221 echo "$as_me:17221: checking if the $FORM_NAME$cf_cv_libtype package files work" >&5
17222 echo $ECHO_N "checking if the $FORM_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
17224 cf_save_CPPFLAGS="$CPPFLAGS"
17225 cf_save_LIBS="$LIBS"
17230 cf_new_extra_cppflags=
17232 for cf_add_cflags in `$PKG_CONFIG --cflags "$FORM_NAME$cf_cv_libtype"`
17234 case "$cf_fix_cppflags" in
17236 case "$cf_add_cflags" in
17237 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17238 case "$cf_add_cflags" in
17240 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17242 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17243 && test -z "${cf_tst_cflags}" \
17244 && cf_fix_cppflags=yes
17246 if test "$cf_fix_cppflags" = yes ; then
17248 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17249 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17252 elif test "${cf_tst_cflags}" = "\"'" ; then
17254 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17255 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17261 case "$CPPFLAGS" in
17265 case "$cf_add_cflags" in
17267 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17269 CPPFLAGS=`echo "$CPPFLAGS" | \
17270 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17271 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17276 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17277 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17284 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17285 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17292 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17293 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17295 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17297 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17298 && test -z "${cf_tst_cflags}" \
17299 && cf_fix_cppflags=no
17304 if test -n "$cf_new_cflags" ; then
17306 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17307 CFLAGS="${CFLAGS}$cf_new_cflags"
17311 if test -n "$cf_new_cppflags" ; then
17313 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17314 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17318 if test -n "$cf_new_extra_cppflags" ; then
17320 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17321 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17325 cf_add_libs="$LIBS"
17328 for cf_add_1lib in `$PKG_CONFIG --libs "$FORM_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17329 # filter duplicates
17330 for cf_add_1lib in $cf_add_0lib; do
17331 for cf_add_2lib in $cf_add_libs; do
17332 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17337 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17339 LIBS="$cf_add_libs"
17341 cat >"conftest.$ac_ext" <<_ACEOF
17342 #line 17342 "configure"
17343 #include "confdefs.h"
17344 #include <$FORM_NAME.h>
17348 (void) form_driver ( 0,0 );
17353 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17354 if { (eval echo "$as_me:17354: \"$ac_link\"") >&5
17355 (eval $ac_link) 2>&5
17357 echo "$as_me:17357: \$? = $ac_status" >&5
17358 (exit "$ac_status"); } &&
17359 { ac_try='test -s "conftest$ac_exeext"'
17360 { (eval echo "$as_me:17360: \"$ac_try\"") >&5
17361 (eval $ac_try) 2>&5
17363 echo "$as_me:17363: \$? = $ac_status" >&5
17364 (exit "$ac_status"); }; }; then
17365 if test "$cross_compiling" = yes; then
17366 cf_have_curses_lib=maybe
17368 cat >"conftest.$ac_ext" <<_ACEOF
17369 #line 17369 "configure"
17370 #include "confdefs.h"
17371 #include <$FORM_NAME.h>
17373 { (void) form_driver ( 0,0 ); return 0; }
17375 rm -f "conftest$ac_exeext"
17376 if { (eval echo "$as_me:17376: \"$ac_link\"") >&5
17377 (eval $ac_link) 2>&5
17379 echo "$as_me:17379: \$? = $ac_status" >&5
17380 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17381 { (eval echo "$as_me:17381: \"$ac_try\"") >&5
17382 (eval $ac_try) 2>&5
17384 echo "$as_me:17384: \$? = $ac_status" >&5
17385 (exit "$ac_status"); }; }; then
17386 cf_have_curses_lib=yes
17388 echo "$as_me: program exited with status $ac_status" >&5
17389 echo "$as_me: failed program was:" >&5
17390 cat "conftest.$ac_ext" >&5
17391 cf_have_curses_lib=no
17393 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17396 echo "$as_me: failed program was:" >&5
17397 cat "conftest.$ac_ext" >&5
17398 cf_have_curses_lib=no
17400 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17401 echo "$as_me:17401: result: $cf_have_curses_lib" >&5
17402 echo "${ECHO_T}$cf_have_curses_lib" >&6
17403 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17404 if test "$cf_have_curses_lib" != "yes"
17406 CPPFLAGS="$cf_save_CPPFLAGS"
17407 LIBS="$cf_save_LIBS"
17410 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17412 cat >>confdefs.h <<EOF
17413 #define $cf_upper 1
17419 if test "$cf_have_curses_lib" = no; then
17420 as_ac_Lib=`echo "ac_cv_lib_$FORM_NAME$cf_cv_libtype''_form_driver" | $as_tr_sh`
17421 echo "$as_me:17421: checking for form_driver in -l$FORM_NAME$cf_cv_libtype" >&5
17422 echo $ECHO_N "checking for form_driver in -l$FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
17423 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17424 echo $ECHO_N "(cached) $ECHO_C" >&6
17426 ac_check_lib_save_LIBS=$LIBS
17427 LIBS="-l$FORM_NAME$cf_cv_libtype $LIBS"
17428 cat >"conftest.$ac_ext" <<_ACEOF
17429 #line 17429 "configure"
17430 #include "confdefs.h"
17432 /* Override any gcc2 internal prototype to avoid an error. */
17436 /* We use char because int might match the return type of a gcc2
17437 builtin and then its argument prototype would still apply. */
17438 char form_driver ();
17447 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17448 if { (eval echo "$as_me:17448: \"$ac_link\"") >&5
17449 (eval $ac_link) 2>&5
17451 echo "$as_me:17451: \$? = $ac_status" >&5
17452 (exit "$ac_status"); } &&
17453 { ac_try='test -s "conftest$ac_exeext"'
17454 { (eval echo "$as_me:17454: \"$ac_try\"") >&5
17455 (eval $ac_try) 2>&5
17457 echo "$as_me:17457: \$? = $ac_status" >&5
17458 (exit "$ac_status"); }; }; then
17459 eval "$as_ac_Lib=yes"
17461 echo "$as_me: failed program was:" >&5
17462 cat "conftest.$ac_ext" >&5
17463 eval "$as_ac_Lib=no"
17465 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17466 LIBS=$ac_check_lib_save_LIBS
17468 echo "$as_me:17468: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
17469 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
17470 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
17472 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17474 cf_add_libs="$LIBS"
17477 for cf_add_1lib in -l$FORM_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17478 # filter duplicates
17479 for cf_add_1lib in $cf_add_0lib; do
17480 for cf_add_2lib in $cf_add_libs; do
17481 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17486 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17488 LIBS="$cf_add_libs"
17490 cat >>confdefs.h <<EOF
17491 #define $cf_upper 1
17498 cf_curses_headers="$cf_curses_headers form.h"
17501 # look for curses-related headers
17503 for ac_header in $cf_curses_headers
17505 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17506 echo "$as_me:17506: checking for $ac_header" >&5
17507 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17508 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17509 echo $ECHO_N "(cached) $ECHO_C" >&6
17511 cat >"conftest.$ac_ext" <<_ACEOF
17512 #line 17512 "configure"
17513 #include "confdefs.h"
17514 #include <$ac_header>
17516 if { (eval echo "$as_me:17516: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17517 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17519 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17521 cat conftest.err >&5
17522 echo "$as_me:17522: \$? = $ac_status" >&5
17523 (exit "$ac_status"); } >/dev/null; then
17524 if test -s conftest.err; then
17525 ac_cpp_err=$ac_c_preproc_warn_flag
17532 if test -z "$ac_cpp_err"; then
17533 eval "$as_ac_Header=yes"
17535 echo "$as_me: failed program was:" >&5
17536 cat "conftest.$ac_ext" >&5
17537 eval "$as_ac_Header=no"
17539 rm -f conftest.err "conftest.$ac_ext"
17541 echo "$as_me:17541: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17542 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17543 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17544 cat >>confdefs.h <<EOF
17545 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17551 echo "$as_me:17551: checking for ANSI C header files" >&5
17552 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
17553 if test "${ac_cv_header_stdc+set}" = set; then
17554 echo $ECHO_N "(cached) $ECHO_C" >&6
17556 cat >"conftest.$ac_ext" <<_ACEOF
17557 #line 17557 "configure"
17558 #include "confdefs.h"
17559 #include <stdlib.h>
17560 #include <stdarg.h>
17561 #include <string.h>
17565 if { (eval echo "$as_me:17565: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17566 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17568 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17570 cat conftest.err >&5
17571 echo "$as_me:17571: \$? = $ac_status" >&5
17572 (exit "$ac_status"); } >/dev/null; then
17573 if test -s conftest.err; then
17574 ac_cpp_err=$ac_c_preproc_warn_flag
17581 if test -z "$ac_cpp_err"; then
17582 ac_cv_header_stdc=yes
17584 echo "$as_me: failed program was:" >&5
17585 cat "conftest.$ac_ext" >&5
17586 ac_cv_header_stdc=no
17588 rm -f conftest.err "conftest.$ac_ext"
17590 if test $ac_cv_header_stdc = yes; then
17591 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
17592 cat >"conftest.$ac_ext" <<_ACEOF
17593 #line 17593 "configure"
17594 #include "confdefs.h"
17595 #include <string.h>
17598 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17599 $EGREP "memchr" >/dev/null 2>&1; then
17602 ac_cv_header_stdc=no
17608 if test $ac_cv_header_stdc = yes; then
17609 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
17610 cat >"conftest.$ac_ext" <<_ACEOF
17611 #line 17611 "configure"
17612 #include "confdefs.h"
17613 #include <stdlib.h>
17616 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17617 $EGREP "free" >/dev/null 2>&1; then
17620 ac_cv_header_stdc=no
17626 if test $ac_cv_header_stdc = yes; then
17627 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
17628 if test "$cross_compiling" = yes; then
17631 cat >"conftest.$ac_ext" <<_ACEOF
17632 #line 17632 "configure"
17633 #include "confdefs.h"
17635 #if ((' ' & 0x0FF) == 0x020)
17636 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
17637 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
17639 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
17640 || ('j' <= (c) && (c) <= 'r') \
17641 || ('s' <= (c) && (c) <= 'z'))
17642 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
17645 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
17650 for (i = 0; i < 256; i++)
17651 if (XOR (islower (i), ISLOWER (i))
17652 || toupper (i) != TOUPPER (i))
17653 $ac_main_return(2);
17654 $ac_main_return (0);
17657 rm -f "conftest$ac_exeext"
17658 if { (eval echo "$as_me:17658: \"$ac_link\"") >&5
17659 (eval $ac_link) 2>&5
17661 echo "$as_me:17661: \$? = $ac_status" >&5
17662 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17663 { (eval echo "$as_me:17663: \"$ac_try\"") >&5
17664 (eval $ac_try) 2>&5
17666 echo "$as_me:17666: \$? = $ac_status" >&5
17667 (exit "$ac_status"); }; }; then
17670 echo "$as_me: program exited with status $ac_status" >&5
17671 echo "$as_me: failed program was:" >&5
17672 cat "conftest.$ac_ext" >&5
17673 ac_cv_header_stdc=no
17675 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17679 echo "$as_me:17679: result: $ac_cv_header_stdc" >&5
17680 echo "${ECHO_T}$ac_cv_header_stdc" >&6
17681 if test $ac_cv_header_stdc = yes; then
17683 cat >>confdefs.h <<\EOF
17684 #define STDC_HEADERS 1
17689 echo "$as_me:17689: checking whether time.h and sys/time.h may both be included" >&5
17690 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17691 if test "${ac_cv_header_time+set}" = set; then
17692 echo $ECHO_N "(cached) $ECHO_C" >&6
17694 cat >"conftest.$ac_ext" <<_ACEOF
17695 #line 17695 "configure"
17696 #include "confdefs.h"
17697 #include <sys/types.h>
17698 #include <sys/time.h>
17704 if ((struct tm *) 0)
17710 rm -f "conftest.$ac_objext"
17711 if { (eval echo "$as_me:17711: \"$ac_compile\"") >&5
17712 (eval $ac_compile) 2>&5
17714 echo "$as_me:17714: \$? = $ac_status" >&5
17715 (exit "$ac_status"); } &&
17716 { ac_try='test -s "conftest.$ac_objext"'
17717 { (eval echo "$as_me:17717: \"$ac_try\"") >&5
17718 (eval $ac_try) 2>&5
17720 echo "$as_me:17720: \$? = $ac_status" >&5
17721 (exit "$ac_status"); }; }; then
17722 ac_cv_header_time=yes
17724 echo "$as_me: failed program was:" >&5
17725 cat "conftest.$ac_ext" >&5
17726 ac_cv_header_time=no
17728 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17730 echo "$as_me:17730: result: $ac_cv_header_time" >&5
17731 echo "${ECHO_T}$ac_cv_header_time" >&6
17732 if test $ac_cv_header_time = yes; then
17734 cat >>confdefs.h <<\EOF
17735 #define TIME_WITH_SYS_TIME 1
17753 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17754 echo "$as_me:17754: checking for $ac_header" >&5
17755 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17756 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17757 echo $ECHO_N "(cached) $ECHO_C" >&6
17759 cat >"conftest.$ac_ext" <<_ACEOF
17760 #line 17760 "configure"
17761 #include "confdefs.h"
17762 #include <$ac_header>
17764 if { (eval echo "$as_me:17764: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17765 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17767 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17769 cat conftest.err >&5
17770 echo "$as_me:17770: \$? = $ac_status" >&5
17771 (exit "$ac_status"); } >/dev/null; then
17772 if test -s conftest.err; then
17773 ac_cpp_err=$ac_c_preproc_warn_flag
17780 if test -z "$ac_cpp_err"; then
17781 eval "$as_ac_Header=yes"
17783 echo "$as_me: failed program was:" >&5
17784 cat "conftest.$ac_ext" >&5
17785 eval "$as_ac_Header=no"
17787 rm -f conftest.err "conftest.$ac_ext"
17789 echo "$as_me:17789: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17790 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17791 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17792 cat >>confdefs.h <<EOF
17793 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17799 for ac_header in unistd.h getopt.h
17801 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17802 echo "$as_me:17802: checking for $ac_header" >&5
17803 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17804 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17805 echo $ECHO_N "(cached) $ECHO_C" >&6
17807 cat >"conftest.$ac_ext" <<_ACEOF
17808 #line 17808 "configure"
17809 #include "confdefs.h"
17810 #include <$ac_header>
17812 if { (eval echo "$as_me:17812: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17813 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17815 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17817 cat conftest.err >&5
17818 echo "$as_me:17818: \$? = $ac_status" >&5
17819 (exit "$ac_status"); } >/dev/null; then
17820 if test -s conftest.err; then
17821 ac_cpp_err=$ac_c_preproc_warn_flag
17828 if test -z "$ac_cpp_err"; then
17829 eval "$as_ac_Header=yes"
17831 echo "$as_me: failed program was:" >&5
17832 cat "conftest.$ac_ext" >&5
17833 eval "$as_ac_Header=no"
17835 rm -f conftest.err "conftest.$ac_ext"
17837 echo "$as_me:17837: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17838 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17839 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17840 cat >>confdefs.h <<EOF
17841 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17847 echo "$as_me:17847: checking for header declaring getopt variables" >&5
17848 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
17849 if test "${cf_cv_getopt_header+set}" = set; then
17850 echo $ECHO_N "(cached) $ECHO_C" >&6
17853 cf_cv_getopt_header=none
17854 for cf_header in stdio.h stdlib.h unistd.h getopt.h
17856 cat >"conftest.$ac_ext" <<_ACEOF
17857 #line 17857 "configure"
17858 #include "confdefs.h"
17860 #include <$cf_header>
17864 int x = optind; char *y = optarg
17869 rm -f "conftest.$ac_objext"
17870 if { (eval echo "$as_me:17870: \"$ac_compile\"") >&5
17871 (eval $ac_compile) 2>&5
17873 echo "$as_me:17873: \$? = $ac_status" >&5
17874 (exit "$ac_status"); } &&
17875 { ac_try='test -s "conftest.$ac_objext"'
17876 { (eval echo "$as_me:17876: \"$ac_try\"") >&5
17877 (eval $ac_try) 2>&5
17879 echo "$as_me:17879: \$? = $ac_status" >&5
17880 (exit "$ac_status"); }; }; then
17881 cf_cv_getopt_header=$cf_header
17884 echo "$as_me: failed program was:" >&5
17885 cat "conftest.$ac_ext" >&5
17887 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17891 echo "$as_me:17891: result: $cf_cv_getopt_header" >&5
17892 echo "${ECHO_T}$cf_cv_getopt_header" >&6
17893 if test "$cf_cv_getopt_header" != none ; then
17895 cat >>confdefs.h <<\EOF
17896 #define HAVE_GETOPT_HEADER 1
17900 if test "$cf_cv_getopt_header" = getopt.h ; then
17902 cat >>confdefs.h <<\EOF
17903 #define NEED_GETOPT_H 1
17917 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17918 echo "$as_me:17918: checking for $ac_func" >&5
17919 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17920 if eval "test \"\${$as_ac_var+set}\" = set"; then
17921 echo $ECHO_N "(cached) $ECHO_C" >&6
17923 cat >"conftest.$ac_ext" <<_ACEOF
17924 #line 17924 "configure"
17925 #include "confdefs.h"
17926 #define $ac_func autoconf_temporary
17927 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17934 /* We use char because int might match the return type of a gcc2
17935 builtin and then its argument prototype would still apply. */
17936 char $ac_func (void);
17942 /* The GNU C library defines stubs for functions which it implements
17943 to always fail with ENOSYS. Some functions are actually named
17944 something starting with __ and the normal name is an alias. */
17945 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17946 #error found stub for $ac_func
17949 return $ac_func ();
17954 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17955 if { (eval echo "$as_me:17955: \"$ac_link\"") >&5
17956 (eval $ac_link) 2>&5
17958 echo "$as_me:17958: \$? = $ac_status" >&5
17959 (exit "$ac_status"); } &&
17960 { ac_try='test -s "conftest$ac_exeext"'
17961 { (eval echo "$as_me:17961: \"$ac_try\"") >&5
17962 (eval $ac_try) 2>&5
17964 echo "$as_me:17964: \$? = $ac_status" >&5
17965 (exit "$ac_status"); }; }; then
17966 eval "$as_ac_var=yes"
17968 echo "$as_me: failed program was:" >&5
17969 cat "conftest.$ac_ext" >&5
17970 eval "$as_ac_var=no"
17972 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17974 echo "$as_me:17974: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17975 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17976 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17977 cat >>confdefs.h <<EOF
17978 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17984 # use a compile-check to work with ncurses*-config and subdirectory includes
17985 echo "$as_me:17985: checking if we can use termcap.h" >&5
17986 echo $ECHO_N "checking if we can use termcap.h... $ECHO_C" >&6
17987 if test "${cf_cv_have_termcap_h+set}" = set; then
17988 echo $ECHO_N "(cached) $ECHO_C" >&6
17991 cat >"conftest.$ac_ext" <<_ACEOF
17992 #line 17992 "configure"
17993 #include "confdefs.h"
17995 #include <curses.h>
17996 #ifdef NCURSES_VERSION
17997 #undef NCURSES_VERSION
17999 #include <termcap.h>
18000 #ifndef NCURSES_VERSION
18001 #error wrong header
18012 rm -f "conftest.$ac_objext"
18013 if { (eval echo "$as_me:18013: \"$ac_compile\"") >&5
18014 (eval $ac_compile) 2>&5
18016 echo "$as_me:18016: \$? = $ac_status" >&5
18017 (exit "$ac_status"); } &&
18018 { ac_try='test -s "conftest.$ac_objext"'
18019 { (eval echo "$as_me:18019: \"$ac_try\"") >&5
18020 (eval $ac_try) 2>&5
18022 echo "$as_me:18022: \$? = $ac_status" >&5
18023 (exit "$ac_status"); }; }; then
18024 cf_cv_have_termcap_h=yes
18026 echo "$as_me: failed program was:" >&5
18027 cat "conftest.$ac_ext" >&5
18028 cf_cv_have_termcap_h=no
18030 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18032 echo "$as_me:18032: result: $cf_cv_have_termcap_h" >&5
18033 echo "${ECHO_T}$cf_cv_have_termcap_h" >&6
18034 if test "x$cf_cv_have_termcap_h" = xyes
18037 cat >>confdefs.h <<\EOF
18038 #define HAVE_TERMCAP_H 1
18042 echo "$as_me:18042: checking if we can use ncurses/termcap.h" >&5
18043 echo $ECHO_N "checking if we can use ncurses/termcap.h... $ECHO_C" >&6
18044 if test "${cf_cv_have_ncurses_termcap_h+set}" = set; then
18045 echo $ECHO_N "(cached) $ECHO_C" >&6
18048 cat >"conftest.$ac_ext" <<_ACEOF
18049 #line 18049 "configure"
18050 #include "confdefs.h"
18052 #include <ncurses/curses.h>
18053 #ifdef NCURSES_VERSION
18054 #undef NCURSES_VERSION
18056 #include <ncurses/termcap.h>
18057 #ifndef NCURSES_VERSION
18058 #error wrong header
18069 rm -f "conftest.$ac_objext"
18070 if { (eval echo "$as_me:18070: \"$ac_compile\"") >&5
18071 (eval $ac_compile) 2>&5
18073 echo "$as_me:18073: \$? = $ac_status" >&5
18074 (exit "$ac_status"); } &&
18075 { ac_try='test -s "conftest.$ac_objext"'
18076 { (eval echo "$as_me:18076: \"$ac_try\"") >&5
18077 (eval $ac_try) 2>&5
18079 echo "$as_me:18079: \$? = $ac_status" >&5
18080 (exit "$ac_status"); }; }; then
18081 cf_cv_have_ncurses_termcap_h=yes
18083 echo "$as_me: failed program was:" >&5
18084 cat "conftest.$ac_ext" >&5
18085 cf_cv_have_ncurses_termcap_h=no
18087 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18089 echo "$as_me:18089: result: $cf_cv_have_ncurses_termcap_h" >&5
18090 echo "${ECHO_T}$cf_cv_have_ncurses_termcap_h" >&6
18091 test "x$cf_cv_have_ncurses_termcap_h" = xyes &&
18092 cat >>confdefs.h <<\EOF
18093 #define HAVE_NCURSES_TERMCAP_H 1
18098 if test "x$ac_cv_func_getopt" = xno; then
18099 { { echo "$as_me:18099: error: getopt is required for building programs" >&5
18100 echo "$as_me: error: getopt is required for building programs" >&2;}
18101 { (exit 1); exit 1; }; }
18104 if test "$cf_enable_widec" = yes; then
18117 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18118 echo "$as_me:18118: checking for $ac_func" >&5
18119 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18120 if eval "test \"\${$as_ac_var+set}\" = set"; then
18121 echo $ECHO_N "(cached) $ECHO_C" >&6
18123 cat >"conftest.$ac_ext" <<_ACEOF
18124 #line 18124 "configure"
18125 #include "confdefs.h"
18126 #define $ac_func autoconf_temporary
18127 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
18134 /* We use char because int might match the return type of a gcc2
18135 builtin and then its argument prototype would still apply. */
18136 char $ac_func (void);
18142 /* The GNU C library defines stubs for functions which it implements
18143 to always fail with ENOSYS. Some functions are actually named
18144 something starting with __ and the normal name is an alias. */
18145 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18146 #error found stub for $ac_func
18149 return $ac_func ();
18154 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18155 if { (eval echo "$as_me:18155: \"$ac_link\"") >&5
18156 (eval $ac_link) 2>&5
18158 echo "$as_me:18158: \$? = $ac_status" >&5
18159 (exit "$ac_status"); } &&
18160 { ac_try='test -s "conftest$ac_exeext"'
18161 { (eval echo "$as_me:18161: \"$ac_try\"") >&5
18162 (eval $ac_try) 2>&5
18164 echo "$as_me:18164: \$? = $ac_status" >&5
18165 (exit "$ac_status"); }; }; then
18166 eval "$as_ac_var=yes"
18168 echo "$as_me: failed program was:" >&5
18169 cat "conftest.$ac_ext" >&5
18170 eval "$as_ac_var=no"
18172 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18174 echo "$as_me:18174: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18175 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18176 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18177 cat >>confdefs.h <<EOF
18178 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18186 echo "$as_me:18186: checking definition to turn on extended curses functions" >&5
18187 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
18188 if test "${cf_cv_need_xopen_extension+set}" = set; then
18189 echo $ECHO_N "(cached) $ECHO_C" >&6
18192 cf_cv_need_xopen_extension=unknown
18193 cat >"conftest.$ac_ext" <<_ACEOF
18194 #line 18194 "configure"
18195 #include "confdefs.h"
18197 #include <stdlib.h>
18198 #include <${cf_cv_ncurses_header:-curses.h}>
18203 #if defined(NCURSES_VERSION_PATCH)
18204 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
18208 #ifdef NCURSES_VERSION
18210 int check2 = curs_set((int)sizeof(check));
18212 long x = winnstr(stdscr, "", 0);
18214 #ifdef NCURSES_VERSION
18217 getbegyx(stdscr, y1, x1);
18226 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18227 if { (eval echo "$as_me:18227: \"$ac_link\"") >&5
18228 (eval $ac_link) 2>&5
18230 echo "$as_me:18230: \$? = $ac_status" >&5
18231 (exit "$ac_status"); } &&
18232 { ac_try='test -s "conftest$ac_exeext"'
18233 { (eval echo "$as_me:18233: \"$ac_try\"") >&5
18234 (eval $ac_try) 2>&5
18236 echo "$as_me:18236: \$? = $ac_status" >&5
18237 (exit "$ac_status"); }; }; then
18238 cf_cv_need_xopen_extension=none
18240 echo "$as_me: failed program was:" >&5
18241 cat "conftest.$ac_ext" >&5
18243 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
18245 cat >"conftest.$ac_ext" <<_ACEOF
18246 #line 18246 "configure"
18247 #include "confdefs.h"
18249 #define $cf_try_xopen_extension 1
18250 #include <stdlib.h>
18251 #include <${cf_cv_ncurses_header:-curses.h}>
18256 #ifdef NCURSES_VERSION
18258 int check2 = curs_set((int)sizeof(check));
18260 long x = winnstr(stdscr, "", 0);
18262 getbegyx(stdscr, y1, x1);
18263 #ifdef NCURSES_VERSION
18274 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18275 if { (eval echo "$as_me:18275: \"$ac_link\"") >&5
18276 (eval $ac_link) 2>&5
18278 echo "$as_me:18278: \$? = $ac_status" >&5
18279 (exit "$ac_status"); } &&
18280 { ac_try='test -s "conftest$ac_exeext"'
18281 { (eval echo "$as_me:18281: \"$ac_try\"") >&5
18282 (eval $ac_try) 2>&5
18284 echo "$as_me:18284: \$? = $ac_status" >&5
18285 (exit "$ac_status"); }; }; then
18286 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
18288 echo "$as_me: failed program was:" >&5
18289 cat "conftest.$ac_ext" >&5
18291 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18295 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18298 echo "$as_me:18298: result: $cf_cv_need_xopen_extension" >&5
18299 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
18301 case "$cf_cv_need_xopen_extension" in
18304 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18305 CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
18310 echo "$as_me:18310: checking for term.h" >&5
18311 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
18312 if test "${cf_cv_term_header+set}" = set; then
18313 echo $ECHO_N "(cached) $ECHO_C" >&6
18316 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
18317 # for <term.h> if we do not find the variant.
18319 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
18321 case "${cf_cv_ncurses_header:-curses.h}" in
18323 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
18324 cf_header_list="$cf_header_item $cf_header_list"
18328 for cf_header in $cf_header_list
18330 cat >"conftest.$ac_ext" <<_ACEOF
18331 #line 18331 "configure"
18332 #include "confdefs.h"
18334 #include <${cf_cv_ncurses_header:-curses.h}>
18335 #include <${cf_header}>
18344 rm -f "conftest.$ac_objext"
18345 if { (eval echo "$as_me:18345: \"$ac_compile\"") >&5
18346 (eval $ac_compile) 2>&5
18348 echo "$as_me:18348: \$? = $ac_status" >&5
18349 (exit "$ac_status"); } &&
18350 { ac_try='test -s "conftest.$ac_objext"'
18351 { (eval echo "$as_me:18351: \"$ac_try\"") >&5
18352 (eval $ac_try) 2>&5
18354 echo "$as_me:18354: \$? = $ac_status" >&5
18355 (exit "$ac_status"); }; }; then
18356 cf_cv_term_header=$cf_header
18359 echo "$as_me: failed program was:" >&5
18360 cat "conftest.$ac_ext" >&5
18361 cf_cv_term_header=no
18363 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18366 case "$cf_cv_term_header" in
18368 # If curses is ncurses, some packagers still mess it up by trying to make
18369 # us use GNU termcap. This handles the most common case.
18370 for cf_header in ncurses/term.h ncursesw/term.h
18372 cat >"conftest.$ac_ext" <<_ACEOF
18373 #line 18373 "configure"
18374 #include "confdefs.h"
18376 #include <${cf_cv_ncurses_header:-curses.h}>
18377 #ifdef NCURSES_VERSION
18378 #include <${cf_header}>
18390 rm -f "conftest.$ac_objext"
18391 if { (eval echo "$as_me:18391: \"$ac_compile\"") >&5
18392 (eval $ac_compile) 2>&5
18394 echo "$as_me:18394: \$? = $ac_status" >&5
18395 (exit "$ac_status"); } &&
18396 { ac_try='test -s "conftest.$ac_objext"'
18397 { (eval echo "$as_me:18397: \"$ac_try\"") >&5
18398 (eval $ac_try) 2>&5
18400 echo "$as_me:18400: \$? = $ac_status" >&5
18401 (exit "$ac_status"); }; }; then
18402 cf_cv_term_header=$cf_header
18405 echo "$as_me: failed program was:" >&5
18406 cat "conftest.$ac_ext" >&5
18407 cf_cv_term_header=no
18409 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18415 echo "$as_me:18415: result: $cf_cv_term_header" >&5
18416 echo "${ECHO_T}$cf_cv_term_header" >&6
18418 case "$cf_cv_term_header" in
18421 cat >>confdefs.h <<\EOF
18422 #define HAVE_TERM_H 1
18428 cat >>confdefs.h <<\EOF
18429 #define HAVE_NCURSES_TERM_H 1
18435 cat >>confdefs.h <<\EOF
18436 #define HAVE_NCURSESW_TERM_H 1
18442 echo "$as_me:18442: checking for unctrl.h" >&5
18443 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
18444 if test "${cf_cv_unctrl_header+set}" = set; then
18445 echo $ECHO_N "(cached) $ECHO_C" >&6
18448 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
18449 # for <unctrl.h> if we do not find the variant.
18451 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
18453 case "${cf_cv_ncurses_header:-curses.h}" in
18455 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
18456 cf_header_list="$cf_header_item $cf_header_list"
18460 for cf_header in $cf_header_list
18462 cat >"conftest.$ac_ext" <<_ACEOF
18463 #line 18463 "configure"
18464 #include "confdefs.h"
18466 #include <${cf_cv_ncurses_header:-curses.h}>
18467 #include <${cf_header}>
18476 rm -f "conftest.$ac_objext"
18477 if { (eval echo "$as_me:18477: \"$ac_compile\"") >&5
18478 (eval $ac_compile) 2>&5
18480 echo "$as_me:18480: \$? = $ac_status" >&5
18481 (exit "$ac_status"); } &&
18482 { ac_try='test -s "conftest.$ac_objext"'
18483 { (eval echo "$as_me:18483: \"$ac_try\"") >&5
18484 (eval $ac_try) 2>&5
18486 echo "$as_me:18486: \$? = $ac_status" >&5
18487 (exit "$ac_status"); }; }; then
18488 cf_cv_unctrl_header=$cf_header
18491 echo "$as_me: failed program was:" >&5
18492 cat "conftest.$ac_ext" >&5
18493 cf_cv_unctrl_header=no
18495 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18499 echo "$as_me:18499: result: $cf_cv_unctrl_header" >&5
18500 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
18502 case "$cf_cv_unctrl_header" in
18504 { echo "$as_me:18504: WARNING: unctrl.h header not found" >&5
18505 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
18509 case "$cf_cv_unctrl_header" in
18512 cat >>confdefs.h <<\EOF
18513 #define HAVE_UNCTRL_H 1
18519 cat >>confdefs.h <<\EOF
18520 #define HAVE_NCURSES_UNCTRL_H 1
18524 (ncursesw/unctrl.h)
18526 cat >>confdefs.h <<\EOF
18527 #define HAVE_NCURSESW_UNCTRL_H 1
18535 assume_default_colors \
18552 init_extended_color \
18560 reset_color_pairs \
18576 use_default_colors \
18578 use_extended_names \
18594 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18596 echo "$as_me:18596: checking for ${cf_func}" >&5
18597 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
18599 echo "${as_me:-configure}:18599: testing ${cf_func} ..." 1>&5
18601 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
18602 echo $ECHO_N "(cached) $ECHO_C" >&6
18605 eval cf_result='$ac_cv_func_'$cf_func
18606 if test ".$cf_result" != ".no"; then
18607 cat >"conftest.$ac_ext" <<_ACEOF
18608 #line 18608 "configure"
18609 #include "confdefs.h"
18611 #ifdef HAVE_XCURSES
18612 #include <xcurses.h>
18613 char * XCursesProgramName = "test";
18615 #include <${cf_cv_ncurses_header:-curses.h}>
18616 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
18617 #include <ncursesw/term.h>
18618 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
18619 #include <ncurses/term.h>
18620 #elif defined(HAVE_TERM_H)
18630 long foo = (long)(&${cf_func});
18631 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
18632 if (foo + 1234L > 5678L)
18633 ${cf_cv_main_return:-return}(foo != 0);
18640 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18641 if { (eval echo "$as_me:18641: \"$ac_link\"") >&5
18642 (eval $ac_link) 2>&5
18644 echo "$as_me:18644: \$? = $ac_status" >&5
18645 (exit "$ac_status"); } &&
18646 { ac_try='test -s "conftest$ac_exeext"'
18647 { (eval echo "$as_me:18647: \"$ac_try\"") >&5
18648 (eval $ac_try) 2>&5
18650 echo "$as_me:18650: \$? = $ac_status" >&5
18651 (exit "$ac_status"); }; }; then
18654 echo "$as_me: failed program was:" >&5
18655 cat "conftest.$ac_ext" >&5
18658 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18660 eval 'cf_cv_func_'$cf_func'="$cf_result"'
18664 # use the computed/retrieved cache-value:
18665 eval 'cf_result=$cf_cv_func_'$cf_func
18666 echo "$as_me:18666: result: $cf_result" >&5
18667 echo "${ECHO_T}$cf_result" >&6
18668 if test "$cf_result" != no; then
18669 cat >>confdefs.h <<EOF
18670 #define HAVE_${cf_tr_func} 1
18676 for cf_func in tputs
18679 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18681 echo "$as_me:18681: checking for ${cf_func}" >&5
18682 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
18684 echo "${as_me:-configure}:18684: testing ${cf_func} ..." 1>&5
18686 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
18687 echo $ECHO_N "(cached) $ECHO_C" >&6
18690 eval cf_result='$ac_cv_func_'$cf_func
18691 if test ".$cf_result" != ".no"; then
18692 cat >"conftest.$ac_ext" <<_ACEOF
18693 #line 18693 "configure"
18694 #include "confdefs.h"
18696 #ifdef HAVE_XCURSES
18697 #include <xcurses.h>
18698 char * XCursesProgramName = "test";
18700 #include <${cf_cv_ncurses_header:-curses.h}>
18701 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
18702 #include <ncursesw/term.h>
18703 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
18704 #include <ncurses/term.h>
18705 #elif defined(HAVE_TERM_H)
18715 long foo = (long)(&${cf_func});
18716 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
18717 if (foo + 1234L > 5678L)
18718 ${cf_cv_main_return:-return}(foo != 0);
18725 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18726 if { (eval echo "$as_me:18726: \"$ac_link\"") >&5
18727 (eval $ac_link) 2>&5
18729 echo "$as_me:18729: \$? = $ac_status" >&5
18730 (exit "$ac_status"); } &&
18731 { ac_try='test -s "conftest$ac_exeext"'
18732 { (eval echo "$as_me:18732: \"$ac_try\"") >&5
18733 (eval $ac_try) 2>&5
18735 echo "$as_me:18735: \$? = $ac_status" >&5
18736 (exit "$ac_status"); }; }; then
18739 echo "$as_me: failed program was:" >&5
18740 cat "conftest.$ac_ext" >&5
18743 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18745 eval 'cf_cv_func_'$cf_func'="$cf_result"'
18749 # use the computed/retrieved cache-value:
18750 eval 'cf_result=$cf_cv_func_'$cf_func
18751 echo "$as_me:18751: result: $cf_result" >&5
18752 echo "${ECHO_T}$cf_result" >&6
18753 if test "$cf_result" != no; then
18754 cat >>confdefs.h <<EOF
18755 #define HAVE_${cf_tr_func} 1
18761 if test "x$cf_cv_func_tputs" = xyes
18764 for cf_arg in int char
18766 for cf_ret in int void
18768 if test "$cf_ret" = void
18770 cf_return="/* nothing */"
18772 cf_return="return value"
18774 cat >"conftest.$ac_ext" <<_ACEOF
18775 #line 18775 "configure"
18776 #include "confdefs.h"
18778 #include <${cf_cv_ncurses_header:-curses.h}>
18779 #include <$cf_cv_term_header>
18781 static $cf_ret outc($cf_arg value) { $cf_return; }
18787 tputs("hello", 0, outc);
18788 ${cf_cv_main_return:-return}(0);
18794 rm -f "conftest.$ac_objext"
18795 if { (eval echo "$as_me:18795: \"$ac_compile\"") >&5
18796 (eval $ac_compile) 2>&5
18798 echo "$as_me:18798: \$? = $ac_status" >&5
18799 (exit "$ac_status"); } &&
18800 { ac_try='test -s "conftest.$ac_objext"'
18801 { (eval echo "$as_me:18801: \"$ac_try\"") >&5
18802 (eval $ac_try) 2>&5
18804 echo "$as_me:18804: \$? = $ac_status" >&5
18805 (exit "$ac_status"); }; }; then
18807 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
18809 echo "${as_me:-configure}:18809: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
18811 cat >>confdefs.h <<EOF
18812 #define TPUTS_ARG $cf_arg
18813 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
18814 #define TPUTS_RETURN(value) $cf_return
18820 echo "$as_me: failed program was:" >&5
18821 cat "conftest.$ac_ext" >&5
18823 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18825 test "$cf_done" = yes && break
18829 echo "$as_me:18829: checking for ncurses extended functions" >&5
18830 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
18831 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
18832 echo $ECHO_N "(cached) $ECHO_C" >&6
18835 cat >"conftest.$ac_ext" <<_ACEOF
18836 #line 18836 "configure"
18837 #include "confdefs.h"
18839 #include <${cf_cv_ncurses_header:-curses.h}>
18844 int x = NCURSES_EXT_FUNCS
18850 rm -f "conftest.$ac_objext"
18851 if { (eval echo "$as_me:18851: \"$ac_compile\"") >&5
18852 (eval $ac_compile) 2>&5
18854 echo "$as_me:18854: \$? = $ac_status" >&5
18855 (exit "$ac_status"); } &&
18856 { ac_try='test -s "conftest.$ac_objext"'
18857 { (eval echo "$as_me:18857: \"$ac_try\"") >&5
18858 (eval $ac_try) 2>&5
18860 echo "$as_me:18860: \$? = $ac_status" >&5
18861 (exit "$ac_status"); }; }; then
18862 cf_cv_ncurses_ext_funcs=defined
18864 echo "$as_me: failed program was:" >&5
18865 cat "conftest.$ac_ext" >&5
18867 cat >"conftest.$ac_ext" <<_ACEOF
18868 #line 18868 "configure"
18869 #include "confdefs.h"
18871 #include <${cf_cv_ncurses_header:-curses.h}>
18876 (void) assume_default_colors (0, 0);
18877 (void) curses_version ();
18878 (void) define_key (0, 0);
18879 (void) is_term_resized (0, 0);
18880 (void) key_defined (0);
18881 (void) keybound (0, 0);
18882 (void) keyok (0, 0);
18883 (void) resize_term (0, 0);
18884 (void) resizeterm (0, 0);
18885 (void) use_default_colors ();
18886 (void) use_extended_names (0);
18887 (void) wresize (0, 0, 0);
18892 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18893 if { (eval echo "$as_me:18893: \"$ac_link\"") >&5
18894 (eval $ac_link) 2>&5
18896 echo "$as_me:18896: \$? = $ac_status" >&5
18897 (exit "$ac_status"); } &&
18898 { ac_try='test -s "conftest$ac_exeext"'
18899 { (eval echo "$as_me:18899: \"$ac_try\"") >&5
18900 (eval $ac_try) 2>&5
18902 echo "$as_me:18902: \$? = $ac_status" >&5
18903 (exit "$ac_status"); }; }; then
18904 cf_cv_ncurses_ext_funcs=yes
18906 echo "$as_me: failed program was:" >&5
18907 cat "conftest.$ac_ext" >&5
18908 cf_cv_ncurses_ext_funcs=no
18910 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18913 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18916 echo "$as_me:18916: result: $cf_cv_ncurses_ext_funcs" >&5
18917 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
18918 test "$cf_cv_ncurses_ext_funcs" = yes &&
18919 cat >>confdefs.h <<\EOF
18920 #define NCURSES_EXT_FUNCS 1
18923 if test "$cf_enable_widec" = yes
18925 # workaround for systems with ncurses before 20111029, due to change of
18926 # feature test macro from _XPG5 to _XOPEN_SOURCE
18927 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
18930 echo "$as_me:18930: checking if _XPG5 should be defined to enable wide-characters" >&5
18931 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
18933 cat >"conftest.$ac_ext" <<_ACEOF
18934 #line 18934 "configure"
18935 #include "confdefs.h"
18937 #include <${cf_cv_ncurses_header:-curses.h}>
18946 rm -f "conftest.$ac_objext"
18947 if { (eval echo "$as_me:18947: \"$ac_compile\"") >&5
18948 (eval $ac_compile) 2>&5
18950 echo "$as_me:18950: \$? = $ac_status" >&5
18951 (exit "$ac_status"); } &&
18952 { ac_try='test -s "conftest.$ac_objext"'
18953 { (eval echo "$as_me:18953: \"$ac_try\"") >&5
18954 (eval $ac_try) 2>&5
18956 echo "$as_me:18956: \$? = $ac_status" >&5
18957 (exit "$ac_status"); }; }; then
18960 echo "$as_me: failed program was:" >&5
18961 cat "conftest.$ac_ext" >&5
18962 cf_save_cppflags="$CPPFLAGS"
18963 CPPFLAGS="$CPPFLAGS -D_XPG5"
18964 cat >"conftest.$ac_ext" <<_ACEOF
18965 #line 18965 "configure"
18966 #include "confdefs.h"
18968 #include <${cf_cv_ncurses_header:-curses.h}>
18977 rm -f "conftest.$ac_objext"
18978 if { (eval echo "$as_me:18978: \"$ac_compile\"") >&5
18979 (eval $ac_compile) 2>&5
18981 echo "$as_me:18981: \$? = $ac_status" >&5
18982 (exit "$ac_status"); } &&
18983 { ac_try='test -s "conftest.$ac_objext"'
18984 { (eval echo "$as_me:18984: \"$ac_try\"") >&5
18985 (eval $ac_try) 2>&5
18987 echo "$as_me:18987: \$? = $ac_status" >&5
18988 (exit "$ac_status"); }; }; then
18991 echo "$as_me: failed program was:" >&5
18992 cat "conftest.$ac_ext" >&5
18994 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18995 CPPFLAGS="$cf_save_cppflags"
18997 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18998 echo "$as_me:18998: result: $cf_define_xpg5" >&5
18999 echo "${ECHO_T}$cf_define_xpg5" >&6
19001 if test "$cf_define_xpg5" = yes
19003 CPPFLAGS="$CPPFLAGS -D_XPG5"
19007 echo "$as_me:19007: checking for wide-character functions" >&5
19008 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
19009 if test "${cf_cv_widechar_funcs+set}" = set; then
19010 echo $ECHO_N "(cached) $ECHO_C" >&6
19013 cat >"conftest.$ac_ext" <<_ACEOF
19014 #line 19014 "configure"
19015 #include "confdefs.h"
19017 #include <${cf_cv_ncurses_header:-curses.h}>
19022 static wchar_t src_wchar[2];
19023 static cchar_t dst_cchar;
19024 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
19030 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19031 if { (eval echo "$as_me:19031: \"$ac_link\"") >&5
19032 (eval $ac_link) 2>&5
19034 echo "$as_me:19034: \$? = $ac_status" >&5
19035 (exit "$ac_status"); } &&
19036 { ac_try='test -s "conftest$ac_exeext"'
19037 { (eval echo "$as_me:19037: \"$ac_try\"") >&5
19038 (eval $ac_try) 2>&5
19040 echo "$as_me:19040: \$? = $ac_status" >&5
19041 (exit "$ac_status"); }; }; then
19042 cf_cv_widechar_funcs=yes
19044 echo "$as_me: failed program was:" >&5
19045 cat "conftest.$ac_ext" >&5
19046 cf_cv_widechar_funcs=no
19048 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19051 echo "$as_me:19051: result: $cf_cv_widechar_funcs" >&5
19052 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
19053 if test "$cf_cv_widechar_funcs" != no ; then
19055 cat >>confdefs.h <<\EOF
19056 #define USE_WIDEC_SUPPORT 1
19060 cat >>confdefs.h <<\EOF
19061 #define USE_WIDEC_SUPPORT 0
19066 cat >>confdefs.h <<\EOF
19067 #define USE_WIDEC_SUPPORT 0
19072 echo "$as_me:19072: checking if $cf_cv_screen library uses pthreads" >&5
19073 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
19074 if test "${cf_cv_use_pthreads+set}" = set; then
19075 echo $ECHO_N "(cached) $ECHO_C" >&6
19078 cat >"conftest.$ac_ext" <<_ACEOF
19079 #line 19079 "configure"
19080 #include "confdefs.h"
19082 #include <${cf_cv_ncurses_header:-curses.h}>
19083 extern void _nc_init_pthreads(void);
19090 _nc_init_pthreads();
19096 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19097 if { (eval echo "$as_me:19097: \"$ac_link\"") >&5
19098 (eval $ac_link) 2>&5
19100 echo "$as_me:19100: \$? = $ac_status" >&5
19101 (exit "$ac_status"); } &&
19102 { ac_try='test -s "conftest$ac_exeext"'
19103 { (eval echo "$as_me:19103: \"$ac_try\"") >&5
19104 (eval $ac_try) 2>&5
19106 echo "$as_me:19106: \$? = $ac_status" >&5
19107 (exit "$ac_status"); }; }; then
19108 cf_cv_use_pthreads=yes
19110 echo "$as_me: failed program was:" >&5
19111 cat "conftest.$ac_ext" >&5
19112 cf_cv_use_pthreads=no
19114 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19117 echo "$as_me:19117: result: $cf_cv_use_pthreads" >&5
19118 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
19119 test $cf_cv_use_pthreads = yes &&
19120 cat >>confdefs.h <<\EOF
19121 #define USE_PTHREADS 1
19124 echo "$as_me:19124: checking if sys/time.h works with sys/select.h" >&5
19125 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
19126 if test "${cf_cv_sys_time_select+set}" = set; then
19127 echo $ECHO_N "(cached) $ECHO_C" >&6
19130 cat >"conftest.$ac_ext" <<_ACEOF
19131 #line 19131 "configure"
19132 #include "confdefs.h"
19134 #include <sys/types.h>
19135 #ifdef HAVE_SYS_TIME_H
19136 #include <sys/time.h>
19138 #ifdef HAVE_SYS_SELECT_H
19139 #include <sys/select.h>
19150 rm -f "conftest.$ac_objext"
19151 if { (eval echo "$as_me:19151: \"$ac_compile\"") >&5
19152 (eval $ac_compile) 2>&5
19154 echo "$as_me:19154: \$? = $ac_status" >&5
19155 (exit "$ac_status"); } &&
19156 { ac_try='test -s "conftest.$ac_objext"'
19157 { (eval echo "$as_me:19157: \"$ac_try\"") >&5
19158 (eval $ac_try) 2>&5
19160 echo "$as_me:19160: \$? = $ac_status" >&5
19161 (exit "$ac_status"); }; }; then
19162 cf_cv_sys_time_select=yes
19164 echo "$as_me: failed program was:" >&5
19165 cat "conftest.$ac_ext" >&5
19166 cf_cv_sys_time_select=no
19168 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19172 echo "$as_me:19172: result: $cf_cv_sys_time_select" >&5
19173 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
19174 test "$cf_cv_sys_time_select" = yes &&
19175 cat >>confdefs.h <<\EOF
19176 #define HAVE_SYS_TIME_SELECT 1
19179 # special check for test/ditto.c
19181 echo "$as_me:19181: checking for openpty in -lutil" >&5
19182 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
19183 if test "${ac_cv_lib_util_openpty+set}" = set; then
19184 echo $ECHO_N "(cached) $ECHO_C" >&6
19186 ac_check_lib_save_LIBS=$LIBS
19187 LIBS="-lutil $LIBS"
19188 cat >"conftest.$ac_ext" <<_ACEOF
19189 #line 19189 "configure"
19190 #include "confdefs.h"
19192 /* Override any gcc2 internal prototype to avoid an error. */
19196 /* We use char because int might match the return type of a gcc2
19197 builtin and then its argument prototype would still apply. */
19207 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19208 if { (eval echo "$as_me:19208: \"$ac_link\"") >&5
19209 (eval $ac_link) 2>&5
19211 echo "$as_me:19211: \$? = $ac_status" >&5
19212 (exit "$ac_status"); } &&
19213 { ac_try='test -s "conftest$ac_exeext"'
19214 { (eval echo "$as_me:19214: \"$ac_try\"") >&5
19215 (eval $ac_try) 2>&5
19217 echo "$as_me:19217: \$? = $ac_status" >&5
19218 (exit "$ac_status"); }; }; then
19219 ac_cv_lib_util_openpty=yes
19221 echo "$as_me: failed program was:" >&5
19222 cat "conftest.$ac_ext" >&5
19223 ac_cv_lib_util_openpty=no
19225 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19226 LIBS=$ac_check_lib_save_LIBS
19228 echo "$as_me:19228: result: $ac_cv_lib_util_openpty" >&5
19229 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
19230 if test "$ac_cv_lib_util_openpty" = yes; then
19236 echo "$as_me:19236: checking for openpty header" >&5
19237 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
19238 if test "${cf_cv_func_openpty+set}" = set; then
19239 echo $ECHO_N "(cached) $ECHO_C" >&6
19242 cf_save_LIBS="$LIBS"
19243 test "$cf_cv_lib_util" = yes && {
19244 cf_add_libs="$LIBS"
19247 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19248 # filter duplicates
19249 for cf_add_1lib in $cf_add_0lib; do
19250 for cf_add_2lib in $cf_add_libs; do
19251 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19256 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19258 LIBS="$cf_add_libs"
19260 for cf_header in pty.h libutil.h util.h
19262 cat >"conftest.$ac_ext" <<_ACEOF
19263 #line 19263 "configure"
19264 #include "confdefs.h"
19266 #include <$cf_header>
19272 int x = openpty((int *)0, (int *)0, (char *)0,
19273 (struct termios *)0, (struct winsize *)0);
19279 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19280 if { (eval echo "$as_me:19280: \"$ac_link\"") >&5
19281 (eval $ac_link) 2>&5
19283 echo "$as_me:19283: \$? = $ac_status" >&5
19284 (exit "$ac_status"); } &&
19285 { ac_try='test -s "conftest$ac_exeext"'
19286 { (eval echo "$as_me:19286: \"$ac_try\"") >&5
19287 (eval $ac_try) 2>&5
19289 echo "$as_me:19289: \$? = $ac_status" >&5
19290 (exit "$ac_status"); }; }; then
19292 cf_cv_func_openpty=$cf_header
19296 echo "$as_me: failed program was:" >&5
19297 cat "conftest.$ac_ext" >&5
19299 cf_cv_func_openpty=no
19302 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19304 LIBS="$cf_save_LIBS"
19307 echo "$as_me:19307: result: $cf_cv_func_openpty" >&5
19308 echo "${ECHO_T}$cf_cv_func_openpty" >&6
19310 if test "$cf_cv_func_openpty" != no ; then
19312 cat >>confdefs.h <<EOF
19313 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
19316 cat >>confdefs.h <<\EOF
19317 #define USE_XTERM_PTY 1
19320 if test "x$cf_cv_lib_util" = xyes ; then
19322 cf_add_libs="$TEST_LIBS"
19325 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19326 # filter duplicates
19327 for cf_add_1lib in $cf_add_0lib; do
19328 for cf_add_2lib in $cf_add_libs; do
19329 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19334 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19336 TEST_LIBS="$cf_add_libs"
19341 echo "$as_me:19341: checking for function curses_version" >&5
19342 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
19343 if test "${cf_cv_func_curses_version+set}" = set; then
19344 echo $ECHO_N "(cached) $ECHO_C" >&6
19347 if test "$cross_compiling" = yes; then
19348 cf_cv_func_curses_version=unknown
19350 cat >"conftest.$ac_ext" <<_ACEOF
19351 #line 19351 "configure"
19352 #include "confdefs.h"
19354 #include <${cf_cv_ncurses_header:-curses.h}>
19358 sprintf(temp, "%s\\n", curses_version());
19359 ${cf_cv_main_return:-return}(0);
19363 rm -f "conftest$ac_exeext"
19364 if { (eval echo "$as_me:19364: \"$ac_link\"") >&5
19365 (eval $ac_link) 2>&5
19367 echo "$as_me:19367: \$? = $ac_status" >&5
19368 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
19369 { (eval echo "$as_me:19369: \"$ac_try\"") >&5
19370 (eval $ac_try) 2>&5
19372 echo "$as_me:19372: \$? = $ac_status" >&5
19373 (exit "$ac_status"); }; }; then
19374 cf_cv_func_curses_version=yes
19377 echo "$as_me: program exited with status $ac_status" >&5
19378 echo "$as_me: failed program was:" >&5
19379 cat "conftest.$ac_ext" >&5
19380 cf_cv_func_curses_version=no
19383 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
19387 echo "$as_me:19387: result: $cf_cv_func_curses_version" >&5
19388 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
19389 test "$cf_cv_func_curses_version" = yes &&
19390 cat >>confdefs.h <<\EOF
19391 #define HAVE_CURSES_VERSION 1
19394 echo "$as_me:19394: checking for alternate character set array" >&5
19395 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
19396 if test "${cf_cv_curses_acs_map+set}" = set; then
19397 echo $ECHO_N "(cached) $ECHO_C" >&6
19400 cf_cv_curses_acs_map=unknown
19401 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
19403 cat >"conftest.$ac_ext" <<_ACEOF
19404 #line 19404 "configure"
19405 #include "confdefs.h"
19407 #include <${cf_cv_ncurses_header:-curses.h}>
19413 ${name}['k'] = ACS_PLUS
19419 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19420 if { (eval echo "$as_me:19420: \"$ac_link\"") >&5
19421 (eval $ac_link) 2>&5
19423 echo "$as_me:19423: \$? = $ac_status" >&5
19424 (exit "$ac_status"); } &&
19425 { ac_try='test -s "conftest$ac_exeext"'
19426 { (eval echo "$as_me:19426: \"$ac_try\"") >&5
19427 (eval $ac_try) 2>&5
19429 echo "$as_me:19429: \$? = $ac_status" >&5
19430 (exit "$ac_status"); }; }; then
19431 cf_cv_curses_acs_map=$name; break
19433 echo "$as_me: failed program was:" >&5
19434 cat "conftest.$ac_ext" >&5
19436 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19440 echo "$as_me:19440: result: $cf_cv_curses_acs_map" >&5
19441 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
19443 test "$cf_cv_curses_acs_map" != unknown &&
19444 cat >>confdefs.h <<EOF
19445 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
19448 if test "$cf_enable_widec" = yes; then
19450 echo "$as_me:19450: checking for wide alternate character set array" >&5
19451 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
19452 if test "${cf_cv_curses_wacs_map+set}" = set; then
19453 echo $ECHO_N "(cached) $ECHO_C" >&6
19456 cf_cv_curses_wacs_map=unknown
19457 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
19459 cat >"conftest.$ac_ext" <<_ACEOF
19460 #line 19460 "configure"
19461 #include "confdefs.h"
19463 #ifndef _XOPEN_SOURCE_EXTENDED
19464 #define _XOPEN_SOURCE_EXTENDED
19466 #include <${cf_cv_ncurses_header:-curses.h}>
19470 void *foo = &(${name}['k']); (void)foo
19475 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19476 if { (eval echo "$as_me:19476: \"$ac_link\"") >&5
19477 (eval $ac_link) 2>&5
19479 echo "$as_me:19479: \$? = $ac_status" >&5
19480 (exit "$ac_status"); } &&
19481 { ac_try='test -s "conftest$ac_exeext"'
19482 { (eval echo "$as_me:19482: \"$ac_try\"") >&5
19483 (eval $ac_try) 2>&5
19485 echo "$as_me:19485: \$? = $ac_status" >&5
19486 (exit "$ac_status"); }; }; then
19487 cf_cv_curses_wacs_map=$name
19490 echo "$as_me: failed program was:" >&5
19491 cat "conftest.$ac_ext" >&5
19493 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19496 echo "$as_me:19496: result: $cf_cv_curses_wacs_map" >&5
19497 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
19499 test "$cf_cv_curses_wacs_map" != unknown &&
19500 cat >>confdefs.h <<EOF
19501 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
19504 echo "$as_me:19504: checking for wide alternate character constants" >&5
19505 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
19506 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
19507 echo $ECHO_N "(cached) $ECHO_C" >&6
19510 cf_cv_curses_wacs_symbols=no
19511 if test "$cf_cv_curses_wacs_map" != unknown
19513 cat >"conftest.$ac_ext" <<_ACEOF
19514 #line 19514 "configure"
19515 #include "confdefs.h"
19517 #ifndef _XOPEN_SOURCE_EXTENDED
19518 #define _XOPEN_SOURCE_EXTENDED
19520 #include <${cf_cv_ncurses_header:-curses.h}>
19524 cchar_t *foo = WACS_PLUS;
19525 ${cf_cv_curses_wacs_map}['k'] = *WACS_PLUS; (void)foo
19530 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19531 if { (eval echo "$as_me:19531: \"$ac_link\"") >&5
19532 (eval $ac_link) 2>&5
19534 echo "$as_me:19534: \$? = $ac_status" >&5
19535 (exit "$ac_status"); } &&
19536 { ac_try='test -s "conftest$ac_exeext"'
19537 { (eval echo "$as_me:19537: \"$ac_try\"") >&5
19538 (eval $ac_try) 2>&5
19540 echo "$as_me:19540: \$? = $ac_status" >&5
19541 (exit "$ac_status"); }; }; then
19542 cf_cv_curses_wacs_symbols=yes
19544 echo "$as_me: failed program was:" >&5
19545 cat "conftest.$ac_ext" >&5
19547 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19549 cat >"conftest.$ac_ext" <<_ACEOF
19550 #line 19550 "configure"
19551 #include "confdefs.h"
19553 #ifndef _XOPEN_SOURCE_EXTENDED
19554 #define _XOPEN_SOURCE_EXTENDED
19556 #include <${cf_cv_ncurses_header:-curses.h}>
19560 cchar_t *foo = WACS_PLUS; (void)foo
19565 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19566 if { (eval echo "$as_me:19566: \"$ac_link\"") >&5
19567 (eval $ac_link) 2>&5
19569 echo "$as_me:19569: \$? = $ac_status" >&5
19570 (exit "$ac_status"); } &&
19571 { ac_try='test -s "conftest$ac_exeext"'
19572 { (eval echo "$as_me:19572: \"$ac_try\"") >&5
19573 (eval $ac_try) 2>&5
19575 echo "$as_me:19575: \$? = $ac_status" >&5
19576 (exit "$ac_status"); }; }; then
19577 cf_cv_curses_wacs_symbols=yes
19579 echo "$as_me: failed program was:" >&5
19580 cat "conftest.$ac_ext" >&5
19582 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19586 echo "$as_me:19586: result: $cf_cv_curses_wacs_symbols" >&5
19587 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
19589 test "$cf_cv_curses_wacs_symbols" != no &&
19590 cat >>confdefs.h <<\EOF
19591 #define CURSES_WACS_SYMBOLS 1
19596 echo "$as_me:19596: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19597 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19598 cat >"conftest.$ac_ext" <<_ACEOF
19599 #line 19599 "configure"
19600 #include "confdefs.h"
19602 #ifndef _XOPEN_SOURCE_EXTENDED
19603 #define _XOPEN_SOURCE_EXTENDED
19605 #include <${cf_cv_ncurses_header:-curses.h}>
19616 rm -f "conftest.$ac_objext"
19617 if { (eval echo "$as_me:19617: \"$ac_compile\"") >&5
19618 (eval $ac_compile) 2>&5
19620 echo "$as_me:19620: \$? = $ac_status" >&5
19621 (exit "$ac_status"); } &&
19622 { ac_try='test -s "conftest.$ac_objext"'
19623 { (eval echo "$as_me:19623: \"$ac_try\"") >&5
19624 (eval $ac_try) 2>&5
19626 echo "$as_me:19626: \$? = $ac_status" >&5
19627 (exit "$ac_status"); }; }; then
19630 echo "$as_me: failed program was:" >&5
19631 cat "conftest.$ac_ext" >&5
19634 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19635 echo "$as_me:19635: result: $cf_result" >&5
19636 echo "${ECHO_T}$cf_result" >&6
19637 if test "$cf_result" = yes ; then
19639 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19641 cat >>confdefs.h <<EOF
19642 #define $cf_result 1
19647 cat >>confdefs.h <<EOF
19648 #define attr_t long
19653 if test "$cf_enable_widec" = yes; then
19655 # This is needed on Tru64 5.0 to declare mbstate_t
19656 echo "$as_me:19656: checking if we must include wchar.h to declare mbstate_t" >&5
19657 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
19658 if test "${cf_cv_mbstate_t+set}" = set; then
19659 echo $ECHO_N "(cached) $ECHO_C" >&6
19662 cat >"conftest.$ac_ext" <<_ACEOF
19663 #line 19663 "configure"
19664 #include "confdefs.h"
19666 #include <stdlib.h>
19667 #include <stdarg.h>
19669 #ifdef HAVE_LIBUTF8_H
19670 #include <libutf8.h>
19680 rm -f "conftest.$ac_objext"
19681 if { (eval echo "$as_me:19681: \"$ac_compile\"") >&5
19682 (eval $ac_compile) 2>&5
19684 echo "$as_me:19684: \$? = $ac_status" >&5
19685 (exit "$ac_status"); } &&
19686 { ac_try='test -s "conftest.$ac_objext"'
19687 { (eval echo "$as_me:19687: \"$ac_try\"") >&5
19688 (eval $ac_try) 2>&5
19690 echo "$as_me:19690: \$? = $ac_status" >&5
19691 (exit "$ac_status"); }; }; then
19694 echo "$as_me: failed program was:" >&5
19695 cat "conftest.$ac_ext" >&5
19696 cat >"conftest.$ac_ext" <<_ACEOF
19697 #line 19697 "configure"
19698 #include "confdefs.h"
19700 #include <stdlib.h>
19701 #include <stdarg.h>
19704 #ifdef HAVE_LIBUTF8_H
19705 #include <libutf8.h>
19715 rm -f "conftest.$ac_objext"
19716 if { (eval echo "$as_me:19716: \"$ac_compile\"") >&5
19717 (eval $ac_compile) 2>&5
19719 echo "$as_me:19719: \$? = $ac_status" >&5
19720 (exit "$ac_status"); } &&
19721 { ac_try='test -s "conftest.$ac_objext"'
19722 { (eval echo "$as_me:19722: \"$ac_try\"") >&5
19723 (eval $ac_try) 2>&5
19725 echo "$as_me:19725: \$? = $ac_status" >&5
19726 (exit "$ac_status"); }; }; then
19727 cf_cv_mbstate_t=yes
19729 echo "$as_me: failed program was:" >&5
19730 cat "conftest.$ac_ext" >&5
19731 cf_cv_mbstate_t=unknown
19733 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19735 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19737 echo "$as_me:19737: result: $cf_cv_mbstate_t" >&5
19738 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
19740 if test "$cf_cv_mbstate_t" = yes ; then
19742 cat >>confdefs.h <<\EOF
19743 #define NEED_WCHAR_H 1
19749 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
19750 if test "$cf_cv_mbstate_t" = unknown ; then
19751 NCURSES_MBSTATE_T=1
19754 # if we find mbstate_t in either place, use substitution to provide a fallback.
19755 if test "$cf_cv_mbstate_t" != unknown ; then
19756 NCURSES_OK_MBSTATE_T=1
19759 # This is needed on Tru64 5.0 to declare wchar_t
19760 echo "$as_me:19760: checking if we must include wchar.h to declare wchar_t" >&5
19761 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
19762 if test "${cf_cv_wchar_t+set}" = set; then
19763 echo $ECHO_N "(cached) $ECHO_C" >&6
19766 cat >"conftest.$ac_ext" <<_ACEOF
19767 #line 19767 "configure"
19768 #include "confdefs.h"
19770 #include <stdlib.h>
19771 #include <stdarg.h>
19773 #ifdef HAVE_LIBUTF8_H
19774 #include <libutf8.h>
19784 rm -f "conftest.$ac_objext"
19785 if { (eval echo "$as_me:19785: \"$ac_compile\"") >&5
19786 (eval $ac_compile) 2>&5
19788 echo "$as_me:19788: \$? = $ac_status" >&5
19789 (exit "$ac_status"); } &&
19790 { ac_try='test -s "conftest.$ac_objext"'
19791 { (eval echo "$as_me:19791: \"$ac_try\"") >&5
19792 (eval $ac_try) 2>&5
19794 echo "$as_me:19794: \$? = $ac_status" >&5
19795 (exit "$ac_status"); }; }; then
19798 echo "$as_me: failed program was:" >&5
19799 cat "conftest.$ac_ext" >&5
19800 cat >"conftest.$ac_ext" <<_ACEOF
19801 #line 19801 "configure"
19802 #include "confdefs.h"
19804 #include <stdlib.h>
19805 #include <stdarg.h>
19808 #ifdef HAVE_LIBUTF8_H
19809 #include <libutf8.h>
19819 rm -f "conftest.$ac_objext"
19820 if { (eval echo "$as_me:19820: \"$ac_compile\"") >&5
19821 (eval $ac_compile) 2>&5
19823 echo "$as_me:19823: \$? = $ac_status" >&5
19824 (exit "$ac_status"); } &&
19825 { ac_try='test -s "conftest.$ac_objext"'
19826 { (eval echo "$as_me:19826: \"$ac_try\"") >&5
19827 (eval $ac_try) 2>&5
19829 echo "$as_me:19829: \$? = $ac_status" >&5
19830 (exit "$ac_status"); }; }; then
19833 echo "$as_me: failed program was:" >&5
19834 cat "conftest.$ac_ext" >&5
19835 cf_cv_wchar_t=unknown
19837 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19839 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19841 echo "$as_me:19841: result: $cf_cv_wchar_t" >&5
19842 echo "${ECHO_T}$cf_cv_wchar_t" >&6
19844 if test "$cf_cv_wchar_t" = yes ; then
19846 cat >>confdefs.h <<\EOF
19847 #define NEED_WCHAR_H 1
19853 # if we do not find wchar_t in either place, use substitution to provide a fallback.
19854 if test "$cf_cv_wchar_t" = unknown ; then
19858 # if we find wchar_t in either place, use substitution to provide a fallback.
19859 if test "$cf_cv_wchar_t" != unknown ; then
19860 NCURSES_OK_WCHAR_T=1
19863 # This is needed on Tru64 5.0 to declare wint_t
19864 echo "$as_me:19864: checking if we must include wchar.h to declare wint_t" >&5
19865 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
19866 if test "${cf_cv_wint_t+set}" = set; then
19867 echo $ECHO_N "(cached) $ECHO_C" >&6
19870 cat >"conftest.$ac_ext" <<_ACEOF
19871 #line 19871 "configure"
19872 #include "confdefs.h"
19874 #include <stdlib.h>
19875 #include <stdarg.h>
19877 #ifdef HAVE_LIBUTF8_H
19878 #include <libutf8.h>
19888 rm -f "conftest.$ac_objext"
19889 if { (eval echo "$as_me:19889: \"$ac_compile\"") >&5
19890 (eval $ac_compile) 2>&5
19892 echo "$as_me:19892: \$? = $ac_status" >&5
19893 (exit "$ac_status"); } &&
19894 { ac_try='test -s "conftest.$ac_objext"'
19895 { (eval echo "$as_me:19895: \"$ac_try\"") >&5
19896 (eval $ac_try) 2>&5
19898 echo "$as_me:19898: \$? = $ac_status" >&5
19899 (exit "$ac_status"); }; }; then
19902 echo "$as_me: failed program was:" >&5
19903 cat "conftest.$ac_ext" >&5
19904 cat >"conftest.$ac_ext" <<_ACEOF
19905 #line 19905 "configure"
19906 #include "confdefs.h"
19908 #include <stdlib.h>
19909 #include <stdarg.h>
19912 #ifdef HAVE_LIBUTF8_H
19913 #include <libutf8.h>
19923 rm -f "conftest.$ac_objext"
19924 if { (eval echo "$as_me:19924: \"$ac_compile\"") >&5
19925 (eval $ac_compile) 2>&5
19927 echo "$as_me:19927: \$? = $ac_status" >&5
19928 (exit "$ac_status"); } &&
19929 { ac_try='test -s "conftest.$ac_objext"'
19930 { (eval echo "$as_me:19930: \"$ac_try\"") >&5
19931 (eval $ac_try) 2>&5
19933 echo "$as_me:19933: \$? = $ac_status" >&5
19934 (exit "$ac_status"); }; }; then
19937 echo "$as_me: failed program was:" >&5
19938 cat "conftest.$ac_ext" >&5
19939 cf_cv_wint_t=unknown
19941 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19943 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19945 echo "$as_me:19945: result: $cf_cv_wint_t" >&5
19946 echo "${ECHO_T}$cf_cv_wint_t" >&6
19948 if test "$cf_cv_wint_t" = yes ; then
19950 cat >>confdefs.h <<\EOF
19951 #define NEED_WCHAR_H 1
19957 # if we do not find wint_t in either place, use substitution to provide a fallback.
19958 if test "$cf_cv_wint_t" = unknown ; then
19962 # if we find wint_t in either place, use substitution to provide a fallback.
19963 if test "$cf_cv_wint_t" != unknown ; then
19964 NCURSES_OK_WINT_T=1
19967 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
19969 echo "$as_me:19969: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19970 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19971 cat >"conftest.$ac_ext" <<_ACEOF
19972 #line 19972 "configure"
19973 #include "confdefs.h"
19975 #ifndef _XOPEN_SOURCE_EXTENDED
19976 #define _XOPEN_SOURCE_EXTENDED
19978 #include <${cf_cv_ncurses_header:-curses.h}>
19989 rm -f "conftest.$ac_objext"
19990 if { (eval echo "$as_me:19990: \"$ac_compile\"") >&5
19991 (eval $ac_compile) 2>&5
19993 echo "$as_me:19993: \$? = $ac_status" >&5
19994 (exit "$ac_status"); } &&
19995 { ac_try='test -s "conftest.$ac_objext"'
19996 { (eval echo "$as_me:19996: \"$ac_try\"") >&5
19997 (eval $ac_try) 2>&5
19999 echo "$as_me:19999: \$? = $ac_status" >&5
20000 (exit "$ac_status"); }; }; then
20003 echo "$as_me: failed program was:" >&5
20004 cat "conftest.$ac_ext" >&5
20007 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20008 echo "$as_me:20008: result: $cf_result" >&5
20009 echo "${ECHO_T}$cf_result" >&6
20010 if test "$cf_result" = yes ; then
20012 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20014 cat >>confdefs.h <<EOF
20015 #define $cf_result 1
20020 cat >>confdefs.h <<EOF
20021 #define mbstate_t long
20028 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
20030 echo "$as_me:20030: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20031 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20032 cat >"conftest.$ac_ext" <<_ACEOF
20033 #line 20033 "configure"
20034 #include "confdefs.h"
20036 #ifndef _XOPEN_SOURCE_EXTENDED
20037 #define _XOPEN_SOURCE_EXTENDED
20039 #include <${cf_cv_ncurses_header:-curses.h}>
20050 rm -f "conftest.$ac_objext"
20051 if { (eval echo "$as_me:20051: \"$ac_compile\"") >&5
20052 (eval $ac_compile) 2>&5
20054 echo "$as_me:20054: \$? = $ac_status" >&5
20055 (exit "$ac_status"); } &&
20056 { ac_try='test -s "conftest.$ac_objext"'
20057 { (eval echo "$as_me:20057: \"$ac_try\"") >&5
20058 (eval $ac_try) 2>&5
20060 echo "$as_me:20060: \$? = $ac_status" >&5
20061 (exit "$ac_status"); }; }; then
20064 echo "$as_me: failed program was:" >&5
20065 cat "conftest.$ac_ext" >&5
20068 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20069 echo "$as_me:20069: result: $cf_result" >&5
20070 echo "${ECHO_T}$cf_result" >&6
20071 if test "$cf_result" = yes ; then
20073 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20075 cat >>confdefs.h <<EOF
20076 #define $cf_result 1
20081 cat >>confdefs.h <<EOF
20082 #define wchar_t long
20089 if test "$NCURSES_OK_WINT_T" = 0 ; then
20091 echo "$as_me:20091: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20092 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20093 cat >"conftest.$ac_ext" <<_ACEOF
20094 #line 20094 "configure"
20095 #include "confdefs.h"
20097 #ifndef _XOPEN_SOURCE_EXTENDED
20098 #define _XOPEN_SOURCE_EXTENDED
20100 #include <${cf_cv_ncurses_header:-curses.h}>
20111 rm -f "conftest.$ac_objext"
20112 if { (eval echo "$as_me:20112: \"$ac_compile\"") >&5
20113 (eval $ac_compile) 2>&5
20115 echo "$as_me:20115: \$? = $ac_status" >&5
20116 (exit "$ac_status"); } &&
20117 { ac_try='test -s "conftest.$ac_objext"'
20118 { (eval echo "$as_me:20118: \"$ac_try\"") >&5
20119 (eval $ac_try) 2>&5
20121 echo "$as_me:20121: \$? = $ac_status" >&5
20122 (exit "$ac_status"); }; }; then
20125 echo "$as_me: failed program was:" >&5
20126 cat "conftest.$ac_ext" >&5
20129 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20130 echo "$as_me:20130: result: $cf_result" >&5
20131 echo "${ECHO_T}$cf_result" >&6
20132 if test "$cf_result" = yes ; then
20134 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20136 cat >>confdefs.h <<EOF
20137 #define $cf_result 1
20142 cat >>confdefs.h <<EOF
20143 #define wint_t long
20159 echo "$as_me:20159: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
20160 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20162 cat >"conftest.$ac_ext" <<_ACEOF
20163 #line 20163 "configure"
20164 #include "confdefs.h"
20166 #ifdef HAVE_XCURSES
20167 #include <xcurses.h>
20168 char * XCursesProgramName = "test";
20170 #include <${cf_cv_ncurses_header:-curses.h}>
20171 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20172 #include <ncursesw/term.h>
20173 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20174 #include <ncurses/term.h>
20175 #elif defined(HAVE_TERM_H)
20184 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20185 const void *foo = (const void *)($cf_data);
20187 const void *foo = &($cf_data);
20189 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20195 rm -f "conftest.$ac_objext"
20196 if { (eval echo "$as_me:20196: \"$ac_compile\"") >&5
20197 (eval $ac_compile) 2>&5
20199 echo "$as_me:20199: \$? = $ac_status" >&5
20200 (exit "$ac_status"); } &&
20201 { ac_try='test -s "conftest.$ac_objext"'
20202 { (eval echo "$as_me:20202: \"$ac_try\"") >&5
20203 (eval $ac_try) 2>&5
20205 echo "$as_me:20205: \$? = $ac_status" >&5
20206 (exit "$ac_status"); }; }; then
20210 echo "$as_me: failed program was:" >&5
20211 cat "conftest.$ac_ext" >&5
20214 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20215 echo "$as_me:20215: result: $cf_result" >&5
20216 echo "${ECHO_T}$cf_result" >&6
20218 if test "$cf_result" = yes ; then
20220 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20222 cat >>confdefs.h <<EOF
20223 #define $cf_result 1
20227 echo "$as_me:20227: checking for data $cf_data in library" >&5
20228 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
20229 # BSD linkers insist on making weak linkage, but resolve at runtime.
20230 if test "$cross_compiling" = yes; then
20233 cat >"conftest.$ac_ext" <<_ACEOF
20234 #line 20234 "configure"
20235 #include "confdefs.h"
20237 #ifdef HAVE_XCURSES
20238 #include <xcurses.h>
20239 char * XCursesProgramName = "test";
20241 #include <${cf_cv_ncurses_header:-curses.h}>
20242 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20243 #include <ncursesw/term.h>
20244 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20245 #include <ncurses/term.h>
20246 #elif defined(HAVE_TERM_H)
20251 extern char $cf_data;
20258 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20259 const void *foo = (const void *)($cf_data);
20261 const void *foo = &($cf_data);
20263 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20265 ${cf_cv_main_return:-return}(foo == 0);
20272 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20273 if { (eval echo "$as_me:20273: \"$ac_link\"") >&5
20274 (eval $ac_link) 2>&5
20276 echo "$as_me:20276: \$? = $ac_status" >&5
20277 (exit "$ac_status"); } &&
20278 { ac_try='test -s "conftest$ac_exeext"'
20279 { (eval echo "$as_me:20279: \"$ac_try\"") >&5
20280 (eval $ac_try) 2>&5
20282 echo "$as_me:20282: \$? = $ac_status" >&5
20283 (exit "$ac_status"); }; }; then
20286 echo "$as_me: failed program was:" >&5
20287 cat "conftest.$ac_ext" >&5
20290 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20293 cat >"conftest.$ac_ext" <<_ACEOF
20294 #line 20294 "configure"
20295 #include "confdefs.h"
20297 #ifdef HAVE_XCURSES
20298 #include <xcurses.h>
20299 char * XCursesProgramName = "test";
20301 #include <${cf_cv_ncurses_header:-curses.h}>
20302 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20303 #include <ncursesw/term.h>
20304 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20305 #include <ncurses/term.h>
20306 #elif defined(HAVE_TERM_H)
20311 extern char $cf_data;
20315 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20316 const void *foo = (const void *)($cf_data);
20318 const void *foo = &($cf_data);
20320 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20322 ${cf_cv_main_return:-return}(foo == 0);
20325 rm -f "conftest$ac_exeext"
20326 if { (eval echo "$as_me:20326: \"$ac_link\"") >&5
20327 (eval $ac_link) 2>&5
20329 echo "$as_me:20329: \$? = $ac_status" >&5
20330 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20331 { (eval echo "$as_me:20331: \"$ac_try\"") >&5
20332 (eval $ac_try) 2>&5
20334 echo "$as_me:20334: \$? = $ac_status" >&5
20335 (exit "$ac_status"); }; }; then
20339 echo "$as_me: program exited with status $ac_status" >&5
20340 echo "$as_me: failed program was:" >&5
20341 cat "conftest.$ac_ext" >&5
20344 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20346 echo "$as_me:20346: result: $cf_result" >&5
20347 echo "${ECHO_T}$cf_result" >&6
20348 if test "$cf_result" = yes ; then
20350 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20352 cat >>confdefs.h <<EOF
20353 #define $cf_result 1
20356 # do not exit loop here, since we prefer system's declarations
20361 if test -n "$with_screen" && test "x$with_screen" = "xpdcurses"
20363 echo "$as_me:20363: checking for X" >&5
20364 echo $ECHO_N "checking for X... $ECHO_C" >&6
20366 # Check whether --with-x or --without-x was given.
20367 if test "${with_x+set}" = set; then
20371 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
20372 if test "x$with_x" = xno; then
20373 # The user explicitly disabled X.
20376 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
20377 # Both variables are already set.
20380 if test "${ac_cv_have_x+set}" = set; then
20381 echo $ECHO_N "(cached) $ECHO_C" >&6
20383 # One or both of the vars are not set, and there is no cached value.
20384 ac_x_includes=no ac_x_libraries=no
20385 rm -fr conftest.dir
20386 if mkdir conftest.dir; then
20388 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
20389 cat >Imakefile <<'EOF'
20391 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
20393 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
20394 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
20395 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
20396 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
20397 for ac_extension in a so sl dylib dll; do
20398 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
20399 test -f "$ac_im_libdir/libX11.$ac_extension"; then
20400 ac_im_usrlibdir=$ac_im_libdir; break
20403 # Screen out bogus values from the imake configuration. They are
20404 # bogus both because they are the default anyway, and because
20405 # using them would break gcc on systems where it needs fixed includes.
20406 case $ac_im_incroot in
20408 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
20410 case $ac_im_usrlibdir in
20411 /usr/lib | /lib) ;;
20412 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
20416 rm -fr conftest.dir
20419 # Standard set of common directories for X headers.
20420 # Check X11 before X11Rn because it is often a symlink to the current release.
20437 /usr/local/X11/include
20438 /usr/local/X11R7/include
20439 /usr/local/X11R6/include
20440 /usr/local/X11R5/include
20441 /usr/local/X11R4/include
20443 /usr/local/include/X11
20444 /usr/local/include/X11R7
20445 /usr/local/include/X11R6
20446 /usr/local/include/X11R5
20447 /usr/local/include/X11R4
20451 /usr/XFree86/include/X11
20455 /usr/unsupported/include
20456 /usr/athena/include
20457 /usr/local/x11r5/include
20458 /usr/lpp/Xamples/include
20460 /usr/openwin/include
20461 /usr/openwin/share/include'
20463 if test "$ac_x_includes" = no; then
20464 # Guess where to find include files, by looking for Intrinsic.h.
20465 # First, try using that file with no special directory specified.
20466 cat >"conftest.$ac_ext" <<_ACEOF
20467 #line 20467 "configure"
20468 #include "confdefs.h"
20469 #include <X11/Intrinsic.h>
20471 if { (eval echo "$as_me:20471: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20472 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20474 $EGREP -v '^ *\+' conftest.er1 >conftest.err
20476 cat conftest.err >&5
20477 echo "$as_me:20477: \$? = $ac_status" >&5
20478 (exit "$ac_status"); } >/dev/null; then
20479 if test -s conftest.err; then
20480 ac_cpp_err=$ac_c_preproc_warn_flag
20487 if test -z "$ac_cpp_err"; then
20488 # We can compile using X headers with no special include directory.
20491 echo "$as_me: failed program was:" >&5
20492 cat "conftest.$ac_ext" >&5
20493 for ac_dir in $ac_x_header_dirs; do
20494 if test -r "$ac_dir/X11/Intrinsic.h"; then
20495 ac_x_includes=$ac_dir
20500 rm -f conftest.err "conftest.$ac_ext"
20501 fi # $ac_x_includes = no
20503 if test "$ac_x_libraries" = no; then
20504 # Check for the libraries.
20505 # See if we find them without any special options.
20506 # Don't add to $LIBS permanently.
20509 cat >"conftest.$ac_ext" <<_ACEOF
20510 #line 20510 "configure"
20511 #include "confdefs.h"
20512 #include <X11/Intrinsic.h>
20521 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20522 if { (eval echo "$as_me:20522: \"$ac_link\"") >&5
20523 (eval $ac_link) 2>&5
20525 echo "$as_me:20525: \$? = $ac_status" >&5
20526 (exit "$ac_status"); } &&
20527 { ac_try='test -s "conftest$ac_exeext"'
20528 { (eval echo "$as_me:20528: \"$ac_try\"") >&5
20529 (eval $ac_try) 2>&5
20531 echo "$as_me:20531: \$? = $ac_status" >&5
20532 (exit "$ac_status"); }; }; then
20534 # We can link X programs with no special library path.
20537 echo "$as_me: failed program was:" >&5
20538 cat "conftest.$ac_ext" >&5
20540 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
20542 # Don't even attempt the hair of trying to link an X program!
20543 for ac_extension in a so sl dylib dll; do
20544 if test -r "$ac_dir/libXt.$ac_extension"; then
20545 ac_x_libraries=$ac_dir
20551 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20552 fi # $ac_x_libraries = no
20554 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
20555 # Didn't find X anywhere. Cache the known absence of X.
20556 ac_cv_have_x="have_x=no"
20558 # Record where we found X for the cache.
20559 ac_cv_have_x="have_x=yes \
20560 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
20565 eval "$ac_cv_have_x"
20568 if test "$have_x" != yes; then
20569 echo "$as_me:20569: result: $have_x" >&5
20570 echo "${ECHO_T}$have_x" >&6
20573 # If each of the values was on the command line, it overrides each guess.
20574 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
20575 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
20576 # Update the cache value to reflect the command line values.
20577 ac_cv_have_x="have_x=yes \
20578 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
20579 echo "$as_me:20579: result: libraries $x_libraries, headers $x_includes" >&5
20580 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
20583 if test "$no_x" = yes; then
20584 # Not all programs may use this symbol, but it does not hurt to define it.
20586 cat >>confdefs.h <<\EOF
20587 #define X_DISPLAY_MISSING 1
20595 if test -n "$x_includes"; then
20596 X_CFLAGS="$X_CFLAGS -I$x_includes"
20599 # It would also be nice to do this for all -L options, not just this one.
20600 if test -n "$x_libraries"; then
20601 X_LIBS="$X_LIBS -L$x_libraries"
20602 # For Solaris; some versions of Sun CC require a space after -R and
20603 # others require no space. Words are not sufficient . . . .
20604 case `(uname -sr) 2>/dev/null` in
20606 echo "$as_me:20606: checking whether -R must be followed by a space" >&5
20607 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
20608 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
20609 cat >"conftest.$ac_ext" <<_ACEOF
20610 #line 20610 "configure"
20611 #include "confdefs.h"
20621 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20622 if { (eval echo "$as_me:20622: \"$ac_link\"") >&5
20623 (eval $ac_link) 2>&5
20625 echo "$as_me:20625: \$? = $ac_status" >&5
20626 (exit "$ac_status"); } &&
20627 { ac_try='test -s "conftest$ac_exeext"'
20628 { (eval echo "$as_me:20628: \"$ac_try\"") >&5
20629 (eval $ac_try) 2>&5
20631 echo "$as_me:20631: \$? = $ac_status" >&5
20632 (exit "$ac_status"); }; }; then
20635 echo "$as_me: failed program was:" >&5
20636 cat "conftest.$ac_ext" >&5
20639 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20640 if test $ac_R_nospace = yes; then
20641 echo "$as_me:20641: result: no" >&5
20642 echo "${ECHO_T}no" >&6
20643 X_LIBS="$X_LIBS -R$x_libraries"
20645 LIBS="$ac_xsave_LIBS -R $x_libraries"
20646 cat >"conftest.$ac_ext" <<_ACEOF
20647 #line 20647 "configure"
20648 #include "confdefs.h"
20658 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20659 if { (eval echo "$as_me:20659: \"$ac_link\"") >&5
20660 (eval $ac_link) 2>&5
20662 echo "$as_me:20662: \$? = $ac_status" >&5
20663 (exit "$ac_status"); } &&
20664 { ac_try='test -s "conftest$ac_exeext"'
20665 { (eval echo "$as_me:20665: \"$ac_try\"") >&5
20666 (eval $ac_try) 2>&5
20668 echo "$as_me:20668: \$? = $ac_status" >&5
20669 (exit "$ac_status"); }; }; then
20672 echo "$as_me: failed program was:" >&5
20673 cat "conftest.$ac_ext" >&5
20676 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20677 if test $ac_R_space = yes; then
20678 echo "$as_me:20678: result: yes" >&5
20679 echo "${ECHO_T}yes" >&6
20680 X_LIBS="$X_LIBS -R $x_libraries"
20682 echo "$as_me:20682: result: neither works" >&5
20683 echo "${ECHO_T}neither works" >&6
20686 LIBS=$ac_xsave_LIBS
20690 # Check for system-dependent libraries X programs must link with.
20691 # Do this before checking for the system-independent R6 libraries
20692 # (-lICE), since we may need -lsocket or whatever for X linking.
20694 if test "$ISC" = yes; then
20695 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
20697 # Martyn Johnson says this is needed for Ultrix, if the X
20698 # libraries were built with DECnet support. And Karl Berry says
20699 # the Alpha needs dnet_stub (dnet does not exist).
20700 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
20701 cat >"conftest.$ac_ext" <<_ACEOF
20702 #line 20702 "configure"
20703 #include "confdefs.h"
20705 /* Override any gcc2 internal prototype to avoid an error. */
20709 /* We use char because int might match the return type of a gcc2
20710 builtin and then its argument prototype would still apply. */
20711 char XOpenDisplay ();
20720 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20721 if { (eval echo "$as_me:20721: \"$ac_link\"") >&5
20722 (eval $ac_link) 2>&5
20724 echo "$as_me:20724: \$? = $ac_status" >&5
20725 (exit "$ac_status"); } &&
20726 { ac_try='test -s "conftest$ac_exeext"'
20727 { (eval echo "$as_me:20727: \"$ac_try\"") >&5
20728 (eval $ac_try) 2>&5
20730 echo "$as_me:20730: \$? = $ac_status" >&5
20731 (exit "$ac_status"); }; }; then
20734 echo "$as_me: failed program was:" >&5
20735 cat "conftest.$ac_ext" >&5
20736 echo "$as_me:20736: checking for dnet_ntoa in -ldnet" >&5
20737 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
20738 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
20739 echo $ECHO_N "(cached) $ECHO_C" >&6
20741 ac_check_lib_save_LIBS=$LIBS
20742 LIBS="-ldnet $LIBS"
20743 cat >"conftest.$ac_ext" <<_ACEOF
20744 #line 20744 "configure"
20745 #include "confdefs.h"
20747 /* Override any gcc2 internal prototype to avoid an error. */
20751 /* We use char because int might match the return type of a gcc2
20752 builtin and then its argument prototype would still apply. */
20762 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20763 if { (eval echo "$as_me:20763: \"$ac_link\"") >&5
20764 (eval $ac_link) 2>&5
20766 echo "$as_me:20766: \$? = $ac_status" >&5
20767 (exit "$ac_status"); } &&
20768 { ac_try='test -s "conftest$ac_exeext"'
20769 { (eval echo "$as_me:20769: \"$ac_try\"") >&5
20770 (eval $ac_try) 2>&5
20772 echo "$as_me:20772: \$? = $ac_status" >&5
20773 (exit "$ac_status"); }; }; then
20774 ac_cv_lib_dnet_dnet_ntoa=yes
20776 echo "$as_me: failed program was:" >&5
20777 cat "conftest.$ac_ext" >&5
20778 ac_cv_lib_dnet_dnet_ntoa=no
20780 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20781 LIBS=$ac_check_lib_save_LIBS
20783 echo "$as_me:20783: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
20784 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
20785 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
20786 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
20789 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
20790 echo "$as_me:20790: checking for dnet_ntoa in -ldnet_stub" >&5
20791 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
20792 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
20793 echo $ECHO_N "(cached) $ECHO_C" >&6
20795 ac_check_lib_save_LIBS=$LIBS
20796 LIBS="-ldnet_stub $LIBS"
20797 cat >"conftest.$ac_ext" <<_ACEOF
20798 #line 20798 "configure"
20799 #include "confdefs.h"
20801 /* Override any gcc2 internal prototype to avoid an error. */
20805 /* We use char because int might match the return type of a gcc2
20806 builtin and then its argument prototype would still apply. */
20816 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20817 if { (eval echo "$as_me:20817: \"$ac_link\"") >&5
20818 (eval $ac_link) 2>&5
20820 echo "$as_me:20820: \$? = $ac_status" >&5
20821 (exit "$ac_status"); } &&
20822 { ac_try='test -s "conftest$ac_exeext"'
20823 { (eval echo "$as_me:20823: \"$ac_try\"") >&5
20824 (eval $ac_try) 2>&5
20826 echo "$as_me:20826: \$? = $ac_status" >&5
20827 (exit "$ac_status"); }; }; then
20828 ac_cv_lib_dnet_stub_dnet_ntoa=yes
20830 echo "$as_me: failed program was:" >&5
20831 cat "conftest.$ac_ext" >&5
20832 ac_cv_lib_dnet_stub_dnet_ntoa=no
20834 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20835 LIBS=$ac_check_lib_save_LIBS
20837 echo "$as_me:20837: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
20838 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
20839 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
20840 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
20845 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20846 LIBS="$ac_xsave_LIBS"
20848 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
20849 # to get the SysV transport functions.
20850 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
20852 # The nsl library prevents programs from opening the X display
20853 # on Irix 5.2, according to T.E. Dickey.
20854 # The functions gethostbyname, getservbyname, and inet_addr are
20855 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
20856 echo "$as_me:20856: checking for gethostbyname" >&5
20857 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
20858 if test "${ac_cv_func_gethostbyname+set}" = set; then
20859 echo $ECHO_N "(cached) $ECHO_C" >&6
20861 cat >"conftest.$ac_ext" <<_ACEOF
20862 #line 20862 "configure"
20863 #include "confdefs.h"
20864 #define gethostbyname autoconf_temporary
20865 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
20866 #undef gethostbyname
20872 /* We use char because int might match the return type of a gcc2
20873 builtin and then its argument prototype would still apply. */
20874 char gethostbyname (void);
20880 /* The GNU C library defines stubs for functions which it implements
20881 to always fail with ENOSYS. Some functions are actually named
20882 something starting with __ and the normal name is an alias. */
20883 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
20884 #error found stub for gethostbyname
20887 return gethostbyname ();
20892 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20893 if { (eval echo "$as_me:20893: \"$ac_link\"") >&5
20894 (eval $ac_link) 2>&5
20896 echo "$as_me:20896: \$? = $ac_status" >&5
20897 (exit "$ac_status"); } &&
20898 { ac_try='test -s "conftest$ac_exeext"'
20899 { (eval echo "$as_me:20899: \"$ac_try\"") >&5
20900 (eval $ac_try) 2>&5
20902 echo "$as_me:20902: \$? = $ac_status" >&5
20903 (exit "$ac_status"); }; }; then
20904 ac_cv_func_gethostbyname=yes
20906 echo "$as_me: failed program was:" >&5
20907 cat "conftest.$ac_ext" >&5
20908 ac_cv_func_gethostbyname=no
20910 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20912 echo "$as_me:20912: result: $ac_cv_func_gethostbyname" >&5
20913 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
20915 if test $ac_cv_func_gethostbyname = no; then
20916 echo "$as_me:20916: checking for gethostbyname in -lnsl" >&5
20917 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
20918 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
20919 echo $ECHO_N "(cached) $ECHO_C" >&6
20921 ac_check_lib_save_LIBS=$LIBS
20923 cat >"conftest.$ac_ext" <<_ACEOF
20924 #line 20924 "configure"
20925 #include "confdefs.h"
20927 /* Override any gcc2 internal prototype to avoid an error. */
20931 /* We use char because int might match the return type of a gcc2
20932 builtin and then its argument prototype would still apply. */
20933 char gethostbyname ();
20942 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20943 if { (eval echo "$as_me:20943: \"$ac_link\"") >&5
20944 (eval $ac_link) 2>&5
20946 echo "$as_me:20946: \$? = $ac_status" >&5
20947 (exit "$ac_status"); } &&
20948 { ac_try='test -s "conftest$ac_exeext"'
20949 { (eval echo "$as_me:20949: \"$ac_try\"") >&5
20950 (eval $ac_try) 2>&5
20952 echo "$as_me:20952: \$? = $ac_status" >&5
20953 (exit "$ac_status"); }; }; then
20954 ac_cv_lib_nsl_gethostbyname=yes
20956 echo "$as_me: failed program was:" >&5
20957 cat "conftest.$ac_ext" >&5
20958 ac_cv_lib_nsl_gethostbyname=no
20960 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20961 LIBS=$ac_check_lib_save_LIBS
20963 echo "$as_me:20963: result: $ac_cv_lib_nsl_gethostbyname" >&5
20964 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
20965 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
20966 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
20969 if test $ac_cv_lib_nsl_gethostbyname = no; then
20970 echo "$as_me:20970: checking for gethostbyname in -lbsd" >&5
20971 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
20972 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
20973 echo $ECHO_N "(cached) $ECHO_C" >&6
20975 ac_check_lib_save_LIBS=$LIBS
20977 cat >"conftest.$ac_ext" <<_ACEOF
20978 #line 20978 "configure"
20979 #include "confdefs.h"
20981 /* Override any gcc2 internal prototype to avoid an error. */
20985 /* We use char because int might match the return type of a gcc2
20986 builtin and then its argument prototype would still apply. */
20987 char gethostbyname ();
20996 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20997 if { (eval echo "$as_me:20997: \"$ac_link\"") >&5
20998 (eval $ac_link) 2>&5
21000 echo "$as_me:21000: \$? = $ac_status" >&5
21001 (exit "$ac_status"); } &&
21002 { ac_try='test -s "conftest$ac_exeext"'
21003 { (eval echo "$as_me:21003: \"$ac_try\"") >&5
21004 (eval $ac_try) 2>&5
21006 echo "$as_me:21006: \$? = $ac_status" >&5
21007 (exit "$ac_status"); }; }; then
21008 ac_cv_lib_bsd_gethostbyname=yes
21010 echo "$as_me: failed program was:" >&5
21011 cat "conftest.$ac_ext" >&5
21012 ac_cv_lib_bsd_gethostbyname=no
21014 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21015 LIBS=$ac_check_lib_save_LIBS
21017 echo "$as_me:21017: result: $ac_cv_lib_bsd_gethostbyname" >&5
21018 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
21019 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
21020 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
21026 # lieder@skyler.mavd.honeywell.com says without -lsocket,
21027 # socket/setsockopt and other routines are undefined under SCO ODT
21028 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
21029 # on later versions), says Simon Leinen: it contains gethostby*
21030 # variants that don't use the nameserver (or something). -lsocket
21031 # must be given before -lnsl if both are needed. We assume that
21032 # if connect needs -lnsl, so does gethostbyname.
21033 echo "$as_me:21033: checking for connect" >&5
21034 echo $ECHO_N "checking for connect... $ECHO_C" >&6
21035 if test "${ac_cv_func_connect+set}" = set; then
21036 echo $ECHO_N "(cached) $ECHO_C" >&6
21038 cat >"conftest.$ac_ext" <<_ACEOF
21039 #line 21039 "configure"
21040 #include "confdefs.h"
21041 #define connect autoconf_temporary
21042 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21049 /* We use char because int might match the return type of a gcc2
21050 builtin and then its argument prototype would still apply. */
21051 char connect (void);
21057 /* The GNU C library defines stubs for functions which it implements
21058 to always fail with ENOSYS. Some functions are actually named
21059 something starting with __ and the normal name is an alias. */
21060 #if defined (__stub_connect) || defined (__stub___connect)
21061 #error found stub for connect
21069 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21070 if { (eval echo "$as_me:21070: \"$ac_link\"") >&5
21071 (eval $ac_link) 2>&5
21073 echo "$as_me:21073: \$? = $ac_status" >&5
21074 (exit "$ac_status"); } &&
21075 { ac_try='test -s "conftest$ac_exeext"'
21076 { (eval echo "$as_me:21076: \"$ac_try\"") >&5
21077 (eval $ac_try) 2>&5
21079 echo "$as_me:21079: \$? = $ac_status" >&5
21080 (exit "$ac_status"); }; }; then
21081 ac_cv_func_connect=yes
21083 echo "$as_me: failed program was:" >&5
21084 cat "conftest.$ac_ext" >&5
21085 ac_cv_func_connect=no
21087 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21089 echo "$as_me:21089: result: $ac_cv_func_connect" >&5
21090 echo "${ECHO_T}$ac_cv_func_connect" >&6
21092 if test $ac_cv_func_connect = no; then
21093 echo "$as_me:21093: checking for connect in -lsocket" >&5
21094 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
21095 if test "${ac_cv_lib_socket_connect+set}" = set; then
21096 echo $ECHO_N "(cached) $ECHO_C" >&6
21098 ac_check_lib_save_LIBS=$LIBS
21099 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
21100 cat >"conftest.$ac_ext" <<_ACEOF
21101 #line 21101 "configure"
21102 #include "confdefs.h"
21104 /* Override any gcc2 internal prototype to avoid an error. */
21108 /* We use char because int might match the return type of a gcc2
21109 builtin and then its argument prototype would still apply. */
21119 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21120 if { (eval echo "$as_me:21120: \"$ac_link\"") >&5
21121 (eval $ac_link) 2>&5
21123 echo "$as_me:21123: \$? = $ac_status" >&5
21124 (exit "$ac_status"); } &&
21125 { ac_try='test -s "conftest$ac_exeext"'
21126 { (eval echo "$as_me:21126: \"$ac_try\"") >&5
21127 (eval $ac_try) 2>&5
21129 echo "$as_me:21129: \$? = $ac_status" >&5
21130 (exit "$ac_status"); }; }; then
21131 ac_cv_lib_socket_connect=yes
21133 echo "$as_me: failed program was:" >&5
21134 cat "conftest.$ac_ext" >&5
21135 ac_cv_lib_socket_connect=no
21137 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21138 LIBS=$ac_check_lib_save_LIBS
21140 echo "$as_me:21140: result: $ac_cv_lib_socket_connect" >&5
21141 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
21142 if test "$ac_cv_lib_socket_connect" = yes; then
21143 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
21148 # Guillermo Gomez says -lposix is necessary on A/UX.
21149 echo "$as_me:21149: checking for remove" >&5
21150 echo $ECHO_N "checking for remove... $ECHO_C" >&6
21151 if test "${ac_cv_func_remove+set}" = set; then
21152 echo $ECHO_N "(cached) $ECHO_C" >&6
21154 cat >"conftest.$ac_ext" <<_ACEOF
21155 #line 21155 "configure"
21156 #include "confdefs.h"
21157 #define remove autoconf_temporary
21158 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21165 /* We use char because int might match the return type of a gcc2
21166 builtin and then its argument prototype would still apply. */
21167 char remove (void);
21173 /* The GNU C library defines stubs for functions which it implements
21174 to always fail with ENOSYS. Some functions are actually named
21175 something starting with __ and the normal name is an alias. */
21176 #if defined (__stub_remove) || defined (__stub___remove)
21177 #error found stub for remove
21185 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21186 if { (eval echo "$as_me:21186: \"$ac_link\"") >&5
21187 (eval $ac_link) 2>&5
21189 echo "$as_me:21189: \$? = $ac_status" >&5
21190 (exit "$ac_status"); } &&
21191 { ac_try='test -s "conftest$ac_exeext"'
21192 { (eval echo "$as_me:21192: \"$ac_try\"") >&5
21193 (eval $ac_try) 2>&5
21195 echo "$as_me:21195: \$? = $ac_status" >&5
21196 (exit "$ac_status"); }; }; then
21197 ac_cv_func_remove=yes
21199 echo "$as_me: failed program was:" >&5
21200 cat "conftest.$ac_ext" >&5
21201 ac_cv_func_remove=no
21203 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21205 echo "$as_me:21205: result: $ac_cv_func_remove" >&5
21206 echo "${ECHO_T}$ac_cv_func_remove" >&6
21208 if test $ac_cv_func_remove = no; then
21209 echo "$as_me:21209: checking for remove in -lposix" >&5
21210 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
21211 if test "${ac_cv_lib_posix_remove+set}" = set; then
21212 echo $ECHO_N "(cached) $ECHO_C" >&6
21214 ac_check_lib_save_LIBS=$LIBS
21215 LIBS="-lposix $LIBS"
21216 cat >"conftest.$ac_ext" <<_ACEOF
21217 #line 21217 "configure"
21218 #include "confdefs.h"
21220 /* Override any gcc2 internal prototype to avoid an error. */
21224 /* We use char because int might match the return type of a gcc2
21225 builtin and then its argument prototype would still apply. */
21235 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21236 if { (eval echo "$as_me:21236: \"$ac_link\"") >&5
21237 (eval $ac_link) 2>&5
21239 echo "$as_me:21239: \$? = $ac_status" >&5
21240 (exit "$ac_status"); } &&
21241 { ac_try='test -s "conftest$ac_exeext"'
21242 { (eval echo "$as_me:21242: \"$ac_try\"") >&5
21243 (eval $ac_try) 2>&5
21245 echo "$as_me:21245: \$? = $ac_status" >&5
21246 (exit "$ac_status"); }; }; then
21247 ac_cv_lib_posix_remove=yes
21249 echo "$as_me: failed program was:" >&5
21250 cat "conftest.$ac_ext" >&5
21251 ac_cv_lib_posix_remove=no
21253 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21254 LIBS=$ac_check_lib_save_LIBS
21256 echo "$as_me:21256: result: $ac_cv_lib_posix_remove" >&5
21257 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
21258 if test "$ac_cv_lib_posix_remove" = yes; then
21259 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
21264 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
21265 echo "$as_me:21265: checking for shmat" >&5
21266 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
21267 if test "${ac_cv_func_shmat+set}" = set; then
21268 echo $ECHO_N "(cached) $ECHO_C" >&6
21270 cat >"conftest.$ac_ext" <<_ACEOF
21271 #line 21271 "configure"
21272 #include "confdefs.h"
21273 #define shmat autoconf_temporary
21274 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21281 /* We use char because int might match the return type of a gcc2
21282 builtin and then its argument prototype would still apply. */
21289 /* The GNU C library defines stubs for functions which it implements
21290 to always fail with ENOSYS. Some functions are actually named
21291 something starting with __ and the normal name is an alias. */
21292 #if defined (__stub_shmat) || defined (__stub___shmat)
21293 #error found stub for shmat
21301 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21302 if { (eval echo "$as_me:21302: \"$ac_link\"") >&5
21303 (eval $ac_link) 2>&5
21305 echo "$as_me:21305: \$? = $ac_status" >&5
21306 (exit "$ac_status"); } &&
21307 { ac_try='test -s "conftest$ac_exeext"'
21308 { (eval echo "$as_me:21308: \"$ac_try\"") >&5
21309 (eval $ac_try) 2>&5
21311 echo "$as_me:21311: \$? = $ac_status" >&5
21312 (exit "$ac_status"); }; }; then
21313 ac_cv_func_shmat=yes
21315 echo "$as_me: failed program was:" >&5
21316 cat "conftest.$ac_ext" >&5
21317 ac_cv_func_shmat=no
21319 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21321 echo "$as_me:21321: result: $ac_cv_func_shmat" >&5
21322 echo "${ECHO_T}$ac_cv_func_shmat" >&6
21324 if test $ac_cv_func_shmat = no; then
21325 echo "$as_me:21325: checking for shmat in -lipc" >&5
21326 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
21327 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
21328 echo $ECHO_N "(cached) $ECHO_C" >&6
21330 ac_check_lib_save_LIBS=$LIBS
21332 cat >"conftest.$ac_ext" <<_ACEOF
21333 #line 21333 "configure"
21334 #include "confdefs.h"
21336 /* Override any gcc2 internal prototype to avoid an error. */
21340 /* We use char because int might match the return type of a gcc2
21341 builtin and then its argument prototype would still apply. */
21351 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21352 if { (eval echo "$as_me:21352: \"$ac_link\"") >&5
21353 (eval $ac_link) 2>&5
21355 echo "$as_me:21355: \$? = $ac_status" >&5
21356 (exit "$ac_status"); } &&
21357 { ac_try='test -s "conftest$ac_exeext"'
21358 { (eval echo "$as_me:21358: \"$ac_try\"") >&5
21359 (eval $ac_try) 2>&5
21361 echo "$as_me:21361: \$? = $ac_status" >&5
21362 (exit "$ac_status"); }; }; then
21363 ac_cv_lib_ipc_shmat=yes
21365 echo "$as_me: failed program was:" >&5
21366 cat "conftest.$ac_ext" >&5
21367 ac_cv_lib_ipc_shmat=no
21369 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21370 LIBS=$ac_check_lib_save_LIBS
21372 echo "$as_me:21372: result: $ac_cv_lib_ipc_shmat" >&5
21373 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
21374 if test "$ac_cv_lib_ipc_shmat" = yes; then
21375 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
21381 # Check for libraries that X11R6 Xt/Xaw programs need.
21382 ac_save_LDFLAGS=$LDFLAGS
21383 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
21384 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
21385 # check for ICE first), but we must link in the order -lSM -lICE or
21386 # we get undefined symbols. So assume we have SM if we have ICE.
21387 # These have to be linked with before -lX11, unlike the other
21388 # libraries we check for below, so use a different variable.
21389 # John Interrante, Karl Berry
21390 echo "$as_me:21390: checking for IceConnectionNumber in -lICE" >&5
21391 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
21392 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
21393 echo $ECHO_N "(cached) $ECHO_C" >&6
21395 ac_check_lib_save_LIBS=$LIBS
21396 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
21397 cat >"conftest.$ac_ext" <<_ACEOF
21398 #line 21398 "configure"
21399 #include "confdefs.h"
21401 /* Override any gcc2 internal prototype to avoid an error. */
21405 /* We use char because int might match the return type of a gcc2
21406 builtin and then its argument prototype would still apply. */
21407 char IceConnectionNumber ();
21411 IceConnectionNumber ();
21416 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21417 if { (eval echo "$as_me:21417: \"$ac_link\"") >&5
21418 (eval $ac_link) 2>&5
21420 echo "$as_me:21420: \$? = $ac_status" >&5
21421 (exit "$ac_status"); } &&
21422 { ac_try='test -s "conftest$ac_exeext"'
21423 { (eval echo "$as_me:21423: \"$ac_try\"") >&5
21424 (eval $ac_try) 2>&5
21426 echo "$as_me:21426: \$? = $ac_status" >&5
21427 (exit "$ac_status"); }; }; then
21428 ac_cv_lib_ICE_IceConnectionNumber=yes
21430 echo "$as_me: failed program was:" >&5
21431 cat "conftest.$ac_ext" >&5
21432 ac_cv_lib_ICE_IceConnectionNumber=no
21434 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21435 LIBS=$ac_check_lib_save_LIBS
21437 echo "$as_me:21437: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
21438 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
21439 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
21440 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
21443 LDFLAGS=$ac_save_LDFLAGS
21449 if test "$GCC" = yes || test "$GXX" = yes
21452 if test "$GCC" = yes || test "$GXX" = yes
21456 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
21458 echo "${as_me:-configure}:21458: testing repairing CFLAGS: $CFLAGS ..." 1>&5
21461 for cf_temp_scan in $CFLAGS
21463 case "x$cf_temp_scan" in
21466 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
21467 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
21472 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
21473 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
21478 CFLAGS="$cf_temp_flags"
21479 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
21481 echo "${as_me:-configure}:21481: testing ... fixed $CFLAGS ..." 1>&5
21483 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
21485 echo "${as_me:-configure}:21485: testing ... extra $EXTRA_CFLAGS ..." 1>&5
21491 if test "$GCC" = yes || test "$GXX" = yes
21495 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
21497 echo "${as_me:-configure}:21497: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
21500 for cf_temp_scan in $CPPFLAGS
21502 case "x$cf_temp_scan" in
21505 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
21506 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
21511 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
21512 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
21517 CPPFLAGS="$cf_temp_flags"
21518 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
21520 echo "${as_me:-configure}:21520: testing ... fixed $CPPFLAGS ..." 1>&5
21522 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
21524 echo "${as_me:-configure}:21524: testing ... extra $EXTRA_CFLAGS ..." 1>&5
21530 if test "$GCC" = yes || test "$GXX" = yes
21534 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
21536 echo "${as_me:-configure}:21536: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
21539 for cf_temp_scan in $LDFLAGS
21541 case "x$cf_temp_scan" in
21544 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
21545 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
21550 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
21551 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
21556 LDFLAGS="$cf_temp_flags"
21557 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
21559 echo "${as_me:-configure}:21559: testing ... fixed $LDFLAGS ..." 1>&5
21561 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
21563 echo "${as_me:-configure}:21563: testing ... extra $EXTRA_CFLAGS ..." 1>&5
21569 echo "$as_me:21569: checking if you want to turn on gcc warnings" >&5
21570 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
21572 # Check whether --enable-warnings or --disable-warnings was given.
21573 if test "${enable_warnings+set}" = set; then
21574 enableval="$enable_warnings"
21575 test "$enableval" != yes && enableval=no
21576 if test "$enableval" != "no" ; then
21577 enable_warnings=yes
21586 echo "$as_me:21586: result: $enable_warnings" >&5
21587 echo "${ECHO_T}$enable_warnings" >&6
21588 if test "$enable_warnings" = "yes"
21591 if test "$GCC" = yes || test "$GXX" = yes
21593 cat > conftest.i <<EOF
21595 #define GCC_PRINTF 0
21598 #define GCC_SCANF 0
21600 #ifndef GCC_NORETURN
21601 #define GCC_NORETURN /* nothing */
21604 #define GCC_UNUSED /* nothing */
21607 if test "$GCC" = yes
21609 { echo "$as_me:21609: checking for $CC __attribute__ directives..." >&5
21610 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
21611 cat > "conftest.$ac_ext" <<EOF
21612 #line 21612 "${as_me:-configure}"
21613 #include "confdefs.h"
21614 #include "conftest.h"
21615 #include "conftest.i"
21617 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
21619 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
21622 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
21624 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
21626 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
21627 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
21628 extern GCC_NORETURN void foo(void);
21629 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
21631 cf_printf_attribute=no
21632 cf_scanf_attribute=no
21633 for cf_attribute in scanf printf unused noreturn
21636 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21638 cf_directive="__attribute__(($cf_attribute))"
21639 echo "checking for $CC $cf_directive" 1>&5
21641 case "$cf_attribute" in
21643 cf_printf_attribute=yes
21644 cat >conftest.h <<EOF
21645 #define GCC_$cf_ATTRIBUTE 1
21649 cf_scanf_attribute=yes
21650 cat >conftest.h <<EOF
21651 #define GCC_$cf_ATTRIBUTE 1
21655 cat >conftest.h <<EOF
21656 #define GCC_$cf_ATTRIBUTE $cf_directive
21661 if { (eval echo "$as_me:21661: \"$ac_compile\"") >&5
21662 (eval $ac_compile) 2>&5
21664 echo "$as_me:21664: \$? = $ac_status" >&5
21665 (exit "$ac_status"); }; then
21666 test -n "$verbose" && echo "$as_me:21666: result: ... $cf_attribute" >&5
21667 echo "${ECHO_T}... $cf_attribute" >&6
21668 cat conftest.h >>confdefs.h
21669 case "$cf_attribute" in
21672 cat >>confdefs.h <<EOF
21673 #define GCC_NORETURN $cf_directive
21678 cf_value='/* nothing */'
21679 if test "$cf_printf_attribute" != no ; then
21680 cf_value='__attribute__((format(printf,fmt,var)))'
21682 cat >>confdefs.h <<\EOF
21683 #define GCC_PRINTF 1
21688 cat >>confdefs.h <<EOF
21689 #define GCC_PRINTFLIKE(fmt,var) $cf_value
21694 cf_value='/* nothing */'
21695 if test "$cf_scanf_attribute" != no ; then
21696 cf_value='__attribute__((format(scanf,fmt,var)))'
21698 cat >>confdefs.h <<\EOF
21699 #define GCC_SCANF 1
21704 cat >>confdefs.h <<EOF
21705 #define GCC_SCANFLIKE(fmt,var) $cf_value
21711 cat >>confdefs.h <<EOF
21712 #define GCC_UNUSED $cf_directive
21720 ${FGREP-fgrep} define conftest.i >>confdefs.h
21725 if test "x$have_x" = xyes; then
21727 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
21728 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
21729 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
21730 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
21731 for cf_X_CFLAGS in $X_CFLAGS
21733 case "x$cf_X_CFLAGS" in
21735 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
21738 CFLAGS="$CFLAGS $cf_X_CFLAGS"
21743 cat >"conftest.$ac_ext" <<_ACEOF
21744 #line 21744 "configure"
21745 #include "confdefs.h"
21747 #include <stdlib.h>
21748 #include <X11/Intrinsic.h>
21753 String foo = malloc(1); (void)foo
21758 rm -f "conftest.$ac_objext"
21759 if { (eval echo "$as_me:21759: \"$ac_compile\"") >&5
21760 (eval $ac_compile) 2>&5
21762 echo "$as_me:21762: \$? = $ac_status" >&5
21763 (exit "$ac_status"); } &&
21764 { ac_try='test -s "conftest.$ac_objext"'
21765 { (eval echo "$as_me:21765: \"$ac_try\"") >&5
21766 (eval $ac_try) 2>&5
21768 echo "$as_me:21768: \$? = $ac_status" >&5
21769 (exit "$ac_status"); }; }; then
21771 echo "$as_me:21771: checking for X11/Xt const-feature" >&5
21772 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
21773 if test "${cf_cv_const_x_string+set}" = set; then
21774 echo $ECHO_N "(cached) $ECHO_C" >&6
21777 cat >"conftest.$ac_ext" <<_ACEOF
21778 #line 21778 "configure"
21779 #include "confdefs.h"
21781 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
21782 #undef XTSTRINGDEFINES /* X11R5 and later */
21783 #include <stdlib.h>
21784 #include <X11/Intrinsic.h>
21789 String foo = malloc(1); *foo = 0
21794 rm -f "conftest.$ac_objext"
21795 if { (eval echo "$as_me:21795: \"$ac_compile\"") >&5
21796 (eval $ac_compile) 2>&5
21798 echo "$as_me:21798: \$? = $ac_status" >&5
21799 (exit "$ac_status"); } &&
21800 { ac_try='test -s "conftest.$ac_objext"'
21801 { (eval echo "$as_me:21801: \"$ac_try\"") >&5
21802 (eval $ac_try) 2>&5
21804 echo "$as_me:21804: \$? = $ac_status" >&5
21805 (exit "$ac_status"); }; }; then
21807 cf_cv_const_x_string=no
21810 echo "$as_me: failed program was:" >&5
21811 cat "conftest.$ac_ext" >&5
21813 cf_cv_const_x_string=yes
21816 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21819 echo "$as_me:21819: result: $cf_cv_const_x_string" >&5
21820 echo "${ECHO_T}$cf_cv_const_x_string" >&6
21822 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
21823 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
21824 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
21826 case "$cf_cv_const_x_string" in
21829 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21830 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
21835 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21836 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
21842 echo "$as_me: failed program was:" >&5
21843 cat "conftest.$ac_ext" >&5
21845 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21847 cat > "conftest.$ac_ext" <<EOF
21848 #line 21848 "${as_me:-configure}"
21849 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
21851 if test "$INTEL_COMPILER" = yes
21853 # The "-wdXXX" options suppress warnings:
21854 # remark #1419: external declaration in primary source file
21855 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
21856 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
21857 # remark #193: zero used for undefined preprocessing identifier
21858 # remark #593: variable "curs_sb_left_arrow" was set but never used
21859 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
21860 # remark #869: parameter "tw" was never referenced
21861 # remark #981: operands are evaluated in unspecified order
21862 # warning #279: controlling expression is constant
21864 { echo "$as_me:21864: checking for $CC warning options..." >&5
21865 echo "$as_me: checking for $CC warning options..." >&6;}
21866 cf_save_CFLAGS="$CFLAGS"
21867 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
21879 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
21880 if { (eval echo "$as_me:21880: \"$ac_compile\"") >&5
21881 (eval $ac_compile) 2>&5
21883 echo "$as_me:21883: \$? = $ac_status" >&5
21884 (exit "$ac_status"); }; then
21885 test -n "$verbose" && echo "$as_me:21885: result: ... -$cf_opt" >&5
21886 echo "${ECHO_T}... -$cf_opt" >&6
21887 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
21890 CFLAGS="$cf_save_CFLAGS"
21891 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
21893 { echo "$as_me:21893: checking for $CC warning options..." >&5
21894 echo "$as_me: checking for $CC warning options..." >&6;}
21895 cf_save_CFLAGS="$CFLAGS"
21897 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
21898 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
21899 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
21900 for cf_opt in W Wall \
21901 Wbad-function-cast \
21904 Wdeclaration-after-statement \
21907 Wmissing-declarations \
21908 Wmissing-prototypes \
21912 Wstrict-prototypes \
21913 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
21915 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
21916 if { (eval echo "$as_me:21916: \"$ac_compile\"") >&5
21917 (eval $ac_compile) 2>&5
21919 echo "$as_me:21919: \$? = $ac_status" >&5
21920 (exit "$ac_status"); }; then
21921 test -n "$verbose" && echo "$as_me:21921: result: ... -$cf_opt" >&5
21922 echo "${ECHO_T}... -$cf_opt" >&6
21925 case "$GCC_VERSION" in
21927 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
21929 echo "${as_me:-configure}:21929: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
21935 case "$GCC_VERSION" in
21937 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
21939 echo "${as_me:-configure}:21939: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
21945 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
21948 CFLAGS="$cf_save_CFLAGS"
21956 echo "$as_me:21956: checking if you want to use dmalloc for testing" >&5
21957 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
21959 # Check whether --with-dmalloc or --without-dmalloc was given.
21960 if test "${with_dmalloc+set}" = set; then
21961 withval="$with_dmalloc"
21963 cat >>confdefs.h <<EOF
21964 #define USE_DMALLOC 1
21967 : "${with_cflags:=-g}"
21968 : "${enable_leaks:=no}"
21973 echo "$as_me:21973: result: ${with_dmalloc:-no}" >&5
21974 echo "${ECHO_T}${with_dmalloc:-no}" >&6
21976 case ".$with_cflags" in
21986 cf_new_extra_cppflags=
21988 for cf_add_cflags in -g
21990 case "$cf_fix_cppflags" in
21992 case "$cf_add_cflags" in
21993 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21994 case "$cf_add_cflags" in
21996 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21998 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21999 && test -z "${cf_tst_cflags}" \
22000 && cf_fix_cppflags=yes
22002 if test "$cf_fix_cppflags" = yes ; then
22004 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22005 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22008 elif test "${cf_tst_cflags}" = "\"'" ; then
22010 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22011 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22017 case "$CPPFLAGS" in
22021 case "$cf_add_cflags" in
22023 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22025 CPPFLAGS=`echo "$CPPFLAGS" | \
22026 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22027 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22032 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22033 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22040 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22041 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22048 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22049 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22051 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22053 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22054 && test -z "${cf_tst_cflags}" \
22055 && cf_fix_cppflags=no
22060 if test -n "$cf_new_cflags" ; then
22062 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22063 CFLAGS="${CFLAGS}$cf_new_cflags"
22067 if test -n "$cf_new_cppflags" ; then
22069 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22070 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22074 if test -n "$cf_new_extra_cppflags" ; then
22076 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22077 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22086 if test "$with_dmalloc" = yes ; then
22087 echo "$as_me:22087: checking for dmalloc.h" >&5
22088 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
22089 if test "${ac_cv_header_dmalloc_h+set}" = set; then
22090 echo $ECHO_N "(cached) $ECHO_C" >&6
22092 cat >"conftest.$ac_ext" <<_ACEOF
22093 #line 22093 "configure"
22094 #include "confdefs.h"
22095 #include <dmalloc.h>
22097 if { (eval echo "$as_me:22097: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22098 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22100 $EGREP -v '^ *\+' conftest.er1 >conftest.err
22102 cat conftest.err >&5
22103 echo "$as_me:22103: \$? = $ac_status" >&5
22104 (exit "$ac_status"); } >/dev/null; then
22105 if test -s conftest.err; then
22106 ac_cpp_err=$ac_c_preproc_warn_flag
22113 if test -z "$ac_cpp_err"; then
22114 ac_cv_header_dmalloc_h=yes
22116 echo "$as_me: failed program was:" >&5
22117 cat "conftest.$ac_ext" >&5
22118 ac_cv_header_dmalloc_h=no
22120 rm -f conftest.err "conftest.$ac_ext"
22122 echo "$as_me:22122: result: $ac_cv_header_dmalloc_h" >&5
22123 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
22124 if test "$ac_cv_header_dmalloc_h" = yes; then
22126 echo "$as_me:22126: checking for dmalloc_debug in -ldmalloc" >&5
22127 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
22128 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
22129 echo $ECHO_N "(cached) $ECHO_C" >&6
22131 ac_check_lib_save_LIBS=$LIBS
22132 LIBS="-ldmalloc $LIBS"
22133 cat >"conftest.$ac_ext" <<_ACEOF
22134 #line 22134 "configure"
22135 #include "confdefs.h"
22137 /* Override any gcc2 internal prototype to avoid an error. */
22141 /* We use char because int might match the return type of a gcc2
22142 builtin and then its argument prototype would still apply. */
22143 char dmalloc_debug ();
22152 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22153 if { (eval echo "$as_me:22153: \"$ac_link\"") >&5
22154 (eval $ac_link) 2>&5
22156 echo "$as_me:22156: \$? = $ac_status" >&5
22157 (exit "$ac_status"); } &&
22158 { ac_try='test -s "conftest$ac_exeext"'
22159 { (eval echo "$as_me:22159: \"$ac_try\"") >&5
22160 (eval $ac_try) 2>&5
22162 echo "$as_me:22162: \$? = $ac_status" >&5
22163 (exit "$ac_status"); }; }; then
22164 ac_cv_lib_dmalloc_dmalloc_debug=yes
22166 echo "$as_me: failed program was:" >&5
22167 cat "conftest.$ac_ext" >&5
22168 ac_cv_lib_dmalloc_dmalloc_debug=no
22170 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22171 LIBS=$ac_check_lib_save_LIBS
22173 echo "$as_me:22173: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
22174 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
22175 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
22176 cat >>confdefs.h <<EOF
22177 #define HAVE_LIBDMALLOC 1
22180 LIBS="-ldmalloc $LIBS"
22188 echo "$as_me:22188: checking if you want to use dbmalloc for testing" >&5
22189 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
22191 # Check whether --with-dbmalloc or --without-dbmalloc was given.
22192 if test "${with_dbmalloc+set}" = set; then
22193 withval="$with_dbmalloc"
22195 cat >>confdefs.h <<EOF
22196 #define USE_DBMALLOC 1
22199 : "${with_cflags:=-g}"
22200 : "${enable_leaks:=no}"
22205 echo "$as_me:22205: result: ${with_dbmalloc:-no}" >&5
22206 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
22208 case ".$with_cflags" in
22218 cf_new_extra_cppflags=
22220 for cf_add_cflags in -g
22222 case "$cf_fix_cppflags" in
22224 case "$cf_add_cflags" in
22225 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22226 case "$cf_add_cflags" in
22228 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22230 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22231 && test -z "${cf_tst_cflags}" \
22232 && cf_fix_cppflags=yes
22234 if test "$cf_fix_cppflags" = yes ; then
22236 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22237 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22240 elif test "${cf_tst_cflags}" = "\"'" ; then
22242 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22243 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22249 case "$CPPFLAGS" in
22253 case "$cf_add_cflags" in
22255 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22257 CPPFLAGS=`echo "$CPPFLAGS" | \
22258 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22259 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22264 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22265 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22272 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22273 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22280 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22281 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22283 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22285 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22286 && test -z "${cf_tst_cflags}" \
22287 && cf_fix_cppflags=no
22292 if test -n "$cf_new_cflags" ; then
22294 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22295 CFLAGS="${CFLAGS}$cf_new_cflags"
22299 if test -n "$cf_new_cppflags" ; then
22301 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22302 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22306 if test -n "$cf_new_extra_cppflags" ; then
22308 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22309 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22318 if test "$with_dbmalloc" = yes ; then
22319 echo "$as_me:22319: checking for dbmalloc.h" >&5
22320 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
22321 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
22322 echo $ECHO_N "(cached) $ECHO_C" >&6
22324 cat >"conftest.$ac_ext" <<_ACEOF
22325 #line 22325 "configure"
22326 #include "confdefs.h"
22327 #include <dbmalloc.h>
22329 if { (eval echo "$as_me:22329: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22330 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22332 $EGREP -v '^ *\+' conftest.er1 >conftest.err
22334 cat conftest.err >&5
22335 echo "$as_me:22335: \$? = $ac_status" >&5
22336 (exit "$ac_status"); } >/dev/null; then
22337 if test -s conftest.err; then
22338 ac_cpp_err=$ac_c_preproc_warn_flag
22345 if test -z "$ac_cpp_err"; then
22346 ac_cv_header_dbmalloc_h=yes
22348 echo "$as_me: failed program was:" >&5
22349 cat "conftest.$ac_ext" >&5
22350 ac_cv_header_dbmalloc_h=no
22352 rm -f conftest.err "conftest.$ac_ext"
22354 echo "$as_me:22354: result: $ac_cv_header_dbmalloc_h" >&5
22355 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
22356 if test "$ac_cv_header_dbmalloc_h" = yes; then
22358 echo "$as_me:22358: checking for debug_malloc in -ldbmalloc" >&5
22359 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
22360 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
22361 echo $ECHO_N "(cached) $ECHO_C" >&6
22363 ac_check_lib_save_LIBS=$LIBS
22364 LIBS="-ldbmalloc $LIBS"
22365 cat >"conftest.$ac_ext" <<_ACEOF
22366 #line 22366 "configure"
22367 #include "confdefs.h"
22369 /* Override any gcc2 internal prototype to avoid an error. */
22373 /* We use char because int might match the return type of a gcc2
22374 builtin and then its argument prototype would still apply. */
22375 char debug_malloc ();
22384 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22385 if { (eval echo "$as_me:22385: \"$ac_link\"") >&5
22386 (eval $ac_link) 2>&5
22388 echo "$as_me:22388: \$? = $ac_status" >&5
22389 (exit "$ac_status"); } &&
22390 { ac_try='test -s "conftest$ac_exeext"'
22391 { (eval echo "$as_me:22391: \"$ac_try\"") >&5
22392 (eval $ac_try) 2>&5
22394 echo "$as_me:22394: \$? = $ac_status" >&5
22395 (exit "$ac_status"); }; }; then
22396 ac_cv_lib_dbmalloc_debug_malloc=yes
22398 echo "$as_me: failed program was:" >&5
22399 cat "conftest.$ac_ext" >&5
22400 ac_cv_lib_dbmalloc_debug_malloc=no
22402 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22403 LIBS=$ac_check_lib_save_LIBS
22405 echo "$as_me:22405: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
22406 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
22407 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
22408 cat >>confdefs.h <<EOF
22409 #define HAVE_LIBDBMALLOC 1
22412 LIBS="-ldbmalloc $LIBS"
22420 echo "$as_me:22420: checking if you want to use valgrind for testing" >&5
22421 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
22423 # Check whether --with-valgrind or --without-valgrind was given.
22424 if test "${with_valgrind+set}" = set; then
22425 withval="$with_valgrind"
22427 cat >>confdefs.h <<EOF
22428 #define USE_VALGRIND 1
22431 : "${with_cflags:=-g}"
22432 : "${enable_leaks:=no}"
22437 echo "$as_me:22437: result: ${with_valgrind:-no}" >&5
22438 echo "${ECHO_T}${with_valgrind:-no}" >&6
22440 case ".$with_cflags" in
22450 cf_new_extra_cppflags=
22452 for cf_add_cflags in -g
22454 case "$cf_fix_cppflags" in
22456 case "$cf_add_cflags" in
22457 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22458 case "$cf_add_cflags" in
22460 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22462 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22463 && test -z "${cf_tst_cflags}" \
22464 && cf_fix_cppflags=yes
22466 if test "$cf_fix_cppflags" = yes ; then
22468 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22469 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22472 elif test "${cf_tst_cflags}" = "\"'" ; then
22474 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22475 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22481 case "$CPPFLAGS" in
22485 case "$cf_add_cflags" in
22487 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22489 CPPFLAGS=`echo "$CPPFLAGS" | \
22490 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22491 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22496 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22497 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22504 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22505 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22512 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22513 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22515 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22517 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22518 && test -z "${cf_tst_cflags}" \
22519 && cf_fix_cppflags=no
22524 if test -n "$cf_new_cflags" ; then
22526 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22527 CFLAGS="${CFLAGS}$cf_new_cflags"
22531 if test -n "$cf_new_cppflags" ; then
22533 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22534 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22538 if test -n "$cf_new_extra_cppflags" ; then
22540 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22541 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22550 echo "$as_me:22550: checking if you want to perform memory-leak testing" >&5
22551 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
22553 # Check whether --enable-leaks or --disable-leaks was given.
22554 if test "${enable_leaks+set}" = set; then
22555 enableval="$enable_leaks"
22560 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
22561 echo "$as_me:22561: result: $with_no_leaks" >&5
22562 echo "${ECHO_T}$with_no_leaks" >&6
22564 if test "$enable_leaks" = no ; then
22566 cat >>confdefs.h <<\EOF
22570 cat >>confdefs.h <<\EOF
22571 #define YY_NO_LEAKS 1
22577 if test "x$cf_cv_enable_rpath" != xno
22579 echo "$as_me:22579: checking for an rpath option" >&5
22580 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
22581 case "$cf_cv_system_name" in
22583 if test "$GCC" = yes; then
22584 LD_RPATH_OPT="-Wl,-rpath,"
22586 LD_RPATH_OPT="-rpath "
22589 (linux*|gnu*|k*bsd*-gnu|freebsd*)
22590 LD_RPATH_OPT="-Wl,-rpath,"
22592 (openbsd[2-9].*|mirbsd*)
22593 LD_RPATH_OPT="-Wl,-rpath,"
22596 LD_RPATH_OPT="-rpath "
22599 LD_RPATH_OPT="-Wl,-rpath,"
22602 LD_RPATH_OPT="-rpath "
22610 echo "$as_me:22610: result: $LD_RPATH_OPT" >&5
22611 echo "${ECHO_T}$LD_RPATH_OPT" >&6
22613 case "x$LD_RPATH_OPT" in
22615 echo "$as_me:22615: checking if we need a space after rpath option" >&5
22616 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
22617 cf_save_LIBS="$LIBS"
22619 cf_add_libs="$LIBS"
22622 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22623 # filter duplicates
22624 for cf_add_1lib in $cf_add_0lib; do
22625 for cf_add_2lib in $cf_add_libs; do
22626 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22631 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22633 LIBS="$cf_add_libs"
22635 cat >"conftest.$ac_ext" <<_ACEOF
22636 #line 22636 "configure"
22637 #include "confdefs.h"
22647 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22648 if { (eval echo "$as_me:22648: \"$ac_link\"") >&5
22649 (eval $ac_link) 2>&5
22651 echo "$as_me:22651: \$? = $ac_status" >&5
22652 (exit "$ac_status"); } &&
22653 { ac_try='test -s "conftest$ac_exeext"'
22654 { (eval echo "$as_me:22654: \"$ac_try\"") >&5
22655 (eval $ac_try) 2>&5
22657 echo "$as_me:22657: \$? = $ac_status" >&5
22658 (exit "$ac_status"); }; }; then
22661 echo "$as_me: failed program was:" >&5
22662 cat "conftest.$ac_ext" >&5
22665 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22666 LIBS="$cf_save_LIBS"
22667 echo "$as_me:22667: result: $cf_rpath_space" >&5
22668 echo "${ECHO_T}$cf_rpath_space" >&6
22669 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
22674 echo "$as_me:22674: checking if rpath-hack should be disabled" >&5
22675 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
22677 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
22678 if test "${enable_rpath_hack+set}" = set; then
22679 enableval="$enable_rpath_hack"
22680 test "$enableval" != no && enableval=yes
22681 if test "$enableval" != "yes" ; then
22682 enable_rpath_hack=no
22684 enable_rpath_hack=yes
22688 enable_rpath_hack=yes
22691 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
22692 echo "$as_me:22692: result: $cf_disable_rpath_hack" >&5
22693 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
22695 if test "$enable_rpath_hack" = yes ; then
22697 echo "$as_me:22697: checking for updated LDFLAGS" >&5
22698 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
22699 if test -n "$LD_RPATH_OPT" ; then
22700 echo "$as_me:22700: result: maybe" >&5
22701 echo "${ECHO_T}maybe" >&6
22705 # Extract the first word of "$ac_prog", so it can be a program name with args.
22706 set dummy $ac_prog; ac_word=$2
22707 echo "$as_me:22707: checking for $ac_word" >&5
22708 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22709 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
22710 echo $ECHO_N "(cached) $ECHO_C" >&6
22712 if test -n "$cf_ldd_prog"; then
22713 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
22715 ac_save_IFS=$IFS; IFS=$ac_path_separator
22717 for ac_dir in $ac_dummy; do
22719 test -z "$ac_dir" && ac_dir=.
22720 $as_executable_p "$ac_dir/$ac_word" || continue
22721 ac_cv_prog_cf_ldd_prog="$ac_prog"
22722 echo "$as_me:22722: found $ac_dir/$ac_word" >&5
22728 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
22729 if test -n "$cf_ldd_prog"; then
22730 echo "$as_me:22730: result: $cf_ldd_prog" >&5
22731 echo "${ECHO_T}$cf_ldd_prog" >&6
22733 echo "$as_me:22733: result: no" >&5
22734 echo "${ECHO_T}no" >&6
22737 test -n "$cf_ldd_prog" && break
22739 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
22741 cf_rpath_list="/usr/lib /lib"
22742 if test "$cf_ldd_prog" != no
22746 cat >"conftest.$ac_ext" <<_ACEOF
22747 #line 22747 "configure"
22748 #include "confdefs.h"
22758 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22759 if { (eval echo "$as_me:22759: \"$ac_link\"") >&5
22760 (eval $ac_link) 2>&5
22762 echo "$as_me:22762: \$? = $ac_status" >&5
22763 (exit "$ac_status"); } &&
22764 { ac_try='test -s "conftest$ac_exeext"'
22765 { (eval echo "$as_me:22765: \"$ac_try\"") >&5
22766 (eval $ac_try) 2>&5
22768 echo "$as_me:22768: \$? = $ac_status" >&5
22769 (exit "$ac_status"); }; }; then
22770 cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
22771 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
22773 echo "$as_me: failed program was:" >&5
22774 cat "conftest.$ac_ext" >&5
22776 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22778 # If we passed the link-test, but get a "not found" on a given library,
22779 # this could be due to inept reconfiguration of gcc to make it only
22780 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
22781 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
22782 # /usr/local libraries.
22783 if test -n "$cf_rpath_oops"
22785 for cf_rpath_src in $cf_rpath_oops
22787 for cf_rpath_dir in \
22792 if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
22794 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
22796 echo "${as_me:-configure}:22796: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
22798 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
22806 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
22808 echo "${as_me:-configure}:22808: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
22810 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
22812 echo "${as_me:-configure}:22812: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
22815 for cf_rpath_src in $LDFLAGS
22817 case "$cf_rpath_src" in
22820 # check if this refers to a directory which we will ignore
22822 if test -n "$cf_rpath_list"
22824 for cf_rpath_item in $cf_rpath_list
22826 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
22834 if test "$cf_rpath_skip" = no
22836 # transform the option
22837 if test "$LD_RPATH_OPT" = "-R " ; then
22838 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
22840 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
22843 # if we have not already added this, add it now
22844 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
22845 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
22847 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
22849 echo "${as_me:-configure}:22849: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
22851 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
22856 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
22858 LDFLAGS=$cf_rpath_dst
22860 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
22862 echo "${as_me:-configure}:22862: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
22864 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
22866 echo "${as_me:-configure}:22866: testing ...checking LIBS $LIBS ..." 1>&5
22869 for cf_rpath_src in $LIBS
22871 case "$cf_rpath_src" in
22874 # check if this refers to a directory which we will ignore
22876 if test -n "$cf_rpath_list"
22878 for cf_rpath_item in $cf_rpath_list
22880 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
22888 if test "$cf_rpath_skip" = no
22890 # transform the option
22891 if test "$LD_RPATH_OPT" = "-R " ; then
22892 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
22894 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
22897 # if we have not already added this, add it now
22898 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
22899 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
22901 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
22903 echo "${as_me:-configure}:22903: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
22905 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
22910 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
22914 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
22916 echo "${as_me:-configure}:22916: testing ...checked LIBS $LIBS ..." 1>&5
22918 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
22920 echo "${as_me:-configure}:22920: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
22923 echo "$as_me:22923: result: no" >&5
22924 echo "${ECHO_T}no" >&6
22932 ac_config_files="$ac_config_files Makefile"
22933 ac_config_commands="$ac_config_commands default"
22934 cat >confcache <<\_ACEOF
22935 # This file is a shell script that caches the results of configure
22936 # tests run on this system so they can be shared between configure
22937 # scripts and configure runs, see configure's option --config-cache.
22938 # It is not useful on other systems. If it contains results you don't
22939 # want to keep, you may remove or edit it.
22941 # config.status only pays attention to the cache file if you give it
22942 # the --recheck option to rerun configure.
22944 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22945 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22946 # following values.
22950 # The following way of writing the cache mishandles newlines in values,
22951 # but we know of no workaround that is simple, portable, and efficient.
22952 # So, don't put newlines in cache variables' values.
22953 # Ultrix sh set writes to stderr and can't be redirected directly,
22954 # and sets the high bit in the cache file unless we assign to the vars.
22957 case `(ac_space=' '; set | grep ac_space) 2>&1` in
22959 # `set' does not quote correctly, so add quotes (double-quote
22960 # substitution turns \\\\ into \\, and sed turns \\ into \).
22963 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22966 # `set' quotes correctly as required by POSIX, so do not add quotes.
22968 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22975 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22977 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22979 if cmp -s $cache_file confcache; then :; else
22980 if test -w $cache_file; then
22981 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22982 cat confcache >$cache_file
22984 echo "not updating unwritable cache $cache_file"
22989 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22990 # Let make expand exec_prefix.
22991 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22993 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22994 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22995 # trailing colons and then remove the whole line if VPATH becomes empty
22996 # (actually we leave an empty line to preserve line numbers).
22997 if test "x$srcdir" = x.; then
22998 ac_vpsub='/^[ ]*VPATH[ ]*=/{
22999 s/:*\$(srcdir):*/:/;
23000 s/:*\${srcdir}:*/:/;
23002 s/^\([^=]*=[ ]*\):*/\1/;
23008 DEFS=-DHAVE_CONFIG_H
23010 : "${CONFIG_STATUS=./config.status}"
23011 ac_clean_files_save=$ac_clean_files
23012 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23013 { echo "$as_me:23013: creating $CONFIG_STATUS" >&5
23014 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23015 cat >"$CONFIG_STATUS" <<_ACEOF
23017 # Generated automatically by configure.
23018 # Run this file to recreate the current configuration.
23019 # Compiler output produced by configure, useful for debugging
23020 # configure, is in config.log if it exists.
23023 SHELL=\${CONFIG_SHELL-$SHELL}
23024 ac_cs_invocation="\$0 \$@"
23026 CLICOLOR_FORCE= GREP_OPTIONS=
23027 unset CLICOLOR_FORCE GREP_OPTIONS
23030 cat >>"$CONFIG_STATUS" <<\_ACEOF
23031 # Be Bourne compatible
23032 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23035 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23039 # Name of the executable.
23040 as_me=`echo "$0" |sed 's,.*[\\/],,'`
23042 if expr a : '\(a\)' >/dev/null 2>&1; then
23048 rm -f conf$$ conf$$.exe conf$$.file
23050 if ln -s conf$$.file conf$$ 2>/dev/null; then
23051 # We could just check for DJGPP; but this test a) works b) is more generic
23052 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23053 if test -f conf$$.exe; then
23054 # Don't use ln at all; we don't have any links
23059 elif ln conf$$.file conf$$ 2>/dev/null; then
23064 rm -f conf$$ conf$$.exe conf$$.file
23066 as_executable_p="test -f"
23068 # Support unset when possible.
23069 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
23076 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
23077 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
23078 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
23079 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
23080 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
23081 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
23082 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
23083 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
23086 # We need space, tab and new line, in precisely that order.
23092 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
23098 # Files that config.status was made for.
23099 if test -n "$ac_config_files"; then
23100 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
23103 if test -n "$ac_config_headers"; then
23104 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
23107 if test -n "$ac_config_links"; then
23108 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
23111 if test -n "$ac_config_commands"; then
23112 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
23115 cat >>"$CONFIG_STATUS" <<\EOF
23118 \`$as_me' instantiates files from templates according to the
23119 current configuration.
23121 Usage: $0 [OPTIONS] [FILE]...
23123 -h, --help print this help, then exit
23124 -V, --version print version number, then exit
23125 -d, --debug don't remove temporary files
23126 --recheck update $as_me by reconfiguring in the same conditions
23127 --file=FILE[:TEMPLATE]
23128 instantiate the configuration file FILE
23129 --header=FILE[:TEMPLATE]
23130 instantiate the configuration header FILE
23132 Configuration files:
23135 Configuration headers:
23138 Configuration commands:
23141 Report bugs to <dickey@invisible-island.net>."
23144 cat >>"$CONFIG_STATUS" <<EOF
23147 configured by $0, generated by GNU Autoconf 2.52.20210105,
23148 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23150 Copyright 2003-2020,2021 Thomas E. Dickey
23151 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
23152 Free Software Foundation, Inc.
23153 This config.status script is free software; the Free Software Foundation
23154 gives unlimited permission to copy, distribute and modify it."
23159 cat >>"$CONFIG_STATUS" <<\EOF
23160 # If no file are specified by the user, then we need to provide default
23161 # value. By we need to know if files were specified by the user.
23167 ac_option=`expr "x$1" : 'x\([^=]*\)='`
23168 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23170 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
23174 *) # This is not an option, so the user has probably given explicit
23176 ac_need_defaults=false;;
23180 # Handling of the options.
23182 cat >>"$CONFIG_STATUS" <<EOF
23183 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23184 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
23185 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
23187 cat >>"$CONFIG_STATUS" <<\EOF
23188 --version | --vers* | -V )
23189 echo "$ac_cs_version"; exit 0 ;;
23191 # Conflict between --help and --header
23192 { { echo "$as_me:23192: error: ambiguous option: $1
23193 Try \`$0 --help' for more information." >&5
23194 echo "$as_me: error: ambiguous option: $1
23195 Try \`$0 --help' for more information." >&2;}
23196 { (exit 1); exit 1; }; };;
23197 --help | --hel | -h )
23198 echo "$ac_cs_usage"; exit 0 ;;
23199 --debug | --d* | -d )
23201 --file | --fil | --fi | --f )
23203 CONFIG_FILES="$CONFIG_FILES $1"
23204 ac_need_defaults=false;;
23205 --header | --heade | --head | --hea )
23207 CONFIG_HEADERS="$CONFIG_HEADERS $1"
23208 ac_need_defaults=false;;
23210 # This is an error.
23211 -*) { { echo "$as_me:23211: error: unrecognized option: $1
23212 Try \`$0 --help' for more information." >&5
23213 echo "$as_me: error: unrecognized option: $1
23214 Try \`$0 --help' for more information." >&2;}
23215 { (exit 1); exit 1; }; } ;;
23217 *) ac_config_targets="$ac_config_targets $1" ;;
23226 ## ----------------------- ##
23227 ## Running config.status. ##
23228 ## ----------------------- ##
23230 This file was extended by $as_me 2.52.20210105, executed with
23231 CONFIG_FILES = $CONFIG_FILES
23232 CONFIG_HEADERS = $CONFIG_HEADERS
23233 CONFIG_LINKS = $CONFIG_LINKS
23234 CONFIG_COMMANDS = $CONFIG_COMMANDS
23235 > "$ac_cs_invocation"
23236 on `(hostname || uname -n) 2>/dev/null | sed 1q`
23241 cat >>"$CONFIG_STATUS" <<EOF
23243 # INIT-COMMANDS section.
23253 cat >>"$CONFIG_STATUS" <<\EOF
23254 for ac_config_target in $ac_config_targets
23256 case "$ac_config_target" in
23257 # Handling of arguments.
23258 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23259 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23260 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
23261 *) { { echo "$as_me:23261: error: invalid argument: $ac_config_target" >&5
23262 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23263 { (exit 1); exit 1; }; };;
23267 # If the user did not use the arguments to specify the items to instantiate,
23268 # then the envvar interface is used. Set only those that are not.
23269 # We use the long form for the default assignment because of an extremely
23270 # bizarre bug on SunOS 4.1.3.
23271 if "$ac_need_defaults"; then
23272 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23273 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23274 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23277 # Create a temporary directory, and hook for its removal unless debugging.
23280 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23281 trap '{ (exit 1); exit 1; }' 1 2 13 15
23284 # Create a (secure) tmp directory for tmp files.
23287 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
23288 test -n "$tmp" && test -d "$tmp"
23291 tmp=$TMPDIR/cs$$-$RANDOM
23292 (umask 077 && mkdir $tmp)
23295 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
23296 { (exit 1); exit 1; }
23301 cat >>"$CONFIG_STATUS" <<EOF
23304 # CONFIG_FILES section.
23307 # No need to generate the scripts if there are no CONFIG_FILES.
23308 # This happens for instance when ./config.status config.h
23309 if test -n "\$CONFIG_FILES"; then
23310 # Protect against being on the right side of a sed subst in config.status.
23311 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23312 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23313 s,@SHELL@,$SHELL,;t t
23314 s,@exec_prefix@,$exec_prefix,;t t
23315 s,@prefix@,$prefix,;t t
23316 s,@program_transform_name@,$program_transform_name,;t t
23317 s,@bindir@,$bindir,;t t
23318 s,@sbindir@,$sbindir,;t t
23319 s,@libexecdir@,$libexecdir,;t t
23320 s,@datarootdir@,$datarootdir,;t t
23321 s,@datadir@,$datadir,;t t
23322 s,@sysconfdir@,$sysconfdir,;t t
23323 s,@sharedstatedir@,$sharedstatedir,;t t
23324 s,@localstatedir@,$localstatedir,;t t
23325 s,@runstatedir@,$runstatedir,;t t
23326 s,@libdir@,$libdir,;t t
23327 s,@includedir@,$includedir,;t t
23328 s,@oldincludedir@,$oldincludedir,;t t
23329 s,@infodir@,$infodir,;t t
23330 s,@mandir@,$mandir,;t t
23331 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23332 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23333 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23334 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23335 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23336 s,@build_alias@,$build_alias,;t t
23337 s,@host_alias@,$host_alias,;t t
23338 s,@target_alias@,$target_alias,;t t
23339 s,@ECHO_C@,$ECHO_C,;t t
23340 s,@ECHO_N@,$ECHO_N,;t t
23341 s,@ECHO_T@,$ECHO_T,;t t
23342 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23343 s,@DEFS@,$DEFS,;t t
23344 s,@LIBS@,$LIBS,;t t
23345 s,@build@,$build,;t t
23346 s,@build_cpu@,$build_cpu,;t t
23347 s,@build_vendor@,$build_vendor,;t t
23348 s,@build_os@,$build_os,;t t
23349 s,@host@,$host,;t t
23350 s,@host_cpu@,$host_cpu,;t t
23351 s,@host_vendor@,$host_vendor,;t t
23352 s,@host_os@,$host_os,;t t
23353 s,@SET_MAKE@,$SET_MAKE,;t t
23355 s,@CFLAGS@,$CFLAGS,;t t
23356 s,@LDFLAGS@,$LDFLAGS,;t t
23357 s,@CPPFLAGS@,$CPPFLAGS,;t t
23358 s,@ac_ct_CC@,$ac_ct_CC,;t t
23359 s,@EXEEXT@,$EXEEXT,;t t
23360 s,@OBJEXT@,$OBJEXT,;t t
23361 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
23363 s,@GREP@,$GREP,;t t
23364 s,@EGREP@,$EGREP,;t t
23366 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23367 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23368 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
23369 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
23370 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
23371 s,@LINT@,$LINT,;t t
23372 s,@LINT_OPTS@,$LINT_OPTS,;t t
23373 s,@CTAGS@,$CTAGS,;t t
23374 s,@ETAGS@,$ETAGS,;t t
23375 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
23376 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
23377 s,@MATH_LIB@,$MATH_LIB,;t t
23378 s,@top_builddir@,$top_builddir,;t t
23379 s,@CC_G_OPT@,$CC_G_OPT,;t t
23380 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
23381 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
23382 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
23383 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
23385 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23386 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23387 s,@LD_MODEL@,$LD_MODEL,;t t
23388 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
23389 s,@LIBTOOL@,$LIBTOOL,;t t
23390 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
23391 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
23392 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
23393 s,@LIB_LINK@,$LIB_LINK,;t t
23394 s,@LINK_TESTS@,$LINK_TESTS,;t t
23395 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
23396 s,@PACKAGE@,$PACKAGE,;t t
23397 s,@PTHREAD@,$PTHREAD,;t t
23398 s,@TEST_ARGS@,$TEST_ARGS,;t t
23399 s,@TEST_DEPS@,$TEST_DEPS,;t t
23400 s,@TEST_LIBS@,$TEST_LIBS,;t t
23401 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23402 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23403 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
23404 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
23405 s,@includesubdir@,$includesubdir,;t t
23406 s,@FGREP@,$FGREP,;t t
23407 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
23408 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
23409 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
23410 s,@ECHO_LT@,$ECHO_LT,;t t
23411 s,@ECHO_LD@,$ECHO_LD,;t t
23412 s,@RULE_CC@,$RULE_CC,;t t
23413 s,@SHOW_CC@,$SHOW_CC,;t t
23414 s,@ECHO_CC@,$ECHO_CC,;t t
23415 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
23416 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
23417 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
23418 s,@X_CFLAGS@,$X_CFLAGS,;t t
23419 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
23420 s,@X_LIBS@,$X_LIBS,;t t
23421 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
23422 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
23423 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
23424 s,@RGB_PATH@,$RGB_PATH,;t t
23425 s,@no_x11_rgb@,$no_x11_rgb,;t t
23426 s,@FORM_NAME@,$FORM_NAME,;t t
23427 s,@MENU_NAME@,$MENU_NAME,;t t
23428 s,@PANEL_NAME@,$PANEL_NAME,;t t
23429 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
23430 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
23431 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
23436 cat >>"$CONFIG_STATUS" <<\EOF
23437 # Split the substitutions into bite-sized pieces for seds with
23438 # small command number limits, like on Digital OSF/1 and HP-UX.
23439 ac_max_sed_lines=48
23440 ac_sed_frag=1 # Number of current file.
23441 ac_beg=1 # First line for current file.
23442 ac_end=$ac_max_sed_lines # Line after last line for current file.
23445 while "$ac_more_lines"; do
23446 if test "$ac_beg" -gt 1; then
23447 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23449 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23451 if test ! -s $tmp/subs.frag; then
23452 ac_more_lines=false
23454 # The purpose of the label and of the branching condition is to
23455 # speed up the sed processing (if there are no `@' at all, there
23456 # is no need to browse any of the substitutions).
23457 # These are the two extra sed commands mentioned above.
23459 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23460 # It is possible to make a multiline substitution using escaped newlines.
23461 # Ensure that we do not split the substitution between script fragments.
23463 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
23464 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
23465 if test -s $tmp/subs.next; then
23466 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
23467 if test ! -s $tmp/subs.edit; then
23468 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
23469 if test ! -s $tmp/subs.edit; then
23470 if test "$ac_beg" -gt 1; then
23471 ac_end=`expr "$ac_end" - 1`
23478 if test -z "$ac_sed_cmds"; then
23479 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23481 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23483 ac_sed_frag=`expr "$ac_sed_frag" + 1`
23485 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
23488 if test -z "$ac_sed_cmds"; then
23491 fi # test -n "$CONFIG_FILES"
23494 cat >>"$CONFIG_STATUS" <<\EOF
23495 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23496 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23498 - | *:- | *:-:* ) # input from stdin
23500 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23501 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23502 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23503 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23504 * ) ac_file_in=$ac_file.in ;;
23507 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23508 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23509 X"$ac_file" : 'X\(//\)[^/]' \| \
23510 X"$ac_file" : 'X\(//\)$' \| \
23511 X"$ac_file" : 'X\(/\)' \| \
23512 . : '\(.\)' 2>/dev/null ||
23514 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23515 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23516 /^X\(\/\/\)$/{ s//\1/; q; }
23517 /^X\(\/\).*/{ s//\1/; q; }
23519 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23520 { case "$ac_dir" in
23521 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23525 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23526 case $as_mkdir_dir in
23527 # Skip DOS drivespec
23528 ?:) as_incr_dir=$as_mkdir_dir ;;
23530 as_incr_dir=$as_incr_dir/$as_mkdir_dir
23531 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23536 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23537 # A "../" for each directory in $ac_dir_suffix.
23538 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23540 ac_dir_suffix= ac_dots=
23545 if test -z "$ac_dots"; then
23548 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
23550 [\\/]* | ?:[\\/]* )
23551 ac_srcdir="$srcdir$ac_dir_suffix";
23552 ac_top_srcdir="$srcdir" ;;
23553 *) # Relative path.
23554 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
23555 ac_top_srcdir="$ac_dots$srcdir" ;;
23559 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23560 *) ac_INSTALL=$ac_dots$INSTALL ;;
23563 if test x"$ac_file" != x-; then
23564 { echo "$as_me:23564: creating $ac_file" >&5
23565 echo "$as_me: creating $ac_file" >&6;}
23568 # Let's still pretend it is `configure' which instantiates (i.e., don't
23569 # use $as_me), people would be surprised to read:
23570 # /* config.h. Generated automatically by config.status. */
23571 configure_input="Generated automatically from `echo $ac_file_in |
23572 sed 's,.*/,,'` by configure."
23574 # First look for the input files in the build tree, otherwise in the
23576 ac_file_inputs=`IFS=:
23577 for f in $ac_file_in; do
23579 -) echo $tmp/stdin ;;
23581 # Absolute (can't be DOS-style, as IFS=:)
23582 test -f "$f" || { { echo "$as_me:23582: error: cannot find input file: $f" >&5
23583 echo "$as_me: error: cannot find input file: $f" >&2;}
23584 { (exit 1); exit 1; }; }
23587 if test -f "$f"; then
23590 elif test -f "$srcdir/$f"; then
23595 { { echo "$as_me:23595: error: cannot find input file: $f" >&5
23596 echo "$as_me: error: cannot find input file: $f" >&2;}
23597 { (exit 1); exit 1; }; }
23600 done` || { (exit 1); exit 1; }
23602 cat >>"$CONFIG_STATUS" <<\EOF
23603 ac_warn_datarootdir=no
23604 if test x"$ac_file" != x-; then
23605 for ac_item in $ac_file_inputs
23607 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
23608 if test -n "$ac_seen"; then
23609 ac_used=`grep '@datarootdir@' "$ac_item"`
23610 if test -z "$ac_used"; then
23611 { echo "$as_me:23611: WARNING: datarootdir was used implicitly but not set:
23613 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23615 ac_warn_datarootdir=yes
23618 ac_seen=`grep '${datarootdir}' "$ac_item"`
23619 if test -n "$ac_seen"; then
23620 { echo "$as_me:23620: WARNING: datarootdir was used explicitly but not set:
23622 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23624 ac_warn_datarootdir=yes
23629 if test "x$ac_warn_datarootdir" = xyes; then
23630 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23634 cat >>"$CONFIG_STATUS" <<EOF
23638 cat >>"$CONFIG_STATUS" <<\EOF
23640 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23641 s,@configure_input@,$configure_input,;t t
23642 s,@srcdir@,$ac_srcdir,;t t
23643 s,@top_srcdir@,$ac_top_srcdir,;t t
23644 s,@INSTALL@,$ac_INSTALL,;t t
23645 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23647 if test x"$ac_file" != x-; then
23648 cp "$tmp/out" "$ac_file"
23650 for ac_name in prefix exec_prefix datarootdir
23652 ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
23653 if test -n "$ac_seen"; then
23654 ac_init=`${EGREP-egrep} '[ ]*'$ac_name'[ ]*=' "$ac_file"`
23655 if test -z "$ac_init"; then
23656 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23657 { echo "$as_me:23657: WARNING: Variable $ac_name is used but was not set:
23659 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23664 ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
23665 ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
23666 if test -s $tmp/out; then
23667 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23668 { echo "$as_me:23668: WARNING: Some variables may not be substituted:
23670 echo "$as_me: WARNING: Some variables may not be substituted:
23680 cat >>"$CONFIG_STATUS" <<\EOF
23683 # CONFIG_HEADER section.
23686 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23687 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23689 # ac_d sets the value in "#define NAME VALUE" lines.
23690 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
23691 ac_dB='[ ].*$,\1#\2'
23694 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23695 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
23696 ac_iB='\([ ]\),\1#\2define\3'
23699 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23700 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
23701 ac_uB='$,\1#\2define\3'
23705 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23706 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23708 - | *:- | *:-:* ) # input from stdin
23710 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23711 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23712 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23713 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23714 * ) ac_file_in=$ac_file.in ;;
23717 test x"$ac_file" != x- && { echo "$as_me:23717: creating $ac_file" >&5
23718 echo "$as_me: creating $ac_file" >&6;}
23720 # First look for the input files in the build tree, otherwise in the
23722 ac_file_inputs=`IFS=:
23723 for f in $ac_file_in; do
23725 -) echo $tmp/stdin ;;
23727 # Absolute (can't be DOS-style, as IFS=:)
23728 test -f "$f" || { { echo "$as_me:23728: error: cannot find input file: $f" >&5
23729 echo "$as_me: error: cannot find input file: $f" >&2;}
23730 { (exit 1); exit 1; }; }
23733 if test -f "$f"; then
23736 elif test -f "$srcdir/$f"; then
23741 { { echo "$as_me:23741: error: cannot find input file: $f" >&5
23742 echo "$as_me: error: cannot find input file: $f" >&2;}
23743 { (exit 1); exit 1; }; }
23746 done` || { (exit 1); exit 1; }
23747 # Remove the trailing spaces.
23748 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
23752 # Transform confdefs.h into a list of #define's. We won't use it as a sed
23753 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
23754 # be either 'cat' or 'sort'.
23755 cat confdefs.h | uniq >conftest.vals
23757 # Break up conftest.vals because some shells have a limit on
23758 # the size of here documents, and old seds have small limits too.
23760 rm -f conftest.tail
23761 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
23762 while grep . conftest.vals >/dev/null
23764 # Write chunks of a limited-size here document to conftest.frag.
23765 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
23766 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
23767 echo 'CEOF' >> "$CONFIG_STATUS"
23768 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
23769 rm -f conftest.vals
23770 mv conftest.tail conftest.vals
23772 rm -f conftest.vals
23774 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23776 echo ' cat >> conftest.edit <<CEOF
23777 /@DEFS@/r conftest.frag
23780 sed -f conftest.edit $tmp/in > $tmp/out
23782 mv $tmp/out $tmp/in
23783 rm -f conftest.edit conftest.frag
23784 ' >> "$CONFIG_STATUS"
23786 cat >>"$CONFIG_STATUS" <<\EOF
23787 # Let's still pretend it is `configure' which instantiates (i.e., don't
23788 # use $as_me), people would be surprised to read:
23789 # /* config.h. Generated automatically by config.status. */
23790 if test x"$ac_file" = x-; then
23791 echo "/* Generated automatically by configure. */" >$tmp/config.h
23793 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
23795 cat $tmp/in >>$tmp/config.h
23797 if test x"$ac_file" != x-; then
23798 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
23799 { echo "$as_me:23799: $ac_file is unchanged" >&5
23800 echo "$as_me: $ac_file is unchanged" >&6;}
23802 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23803 X"$ac_file" : 'X\(//\)[^/]' \| \
23804 X"$ac_file" : 'X\(//\)$' \| \
23805 X"$ac_file" : 'X\(/\)' \| \
23806 . : '\(.\)' 2>/dev/null ||
23808 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23809 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23810 /^X\(\/\/\)$/{ s//\1/; q; }
23811 /^X\(\/\).*/{ s//\1/; q; }
23813 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23814 { case "$ac_dir" in
23815 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23819 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23820 case $as_mkdir_dir in
23821 # Skip DOS drivespec
23822 ?:) as_incr_dir=$as_mkdir_dir ;;
23824 as_incr_dir=$as_incr_dir/$as_mkdir_dir
23825 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23832 mv "$tmp/config.h" "$ac_file"
23836 rm -f $tmp/config.h
23840 cat >>"$CONFIG_STATUS" <<\EOF
23842 # CONFIG_COMMANDS section.
23844 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23845 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23846 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23853 if test ! -d "$srcdir/$cf_dir" ; then
23855 elif test -f "$srcdir/$cf_dir/programs" ; then
23856 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
23860 cat >>Makefile <<TEST_EOF
23862 # These rules are generated so we do not rely on suffix rules, which do not
23863 # work consistently for different make-programs (the '\$(MODEL)/' confuses
23864 # some, and the '\$x' confuses others).
23867 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
23870 cat >>Makefile <<TEST_EOF
23872 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
23873 \$(srcdir)/test.priv.h \\
23876 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) -DMODULE_NAME="$N" \$(srcdir)/$N.c
23880 if test -f ../config.guess && test -f ../config.sub
23882 cat >>Makefile <<TEST_EOF
23884 # if we used CF_INHERIT for getting these files, we can remove them
23886 rm -f config.guess config.sub
23894 cat >>"$CONFIG_STATUS" <<\EOF
23896 { (exit 0); exit 0; }
23898 chmod +x "$CONFIG_STATUS"
23899 ac_clean_files=$ac_clean_files_save
23901 # configure is writing to config.log, and then calls config.status.
23902 # config.status does its own redirection, appending to config.log.
23903 # Unfortunately, on DOS this fails, as config.log is still kept open
23904 # by configure, so config.status won't be able to write to it; its
23905 # output is simply discarded. So we exec the FD to /dev/null,
23906 # effectively closing config.log, so it can be properly (re)opened and
23907 # appended to by config.status. When coming back to configure, we
23908 # need to make the FD available again.
23909 if test "$no_create" != yes; then
23912 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
23914 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23915 # would make configure fail if this is the last instruction.
23916 "$ac_cs_success" || { (exit 1); exit 1; }