2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20210509.
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.20210509. 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 for \".PHONY\" make-support" >&5
3001 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
3002 if test "${cf_cv_make_PHONY+set}" = set; then
3003 echo $ECHO_N "(cached) $ECHO_C" >&6
3008 mkdir conftest || exit 1
3010 cat >makefile <<'CF_EOF'
3014 @echo "** making $@ $(DATA)"
3016 @echo "** making $@ $(DATA)"
3018 @echo "** making $@ $(DATA)"
3021 @echo "** making $@ $(DATA)"
3024 for cf_data in 1 2 3
3026 ${MAKE:-make} always DATA=$cf_data
3027 ${MAKE:-make} once DATA=$cf_data
3028 ${MAKE:-make} -t always once
3029 if test -f always ; then
3030 echo "no (case 1)" > ../conftest.tmp
3031 elif test ! -f always.out ; then
3032 echo "no (case 2)" > ../conftest.tmp
3033 elif test ! -f once.out ; then
3034 echo "no (case 3)" > ../conftest.tmp
3035 elif ! cmp -s always.out once.out ; then
3036 echo "no (case 4)" > ../conftest.tmp
3037 diff always.out once.out
3039 cf_check="`cat always.out`"
3040 if test "x$cf_check" != "x$cf_data" ; then
3041 echo "no (case 5)" > ../conftest.tmp
3043 echo yes > ../conftest.tmp
3051 cf_cv_make_PHONY="`cat conftest.tmp`"
3055 echo "$as_me:3055: result: $cf_cv_make_PHONY" >&5
3056 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
3059 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
3060 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
3062 echo "$as_me:3062: checking if filesystem supports mixed-case filenames" >&5
3063 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3064 if test "${cf_cv_mixedcase+set}" = set; then
3065 echo $ECHO_N "(cached) $ECHO_C" >&6
3068 if test "$cross_compiling" = yes ; then
3069 case "$target_alias" in
3070 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3078 rm -f conftest CONFTEST
3080 if test -f CONFTEST ; then
3085 rm -f conftest CONFTEST
3089 echo "$as_me:3089: result: $cf_cv_mixedcase" >&5
3090 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3091 test "$cf_cv_mixedcase" = yes &&
3092 cat >>confdefs.h <<\EOF
3093 #define MIXEDCASE_FILENAMES 1
3096 for ac_prog in exctags ctags
3098 # Extract the first word of "$ac_prog", so it can be a program name with args.
3099 set dummy $ac_prog; ac_word=$2
3100 echo "$as_me:3100: checking for $ac_word" >&5
3101 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3102 if test "${ac_cv_prog_CTAGS+set}" = set; then
3103 echo $ECHO_N "(cached) $ECHO_C" >&6
3105 if test -n "$CTAGS"; then
3106 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3108 ac_save_IFS=$IFS; IFS=$ac_path_separator
3110 for ac_dir in $ac_dummy; do
3112 test -z "$ac_dir" && ac_dir=.
3113 $as_executable_p "$ac_dir/$ac_word" || continue
3114 ac_cv_prog_CTAGS="$ac_prog"
3115 echo "$as_me:3115: found $ac_dir/$ac_word" >&5
3121 CTAGS=$ac_cv_prog_CTAGS
3122 if test -n "$CTAGS"; then
3123 echo "$as_me:3123: result: $CTAGS" >&5
3124 echo "${ECHO_T}$CTAGS" >&6
3126 echo "$as_me:3126: result: no" >&5
3127 echo "${ECHO_T}no" >&6
3130 test -n "$CTAGS" && break
3133 for ac_prog in exetags etags
3135 # Extract the first word of "$ac_prog", so it can be a program name with args.
3136 set dummy $ac_prog; ac_word=$2
3137 echo "$as_me:3137: checking for $ac_word" >&5
3138 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3139 if test "${ac_cv_prog_ETAGS+set}" = set; then
3140 echo $ECHO_N "(cached) $ECHO_C" >&6
3142 if test -n "$ETAGS"; then
3143 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3145 ac_save_IFS=$IFS; IFS=$ac_path_separator
3147 for ac_dir in $ac_dummy; do
3149 test -z "$ac_dir" && ac_dir=.
3150 $as_executable_p "$ac_dir/$ac_word" || continue
3151 ac_cv_prog_ETAGS="$ac_prog"
3152 echo "$as_me:3152: found $ac_dir/$ac_word" >&5
3158 ETAGS=$ac_cv_prog_ETAGS
3159 if test -n "$ETAGS"; then
3160 echo "$as_me:3160: result: $ETAGS" >&5
3161 echo "${ECHO_T}$ETAGS" >&6
3163 echo "$as_me:3163: result: no" >&5
3164 echo "${ECHO_T}no" >&6
3167 test -n "$ETAGS" && break
3170 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3171 set dummy ${CTAGS:-ctags}; ac_word=$2
3172 echo "$as_me:3172: checking for $ac_word" >&5
3173 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3174 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3175 echo $ECHO_N "(cached) $ECHO_C" >&6
3177 if test -n "$MAKE_LOWER_TAGS"; then
3178 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3180 ac_save_IFS=$IFS; IFS=$ac_path_separator
3182 for ac_dir in $ac_dummy; do
3184 test -z "$ac_dir" && ac_dir=.
3185 $as_executable_p "$ac_dir/$ac_word" || continue
3186 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3187 echo "$as_me:3187: found $ac_dir/$ac_word" >&5
3191 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3194 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3195 if test -n "$MAKE_LOWER_TAGS"; then
3196 echo "$as_me:3196: result: $MAKE_LOWER_TAGS" >&5
3197 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3199 echo "$as_me:3199: result: no" >&5
3200 echo "${ECHO_T}no" >&6
3203 if test "$cf_cv_mixedcase" = yes ; then
3204 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3205 set dummy ${ETAGS:-etags}; ac_word=$2
3206 echo "$as_me:3206: checking for $ac_word" >&5
3207 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3208 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3209 echo $ECHO_N "(cached) $ECHO_C" >&6
3211 if test -n "$MAKE_UPPER_TAGS"; then
3212 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3214 ac_save_IFS=$IFS; IFS=$ac_path_separator
3216 for ac_dir in $ac_dummy; do
3218 test -z "$ac_dir" && ac_dir=.
3219 $as_executable_p "$ac_dir/$ac_word" || continue
3220 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3221 echo "$as_me:3221: found $ac_dir/$ac_word" >&5
3225 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3228 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3229 if test -n "$MAKE_UPPER_TAGS"; then
3230 echo "$as_me:3230: result: $MAKE_UPPER_TAGS" >&5
3231 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3233 echo "$as_me:3233: result: no" >&5
3234 echo "${ECHO_T}no" >&6
3241 if test "$MAKE_UPPER_TAGS" = yes ; then
3247 if test "$MAKE_LOWER_TAGS" = yes ; then
3253 echo "$as_me:3253: checking if -lm needed for math functions" >&5
3254 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
3255 if test "${cf_cv_need_libm+set}" = set; then
3256 echo $ECHO_N "(cached) $ECHO_C" >&6
3259 cat >"conftest.$ac_ext" <<_ACEOF
3260 #line 3260 "configure"
3261 #include "confdefs.h"
3270 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
3275 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3276 if { (eval echo "$as_me:3276: \"$ac_link\"") >&5
3277 (eval $ac_link) 2>&5
3279 echo "$as_me:3279: \$? = $ac_status" >&5
3280 (exit "$ac_status"); } &&
3281 { ac_try='test -s "conftest$ac_exeext"'
3282 { (eval echo "$as_me:3282: \"$ac_try\"") >&5
3285 echo "$as_me:3285: \$? = $ac_status" >&5
3286 (exit "$ac_status"); }; }; then
3289 echo "$as_me: failed program was:" >&5
3290 cat "conftest.$ac_ext" >&5
3293 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3295 echo "$as_me:3295: result: $cf_cv_need_libm" >&5
3296 echo "${ECHO_T}$cf_cv_need_libm" >&6
3297 if test "$cf_cv_need_libm" = yes
3305 CC_SHARED_OPTS=unknown
3306 CPPFLAGS="$CPPFLAGS"
3308 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
3309 DFT_UPR_MODEL="NORMAL"
3322 PACKAGE="ncurses-examples"
3328 TINFO_LIBS='$(LIBS_CURSES)'
3329 cf_cv_abi_version=""
3330 cf_cv_rel_version=""
3336 echo "$as_me:3336: checking for fgrep" >&5
3337 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
3338 if test "${ac_cv_path_FGREP+set}" = set; then
3339 echo $ECHO_N "(cached) $ECHO_C" >&6
3341 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
3342 then ac_cv_path_FGREP="$GREP -F"
3344 for ac_prog in gfgrep fgrep
3346 # Extract the first word of "$ac_prog", so it can be a program name with args.
3347 set dummy $ac_prog; ac_word=$2
3348 echo "$as_me:3348: checking for $ac_word" >&5
3349 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3350 if test "${ac_cv_path_FGREP+set}" = set; then
3351 echo $ECHO_N "(cached) $ECHO_C" >&6
3355 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
3358 ac_save_IFS=$IFS; IFS=$ac_path_separator
3360 for ac_dir in $ac_dummy; do
3362 test -z "$ac_dir" && ac_dir=.
3363 if $as_executable_p "$ac_dir/$ac_word"; then
3364 ac_cv_path_FGREP="$ac_dir/$ac_word"
3365 echo "$as_me:3365: found $ac_dir/$ac_word" >&5
3373 FGREP=$ac_cv_path_FGREP
3375 if test -n "$FGREP"; then
3376 echo "$as_me:3376: result: $FGREP" >&5
3377 echo "${ECHO_T}$FGREP" >&6
3379 echo "$as_me:3379: result: no" >&5
3380 echo "${ECHO_T}no" >&6
3383 test -n "$FGREP" && break
3385 test -n "$FGREP" || FGREP=": "
3387 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:3387: error: cannot find workable fgrep" >&5
3388 echo "$as_me: error: cannot find workable fgrep" >&2;}
3389 { (exit 1); exit 1; }; }
3392 echo "$as_me:3392: result: $ac_cv_path_FGREP" >&5
3393 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
3394 FGREP="$ac_cv_path_FGREP"
3396 echo "$as_me:3396: checking if you want to use C11 _Noreturn feature" >&5
3397 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
3399 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
3400 if test "${enable_stdnoreturn+set}" = set; then
3401 enableval="$enable_stdnoreturn"
3402 test "$enableval" != yes && enableval=no
3403 if test "$enableval" != "no" ; then
3404 enable_stdnoreturn=yes
3406 enable_stdnoreturn=no
3410 enable_stdnoreturn=no
3413 echo "$as_me:3413: result: $enable_stdnoreturn" >&5
3414 echo "${ECHO_T}$enable_stdnoreturn" >&6
3416 if test $enable_stdnoreturn = yes; then
3417 echo "$as_me:3417: checking for C11 _Noreturn feature" >&5
3418 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
3419 if test "${cf_cv_c11_noreturn+set}" = set; then
3420 echo $ECHO_N "(cached) $ECHO_C" >&6
3422 cat >"conftest.$ac_ext" <<_ACEOF
3423 #line 3423 "configure"
3424 #include "confdefs.h"
3428 #include <stdnoreturn.h>
3429 static _Noreturn void giveup(void) { exit(0); }
3434 if (feof(stdin)) giveup()
3439 rm -f "conftest.$ac_objext"
3440 if { (eval echo "$as_me:3440: \"$ac_compile\"") >&5
3441 (eval $ac_compile) 2>&5
3443 echo "$as_me:3443: \$? = $ac_status" >&5
3444 (exit "$ac_status"); } &&
3445 { ac_try='test -s "conftest.$ac_objext"'
3446 { (eval echo "$as_me:3446: \"$ac_try\"") >&5
3449 echo "$as_me:3449: \$? = $ac_status" >&5
3450 (exit "$ac_status"); }; }; then
3451 cf_cv_c11_noreturn=yes
3453 echo "$as_me: failed program was:" >&5
3454 cat "conftest.$ac_ext" >&5
3455 cf_cv_c11_noreturn=no
3457 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3460 echo "$as_me:3460: result: $cf_cv_c11_noreturn" >&5
3461 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
3463 cf_cv_c11_noreturn=no,
3466 if test "$cf_cv_c11_noreturn" = yes; then
3468 cat >>confdefs.h <<\EOF
3469 #define HAVE_STDNORETURN_H 1
3472 cat >>confdefs.h <<EOF
3473 #define STDC_NORETURN _Noreturn
3476 HAVE_STDNORETURN_H=1
3478 HAVE_STDNORETURN_H=0
3481 if test "$GCC" = yes || test "$GXX" = yes
3483 cat > conftest.i <<EOF
3485 #define GCC_PRINTF 0
3490 #ifndef GCC_NORETURN
3491 #define GCC_NORETURN /* nothing */
3494 #define GCC_UNUSED /* nothing */
3497 if test "$GCC" = yes
3499 { echo "$as_me:3499: checking for $CC __attribute__ directives..." >&5
3500 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
3501 cat > "conftest.$ac_ext" <<EOF
3502 #line 3502 "${as_me:-configure}"
3503 #include "confdefs.h"
3504 #include "conftest.h"
3505 #include "conftest.i"
3507 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3509 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
3512 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
3514 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
3516 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
3517 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
3518 extern GCC_NORETURN void foo(void);
3519 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
3521 cf_printf_attribute=no
3522 cf_scanf_attribute=no
3523 for cf_attribute in scanf printf unused noreturn
3526 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3528 cf_directive="__attribute__(($cf_attribute))"
3529 echo "checking for $CC $cf_directive" 1>&5
3531 case "$cf_attribute" in
3533 cf_printf_attribute=yes
3534 cat >conftest.h <<EOF
3535 #define GCC_$cf_ATTRIBUTE 1
3539 cf_scanf_attribute=yes
3540 cat >conftest.h <<EOF
3541 #define GCC_$cf_ATTRIBUTE 1
3545 cat >conftest.h <<EOF
3546 #define GCC_$cf_ATTRIBUTE $cf_directive
3551 if { (eval echo "$as_me:3551: \"$ac_compile\"") >&5
3552 (eval $ac_compile) 2>&5
3554 echo "$as_me:3554: \$? = $ac_status" >&5
3555 (exit "$ac_status"); }; then
3556 test -n "$verbose" && echo "$as_me:3556: result: ... $cf_attribute" >&5
3557 echo "${ECHO_T}... $cf_attribute" >&6
3558 cat conftest.h >>confdefs.h
3559 case "$cf_attribute" in
3562 cat >>confdefs.h <<EOF
3563 #define GCC_NORETURN $cf_directive
3568 cf_value='/* nothing */'
3569 if test "$cf_printf_attribute" != no ; then
3570 cf_value='__attribute__((format(printf,fmt,var)))'
3572 cat >>confdefs.h <<\EOF
3573 #define GCC_PRINTF 1
3578 cat >>confdefs.h <<EOF
3579 #define GCC_PRINTFLIKE(fmt,var) $cf_value
3584 cf_value='/* nothing */'
3585 if test "$cf_scanf_attribute" != no ; then
3586 cf_value='__attribute__((format(scanf,fmt,var)))'
3588 cat >>confdefs.h <<\EOF
3594 cat >>confdefs.h <<EOF
3595 #define GCC_SCANFLIKE(fmt,var) $cf_value
3601 cat >>confdefs.h <<EOF
3602 #define GCC_UNUSED $cf_directive
3610 ${FGREP-fgrep} define conftest.i >>confdefs.h
3615 echo "$as_me:3615: checking if you want to work around bogus compiler/loader warnings" >&5
3616 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
3618 # Check whether --enable-string-hacks or --disable-string-hacks was given.
3619 if test "${enable_string_hacks+set}" = set; then
3620 enableval="$enable_string_hacks"
3621 enable_string_hacks=$enableval
3623 enable_string_hacks=no
3625 echo "$as_me:3625: result: $enable_string_hacks" >&5
3626 echo "${ECHO_T}$enable_string_hacks" >&6
3628 if test "x$enable_string_hacks" = "xyes"; then
3630 cat >>confdefs.h <<\EOF
3631 #define USE_STRING_HACKS 1
3634 { echo "$as_me:3634: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
3635 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
3636 echo "$as_me:3636: checking for strlcat" >&5
3637 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
3638 if test "${ac_cv_func_strlcat+set}" = set; then
3639 echo $ECHO_N "(cached) $ECHO_C" >&6
3641 cat >"conftest.$ac_ext" <<_ACEOF
3642 #line 3642 "configure"
3643 #include "confdefs.h"
3644 #define strlcat autoconf_temporary
3645 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3652 /* We use char because int might match the return type of a gcc2
3653 builtin and then its argument prototype would still apply. */
3654 char strlcat (void);
3660 /* The GNU C library defines stubs for functions which it implements
3661 to always fail with ENOSYS. Some functions are actually named
3662 something starting with __ and the normal name is an alias. */
3663 #if defined (__stub_strlcat) || defined (__stub___strlcat)
3664 #error found stub for strlcat
3672 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3673 if { (eval echo "$as_me:3673: \"$ac_link\"") >&5
3674 (eval $ac_link) 2>&5
3676 echo "$as_me:3676: \$? = $ac_status" >&5
3677 (exit "$ac_status"); } &&
3678 { ac_try='test -s "conftest$ac_exeext"'
3679 { (eval echo "$as_me:3679: \"$ac_try\"") >&5
3682 echo "$as_me:3682: \$? = $ac_status" >&5
3683 (exit "$ac_status"); }; }; then
3684 ac_cv_func_strlcat=yes
3686 echo "$as_me: failed program was:" >&5
3687 cat "conftest.$ac_ext" >&5
3688 ac_cv_func_strlcat=no
3690 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3692 echo "$as_me:3692: result: $ac_cv_func_strlcat" >&5
3693 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
3694 if test "$ac_cv_func_strlcat" = yes; then
3696 cat >>confdefs.h <<\EOF
3697 #define HAVE_STRLCAT 1
3702 echo "$as_me:3702: checking for strlcat in -lbsd" >&5
3703 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
3704 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
3705 echo $ECHO_N "(cached) $ECHO_C" >&6
3707 ac_check_lib_save_LIBS=$LIBS
3709 cat >"conftest.$ac_ext" <<_ACEOF
3710 #line 3710 "configure"
3711 #include "confdefs.h"
3713 /* Override any gcc2 internal prototype to avoid an error. */
3717 /* We use char because int might match the return type of a gcc2
3718 builtin and then its argument prototype would still apply. */
3728 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3729 if { (eval echo "$as_me:3729: \"$ac_link\"") >&5
3730 (eval $ac_link) 2>&5
3732 echo "$as_me:3732: \$? = $ac_status" >&5
3733 (exit "$ac_status"); } &&
3734 { ac_try='test -s "conftest$ac_exeext"'
3735 { (eval echo "$as_me:3735: \"$ac_try\"") >&5
3738 echo "$as_me:3738: \$? = $ac_status" >&5
3739 (exit "$ac_status"); }; }; then
3740 ac_cv_lib_bsd_strlcat=yes
3742 echo "$as_me: failed program was:" >&5
3743 cat "conftest.$ac_ext" >&5
3744 ac_cv_lib_bsd_strlcat=no
3746 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3747 LIBS=$ac_check_lib_save_LIBS
3749 echo "$as_me:3749: result: $ac_cv_lib_bsd_strlcat" >&5
3750 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
3751 if test "$ac_cv_lib_bsd_strlcat" = yes; then
3756 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
3758 for cf_add_1lib in $cf_add_0lib; do
3759 for cf_add_2lib in $cf_add_libs; do
3760 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
3765 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
3769 for ac_header in bsd/string.h
3771 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3772 echo "$as_me:3772: checking for $ac_header" >&5
3773 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3774 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3775 echo $ECHO_N "(cached) $ECHO_C" >&6
3777 cat >"conftest.$ac_ext" <<_ACEOF
3778 #line 3778 "configure"
3779 #include "confdefs.h"
3780 #include <$ac_header>
3782 if { (eval echo "$as_me:3782: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3783 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3785 $EGREP -v '^ *\+' conftest.er1 >conftest.err
3787 cat conftest.err >&5
3788 echo "$as_me:3788: \$? = $ac_status" >&5
3789 (exit "$ac_status"); } >/dev/null; then
3790 if test -s conftest.err; then
3791 ac_cpp_err=$ac_c_preproc_warn_flag
3798 if test -z "$ac_cpp_err"; then
3799 eval "$as_ac_Header=yes"
3801 echo "$as_me: failed program was:" >&5
3802 cat "conftest.$ac_ext" >&5
3803 eval "$as_ac_Header=no"
3805 rm -f conftest.err "conftest.$ac_ext"
3807 echo "$as_me:3807: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
3808 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
3809 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
3810 cat >>confdefs.h <<EOF
3811 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3817 cat >>confdefs.h <<\EOF
3818 #define HAVE_STRLCAT 1
3825 for ac_func in strlcpy snprintf
3827 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3828 echo "$as_me:3828: checking for $ac_func" >&5
3829 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3830 if eval "test \"\${$as_ac_var+set}\" = set"; then
3831 echo $ECHO_N "(cached) $ECHO_C" >&6
3833 cat >"conftest.$ac_ext" <<_ACEOF
3834 #line 3834 "configure"
3835 #include "confdefs.h"
3836 #define $ac_func autoconf_temporary
3837 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3844 /* We use char because int might match the return type of a gcc2
3845 builtin and then its argument prototype would still apply. */
3846 char $ac_func (void);
3852 /* The GNU C library defines stubs for functions which it implements
3853 to always fail with ENOSYS. Some functions are actually named
3854 something starting with __ and the normal name is an alias. */
3855 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3856 #error found stub for $ac_func
3864 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3865 if { (eval echo "$as_me:3865: \"$ac_link\"") >&5
3866 (eval $ac_link) 2>&5
3868 echo "$as_me:3868: \$? = $ac_status" >&5
3869 (exit "$ac_status"); } &&
3870 { ac_try='test -s "conftest$ac_exeext"'
3871 { (eval echo "$as_me:3871: \"$ac_try\"") >&5
3874 echo "$as_me:3874: \$? = $ac_status" >&5
3875 (exit "$ac_status"); }; }; then
3876 eval "$as_ac_var=yes"
3878 echo "$as_me: failed program was:" >&5
3879 cat "conftest.$ac_ext" >&5
3880 eval "$as_ac_var=no"
3882 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3884 echo "$as_me:3884: result: `eval echo '${'"$as_ac_var"'}'`" >&5
3885 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
3886 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
3887 cat >>confdefs.h <<EOF
3888 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3896 echo "$as_me:3896: checking if the POSIX test-macros are already defined" >&5
3897 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
3898 if test "${cf_cv_posix_visible+set}" = set; then
3899 echo $ECHO_N "(cached) $ECHO_C" >&6
3902 cat >"conftest.$ac_ext" <<_ACEOF
3903 #line 3903 "configure"
3904 #include "confdefs.h"
3910 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
3911 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
3912 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
3913 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
3914 #error conflicting symbols found
3921 rm -f "conftest.$ac_objext"
3922 if { (eval echo "$as_me:3922: \"$ac_compile\"") >&5
3923 (eval $ac_compile) 2>&5
3925 echo "$as_me:3925: \$? = $ac_status" >&5
3926 (exit "$ac_status"); } &&
3927 { ac_try='test -s "conftest.$ac_objext"'
3928 { (eval echo "$as_me:3928: \"$ac_try\"") >&5
3931 echo "$as_me:3931: \$? = $ac_status" >&5
3932 (exit "$ac_status"); }; }; then
3933 cf_cv_posix_visible=no
3935 echo "$as_me: failed program was:" >&5
3936 cat "conftest.$ac_ext" >&5
3937 cf_cv_posix_visible=yes
3939 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3942 echo "$as_me:3942: result: $cf_cv_posix_visible" >&5
3943 echo "${ECHO_T}$cf_cv_posix_visible" >&6
3945 if test "$cf_cv_posix_visible" = no; then
3948 cf_POSIX_C_SOURCE=199506L
3953 cf_xopen_source="-D_ALL_SOURCE"
3959 cf_xopen_source="-D_APPLE_C_SOURCE"
3962 cf_xopen_source="-D_DARWIN_C_SOURCE"
3965 (freebsd*|dragonfly*|midnightbsd*)
3966 # 5.x headers associate
3967 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3968 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3969 cf_POSIX_C_SOURCE=200112L
3971 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3974 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3977 cf_xopen_source="-D_HPUX_SOURCE"
3980 cf_xopen_source="-D_SGI_SOURCE"
3983 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3985 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3987 echo "$as_me:3987: checking if this is the GNU C library" >&5
3988 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3989 if test "${cf_cv_gnu_library+set}" = set; then
3990 echo $ECHO_N "(cached) $ECHO_C" >&6
3993 cat >"conftest.$ac_ext" <<_ACEOF
3994 #line 3994 "configure"
3995 #include "confdefs.h"
3996 #include <sys/types.h>
4001 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
4003 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
4006 # error not GNU C library
4012 rm -f "conftest.$ac_objext"
4013 if { (eval echo "$as_me:4013: \"$ac_compile\"") >&5
4014 (eval $ac_compile) 2>&5
4016 echo "$as_me:4016: \$? = $ac_status" >&5
4017 (exit "$ac_status"); } &&
4018 { ac_try='test -s "conftest.$ac_objext"'
4019 { (eval echo "$as_me:4019: \"$ac_try\"") >&5
4022 echo "$as_me:4022: \$? = $ac_status" >&5
4023 (exit "$ac_status"); }; }; then
4024 cf_cv_gnu_library=yes
4026 echo "$as_me: failed program was:" >&5
4027 cat "conftest.$ac_ext" >&5
4028 cf_cv_gnu_library=no
4030 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4033 echo "$as_me:4033: result: $cf_cv_gnu_library" >&5
4034 echo "${ECHO_T}$cf_cv_gnu_library" >&6
4036 if test x$cf_cv_gnu_library = xyes; then
4038 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
4039 # was changed to help a little. newlib incorporated the change about 4
4041 echo "$as_me:4041: checking if _DEFAULT_SOURCE can be used as a basis" >&5
4042 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
4043 if test "${cf_cv_gnu_library_219+set}" = set; then
4044 echo $ECHO_N "(cached) $ECHO_C" >&6
4049 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4050 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
4052 cat >"conftest.$ac_ext" <<_ACEOF
4053 #line 4053 "configure"
4054 #include "confdefs.h"
4055 #include <sys/types.h>
4060 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
4062 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
4065 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
4071 rm -f "conftest.$ac_objext"
4072 if { (eval echo "$as_me:4072: \"$ac_compile\"") >&5
4073 (eval $ac_compile) 2>&5
4075 echo "$as_me:4075: \$? = $ac_status" >&5
4076 (exit "$ac_status"); } &&
4077 { ac_try='test -s "conftest.$ac_objext"'
4078 { (eval echo "$as_me:4078: \"$ac_try\"") >&5
4081 echo "$as_me:4081: \$? = $ac_status" >&5
4082 (exit "$ac_status"); }; }; then
4083 cf_cv_gnu_library_219=yes
4085 echo "$as_me: failed program was:" >&5
4086 cat "conftest.$ac_ext" >&5
4087 cf_cv_gnu_library_219=no
4089 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4093 echo "$as_me:4093: result: $cf_cv_gnu_library_219" >&5
4094 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
4096 if test "x$cf_cv_gnu_library_219" = xyes; then
4098 echo "$as_me:4098: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
4099 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
4100 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
4101 echo $ECHO_N "(cached) $ECHO_C" >&6
4107 cf_new_extra_cppflags=
4109 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
4111 case "$cf_fix_cppflags" in
4113 case "$cf_add_cflags" in
4114 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4115 case "$cf_add_cflags" in
4117 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4119 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4120 && test -z "${cf_tst_cflags}" \
4121 && cf_fix_cppflags=yes
4123 if test "$cf_fix_cppflags" = yes ; then
4125 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4126 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4129 elif test "${cf_tst_cflags}" = "\"'" ; then
4131 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4132 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4142 case "$cf_add_cflags" in
4144 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4146 CPPFLAGS=`echo "$CPPFLAGS" | \
4147 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4148 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4153 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4154 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4161 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4162 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4169 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4170 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4172 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4174 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4175 && test -z "${cf_tst_cflags}" \
4176 && cf_fix_cppflags=no
4181 if test -n "$cf_new_cflags" ; then
4183 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4184 CFLAGS="${CFLAGS}$cf_new_cflags"
4188 if test -n "$cf_new_cppflags" ; then
4190 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4191 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4195 if test -n "$cf_new_extra_cppflags" ; then
4197 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4198 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4202 cat >"conftest.$ac_ext" <<_ACEOF
4203 #line 4203 "configure"
4204 #include "confdefs.h"
4207 #include <sys/types.h>
4213 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
4216 # error GNU C library is too old
4222 rm -f "conftest.$ac_objext"
4223 if { (eval echo "$as_me:4223: \"$ac_compile\"") >&5
4224 (eval $ac_compile) 2>&5
4226 echo "$as_me:4226: \$? = $ac_status" >&5
4227 (exit "$ac_status"); } &&
4228 { ac_try='test -s "conftest.$ac_objext"'
4229 { (eval echo "$as_me:4229: \"$ac_try\"") >&5
4232 echo "$as_me:4232: \$? = $ac_status" >&5
4233 (exit "$ac_status"); }; }; then
4234 cf_cv_gnu_dftsrc_219=yes
4236 echo "$as_me: failed program was:" >&5
4237 cat "conftest.$ac_ext" >&5
4238 cf_cv_gnu_dftsrc_219=no
4240 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4243 echo "$as_me:4243: result: $cf_cv_gnu_dftsrc_219" >&5
4244 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
4245 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
4247 cf_cv_gnu_dftsrc_219=maybe
4250 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
4252 echo "$as_me:4252: checking if we must define _GNU_SOURCE" >&5
4253 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
4254 if test "${cf_cv_gnu_source+set}" = set; then
4255 echo $ECHO_N "(cached) $ECHO_C" >&6
4258 cat >"conftest.$ac_ext" <<_ACEOF
4259 #line 4259 "configure"
4260 #include "confdefs.h"
4261 #include <sys/types.h>
4266 #ifndef _XOPEN_SOURCE
4267 #error expected _XOPEN_SOURCE to be defined
4273 rm -f "conftest.$ac_objext"
4274 if { (eval echo "$as_me:4274: \"$ac_compile\"") >&5
4275 (eval $ac_compile) 2>&5
4277 echo "$as_me:4277: \$? = $ac_status" >&5
4278 (exit "$ac_status"); } &&
4279 { ac_try='test -s "conftest.$ac_objext"'
4280 { (eval echo "$as_me:4280: \"$ac_try\"") >&5
4283 echo "$as_me:4283: \$? = $ac_status" >&5
4284 (exit "$ac_status"); }; }; then
4287 echo "$as_me: failed program was:" >&5
4288 cat "conftest.$ac_ext" >&5
4294 cf_new_extra_cppflags=
4296 for cf_add_cflags in -D_GNU_SOURCE
4298 case "$cf_fix_cppflags" in
4300 case "$cf_add_cflags" in
4301 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4302 case "$cf_add_cflags" in
4304 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4306 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4307 && test -z "${cf_tst_cflags}" \
4308 && cf_fix_cppflags=yes
4310 if test "$cf_fix_cppflags" = yes ; then
4312 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4313 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4316 elif test "${cf_tst_cflags}" = "\"'" ; then
4318 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4319 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4329 case "$cf_add_cflags" in
4331 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4333 CPPFLAGS=`echo "$CPPFLAGS" | \
4334 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4335 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4340 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4341 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4348 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4349 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4356 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4357 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4359 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4361 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4362 && test -z "${cf_tst_cflags}" \
4363 && cf_fix_cppflags=no
4368 if test -n "$cf_new_cflags" ; then
4370 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4371 CFLAGS="${CFLAGS}$cf_new_cflags"
4375 if test -n "$cf_new_cppflags" ; then
4377 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4378 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4382 if test -n "$cf_new_extra_cppflags" ; then
4384 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4385 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4389 cat >"conftest.$ac_ext" <<_ACEOF
4390 #line 4390 "configure"
4391 #include "confdefs.h"
4392 #include <sys/types.h>
4397 #ifdef _XOPEN_SOURCE
4398 #error expected _XOPEN_SOURCE to be undefined
4404 rm -f "conftest.$ac_objext"
4405 if { (eval echo "$as_me:4405: \"$ac_compile\"") >&5
4406 (eval $ac_compile) 2>&5
4408 echo "$as_me:4408: \$? = $ac_status" >&5
4409 (exit "$ac_status"); } &&
4410 { ac_try='test -s "conftest.$ac_objext"'
4411 { (eval echo "$as_me:4411: \"$ac_try\"") >&5
4414 echo "$as_me:4414: \$? = $ac_status" >&5
4415 (exit "$ac_status"); }; }; then
4418 echo "$as_me: failed program was:" >&5
4419 cat "conftest.$ac_ext" >&5
4420 cf_cv_gnu_source=yes
4422 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4426 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4429 echo "$as_me:4429: result: $cf_cv_gnu_source" >&5
4430 echo "${ECHO_T}$cf_cv_gnu_source" >&6
4432 if test "$cf_cv_gnu_source" = yes
4434 echo "$as_me:4434: checking if we should also define _DEFAULT_SOURCE" >&5
4435 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
4436 if test "${cf_cv_default_source+set}" = set; then
4437 echo $ECHO_N "(cached) $ECHO_C" >&6
4440 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4441 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
4443 cat >"conftest.$ac_ext" <<_ACEOF
4444 #line 4444 "configure"
4445 #include "confdefs.h"
4446 #include <sys/types.h>
4451 #ifdef _DEFAULT_SOURCE
4452 #error expected _DEFAULT_SOURCE to be undefined
4458 rm -f "conftest.$ac_objext"
4459 if { (eval echo "$as_me:4459: \"$ac_compile\"") >&5
4460 (eval $ac_compile) 2>&5
4462 echo "$as_me:4462: \$? = $ac_status" >&5
4463 (exit "$ac_status"); } &&
4464 { ac_try='test -s "conftest.$ac_objext"'
4465 { (eval echo "$as_me:4465: \"$ac_try\"") >&5
4468 echo "$as_me:4468: \$? = $ac_status" >&5
4469 (exit "$ac_status"); }; }; then
4470 cf_cv_default_source=no
4472 echo "$as_me: failed program was:" >&5
4473 cat "conftest.$ac_ext" >&5
4474 cf_cv_default_source=yes
4476 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4479 echo "$as_me:4479: result: $cf_cv_default_source" >&5
4480 echo "${ECHO_T}$cf_cv_default_source" >&6
4481 if test "$cf_cv_default_source" = yes
4484 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4485 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
4495 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
4498 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
4501 if test "$cf_cv_posix_visible" = no; then
4503 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4505 cf_save_CFLAGS="$CFLAGS"
4506 cf_save_CPPFLAGS="$CPPFLAGS"
4508 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4509 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4510 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4512 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4513 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4514 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4516 echo "$as_me:4516: checking if we should define _POSIX_C_SOURCE" >&5
4517 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4518 if test "${cf_cv_posix_c_source+set}" = set; then
4519 echo $ECHO_N "(cached) $ECHO_C" >&6
4522 echo "${as_me:-configure}:4522: testing if the symbol is already defined go no further ..." 1>&5
4524 cat >"conftest.$ac_ext" <<_ACEOF
4525 #line 4525 "configure"
4526 #include "confdefs.h"
4527 #include <sys/types.h>
4532 #ifndef _POSIX_C_SOURCE
4539 rm -f "conftest.$ac_objext"
4540 if { (eval echo "$as_me:4540: \"$ac_compile\"") >&5
4541 (eval $ac_compile) 2>&5
4543 echo "$as_me:4543: \$? = $ac_status" >&5
4544 (exit "$ac_status"); } &&
4545 { ac_try='test -s "conftest.$ac_objext"'
4546 { (eval echo "$as_me:4546: \"$ac_try\"") >&5
4549 echo "$as_me:4549: \$? = $ac_status" >&5
4550 (exit "$ac_status"); }; }; then
4551 cf_cv_posix_c_source=no
4553 echo "$as_me: failed program was:" >&5
4554 cat "conftest.$ac_ext" >&5
4555 cf_want_posix_source=no
4556 case .$cf_POSIX_C_SOURCE in
4558 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4561 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4562 cf_want_posix_source=yes
4565 cf_want_posix_source=yes
4568 if test "$cf_want_posix_source" = yes ; then
4569 cat >"conftest.$ac_ext" <<_ACEOF
4570 #line 4570 "configure"
4571 #include "confdefs.h"
4572 #include <sys/types.h>
4577 #ifdef _POSIX_SOURCE
4584 rm -f "conftest.$ac_objext"
4585 if { (eval echo "$as_me:4585: \"$ac_compile\"") >&5
4586 (eval $ac_compile) 2>&5
4588 echo "$as_me:4588: \$? = $ac_status" >&5
4589 (exit "$ac_status"); } &&
4590 { ac_try='test -s "conftest.$ac_objext"'
4591 { (eval echo "$as_me:4591: \"$ac_try\"") >&5
4594 echo "$as_me:4594: \$? = $ac_status" >&5
4595 (exit "$ac_status"); }; }; then
4598 echo "$as_me: failed program was:" >&5
4599 cat "conftest.$ac_ext" >&5
4600 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4602 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4605 echo "${as_me:-configure}:4605: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4607 CFLAGS="$cf_trim_CFLAGS"
4608 CPPFLAGS="$cf_trim_CPPFLAGS"
4610 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4611 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4613 echo "${as_me:-configure}:4613: testing if the second compile does not leave our definition intact error ..." 1>&5
4615 cat >"conftest.$ac_ext" <<_ACEOF
4616 #line 4616 "configure"
4617 #include "confdefs.h"
4618 #include <sys/types.h>
4623 #ifndef _POSIX_C_SOURCE
4630 rm -f "conftest.$ac_objext"
4631 if { (eval echo "$as_me:4631: \"$ac_compile\"") >&5
4632 (eval $ac_compile) 2>&5
4634 echo "$as_me:4634: \$? = $ac_status" >&5
4635 (exit "$ac_status"); } &&
4636 { ac_try='test -s "conftest.$ac_objext"'
4637 { (eval echo "$as_me:4637: \"$ac_try\"") >&5
4640 echo "$as_me:4640: \$? = $ac_status" >&5
4641 (exit "$ac_status"); }; }; then
4644 echo "$as_me: failed program was:" >&5
4645 cat "conftest.$ac_ext" >&5
4646 cf_cv_posix_c_source=no
4648 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4649 CFLAGS="$cf_save_CFLAGS"
4650 CPPFLAGS="$cf_save_CPPFLAGS"
4653 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4656 echo "$as_me:4656: result: $cf_cv_posix_c_source" >&5
4657 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4659 if test "$cf_cv_posix_c_source" != no ; then
4660 CFLAGS="$cf_trim_CFLAGS"
4661 CPPFLAGS="$cf_trim_CPPFLAGS"
4666 cf_new_extra_cppflags=
4668 for cf_add_cflags in $cf_cv_posix_c_source
4670 case "$cf_fix_cppflags" in
4672 case "$cf_add_cflags" in
4673 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4674 case "$cf_add_cflags" in
4676 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4678 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4679 && test -z "${cf_tst_cflags}" \
4680 && cf_fix_cppflags=yes
4682 if test "$cf_fix_cppflags" = yes ; then
4684 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4685 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4688 elif test "${cf_tst_cflags}" = "\"'" ; then
4690 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4691 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4701 case "$cf_add_cflags" in
4703 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4705 CPPFLAGS=`echo "$CPPFLAGS" | \
4706 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4707 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4712 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4713 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4720 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4721 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4728 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4729 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4731 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4733 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4734 && test -z "${cf_tst_cflags}" \
4735 && cf_fix_cppflags=no
4740 if test -n "$cf_new_cflags" ; then
4742 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4743 CFLAGS="${CFLAGS}$cf_new_cflags"
4747 if test -n "$cf_new_cppflags" ; then
4749 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4750 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4754 if test -n "$cf_new_extra_cppflags" ; then
4756 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4757 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4763 fi # cf_cv_posix_visible
4767 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4770 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
4771 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
4772 # Abusing the conformance level is a workaround.
4773 { echo "$as_me:4773: WARNING: this system does not provide usable locale support" >&5
4774 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
4775 cf_xopen_source="-D_BSD_SOURCE"
4779 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
4780 cf_xopen_source="-D_BSD_SOURCE"
4784 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
4787 cf_xopen_source="-D_OSF_SOURCE"
4790 cf_xopen_source="-D_QNX_SOURCE"
4793 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
4796 cf_xopen_source="-D__EXTENSIONS__"
4797 cf_cv_xopen_source=broken
4799 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
4805 echo "$as_me:4805: checking if we should define _XOPEN_SOURCE" >&5
4806 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4807 if test "${cf_cv_xopen_source+set}" = set; then
4808 echo $ECHO_N "(cached) $ECHO_C" >&6
4811 cat >"conftest.$ac_ext" <<_ACEOF
4812 #line 4812 "configure"
4813 #include "confdefs.h"
4817 #include <sys/types.h>
4823 #ifndef _XOPEN_SOURCE
4830 rm -f "conftest.$ac_objext"
4831 if { (eval echo "$as_me:4831: \"$ac_compile\"") >&5
4832 (eval $ac_compile) 2>&5
4834 echo "$as_me:4834: \$? = $ac_status" >&5
4835 (exit "$ac_status"); } &&
4836 { ac_try='test -s "conftest.$ac_objext"'
4837 { (eval echo "$as_me:4837: \"$ac_try\"") >&5
4840 echo "$as_me:4840: \$? = $ac_status" >&5
4841 (exit "$ac_status"); }; }; then
4842 cf_cv_xopen_source=no
4844 echo "$as_me: failed program was:" >&5
4845 cat "conftest.$ac_ext" >&5
4848 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4849 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4851 cat >"conftest.$ac_ext" <<_ACEOF
4852 #line 4852 "configure"
4853 #include "confdefs.h"
4857 #include <sys/types.h>
4863 #ifdef _XOPEN_SOURCE
4870 rm -f "conftest.$ac_objext"
4871 if { (eval echo "$as_me:4871: \"$ac_compile\"") >&5
4872 (eval $ac_compile) 2>&5
4874 echo "$as_me:4874: \$? = $ac_status" >&5
4875 (exit "$ac_status"); } &&
4876 { ac_try='test -s "conftest.$ac_objext"'
4877 { (eval echo "$as_me:4877: \"$ac_try\"") >&5
4880 echo "$as_me:4880: \$? = $ac_status" >&5
4881 (exit "$ac_status"); }; }; then
4882 cf_cv_xopen_source=no
4884 echo "$as_me: failed program was:" >&5
4885 cat "conftest.$ac_ext" >&5
4886 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4888 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4892 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4895 echo "$as_me:4895: result: $cf_cv_xopen_source" >&5
4896 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4898 if test "$cf_cv_xopen_source" != no ; then
4900 CFLAGS=`echo "$CFLAGS" | \
4901 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4902 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4904 CPPFLAGS=`echo "$CPPFLAGS" | \
4905 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4906 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4908 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4913 cf_new_extra_cppflags=
4915 for cf_add_cflags in $cf_temp_xopen_source
4917 case "$cf_fix_cppflags" in
4919 case "$cf_add_cflags" in
4920 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4921 case "$cf_add_cflags" in
4923 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4925 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4926 && test -z "${cf_tst_cflags}" \
4927 && cf_fix_cppflags=yes
4929 if test "$cf_fix_cppflags" = yes ; then
4931 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4932 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4935 elif test "${cf_tst_cflags}" = "\"'" ; then
4937 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4938 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4948 case "$cf_add_cflags" in
4950 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4952 CPPFLAGS=`echo "$CPPFLAGS" | \
4953 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4954 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4959 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4960 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4967 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4968 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4975 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4976 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4978 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4980 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4981 && test -z "${cf_tst_cflags}" \
4982 && cf_fix_cppflags=no
4987 if test -n "$cf_new_cflags" ; then
4989 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4990 CFLAGS="${CFLAGS}$cf_new_cflags"
4994 if test -n "$cf_new_cppflags" ; then
4996 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4997 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5001 if test -n "$cf_new_extra_cppflags" ; then
5003 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5004 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5010 if test "$cf_cv_posix_visible" = no; then
5012 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
5014 cf_save_CFLAGS="$CFLAGS"
5015 cf_save_CPPFLAGS="$CPPFLAGS"
5017 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
5018 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5019 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
5021 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
5022 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5023 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
5025 echo "$as_me:5025: checking if we should define _POSIX_C_SOURCE" >&5
5026 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
5027 if test "${cf_cv_posix_c_source+set}" = set; then
5028 echo $ECHO_N "(cached) $ECHO_C" >&6
5031 echo "${as_me:-configure}:5031: testing if the symbol is already defined go no further ..." 1>&5
5033 cat >"conftest.$ac_ext" <<_ACEOF
5034 #line 5034 "configure"
5035 #include "confdefs.h"
5036 #include <sys/types.h>
5041 #ifndef _POSIX_C_SOURCE
5048 rm -f "conftest.$ac_objext"
5049 if { (eval echo "$as_me:5049: \"$ac_compile\"") >&5
5050 (eval $ac_compile) 2>&5
5052 echo "$as_me:5052: \$? = $ac_status" >&5
5053 (exit "$ac_status"); } &&
5054 { ac_try='test -s "conftest.$ac_objext"'
5055 { (eval echo "$as_me:5055: \"$ac_try\"") >&5
5058 echo "$as_me:5058: \$? = $ac_status" >&5
5059 (exit "$ac_status"); }; }; then
5060 cf_cv_posix_c_source=no
5062 echo "$as_me: failed program was:" >&5
5063 cat "conftest.$ac_ext" >&5
5064 cf_want_posix_source=no
5065 case .$cf_POSIX_C_SOURCE in
5067 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
5070 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
5071 cf_want_posix_source=yes
5074 cf_want_posix_source=yes
5077 if test "$cf_want_posix_source" = yes ; then
5078 cat >"conftest.$ac_ext" <<_ACEOF
5079 #line 5079 "configure"
5080 #include "confdefs.h"
5081 #include <sys/types.h>
5086 #ifdef _POSIX_SOURCE
5093 rm -f "conftest.$ac_objext"
5094 if { (eval echo "$as_me:5094: \"$ac_compile\"") >&5
5095 (eval $ac_compile) 2>&5
5097 echo "$as_me:5097: \$? = $ac_status" >&5
5098 (exit "$ac_status"); } &&
5099 { ac_try='test -s "conftest.$ac_objext"'
5100 { (eval echo "$as_me:5100: \"$ac_try\"") >&5
5103 echo "$as_me:5103: \$? = $ac_status" >&5
5104 (exit "$ac_status"); }; }; then
5107 echo "$as_me: failed program was:" >&5
5108 cat "conftest.$ac_ext" >&5
5109 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
5111 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5114 echo "${as_me:-configure}:5114: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
5116 CFLAGS="$cf_trim_CFLAGS"
5117 CPPFLAGS="$cf_trim_CPPFLAGS"
5119 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5120 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
5122 echo "${as_me:-configure}:5122: testing if the second compile does not leave our definition intact error ..." 1>&5
5124 cat >"conftest.$ac_ext" <<_ACEOF
5125 #line 5125 "configure"
5126 #include "confdefs.h"
5127 #include <sys/types.h>
5132 #ifndef _POSIX_C_SOURCE
5139 rm -f "conftest.$ac_objext"
5140 if { (eval echo "$as_me:5140: \"$ac_compile\"") >&5
5141 (eval $ac_compile) 2>&5
5143 echo "$as_me:5143: \$? = $ac_status" >&5
5144 (exit "$ac_status"); } &&
5145 { ac_try='test -s "conftest.$ac_objext"'
5146 { (eval echo "$as_me:5146: \"$ac_try\"") >&5
5149 echo "$as_me:5149: \$? = $ac_status" >&5
5150 (exit "$ac_status"); }; }; then
5153 echo "$as_me: failed program was:" >&5
5154 cat "conftest.$ac_ext" >&5
5155 cf_cv_posix_c_source=no
5157 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5158 CFLAGS="$cf_save_CFLAGS"
5159 CPPFLAGS="$cf_save_CPPFLAGS"
5162 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5165 echo "$as_me:5165: result: $cf_cv_posix_c_source" >&5
5166 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
5168 if test "$cf_cv_posix_c_source" != no ; then
5169 CFLAGS="$cf_trim_CFLAGS"
5170 CPPFLAGS="$cf_trim_CPPFLAGS"
5175 cf_new_extra_cppflags=
5177 for cf_add_cflags in $cf_cv_posix_c_source
5179 case "$cf_fix_cppflags" in
5181 case "$cf_add_cflags" in
5182 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5183 case "$cf_add_cflags" in
5185 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5187 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5188 && test -z "${cf_tst_cflags}" \
5189 && cf_fix_cppflags=yes
5191 if test "$cf_fix_cppflags" = yes ; then
5193 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5194 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5197 elif test "${cf_tst_cflags}" = "\"'" ; then
5199 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5200 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5210 case "$cf_add_cflags" in
5212 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5214 CPPFLAGS=`echo "$CPPFLAGS" | \
5215 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5216 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5221 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5222 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5229 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5230 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5237 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5238 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5240 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5242 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5243 && test -z "${cf_tst_cflags}" \
5244 && cf_fix_cppflags=no
5249 if test -n "$cf_new_cflags" ; then
5251 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5252 CFLAGS="${CFLAGS}$cf_new_cflags"
5256 if test -n "$cf_new_cppflags" ; then
5258 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5259 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5263 if test -n "$cf_new_extra_cppflags" ; then
5265 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5266 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5272 fi # cf_cv_posix_visible
5277 if test -n "$cf_xopen_source" ; then
5282 cf_new_extra_cppflags=
5284 for cf_add_cflags in $cf_xopen_source
5286 case "$cf_fix_cppflags" in
5288 case "$cf_add_cflags" in
5289 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5290 case "$cf_add_cflags" in
5292 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5294 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5295 && test -z "${cf_tst_cflags}" \
5296 && cf_fix_cppflags=yes
5298 if test "$cf_fix_cppflags" = yes ; then
5300 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5301 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5304 elif test "${cf_tst_cflags}" = "\"'" ; then
5306 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5307 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5317 case "$cf_add_cflags" in
5319 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5321 CPPFLAGS=`echo "$CPPFLAGS" | \
5322 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5323 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5328 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5329 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5336 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5337 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5344 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5345 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5347 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5349 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5350 && test -z "${cf_tst_cflags}" \
5351 && cf_fix_cppflags=no
5356 if test -n "$cf_new_cflags" ; then
5357 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
5359 echo "${as_me:-configure}:5359: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
5361 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5362 CFLAGS="${CFLAGS}$cf_new_cflags"
5366 if test -n "$cf_new_cppflags" ; then
5367 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
5369 echo "${as_me:-configure}:5369: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
5371 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5372 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5376 if test -n "$cf_new_extra_cppflags" ; then
5377 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
5379 echo "${as_me:-configure}:5379: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
5381 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5382 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5388 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
5389 echo "$as_me:5389: checking if _XOPEN_SOURCE really is set" >&5
5390 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
5391 cat >"conftest.$ac_ext" <<_ACEOF
5392 #line 5392 "configure"
5393 #include "confdefs.h"
5399 #ifndef _XOPEN_SOURCE
5406 rm -f "conftest.$ac_objext"
5407 if { (eval echo "$as_me:5407: \"$ac_compile\"") >&5
5408 (eval $ac_compile) 2>&5
5410 echo "$as_me:5410: \$? = $ac_status" >&5
5411 (exit "$ac_status"); } &&
5412 { ac_try='test -s "conftest.$ac_objext"'
5413 { (eval echo "$as_me:5413: \"$ac_try\"") >&5
5416 echo "$as_me:5416: \$? = $ac_status" >&5
5417 (exit "$ac_status"); }; }; then
5418 cf_XOPEN_SOURCE_set=yes
5420 echo "$as_me: failed program was:" >&5
5421 cat "conftest.$ac_ext" >&5
5422 cf_XOPEN_SOURCE_set=no
5424 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5425 echo "$as_me:5425: result: $cf_XOPEN_SOURCE_set" >&5
5426 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
5427 if test "$cf_XOPEN_SOURCE_set" = yes
5429 cat >"conftest.$ac_ext" <<_ACEOF
5430 #line 5430 "configure"
5431 #include "confdefs.h"
5437 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
5444 rm -f "conftest.$ac_objext"
5445 if { (eval echo "$as_me:5445: \"$ac_compile\"") >&5
5446 (eval $ac_compile) 2>&5
5448 echo "$as_me:5448: \$? = $ac_status" >&5
5449 (exit "$ac_status"); } &&
5450 { ac_try='test -s "conftest.$ac_objext"'
5451 { (eval echo "$as_me:5451: \"$ac_try\"") >&5
5454 echo "$as_me:5454: \$? = $ac_status" >&5
5455 (exit "$ac_status"); }; }; then
5456 cf_XOPEN_SOURCE_set_ok=yes
5458 echo "$as_me: failed program was:" >&5
5459 cat "conftest.$ac_ext" >&5
5460 cf_XOPEN_SOURCE_set_ok=no
5462 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5463 if test "$cf_XOPEN_SOURCE_set_ok" = no
5465 { echo "$as_me:5465: WARNING: _XOPEN_SOURCE is lower than requested" >&5
5466 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
5470 echo "$as_me:5470: checking if we should define _XOPEN_SOURCE" >&5
5471 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
5472 if test "${cf_cv_xopen_source+set}" = set; then
5473 echo $ECHO_N "(cached) $ECHO_C" >&6
5476 cat >"conftest.$ac_ext" <<_ACEOF
5477 #line 5477 "configure"
5478 #include "confdefs.h"
5482 #include <sys/types.h>
5488 #ifndef _XOPEN_SOURCE
5495 rm -f "conftest.$ac_objext"
5496 if { (eval echo "$as_me:5496: \"$ac_compile\"") >&5
5497 (eval $ac_compile) 2>&5
5499 echo "$as_me:5499: \$? = $ac_status" >&5
5500 (exit "$ac_status"); } &&
5501 { ac_try='test -s "conftest.$ac_objext"'
5502 { (eval echo "$as_me:5502: \"$ac_try\"") >&5
5505 echo "$as_me:5505: \$? = $ac_status" >&5
5506 (exit "$ac_status"); }; }; then
5507 cf_cv_xopen_source=no
5509 echo "$as_me: failed program was:" >&5
5510 cat "conftest.$ac_ext" >&5
5513 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5514 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
5516 cat >"conftest.$ac_ext" <<_ACEOF
5517 #line 5517 "configure"
5518 #include "confdefs.h"
5522 #include <sys/types.h>
5528 #ifdef _XOPEN_SOURCE
5535 rm -f "conftest.$ac_objext"
5536 if { (eval echo "$as_me:5536: \"$ac_compile\"") >&5
5537 (eval $ac_compile) 2>&5
5539 echo "$as_me:5539: \$? = $ac_status" >&5
5540 (exit "$ac_status"); } &&
5541 { ac_try='test -s "conftest.$ac_objext"'
5542 { (eval echo "$as_me:5542: \"$ac_try\"") >&5
5545 echo "$as_me:5545: \$? = $ac_status" >&5
5546 (exit "$ac_status"); }; }; then
5547 cf_cv_xopen_source=no
5549 echo "$as_me: failed program was:" >&5
5550 cat "conftest.$ac_ext" >&5
5551 cf_cv_xopen_source=$cf_XOPEN_SOURCE
5553 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5557 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5560 echo "$as_me:5560: result: $cf_cv_xopen_source" >&5
5561 echo "${ECHO_T}$cf_cv_xopen_source" >&6
5563 if test "$cf_cv_xopen_source" != no ; then
5565 CFLAGS=`echo "$CFLAGS" | \
5566 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5567 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5569 CPPFLAGS=`echo "$CPPFLAGS" | \
5570 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5571 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5573 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
5578 cf_new_extra_cppflags=
5580 for cf_add_cflags in $cf_temp_xopen_source
5582 case "$cf_fix_cppflags" in
5584 case "$cf_add_cflags" in
5585 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5586 case "$cf_add_cflags" in
5588 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5590 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5591 && test -z "${cf_tst_cflags}" \
5592 && cf_fix_cppflags=yes
5594 if test "$cf_fix_cppflags" = yes ; then
5596 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5597 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5600 elif test "${cf_tst_cflags}" = "\"'" ; then
5602 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5603 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5613 case "$cf_add_cflags" in
5615 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5617 CPPFLAGS=`echo "$CPPFLAGS" | \
5618 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5619 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5624 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5625 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5632 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5633 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5640 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5641 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5643 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5645 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5646 && test -z "${cf_tst_cflags}" \
5647 && cf_fix_cppflags=no
5652 if test -n "$cf_new_cflags" ; then
5654 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5655 CFLAGS="${CFLAGS}$cf_new_cflags"
5659 if test -n "$cf_new_cppflags" ; then
5661 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5662 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5666 if test -n "$cf_new_extra_cppflags" ; then
5668 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5669 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5677 fi # cf_cv_posix_visible
5679 echo "$as_me:5679: checking for signal global datatype" >&5
5680 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
5681 if test "${cf_cv_sig_atomic_t+set}" = set; then
5682 echo $ECHO_N "(cached) $ECHO_C" >&6
5686 "volatile sig_atomic_t" \
5690 cat >"conftest.$ac_ext" <<_ACEOF
5691 #line 5691 "configure"
5692 #include "confdefs.h"
5694 #include <sys/types.h>
5700 static void handler(int sig)
5708 signal(SIGINT, handler);
5714 rm -f "conftest.$ac_objext"
5715 if { (eval echo "$as_me:5715: \"$ac_compile\"") >&5
5716 (eval $ac_compile) 2>&5
5718 echo "$as_me:5718: \$? = $ac_status" >&5
5719 (exit "$ac_status"); } &&
5720 { ac_try='test -s "conftest.$ac_objext"'
5721 { (eval echo "$as_me:5721: \"$ac_try\"") >&5
5724 echo "$as_me:5724: \$? = $ac_status" >&5
5725 (exit "$ac_status"); }; }; then
5726 cf_cv_sig_atomic_t=$cf_type
5728 echo "$as_me: failed program was:" >&5
5729 cat "conftest.$ac_ext" >&5
5730 cf_cv_sig_atomic_t=no
5732 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5733 test "$cf_cv_sig_atomic_t" != no && break
5738 echo "$as_me:5738: result: $cf_cv_sig_atomic_t" >&5
5739 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
5740 test "$cf_cv_sig_atomic_t" != no &&
5741 cat >>confdefs.h <<EOF
5742 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
5745 # Work around breakage on OS X
5747 echo "$as_me:5747: checking if SIGWINCH is defined" >&5
5748 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
5749 if test "${cf_cv_define_sigwinch+set}" = set; then
5750 echo $ECHO_N "(cached) $ECHO_C" >&6
5753 cat >"conftest.$ac_ext" <<_ACEOF
5754 #line 5754 "configure"
5755 #include "confdefs.h"
5757 #include <sys/types.h>
5758 #include <sys/signal.h>
5763 int x = SIGWINCH; (void)x
5768 rm -f "conftest.$ac_objext"
5769 if { (eval echo "$as_me:5769: \"$ac_compile\"") >&5
5770 (eval $ac_compile) 2>&5
5772 echo "$as_me:5772: \$? = $ac_status" >&5
5773 (exit "$ac_status"); } &&
5774 { ac_try='test -s "conftest.$ac_objext"'
5775 { (eval echo "$as_me:5775: \"$ac_try\"") >&5
5778 echo "$as_me:5778: \$? = $ac_status" >&5
5779 (exit "$ac_status"); }; }; then
5780 cf_cv_define_sigwinch=yes
5782 echo "$as_me: failed program was:" >&5
5783 cat "conftest.$ac_ext" >&5
5784 cat >"conftest.$ac_ext" <<_ACEOF
5785 #line 5785 "configure"
5786 #include "confdefs.h"
5788 #undef _XOPEN_SOURCE
5789 #undef _POSIX_SOURCE
5790 #undef _POSIX_C_SOURCE
5791 #include <sys/types.h>
5792 #include <sys/signal.h>
5797 int x = SIGWINCH; (void)x
5802 rm -f "conftest.$ac_objext"
5803 if { (eval echo "$as_me:5803: \"$ac_compile\"") >&5
5804 (eval $ac_compile) 2>&5
5806 echo "$as_me:5806: \$? = $ac_status" >&5
5807 (exit "$ac_status"); } &&
5808 { ac_try='test -s "conftest.$ac_objext"'
5809 { (eval echo "$as_me:5809: \"$ac_try\"") >&5
5812 echo "$as_me:5812: \$? = $ac_status" >&5
5813 (exit "$ac_status"); }; }; then
5814 cf_cv_define_sigwinch=maybe
5816 echo "$as_me: failed program was:" >&5
5817 cat "conftest.$ac_ext" >&5
5818 cf_cv_define_sigwinch=no
5820 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5823 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5826 echo "$as_me:5826: result: $cf_cv_define_sigwinch" >&5
5827 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
5829 if test "$cf_cv_define_sigwinch" = maybe ; then
5830 echo "$as_me:5830: checking for actual SIGWINCH definition" >&5
5831 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
5832 if test "${cf_cv_fixup_sigwinch+set}" = set; then
5833 echo $ECHO_N "(cached) $ECHO_C" >&6
5836 cf_cv_fixup_sigwinch=unknown
5838 while test "$cf_sigwinch" != 1
5840 cat >"conftest.$ac_ext" <<_ACEOF
5841 #line 5841 "configure"
5842 #include "confdefs.h"
5844 #undef _XOPEN_SOURCE
5845 #undef _POSIX_SOURCE
5846 #undef _POSIX_C_SOURCE
5847 #include <sys/types.h>
5848 #include <sys/signal.h>
5854 #if SIGWINCH != $cf_sigwinch
5857 int x = SIGWINCH; (void)x
5862 rm -f "conftest.$ac_objext"
5863 if { (eval echo "$as_me:5863: \"$ac_compile\"") >&5
5864 (eval $ac_compile) 2>&5
5866 echo "$as_me:5866: \$? = $ac_status" >&5
5867 (exit "$ac_status"); } &&
5868 { ac_try='test -s "conftest.$ac_objext"'
5869 { (eval echo "$as_me:5869: \"$ac_try\"") >&5
5872 echo "$as_me:5872: \$? = $ac_status" >&5
5873 (exit "$ac_status"); }; }; then
5874 cf_cv_fixup_sigwinch=$cf_sigwinch
5877 echo "$as_me: failed program was:" >&5
5878 cat "conftest.$ac_ext" >&5
5880 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5882 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
5886 echo "$as_me:5886: result: $cf_cv_fixup_sigwinch" >&5
5887 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
5889 if test "$cf_cv_fixup_sigwinch" != unknown ; then
5890 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
5894 # Checks for CODESET support.
5896 echo "$as_me:5896: checking for nl_langinfo and CODESET" >&5
5897 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
5898 if test "${am_cv_langinfo_codeset+set}" = set; then
5899 echo $ECHO_N "(cached) $ECHO_C" >&6
5901 cat >"conftest.$ac_ext" <<_ACEOF
5902 #line 5902 "configure"
5903 #include "confdefs.h"
5904 #include <langinfo.h>
5908 char* cs = nl_langinfo(CODESET); (void)cs
5913 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5914 if { (eval echo "$as_me:5914: \"$ac_link\"") >&5
5915 (eval $ac_link) 2>&5
5917 echo "$as_me:5917: \$? = $ac_status" >&5
5918 (exit "$ac_status"); } &&
5919 { ac_try='test -s "conftest$ac_exeext"'
5920 { (eval echo "$as_me:5920: \"$ac_try\"") >&5
5923 echo "$as_me:5923: \$? = $ac_status" >&5
5924 (exit "$ac_status"); }; }; then
5925 am_cv_langinfo_codeset=yes
5927 echo "$as_me: failed program was:" >&5
5928 cat "conftest.$ac_ext" >&5
5929 am_cv_langinfo_codeset=no
5931 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5934 echo "$as_me:5934: result: $am_cv_langinfo_codeset" >&5
5935 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
5936 if test "$am_cv_langinfo_codeset" = yes; then
5938 cat >>confdefs.h <<\EOF
5939 #define HAVE_LANGINFO_CODESET 1
5944 echo "$as_me:5944: checking if you want to use pkg-config" >&5
5945 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
5947 # Check whether --with-pkg-config or --without-pkg-config was given.
5948 if test "${with_pkg_config+set}" = set; then
5949 withval="$with_pkg_config"
5950 cf_pkg_config=$withval
5954 echo "$as_me:5954: result: $cf_pkg_config" >&5
5955 echo "${ECHO_T}$cf_pkg_config" >&6
5957 case "$cf_pkg_config" in
5963 if test -n "$ac_tool_prefix"; then
5964 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5965 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5966 echo "$as_me:5966: checking for $ac_word" >&5
5967 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5968 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
5969 echo $ECHO_N "(cached) $ECHO_C" >&6
5973 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5976 ac_save_IFS=$IFS; IFS=$ac_path_separator
5978 for ac_dir in $ac_dummy; do
5980 test -z "$ac_dir" && ac_dir=.
5981 if $as_executable_p "$ac_dir/$ac_word"; then
5982 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
5983 echo "$as_me:5983: found $ac_dir/$ac_word" >&5
5991 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5993 if test -n "$PKG_CONFIG"; then
5994 echo "$as_me:5994: result: $PKG_CONFIG" >&5
5995 echo "${ECHO_T}$PKG_CONFIG" >&6
5997 echo "$as_me:5997: result: no" >&5
5998 echo "${ECHO_T}no" >&6
6002 if test -z "$ac_cv_path_PKG_CONFIG"; then
6003 ac_pt_PKG_CONFIG=$PKG_CONFIG
6004 # Extract the first word of "pkg-config", so it can be a program name with args.
6005 set dummy pkg-config; ac_word=$2
6006 echo "$as_me:6006: checking for $ac_word" >&5
6007 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6008 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
6009 echo $ECHO_N "(cached) $ECHO_C" >&6
6011 case $ac_pt_PKG_CONFIG in
6013 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
6016 ac_save_IFS=$IFS; IFS=$ac_path_separator
6018 for ac_dir in $ac_dummy; do
6020 test -z "$ac_dir" && ac_dir=.
6021 if $as_executable_p "$ac_dir/$ac_word"; then
6022 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
6023 echo "$as_me:6023: found $ac_dir/$ac_word" >&5
6028 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
6032 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
6034 if test -n "$ac_pt_PKG_CONFIG"; then
6035 echo "$as_me:6035: result: $ac_pt_PKG_CONFIG" >&5
6036 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
6038 echo "$as_me:6038: result: no" >&5
6039 echo "${ECHO_T}no" >&6
6042 PKG_CONFIG=$ac_pt_PKG_CONFIG
6044 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6053 test -z "$PKG_CONFIG" && PKG_CONFIG=none
6054 if test "$PKG_CONFIG" != none ; then
6056 if test "x$prefix" != xNONE; then
6057 cf_path_syntax="$prefix"
6059 cf_path_syntax="$ac_default_prefix"
6062 case ".$PKG_CONFIG" in
6067 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
6069 (.\$\{*prefix\}*|.\$\{*dir\}*)
6070 eval PKG_CONFIG="$PKG_CONFIG"
6071 case ".$PKG_CONFIG" in
6073 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
6078 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
6081 { { echo "$as_me:6081: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
6082 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
6083 { (exit 1); exit 1; }; }
6087 elif test "x$cf_pkg_config" != xno ; then
6088 { echo "$as_me:6088: WARNING: pkg-config is not installed" >&5
6089 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
6092 echo "$as_me:6092: checking if you want to see long compiling messages" >&5
6093 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
6095 # Check whether --enable-echo or --disable-echo was given.
6096 if test "${enable_echo+set}" = set; then
6097 enableval="$enable_echo"
6098 test "$enableval" != no && enableval=yes
6099 if test "$enableval" != "yes" ; then
6102 ECHO_LD='@echo linking $@;'
6103 RULE_CC='@echo compiling $<'
6104 SHOW_CC='@echo compiling $@'
6126 echo "$as_me:6126: result: $enableval" >&5
6127 echo "${ECHO_T}$enableval" >&6
6129 echo "$as_me:6129: checking for ncurses wrap-prefix" >&5
6130 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
6132 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
6133 if test "${with_ncurses_wrap_prefix+set}" = set; then
6134 withval="$with_ncurses_wrap_prefix"
6135 NCURSES_WRAP_PREFIX=$withval
6137 NCURSES_WRAP_PREFIX=_nc_
6139 echo "$as_me:6139: result: $NCURSES_WRAP_PREFIX" >&5
6140 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
6142 echo "$as_me:6142: checking if you want to check for wide-character functions" >&5
6143 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
6145 # Check whether --enable-widec or --disable-widec was given.
6146 if test "${enable_widec+set}" = set; then
6147 enableval="$enable_widec"
6148 test "$enableval" != no && enableval=yes
6149 if test "$enableval" != "yes" ; then
6159 echo "$as_me:6159: result: $cf_enable_widec" >&5
6160 echo "${ECHO_T}$cf_enable_widec" >&6
6162 echo "$as_me:6162: checking for specific curses-directory" >&5
6163 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
6165 # Check whether --with-curses-dir or --without-curses-dir was given.
6166 if test "${with_curses_dir+set}" = set; then
6167 withval="$with_curses_dir"
6168 cf_cv_curses_dir=$withval
6172 echo "$as_me:6172: result: $cf_cv_curses_dir" >&5
6173 echo "${ECHO_T}$cf_cv_curses_dir" >&6
6175 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6178 if test "x$prefix" != xNONE; then
6179 cf_path_syntax="$prefix"
6181 cf_path_syntax="$ac_default_prefix"
6189 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
6191 (.\$\{*prefix\}*|.\$\{*dir\}*)
6192 eval withval="$withval"
6195 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
6200 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
6203 { { echo "$as_me:6203: error: expected a pathname, not \"$withval\"" >&5
6204 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6205 { (exit 1); exit 1; }; }
6209 if test -d "$cf_cv_curses_dir"
6212 if test -n "$cf_cv_curses_dir/include" ; then
6213 for cf_add_incdir in $cf_cv_curses_dir/include
6215 while test "$cf_add_incdir" != /usr/include
6217 if test -d "$cf_add_incdir"
6220 if test -n "$CFLAGS$CPPFLAGS" ; then
6221 # a loop is needed to ensure we can add subdirs of existing dirs
6222 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6223 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6224 cf_have_incdir=yes; break
6229 if test "$cf_have_incdir" = no ; then
6230 if test "$cf_add_incdir" = /usr/local/include ; then
6231 if test "$GCC" = yes
6233 cf_save_CPPFLAGS=$CPPFLAGS
6235 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6236 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6238 cat >"conftest.$ac_ext" <<_ACEOF
6239 #line 6239 "configure"
6240 #include "confdefs.h"
6250 rm -f "conftest.$ac_objext"
6251 if { (eval echo "$as_me:6251: \"$ac_compile\"") >&5
6252 (eval $ac_compile) 2>&5
6254 echo "$as_me:6254: \$? = $ac_status" >&5
6255 (exit "$ac_status"); } &&
6256 { ac_try='test -s "conftest.$ac_objext"'
6257 { (eval echo "$as_me:6257: \"$ac_try\"") >&5
6260 echo "$as_me:6260: \$? = $ac_status" >&5
6261 (exit "$ac_status"); }; }; then
6264 echo "$as_me: failed program was:" >&5
6265 cat "conftest.$ac_ext" >&5
6268 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6269 CPPFLAGS=$cf_save_CPPFLAGS
6274 if test "$cf_have_incdir" = no ; then
6275 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6277 echo "${as_me:-configure}:6277: testing adding $cf_add_incdir to include-path ..." 1>&5
6279 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6281 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
6282 test "$cf_top_incdir" = "$cf_add_incdir" && break
6283 cf_add_incdir="$cf_top_incdir"
6294 if test -n "$cf_cv_curses_dir/lib" ; then
6295 for cf_add_libdir in $cf_cv_curses_dir/lib
6297 if test "$cf_add_libdir" = /usr/lib ; then
6299 elif test -d "$cf_add_libdir"
6302 if test -n "$LDFLAGS$LIBS" ; then
6303 # a loop is needed to ensure we can add subdirs of existing dirs
6304 for cf_test_libdir in $LDFLAGS $LIBS ; do
6305 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6306 cf_have_libdir=yes; break
6310 if test "$cf_have_libdir" = no ; then
6311 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6313 echo "${as_me:-configure}:6313: testing adding $cf_add_libdir to library-path ..." 1>&5
6315 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6326 echo "$as_me:6326: checking for specified curses library type" >&5
6327 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
6329 # Check whether --with-screen or --without-screen was given.
6330 if test "${with_screen+set}" = set; then
6331 withval="$with_screen"
6332 cf_cv_screen=$withval
6335 # Check whether --with-ncursesw or --without-ncursesw was given.
6336 if test "${with_ncursesw+set}" = set; then
6337 withval="$with_ncursesw"
6338 cf_cv_screen=ncursesw
6341 # Check whether --with-ncurses or --without-ncurses was given.
6342 if test "${with_ncurses+set}" = set; then
6343 withval="$with_ncurses"
6344 cf_cv_screen=ncurses
6347 # Check whether --with-pdcurses or --without-pdcurses was given.
6348 if test "${with_pdcurses+set}" = set; then
6349 withval="$with_pdcurses"
6350 cf_cv_screen=pdcurses
6353 # Check whether --with-curses-colr or --without-curses-colr was given.
6354 if test "${with_curses_colr+set}" = set; then
6355 withval="$with_curses_colr"
6356 cf_cv_screen=curses_colr
6359 # Check whether --with-curses-5lib or --without-curses-5lib was given.
6360 if test "${with_curses_5lib+set}" = set; then
6361 withval="$with_curses_5lib"
6362 cf_cv_screen=curses_5lib
6370 echo "$as_me:6370: result: $cf_cv_screen" >&5
6371 echo "${ECHO_T}$cf_cv_screen" >&6
6373 case $cf_cv_screen in
6376 echo "$as_me:6376: checking for extra include directories" >&5
6377 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
6378 if test "${cf_cv_curses_incdir+set}" = set; then
6379 echo $ECHO_N "(cached) $ECHO_C" >&6
6382 cf_cv_curses_incdir=no
6385 if test "x$cf_cv_screen" = "xcurses_colr"
6387 test -d /usr/include/curses_colr && \
6388 cf_cv_curses_incdir="-I/usr/include/curses_colr"
6392 if test "x$cf_cv_screen" = "xcurses_5lib"
6394 test -d /usr/5lib && \
6395 test -d /usr/5include && \
6396 cf_cv_curses_incdir="-I/usr/5include"
6402 echo "$as_me:6402: result: $cf_cv_curses_incdir" >&5
6403 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
6404 if test "$cf_cv_curses_incdir" != no
6407 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6408 CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
6412 echo "$as_me:6412: checking if we have identified curses headers" >&5
6413 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6414 if test "${cf_cv_ncurses_header+set}" = set; then
6415 echo $ECHO_N "(cached) $ECHO_C" >&6
6418 cf_cv_ncurses_header=none
6421 curses.h ncurses/ncurses.h ncurses/curses.h
6423 cat >"conftest.$ac_ext" <<_ACEOF
6424 #line 6424 "configure"
6425 #include "confdefs.h"
6426 #include <${cf_header}>
6430 initscr(); tgoto("?", 0,0)
6435 rm -f "conftest.$ac_objext"
6436 if { (eval echo "$as_me:6436: \"$ac_compile\"") >&5
6437 (eval $ac_compile) 2>&5
6439 echo "$as_me:6439: \$? = $ac_status" >&5
6440 (exit "$ac_status"); } &&
6441 { ac_try='test -s "conftest.$ac_objext"'
6442 { (eval echo "$as_me:6442: \"$ac_try\"") >&5
6445 echo "$as_me:6445: \$? = $ac_status" >&5
6446 (exit "$ac_status"); }; }; then
6447 cf_cv_ncurses_header=$cf_header; break
6449 echo "$as_me: failed program was:" >&5
6450 cat "conftest.$ac_ext" >&5
6452 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6456 echo "$as_me:6456: result: $cf_cv_ncurses_header" >&5
6457 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6459 if test "$cf_cv_ncurses_header" = none ; then
6460 { { echo "$as_me:6460: error: No curses header-files found" >&5
6461 echo "$as_me: error: No curses header-files found" >&2;}
6462 { (exit 1); exit 1; }; }
6465 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6467 for ac_header in $cf_cv_ncurses_header
6469 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6470 echo "$as_me:6470: checking for $ac_header" >&5
6471 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6472 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6473 echo $ECHO_N "(cached) $ECHO_C" >&6
6475 cat >"conftest.$ac_ext" <<_ACEOF
6476 #line 6476 "configure"
6477 #include "confdefs.h"
6478 #include <$ac_header>
6480 if { (eval echo "$as_me:6480: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6481 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6483 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6485 cat conftest.err >&5
6486 echo "$as_me:6486: \$? = $ac_status" >&5
6487 (exit "$ac_status"); } >/dev/null; then
6488 if test -s conftest.err; then
6489 ac_cpp_err=$ac_c_preproc_warn_flag
6496 if test -z "$ac_cpp_err"; then
6497 eval "$as_ac_Header=yes"
6499 echo "$as_me: failed program was:" >&5
6500 cat "conftest.$ac_ext" >&5
6501 eval "$as_ac_Header=no"
6503 rm -f conftest.err "conftest.$ac_ext"
6505 echo "$as_me:6505: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6506 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6507 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6508 cat >>confdefs.h <<EOF
6509 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6515 echo "$as_me:6515: checking for terminfo header" >&5
6516 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6517 if test "${cf_cv_term_header+set}" = set; then
6518 echo $ECHO_N "(cached) $ECHO_C" >&6
6521 case "${cf_cv_ncurses_header}" in
6522 (*/ncurses.h|*/ncursesw.h)
6523 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6526 cf_term_header=term.h
6530 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6532 cat >"conftest.$ac_ext" <<_ACEOF
6533 #line 6533 "configure"
6534 #include "confdefs.h"
6536 #include <${cf_cv_ncurses_header:-curses.h}>
6542 int x = auto_left_margin; (void)x
6547 rm -f "conftest.$ac_objext"
6548 if { (eval echo "$as_me:6548: \"$ac_compile\"") >&5
6549 (eval $ac_compile) 2>&5
6551 echo "$as_me:6551: \$? = $ac_status" >&5
6552 (exit "$ac_status"); } &&
6553 { ac_try='test -s "conftest.$ac_objext"'
6554 { (eval echo "$as_me:6554: \"$ac_try\"") >&5
6557 echo "$as_me:6557: \$? = $ac_status" >&5
6558 (exit "$ac_status"); }; }; then
6560 cf_cv_term_header="$cf_test"
6562 echo "$as_me: failed program was:" >&5
6563 cat "conftest.$ac_ext" >&5
6565 cf_cv_term_header=unknown
6568 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6569 test "$cf_cv_term_header" != unknown && break
6573 echo "$as_me:6573: result: $cf_cv_term_header" >&5
6574 echo "${ECHO_T}$cf_cv_term_header" >&6
6576 # Set definitions to allow ifdef'ing to accommodate subdirectories
6578 case "$cf_cv_term_header" in
6581 cat >>confdefs.h <<\EOF
6582 #define HAVE_TERM_H 1
6588 case "$cf_cv_term_header" in
6591 cat >>confdefs.h <<\EOF
6592 #define HAVE_NCURSES_TERM_H 1
6598 cat >>confdefs.h <<\EOF
6599 #define HAVE_NCURSESW_TERM_H 1
6605 echo "$as_me:6605: checking for ncurses version" >&5
6606 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6607 if test "${cf_cv_ncurses_version+set}" = set; then
6608 echo $ECHO_N "(cached) $ECHO_C" >&6
6611 cf_cv_ncurses_version=no
6613 rm -f "$cf_tempfile"
6614 if test "$cross_compiling" = yes; then
6616 # This will not work if the preprocessor splits the line after the
6617 # Autoconf token. The 'unproto' program does that.
6618 cat > "conftest.$ac_ext" <<EOF
6619 #include <${cf_cv_ncurses_header:-curses.h}>
6621 #ifdef NCURSES_VERSION
6622 Autoconf NCURSES_VERSION
6630 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6631 { (eval echo "$as_me:6631: \"$cf_try\"") >&5
6634 echo "$as_me:6634: \$? = $ac_status" >&5
6635 (exit "$ac_status"); }
6636 if test -f conftest.out ; then
6637 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
6638 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6643 cat >"conftest.$ac_ext" <<_ACEOF
6644 #line 6644 "configure"
6645 #include "confdefs.h"
6647 #include <${cf_cv_ncurses_header:-curses.h}>
6651 FILE *fp = fopen("$cf_tempfile", "w");
6652 #ifdef NCURSES_VERSION
6653 # ifdef NCURSES_VERSION_PATCH
6654 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6656 fprintf(fp, "%s\\n", NCURSES_VERSION);
6660 fprintf(fp, "old\\n");
6665 ${cf_cv_main_return:-return}(0);
6668 rm -f "conftest$ac_exeext"
6669 if { (eval echo "$as_me:6669: \"$ac_link\"") >&5
6670 (eval $ac_link) 2>&5
6672 echo "$as_me:6672: \$? = $ac_status" >&5
6673 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6674 { (eval echo "$as_me:6674: \"$ac_try\"") >&5
6677 echo "$as_me:6677: \$? = $ac_status" >&5
6678 (exit "$ac_status"); }; }; then
6680 cf_cv_ncurses_version=`cat $cf_tempfile`
6682 echo "$as_me: program exited with status $ac_status" >&5
6683 echo "$as_me: failed program was:" >&5
6684 cat "conftest.$ac_ext" >&5
6686 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6688 rm -f "$cf_tempfile"
6691 echo "$as_me:6691: result: $cf_cv_ncurses_version" >&5
6692 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6693 test "$cf_cv_ncurses_version" = no ||
6694 cat >>confdefs.h <<\EOF
6698 echo "$as_me:6698: checking if we have identified curses libraries" >&5
6699 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
6700 cat >"conftest.$ac_ext" <<_ACEOF
6701 #line 6701 "configure"
6702 #include "confdefs.h"
6703 #include <${cf_cv_ncurses_header:-curses.h}>
6707 initscr(); tgoto("?", 0,0)
6712 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6713 if { (eval echo "$as_me:6713: \"$ac_link\"") >&5
6714 (eval $ac_link) 2>&5
6716 echo "$as_me:6716: \$? = $ac_status" >&5
6717 (exit "$ac_status"); } &&
6718 { ac_try='test -s "conftest$ac_exeext"'
6719 { (eval echo "$as_me:6719: \"$ac_try\"") >&5
6722 echo "$as_me:6722: \$? = $ac_status" >&5
6723 (exit "$ac_status"); }; }; then
6726 echo "$as_me: failed program was:" >&5
6727 cat "conftest.$ac_ext" >&5
6730 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6731 echo "$as_me:6731: result: $cf_result" >&5
6732 echo "${ECHO_T}$cf_result" >&6
6734 if test "$cf_result" = no ; then
6737 echo "$as_me:6737: checking for tgoto in -lmytinfo" >&5
6738 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6739 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6740 echo $ECHO_N "(cached) $ECHO_C" >&6
6742 ac_check_lib_save_LIBS=$LIBS
6743 LIBS="-lmytinfo $LIBS"
6744 cat >"conftest.$ac_ext" <<_ACEOF
6745 #line 6745 "configure"
6746 #include "confdefs.h"
6748 /* Override any gcc2 internal prototype to avoid an error. */
6752 /* We use char because int might match the return type of a gcc2
6753 builtin and then its argument prototype would still apply. */
6763 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6764 if { (eval echo "$as_me:6764: \"$ac_link\"") >&5
6765 (eval $ac_link) 2>&5
6767 echo "$as_me:6767: \$? = $ac_status" >&5
6768 (exit "$ac_status"); } &&
6769 { ac_try='test -s "conftest$ac_exeext"'
6770 { (eval echo "$as_me:6770: \"$ac_try\"") >&5
6773 echo "$as_me:6773: \$? = $ac_status" >&5
6774 (exit "$ac_status"); }; }; then
6775 ac_cv_lib_mytinfo_tgoto=yes
6777 echo "$as_me: failed program was:" >&5
6778 cat "conftest.$ac_ext" >&5
6779 ac_cv_lib_mytinfo_tgoto=no
6781 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6782 LIBS=$ac_check_lib_save_LIBS
6784 echo "$as_me:6784: result: $ac_cv_lib_mytinfo_tgoto" >&5
6785 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6786 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6791 for cf_add_1lib in -lmytinfo; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6793 for cf_add_1lib in $cf_add_0lib; do
6794 for cf_add_2lib in $cf_add_libs; do
6795 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6800 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6808 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
6809 # next (1998), and xcurses "newer" (2000). There is no header file for
6810 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
6811 # term.h) for cur_colr
6812 if test "x$cf_cv_screen" = "xcurses_colr"
6814 echo "$as_me:6814: checking for initscr in -lcur_colr" >&5
6815 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
6816 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
6817 echo $ECHO_N "(cached) $ECHO_C" >&6
6819 ac_check_lib_save_LIBS=$LIBS
6820 LIBS="-lcur_colr $LIBS"
6821 cat >"conftest.$ac_ext" <<_ACEOF
6822 #line 6822 "configure"
6823 #include "confdefs.h"
6825 /* Override any gcc2 internal prototype to avoid an error. */
6829 /* We use char because int might match the return type of a gcc2
6830 builtin and then its argument prototype would still apply. */
6840 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6841 if { (eval echo "$as_me:6841: \"$ac_link\"") >&5
6842 (eval $ac_link) 2>&5
6844 echo "$as_me:6844: \$? = $ac_status" >&5
6845 (exit "$ac_status"); } &&
6846 { ac_try='test -s "conftest$ac_exeext"'
6847 { (eval echo "$as_me:6847: \"$ac_try\"") >&5
6850 echo "$as_me:6850: \$? = $ac_status" >&5
6851 (exit "$ac_status"); }; }; then
6852 ac_cv_lib_cur_colr_initscr=yes
6854 echo "$as_me: failed program was:" >&5
6855 cat "conftest.$ac_ext" >&5
6856 ac_cv_lib_cur_colr_initscr=no
6858 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6859 LIBS=$ac_check_lib_save_LIBS
6861 echo "$as_me:6861: result: $ac_cv_lib_cur_colr_initscr" >&5
6862 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
6863 if test "$ac_cv_lib_cur_colr_initscr" = yes; then
6868 for cf_add_1lib in -lcur_colr; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6870 for cf_add_1lib in $cf_add_0lib; do
6871 for cf_add_2lib in $cf_add_libs; do
6872 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6877 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6881 ac_cv_func_initscr=yes
6885 echo "$as_me:6885: checking for initscr in -lHcurses" >&5
6886 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
6887 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
6888 echo $ECHO_N "(cached) $ECHO_C" >&6
6890 ac_check_lib_save_LIBS=$LIBS
6891 LIBS="-lHcurses $LIBS"
6892 cat >"conftest.$ac_ext" <<_ACEOF
6893 #line 6893 "configure"
6894 #include "confdefs.h"
6896 /* Override any gcc2 internal prototype to avoid an error. */
6900 /* We use char because int might match the return type of a gcc2
6901 builtin and then its argument prototype would still apply. */
6911 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6912 if { (eval echo "$as_me:6912: \"$ac_link\"") >&5
6913 (eval $ac_link) 2>&5
6915 echo "$as_me:6915: \$? = $ac_status" >&5
6916 (exit "$ac_status"); } &&
6917 { ac_try='test -s "conftest$ac_exeext"'
6918 { (eval echo "$as_me:6918: \"$ac_try\"") >&5
6921 echo "$as_me:6921: \$? = $ac_status" >&5
6922 (exit "$ac_status"); }; }; then
6923 ac_cv_lib_Hcurses_initscr=yes
6925 echo "$as_me: failed program was:" >&5
6926 cat "conftest.$ac_ext" >&5
6927 ac_cv_lib_Hcurses_initscr=no
6929 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6930 LIBS=$ac_check_lib_save_LIBS
6932 echo "$as_me:6932: result: $ac_cv_lib_Hcurses_initscr" >&5
6933 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
6934 if test "$ac_cv_lib_Hcurses_initscr" = yes; then
6936 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
6941 for cf_add_1lib in -lHcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6943 for cf_add_1lib in $cf_add_0lib; do
6944 for cf_add_2lib in $cf_add_libs; do
6945 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6950 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6954 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6955 CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
6957 ac_cv_func_initscr=yes
6966 case `arch 2>/dev/null` in
6971 if test -n "/lib64" ; then
6972 for cf_add_libdir in /lib64
6974 if test "$cf_add_libdir" = /usr/lib ; then
6976 elif test -d "$cf_add_libdir"
6979 if test -n "$LDFLAGS$LIBS" ; then
6980 # a loop is needed to ensure we can add subdirs of existing dirs
6981 for cf_test_libdir in $LDFLAGS $LIBS ; do
6982 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6983 cf_have_libdir=yes; break
6987 if test "$cf_have_libdir" = no ; then
6988 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6990 echo "${as_me:-configure}:6990: testing adding $cf_add_libdir to library-path ..." 1>&5
6992 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7000 if test -n "/lib" ; then
7001 for cf_add_libdir in /lib
7003 if test "$cf_add_libdir" = /usr/lib ; then
7005 elif test -d "$cf_add_libdir"
7008 if test -n "$LDFLAGS$LIBS" ; then
7009 # a loop is needed to ensure we can add subdirs of existing dirs
7010 for cf_test_libdir in $LDFLAGS $LIBS ; do
7011 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7012 cf_have_libdir=yes; break
7016 if test "$cf_have_libdir" = no ; then
7017 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7019 echo "${as_me:-configure}:7019: testing adding $cf_add_libdir to library-path ..." 1>&5
7021 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7031 if test -n "/lib" ; then
7032 for cf_add_libdir in /lib
7034 if test "$cf_add_libdir" = /usr/lib ; then
7036 elif test -d "$cf_add_libdir"
7039 if test -n "$LDFLAGS$LIBS" ; then
7040 # a loop is needed to ensure we can add subdirs of existing dirs
7041 for cf_test_libdir in $LDFLAGS $LIBS ; do
7042 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7043 cf_have_libdir=yes; break
7047 if test "$cf_have_libdir" = no ; then
7048 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7050 echo "${as_me:-configure}:7050: testing adding $cf_add_libdir to library-path ..." 1>&5
7052 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7062 if test "x$cf_cv_screen" = "xcurses_5lib"
7064 if test -d /usr/5lib ; then
7066 if test -n "/usr/5lib" ; then
7067 for cf_add_libdir in /usr/5lib
7069 if test "$cf_add_libdir" = /usr/lib ; then
7071 elif test -d "$cf_add_libdir"
7074 if test -n "$LDFLAGS$LIBS" ; then
7075 # a loop is needed to ensure we can add subdirs of existing dirs
7076 for cf_test_libdir in $LDFLAGS $LIBS ; do
7077 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7078 cf_have_libdir=yes; break
7082 if test "$cf_have_libdir" = no ; then
7083 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7085 echo "${as_me:-configure}:7085: testing adding $cf_add_libdir to library-path ..." 1>&5
7087 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7096 for cf_add_1lib in -lcurses -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7098 for cf_add_1lib in $cf_add_0lib; do
7099 for cf_add_2lib in $cf_add_libs; do
7100 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7105 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7111 ac_cv_func_initscr=yes
7115 if test ".$ac_cv_func_initscr" != .yes ; then
7116 cf_save_LIBS="$LIBS"
7118 if test ".${cf_cv_ncurses_version:-no}" != .no
7120 cf_check_list="ncurses curses cursesX"
7122 cf_check_list="cursesX curses ncurses"
7125 # Check for library containing tgoto. Do this before curses library
7126 # because it may be needed to link the test-case for initscr.
7127 if test "x$cf_term_lib" = x
7129 echo "$as_me:7129: checking for tgoto" >&5
7130 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
7131 if test "${ac_cv_func_tgoto+set}" = set; then
7132 echo $ECHO_N "(cached) $ECHO_C" >&6
7134 cat >"conftest.$ac_ext" <<_ACEOF
7135 #line 7135 "configure"
7136 #include "confdefs.h"
7137 #define tgoto autoconf_temporary
7138 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
7145 /* We use char because int might match the return type of a gcc2
7146 builtin and then its argument prototype would still apply. */
7153 /* The GNU C library defines stubs for functions which it implements
7154 to always fail with ENOSYS. Some functions are actually named
7155 something starting with __ and the normal name is an alias. */
7156 #if defined (__stub_tgoto) || defined (__stub___tgoto)
7157 #error found stub for tgoto
7165 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7166 if { (eval echo "$as_me:7166: \"$ac_link\"") >&5
7167 (eval $ac_link) 2>&5
7169 echo "$as_me:7169: \$? = $ac_status" >&5
7170 (exit "$ac_status"); } &&
7171 { ac_try='test -s "conftest$ac_exeext"'
7172 { (eval echo "$as_me:7172: \"$ac_try\"") >&5
7175 echo "$as_me:7175: \$? = $ac_status" >&5
7176 (exit "$ac_status"); }; }; then
7177 ac_cv_func_tgoto=yes
7179 echo "$as_me: failed program was:" >&5
7180 cat "conftest.$ac_ext" >&5
7183 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7185 echo "$as_me:7185: result: $ac_cv_func_tgoto" >&5
7186 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
7187 if test "$ac_cv_func_tgoto" = yes; then
7188 cf_term_lib=predefined
7191 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
7193 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
7194 echo "$as_me:7194: checking for tgoto in -l$cf_term_lib" >&5
7195 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
7196 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
7197 echo $ECHO_N "(cached) $ECHO_C" >&6
7199 ac_check_lib_save_LIBS=$LIBS
7200 LIBS="-l$cf_term_lib $LIBS"
7201 cat >"conftest.$ac_ext" <<_ACEOF
7202 #line 7202 "configure"
7203 #include "confdefs.h"
7205 /* Override any gcc2 internal prototype to avoid an error. */
7209 /* We use char because int might match the return type of a gcc2
7210 builtin and then its argument prototype would still apply. */
7220 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7221 if { (eval echo "$as_me:7221: \"$ac_link\"") >&5
7222 (eval $ac_link) 2>&5
7224 echo "$as_me:7224: \$? = $ac_status" >&5
7225 (exit "$ac_status"); } &&
7226 { ac_try='test -s "conftest$ac_exeext"'
7227 { (eval echo "$as_me:7227: \"$ac_try\"") >&5
7230 echo "$as_me:7230: \$? = $ac_status" >&5
7231 (exit "$ac_status"); }; }; then
7232 eval "$as_ac_Lib=yes"
7234 echo "$as_me: failed program was:" >&5
7235 cat "conftest.$ac_ext" >&5
7236 eval "$as_ac_Lib=no"
7238 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7239 LIBS=$ac_check_lib_save_LIBS
7241 echo "$as_me:7241: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
7242 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
7243 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
7245 : "${cf_nculib_root:=$cf_term_lib}"
7256 # Check for library containing initscr
7257 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
7258 if test "x$cf_curs_lib" = x
7260 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
7262 LIBS="-l$cf_curs_lib $cf_save_LIBS"
7263 if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
7264 echo "$as_me:7264: checking if we can link with $cf_curs_lib library" >&5
7265 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
7266 cat >"conftest.$ac_ext" <<_ACEOF
7267 #line 7267 "configure"
7268 #include "confdefs.h"
7269 #include <${cf_cv_ncurses_header:-curses.h}>
7278 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7279 if { (eval echo "$as_me:7279: \"$ac_link\"") >&5
7280 (eval $ac_link) 2>&5
7282 echo "$as_me:7282: \$? = $ac_status" >&5
7283 (exit "$ac_status"); } &&
7284 { ac_try='test -s "conftest$ac_exeext"'
7285 { (eval echo "$as_me:7285: \"$ac_try\"") >&5
7288 echo "$as_me:7288: \$? = $ac_status" >&5
7289 (exit "$ac_status"); }; }; then
7292 echo "$as_me: failed program was:" >&5
7293 cat "conftest.$ac_ext" >&5
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" = yes && break
7300 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
7302 elif test "$cf_term_lib" != predefined ; then
7303 echo "$as_me:7303: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
7304 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
7305 cat >"conftest.$ac_ext" <<_ACEOF
7306 #line 7306 "configure"
7307 #include "confdefs.h"
7308 #include <${cf_cv_ncurses_header:-curses.h}>
7312 initscr(); tgoto((char *)0, 0, 0);
7317 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7318 if { (eval echo "$as_me:7318: \"$ac_link\"") >&5
7319 (eval $ac_link) 2>&5
7321 echo "$as_me:7321: \$? = $ac_status" >&5
7322 (exit "$ac_status"); } &&
7323 { ac_try='test -s "conftest$ac_exeext"'
7324 { (eval echo "$as_me:7324: \"$ac_try\"") >&5
7327 echo "$as_me:7327: \$? = $ac_status" >&5
7328 (exit "$ac_status"); }; }; then
7331 echo "$as_me: failed program was:" >&5
7332 cat "conftest.$ac_ext" >&5
7334 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
7335 cat >"conftest.$ac_ext" <<_ACEOF
7336 #line 7336 "configure"
7337 #include "confdefs.h"
7338 #include <${cf_cv_ncurses_header:-curses.h}>
7347 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7348 if { (eval echo "$as_me:7348: \"$ac_link\"") >&5
7349 (eval $ac_link) 2>&5
7351 echo "$as_me:7351: \$? = $ac_status" >&5
7352 (exit "$ac_status"); } &&
7353 { ac_try='test -s "conftest$ac_exeext"'
7354 { (eval echo "$as_me:7354: \"$ac_try\"") >&5
7357 echo "$as_me:7357: \$? = $ac_status" >&5
7358 (exit "$ac_status"); }; }; then
7361 echo "$as_me: failed program was:" >&5
7362 cat "conftest.$ac_ext" >&5
7365 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7368 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7369 echo "$as_me:7369: result: $cf_result" >&5
7370 echo "${ECHO_T}$cf_result" >&6
7371 test "$cf_result" != error && break
7375 test "$cf_curs_lib" = unknown && { { echo "$as_me:7375: error: no curses library found" >&5
7376 echo "$as_me: error: no curses library found" >&2;}
7377 { (exit 1); exit 1; }; }
7384 for ac_header in wchar.h
7386 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7387 echo "$as_me:7387: checking for $ac_header" >&5
7388 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7389 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7390 echo $ECHO_N "(cached) $ECHO_C" >&6
7392 cat >"conftest.$ac_ext" <<_ACEOF
7393 #line 7393 "configure"
7394 #include "confdefs.h"
7395 #include <$ac_header>
7397 if { (eval echo "$as_me:7397: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7398 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7400 $EGREP -v '^ *\+' conftest.er1 >conftest.err
7402 cat conftest.err >&5
7403 echo "$as_me:7403: \$? = $ac_status" >&5
7404 (exit "$ac_status"); } >/dev/null; then
7405 if test -s conftest.err; then
7406 ac_cpp_err=$ac_c_preproc_warn_flag
7413 if test -z "$ac_cpp_err"; then
7414 eval "$as_ac_Header=yes"
7416 echo "$as_me: failed program was:" >&5
7417 cat "conftest.$ac_ext" >&5
7418 eval "$as_ac_Header=no"
7420 rm -f conftest.err "conftest.$ac_ext"
7422 echo "$as_me:7422: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7423 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7424 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7425 cat >>confdefs.h <<EOF
7426 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7432 echo "$as_me:7432: checking for multibyte character support" >&5
7433 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7434 if test "${cf_cv_utf8_lib+set}" = set; then
7435 echo $ECHO_N "(cached) $ECHO_C" >&6
7438 cf_save_LIBS="$LIBS"
7439 cat >"conftest.$ac_ext" <<_ACEOF
7440 #line 7440 "configure"
7441 #include "confdefs.h"
7457 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7458 if { (eval echo "$as_me:7458: \"$ac_link\"") >&5
7459 (eval $ac_link) 2>&5
7461 echo "$as_me:7461: \$? = $ac_status" >&5
7462 (exit "$ac_status"); } &&
7463 { ac_try='test -s "conftest$ac_exeext"'
7464 { (eval echo "$as_me:7464: \"$ac_try\"") >&5
7467 echo "$as_me:7467: \$? = $ac_status" >&5
7468 (exit "$ac_status"); }; }; then
7471 echo "$as_me: failed program was:" >&5
7472 cat "conftest.$ac_ext" >&5
7474 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7475 # will be set on completion of the AC_TRY_LINK below.
7476 cf_cv_header_path_utf8=
7477 cf_cv_library_path_utf8=
7479 echo "${as_me:-configure}:7479: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7481 cf_save_LIBS="$LIBS"
7483 cat >"conftest.$ac_ext" <<_ACEOF
7484 #line 7484 "configure"
7485 #include "confdefs.h"
7487 #include <libutf8.h>
7496 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7497 if { (eval echo "$as_me:7497: \"$ac_link\"") >&5
7498 (eval $ac_link) 2>&5
7500 echo "$as_me:7500: \$? = $ac_status" >&5
7501 (exit "$ac_status"); } &&
7502 { ac_try='test -s "conftest$ac_exeext"'
7503 { (eval echo "$as_me:7503: \"$ac_try\"") >&5
7506 echo "$as_me:7506: \$? = $ac_status" >&5
7507 (exit "$ac_status"); }; }; then
7509 cf_cv_find_linkage_utf8=yes
7510 cf_cv_header_path_utf8=/usr/include
7511 cf_cv_library_path_utf8=/usr/lib
7514 echo "$as_me: failed program was:" >&5
7515 cat "conftest.$ac_ext" >&5
7517 LIBS="-lutf8 $cf_save_LIBS"
7519 cat >"conftest.$ac_ext" <<_ACEOF
7520 #line 7520 "configure"
7521 #include "confdefs.h"
7523 #include <libutf8.h>
7532 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7533 if { (eval echo "$as_me:7533: \"$ac_link\"") >&5
7534 (eval $ac_link) 2>&5
7536 echo "$as_me:7536: \$? = $ac_status" >&5
7537 (exit "$ac_status"); } &&
7538 { ac_try='test -s "conftest$ac_exeext"'
7539 { (eval echo "$as_me:7539: \"$ac_try\"") >&5
7542 echo "$as_me:7542: \$? = $ac_status" >&5
7543 (exit "$ac_status"); }; }; then
7545 cf_cv_find_linkage_utf8=yes
7546 cf_cv_header_path_utf8=/usr/include
7547 cf_cv_library_path_utf8=/usr/lib
7548 cf_cv_library_file_utf8="-lutf8"
7551 echo "$as_me: failed program was:" >&5
7552 cat "conftest.$ac_ext" >&5
7554 cf_cv_find_linkage_utf8=no
7555 LIBS="$cf_save_LIBS"
7557 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
7559 echo "${as_me:-configure}:7559: testing find linkage for utf8 library ..." 1>&5
7561 echo "${as_me:-configure}:7561: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7563 cf_save_CPPFLAGS="$CPPFLAGS"
7564 cf_test_CPPFLAGS="$CPPFLAGS"
7568 # collect the current set of include-directories from compiler flags
7569 cf_header_path_list=""
7570 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7571 for cf_header_path in $CPPFLAGS $CFLAGS
7573 case "$cf_header_path" in
7575 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7577 test "x$cf_header_path" != "xNONE" && \
7578 test -d "$cf_header_path" && \
7580 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7581 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
7582 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
7583 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
7584 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
7585 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7588 cf_header_path_list="$cf_header_path_list $cf_search"
7594 # add the variations for the package we are looking for
7598 test "x$prefix" != "xNONE" && \
7599 test -d "$prefix" && \
7601 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7602 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
7603 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
7604 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
7605 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
7606 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
7609 for cf_subdir_prefix in \
7618 test "x$cf_subdir_prefix" != "x$prefix" && \
7619 test -d "$cf_subdir_prefix" && \
7620 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7621 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7622 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
7623 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
7624 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
7625 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
7626 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
7631 test "$includedir" != NONE && \
7632 test "$includedir" != "/usr/include" && \
7633 test -d "$includedir" && {
7634 test -d "$includedir" && cf_search="$cf_search $includedir"
7635 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
7638 test "$oldincludedir" != NONE && \
7639 test "$oldincludedir" != "/usr/include" && \
7640 test -d "$oldincludedir" && {
7641 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
7642 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
7645 cf_search="$cf_search $cf_header_path_list"
7647 for cf_cv_header_path_utf8 in $cf_search
7649 if test -d "$cf_cv_header_path_utf8" ; then
7650 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
7652 echo "${as_me:-configure}:7652: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7654 CPPFLAGS="$cf_save_CPPFLAGS"
7656 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7657 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
7659 cat >"conftest.$ac_ext" <<_ACEOF
7660 #line 7660 "configure"
7661 #include "confdefs.h"
7663 #include <libutf8.h>
7672 rm -f "conftest.$ac_objext"
7673 if { (eval echo "$as_me:7673: \"$ac_compile\"") >&5
7674 (eval $ac_compile) 2>&5
7676 echo "$as_me:7676: \$? = $ac_status" >&5
7677 (exit "$ac_status"); } &&
7678 { ac_try='test -s "conftest.$ac_objext"'
7679 { (eval echo "$as_me:7679: \"$ac_try\"") >&5
7682 echo "$as_me:7682: \$? = $ac_status" >&5
7683 (exit "$ac_status"); }; }; then
7685 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7687 echo "${as_me:-configure}:7687: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7689 cf_cv_find_linkage_utf8=maybe
7690 cf_test_CPPFLAGS="$CPPFLAGS"
7693 echo "$as_me: failed program was:" >&5
7694 cat "conftest.$ac_ext" >&5
7696 CPPFLAGS="$cf_save_CPPFLAGS"
7699 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7703 if test "$cf_cv_find_linkage_utf8" = maybe ; then
7705 echo "${as_me:-configure}:7705: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7707 cf_save_LIBS="$LIBS"
7708 cf_save_LDFLAGS="$LDFLAGS"
7710 if test "$cf_cv_find_linkage_utf8" != yes ; then
7713 cf_library_path_list=""
7714 if test -n "${LDFLAGS}${LIBS}" ; then
7715 for cf_library_path in $LDFLAGS $LIBS
7717 case "$cf_library_path" in
7719 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7721 test "x$cf_library_path" != "xNONE" && \
7722 test -d "$cf_library_path" && \
7724 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7725 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
7726 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
7727 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7728 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
7729 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7732 cf_library_path_list="$cf_library_path_list $cf_search"
7740 test "x$prefix" != "xNONE" && \
7741 test -d "$prefix" && \
7743 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7744 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
7745 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
7746 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
7747 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
7748 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
7751 for cf_subdir_prefix in \
7760 test "x$cf_subdir_prefix" != "x$prefix" && \
7761 test -d "$cf_subdir_prefix" && \
7762 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7763 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7764 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
7765 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
7766 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
7767 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
7768 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
7773 cf_search="$cf_library_path_list $cf_search"
7775 for cf_cv_library_path_utf8 in $cf_search
7777 if test -d "$cf_cv_library_path_utf8" ; then
7778 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7780 echo "${as_me:-configure}:7780: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7782 CPPFLAGS="$cf_test_CPPFLAGS"
7783 LIBS="-lutf8 $cf_save_LIBS"
7784 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7785 cat >"conftest.$ac_ext" <<_ACEOF
7786 #line 7786 "configure"
7787 #include "confdefs.h"
7789 #include <libutf8.h>
7798 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7799 if { (eval echo "$as_me:7799: \"$ac_link\"") >&5
7800 (eval $ac_link) 2>&5
7802 echo "$as_me:7802: \$? = $ac_status" >&5
7803 (exit "$ac_status"); } &&
7804 { ac_try='test -s "conftest$ac_exeext"'
7805 { (eval echo "$as_me:7805: \"$ac_try\"") >&5
7808 echo "$as_me:7808: \$? = $ac_status" >&5
7809 (exit "$ac_status"); }; }; then
7811 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7813 echo "${as_me:-configure}:7813: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7815 cf_cv_find_linkage_utf8=yes
7816 cf_cv_library_file_utf8="-lutf8"
7819 echo "$as_me: failed program was:" >&5
7820 cat "conftest.$ac_ext" >&5
7822 CPPFLAGS="$cf_save_CPPFLAGS"
7823 LIBS="$cf_save_LIBS"
7824 LDFLAGS="$cf_save_LDFLAGS"
7827 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7830 CPPFLAGS="$cf_save_CPPFLAGS"
7831 LDFLAGS="$cf_save_LDFLAGS"
7835 cf_cv_find_linkage_utf8=no
7839 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7842 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7844 LIBS="$cf_save_LIBS"
7846 if test "$cf_cv_find_linkage_utf8" = yes ; then
7847 cf_cv_utf8_lib=add-on
7853 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7855 echo "$as_me:7855: result: $cf_cv_utf8_lib" >&5
7856 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7858 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7860 if test "$cf_cv_utf8_lib" = "add-on" ; then
7862 cat >>confdefs.h <<\EOF
7863 #define HAVE_LIBUTF8_H 1
7866 if test -n "$cf_cv_header_path_utf8" ; then
7867 for cf_add_incdir in $cf_cv_header_path_utf8
7869 while test "$cf_add_incdir" != /usr/include
7871 if test -d "$cf_add_incdir"
7874 if test -n "$CFLAGS$CPPFLAGS" ; then
7875 # a loop is needed to ensure we can add subdirs of existing dirs
7876 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7877 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7878 cf_have_incdir=yes; break
7883 if test "$cf_have_incdir" = no ; then
7884 if test "$cf_add_incdir" = /usr/local/include ; then
7885 if test "$GCC" = yes
7887 cf_save_CPPFLAGS=$CPPFLAGS
7889 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7890 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7892 cat >"conftest.$ac_ext" <<_ACEOF
7893 #line 7893 "configure"
7894 #include "confdefs.h"
7904 rm -f "conftest.$ac_objext"
7905 if { (eval echo "$as_me:7905: \"$ac_compile\"") >&5
7906 (eval $ac_compile) 2>&5
7908 echo "$as_me:7908: \$? = $ac_status" >&5
7909 (exit "$ac_status"); } &&
7910 { ac_try='test -s "conftest.$ac_objext"'
7911 { (eval echo "$as_me:7911: \"$ac_try\"") >&5
7914 echo "$as_me:7914: \$? = $ac_status" >&5
7915 (exit "$ac_status"); }; }; then
7918 echo "$as_me: failed program was:" >&5
7919 cat "conftest.$ac_ext" >&5
7922 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7923 CPPFLAGS=$cf_save_CPPFLAGS
7928 if test "$cf_have_incdir" = no ; then
7929 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7931 echo "${as_me:-configure}:7931: testing adding $cf_add_incdir to include-path ..." 1>&5
7933 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7935 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7936 test "$cf_top_incdir" = "$cf_add_incdir" && break
7937 cf_add_incdir="$cf_top_incdir"
7948 if test -n "$cf_cv_library_path_utf8" ; then
7949 for cf_add_libdir in $cf_cv_library_path_utf8
7951 if test "$cf_add_libdir" = /usr/lib ; then
7953 elif test -d "$cf_add_libdir"
7956 if test -n "$LDFLAGS$LIBS" ; then
7957 # a loop is needed to ensure we can add subdirs of existing dirs
7958 for cf_test_libdir in $LDFLAGS $LIBS ; do
7959 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7960 cf_have_libdir=yes; break
7964 if test "$cf_have_libdir" = no ; then
7965 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7967 echo "${as_me:-configure}:7967: testing adding $cf_add_libdir to library-path ..." 1>&5
7969 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7978 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7980 for cf_add_1lib in $cf_add_0lib; do
7981 for cf_add_2lib in $cf_add_libs; do
7982 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7987 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7993 cf_ncuconfig_root=$cf_cv_screen
7994 cf_have_ncuconfig=no
7996 if test "x${PKG_CONFIG:=none}" != xnone; then
7997 echo "$as_me:7997: checking pkg-config for $cf_ncuconfig_root" >&5
7998 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7999 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
8000 echo "$as_me:8000: result: yes" >&5
8001 echo "${ECHO_T}yes" >&6
8003 echo "$as_me:8003: checking if the $cf_ncuconfig_root package files work" >&5
8004 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
8005 cf_have_ncuconfig=unknown
8007 cf_save_CFLAGS="$CFLAGS"
8008 cf_save_CPPFLAGS="$CPPFLAGS"
8009 cf_save_LIBS="$LIBS"
8011 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
8012 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
8014 # while -W for passing linker flags is prevalent, it is not "standard".
8015 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
8016 # incompatible _and_ non-standard -W option which gives an error. Work
8017 # around that pitfall.
8018 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
8024 cf_new_extra_cppflags=
8026 for cf_add_cflags in $cf_pkg_cflags
8028 case "$cf_fix_cppflags" in
8030 case "$cf_add_cflags" in
8031 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8032 case "$cf_add_cflags" in
8034 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8036 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8037 && test -z "${cf_tst_cflags}" \
8038 && cf_fix_cppflags=yes
8040 if test "$cf_fix_cppflags" = yes ; then
8042 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8043 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8046 elif test "${cf_tst_cflags}" = "\"'" ; then
8048 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8049 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8059 case "$cf_add_cflags" in
8061 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8063 CPPFLAGS=`echo "$CPPFLAGS" | \
8064 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8065 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8070 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8071 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8078 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8079 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8086 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8087 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8089 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8091 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8092 && test -z "${cf_tst_cflags}" \
8093 && cf_fix_cppflags=no
8098 if test -n "$cf_new_cflags" ; then
8100 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8101 CFLAGS="${CFLAGS}$cf_new_cflags"
8105 if test -n "$cf_new_cppflags" ; then
8107 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8108 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8112 if test -n "$cf_new_extra_cppflags" ; then
8114 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8115 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8122 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8124 for cf_add_1lib in $cf_add_0lib; do
8125 for cf_add_2lib in $cf_add_libs; do
8126 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8131 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8135 cat >"conftest.$ac_ext" <<_ACEOF
8136 #line 8136 "configure"
8137 #include "confdefs.h"
8138 #include <${cf_cv_ncurses_header:-curses.h}>
8142 initscr(); mousemask(0,0); tigetstr((char *)0);
8147 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8148 if { (eval echo "$as_me:8148: \"$ac_link\"") >&5
8149 (eval $ac_link) 2>&5
8151 echo "$as_me:8151: \$? = $ac_status" >&5
8152 (exit "$ac_status"); } &&
8153 { ac_try='test -s "conftest$ac_exeext"'
8154 { (eval echo "$as_me:8154: \"$ac_try\"") >&5
8157 echo "$as_me:8157: \$? = $ac_status" >&5
8158 (exit "$ac_status"); }; }; then
8159 if test "$cross_compiling" = yes; then
8160 cf_test_ncuconfig=maybe
8162 cat >"conftest.$ac_ext" <<_ACEOF
8163 #line 8163 "configure"
8164 #include "confdefs.h"
8165 #include <${cf_cv_ncurses_header:-curses.h}>
8167 { const char *xx = curses_version(); return (xx == 0); }
8169 rm -f "conftest$ac_exeext"
8170 if { (eval echo "$as_me:8170: \"$ac_link\"") >&5
8171 (eval $ac_link) 2>&5
8173 echo "$as_me:8173: \$? = $ac_status" >&5
8174 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8175 { (eval echo "$as_me:8175: \"$ac_try\"") >&5
8178 echo "$as_me:8178: \$? = $ac_status" >&5
8179 (exit "$ac_status"); }; }; then
8180 cf_test_ncuconfig=yes
8182 echo "$as_me: program exited with status $ac_status" >&5
8183 echo "$as_me: failed program was:" >&5
8184 cat "conftest.$ac_ext" >&5
8185 cf_test_ncuconfig=no
8187 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8190 echo "$as_me: failed program was:" >&5
8191 cat "conftest.$ac_ext" >&5
8192 cf_test_ncuconfig=no
8194 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8196 CFLAGS="$cf_save_CFLAGS"
8197 CPPFLAGS="$cf_save_CPPFLAGS"
8198 LIBS="$cf_save_LIBS"
8200 if test "x$cf_test_ncuconfig" != xyes; then
8201 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
8202 cf_pkg_cflags="$cf_temp"
8203 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
8204 cf_pkg_libs="$cf_temp"
8212 cf_new_extra_cppflags=
8214 for cf_add_cflags in $cf_pkg_cflags
8216 case "$cf_fix_cppflags" in
8218 case "$cf_add_cflags" in
8219 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8220 case "$cf_add_cflags" in
8222 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8224 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8225 && test -z "${cf_tst_cflags}" \
8226 && cf_fix_cppflags=yes
8228 if test "$cf_fix_cppflags" = yes ; then
8230 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8231 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8234 elif test "${cf_tst_cflags}" = "\"'" ; then
8236 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8237 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8247 case "$cf_add_cflags" in
8249 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8251 CPPFLAGS=`echo "$CPPFLAGS" | \
8252 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8253 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8258 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8259 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8266 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8267 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8274 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8275 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8277 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8279 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8280 && test -z "${cf_tst_cflags}" \
8281 && cf_fix_cppflags=no
8286 if test -n "$cf_new_cflags" ; then
8288 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8289 CFLAGS="${CFLAGS}$cf_new_cflags"
8293 if test -n "$cf_new_cppflags" ; then
8295 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8296 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8300 if test -n "$cf_new_extra_cppflags" ; then
8302 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8303 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8310 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8312 for cf_add_1lib in $cf_add_0lib; do
8313 for cf_add_2lib in $cf_add_libs; do
8314 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8319 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8323 cat >"conftest.$ac_ext" <<_ACEOF
8324 #line 8324 "configure"
8325 #include "confdefs.h"
8326 #include <${cf_cv_ncurses_header:-curses.h}>
8330 initscr(); mousemask(0,0); tigetstr((char *)0);
8335 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8336 if { (eval echo "$as_me:8336: \"$ac_link\"") >&5
8337 (eval $ac_link) 2>&5
8339 echo "$as_me:8339: \$? = $ac_status" >&5
8340 (exit "$ac_status"); } &&
8341 { ac_try='test -s "conftest$ac_exeext"'
8342 { (eval echo "$as_me:8342: \"$ac_try\"") >&5
8345 echo "$as_me:8345: \$? = $ac_status" >&5
8346 (exit "$ac_status"); }; }; then
8347 if test "$cross_compiling" = yes; then
8348 cf_have_ncuconfig=maybe
8350 cat >"conftest.$ac_ext" <<_ACEOF
8351 #line 8351 "configure"
8352 #include "confdefs.h"
8353 #include <${cf_cv_ncurses_header:-curses.h}>
8355 { const char *xx = curses_version(); return (xx == 0); }
8357 rm -f "conftest$ac_exeext"
8358 if { (eval echo "$as_me:8358: \"$ac_link\"") >&5
8359 (eval $ac_link) 2>&5
8361 echo "$as_me:8361: \$? = $ac_status" >&5
8362 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8363 { (eval echo "$as_me:8363: \"$ac_try\"") >&5
8366 echo "$as_me:8366: \$? = $ac_status" >&5
8367 (exit "$ac_status"); }; }; then
8368 cf_have_ncuconfig=yes
8370 echo "$as_me: program exited with status $ac_status" >&5
8371 echo "$as_me: failed program was:" >&5
8372 cat "conftest.$ac_ext" >&5
8373 cf_have_ncuconfig=no
8375 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8378 echo "$as_me: failed program was:" >&5
8379 cat "conftest.$ac_ext" >&5
8380 cf_have_ncuconfig=no
8382 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8383 echo "$as_me:8383: result: $cf_have_ncuconfig" >&5
8384 echo "${ECHO_T}$cf_have_ncuconfig" >&6
8385 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
8386 if test "$cf_have_ncuconfig" != "yes"
8388 CPPFLAGS="$cf_save_CPPFLAGS"
8389 LIBS="$cf_save_LIBS"
8390 NCURSES_CONFIG_PKG=none
8393 cat >>confdefs.h <<\EOF
8397 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
8399 echo "$as_me:8399: checking for terminfo header" >&5
8400 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8401 if test "${cf_cv_term_header+set}" = set; then
8402 echo $ECHO_N "(cached) $ECHO_C" >&6
8405 case "${cf_cv_ncurses_header}" in
8406 (*/ncurses.h|*/ncursesw.h)
8407 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8410 cf_term_header=term.h
8414 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8416 cat >"conftest.$ac_ext" <<_ACEOF
8417 #line 8417 "configure"
8418 #include "confdefs.h"
8420 #include <${cf_cv_ncurses_header:-curses.h}>
8426 int x = auto_left_margin; (void)x
8431 rm -f "conftest.$ac_objext"
8432 if { (eval echo "$as_me:8432: \"$ac_compile\"") >&5
8433 (eval $ac_compile) 2>&5
8435 echo "$as_me:8435: \$? = $ac_status" >&5
8436 (exit "$ac_status"); } &&
8437 { ac_try='test -s "conftest.$ac_objext"'
8438 { (eval echo "$as_me:8438: \"$ac_try\"") >&5
8441 echo "$as_me:8441: \$? = $ac_status" >&5
8442 (exit "$ac_status"); }; }; then
8444 cf_cv_term_header="$cf_test"
8446 echo "$as_me: failed program was:" >&5
8447 cat "conftest.$ac_ext" >&5
8449 cf_cv_term_header=unknown
8452 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8453 test "$cf_cv_term_header" != unknown && break
8457 echo "$as_me:8457: result: $cf_cv_term_header" >&5
8458 echo "${ECHO_T}$cf_cv_term_header" >&6
8460 # Set definitions to allow ifdef'ing to accommodate subdirectories
8462 case "$cf_cv_term_header" in
8465 cat >>confdefs.h <<\EOF
8466 #define HAVE_TERM_H 1
8472 case "$cf_cv_term_header" in
8475 cat >>confdefs.h <<\EOF
8476 #define HAVE_NCURSES_TERM_H 1
8482 cat >>confdefs.h <<\EOF
8483 #define HAVE_NCURSESW_TERM_H 1
8492 echo "$as_me:8492: result: no" >&5
8493 echo "${ECHO_T}no" >&6
8494 NCURSES_CONFIG_PKG=none
8497 NCURSES_CONFIG_PKG=none
8500 if test "x$cf_have_ncuconfig" = "xno"; then
8501 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
8503 if test -n "$ac_tool_prefix"; then
8504 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8506 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8507 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8508 echo "$as_me:8508: checking for $ac_word" >&5
8509 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8510 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8511 echo $ECHO_N "(cached) $ECHO_C" >&6
8513 if test -n "$NCURSES_CONFIG"; then
8514 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8516 ac_save_IFS=$IFS; IFS=$ac_path_separator
8518 for ac_dir in $ac_dummy; do
8520 test -z "$ac_dir" && ac_dir=.
8521 $as_executable_p "$ac_dir/$ac_word" || continue
8522 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8523 echo "$as_me:8523: found $ac_dir/$ac_word" >&5
8529 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8530 if test -n "$NCURSES_CONFIG"; then
8531 echo "$as_me:8531: result: $NCURSES_CONFIG" >&5
8532 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8534 echo "$as_me:8534: result: no" >&5
8535 echo "${ECHO_T}no" >&6
8538 test -n "$NCURSES_CONFIG" && break
8541 if test -z "$NCURSES_CONFIG"; then
8542 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8543 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8545 # Extract the first word of "$ac_prog", so it can be a program name with args.
8546 set dummy $ac_prog; ac_word=$2
8547 echo "$as_me:8547: checking for $ac_word" >&5
8548 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8549 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8550 echo $ECHO_N "(cached) $ECHO_C" >&6
8552 if test -n "$ac_ct_NCURSES_CONFIG"; then
8553 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8555 ac_save_IFS=$IFS; IFS=$ac_path_separator
8557 for ac_dir in $ac_dummy; do
8559 test -z "$ac_dir" && ac_dir=.
8560 $as_executable_p "$ac_dir/$ac_word" || continue
8561 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8562 echo "$as_me:8562: found $ac_dir/$ac_word" >&5
8568 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8569 if test -n "$ac_ct_NCURSES_CONFIG"; then
8570 echo "$as_me:8570: result: $ac_ct_NCURSES_CONFIG" >&5
8571 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8573 echo "$as_me:8573: result: no" >&5
8574 echo "${ECHO_T}no" >&6
8577 test -n "$ac_ct_NCURSES_CONFIG" && break
8579 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8581 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8584 if test "$NCURSES_CONFIG" != none ; then
8589 cf_new_extra_cppflags=
8591 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
8593 case "$cf_fix_cppflags" in
8595 case "$cf_add_cflags" in
8596 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8597 case "$cf_add_cflags" in
8599 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8601 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8602 && test -z "${cf_tst_cflags}" \
8603 && cf_fix_cppflags=yes
8605 if test "$cf_fix_cppflags" = yes ; then
8607 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8608 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8611 elif test "${cf_tst_cflags}" = "\"'" ; then
8613 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8614 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8624 case "$cf_add_cflags" in
8626 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8628 CPPFLAGS=`echo "$CPPFLAGS" | \
8629 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8630 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8635 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8636 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8643 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8644 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8651 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8652 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8654 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8656 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8657 && test -z "${cf_tst_cflags}" \
8658 && cf_fix_cppflags=no
8663 if test -n "$cf_new_cflags" ; then
8665 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8666 CFLAGS="${CFLAGS}$cf_new_cflags"
8670 if test -n "$cf_new_cppflags" ; then
8672 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8673 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8677 if test -n "$cf_new_extra_cppflags" ; then
8679 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8680 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8687 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8689 for cf_add_1lib in $cf_add_0lib; do
8690 for cf_add_2lib in $cf_add_libs; do
8691 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8696 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8700 # even with config script, some packages use no-override for curses.h
8702 echo "$as_me:8702: checking if we have identified curses headers" >&5
8703 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8704 if test "${cf_cv_ncurses_header+set}" = set; then
8705 echo $ECHO_N "(cached) $ECHO_C" >&6
8708 cf_cv_ncurses_header=none
8710 ncurses.h $cf_cv_screen/ncurses.h \
8711 curses.h $cf_cv_screen/curses.h
8713 cat >"conftest.$ac_ext" <<_ACEOF
8714 #line 8714 "configure"
8715 #include "confdefs.h"
8716 #include <${cf_header}>
8720 initscr(); tgoto("?", 0,0)
8725 rm -f "conftest.$ac_objext"
8726 if { (eval echo "$as_me:8726: \"$ac_compile\"") >&5
8727 (eval $ac_compile) 2>&5
8729 echo "$as_me:8729: \$? = $ac_status" >&5
8730 (exit "$ac_status"); } &&
8731 { ac_try='test -s "conftest.$ac_objext"'
8732 { (eval echo "$as_me:8732: \"$ac_try\"") >&5
8735 echo "$as_me:8735: \$? = $ac_status" >&5
8736 (exit "$ac_status"); }; }; then
8737 cf_cv_ncurses_header=$cf_header; break
8739 echo "$as_me: failed program was:" >&5
8740 cat "conftest.$ac_ext" >&5
8742 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8746 echo "$as_me:8746: result: $cf_cv_ncurses_header" >&5
8747 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8749 if test "$cf_cv_ncurses_header" = none ; then
8750 { { echo "$as_me:8750: error: No curses header-files found" >&5
8751 echo "$as_me: error: No curses header-files found" >&2;}
8752 { (exit 1); exit 1; }; }
8755 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8757 for ac_header in $cf_cv_ncurses_header
8759 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8760 echo "$as_me:8760: checking for $ac_header" >&5
8761 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8762 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8763 echo $ECHO_N "(cached) $ECHO_C" >&6
8765 cat >"conftest.$ac_ext" <<_ACEOF
8766 #line 8766 "configure"
8767 #include "confdefs.h"
8768 #include <$ac_header>
8770 if { (eval echo "$as_me:8770: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8771 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8773 $EGREP -v '^ *\+' conftest.er1 >conftest.err
8775 cat conftest.err >&5
8776 echo "$as_me:8776: \$? = $ac_status" >&5
8777 (exit "$ac_status"); } >/dev/null; then
8778 if test -s conftest.err; then
8779 ac_cpp_err=$ac_c_preproc_warn_flag
8786 if test -z "$ac_cpp_err"; then
8787 eval "$as_ac_Header=yes"
8789 echo "$as_me: failed program was:" >&5
8790 cat "conftest.$ac_ext" >&5
8791 eval "$as_ac_Header=no"
8793 rm -f conftest.err "conftest.$ac_ext"
8795 echo "$as_me:8795: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8796 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8797 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8798 cat >>confdefs.h <<EOF
8799 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8805 cat >>confdefs.h <<\EOF
8809 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8811 cat >>confdefs.h <<EOF
8812 #define $cf_nculib_ROOT 1
8815 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
8819 cf_ncuhdr_root=$cf_cv_screen
8821 test -n "$cf_cv_curses_dir" && \
8822 test "$cf_cv_curses_dir" != "no" && { \
8824 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8825 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8827 while test "$cf_add_incdir" != /usr/include
8829 if test -d "$cf_add_incdir"
8832 if test -n "$CFLAGS$CPPFLAGS" ; then
8833 # a loop is needed to ensure we can add subdirs of existing dirs
8834 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8835 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8836 cf_have_incdir=yes; break
8841 if test "$cf_have_incdir" = no ; then
8842 if test "$cf_add_incdir" = /usr/local/include ; then
8843 if test "$GCC" = yes
8845 cf_save_CPPFLAGS=$CPPFLAGS
8847 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8848 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8850 cat >"conftest.$ac_ext" <<_ACEOF
8851 #line 8851 "configure"
8852 #include "confdefs.h"
8862 rm -f "conftest.$ac_objext"
8863 if { (eval echo "$as_me:8863: \"$ac_compile\"") >&5
8864 (eval $ac_compile) 2>&5
8866 echo "$as_me:8866: \$? = $ac_status" >&5
8867 (exit "$ac_status"); } &&
8868 { ac_try='test -s "conftest.$ac_objext"'
8869 { (eval echo "$as_me:8869: \"$ac_try\"") >&5
8872 echo "$as_me:8872: \$? = $ac_status" >&5
8873 (exit "$ac_status"); }; }; then
8876 echo "$as_me: failed program was:" >&5
8877 cat "conftest.$ac_ext" >&5
8880 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8881 CPPFLAGS=$cf_save_CPPFLAGS
8886 if test "$cf_have_incdir" = no ; then
8887 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8889 echo "${as_me:-configure}:8889: testing adding $cf_add_incdir to include-path ..." 1>&5
8891 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8893 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8894 test "$cf_top_incdir" = "$cf_add_incdir" && break
8895 cf_add_incdir="$cf_top_incdir"
8908 echo "$as_me:8908: checking for $cf_ncuhdr_root header in include-path" >&5
8909 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8910 if test "${cf_cv_ncurses_h+set}" = set; then
8911 echo $ECHO_N "(cached) $ECHO_C" >&6
8914 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8915 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
8916 for cf_header in $cf_header_list
8919 cat >"conftest.$ac_ext" <<_ACEOF
8920 #line 8920 "configure"
8921 #include "confdefs.h"
8923 #include <$cf_header>
8928 #ifdef NCURSES_VERSION
8930 printf("%s\\n", NCURSES_VERSION);
8943 rm -f "conftest.$ac_objext"
8944 if { (eval echo "$as_me:8944: \"$ac_compile\"") >&5
8945 (eval $ac_compile) 2>&5
8947 echo "$as_me:8947: \$? = $ac_status" >&5
8948 (exit "$ac_status"); } &&
8949 { ac_try='test -s "conftest.$ac_objext"'
8950 { (eval echo "$as_me:8950: \"$ac_try\"") >&5
8953 echo "$as_me:8953: \$? = $ac_status" >&5
8954 (exit "$ac_status"); }; }; then
8955 cf_cv_ncurses_h=$cf_header
8958 echo "$as_me: failed program was:" >&5
8959 cat "conftest.$ac_ext" >&5
8962 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8964 test "$cf_cv_ncurses_h" != no && break
8968 echo "$as_me:8968: result: $cf_cv_ncurses_h" >&5
8969 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8971 if test "$cf_cv_ncurses_h" != no ; then
8972 cf_cv_ncurses_header=$cf_cv_ncurses_h
8975 echo "$as_me:8975: checking for $cf_ncuhdr_root include-path" >&5
8976 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8977 if test "${cf_cv_ncurses_h2+set}" = set; then
8978 echo $ECHO_N "(cached) $ECHO_C" >&6
8981 test -n "$verbose" && echo
8985 # collect the current set of include-directories from compiler flags
8986 cf_header_path_list=""
8987 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8988 for cf_header_path in $CPPFLAGS $CFLAGS
8990 case "$cf_header_path" in
8992 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8994 test "x$cf_header_path" != "xNONE" && \
8995 test -d "$cf_header_path" && \
8997 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8998 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8999 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
9000 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
9001 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
9002 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"
9005 cf_header_path_list="$cf_header_path_list $cf_search"
9011 # add the variations for the package we are looking for
9015 test "x$prefix" != "xNONE" && \
9016 test -d "$prefix" && \
9018 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
9019 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
9020 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
9021 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
9022 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
9023 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9026 for cf_subdir_prefix in \
9035 test "x$cf_subdir_prefix" != "x$prefix" && \
9036 test -d "$cf_subdir_prefix" && \
9037 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9038 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
9039 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
9040 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
9041 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
9042 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
9043 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"
9048 test "$includedir" != NONE && \
9049 test "$includedir" != "/usr/include" && \
9050 test -d "$includedir" && {
9051 test -d "$includedir" && cf_search="$cf_search $includedir"
9052 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
9055 test "$oldincludedir" != NONE && \
9056 test "$oldincludedir" != "/usr/include" && \
9057 test -d "$oldincludedir" && {
9058 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
9059 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
9062 cf_search="$cf_search $cf_header_path_list"
9064 test -n "$verbose" && echo "search path $cf_search"
9065 cf_save2_CPPFLAGS="$CPPFLAGS"
9066 for cf_incdir in $cf_search
9069 if test -n "$cf_incdir" ; then
9070 for cf_add_incdir in $cf_incdir
9072 while test "$cf_add_incdir" != /usr/include
9074 if test -d "$cf_add_incdir"
9077 if test -n "$CFLAGS$CPPFLAGS" ; then
9078 # a loop is needed to ensure we can add subdirs of existing dirs
9079 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9080 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9081 cf_have_incdir=yes; break
9086 if test "$cf_have_incdir" = no ; then
9087 if test "$cf_add_incdir" = /usr/local/include ; then
9088 if test "$GCC" = yes
9090 cf_save_CPPFLAGS=$CPPFLAGS
9092 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9093 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9095 cat >"conftest.$ac_ext" <<_ACEOF
9096 #line 9096 "configure"
9097 #include "confdefs.h"
9107 rm -f "conftest.$ac_objext"
9108 if { (eval echo "$as_me:9108: \"$ac_compile\"") >&5
9109 (eval $ac_compile) 2>&5
9111 echo "$as_me:9111: \$? = $ac_status" >&5
9112 (exit "$ac_status"); } &&
9113 { ac_try='test -s "conftest.$ac_objext"'
9114 { (eval echo "$as_me:9114: \"$ac_try\"") >&5
9117 echo "$as_me:9117: \$? = $ac_status" >&5
9118 (exit "$ac_status"); }; }; then
9121 echo "$as_me: failed program was:" >&5
9122 cat "conftest.$ac_ext" >&5
9125 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9126 CPPFLAGS=$cf_save_CPPFLAGS
9131 if test "$cf_have_incdir" = no ; then
9132 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9134 echo "${as_me:-configure}:9134: testing adding $cf_add_incdir to include-path ..." 1>&5
9136 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9138 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9139 test "$cf_top_incdir" = "$cf_add_incdir" && break
9140 cf_add_incdir="$cf_top_incdir"
9156 cat >"conftest.$ac_ext" <<_ACEOF
9157 #line 9157 "configure"
9158 #include "confdefs.h"
9160 #include <$cf_header>
9165 #ifdef NCURSES_VERSION
9167 printf("%s\\n", NCURSES_VERSION);
9180 rm -f "conftest.$ac_objext"
9181 if { (eval echo "$as_me:9181: \"$ac_compile\"") >&5
9182 (eval $ac_compile) 2>&5
9184 echo "$as_me:9184: \$? = $ac_status" >&5
9185 (exit "$ac_status"); } &&
9186 { ac_try='test -s "conftest.$ac_objext"'
9187 { (eval echo "$as_me:9187: \"$ac_try\"") >&5
9190 echo "$as_me:9190: \$? = $ac_status" >&5
9191 (exit "$ac_status"); }; }; then
9192 cf_cv_ncurses_h2=$cf_header
9195 echo "$as_me: failed program was:" >&5
9196 cat "conftest.$ac_ext" >&5
9199 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9201 if test "$cf_cv_ncurses_h2" != no ; then
9202 cf_cv_ncurses_h2=$cf_incdir/$cf_header
9203 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
9206 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
9208 CPPFLAGS="$cf_save2_CPPFLAGS"
9209 test "$cf_cv_ncurses_h2" != no && break
9211 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9211: error: not found" >&5
9212 echo "$as_me: error: not found" >&2;}
9213 { (exit 1); exit 1; }; }
9216 echo "$as_me:9216: result: $cf_cv_ncurses_h2" >&5
9217 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
9219 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
9220 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
9221 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
9222 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
9225 if test -n "$cf_1st_incdir" ; then
9226 for cf_add_incdir in $cf_1st_incdir
9228 while test "$cf_add_incdir" != /usr/include
9230 if test -d "$cf_add_incdir"
9233 if test -n "$CFLAGS$CPPFLAGS" ; then
9234 # a loop is needed to ensure we can add subdirs of existing dirs
9235 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9236 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9237 cf_have_incdir=yes; break
9242 if test "$cf_have_incdir" = no ; then
9243 if test "$cf_add_incdir" = /usr/local/include ; then
9244 if test "$GCC" = yes
9246 cf_save_CPPFLAGS=$CPPFLAGS
9248 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9249 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9251 cat >"conftest.$ac_ext" <<_ACEOF
9252 #line 9252 "configure"
9253 #include "confdefs.h"
9263 rm -f "conftest.$ac_objext"
9264 if { (eval echo "$as_me:9264: \"$ac_compile\"") >&5
9265 (eval $ac_compile) 2>&5
9267 echo "$as_me:9267: \$? = $ac_status" >&5
9268 (exit "$ac_status"); } &&
9269 { ac_try='test -s "conftest.$ac_objext"'
9270 { (eval echo "$as_me:9270: \"$ac_try\"") >&5
9273 echo "$as_me:9273: \$? = $ac_status" >&5
9274 (exit "$ac_status"); }; }; then
9277 echo "$as_me: failed program was:" >&5
9278 cat "conftest.$ac_ext" >&5
9281 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9282 CPPFLAGS=$cf_save_CPPFLAGS
9287 if test "$cf_have_incdir" = no ; then
9288 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9290 echo "${as_me:-configure}:9290: testing adding $cf_add_incdir to include-path ..." 1>&5
9292 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9294 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9295 test "$cf_top_incdir" = "$cf_add_incdir" && break
9296 cf_add_incdir="$cf_top_incdir"
9309 # Set definitions to allow ifdef'ing for ncurses.h
9311 case "$cf_cv_ncurses_header" in
9314 cat >>confdefs.h <<\EOF
9315 #define HAVE_NCURSES_H 1
9321 case "$cf_cv_ncurses_header" in
9322 (ncurses/curses.h|ncurses/ncurses.h)
9324 cat >>confdefs.h <<\EOF
9325 #define HAVE_NCURSES_NCURSES_H 1
9329 (ncursesw/curses.h|ncursesw/ncurses.h)
9331 cat >>confdefs.h <<\EOF
9332 #define HAVE_NCURSESW_NCURSES_H 1
9338 echo "$as_me:9338: checking for terminfo header" >&5
9339 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9340 if test "${cf_cv_term_header+set}" = set; then
9341 echo $ECHO_N "(cached) $ECHO_C" >&6
9344 case "${cf_cv_ncurses_header}" in
9345 (*/ncurses.h|*/ncursesw.h)
9346 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9349 cf_term_header=term.h
9353 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9355 cat >"conftest.$ac_ext" <<_ACEOF
9356 #line 9356 "configure"
9357 #include "confdefs.h"
9359 #include <${cf_cv_ncurses_header:-curses.h}>
9365 int x = auto_left_margin; (void)x
9370 rm -f "conftest.$ac_objext"
9371 if { (eval echo "$as_me:9371: \"$ac_compile\"") >&5
9372 (eval $ac_compile) 2>&5
9374 echo "$as_me:9374: \$? = $ac_status" >&5
9375 (exit "$ac_status"); } &&
9376 { ac_try='test -s "conftest.$ac_objext"'
9377 { (eval echo "$as_me:9377: \"$ac_try\"") >&5
9380 echo "$as_me:9380: \$? = $ac_status" >&5
9381 (exit "$ac_status"); }; }; then
9383 cf_cv_term_header="$cf_test"
9385 echo "$as_me: failed program was:" >&5
9386 cat "conftest.$ac_ext" >&5
9388 cf_cv_term_header=unknown
9391 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9392 test "$cf_cv_term_header" != unknown && break
9396 echo "$as_me:9396: result: $cf_cv_term_header" >&5
9397 echo "${ECHO_T}$cf_cv_term_header" >&6
9399 # Set definitions to allow ifdef'ing to accommodate subdirectories
9401 case "$cf_cv_term_header" in
9404 cat >>confdefs.h <<\EOF
9405 #define HAVE_TERM_H 1
9411 case "$cf_cv_term_header" in
9414 cat >>confdefs.h <<\EOF
9415 #define HAVE_NCURSES_TERM_H 1
9421 cat >>confdefs.h <<\EOF
9422 #define HAVE_NCURSESW_TERM_H 1
9428 # some applications need this, but should check for NCURSES_VERSION
9430 cat >>confdefs.h <<\EOF
9434 echo "$as_me:9434: checking for ncurses version" >&5
9435 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9436 if test "${cf_cv_ncurses_version+set}" = set; then
9437 echo $ECHO_N "(cached) $ECHO_C" >&6
9440 cf_cv_ncurses_version=no
9442 rm -f "$cf_tempfile"
9443 if test "$cross_compiling" = yes; then
9445 # This will not work if the preprocessor splits the line after the
9446 # Autoconf token. The 'unproto' program does that.
9447 cat > "conftest.$ac_ext" <<EOF
9448 #include <${cf_cv_ncurses_header:-curses.h}>
9450 #ifdef NCURSES_VERSION
9451 Autoconf NCURSES_VERSION
9459 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9460 { (eval echo "$as_me:9460: \"$cf_try\"") >&5
9463 echo "$as_me:9463: \$? = $ac_status" >&5
9464 (exit "$ac_status"); }
9465 if test -f conftest.out ; then
9466 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
9467 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9472 cat >"conftest.$ac_ext" <<_ACEOF
9473 #line 9473 "configure"
9474 #include "confdefs.h"
9476 #include <${cf_cv_ncurses_header:-curses.h}>
9480 FILE *fp = fopen("$cf_tempfile", "w");
9481 #ifdef NCURSES_VERSION
9482 # ifdef NCURSES_VERSION_PATCH
9483 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9485 fprintf(fp, "%s\\n", NCURSES_VERSION);
9489 fprintf(fp, "old\\n");
9494 ${cf_cv_main_return:-return}(0);
9497 rm -f "conftest$ac_exeext"
9498 if { (eval echo "$as_me:9498: \"$ac_link\"") >&5
9499 (eval $ac_link) 2>&5
9501 echo "$as_me:9501: \$? = $ac_status" >&5
9502 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9503 { (eval echo "$as_me:9503: \"$ac_try\"") >&5
9506 echo "$as_me:9506: \$? = $ac_status" >&5
9507 (exit "$ac_status"); }; }; then
9509 cf_cv_ncurses_version=`cat $cf_tempfile`
9511 echo "$as_me: program exited with status $ac_status" >&5
9512 echo "$as_me: failed program was:" >&5
9513 cat "conftest.$ac_ext" >&5
9515 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9517 rm -f "$cf_tempfile"
9520 echo "$as_me:9520: result: $cf_cv_ncurses_version" >&5
9521 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9522 test "$cf_cv_ncurses_version" = no ||
9523 cat >>confdefs.h <<\EOF
9527 cf_nculib_root=$cf_cv_screen
9528 # This works, except for the special case where we find gpm, but
9529 # ncurses is in a nonstandard location via $LIBS, and we really want
9532 cf_ncurses_SAVE="$LIBS"
9533 echo "$as_me:9533: checking for Gpm_Open in -lgpm" >&5
9534 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9535 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9536 echo $ECHO_N "(cached) $ECHO_C" >&6
9538 ac_check_lib_save_LIBS=$LIBS
9540 cat >"conftest.$ac_ext" <<_ACEOF
9541 #line 9541 "configure"
9542 #include "confdefs.h"
9544 /* Override any gcc2 internal prototype to avoid an error. */
9548 /* We use char because int might match the return type of a gcc2
9549 builtin and then its argument prototype would still apply. */
9559 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9560 if { (eval echo "$as_me:9560: \"$ac_link\"") >&5
9561 (eval $ac_link) 2>&5
9563 echo "$as_me:9563: \$? = $ac_status" >&5
9564 (exit "$ac_status"); } &&
9565 { ac_try='test -s "conftest$ac_exeext"'
9566 { (eval echo "$as_me:9566: \"$ac_try\"") >&5
9569 echo "$as_me:9569: \$? = $ac_status" >&5
9570 (exit "$ac_status"); }; }; then
9571 ac_cv_lib_gpm_Gpm_Open=yes
9573 echo "$as_me: failed program was:" >&5
9574 cat "conftest.$ac_ext" >&5
9575 ac_cv_lib_gpm_Gpm_Open=no
9577 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9578 LIBS=$ac_check_lib_save_LIBS
9580 echo "$as_me:9580: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9581 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9582 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
9583 echo "$as_me:9583: checking for initscr in -lgpm" >&5
9584 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9585 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9586 echo $ECHO_N "(cached) $ECHO_C" >&6
9588 ac_check_lib_save_LIBS=$LIBS
9590 cat >"conftest.$ac_ext" <<_ACEOF
9591 #line 9591 "configure"
9592 #include "confdefs.h"
9594 /* Override any gcc2 internal prototype to avoid an error. */
9598 /* We use char because int might match the return type of a gcc2
9599 builtin and then its argument prototype would still apply. */
9609 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9610 if { (eval echo "$as_me:9610: \"$ac_link\"") >&5
9611 (eval $ac_link) 2>&5
9613 echo "$as_me:9613: \$? = $ac_status" >&5
9614 (exit "$ac_status"); } &&
9615 { ac_try='test -s "conftest$ac_exeext"'
9616 { (eval echo "$as_me:9616: \"$ac_try\"") >&5
9619 echo "$as_me:9619: \$? = $ac_status" >&5
9620 (exit "$ac_status"); }; }; then
9621 ac_cv_lib_gpm_initscr=yes
9623 echo "$as_me: failed program was:" >&5
9624 cat "conftest.$ac_ext" >&5
9625 ac_cv_lib_gpm_initscr=no
9627 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9628 LIBS=$ac_check_lib_save_LIBS
9630 echo "$as_me:9630: result: $ac_cv_lib_gpm_initscr" >&5
9631 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9632 if test "$ac_cv_lib_gpm_initscr" = yes; then
9633 LIBS="$cf_ncurses_SAVE"
9635 cf_ncurses_LIBS="-lgpm"
9642 # This is only necessary if you are linking against an obsolete
9643 # version of ncurses (but it should do no harm, since it's static).
9644 if test "$cf_nculib_root" = ncurses ; then
9645 echo "$as_me:9645: checking for tgoto in -lmytinfo" >&5
9646 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9647 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9648 echo $ECHO_N "(cached) $ECHO_C" >&6
9650 ac_check_lib_save_LIBS=$LIBS
9651 LIBS="-lmytinfo $LIBS"
9652 cat >"conftest.$ac_ext" <<_ACEOF
9653 #line 9653 "configure"
9654 #include "confdefs.h"
9656 /* Override any gcc2 internal prototype to avoid an error. */
9660 /* We use char because int might match the return type of a gcc2
9661 builtin and then its argument prototype would still apply. */
9671 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9672 if { (eval echo "$as_me:9672: \"$ac_link\"") >&5
9673 (eval $ac_link) 2>&5
9675 echo "$as_me:9675: \$? = $ac_status" >&5
9676 (exit "$ac_status"); } &&
9677 { ac_try='test -s "conftest$ac_exeext"'
9678 { (eval echo "$as_me:9678: \"$ac_try\"") >&5
9681 echo "$as_me:9681: \$? = $ac_status" >&5
9682 (exit "$ac_status"); }; }; then
9683 ac_cv_lib_mytinfo_tgoto=yes
9685 echo "$as_me: failed program was:" >&5
9686 cat "conftest.$ac_ext" >&5
9687 ac_cv_lib_mytinfo_tgoto=no
9689 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9690 LIBS=$ac_check_lib_save_LIBS
9692 echo "$as_me:9692: result: $ac_cv_lib_mytinfo_tgoto" >&5
9693 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9694 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
9695 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9705 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9707 for cf_add_1lib in $cf_add_0lib; do
9708 for cf_add_2lib in $cf_add_libs; do
9709 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9714 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9718 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
9724 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9726 for cf_add_1lib in $cf_add_0lib; do
9727 for cf_add_2lib in $cf_add_libs; do
9728 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9733 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9739 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
9741 echo "$as_me:9741: checking for initscr" >&5
9742 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9743 if test "${ac_cv_func_initscr+set}" = set; then
9744 echo $ECHO_N "(cached) $ECHO_C" >&6
9746 cat >"conftest.$ac_ext" <<_ACEOF
9747 #line 9747 "configure"
9748 #include "confdefs.h"
9749 #define initscr autoconf_temporary
9750 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9757 /* We use char because int might match the return type of a gcc2
9758 builtin and then its argument prototype would still apply. */
9759 char initscr (void);
9765 /* The GNU C library defines stubs for functions which it implements
9766 to always fail with ENOSYS. Some functions are actually named
9767 something starting with __ and the normal name is an alias. */
9768 #if defined (__stub_initscr) || defined (__stub___initscr)
9769 #error found stub for initscr
9777 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9778 if { (eval echo "$as_me:9778: \"$ac_link\"") >&5
9779 (eval $ac_link) 2>&5
9781 echo "$as_me:9781: \$? = $ac_status" >&5
9782 (exit "$ac_status"); } &&
9783 { ac_try='test -s "conftest$ac_exeext"'
9784 { (eval echo "$as_me:9784: \"$ac_try\"") >&5
9787 echo "$as_me:9787: \$? = $ac_status" >&5
9788 (exit "$ac_status"); }; }; then
9789 ac_cv_func_initscr=yes
9791 echo "$as_me: failed program was:" >&5
9792 cat "conftest.$ac_ext" >&5
9793 ac_cv_func_initscr=no
9795 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9797 echo "$as_me:9797: result: $ac_cv_func_initscr" >&5
9798 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9799 if test "$ac_cv_func_initscr" = yes; then
9800 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9803 cf_save_LIBS="$LIBS"
9804 echo "$as_me:9804: checking for initscr in -l$cf_nculib_root" >&5
9805 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9806 LIBS="-l$cf_nculib_root $LIBS"
9807 cat >"conftest.$ac_ext" <<_ACEOF
9808 #line 9808 "configure"
9809 #include "confdefs.h"
9810 #include <${cf_cv_ncurses_header:-curses.h}>
9819 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9820 if { (eval echo "$as_me:9820: \"$ac_link\"") >&5
9821 (eval $ac_link) 2>&5
9823 echo "$as_me:9823: \$? = $ac_status" >&5
9824 (exit "$ac_status"); } &&
9825 { ac_try='test -s "conftest$ac_exeext"'
9826 { (eval echo "$as_me:9826: \"$ac_try\"") >&5
9829 echo "$as_me:9829: \$? = $ac_status" >&5
9830 (exit "$ac_status"); }; }; then
9831 echo "$as_me:9831: result: yes" >&5
9832 echo "${ECHO_T}yes" >&6
9833 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9836 echo "$as_me: failed program was:" >&5
9837 cat "conftest.$ac_ext" >&5
9838 echo "$as_me:9838: result: no" >&5
9839 echo "${ECHO_T}no" >&6
9842 cf_library_path_list=""
9843 if test -n "${LDFLAGS}${LIBS}" ; then
9844 for cf_library_path in $LDFLAGS $LIBS
9846 case "$cf_library_path" in
9848 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9850 test "x$cf_library_path" != "xNONE" && \
9851 test -d "$cf_library_path" && \
9853 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9854 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
9855 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9856 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9857 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9858 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"
9861 cf_library_path_list="$cf_library_path_list $cf_search"
9869 test "x$prefix" != "xNONE" && \
9870 test -d "$prefix" && \
9872 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9873 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
9874 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9875 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9876 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9877 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9880 for cf_subdir_prefix in \
9889 test "x$cf_subdir_prefix" != "x$prefix" && \
9890 test -d "$cf_subdir_prefix" && \
9891 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9892 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9893 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
9894 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9895 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9896 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9897 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"
9902 cf_search="$cf_library_path_list $cf_search"
9904 for cf_libdir in $cf_search
9906 echo "$as_me:9906: checking for -l$cf_nculib_root in $cf_libdir" >&5
9907 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9908 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9909 cat >"conftest.$ac_ext" <<_ACEOF
9910 #line 9910 "configure"
9911 #include "confdefs.h"
9912 #include <${cf_cv_ncurses_header:-curses.h}>
9921 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9922 if { (eval echo "$as_me:9922: \"$ac_link\"") >&5
9923 (eval $ac_link) 2>&5
9925 echo "$as_me:9925: \$? = $ac_status" >&5
9926 (exit "$ac_status"); } &&
9927 { ac_try='test -s "conftest$ac_exeext"'
9928 { (eval echo "$as_me:9928: \"$ac_try\"") >&5
9931 echo "$as_me:9931: \$? = $ac_status" >&5
9932 (exit "$ac_status"); }; }; then
9933 echo "$as_me:9933: result: yes" >&5
9934 echo "${ECHO_T}yes" >&6
9935 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9938 echo "$as_me: failed program was:" >&5
9939 cat "conftest.$ac_ext" >&5
9940 echo "$as_me:9940: result: no" >&5
9941 echo "${ECHO_T}no" >&6
9942 LIBS="$cf_save_LIBS"
9944 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9948 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9952 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
9954 if test "$cf_found_library" = no ; then
9955 { { echo "$as_me:9955: error: Cannot link $cf_nculib_root library" >&5
9956 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9957 { (exit 1); exit 1; }; }
9962 if test -n "$cf_ncurses_LIBS" ; then
9963 echo "$as_me:9963: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9964 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9965 cf_ncurses_SAVE="$LIBS"
9966 for p in $cf_ncurses_LIBS ; do
9967 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
9968 if test "$q" != "$LIBS" ; then
9972 cat >"conftest.$ac_ext" <<_ACEOF
9973 #line 9973 "configure"
9974 #include "confdefs.h"
9975 #include <${cf_cv_ncurses_header:-curses.h}>
9979 initscr(); mousemask(0,0); tigetstr((char *)0);
9984 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9985 if { (eval echo "$as_me:9985: \"$ac_link\"") >&5
9986 (eval $ac_link) 2>&5
9988 echo "$as_me:9988: \$? = $ac_status" >&5
9989 (exit "$ac_status"); } &&
9990 { ac_try='test -s "conftest$ac_exeext"'
9991 { (eval echo "$as_me:9991: \"$ac_try\"") >&5
9994 echo "$as_me:9994: \$? = $ac_status" >&5
9995 (exit "$ac_status"); }; }; then
9996 echo "$as_me:9996: result: yes" >&5
9997 echo "${ECHO_T}yes" >&6
9999 echo "$as_me: failed program was:" >&5
10000 cat "conftest.$ac_ext" >&5
10001 echo "$as_me:10001: result: no" >&5
10002 echo "${ECHO_T}no" >&6
10003 LIBS="$cf_ncurses_SAVE"
10005 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10008 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10010 cat >>confdefs.h <<EOF
10011 #define $cf_nculib_ROOT 1
10016 NCURSES_CONFIG=none
10022 cf_ncuconfig_root=$cf_cv_screen
10023 cf_have_ncuconfig=no
10025 if test "x${PKG_CONFIG:=none}" != xnone; then
10026 echo "$as_me:10026: checking pkg-config for $cf_ncuconfig_root" >&5
10027 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
10028 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
10029 echo "$as_me:10029: result: yes" >&5
10030 echo "${ECHO_T}yes" >&6
10032 echo "$as_me:10032: checking if the $cf_ncuconfig_root package files work" >&5
10033 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
10034 cf_have_ncuconfig=unknown
10036 cf_save_CFLAGS="$CFLAGS"
10037 cf_save_CPPFLAGS="$CPPFLAGS"
10038 cf_save_LIBS="$LIBS"
10040 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
10041 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
10043 # while -W for passing linker flags is prevalent, it is not "standard".
10044 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
10045 # incompatible _and_ non-standard -W option which gives an error. Work
10046 # around that pitfall.
10047 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
10053 cf_new_extra_cppflags=
10055 for cf_add_cflags in $cf_pkg_cflags
10057 case "$cf_fix_cppflags" in
10059 case "$cf_add_cflags" in
10060 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10061 case "$cf_add_cflags" in
10063 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10065 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10066 && test -z "${cf_tst_cflags}" \
10067 && cf_fix_cppflags=yes
10069 if test "$cf_fix_cppflags" = yes ; then
10071 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10072 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10075 elif test "${cf_tst_cflags}" = "\"'" ; then
10077 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10078 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10084 case "$CPPFLAGS" in
10088 case "$cf_add_cflags" in
10090 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10092 CPPFLAGS=`echo "$CPPFLAGS" | \
10093 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10094 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10099 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10100 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10107 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10108 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10115 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10116 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10118 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10120 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10121 && test -z "${cf_tst_cflags}" \
10122 && cf_fix_cppflags=no
10127 if test -n "$cf_new_cflags" ; then
10129 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10130 CFLAGS="${CFLAGS}$cf_new_cflags"
10134 if test -n "$cf_new_cppflags" ; then
10136 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10137 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10141 if test -n "$cf_new_extra_cppflags" ; then
10143 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10144 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10148 cf_add_libs="$LIBS"
10151 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10152 # filter duplicates
10153 for cf_add_1lib in $cf_add_0lib; do
10154 for cf_add_2lib in $cf_add_libs; do
10155 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10160 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10162 LIBS="$cf_add_libs"
10164 cat >"conftest.$ac_ext" <<_ACEOF
10165 #line 10165 "configure"
10166 #include "confdefs.h"
10167 #include <${cf_cv_ncurses_header:-curses.h}>
10171 initscr(); mousemask(0,0); tigetstr((char *)0);
10176 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10177 if { (eval echo "$as_me:10177: \"$ac_link\"") >&5
10178 (eval $ac_link) 2>&5
10180 echo "$as_me:10180: \$? = $ac_status" >&5
10181 (exit "$ac_status"); } &&
10182 { ac_try='test -s "conftest$ac_exeext"'
10183 { (eval echo "$as_me:10183: \"$ac_try\"") >&5
10184 (eval $ac_try) 2>&5
10186 echo "$as_me:10186: \$? = $ac_status" >&5
10187 (exit "$ac_status"); }; }; then
10188 if test "$cross_compiling" = yes; then
10189 cf_test_ncuconfig=maybe
10191 cat >"conftest.$ac_ext" <<_ACEOF
10192 #line 10192 "configure"
10193 #include "confdefs.h"
10194 #include <${cf_cv_ncurses_header:-curses.h}>
10196 { const char *xx = curses_version(); return (xx == 0); }
10198 rm -f "conftest$ac_exeext"
10199 if { (eval echo "$as_me:10199: \"$ac_link\"") >&5
10200 (eval $ac_link) 2>&5
10202 echo "$as_me:10202: \$? = $ac_status" >&5
10203 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10204 { (eval echo "$as_me:10204: \"$ac_try\"") >&5
10205 (eval $ac_try) 2>&5
10207 echo "$as_me:10207: \$? = $ac_status" >&5
10208 (exit "$ac_status"); }; }; then
10209 cf_test_ncuconfig=yes
10211 echo "$as_me: program exited with status $ac_status" >&5
10212 echo "$as_me: failed program was:" >&5
10213 cat "conftest.$ac_ext" >&5
10214 cf_test_ncuconfig=no
10216 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10219 echo "$as_me: failed program was:" >&5
10220 cat "conftest.$ac_ext" >&5
10221 cf_test_ncuconfig=no
10223 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10225 CFLAGS="$cf_save_CFLAGS"
10226 CPPFLAGS="$cf_save_CPPFLAGS"
10227 LIBS="$cf_save_LIBS"
10229 if test "x$cf_test_ncuconfig" != xyes; then
10230 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
10231 cf_pkg_cflags="$cf_temp"
10232 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
10233 cf_pkg_libs="$cf_temp"
10241 cf_new_extra_cppflags=
10243 for cf_add_cflags in $cf_pkg_cflags
10245 case "$cf_fix_cppflags" in
10247 case "$cf_add_cflags" in
10248 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10249 case "$cf_add_cflags" in
10251 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10253 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10254 && test -z "${cf_tst_cflags}" \
10255 && cf_fix_cppflags=yes
10257 if test "$cf_fix_cppflags" = yes ; then
10259 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10260 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10263 elif test "${cf_tst_cflags}" = "\"'" ; then
10265 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10266 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10272 case "$CPPFLAGS" in
10276 case "$cf_add_cflags" in
10278 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10280 CPPFLAGS=`echo "$CPPFLAGS" | \
10281 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10282 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10287 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10288 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10295 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10296 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10303 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10304 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10306 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10308 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10309 && test -z "${cf_tst_cflags}" \
10310 && cf_fix_cppflags=no
10315 if test -n "$cf_new_cflags" ; then
10317 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10318 CFLAGS="${CFLAGS}$cf_new_cflags"
10322 if test -n "$cf_new_cppflags" ; then
10324 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10325 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10329 if test -n "$cf_new_extra_cppflags" ; then
10331 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10332 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10336 cf_add_libs="$LIBS"
10339 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10340 # filter duplicates
10341 for cf_add_1lib in $cf_add_0lib; do
10342 for cf_add_2lib in $cf_add_libs; do
10343 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10348 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10350 LIBS="$cf_add_libs"
10352 cat >"conftest.$ac_ext" <<_ACEOF
10353 #line 10353 "configure"
10354 #include "confdefs.h"
10355 #include <${cf_cv_ncurses_header:-curses.h}>
10359 initscr(); mousemask(0,0); tigetstr((char *)0);
10364 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10365 if { (eval echo "$as_me:10365: \"$ac_link\"") >&5
10366 (eval $ac_link) 2>&5
10368 echo "$as_me:10368: \$? = $ac_status" >&5
10369 (exit "$ac_status"); } &&
10370 { ac_try='test -s "conftest$ac_exeext"'
10371 { (eval echo "$as_me:10371: \"$ac_try\"") >&5
10372 (eval $ac_try) 2>&5
10374 echo "$as_me:10374: \$? = $ac_status" >&5
10375 (exit "$ac_status"); }; }; then
10376 if test "$cross_compiling" = yes; then
10377 cf_have_ncuconfig=maybe
10379 cat >"conftest.$ac_ext" <<_ACEOF
10380 #line 10380 "configure"
10381 #include "confdefs.h"
10382 #include <${cf_cv_ncurses_header:-curses.h}>
10384 { const char *xx = curses_version(); return (xx == 0); }
10386 rm -f "conftest$ac_exeext"
10387 if { (eval echo "$as_me:10387: \"$ac_link\"") >&5
10388 (eval $ac_link) 2>&5
10390 echo "$as_me:10390: \$? = $ac_status" >&5
10391 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10392 { (eval echo "$as_me:10392: \"$ac_try\"") >&5
10393 (eval $ac_try) 2>&5
10395 echo "$as_me:10395: \$? = $ac_status" >&5
10396 (exit "$ac_status"); }; }; then
10397 cf_have_ncuconfig=yes
10399 echo "$as_me: program exited with status $ac_status" >&5
10400 echo "$as_me: failed program was:" >&5
10401 cat "conftest.$ac_ext" >&5
10402 cf_have_ncuconfig=no
10404 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10407 echo "$as_me: failed program was:" >&5
10408 cat "conftest.$ac_ext" >&5
10409 cf_have_ncuconfig=no
10411 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10412 echo "$as_me:10412: result: $cf_have_ncuconfig" >&5
10413 echo "${ECHO_T}$cf_have_ncuconfig" >&6
10414 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
10415 if test "$cf_have_ncuconfig" != "yes"
10417 CPPFLAGS="$cf_save_CPPFLAGS"
10418 LIBS="$cf_save_LIBS"
10419 NCURSES_CONFIG_PKG=none
10422 cat >>confdefs.h <<\EOF
10426 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
10428 echo "$as_me:10428: checking for terminfo header" >&5
10429 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10430 if test "${cf_cv_term_header+set}" = set; then
10431 echo $ECHO_N "(cached) $ECHO_C" >&6
10434 case "${cf_cv_ncurses_header}" in
10435 (*/ncurses.h|*/ncursesw.h)
10436 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10439 cf_term_header=term.h
10443 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10445 cat >"conftest.$ac_ext" <<_ACEOF
10446 #line 10446 "configure"
10447 #include "confdefs.h"
10449 #include <${cf_cv_ncurses_header:-curses.h}>
10450 #include <$cf_test>
10455 int x = auto_left_margin; (void)x
10460 rm -f "conftest.$ac_objext"
10461 if { (eval echo "$as_me:10461: \"$ac_compile\"") >&5
10462 (eval $ac_compile) 2>&5
10464 echo "$as_me:10464: \$? = $ac_status" >&5
10465 (exit "$ac_status"); } &&
10466 { ac_try='test -s "conftest.$ac_objext"'
10467 { (eval echo "$as_me:10467: \"$ac_try\"") >&5
10468 (eval $ac_try) 2>&5
10470 echo "$as_me:10470: \$? = $ac_status" >&5
10471 (exit "$ac_status"); }; }; then
10473 cf_cv_term_header="$cf_test"
10475 echo "$as_me: failed program was:" >&5
10476 cat "conftest.$ac_ext" >&5
10478 cf_cv_term_header=unknown
10481 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10482 test "$cf_cv_term_header" != unknown && break
10486 echo "$as_me:10486: result: $cf_cv_term_header" >&5
10487 echo "${ECHO_T}$cf_cv_term_header" >&6
10489 # Set definitions to allow ifdef'ing to accommodate subdirectories
10491 case "$cf_cv_term_header" in
10494 cat >>confdefs.h <<\EOF
10495 #define HAVE_TERM_H 1
10501 case "$cf_cv_term_header" in
10504 cat >>confdefs.h <<\EOF
10505 #define HAVE_NCURSES_TERM_H 1
10511 cat >>confdefs.h <<\EOF
10512 #define HAVE_NCURSESW_TERM_H 1
10521 echo "$as_me:10521: result: no" >&5
10522 echo "${ECHO_T}no" >&6
10523 NCURSES_CONFIG_PKG=none
10526 NCURSES_CONFIG_PKG=none
10529 if test "x$cf_have_ncuconfig" = "xno"; then
10530 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
10532 if test -n "$ac_tool_prefix"; then
10533 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10535 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
10536 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
10537 echo "$as_me:10537: checking for $ac_word" >&5
10538 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10539 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
10540 echo $ECHO_N "(cached) $ECHO_C" >&6
10542 if test -n "$NCURSES_CONFIG"; then
10543 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
10545 ac_save_IFS=$IFS; IFS=$ac_path_separator
10547 for ac_dir in $ac_dummy; do
10549 test -z "$ac_dir" && ac_dir=.
10550 $as_executable_p "$ac_dir/$ac_word" || continue
10551 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
10552 echo "$as_me:10552: found $ac_dir/$ac_word" >&5
10558 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
10559 if test -n "$NCURSES_CONFIG"; then
10560 echo "$as_me:10560: result: $NCURSES_CONFIG" >&5
10561 echo "${ECHO_T}$NCURSES_CONFIG" >&6
10563 echo "$as_me:10563: result: no" >&5
10564 echo "${ECHO_T}no" >&6
10567 test -n "$NCURSES_CONFIG" && break
10570 if test -z "$NCURSES_CONFIG"; then
10571 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
10572 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10574 # Extract the first word of "$ac_prog", so it can be a program name with args.
10575 set dummy $ac_prog; ac_word=$2
10576 echo "$as_me:10576: checking for $ac_word" >&5
10577 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10578 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
10579 echo $ECHO_N "(cached) $ECHO_C" >&6
10581 if test -n "$ac_ct_NCURSES_CONFIG"; then
10582 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
10584 ac_save_IFS=$IFS; IFS=$ac_path_separator
10586 for ac_dir in $ac_dummy; do
10588 test -z "$ac_dir" && ac_dir=.
10589 $as_executable_p "$ac_dir/$ac_word" || continue
10590 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
10591 echo "$as_me:10591: found $ac_dir/$ac_word" >&5
10597 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
10598 if test -n "$ac_ct_NCURSES_CONFIG"; then
10599 echo "$as_me:10599: result: $ac_ct_NCURSES_CONFIG" >&5
10600 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
10602 echo "$as_me:10602: result: no" >&5
10603 echo "${ECHO_T}no" >&6
10606 test -n "$ac_ct_NCURSES_CONFIG" && break
10608 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
10610 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
10613 if test "$NCURSES_CONFIG" != none ; then
10618 cf_new_extra_cppflags=
10620 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
10622 case "$cf_fix_cppflags" in
10624 case "$cf_add_cflags" in
10625 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10626 case "$cf_add_cflags" in
10628 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10630 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10631 && test -z "${cf_tst_cflags}" \
10632 && cf_fix_cppflags=yes
10634 if test "$cf_fix_cppflags" = yes ; then
10636 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10637 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10640 elif test "${cf_tst_cflags}" = "\"'" ; then
10642 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10643 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10649 case "$CPPFLAGS" in
10653 case "$cf_add_cflags" in
10655 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10657 CPPFLAGS=`echo "$CPPFLAGS" | \
10658 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10659 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10664 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10665 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10672 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10673 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10680 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10681 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10683 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10685 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10686 && test -z "${cf_tst_cflags}" \
10687 && cf_fix_cppflags=no
10692 if test -n "$cf_new_cflags" ; then
10694 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10695 CFLAGS="${CFLAGS}$cf_new_cflags"
10699 if test -n "$cf_new_cppflags" ; then
10701 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10702 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10706 if test -n "$cf_new_extra_cppflags" ; then
10708 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10709 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10713 cf_add_libs="$LIBS"
10716 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10717 # filter duplicates
10718 for cf_add_1lib in $cf_add_0lib; do
10719 for cf_add_2lib in $cf_add_libs; do
10720 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10725 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10727 LIBS="$cf_add_libs"
10729 # even with config script, some packages use no-override for curses.h
10731 echo "$as_me:10731: checking if we have identified curses headers" >&5
10732 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10733 if test "${cf_cv_ncurses_header+set}" = set; then
10734 echo $ECHO_N "(cached) $ECHO_C" >&6
10737 cf_cv_ncurses_header=none
10739 ncurses.h $cf_cv_screen/ncurses.h \
10740 curses.h $cf_cv_screen/curses.h
10742 cat >"conftest.$ac_ext" <<_ACEOF
10743 #line 10743 "configure"
10744 #include "confdefs.h"
10745 #include <${cf_header}>
10749 initscr(); tgoto("?", 0,0)
10754 rm -f "conftest.$ac_objext"
10755 if { (eval echo "$as_me:10755: \"$ac_compile\"") >&5
10756 (eval $ac_compile) 2>&5
10758 echo "$as_me:10758: \$? = $ac_status" >&5
10759 (exit "$ac_status"); } &&
10760 { ac_try='test -s "conftest.$ac_objext"'
10761 { (eval echo "$as_me:10761: \"$ac_try\"") >&5
10762 (eval $ac_try) 2>&5
10764 echo "$as_me:10764: \$? = $ac_status" >&5
10765 (exit "$ac_status"); }; }; then
10766 cf_cv_ncurses_header=$cf_header; break
10768 echo "$as_me: failed program was:" >&5
10769 cat "conftest.$ac_ext" >&5
10771 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10775 echo "$as_me:10775: result: $cf_cv_ncurses_header" >&5
10776 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10778 if test "$cf_cv_ncurses_header" = none ; then
10779 { { echo "$as_me:10779: error: No curses header-files found" >&5
10780 echo "$as_me: error: No curses header-files found" >&2;}
10781 { (exit 1); exit 1; }; }
10784 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10786 for ac_header in $cf_cv_ncurses_header
10788 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10789 echo "$as_me:10789: checking for $ac_header" >&5
10790 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10791 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10792 echo $ECHO_N "(cached) $ECHO_C" >&6
10794 cat >"conftest.$ac_ext" <<_ACEOF
10795 #line 10795 "configure"
10796 #include "confdefs.h"
10797 #include <$ac_header>
10799 if { (eval echo "$as_me:10799: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10800 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10802 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10804 cat conftest.err >&5
10805 echo "$as_me:10805: \$? = $ac_status" >&5
10806 (exit "$ac_status"); } >/dev/null; then
10807 if test -s conftest.err; then
10808 ac_cpp_err=$ac_c_preproc_warn_flag
10815 if test -z "$ac_cpp_err"; then
10816 eval "$as_ac_Header=yes"
10818 echo "$as_me: failed program was:" >&5
10819 cat "conftest.$ac_ext" >&5
10820 eval "$as_ac_Header=no"
10822 rm -f conftest.err "conftest.$ac_ext"
10824 echo "$as_me:10824: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10825 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10826 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10827 cat >>confdefs.h <<EOF
10828 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10834 cat >>confdefs.h <<\EOF
10838 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10840 cat >>confdefs.h <<EOF
10841 #define $cf_nculib_ROOT 1
10844 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
10848 cf_ncuhdr_root=$cf_cv_screen
10850 test -n "$cf_cv_curses_dir" && \
10851 test "$cf_cv_curses_dir" != "no" && { \
10853 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
10854 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
10856 while test "$cf_add_incdir" != /usr/include
10858 if test -d "$cf_add_incdir"
10861 if test -n "$CFLAGS$CPPFLAGS" ; then
10862 # a loop is needed to ensure we can add subdirs of existing dirs
10863 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10864 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10865 cf_have_incdir=yes; break
10870 if test "$cf_have_incdir" = no ; then
10871 if test "$cf_add_incdir" = /usr/local/include ; then
10872 if test "$GCC" = yes
10874 cf_save_CPPFLAGS=$CPPFLAGS
10876 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10877 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10879 cat >"conftest.$ac_ext" <<_ACEOF
10880 #line 10880 "configure"
10881 #include "confdefs.h"
10891 rm -f "conftest.$ac_objext"
10892 if { (eval echo "$as_me:10892: \"$ac_compile\"") >&5
10893 (eval $ac_compile) 2>&5
10895 echo "$as_me:10895: \$? = $ac_status" >&5
10896 (exit "$ac_status"); } &&
10897 { ac_try='test -s "conftest.$ac_objext"'
10898 { (eval echo "$as_me:10898: \"$ac_try\"") >&5
10899 (eval $ac_try) 2>&5
10901 echo "$as_me:10901: \$? = $ac_status" >&5
10902 (exit "$ac_status"); }; }; then
10905 echo "$as_me: failed program was:" >&5
10906 cat "conftest.$ac_ext" >&5
10909 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10910 CPPFLAGS=$cf_save_CPPFLAGS
10915 if test "$cf_have_incdir" = no ; then
10916 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10918 echo "${as_me:-configure}:10918: testing adding $cf_add_incdir to include-path ..." 1>&5
10920 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10922 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10923 test "$cf_top_incdir" = "$cf_add_incdir" && break
10924 cf_add_incdir="$cf_top_incdir"
10937 echo "$as_me:10937: checking for $cf_ncuhdr_root header in include-path" >&5
10938 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10939 if test "${cf_cv_ncurses_h+set}" = set; then
10940 echo $ECHO_N "(cached) $ECHO_C" >&6
10943 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10944 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
10945 for cf_header in $cf_header_list
10948 cat >"conftest.$ac_ext" <<_ACEOF
10949 #line 10949 "configure"
10950 #include "confdefs.h"
10952 #include <$cf_header>
10957 #ifdef NCURSES_VERSION
10959 printf("%s\\n", NCURSES_VERSION);
10972 rm -f "conftest.$ac_objext"
10973 if { (eval echo "$as_me:10973: \"$ac_compile\"") >&5
10974 (eval $ac_compile) 2>&5
10976 echo "$as_me:10976: \$? = $ac_status" >&5
10977 (exit "$ac_status"); } &&
10978 { ac_try='test -s "conftest.$ac_objext"'
10979 { (eval echo "$as_me:10979: \"$ac_try\"") >&5
10980 (eval $ac_try) 2>&5
10982 echo "$as_me:10982: \$? = $ac_status" >&5
10983 (exit "$ac_status"); }; }; then
10984 cf_cv_ncurses_h=$cf_header
10987 echo "$as_me: failed program was:" >&5
10988 cat "conftest.$ac_ext" >&5
10991 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10993 test "$cf_cv_ncurses_h" != no && break
10997 echo "$as_me:10997: result: $cf_cv_ncurses_h" >&5
10998 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
11000 if test "$cf_cv_ncurses_h" != no ; then
11001 cf_cv_ncurses_header=$cf_cv_ncurses_h
11004 echo "$as_me:11004: checking for $cf_ncuhdr_root include-path" >&5
11005 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
11006 if test "${cf_cv_ncurses_h2+set}" = set; then
11007 echo $ECHO_N "(cached) $ECHO_C" >&6
11010 test -n "$verbose" && echo
11014 # collect the current set of include-directories from compiler flags
11015 cf_header_path_list=""
11016 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11017 for cf_header_path in $CPPFLAGS $CFLAGS
11019 case "$cf_header_path" in
11021 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11023 test "x$cf_header_path" != "xNONE" && \
11024 test -d "$cf_header_path" && \
11026 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
11027 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
11028 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
11029 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
11030 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
11031 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"
11034 cf_header_path_list="$cf_header_path_list $cf_search"
11040 # add the variations for the package we are looking for
11044 test "x$prefix" != "xNONE" && \
11045 test -d "$prefix" && \
11047 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
11048 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
11049 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
11050 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
11051 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
11052 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
11055 for cf_subdir_prefix in \
11064 test "x$cf_subdir_prefix" != "x$prefix" && \
11065 test -d "$cf_subdir_prefix" && \
11066 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11067 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
11068 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
11069 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
11070 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
11071 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
11072 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"
11077 test "$includedir" != NONE && \
11078 test "$includedir" != "/usr/include" && \
11079 test -d "$includedir" && {
11080 test -d "$includedir" && cf_search="$cf_search $includedir"
11081 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
11084 test "$oldincludedir" != NONE && \
11085 test "$oldincludedir" != "/usr/include" && \
11086 test -d "$oldincludedir" && {
11087 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
11088 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
11091 cf_search="$cf_search $cf_header_path_list"
11093 test -n "$verbose" && echo "search path $cf_search"
11094 cf_save2_CPPFLAGS="$CPPFLAGS"
11095 for cf_incdir in $cf_search
11098 if test -n "$cf_incdir" ; then
11099 for cf_add_incdir in $cf_incdir
11101 while test "$cf_add_incdir" != /usr/include
11103 if test -d "$cf_add_incdir"
11106 if test -n "$CFLAGS$CPPFLAGS" ; then
11107 # a loop is needed to ensure we can add subdirs of existing dirs
11108 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11109 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11110 cf_have_incdir=yes; break
11115 if test "$cf_have_incdir" = no ; then
11116 if test "$cf_add_incdir" = /usr/local/include ; then
11117 if test "$GCC" = yes
11119 cf_save_CPPFLAGS=$CPPFLAGS
11121 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11122 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11124 cat >"conftest.$ac_ext" <<_ACEOF
11125 #line 11125 "configure"
11126 #include "confdefs.h"
11136 rm -f "conftest.$ac_objext"
11137 if { (eval echo "$as_me:11137: \"$ac_compile\"") >&5
11138 (eval $ac_compile) 2>&5
11140 echo "$as_me:11140: \$? = $ac_status" >&5
11141 (exit "$ac_status"); } &&
11142 { ac_try='test -s "conftest.$ac_objext"'
11143 { (eval echo "$as_me:11143: \"$ac_try\"") >&5
11144 (eval $ac_try) 2>&5
11146 echo "$as_me:11146: \$? = $ac_status" >&5
11147 (exit "$ac_status"); }; }; then
11150 echo "$as_me: failed program was:" >&5
11151 cat "conftest.$ac_ext" >&5
11154 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11155 CPPFLAGS=$cf_save_CPPFLAGS
11160 if test "$cf_have_incdir" = no ; then
11161 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11163 echo "${as_me:-configure}:11163: testing adding $cf_add_incdir to include-path ..." 1>&5
11165 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11167 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11168 test "$cf_top_incdir" = "$cf_add_incdir" && break
11169 cf_add_incdir="$cf_top_incdir"
11185 cat >"conftest.$ac_ext" <<_ACEOF
11186 #line 11186 "configure"
11187 #include "confdefs.h"
11189 #include <$cf_header>
11194 #ifdef NCURSES_VERSION
11196 printf("%s\\n", NCURSES_VERSION);
11209 rm -f "conftest.$ac_objext"
11210 if { (eval echo "$as_me:11210: \"$ac_compile\"") >&5
11211 (eval $ac_compile) 2>&5
11213 echo "$as_me:11213: \$? = $ac_status" >&5
11214 (exit "$ac_status"); } &&
11215 { ac_try='test -s "conftest.$ac_objext"'
11216 { (eval echo "$as_me:11216: \"$ac_try\"") >&5
11217 (eval $ac_try) 2>&5
11219 echo "$as_me:11219: \$? = $ac_status" >&5
11220 (exit "$ac_status"); }; }; then
11221 cf_cv_ncurses_h2=$cf_header
11224 echo "$as_me: failed program was:" >&5
11225 cat "conftest.$ac_ext" >&5
11226 cf_cv_ncurses_h2=no
11228 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11230 if test "$cf_cv_ncurses_h2" != no ; then
11231 cf_cv_ncurses_h2=$cf_incdir/$cf_header
11232 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
11235 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
11237 CPPFLAGS="$cf_save2_CPPFLAGS"
11238 test "$cf_cv_ncurses_h2" != no && break
11240 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:11240: error: not found" >&5
11241 echo "$as_me: error: not found" >&2;}
11242 { (exit 1); exit 1; }; }
11245 echo "$as_me:11245: result: $cf_cv_ncurses_h2" >&5
11246 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
11248 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
11249 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
11250 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
11251 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
11254 if test -n "$cf_1st_incdir" ; then
11255 for cf_add_incdir in $cf_1st_incdir
11257 while test "$cf_add_incdir" != /usr/include
11259 if test -d "$cf_add_incdir"
11262 if test -n "$CFLAGS$CPPFLAGS" ; then
11263 # a loop is needed to ensure we can add subdirs of existing dirs
11264 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11265 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11266 cf_have_incdir=yes; break
11271 if test "$cf_have_incdir" = no ; then
11272 if test "$cf_add_incdir" = /usr/local/include ; then
11273 if test "$GCC" = yes
11275 cf_save_CPPFLAGS=$CPPFLAGS
11277 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11278 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11280 cat >"conftest.$ac_ext" <<_ACEOF
11281 #line 11281 "configure"
11282 #include "confdefs.h"
11292 rm -f "conftest.$ac_objext"
11293 if { (eval echo "$as_me:11293: \"$ac_compile\"") >&5
11294 (eval $ac_compile) 2>&5
11296 echo "$as_me:11296: \$? = $ac_status" >&5
11297 (exit "$ac_status"); } &&
11298 { ac_try='test -s "conftest.$ac_objext"'
11299 { (eval echo "$as_me:11299: \"$ac_try\"") >&5
11300 (eval $ac_try) 2>&5
11302 echo "$as_me:11302: \$? = $ac_status" >&5
11303 (exit "$ac_status"); }; }; then
11306 echo "$as_me: failed program was:" >&5
11307 cat "conftest.$ac_ext" >&5
11310 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11311 CPPFLAGS=$cf_save_CPPFLAGS
11316 if test "$cf_have_incdir" = no ; then
11317 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11319 echo "${as_me:-configure}:11319: testing adding $cf_add_incdir to include-path ..." 1>&5
11321 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11323 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11324 test "$cf_top_incdir" = "$cf_add_incdir" && break
11325 cf_add_incdir="$cf_top_incdir"
11338 # Set definitions to allow ifdef'ing for ncurses.h
11340 case "$cf_cv_ncurses_header" in
11343 cat >>confdefs.h <<\EOF
11344 #define HAVE_NCURSES_H 1
11350 case "$cf_cv_ncurses_header" in
11351 (ncurses/curses.h|ncurses/ncurses.h)
11353 cat >>confdefs.h <<\EOF
11354 #define HAVE_NCURSES_NCURSES_H 1
11358 (ncursesw/curses.h|ncursesw/ncurses.h)
11360 cat >>confdefs.h <<\EOF
11361 #define HAVE_NCURSESW_NCURSES_H 1
11367 echo "$as_me:11367: checking for terminfo header" >&5
11368 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
11369 if test "${cf_cv_term_header+set}" = set; then
11370 echo $ECHO_N "(cached) $ECHO_C" >&6
11373 case "${cf_cv_ncurses_header}" in
11374 (*/ncurses.h|*/ncursesw.h)
11375 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
11378 cf_term_header=term.h
11382 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
11384 cat >"conftest.$ac_ext" <<_ACEOF
11385 #line 11385 "configure"
11386 #include "confdefs.h"
11388 #include <${cf_cv_ncurses_header:-curses.h}>
11389 #include <$cf_test>
11394 int x = auto_left_margin; (void)x
11399 rm -f "conftest.$ac_objext"
11400 if { (eval echo "$as_me:11400: \"$ac_compile\"") >&5
11401 (eval $ac_compile) 2>&5
11403 echo "$as_me:11403: \$? = $ac_status" >&5
11404 (exit "$ac_status"); } &&
11405 { ac_try='test -s "conftest.$ac_objext"'
11406 { (eval echo "$as_me:11406: \"$ac_try\"") >&5
11407 (eval $ac_try) 2>&5
11409 echo "$as_me:11409: \$? = $ac_status" >&5
11410 (exit "$ac_status"); }; }; then
11412 cf_cv_term_header="$cf_test"
11414 echo "$as_me: failed program was:" >&5
11415 cat "conftest.$ac_ext" >&5
11417 cf_cv_term_header=unknown
11420 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11421 test "$cf_cv_term_header" != unknown && break
11425 echo "$as_me:11425: result: $cf_cv_term_header" >&5
11426 echo "${ECHO_T}$cf_cv_term_header" >&6
11428 # Set definitions to allow ifdef'ing to accommodate subdirectories
11430 case "$cf_cv_term_header" in
11433 cat >>confdefs.h <<\EOF
11434 #define HAVE_TERM_H 1
11440 case "$cf_cv_term_header" in
11443 cat >>confdefs.h <<\EOF
11444 #define HAVE_NCURSES_TERM_H 1
11450 cat >>confdefs.h <<\EOF
11451 #define HAVE_NCURSESW_TERM_H 1
11457 # some applications need this, but should check for NCURSES_VERSION
11459 cat >>confdefs.h <<\EOF
11463 echo "$as_me:11463: checking for ncurses version" >&5
11464 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
11465 if test "${cf_cv_ncurses_version+set}" = set; then
11466 echo $ECHO_N "(cached) $ECHO_C" >&6
11469 cf_cv_ncurses_version=no
11471 rm -f "$cf_tempfile"
11472 if test "$cross_compiling" = yes; then
11474 # This will not work if the preprocessor splits the line after the
11475 # Autoconf token. The 'unproto' program does that.
11476 cat > "conftest.$ac_ext" <<EOF
11477 #include <${cf_cv_ncurses_header:-curses.h}>
11479 #ifdef NCURSES_VERSION
11480 Autoconf NCURSES_VERSION
11488 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
11489 { (eval echo "$as_me:11489: \"$cf_try\"") >&5
11490 (eval $cf_try) 2>&5
11492 echo "$as_me:11492: \$? = $ac_status" >&5
11493 (exit "$ac_status"); }
11494 if test -f conftest.out ; then
11495 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
11496 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
11501 cat >"conftest.$ac_ext" <<_ACEOF
11502 #line 11502 "configure"
11503 #include "confdefs.h"
11505 #include <${cf_cv_ncurses_header:-curses.h}>
11509 FILE *fp = fopen("$cf_tempfile", "w");
11510 #ifdef NCURSES_VERSION
11511 # ifdef NCURSES_VERSION_PATCH
11512 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
11514 fprintf(fp, "%s\\n", NCURSES_VERSION);
11517 # ifdef __NCURSES_H
11518 fprintf(fp, "old\\n");
11523 ${cf_cv_main_return:-return}(0);
11526 rm -f "conftest$ac_exeext"
11527 if { (eval echo "$as_me:11527: \"$ac_link\"") >&5
11528 (eval $ac_link) 2>&5
11530 echo "$as_me:11530: \$? = $ac_status" >&5
11531 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
11532 { (eval echo "$as_me:11532: \"$ac_try\"") >&5
11533 (eval $ac_try) 2>&5
11535 echo "$as_me:11535: \$? = $ac_status" >&5
11536 (exit "$ac_status"); }; }; then
11538 cf_cv_ncurses_version=`cat $cf_tempfile`
11540 echo "$as_me: program exited with status $ac_status" >&5
11541 echo "$as_me: failed program was:" >&5
11542 cat "conftest.$ac_ext" >&5
11544 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
11546 rm -f "$cf_tempfile"
11549 echo "$as_me:11549: result: $cf_cv_ncurses_version" >&5
11550 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
11551 test "$cf_cv_ncurses_version" = no ||
11552 cat >>confdefs.h <<\EOF
11556 cf_nculib_root=$cf_cv_screen
11557 # This works, except for the special case where we find gpm, but
11558 # ncurses is in a nonstandard location via $LIBS, and we really want
11561 cf_ncurses_SAVE="$LIBS"
11562 echo "$as_me:11562: checking for Gpm_Open in -lgpm" >&5
11563 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
11564 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
11565 echo $ECHO_N "(cached) $ECHO_C" >&6
11567 ac_check_lib_save_LIBS=$LIBS
11569 cat >"conftest.$ac_ext" <<_ACEOF
11570 #line 11570 "configure"
11571 #include "confdefs.h"
11573 /* Override any gcc2 internal prototype to avoid an error. */
11577 /* We use char because int might match the return type of a gcc2
11578 builtin and then its argument prototype would still apply. */
11588 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11589 if { (eval echo "$as_me:11589: \"$ac_link\"") >&5
11590 (eval $ac_link) 2>&5
11592 echo "$as_me:11592: \$? = $ac_status" >&5
11593 (exit "$ac_status"); } &&
11594 { ac_try='test -s "conftest$ac_exeext"'
11595 { (eval echo "$as_me:11595: \"$ac_try\"") >&5
11596 (eval $ac_try) 2>&5
11598 echo "$as_me:11598: \$? = $ac_status" >&5
11599 (exit "$ac_status"); }; }; then
11600 ac_cv_lib_gpm_Gpm_Open=yes
11602 echo "$as_me: failed program was:" >&5
11603 cat "conftest.$ac_ext" >&5
11604 ac_cv_lib_gpm_Gpm_Open=no
11606 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11607 LIBS=$ac_check_lib_save_LIBS
11609 echo "$as_me:11609: result: $ac_cv_lib_gpm_Gpm_Open" >&5
11610 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
11611 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
11612 echo "$as_me:11612: checking for initscr in -lgpm" >&5
11613 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
11614 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
11615 echo $ECHO_N "(cached) $ECHO_C" >&6
11617 ac_check_lib_save_LIBS=$LIBS
11619 cat >"conftest.$ac_ext" <<_ACEOF
11620 #line 11620 "configure"
11621 #include "confdefs.h"
11623 /* Override any gcc2 internal prototype to avoid an error. */
11627 /* We use char because int might match the return type of a gcc2
11628 builtin and then its argument prototype would still apply. */
11638 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11639 if { (eval echo "$as_me:11639: \"$ac_link\"") >&5
11640 (eval $ac_link) 2>&5
11642 echo "$as_me:11642: \$? = $ac_status" >&5
11643 (exit "$ac_status"); } &&
11644 { ac_try='test -s "conftest$ac_exeext"'
11645 { (eval echo "$as_me:11645: \"$ac_try\"") >&5
11646 (eval $ac_try) 2>&5
11648 echo "$as_me:11648: \$? = $ac_status" >&5
11649 (exit "$ac_status"); }; }; then
11650 ac_cv_lib_gpm_initscr=yes
11652 echo "$as_me: failed program was:" >&5
11653 cat "conftest.$ac_ext" >&5
11654 ac_cv_lib_gpm_initscr=no
11656 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11657 LIBS=$ac_check_lib_save_LIBS
11659 echo "$as_me:11659: result: $ac_cv_lib_gpm_initscr" >&5
11660 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
11661 if test "$ac_cv_lib_gpm_initscr" = yes; then
11662 LIBS="$cf_ncurses_SAVE"
11664 cf_ncurses_LIBS="-lgpm"
11671 # This is only necessary if you are linking against an obsolete
11672 # version of ncurses (but it should do no harm, since it's static).
11673 if test "$cf_nculib_root" = ncurses ; then
11674 echo "$as_me:11674: checking for tgoto in -lmytinfo" >&5
11675 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
11676 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
11677 echo $ECHO_N "(cached) $ECHO_C" >&6
11679 ac_check_lib_save_LIBS=$LIBS
11680 LIBS="-lmytinfo $LIBS"
11681 cat >"conftest.$ac_ext" <<_ACEOF
11682 #line 11682 "configure"
11683 #include "confdefs.h"
11685 /* Override any gcc2 internal prototype to avoid an error. */
11689 /* We use char because int might match the return type of a gcc2
11690 builtin and then its argument prototype would still apply. */
11700 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11701 if { (eval echo "$as_me:11701: \"$ac_link\"") >&5
11702 (eval $ac_link) 2>&5
11704 echo "$as_me:11704: \$? = $ac_status" >&5
11705 (exit "$ac_status"); } &&
11706 { ac_try='test -s "conftest$ac_exeext"'
11707 { (eval echo "$as_me:11707: \"$ac_try\"") >&5
11708 (eval $ac_try) 2>&5
11710 echo "$as_me:11710: \$? = $ac_status" >&5
11711 (exit "$ac_status"); }; }; then
11712 ac_cv_lib_mytinfo_tgoto=yes
11714 echo "$as_me: failed program was:" >&5
11715 cat "conftest.$ac_ext" >&5
11716 ac_cv_lib_mytinfo_tgoto=no
11718 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11719 LIBS=$ac_check_lib_save_LIBS
11721 echo "$as_me:11721: result: $ac_cv_lib_mytinfo_tgoto" >&5
11722 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11723 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
11724 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
11731 cf_add_libs="$LIBS"
11734 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11735 # filter duplicates
11736 for cf_add_1lib in $cf_add_0lib; do
11737 for cf_add_2lib in $cf_add_libs; do
11738 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11743 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11745 LIBS="$cf_add_libs"
11747 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
11750 cf_add_libs="$LIBS"
11753 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11754 # filter duplicates
11755 for cf_add_1lib in $cf_add_0lib; do
11756 for cf_add_2lib in $cf_add_libs; do
11757 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11762 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11764 LIBS="$cf_add_libs"
11768 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
11770 echo "$as_me:11770: checking for initscr" >&5
11771 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
11772 if test "${ac_cv_func_initscr+set}" = set; then
11773 echo $ECHO_N "(cached) $ECHO_C" >&6
11775 cat >"conftest.$ac_ext" <<_ACEOF
11776 #line 11776 "configure"
11777 #include "confdefs.h"
11778 #define initscr autoconf_temporary
11779 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11786 /* We use char because int might match the return type of a gcc2
11787 builtin and then its argument prototype would still apply. */
11788 char initscr (void);
11794 /* The GNU C library defines stubs for functions which it implements
11795 to always fail with ENOSYS. Some functions are actually named
11796 something starting with __ and the normal name is an alias. */
11797 #if defined (__stub_initscr) || defined (__stub___initscr)
11798 #error found stub for initscr
11806 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11807 if { (eval echo "$as_me:11807: \"$ac_link\"") >&5
11808 (eval $ac_link) 2>&5
11810 echo "$as_me:11810: \$? = $ac_status" >&5
11811 (exit "$ac_status"); } &&
11812 { ac_try='test -s "conftest$ac_exeext"'
11813 { (eval echo "$as_me:11813: \"$ac_try\"") >&5
11814 (eval $ac_try) 2>&5
11816 echo "$as_me:11816: \$? = $ac_status" >&5
11817 (exit "$ac_status"); }; }; then
11818 ac_cv_func_initscr=yes
11820 echo "$as_me: failed program was:" >&5
11821 cat "conftest.$ac_ext" >&5
11822 ac_cv_func_initscr=no
11824 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11826 echo "$as_me:11826: result: $ac_cv_func_initscr" >&5
11827 echo "${ECHO_T}$ac_cv_func_initscr" >&6
11828 if test "$ac_cv_func_initscr" = yes; then
11829 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11832 cf_save_LIBS="$LIBS"
11833 echo "$as_me:11833: checking for initscr in -l$cf_nculib_root" >&5
11834 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
11835 LIBS="-l$cf_nculib_root $LIBS"
11836 cat >"conftest.$ac_ext" <<_ACEOF
11837 #line 11837 "configure"
11838 #include "confdefs.h"
11839 #include <${cf_cv_ncurses_header:-curses.h}>
11848 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11849 if { (eval echo "$as_me:11849: \"$ac_link\"") >&5
11850 (eval $ac_link) 2>&5
11852 echo "$as_me:11852: \$? = $ac_status" >&5
11853 (exit "$ac_status"); } &&
11854 { ac_try='test -s "conftest$ac_exeext"'
11855 { (eval echo "$as_me:11855: \"$ac_try\"") >&5
11856 (eval $ac_try) 2>&5
11858 echo "$as_me:11858: \$? = $ac_status" >&5
11859 (exit "$ac_status"); }; }; then
11860 echo "$as_me:11860: result: yes" >&5
11861 echo "${ECHO_T}yes" >&6
11862 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11865 echo "$as_me: failed program was:" >&5
11866 cat "conftest.$ac_ext" >&5
11867 echo "$as_me:11867: result: no" >&5
11868 echo "${ECHO_T}no" >&6
11871 cf_library_path_list=""
11872 if test -n "${LDFLAGS}${LIBS}" ; then
11873 for cf_library_path in $LDFLAGS $LIBS
11875 case "$cf_library_path" in
11877 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11879 test "x$cf_library_path" != "xNONE" && \
11880 test -d "$cf_library_path" && \
11882 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11883 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
11884 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11885 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11886 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11887 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"
11890 cf_library_path_list="$cf_library_path_list $cf_search"
11898 test "x$prefix" != "xNONE" && \
11899 test -d "$prefix" && \
11901 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11902 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
11903 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11904 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11905 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11906 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11909 for cf_subdir_prefix in \
11918 test "x$cf_subdir_prefix" != "x$prefix" && \
11919 test -d "$cf_subdir_prefix" && \
11920 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11921 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11922 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
11923 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11924 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11925 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11926 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"
11931 cf_search="$cf_library_path_list $cf_search"
11933 for cf_libdir in $cf_search
11935 echo "$as_me:11935: checking for -l$cf_nculib_root in $cf_libdir" >&5
11936 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11937 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11938 cat >"conftest.$ac_ext" <<_ACEOF
11939 #line 11939 "configure"
11940 #include "confdefs.h"
11941 #include <${cf_cv_ncurses_header:-curses.h}>
11950 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11951 if { (eval echo "$as_me:11951: \"$ac_link\"") >&5
11952 (eval $ac_link) 2>&5
11954 echo "$as_me:11954: \$? = $ac_status" >&5
11955 (exit "$ac_status"); } &&
11956 { ac_try='test -s "conftest$ac_exeext"'
11957 { (eval echo "$as_me:11957: \"$ac_try\"") >&5
11958 (eval $ac_try) 2>&5
11960 echo "$as_me:11960: \$? = $ac_status" >&5
11961 (exit "$ac_status"); }; }; then
11962 echo "$as_me:11962: result: yes" >&5
11963 echo "${ECHO_T}yes" >&6
11964 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11967 echo "$as_me: failed program was:" >&5
11968 cat "conftest.$ac_ext" >&5
11969 echo "$as_me:11969: result: no" >&5
11970 echo "${ECHO_T}no" >&6
11971 LIBS="$cf_save_LIBS"
11973 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11977 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11981 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
11983 if test "$cf_found_library" = no ; then
11984 { { echo "$as_me:11984: error: Cannot link $cf_nculib_root library" >&5
11985 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11986 { (exit 1); exit 1; }; }
11991 if test -n "$cf_ncurses_LIBS" ; then
11992 echo "$as_me:11992: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11993 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11994 cf_ncurses_SAVE="$LIBS"
11995 for p in $cf_ncurses_LIBS ; do
11996 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
11997 if test "$q" != "$LIBS" ; then
12001 cat >"conftest.$ac_ext" <<_ACEOF
12002 #line 12002 "configure"
12003 #include "confdefs.h"
12004 #include <${cf_cv_ncurses_header:-curses.h}>
12008 initscr(); mousemask(0,0); tigetstr((char *)0);
12013 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12014 if { (eval echo "$as_me:12014: \"$ac_link\"") >&5
12015 (eval $ac_link) 2>&5
12017 echo "$as_me:12017: \$? = $ac_status" >&5
12018 (exit "$ac_status"); } &&
12019 { ac_try='test -s "conftest$ac_exeext"'
12020 { (eval echo "$as_me:12020: \"$ac_try\"") >&5
12021 (eval $ac_try) 2>&5
12023 echo "$as_me:12023: \$? = $ac_status" >&5
12024 (exit "$ac_status"); }; }; then
12025 echo "$as_me:12025: result: yes" >&5
12026 echo "${ECHO_T}yes" >&6
12028 echo "$as_me: failed program was:" >&5
12029 cat "conftest.$ac_ext" >&5
12030 echo "$as_me:12030: result: no" >&5
12031 echo "${ECHO_T}no" >&6
12032 LIBS="$cf_ncurses_SAVE"
12034 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12037 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12039 cat >>confdefs.h <<EOF
12040 #define $cf_nculib_ROOT 1
12045 NCURSES_CONFIG=none
12050 echo "$as_me:12050: checking for X" >&5
12051 echo $ECHO_N "checking for X... $ECHO_C" >&6
12053 # Check whether --with-x or --without-x was given.
12054 if test "${with_x+set}" = set; then
12058 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
12059 if test "x$with_x" = xno; then
12060 # The user explicitly disabled X.
12063 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
12064 # Both variables are already set.
12067 if test "${ac_cv_have_x+set}" = set; then
12068 echo $ECHO_N "(cached) $ECHO_C" >&6
12070 # One or both of the vars are not set, and there is no cached value.
12071 ac_x_includes=no ac_x_libraries=no
12072 rm -fr conftest.dir
12073 if mkdir conftest.dir; then
12075 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
12076 cat >Imakefile <<'EOF'
12078 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
12080 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
12081 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
12082 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
12083 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
12084 for ac_extension in a so sl dylib dll; do
12085 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
12086 test -f "$ac_im_libdir/libX11.$ac_extension"; then
12087 ac_im_usrlibdir=$ac_im_libdir; break
12090 # Screen out bogus values from the imake configuration. They are
12091 # bogus both because they are the default anyway, and because
12092 # using them would break gcc on systems where it needs fixed includes.
12093 case $ac_im_incroot in
12095 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
12097 case $ac_im_usrlibdir in
12098 /usr/lib | /lib) ;;
12099 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
12103 rm -fr conftest.dir
12106 # Standard set of common directories for X headers.
12107 # Check X11 before X11Rn because it is often a symlink to the current release.
12124 /usr/local/X11/include
12125 /usr/local/X11R7/include
12126 /usr/local/X11R6/include
12127 /usr/local/X11R5/include
12128 /usr/local/X11R4/include
12130 /usr/local/include/X11
12131 /usr/local/include/X11R7
12132 /usr/local/include/X11R6
12133 /usr/local/include/X11R5
12134 /usr/local/include/X11R4
12138 /usr/XFree86/include/X11
12142 /usr/unsupported/include
12143 /usr/athena/include
12144 /usr/local/x11r5/include
12145 /usr/lpp/Xamples/include
12147 /usr/openwin/include
12148 /usr/openwin/share/include'
12150 if test "$ac_x_includes" = no; then
12151 # Guess where to find include files, by looking for Intrinsic.h.
12152 # First, try using that file with no special directory specified.
12153 cat >"conftest.$ac_ext" <<_ACEOF
12154 #line 12154 "configure"
12155 #include "confdefs.h"
12156 #include <X11/Intrinsic.h>
12158 if { (eval echo "$as_me:12158: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12159 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12161 $EGREP -v '^ *\+' conftest.er1 >conftest.err
12163 cat conftest.err >&5
12164 echo "$as_me:12164: \$? = $ac_status" >&5
12165 (exit "$ac_status"); } >/dev/null; then
12166 if test -s conftest.err; then
12167 ac_cpp_err=$ac_c_preproc_warn_flag
12174 if test -z "$ac_cpp_err"; then
12175 # We can compile using X headers with no special include directory.
12178 echo "$as_me: failed program was:" >&5
12179 cat "conftest.$ac_ext" >&5
12180 for ac_dir in $ac_x_header_dirs; do
12181 if test -r "$ac_dir/X11/Intrinsic.h"; then
12182 ac_x_includes=$ac_dir
12187 rm -f conftest.err "conftest.$ac_ext"
12188 fi # $ac_x_includes = no
12190 if test "$ac_x_libraries" = no; then
12191 # Check for the libraries.
12192 # See if we find them without any special options.
12193 # Don't add to $LIBS permanently.
12196 cat >"conftest.$ac_ext" <<_ACEOF
12197 #line 12197 "configure"
12198 #include "confdefs.h"
12199 #include <X11/Intrinsic.h>
12208 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12209 if { (eval echo "$as_me:12209: \"$ac_link\"") >&5
12210 (eval $ac_link) 2>&5
12212 echo "$as_me:12212: \$? = $ac_status" >&5
12213 (exit "$ac_status"); } &&
12214 { ac_try='test -s "conftest$ac_exeext"'
12215 { (eval echo "$as_me:12215: \"$ac_try\"") >&5
12216 (eval $ac_try) 2>&5
12218 echo "$as_me:12218: \$? = $ac_status" >&5
12219 (exit "$ac_status"); }; }; then
12221 # We can link X programs with no special library path.
12224 echo "$as_me: failed program was:" >&5
12225 cat "conftest.$ac_ext" >&5
12227 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
12229 # Don't even attempt the hair of trying to link an X program!
12230 for ac_extension in a so sl dylib dll; do
12231 if test -r "$ac_dir/libXt.$ac_extension"; then
12232 ac_x_libraries=$ac_dir
12238 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12239 fi # $ac_x_libraries = no
12241 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
12242 # Didn't find X anywhere. Cache the known absence of X.
12243 ac_cv_have_x="have_x=no"
12245 # Record where we found X for the cache.
12246 ac_cv_have_x="have_x=yes \
12247 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
12252 eval "$ac_cv_have_x"
12255 if test "$have_x" != yes; then
12256 echo "$as_me:12256: result: $have_x" >&5
12257 echo "${ECHO_T}$have_x" >&6
12260 # If each of the values was on the command line, it overrides each guess.
12261 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
12262 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
12263 # Update the cache value to reflect the command line values.
12264 ac_cv_have_x="have_x=yes \
12265 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
12266 echo "$as_me:12266: result: libraries $x_libraries, headers $x_includes" >&5
12267 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
12270 if test "$no_x" = yes; then
12271 # Not all programs may use this symbol, but it does not hurt to define it.
12273 cat >>confdefs.h <<\EOF
12274 #define X_DISPLAY_MISSING 1
12282 if test -n "$x_includes"; then
12283 X_CFLAGS="$X_CFLAGS -I$x_includes"
12286 # It would also be nice to do this for all -L options, not just this one.
12287 if test -n "$x_libraries"; then
12288 X_LIBS="$X_LIBS -L$x_libraries"
12289 # For Solaris; some versions of Sun CC require a space after -R and
12290 # others require no space. Words are not sufficient . . . .
12291 case `(uname -sr) 2>/dev/null` in
12293 echo "$as_me:12293: checking whether -R must be followed by a space" >&5
12294 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
12295 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
12296 cat >"conftest.$ac_ext" <<_ACEOF
12297 #line 12297 "configure"
12298 #include "confdefs.h"
12308 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12309 if { (eval echo "$as_me:12309: \"$ac_link\"") >&5
12310 (eval $ac_link) 2>&5
12312 echo "$as_me:12312: \$? = $ac_status" >&5
12313 (exit "$ac_status"); } &&
12314 { ac_try='test -s "conftest$ac_exeext"'
12315 { (eval echo "$as_me:12315: \"$ac_try\"") >&5
12316 (eval $ac_try) 2>&5
12318 echo "$as_me:12318: \$? = $ac_status" >&5
12319 (exit "$ac_status"); }; }; then
12322 echo "$as_me: failed program was:" >&5
12323 cat "conftest.$ac_ext" >&5
12326 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12327 if test $ac_R_nospace = yes; then
12328 echo "$as_me:12328: result: no" >&5
12329 echo "${ECHO_T}no" >&6
12330 X_LIBS="$X_LIBS -R$x_libraries"
12332 LIBS="$ac_xsave_LIBS -R $x_libraries"
12333 cat >"conftest.$ac_ext" <<_ACEOF
12334 #line 12334 "configure"
12335 #include "confdefs.h"
12345 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12346 if { (eval echo "$as_me:12346: \"$ac_link\"") >&5
12347 (eval $ac_link) 2>&5
12349 echo "$as_me:12349: \$? = $ac_status" >&5
12350 (exit "$ac_status"); } &&
12351 { ac_try='test -s "conftest$ac_exeext"'
12352 { (eval echo "$as_me:12352: \"$ac_try\"") >&5
12353 (eval $ac_try) 2>&5
12355 echo "$as_me:12355: \$? = $ac_status" >&5
12356 (exit "$ac_status"); }; }; then
12359 echo "$as_me: failed program was:" >&5
12360 cat "conftest.$ac_ext" >&5
12363 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12364 if test $ac_R_space = yes; then
12365 echo "$as_me:12365: result: yes" >&5
12366 echo "${ECHO_T}yes" >&6
12367 X_LIBS="$X_LIBS -R $x_libraries"
12369 echo "$as_me:12369: result: neither works" >&5
12370 echo "${ECHO_T}neither works" >&6
12373 LIBS=$ac_xsave_LIBS
12377 # Check for system-dependent libraries X programs must link with.
12378 # Do this before checking for the system-independent R6 libraries
12379 # (-lICE), since we may need -lsocket or whatever for X linking.
12381 if test "$ISC" = yes; then
12382 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
12384 # Martyn Johnson says this is needed for Ultrix, if the X
12385 # libraries were built with DECnet support. And Karl Berry says
12386 # the Alpha needs dnet_stub (dnet does not exist).
12387 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
12388 cat >"conftest.$ac_ext" <<_ACEOF
12389 #line 12389 "configure"
12390 #include "confdefs.h"
12392 /* Override any gcc2 internal prototype to avoid an error. */
12396 /* We use char because int might match the return type of a gcc2
12397 builtin and then its argument prototype would still apply. */
12398 char XOpenDisplay ();
12407 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12408 if { (eval echo "$as_me:12408: \"$ac_link\"") >&5
12409 (eval $ac_link) 2>&5
12411 echo "$as_me:12411: \$? = $ac_status" >&5
12412 (exit "$ac_status"); } &&
12413 { ac_try='test -s "conftest$ac_exeext"'
12414 { (eval echo "$as_me:12414: \"$ac_try\"") >&5
12415 (eval $ac_try) 2>&5
12417 echo "$as_me:12417: \$? = $ac_status" >&5
12418 (exit "$ac_status"); }; }; then
12421 echo "$as_me: failed program was:" >&5
12422 cat "conftest.$ac_ext" >&5
12423 echo "$as_me:12423: checking for dnet_ntoa in -ldnet" >&5
12424 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
12425 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
12426 echo $ECHO_N "(cached) $ECHO_C" >&6
12428 ac_check_lib_save_LIBS=$LIBS
12429 LIBS="-ldnet $LIBS"
12430 cat >"conftest.$ac_ext" <<_ACEOF
12431 #line 12431 "configure"
12432 #include "confdefs.h"
12434 /* Override any gcc2 internal prototype to avoid an error. */
12438 /* We use char because int might match the return type of a gcc2
12439 builtin and then its argument prototype would still apply. */
12449 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12450 if { (eval echo "$as_me:12450: \"$ac_link\"") >&5
12451 (eval $ac_link) 2>&5
12453 echo "$as_me:12453: \$? = $ac_status" >&5
12454 (exit "$ac_status"); } &&
12455 { ac_try='test -s "conftest$ac_exeext"'
12456 { (eval echo "$as_me:12456: \"$ac_try\"") >&5
12457 (eval $ac_try) 2>&5
12459 echo "$as_me:12459: \$? = $ac_status" >&5
12460 (exit "$ac_status"); }; }; then
12461 ac_cv_lib_dnet_dnet_ntoa=yes
12463 echo "$as_me: failed program was:" >&5
12464 cat "conftest.$ac_ext" >&5
12465 ac_cv_lib_dnet_dnet_ntoa=no
12467 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12468 LIBS=$ac_check_lib_save_LIBS
12470 echo "$as_me:12470: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
12471 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
12472 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
12473 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
12476 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
12477 echo "$as_me:12477: checking for dnet_ntoa in -ldnet_stub" >&5
12478 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
12479 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
12480 echo $ECHO_N "(cached) $ECHO_C" >&6
12482 ac_check_lib_save_LIBS=$LIBS
12483 LIBS="-ldnet_stub $LIBS"
12484 cat >"conftest.$ac_ext" <<_ACEOF
12485 #line 12485 "configure"
12486 #include "confdefs.h"
12488 /* Override any gcc2 internal prototype to avoid an error. */
12492 /* We use char because int might match the return type of a gcc2
12493 builtin and then its argument prototype would still apply. */
12503 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12504 if { (eval echo "$as_me:12504: \"$ac_link\"") >&5
12505 (eval $ac_link) 2>&5
12507 echo "$as_me:12507: \$? = $ac_status" >&5
12508 (exit "$ac_status"); } &&
12509 { ac_try='test -s "conftest$ac_exeext"'
12510 { (eval echo "$as_me:12510: \"$ac_try\"") >&5
12511 (eval $ac_try) 2>&5
12513 echo "$as_me:12513: \$? = $ac_status" >&5
12514 (exit "$ac_status"); }; }; then
12515 ac_cv_lib_dnet_stub_dnet_ntoa=yes
12517 echo "$as_me: failed program was:" >&5
12518 cat "conftest.$ac_ext" >&5
12519 ac_cv_lib_dnet_stub_dnet_ntoa=no
12521 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12522 LIBS=$ac_check_lib_save_LIBS
12524 echo "$as_me:12524: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
12525 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
12526 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
12527 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
12532 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12533 LIBS="$ac_xsave_LIBS"
12535 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
12536 # to get the SysV transport functions.
12537 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
12539 # The nsl library prevents programs from opening the X display
12540 # on Irix 5.2, according to T.E. Dickey.
12541 # The functions gethostbyname, getservbyname, and inet_addr are
12542 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
12543 echo "$as_me:12543: checking for gethostbyname" >&5
12544 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
12545 if test "${ac_cv_func_gethostbyname+set}" = set; then
12546 echo $ECHO_N "(cached) $ECHO_C" >&6
12548 cat >"conftest.$ac_ext" <<_ACEOF
12549 #line 12549 "configure"
12550 #include "confdefs.h"
12551 #define gethostbyname autoconf_temporary
12552 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12553 #undef gethostbyname
12559 /* We use char because int might match the return type of a gcc2
12560 builtin and then its argument prototype would still apply. */
12561 char gethostbyname (void);
12567 /* The GNU C library defines stubs for functions which it implements
12568 to always fail with ENOSYS. Some functions are actually named
12569 something starting with __ and the normal name is an alias. */
12570 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
12571 #error found stub for gethostbyname
12574 return gethostbyname ();
12579 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12580 if { (eval echo "$as_me:12580: \"$ac_link\"") >&5
12581 (eval $ac_link) 2>&5
12583 echo "$as_me:12583: \$? = $ac_status" >&5
12584 (exit "$ac_status"); } &&
12585 { ac_try='test -s "conftest$ac_exeext"'
12586 { (eval echo "$as_me:12586: \"$ac_try\"") >&5
12587 (eval $ac_try) 2>&5
12589 echo "$as_me:12589: \$? = $ac_status" >&5
12590 (exit "$ac_status"); }; }; then
12591 ac_cv_func_gethostbyname=yes
12593 echo "$as_me: failed program was:" >&5
12594 cat "conftest.$ac_ext" >&5
12595 ac_cv_func_gethostbyname=no
12597 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12599 echo "$as_me:12599: result: $ac_cv_func_gethostbyname" >&5
12600 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
12602 if test $ac_cv_func_gethostbyname = no; then
12603 echo "$as_me:12603: checking for gethostbyname in -lnsl" >&5
12604 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
12605 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
12606 echo $ECHO_N "(cached) $ECHO_C" >&6
12608 ac_check_lib_save_LIBS=$LIBS
12610 cat >"conftest.$ac_ext" <<_ACEOF
12611 #line 12611 "configure"
12612 #include "confdefs.h"
12614 /* Override any gcc2 internal prototype to avoid an error. */
12618 /* We use char because int might match the return type of a gcc2
12619 builtin and then its argument prototype would still apply. */
12620 char gethostbyname ();
12629 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12630 if { (eval echo "$as_me:12630: \"$ac_link\"") >&5
12631 (eval $ac_link) 2>&5
12633 echo "$as_me:12633: \$? = $ac_status" >&5
12634 (exit "$ac_status"); } &&
12635 { ac_try='test -s "conftest$ac_exeext"'
12636 { (eval echo "$as_me:12636: \"$ac_try\"") >&5
12637 (eval $ac_try) 2>&5
12639 echo "$as_me:12639: \$? = $ac_status" >&5
12640 (exit "$ac_status"); }; }; then
12641 ac_cv_lib_nsl_gethostbyname=yes
12643 echo "$as_me: failed program was:" >&5
12644 cat "conftest.$ac_ext" >&5
12645 ac_cv_lib_nsl_gethostbyname=no
12647 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12648 LIBS=$ac_check_lib_save_LIBS
12650 echo "$as_me:12650: result: $ac_cv_lib_nsl_gethostbyname" >&5
12651 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
12652 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
12653 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
12656 if test $ac_cv_lib_nsl_gethostbyname = no; then
12657 echo "$as_me:12657: checking for gethostbyname in -lbsd" >&5
12658 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
12659 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
12660 echo $ECHO_N "(cached) $ECHO_C" >&6
12662 ac_check_lib_save_LIBS=$LIBS
12664 cat >"conftest.$ac_ext" <<_ACEOF
12665 #line 12665 "configure"
12666 #include "confdefs.h"
12668 /* Override any gcc2 internal prototype to avoid an error. */
12672 /* We use char because int might match the return type of a gcc2
12673 builtin and then its argument prototype would still apply. */
12674 char gethostbyname ();
12683 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12684 if { (eval echo "$as_me:12684: \"$ac_link\"") >&5
12685 (eval $ac_link) 2>&5
12687 echo "$as_me:12687: \$? = $ac_status" >&5
12688 (exit "$ac_status"); } &&
12689 { ac_try='test -s "conftest$ac_exeext"'
12690 { (eval echo "$as_me:12690: \"$ac_try\"") >&5
12691 (eval $ac_try) 2>&5
12693 echo "$as_me:12693: \$? = $ac_status" >&5
12694 (exit "$ac_status"); }; }; then
12695 ac_cv_lib_bsd_gethostbyname=yes
12697 echo "$as_me: failed program was:" >&5
12698 cat "conftest.$ac_ext" >&5
12699 ac_cv_lib_bsd_gethostbyname=no
12701 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12702 LIBS=$ac_check_lib_save_LIBS
12704 echo "$as_me:12704: result: $ac_cv_lib_bsd_gethostbyname" >&5
12705 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
12706 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
12707 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
12713 # lieder@skyler.mavd.honeywell.com says without -lsocket,
12714 # socket/setsockopt and other routines are undefined under SCO ODT
12715 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
12716 # on later versions), says Simon Leinen: it contains gethostby*
12717 # variants that don't use the nameserver (or something). -lsocket
12718 # must be given before -lnsl if both are needed. We assume that
12719 # if connect needs -lnsl, so does gethostbyname.
12720 echo "$as_me:12720: checking for connect" >&5
12721 echo $ECHO_N "checking for connect... $ECHO_C" >&6
12722 if test "${ac_cv_func_connect+set}" = set; then
12723 echo $ECHO_N "(cached) $ECHO_C" >&6
12725 cat >"conftest.$ac_ext" <<_ACEOF
12726 #line 12726 "configure"
12727 #include "confdefs.h"
12728 #define connect autoconf_temporary
12729 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12736 /* We use char because int might match the return type of a gcc2
12737 builtin and then its argument prototype would still apply. */
12738 char connect (void);
12744 /* The GNU C library defines stubs for functions which it implements
12745 to always fail with ENOSYS. Some functions are actually named
12746 something starting with __ and the normal name is an alias. */
12747 #if defined (__stub_connect) || defined (__stub___connect)
12748 #error found stub for connect
12756 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12757 if { (eval echo "$as_me:12757: \"$ac_link\"") >&5
12758 (eval $ac_link) 2>&5
12760 echo "$as_me:12760: \$? = $ac_status" >&5
12761 (exit "$ac_status"); } &&
12762 { ac_try='test -s "conftest$ac_exeext"'
12763 { (eval echo "$as_me:12763: \"$ac_try\"") >&5
12764 (eval $ac_try) 2>&5
12766 echo "$as_me:12766: \$? = $ac_status" >&5
12767 (exit "$ac_status"); }; }; then
12768 ac_cv_func_connect=yes
12770 echo "$as_me: failed program was:" >&5
12771 cat "conftest.$ac_ext" >&5
12772 ac_cv_func_connect=no
12774 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12776 echo "$as_me:12776: result: $ac_cv_func_connect" >&5
12777 echo "${ECHO_T}$ac_cv_func_connect" >&6
12779 if test $ac_cv_func_connect = no; then
12780 echo "$as_me:12780: checking for connect in -lsocket" >&5
12781 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
12782 if test "${ac_cv_lib_socket_connect+set}" = set; then
12783 echo $ECHO_N "(cached) $ECHO_C" >&6
12785 ac_check_lib_save_LIBS=$LIBS
12786 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
12787 cat >"conftest.$ac_ext" <<_ACEOF
12788 #line 12788 "configure"
12789 #include "confdefs.h"
12791 /* Override any gcc2 internal prototype to avoid an error. */
12795 /* We use char because int might match the return type of a gcc2
12796 builtin and then its argument prototype would still apply. */
12806 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12807 if { (eval echo "$as_me:12807: \"$ac_link\"") >&5
12808 (eval $ac_link) 2>&5
12810 echo "$as_me:12810: \$? = $ac_status" >&5
12811 (exit "$ac_status"); } &&
12812 { ac_try='test -s "conftest$ac_exeext"'
12813 { (eval echo "$as_me:12813: \"$ac_try\"") >&5
12814 (eval $ac_try) 2>&5
12816 echo "$as_me:12816: \$? = $ac_status" >&5
12817 (exit "$ac_status"); }; }; then
12818 ac_cv_lib_socket_connect=yes
12820 echo "$as_me: failed program was:" >&5
12821 cat "conftest.$ac_ext" >&5
12822 ac_cv_lib_socket_connect=no
12824 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12825 LIBS=$ac_check_lib_save_LIBS
12827 echo "$as_me:12827: result: $ac_cv_lib_socket_connect" >&5
12828 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
12829 if test "$ac_cv_lib_socket_connect" = yes; then
12830 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
12835 # Guillermo Gomez says -lposix is necessary on A/UX.
12836 echo "$as_me:12836: checking for remove" >&5
12837 echo $ECHO_N "checking for remove... $ECHO_C" >&6
12838 if test "${ac_cv_func_remove+set}" = set; then
12839 echo $ECHO_N "(cached) $ECHO_C" >&6
12841 cat >"conftest.$ac_ext" <<_ACEOF
12842 #line 12842 "configure"
12843 #include "confdefs.h"
12844 #define remove autoconf_temporary
12845 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12852 /* We use char because int might match the return type of a gcc2
12853 builtin and then its argument prototype would still apply. */
12854 char remove (void);
12860 /* The GNU C library defines stubs for functions which it implements
12861 to always fail with ENOSYS. Some functions are actually named
12862 something starting with __ and the normal name is an alias. */
12863 #if defined (__stub_remove) || defined (__stub___remove)
12864 #error found stub for remove
12872 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12873 if { (eval echo "$as_me:12873: \"$ac_link\"") >&5
12874 (eval $ac_link) 2>&5
12876 echo "$as_me:12876: \$? = $ac_status" >&5
12877 (exit "$ac_status"); } &&
12878 { ac_try='test -s "conftest$ac_exeext"'
12879 { (eval echo "$as_me:12879: \"$ac_try\"") >&5
12880 (eval $ac_try) 2>&5
12882 echo "$as_me:12882: \$? = $ac_status" >&5
12883 (exit "$ac_status"); }; }; then
12884 ac_cv_func_remove=yes
12886 echo "$as_me: failed program was:" >&5
12887 cat "conftest.$ac_ext" >&5
12888 ac_cv_func_remove=no
12890 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12892 echo "$as_me:12892: result: $ac_cv_func_remove" >&5
12893 echo "${ECHO_T}$ac_cv_func_remove" >&6
12895 if test $ac_cv_func_remove = no; then
12896 echo "$as_me:12896: checking for remove in -lposix" >&5
12897 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
12898 if test "${ac_cv_lib_posix_remove+set}" = set; then
12899 echo $ECHO_N "(cached) $ECHO_C" >&6
12901 ac_check_lib_save_LIBS=$LIBS
12902 LIBS="-lposix $LIBS"
12903 cat >"conftest.$ac_ext" <<_ACEOF
12904 #line 12904 "configure"
12905 #include "confdefs.h"
12907 /* Override any gcc2 internal prototype to avoid an error. */
12911 /* We use char because int might match the return type of a gcc2
12912 builtin and then its argument prototype would still apply. */
12922 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12923 if { (eval echo "$as_me:12923: \"$ac_link\"") >&5
12924 (eval $ac_link) 2>&5
12926 echo "$as_me:12926: \$? = $ac_status" >&5
12927 (exit "$ac_status"); } &&
12928 { ac_try='test -s "conftest$ac_exeext"'
12929 { (eval echo "$as_me:12929: \"$ac_try\"") >&5
12930 (eval $ac_try) 2>&5
12932 echo "$as_me:12932: \$? = $ac_status" >&5
12933 (exit "$ac_status"); }; }; then
12934 ac_cv_lib_posix_remove=yes
12936 echo "$as_me: failed program was:" >&5
12937 cat "conftest.$ac_ext" >&5
12938 ac_cv_lib_posix_remove=no
12940 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12941 LIBS=$ac_check_lib_save_LIBS
12943 echo "$as_me:12943: result: $ac_cv_lib_posix_remove" >&5
12944 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
12945 if test "$ac_cv_lib_posix_remove" = yes; then
12946 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
12951 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
12952 echo "$as_me:12952: checking for shmat" >&5
12953 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
12954 if test "${ac_cv_func_shmat+set}" = set; then
12955 echo $ECHO_N "(cached) $ECHO_C" >&6
12957 cat >"conftest.$ac_ext" <<_ACEOF
12958 #line 12958 "configure"
12959 #include "confdefs.h"
12960 #define shmat autoconf_temporary
12961 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12968 /* We use char because int might match the return type of a gcc2
12969 builtin and then its argument prototype would still apply. */
12976 /* The GNU C library defines stubs for functions which it implements
12977 to always fail with ENOSYS. Some functions are actually named
12978 something starting with __ and the normal name is an alias. */
12979 #if defined (__stub_shmat) || defined (__stub___shmat)
12980 #error found stub for shmat
12988 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12989 if { (eval echo "$as_me:12989: \"$ac_link\"") >&5
12990 (eval $ac_link) 2>&5
12992 echo "$as_me:12992: \$? = $ac_status" >&5
12993 (exit "$ac_status"); } &&
12994 { ac_try='test -s "conftest$ac_exeext"'
12995 { (eval echo "$as_me:12995: \"$ac_try\"") >&5
12996 (eval $ac_try) 2>&5
12998 echo "$as_me:12998: \$? = $ac_status" >&5
12999 (exit "$ac_status"); }; }; then
13000 ac_cv_func_shmat=yes
13002 echo "$as_me: failed program was:" >&5
13003 cat "conftest.$ac_ext" >&5
13004 ac_cv_func_shmat=no
13006 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13008 echo "$as_me:13008: result: $ac_cv_func_shmat" >&5
13009 echo "${ECHO_T}$ac_cv_func_shmat" >&6
13011 if test $ac_cv_func_shmat = no; then
13012 echo "$as_me:13012: checking for shmat in -lipc" >&5
13013 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
13014 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
13015 echo $ECHO_N "(cached) $ECHO_C" >&6
13017 ac_check_lib_save_LIBS=$LIBS
13019 cat >"conftest.$ac_ext" <<_ACEOF
13020 #line 13020 "configure"
13021 #include "confdefs.h"
13023 /* Override any gcc2 internal prototype to avoid an error. */
13027 /* We use char because int might match the return type of a gcc2
13028 builtin and then its argument prototype would still apply. */
13038 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13039 if { (eval echo "$as_me:13039: \"$ac_link\"") >&5
13040 (eval $ac_link) 2>&5
13042 echo "$as_me:13042: \$? = $ac_status" >&5
13043 (exit "$ac_status"); } &&
13044 { ac_try='test -s "conftest$ac_exeext"'
13045 { (eval echo "$as_me:13045: \"$ac_try\"") >&5
13046 (eval $ac_try) 2>&5
13048 echo "$as_me:13048: \$? = $ac_status" >&5
13049 (exit "$ac_status"); }; }; then
13050 ac_cv_lib_ipc_shmat=yes
13052 echo "$as_me: failed program was:" >&5
13053 cat "conftest.$ac_ext" >&5
13054 ac_cv_lib_ipc_shmat=no
13056 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13057 LIBS=$ac_check_lib_save_LIBS
13059 echo "$as_me:13059: result: $ac_cv_lib_ipc_shmat" >&5
13060 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
13061 if test "$ac_cv_lib_ipc_shmat" = yes; then
13062 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
13068 # Check for libraries that X11R6 Xt/Xaw programs need.
13069 ac_save_LDFLAGS=$LDFLAGS
13070 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
13071 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
13072 # check for ICE first), but we must link in the order -lSM -lICE or
13073 # we get undefined symbols. So assume we have SM if we have ICE.
13074 # These have to be linked with before -lX11, unlike the other
13075 # libraries we check for below, so use a different variable.
13076 # John Interrante, Karl Berry
13077 echo "$as_me:13077: checking for IceConnectionNumber in -lICE" >&5
13078 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
13079 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
13080 echo $ECHO_N "(cached) $ECHO_C" >&6
13082 ac_check_lib_save_LIBS=$LIBS
13083 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
13084 cat >"conftest.$ac_ext" <<_ACEOF
13085 #line 13085 "configure"
13086 #include "confdefs.h"
13088 /* Override any gcc2 internal prototype to avoid an error. */
13092 /* We use char because int might match the return type of a gcc2
13093 builtin and then its argument prototype would still apply. */
13094 char IceConnectionNumber ();
13098 IceConnectionNumber ();
13103 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13104 if { (eval echo "$as_me:13104: \"$ac_link\"") >&5
13105 (eval $ac_link) 2>&5
13107 echo "$as_me:13107: \$? = $ac_status" >&5
13108 (exit "$ac_status"); } &&
13109 { ac_try='test -s "conftest$ac_exeext"'
13110 { (eval echo "$as_me:13110: \"$ac_try\"") >&5
13111 (eval $ac_try) 2>&5
13113 echo "$as_me:13113: \$? = $ac_status" >&5
13114 (exit "$ac_status"); }; }; then
13115 ac_cv_lib_ICE_IceConnectionNumber=yes
13117 echo "$as_me: failed program was:" >&5
13118 cat "conftest.$ac_ext" >&5
13119 ac_cv_lib_ICE_IceConnectionNumber=no
13121 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13122 LIBS=$ac_check_lib_save_LIBS
13124 echo "$as_me:13124: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
13125 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
13126 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
13127 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
13130 LDFLAGS=$ac_save_LDFLAGS
13134 cf_x_athena=${cf_x_athena:-Xaw}
13136 echo "$as_me:13136: checking if you want to link with Xaw 3d library" >&5
13137 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
13140 # Check whether --with-Xaw3d or --without-Xaw3d was given.
13141 if test "${with_Xaw3d+set}" = set; then
13142 withval="$with_Xaw3d"
13145 if test "$withval" = yes ; then
13147 echo "$as_me:13147: result: yes" >&5
13148 echo "${ECHO_T}yes" >&6
13150 echo "$as_me:13150: result: no" >&5
13151 echo "${ECHO_T}no" >&6
13154 echo "$as_me:13154: checking if you want to link with Xaw 3d xft library" >&5
13155 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
13158 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
13159 if test "${with_Xaw3dxft+set}" = set; then
13160 withval="$with_Xaw3dxft"
13163 if test "$withval" = yes ; then
13164 cf_x_athena=Xaw3dxft
13165 echo "$as_me:13165: result: yes" >&5
13166 echo "${ECHO_T}yes" >&6
13168 echo "$as_me:13168: result: no" >&5
13169 echo "${ECHO_T}no" >&6
13172 echo "$as_me:13172: checking if you want to link with neXT Athena library" >&5
13173 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
13176 # Check whether --with-neXtaw or --without-neXtaw was given.
13177 if test "${with_neXtaw+set}" = set; then
13178 withval="$with_neXtaw"
13181 if test "$withval" = yes ; then
13183 echo "$as_me:13183: result: yes" >&5
13184 echo "${ECHO_T}yes" >&6
13186 echo "$as_me:13186: result: no" >&5
13187 echo "${ECHO_T}no" >&6
13190 echo "$as_me:13190: checking if you want to link with Athena-Plus library" >&5
13191 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
13194 # Check whether --with-XawPlus or --without-XawPlus was given.
13195 if test "${with_XawPlus+set}" = set; then
13196 withval="$with_XawPlus"
13199 if test "$withval" = yes ; then
13200 cf_x_athena=XawPlus
13201 echo "$as_me:13201: result: yes" >&5
13202 echo "${ECHO_T}yes" >&6
13204 echo "$as_me:13204: result: no" >&5
13205 echo "${ECHO_T}no" >&6
13210 if test "$PKG_CONFIG" != none ; then
13212 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
13213 for cf_athena_pkg in \
13216 ${cf_x_athena}-devel \
13217 lib${cf_x_athena} \
13218 lib${cf_x_athena}-devel
13221 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_athena_pkg"; then
13222 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
13224 echo "${as_me:-configure}:13224: testing found package $cf_athena_pkg ..." 1>&5
13226 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_athena_pkg" 2>/dev/null`"
13227 cf_pkgconfig_libs="`$PKG_CONFIG --libs "$cf_athena_pkg" 2>/dev/null`"
13228 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
13230 echo "${as_me:-configure}:13230: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13232 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
13234 echo "${as_me:-configure}:13234: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
13239 cf_new_extra_cppflags=
13241 for cf_add_cflags in $cf_pkgconfig_incs
13243 case "$cf_fix_cppflags" in
13245 case "$cf_add_cflags" in
13246 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13247 case "$cf_add_cflags" in
13249 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13251 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13252 && test -z "${cf_tst_cflags}" \
13253 && cf_fix_cppflags=yes
13255 if test "$cf_fix_cppflags" = yes ; then
13257 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13258 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13261 elif test "${cf_tst_cflags}" = "\"'" ; then
13263 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13264 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13270 case "$CPPFLAGS" in
13274 case "$cf_add_cflags" in
13276 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13278 CPPFLAGS=`echo "$CPPFLAGS" | \
13279 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13280 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13285 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13286 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13293 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13294 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13301 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13302 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13304 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13306 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13307 && test -z "${cf_tst_cflags}" \
13308 && cf_fix_cppflags=no
13313 if test -n "$cf_new_cflags" ; then
13315 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13316 CFLAGS="${CFLAGS}$cf_new_cflags"
13320 if test -n "$cf_new_cppflags" ; then
13322 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13323 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13327 if test -n "$cf_new_extra_cppflags" ; then
13329 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13330 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13334 cf_add_libs="$LIBS"
13337 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13338 # filter duplicates
13339 for cf_add_1lib in $cf_add_0lib; do
13340 for cf_add_2lib in $cf_add_libs; do
13341 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13346 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13348 LIBS="$cf_add_libs"
13350 cf_x_athena_lib="$cf_pkgconfig_libs"
13352 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13354 cat >>confdefs.h <<EOF
13355 #define $cf_x_athena_LIBS 1
13358 for cf_trim_lib in Xmu Xt X11
13361 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13362 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13363 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13365 echo "${as_me:-configure}:13365: testing ..trimmed $LIBS ..." 1>&5
13371 echo "$as_me:13371: checking for usable $cf_x_athena/Xmu package" >&5
13372 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
13373 if test "${cf_cv_xaw_compat+set}" = set; then
13374 echo $ECHO_N "(cached) $ECHO_C" >&6
13377 cat >"conftest.$ac_ext" <<_ACEOF
13378 #line 13378 "configure"
13379 #include "confdefs.h"
13381 #include <X11/Xmu/CharSet.h>
13387 int check = XmuCompareISOLatin1("big", "small");
13394 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13395 if { (eval echo "$as_me:13395: \"$ac_link\"") >&5
13396 (eval $ac_link) 2>&5
13398 echo "$as_me:13398: \$? = $ac_status" >&5
13399 (exit "$ac_status"); } &&
13400 { ac_try='test -s "conftest$ac_exeext"'
13401 { (eval echo "$as_me:13401: \"$ac_try\"") >&5
13402 (eval $ac_try) 2>&5
13404 echo "$as_me:13404: \$? = $ac_status" >&5
13405 (exit "$ac_status"); }; }; then
13406 cf_cv_xaw_compat=yes
13408 echo "$as_me: failed program was:" >&5
13409 cat "conftest.$ac_ext" >&5
13410 cf_cv_xaw_compat=no
13412 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13414 echo "$as_me:13414: result: $cf_cv_xaw_compat" >&5
13415 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
13417 if test "$cf_cv_xaw_compat" = no
13419 # workaround for broken ".pc" files...
13420 case "$cf_x_athena_lib" in
13424 test -n "$verbose" && echo " work around broken package" 1>&6
13426 echo "${as_me:-configure}:13426: testing work around broken package ..." 1>&5
13428 cf_save_xmu="$LIBS"
13429 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
13431 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xmu"; then
13432 test -n "$verbose" && echo " found package xmu" 1>&6
13434 echo "${as_me:-configure}:13434: testing found package xmu ..." 1>&5
13436 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xmu" 2>/dev/null`"
13437 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xmu" 2>/dev/null`"
13438 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
13440 echo "${as_me:-configure}:13440: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13442 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
13444 echo "${as_me:-configure}:13444: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
13449 cf_new_extra_cppflags=
13451 for cf_add_cflags in $cf_pkgconfig_incs
13453 case "$cf_fix_cppflags" in
13455 case "$cf_add_cflags" in
13456 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13457 case "$cf_add_cflags" in
13459 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13461 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13462 && test -z "${cf_tst_cflags}" \
13463 && cf_fix_cppflags=yes
13465 if test "$cf_fix_cppflags" = yes ; then
13467 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13468 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13471 elif test "${cf_tst_cflags}" = "\"'" ; then
13473 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13474 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13480 case "$CPPFLAGS" in
13484 case "$cf_add_cflags" in
13486 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13488 CPPFLAGS=`echo "$CPPFLAGS" | \
13489 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13490 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13495 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13496 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13503 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13504 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13511 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13512 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13514 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13516 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13517 && test -z "${cf_tst_cflags}" \
13518 && cf_fix_cppflags=no
13523 if test -n "$cf_new_cflags" ; then
13525 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13526 CFLAGS="${CFLAGS}$cf_new_cflags"
13530 if test -n "$cf_new_cppflags" ; then
13532 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13533 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13537 if test -n "$cf_new_extra_cppflags" ; then
13539 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13540 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13544 cf_add_libs="$LIBS"
13547 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13548 # filter duplicates
13549 for cf_add_1lib in $cf_add_0lib; do
13550 for cf_add_2lib in $cf_add_libs; do
13551 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13556 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13558 LIBS="$cf_add_libs"
13560 LIBS="$cf_save_xmu"
13562 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13564 echo "${as_me:-configure}:13564: testing ...before $LIBS ..." 1>&5
13566 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
13567 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13569 echo "${as_me:-configure}:13569: testing ...after $LIBS ..." 1>&5
13575 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13577 echo "${as_me:-configure}:13577: testing ...before $LIBS ..." 1>&5
13579 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
13580 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13582 echo "${as_me:-configure}:13582: testing ...after $LIBS ..." 1>&5
13586 for cf_trim_lib in Xmu Xt X11
13589 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13590 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13591 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13593 echo "${as_me:-configure}:13593: testing ..trimmed $LIBS ..." 1>&5
13613 if test -z "$cf_x_athena_lib" ; then
13615 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
13616 test -n "$verbose" && echo " found package Xext" 1>&6
13618 echo "${as_me:-configure}:13618: testing found package Xext ..." 1>&5
13620 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
13621 cf_pkgconfig_libs="`$PKG_CONFIG --libs "Xext" 2>/dev/null`"
13622 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
13624 echo "${as_me:-configure}:13624: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13626 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
13628 echo "${as_me:-configure}:13628: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
13633 cf_new_extra_cppflags=
13635 for cf_add_cflags in $cf_pkgconfig_incs
13637 case "$cf_fix_cppflags" in
13639 case "$cf_add_cflags" in
13640 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13641 case "$cf_add_cflags" in
13643 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13645 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13646 && test -z "${cf_tst_cflags}" \
13647 && cf_fix_cppflags=yes
13649 if test "$cf_fix_cppflags" = yes ; then
13651 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13652 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13655 elif test "${cf_tst_cflags}" = "\"'" ; then
13657 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13658 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13664 case "$CPPFLAGS" in
13668 case "$cf_add_cflags" in
13670 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13672 CPPFLAGS=`echo "$CPPFLAGS" | \
13673 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13674 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13679 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13680 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13687 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13688 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13695 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13696 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13698 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13700 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13701 && test -z "${cf_tst_cflags}" \
13702 && cf_fix_cppflags=no
13707 if test -n "$cf_new_cflags" ; then
13709 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13710 CFLAGS="${CFLAGS}$cf_new_cflags"
13714 if test -n "$cf_new_cppflags" ; then
13716 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13717 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13721 if test -n "$cf_new_extra_cppflags" ; then
13723 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13724 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13728 cf_add_libs="$LIBS"
13731 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13732 # filter duplicates
13733 for cf_add_1lib in $cf_add_0lib; do
13734 for cf_add_2lib in $cf_add_libs; do
13735 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13740 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13742 LIBS="$cf_add_libs"
13749 echo "$as_me:13749: checking for XextCreateExtension in -lXext" >&5
13750 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
13751 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
13752 echo $ECHO_N "(cached) $ECHO_C" >&6
13754 ac_check_lib_save_LIBS=$LIBS
13755 LIBS="-lXext $LIBS"
13756 cat >"conftest.$ac_ext" <<_ACEOF
13757 #line 13757 "configure"
13758 #include "confdefs.h"
13760 /* Override any gcc2 internal prototype to avoid an error. */
13764 /* We use char because int might match the return type of a gcc2
13765 builtin and then its argument prototype would still apply. */
13766 char XextCreateExtension ();
13770 XextCreateExtension ();
13775 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13776 if { (eval echo "$as_me:13776: \"$ac_link\"") >&5
13777 (eval $ac_link) 2>&5
13779 echo "$as_me:13779: \$? = $ac_status" >&5
13780 (exit "$ac_status"); } &&
13781 { ac_try='test -s "conftest$ac_exeext"'
13782 { (eval echo "$as_me:13782: \"$ac_try\"") >&5
13783 (eval $ac_try) 2>&5
13785 echo "$as_me:13785: \$? = $ac_status" >&5
13786 (exit "$ac_status"); }; }; then
13787 ac_cv_lib_Xext_XextCreateExtension=yes
13789 echo "$as_me: failed program was:" >&5
13790 cat "conftest.$ac_ext" >&5
13791 ac_cv_lib_Xext_XextCreateExtension=no
13793 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13794 LIBS=$ac_check_lib_save_LIBS
13796 echo "$as_me:13796: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
13797 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
13798 if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
13800 cf_add_libs="$LIBS"
13803 for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13804 # filter duplicates
13805 for cf_add_1lib in $cf_add_0lib; do
13806 for cf_add_2lib in $cf_add_libs; do
13807 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13812 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13814 LIBS="$cf_add_libs"
13820 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
13821 # in some cases has installed dummy files in the former, other cases replaced
13822 # it with a link to the new location). This complicates the configure script.
13823 # Check for that pitfall, and recover using pkg-config
13825 # If none of these are set, the configuration is almost certainly broken.
13826 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
13829 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
13830 test -n "$verbose" && echo " found package x11" 1>&6
13832 echo "${as_me:-configure}:13832: testing found package x11 ..." 1>&5
13834 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
13835 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
13836 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
13838 echo "${as_me:-configure}:13838: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13840 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
13842 echo "${as_me:-configure}:13842: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
13847 cf_new_extra_cppflags=
13849 for cf_add_cflags in $cf_pkgconfig_incs
13851 case "$cf_fix_cppflags" in
13853 case "$cf_add_cflags" in
13854 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13855 case "$cf_add_cflags" in
13857 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13859 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13860 && test -z "${cf_tst_cflags}" \
13861 && cf_fix_cppflags=yes
13863 if test "$cf_fix_cppflags" = yes ; then
13865 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13866 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13869 elif test "${cf_tst_cflags}" = "\"'" ; then
13871 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13872 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13878 case "$CPPFLAGS" in
13882 case "$cf_add_cflags" in
13884 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13886 CPPFLAGS=`echo "$CPPFLAGS" | \
13887 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13888 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13893 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13894 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13901 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13902 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13909 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13910 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13912 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13914 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13915 && test -z "${cf_tst_cflags}" \
13916 && cf_fix_cppflags=no
13921 if test -n "$cf_new_cflags" ; then
13923 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13924 CFLAGS="${CFLAGS}$cf_new_cflags"
13928 if test -n "$cf_new_cppflags" ; then
13930 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13931 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13935 if test -n "$cf_new_extra_cppflags" ; then
13937 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13938 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13942 cf_add_libs="$LIBS"
13945 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13946 # filter duplicates
13947 for cf_add_1lib in $cf_add_0lib; do
13948 for cf_add_2lib in $cf_add_libs; do
13949 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13954 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13956 LIBS="$cf_add_libs"
13962 { echo "$as_me:13962: WARNING: unable to find X11 library" >&5
13963 echo "$as_me: WARNING: unable to find X11 library" >&2;}
13966 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
13967 test -n "$verbose" && echo " found package ice" 1>&6
13969 echo "${as_me:-configure}:13969: testing found package ice ..." 1>&5
13971 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
13972 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
13973 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
13975 echo "${as_me:-configure}:13975: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13977 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
13979 echo "${as_me:-configure}:13979: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
13984 cf_new_extra_cppflags=
13986 for cf_add_cflags in $cf_pkgconfig_incs
13988 case "$cf_fix_cppflags" in
13990 case "$cf_add_cflags" in
13991 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13992 case "$cf_add_cflags" in
13994 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13996 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13997 && test -z "${cf_tst_cflags}" \
13998 && cf_fix_cppflags=yes
14000 if test "$cf_fix_cppflags" = yes ; then
14002 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14003 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14006 elif test "${cf_tst_cflags}" = "\"'" ; then
14008 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14009 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14015 case "$CPPFLAGS" in
14019 case "$cf_add_cflags" in
14021 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14023 CPPFLAGS=`echo "$CPPFLAGS" | \
14024 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14025 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14030 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14031 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14038 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14039 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14046 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14047 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14049 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14051 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14052 && test -z "${cf_tst_cflags}" \
14053 && cf_fix_cppflags=no
14058 if test -n "$cf_new_cflags" ; then
14060 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14061 CFLAGS="${CFLAGS}$cf_new_cflags"
14065 if test -n "$cf_new_cppflags" ; then
14067 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14068 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14072 if test -n "$cf_new_extra_cppflags" ; then
14074 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14075 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14079 cf_add_libs="$LIBS"
14082 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14083 # filter duplicates
14084 for cf_add_1lib in $cf_add_0lib; do
14085 for cf_add_2lib in $cf_add_libs; do
14086 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14091 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14093 LIBS="$cf_add_libs"
14099 { echo "$as_me:14099: WARNING: unable to find ICE library" >&5
14100 echo "$as_me: WARNING: unable to find ICE library" >&2;}
14103 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
14104 test -n "$verbose" && echo " found package sm" 1>&6
14106 echo "${as_me:-configure}:14106: testing found package sm ..." 1>&5
14108 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
14109 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
14110 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
14112 echo "${as_me:-configure}:14112: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14114 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
14116 echo "${as_me:-configure}:14116: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
14121 cf_new_extra_cppflags=
14123 for cf_add_cflags in $cf_pkgconfig_incs
14125 case "$cf_fix_cppflags" in
14127 case "$cf_add_cflags" in
14128 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14129 case "$cf_add_cflags" in
14131 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14133 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14134 && test -z "${cf_tst_cflags}" \
14135 && cf_fix_cppflags=yes
14137 if test "$cf_fix_cppflags" = yes ; then
14139 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14140 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14143 elif test "${cf_tst_cflags}" = "\"'" ; then
14145 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14146 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14152 case "$CPPFLAGS" in
14156 case "$cf_add_cflags" in
14158 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14160 CPPFLAGS=`echo "$CPPFLAGS" | \
14161 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14162 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14167 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14168 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14175 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14176 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14183 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14184 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14186 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14188 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14189 && test -z "${cf_tst_cflags}" \
14190 && cf_fix_cppflags=no
14195 if test -n "$cf_new_cflags" ; then
14197 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14198 CFLAGS="${CFLAGS}$cf_new_cflags"
14202 if test -n "$cf_new_cppflags" ; then
14204 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14205 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14209 if test -n "$cf_new_extra_cppflags" ; then
14211 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14212 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14216 cf_add_libs="$LIBS"
14219 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14220 # filter duplicates
14221 for cf_add_1lib in $cf_add_0lib; do
14222 for cf_add_2lib in $cf_add_libs; do
14223 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14228 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14230 LIBS="$cf_add_libs"
14236 { echo "$as_me:14236: WARNING: unable to find SM library" >&5
14237 echo "$as_me: WARNING: unable to find SM library" >&2;}
14240 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
14241 test -n "$verbose" && echo " found package xt" 1>&6
14243 echo "${as_me:-configure}:14243: testing found package xt ..." 1>&5
14245 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
14246 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
14247 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
14249 echo "${as_me:-configure}:14249: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14251 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
14253 echo "${as_me:-configure}:14253: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
14258 cf_new_extra_cppflags=
14260 for cf_add_cflags in $cf_pkgconfig_incs
14262 case "$cf_fix_cppflags" in
14264 case "$cf_add_cflags" in
14265 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14266 case "$cf_add_cflags" in
14268 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14270 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14271 && test -z "${cf_tst_cflags}" \
14272 && cf_fix_cppflags=yes
14274 if test "$cf_fix_cppflags" = yes ; then
14276 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14277 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14280 elif test "${cf_tst_cflags}" = "\"'" ; then
14282 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14283 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14289 case "$CPPFLAGS" in
14293 case "$cf_add_cflags" in
14295 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14297 CPPFLAGS=`echo "$CPPFLAGS" | \
14298 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14299 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14304 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14305 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14312 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14313 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14320 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14321 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14323 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14325 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14326 && test -z "${cf_tst_cflags}" \
14327 && cf_fix_cppflags=no
14332 if test -n "$cf_new_cflags" ; then
14334 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14335 CFLAGS="${CFLAGS}$cf_new_cflags"
14339 if test -n "$cf_new_cppflags" ; then
14341 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14342 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14346 if test -n "$cf_new_extra_cppflags" ; then
14348 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14349 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14353 cf_add_libs="$LIBS"
14356 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14357 # filter duplicates
14358 for cf_add_1lib in $cf_add_0lib; do
14359 for cf_add_2lib in $cf_add_libs; do
14360 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14365 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14367 LIBS="$cf_add_libs"
14373 { echo "$as_me:14373: WARNING: unable to find Xt library" >&5
14374 echo "$as_me: WARNING: unable to find Xt library" >&2;}
14378 LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
14383 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
14384 test -n "$verbose" && echo " found package xt" 1>&6
14386 echo "${as_me:-configure}:14386: testing found package xt ..." 1>&5
14388 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
14389 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
14390 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
14392 echo "${as_me:-configure}:14392: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14394 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
14396 echo "${as_me:-configure}:14396: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
14401 cf_new_extra_cppflags=
14403 for cf_add_cflags in $cf_pkgconfig_incs
14405 case "$cf_fix_cppflags" in
14407 case "$cf_add_cflags" in
14408 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14409 case "$cf_add_cflags" in
14411 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14413 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14414 && test -z "${cf_tst_cflags}" \
14415 && cf_fix_cppflags=yes
14417 if test "$cf_fix_cppflags" = yes ; then
14419 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14420 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14423 elif test "${cf_tst_cflags}" = "\"'" ; then
14425 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14426 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14432 case "$CPPFLAGS" in
14436 case "$cf_add_cflags" in
14438 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14440 CPPFLAGS=`echo "$CPPFLAGS" | \
14441 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14442 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14447 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14448 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14455 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14456 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14463 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14464 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14466 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14468 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14469 && test -z "${cf_tst_cflags}" \
14470 && cf_fix_cppflags=no
14475 if test -n "$cf_new_cflags" ; then
14477 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14478 CFLAGS="${CFLAGS}$cf_new_cflags"
14482 if test -n "$cf_new_cppflags" ; then
14484 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14485 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14489 if test -n "$cf_new_extra_cppflags" ; then
14491 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14492 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14496 cf_add_libs="$LIBS"
14499 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14500 # filter duplicates
14501 for cf_add_1lib in $cf_add_0lib; do
14502 for cf_add_2lib in $cf_add_libs; do
14503 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14508 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14510 LIBS="$cf_add_libs"
14516 # we have an "xt" package, but it may omit Xt's dependency on X11
14517 echo "$as_me:14517: checking for usable X dependency" >&5
14518 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
14519 if test "${cf_cv_xt_x11_compat+set}" = set; then
14520 echo $ECHO_N "(cached) $ECHO_C" >&6
14523 cat >"conftest.$ac_ext" <<_ACEOF
14524 #line 14524 "configure"
14525 #include "confdefs.h"
14527 #include <X11/Xlib.h>
14533 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
14534 int rc2 = XClearWindow((Display*) 0, (Window) 0);
14535 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
14536 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
14542 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14543 if { (eval echo "$as_me:14543: \"$ac_link\"") >&5
14544 (eval $ac_link) 2>&5
14546 echo "$as_me:14546: \$? = $ac_status" >&5
14547 (exit "$ac_status"); } &&
14548 { ac_try='test -s "conftest$ac_exeext"'
14549 { (eval echo "$as_me:14549: \"$ac_try\"") >&5
14550 (eval $ac_try) 2>&5
14552 echo "$as_me:14552: \$? = $ac_status" >&5
14553 (exit "$ac_status"); }; }; then
14554 cf_cv_xt_x11_compat=yes
14556 echo "$as_me: failed program was:" >&5
14557 cat "conftest.$ac_ext" >&5
14558 cf_cv_xt_x11_compat=no
14560 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14562 echo "$as_me:14562: result: $cf_cv_xt_x11_compat" >&5
14563 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
14564 if test "$cf_cv_xt_x11_compat" = no
14566 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
14568 echo "${as_me:-configure}:14568: testing work around broken X11 dependency ..." 1>&5
14570 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
14572 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
14573 test -n "$verbose" && echo " found package x11" 1>&6
14575 echo "${as_me:-configure}:14575: testing found package x11 ..." 1>&5
14577 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
14578 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
14579 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
14581 echo "${as_me:-configure}:14581: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14583 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
14585 echo "${as_me:-configure}:14585: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
14590 cf_new_extra_cppflags=
14592 for cf_add_cflags in $cf_pkgconfig_incs
14594 case "$cf_fix_cppflags" in
14596 case "$cf_add_cflags" in
14597 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14598 case "$cf_add_cflags" in
14600 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14602 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14603 && test -z "${cf_tst_cflags}" \
14604 && cf_fix_cppflags=yes
14606 if test "$cf_fix_cppflags" = yes ; then
14608 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14609 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14612 elif test "${cf_tst_cflags}" = "\"'" ; then
14614 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14615 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14621 case "$CPPFLAGS" in
14625 case "$cf_add_cflags" in
14627 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14629 CPPFLAGS=`echo "$CPPFLAGS" | \
14630 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14631 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14636 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14637 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14644 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14645 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14652 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14653 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14655 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14657 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14658 && test -z "${cf_tst_cflags}" \
14659 && cf_fix_cppflags=no
14664 if test -n "$cf_new_cflags" ; then
14666 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14667 CFLAGS="${CFLAGS}$cf_new_cflags"
14671 if test -n "$cf_new_cppflags" ; then
14673 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14674 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14678 if test -n "$cf_new_extra_cppflags" ; then
14680 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14681 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14685 cf_add_libs="$LIBS"
14688 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14689 # filter duplicates
14690 for cf_add_1lib in $cf_add_0lib; do
14691 for cf_add_2lib in $cf_add_libs; do
14692 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14697 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14699 LIBS="$cf_add_libs"
14706 test -n "$verbose" && echo " ...before $LIBS" 1>&6
14708 echo "${as_me:-configure}:14708: testing ...before $LIBS ..." 1>&5
14710 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
14711 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14713 echo "${as_me:-configure}:14713: testing ...after $LIBS ..." 1>&5
14721 echo "$as_me:14721: checking for usable X Toolkit package" >&5
14722 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
14723 if test "${cf_cv_xt_ice_compat+set}" = set; then
14724 echo $ECHO_N "(cached) $ECHO_C" >&6
14727 cat >"conftest.$ac_ext" <<_ACEOF
14728 #line 14728 "configure"
14729 #include "confdefs.h"
14731 #include <X11/Shell.h>
14736 int num = IceConnectionNumber(0); (void) num
14742 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14743 if { (eval echo "$as_me:14743: \"$ac_link\"") >&5
14744 (eval $ac_link) 2>&5
14746 echo "$as_me:14746: \$? = $ac_status" >&5
14747 (exit "$ac_status"); } &&
14748 { ac_try='test -s "conftest$ac_exeext"'
14749 { (eval echo "$as_me:14749: \"$ac_try\"") >&5
14750 (eval $ac_try) 2>&5
14752 echo "$as_me:14752: \$? = $ac_status" >&5
14753 (exit "$ac_status"); }; }; then
14754 cf_cv_xt_ice_compat=yes
14756 echo "$as_me: failed program was:" >&5
14757 cat "conftest.$ac_ext" >&5
14758 cf_cv_xt_ice_compat=no
14760 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14762 echo "$as_me:14762: result: $cf_cv_xt_ice_compat" >&5
14763 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
14765 if test "$cf_cv_xt_ice_compat" = no
14767 # workaround for broken ".pc" files used for X Toolkit.
14768 case "x$X_PRE_LIBS" in
14774 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
14776 echo "${as_me:-configure}:14776: testing work around broken ICE dependency ..." 1>&5
14778 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
14779 test -n "$verbose" && echo " found package ice" 1>&6
14781 echo "${as_me:-configure}:14781: testing found package ice ..." 1>&5
14783 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
14784 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
14785 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
14787 echo "${as_me:-configure}:14787: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14789 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
14791 echo "${as_me:-configure}:14791: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
14796 cf_new_extra_cppflags=
14798 for cf_add_cflags in $cf_pkgconfig_incs
14800 case "$cf_fix_cppflags" in
14802 case "$cf_add_cflags" in
14803 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14804 case "$cf_add_cflags" in
14806 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14808 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14809 && test -z "${cf_tst_cflags}" \
14810 && cf_fix_cppflags=yes
14812 if test "$cf_fix_cppflags" = yes ; then
14814 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14815 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14818 elif test "${cf_tst_cflags}" = "\"'" ; then
14820 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14821 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14827 case "$CPPFLAGS" in
14831 case "$cf_add_cflags" in
14833 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14835 CPPFLAGS=`echo "$CPPFLAGS" | \
14836 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14837 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14842 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14843 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14850 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14851 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14858 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14859 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14861 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14863 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14864 && test -z "${cf_tst_cflags}" \
14865 && cf_fix_cppflags=no
14870 if test -n "$cf_new_cflags" ; then
14872 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14873 CFLAGS="${CFLAGS}$cf_new_cflags"
14877 if test -n "$cf_new_cppflags" ; then
14879 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14880 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14884 if test -n "$cf_new_extra_cppflags" ; then
14886 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14887 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14891 cf_add_libs="$LIBS"
14894 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14895 # filter duplicates
14896 for cf_add_1lib in $cf_add_0lib; do
14897 for cf_add_2lib in $cf_add_libs; do
14898 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14903 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14905 LIBS="$cf_add_libs"
14907 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
14908 test -n "$verbose" && echo " found package sm" 1>&6
14910 echo "${as_me:-configure}:14910: testing found package sm ..." 1>&5
14912 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
14913 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
14914 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
14916 echo "${as_me:-configure}:14916: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14918 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
14920 echo "${as_me:-configure}:14920: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
14925 cf_new_extra_cppflags=
14927 for cf_add_cflags in $cf_pkgconfig_incs
14929 case "$cf_fix_cppflags" in
14931 case "$cf_add_cflags" in
14932 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14933 case "$cf_add_cflags" in
14935 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14937 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14938 && test -z "${cf_tst_cflags}" \
14939 && cf_fix_cppflags=yes
14941 if test "$cf_fix_cppflags" = yes ; then
14943 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14944 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14947 elif test "${cf_tst_cflags}" = "\"'" ; then
14949 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14950 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14956 case "$CPPFLAGS" in
14960 case "$cf_add_cflags" in
14962 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14964 CPPFLAGS=`echo "$CPPFLAGS" | \
14965 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14966 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14971 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14972 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14979 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14980 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14987 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14988 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14990 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14992 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14993 && test -z "${cf_tst_cflags}" \
14994 && cf_fix_cppflags=no
14999 if test -n "$cf_new_cflags" ; then
15001 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15002 CFLAGS="${CFLAGS}$cf_new_cflags"
15006 if test -n "$cf_new_cppflags" ; then
15008 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15009 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15013 if test -n "$cf_new_extra_cppflags" ; then
15015 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15016 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15020 cf_add_libs="$LIBS"
15023 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15024 # filter duplicates
15025 for cf_add_1lib in $cf_add_0lib; do
15026 for cf_add_2lib in $cf_add_libs; do
15027 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15032 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15034 LIBS="$cf_add_libs"
15047 test -n "$verbose" && echo " ...before $LIBS" 1>&6
15049 echo "${as_me:-configure}:15049: testing ...before $LIBS ..." 1>&5
15051 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
15052 test -n "$verbose" && echo " ...after $LIBS" 1>&6
15054 echo "${as_me:-configure}:15054: testing ...after $LIBS ..." 1>&5
15070 LDFLAGS="$X_LIBS $LDFLAGS"
15072 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
15074 echo "${as_me:-configure}:15074: testing checking additions to CFLAGS ..." 1>&5
15076 cf_check_cflags="$CFLAGS"
15077 cf_check_cppflags="$CPPFLAGS"
15082 cf_new_extra_cppflags=
15084 for cf_add_cflags in $X_CFLAGS
15086 case "$cf_fix_cppflags" in
15088 case "$cf_add_cflags" in
15089 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15090 case "$cf_add_cflags" in
15092 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15094 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15095 && test -z "${cf_tst_cflags}" \
15096 && cf_fix_cppflags=yes
15098 if test "$cf_fix_cppflags" = yes ; then
15100 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15101 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15104 elif test "${cf_tst_cflags}" = "\"'" ; then
15106 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15107 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15113 case "$CPPFLAGS" in
15117 case "$cf_add_cflags" in
15119 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15121 CPPFLAGS=`echo "$CPPFLAGS" | \
15122 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15123 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15128 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15129 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15136 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15137 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15144 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15145 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15147 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15149 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15150 && test -z "${cf_tst_cflags}" \
15151 && cf_fix_cppflags=no
15156 if test -n "$cf_new_cflags" ; then
15157 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
15159 echo "${as_me:-configure}:15159: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
15161 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15162 CFLAGS="${CFLAGS}$cf_new_cflags"
15166 if test -n "$cf_new_cppflags" ; then
15167 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
15169 echo "${as_me:-configure}:15169: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
15171 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15172 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15176 if test -n "$cf_new_extra_cppflags" ; then
15177 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
15179 echo "${as_me:-configure}:15179: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
15181 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15182 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15186 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
15187 cat >"conftest.$ac_ext" <<_ACEOF
15188 #line 15188 "configure"
15189 #include "confdefs.h"
15194 printf("Hello world");
15199 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15200 if { (eval echo "$as_me:15200: \"$ac_link\"") >&5
15201 (eval $ac_link) 2>&5
15203 echo "$as_me:15203: \$? = $ac_status" >&5
15204 (exit "$ac_status"); } &&
15205 { ac_try='test -s "conftest$ac_exeext"'
15206 { (eval echo "$as_me:15206: \"$ac_try\"") >&5
15207 (eval $ac_try) 2>&5
15209 echo "$as_me:15209: \$? = $ac_status" >&5
15210 (exit "$ac_status"); }; }; then
15213 echo "$as_me: failed program was:" >&5
15214 cat "conftest.$ac_ext" >&5
15215 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
15217 echo "${as_me:-configure}:15217: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
15219 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
15220 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
15222 echo "${as_me:-configure}:15222: testing but keeping change to \$CPPFLAGS ..." 1>&5
15225 CFLAGS="$cf_check_cflags"
15227 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15230 echo "$as_me:15230: checking for XOpenDisplay" >&5
15231 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
15232 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
15233 echo $ECHO_N "(cached) $ECHO_C" >&6
15235 cat >"conftest.$ac_ext" <<_ACEOF
15236 #line 15236 "configure"
15237 #include "confdefs.h"
15238 #define XOpenDisplay autoconf_temporary
15239 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15240 #undef XOpenDisplay
15246 /* We use char because int might match the return type of a gcc2
15247 builtin and then its argument prototype would still apply. */
15248 char XOpenDisplay (void);
15254 /* The GNU C library defines stubs for functions which it implements
15255 to always fail with ENOSYS. Some functions are actually named
15256 something starting with __ and the normal name is an alias. */
15257 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
15258 #error found stub for XOpenDisplay
15261 return XOpenDisplay ();
15266 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15267 if { (eval echo "$as_me:15267: \"$ac_link\"") >&5
15268 (eval $ac_link) 2>&5
15270 echo "$as_me:15270: \$? = $ac_status" >&5
15271 (exit "$ac_status"); } &&
15272 { ac_try='test -s "conftest$ac_exeext"'
15273 { (eval echo "$as_me:15273: \"$ac_try\"") >&5
15274 (eval $ac_try) 2>&5
15276 echo "$as_me:15276: \$? = $ac_status" >&5
15277 (exit "$ac_status"); }; }; then
15278 ac_cv_func_XOpenDisplay=yes
15280 echo "$as_me: failed program was:" >&5
15281 cat "conftest.$ac_ext" >&5
15282 ac_cv_func_XOpenDisplay=no
15284 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15286 echo "$as_me:15286: result: $ac_cv_func_XOpenDisplay" >&5
15287 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
15288 if test "$ac_cv_func_XOpenDisplay" = yes; then
15292 echo "$as_me:15292: checking for XOpenDisplay in -lX11" >&5
15293 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
15294 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
15295 echo $ECHO_N "(cached) $ECHO_C" >&6
15297 ac_check_lib_save_LIBS=$LIBS
15299 cat >"conftest.$ac_ext" <<_ACEOF
15300 #line 15300 "configure"
15301 #include "confdefs.h"
15303 /* Override any gcc2 internal prototype to avoid an error. */
15307 /* We use char because int might match the return type of a gcc2
15308 builtin and then its argument prototype would still apply. */
15309 char XOpenDisplay ();
15318 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15319 if { (eval echo "$as_me:15319: \"$ac_link\"") >&5
15320 (eval $ac_link) 2>&5
15322 echo "$as_me:15322: \$? = $ac_status" >&5
15323 (exit "$ac_status"); } &&
15324 { ac_try='test -s "conftest$ac_exeext"'
15325 { (eval echo "$as_me:15325: \"$ac_try\"") >&5
15326 (eval $ac_try) 2>&5
15328 echo "$as_me:15328: \$? = $ac_status" >&5
15329 (exit "$ac_status"); }; }; then
15330 ac_cv_lib_X11_XOpenDisplay=yes
15332 echo "$as_me: failed program was:" >&5
15333 cat "conftest.$ac_ext" >&5
15334 ac_cv_lib_X11_XOpenDisplay=no
15336 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15337 LIBS=$ac_check_lib_save_LIBS
15339 echo "$as_me:15339: result: $ac_cv_lib_X11_XOpenDisplay" >&5
15340 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
15341 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
15343 cf_add_libs="$LIBS"
15346 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15347 # filter duplicates
15348 for cf_add_1lib in $cf_add_0lib; do
15349 for cf_add_2lib in $cf_add_libs; do
15350 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15355 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15357 LIBS="$cf_add_libs"
15363 echo "$as_me:15363: checking for XtAppInitialize" >&5
15364 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
15365 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
15366 echo $ECHO_N "(cached) $ECHO_C" >&6
15368 cat >"conftest.$ac_ext" <<_ACEOF
15369 #line 15369 "configure"
15370 #include "confdefs.h"
15371 #define XtAppInitialize autoconf_temporary
15372 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15373 #undef XtAppInitialize
15379 /* We use char because int might match the return type of a gcc2
15380 builtin and then its argument prototype would still apply. */
15381 char XtAppInitialize (void);
15387 /* The GNU C library defines stubs for functions which it implements
15388 to always fail with ENOSYS. Some functions are actually named
15389 something starting with __ and the normal name is an alias. */
15390 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
15391 #error found stub for XtAppInitialize
15394 return XtAppInitialize ();
15399 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15400 if { (eval echo "$as_me:15400: \"$ac_link\"") >&5
15401 (eval $ac_link) 2>&5
15403 echo "$as_me:15403: \$? = $ac_status" >&5
15404 (exit "$ac_status"); } &&
15405 { ac_try='test -s "conftest$ac_exeext"'
15406 { (eval echo "$as_me:15406: \"$ac_try\"") >&5
15407 (eval $ac_try) 2>&5
15409 echo "$as_me:15409: \$? = $ac_status" >&5
15410 (exit "$ac_status"); }; }; then
15411 ac_cv_func_XtAppInitialize=yes
15413 echo "$as_me: failed program was:" >&5
15414 cat "conftest.$ac_ext" >&5
15415 ac_cv_func_XtAppInitialize=no
15417 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15419 echo "$as_me:15419: result: $ac_cv_func_XtAppInitialize" >&5
15420 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
15421 if test "$ac_cv_func_XtAppInitialize" = yes; then
15425 echo "$as_me:15425: checking for XtAppInitialize in -lXt" >&5
15426 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
15427 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
15428 echo $ECHO_N "(cached) $ECHO_C" >&6
15430 ac_check_lib_save_LIBS=$LIBS
15432 cat >"conftest.$ac_ext" <<_ACEOF
15433 #line 15433 "configure"
15434 #include "confdefs.h"
15436 /* Override any gcc2 internal prototype to avoid an error. */
15440 /* We use char because int might match the return type of a gcc2
15441 builtin and then its argument prototype would still apply. */
15442 char XtAppInitialize ();
15446 XtAppInitialize ();
15451 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15452 if { (eval echo "$as_me:15452: \"$ac_link\"") >&5
15453 (eval $ac_link) 2>&5
15455 echo "$as_me:15455: \$? = $ac_status" >&5
15456 (exit "$ac_status"); } &&
15457 { ac_try='test -s "conftest$ac_exeext"'
15458 { (eval echo "$as_me:15458: \"$ac_try\"") >&5
15459 (eval $ac_try) 2>&5
15461 echo "$as_me:15461: \$? = $ac_status" >&5
15462 (exit "$ac_status"); }; }; then
15463 ac_cv_lib_Xt_XtAppInitialize=yes
15465 echo "$as_me: failed program was:" >&5
15466 cat "conftest.$ac_ext" >&5
15467 ac_cv_lib_Xt_XtAppInitialize=no
15469 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15470 LIBS=$ac_check_lib_save_LIBS
15472 echo "$as_me:15472: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
15473 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
15474 if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
15476 cat >>confdefs.h <<\EOF
15477 #define HAVE_LIBXT 1
15488 if test "$cf_have_X_LIBS" = no ; then
15489 { echo "$as_me:15489: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15490 test program. You will have to check and add the proper libraries by hand
15492 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15493 test program. You will have to check and add the proper libraries by hand
15494 to makefile." >&2;}
15497 cf_x_athena_root=$cf_x_athena
15500 for cf_path in default \
15501 /usr/contrib/X11R6 \
15502 /usr/contrib/X11R5 \
15506 if test -z "$cf_x_athena_inc" ; then
15508 cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
15509 cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
15510 cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
15511 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15512 for cf_X_CFLAGS in $X_CFLAGS
15514 case "x$cf_X_CFLAGS" in
15516 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15519 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15524 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
15525 if test "$cf_path" != default ; then
15527 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15528 CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
15530 echo "$as_me:15530: checking for $cf_test in $cf_path" >&5
15531 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
15533 echo "$as_me:15533: checking for $cf_test" >&5
15534 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
15536 cat >"conftest.$ac_ext" <<_ACEOF
15537 #line 15537 "configure"
15538 #include "confdefs.h"
15540 #include <X11/Intrinsic.h>
15541 #include <$cf_test>
15550 rm -f "conftest.$ac_objext"
15551 if { (eval echo "$as_me:15551: \"$ac_compile\"") >&5
15552 (eval $ac_compile) 2>&5
15554 echo "$as_me:15554: \$? = $ac_status" >&5
15555 (exit "$ac_status"); } &&
15556 { ac_try='test -s "conftest.$ac_objext"'
15557 { (eval echo "$as_me:15557: \"$ac_try\"") >&5
15558 (eval $ac_try) 2>&5
15560 echo "$as_me:15560: \$? = $ac_status" >&5
15561 (exit "$ac_status"); }; }; then
15564 echo "$as_me: failed program was:" >&5
15565 cat "conftest.$ac_ext" >&5
15568 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15569 echo "$as_me:15569: result: $cf_result" >&5
15570 echo "${ECHO_T}$cf_result" >&6
15572 LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
15573 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
15574 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
15576 if test "$cf_result" = yes ; then
15577 test "$cf_path" = default && cf_x_athena_inc=default
15578 test "$cf_path" != default && cf_x_athena_inc="$cf_path/include"
15584 if test -z "$cf_x_athena_inc" ; then
15585 { echo "$as_me:15585: WARNING: Unable to find Athena header files" >&5
15586 echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
15587 elif test "$cf_x_athena_inc" != default ; then
15589 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15590 CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
15594 cf_x_athena_root=$cf_x_athena
15597 for cf_path in default \
15598 /usr/contrib/X11R6 \
15599 /usr/contrib/X11R5 \
15604 ${cf_x_athena_root} \
15605 ${cf_x_athena_root}7 \
15606 ${cf_x_athena_root}6
15609 "-l$cf_lib -lXmu" \
15610 "-l$cf_lib -lXpm -lXmu" \
15611 "-l${cf_lib}_s -lXmu_s"
15613 test -n "$cf_x_athena_lib" && break
15615 cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
15616 cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
15617 cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
15618 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15619 for cf_X_CFLAGS in $X_CFLAGS
15621 case "x$cf_X_CFLAGS" in
15623 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15626 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15631 cf_test=XawSimpleMenuAddGlobalActions
15632 test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
15634 cf_add_libs="$LIBS"
15637 for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15638 # filter duplicates
15639 for cf_add_1lib in $cf_add_0lib; do
15640 for cf_add_2lib in $cf_add_libs; do
15641 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15646 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15648 LIBS="$cf_add_libs"
15650 echo "$as_me:15650: checking for $cf_test in $cf_libs" >&5
15651 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
15652 cat >"conftest.$ac_ext" <<_ACEOF
15653 #line 15653 "configure"
15654 #include "confdefs.h"
15656 #include <X11/Intrinsic.h>
15657 #include <X11/$cf_x_athena_root/SimpleMenu.h>
15663 $cf_test((XtAppContext) 0)
15668 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15669 if { (eval echo "$as_me:15669: \"$ac_link\"") >&5
15670 (eval $ac_link) 2>&5
15672 echo "$as_me:15672: \$? = $ac_status" >&5
15673 (exit "$ac_status"); } &&
15674 { ac_try='test -s "conftest$ac_exeext"'
15675 { (eval echo "$as_me:15675: \"$ac_try\"") >&5
15676 (eval $ac_try) 2>&5
15678 echo "$as_me:15678: \$? = $ac_status" >&5
15679 (exit "$ac_status"); }; }; then
15682 echo "$as_me: failed program was:" >&5
15683 cat "conftest.$ac_ext" >&5
15686 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15687 echo "$as_me:15687: result: $cf_result" >&5
15688 echo "${ECHO_T}$cf_result" >&6
15690 LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
15691 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
15692 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
15694 if test "$cf_result" = yes ; then
15695 cf_x_athena_lib="$cf_libs"
15699 test -n "$cf_x_athena_lib" && break
15703 if test -z "$cf_x_athena_lib" ; then
15704 { { echo "$as_me:15704: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
15705 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
15706 { (exit 1); exit 1; }; }
15709 cf_add_libs="$LIBS"
15712 for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15713 # filter duplicates
15714 for cf_add_1lib in $cf_add_0lib; do
15715 for cf_add_2lib in $cf_add_libs; do
15716 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15721 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15723 LIBS="$cf_add_libs"
15725 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15727 cat >>confdefs.h <<EOF
15728 #define $cf_x_athena_LIBS 1
15733 if test -n "$ac_tool_prefix"; then
15734 for ac_prog in xcurses-config
15736 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
15737 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
15738 echo "$as_me:15738: checking for $ac_word" >&5
15739 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15740 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
15741 echo $ECHO_N "(cached) $ECHO_C" >&6
15743 if test -n "$XCURSES_CONFIG"; then
15744 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
15746 ac_save_IFS=$IFS; IFS=$ac_path_separator
15748 for ac_dir in $ac_dummy; do
15750 test -z "$ac_dir" && ac_dir=.
15751 $as_executable_p "$ac_dir/$ac_word" || continue
15752 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
15753 echo "$as_me:15753: found $ac_dir/$ac_word" >&5
15759 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
15760 if test -n "$XCURSES_CONFIG"; then
15761 echo "$as_me:15761: result: $XCURSES_CONFIG" >&5
15762 echo "${ECHO_T}$XCURSES_CONFIG" >&6
15764 echo "$as_me:15764: result: no" >&5
15765 echo "${ECHO_T}no" >&6
15768 test -n "$XCURSES_CONFIG" && break
15771 if test -z "$XCURSES_CONFIG"; then
15772 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
15773 for ac_prog in xcurses-config
15775 # Extract the first word of "$ac_prog", so it can be a program name with args.
15776 set dummy $ac_prog; ac_word=$2
15777 echo "$as_me:15777: checking for $ac_word" >&5
15778 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15779 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
15780 echo $ECHO_N "(cached) $ECHO_C" >&6
15782 if test -n "$ac_ct_XCURSES_CONFIG"; then
15783 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
15785 ac_save_IFS=$IFS; IFS=$ac_path_separator
15787 for ac_dir in $ac_dummy; do
15789 test -z "$ac_dir" && ac_dir=.
15790 $as_executable_p "$ac_dir/$ac_word" || continue
15791 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
15792 echo "$as_me:15792: found $ac_dir/$ac_word" >&5
15798 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
15799 if test -n "$ac_ct_XCURSES_CONFIG"; then
15800 echo "$as_me:15800: result: $ac_ct_XCURSES_CONFIG" >&5
15801 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
15803 echo "$as_me:15803: result: no" >&5
15804 echo "${ECHO_T}no" >&6
15807 test -n "$ac_ct_XCURSES_CONFIG" && break
15809 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
15811 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
15814 if test "$XCURSES_CONFIG" != none ; then
15819 cf_new_extra_cppflags=
15821 for cf_add_cflags in `$XCURSES_CONFIG --cflags`
15823 case "$cf_fix_cppflags" in
15825 case "$cf_add_cflags" in
15826 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15827 case "$cf_add_cflags" in
15829 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15831 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15832 && test -z "${cf_tst_cflags}" \
15833 && cf_fix_cppflags=yes
15835 if test "$cf_fix_cppflags" = yes ; then
15837 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15838 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15841 elif test "${cf_tst_cflags}" = "\"'" ; then
15843 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15844 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15850 case "$CPPFLAGS" in
15854 case "$cf_add_cflags" in
15856 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15858 CPPFLAGS=`echo "$CPPFLAGS" | \
15859 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15860 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15865 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15866 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15873 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15874 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15881 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15882 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15884 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15886 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15887 && test -z "${cf_tst_cflags}" \
15888 && cf_fix_cppflags=no
15893 if test -n "$cf_new_cflags" ; then
15895 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15896 CFLAGS="${CFLAGS}$cf_new_cflags"
15900 if test -n "$cf_new_cppflags" ; then
15902 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15903 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15907 if test -n "$cf_new_extra_cppflags" ; then
15909 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15910 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15914 cf_add_libs="$LIBS"
15917 for cf_add_1lib in `$XCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15918 # filter duplicates
15919 for cf_add_1lib in $cf_add_0lib; do
15920 for cf_add_2lib in $cf_add_libs; do
15921 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15926 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15928 LIBS="$cf_add_libs"
15930 cf_cv_lib_XCurses=yes
15934 LDFLAGS="$LDFLAGS $X_LIBS"
15936 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
15938 echo "${as_me:-configure}:15938: testing checking additions to CFLAGS ..." 1>&5
15940 cf_check_cflags="$CFLAGS"
15941 cf_check_cppflags="$CPPFLAGS"
15946 cf_new_extra_cppflags=
15948 for cf_add_cflags in $X_CFLAGS
15950 case "$cf_fix_cppflags" in
15952 case "$cf_add_cflags" in
15953 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15954 case "$cf_add_cflags" in
15956 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15958 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15959 && test -z "${cf_tst_cflags}" \
15960 && cf_fix_cppflags=yes
15962 if test "$cf_fix_cppflags" = yes ; then
15964 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15965 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15968 elif test "${cf_tst_cflags}" = "\"'" ; then
15970 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15971 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15977 case "$CPPFLAGS" in
15981 case "$cf_add_cflags" in
15983 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15985 CPPFLAGS=`echo "$CPPFLAGS" | \
15986 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15987 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15992 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15993 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16000 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16001 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16008 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16009 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16011 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16013 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16014 && test -z "${cf_tst_cflags}" \
16015 && cf_fix_cppflags=no
16020 if test -n "$cf_new_cflags" ; then
16021 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
16023 echo "${as_me:-configure}:16023: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
16025 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16026 CFLAGS="${CFLAGS}$cf_new_cflags"
16030 if test -n "$cf_new_cppflags" ; then
16031 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
16033 echo "${as_me:-configure}:16033: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
16035 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16036 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16040 if test -n "$cf_new_extra_cppflags" ; then
16041 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
16043 echo "${as_me:-configure}:16043: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
16045 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16046 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16050 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
16051 cat >"conftest.$ac_ext" <<_ACEOF
16052 #line 16052 "configure"
16053 #include "confdefs.h"
16058 printf("Hello world");
16063 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16064 if { (eval echo "$as_me:16064: \"$ac_link\"") >&5
16065 (eval $ac_link) 2>&5
16067 echo "$as_me:16067: \$? = $ac_status" >&5
16068 (exit "$ac_status"); } &&
16069 { ac_try='test -s "conftest$ac_exeext"'
16070 { (eval echo "$as_me:16070: \"$ac_try\"") >&5
16071 (eval $ac_try) 2>&5
16073 echo "$as_me:16073: \$? = $ac_status" >&5
16074 (exit "$ac_status"); }; }; then
16077 echo "$as_me: failed program was:" >&5
16078 cat "conftest.$ac_ext" >&5
16079 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
16081 echo "${as_me:-configure}:16081: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
16083 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
16084 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
16086 echo "${as_me:-configure}:16086: testing but keeping change to \$CPPFLAGS ..." 1>&5
16089 CFLAGS="$cf_check_cflags"
16091 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16094 echo "$as_me:16094: checking for XOpenDisplay in -lX11" >&5
16095 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
16096 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
16097 echo $ECHO_N "(cached) $ECHO_C" >&6
16099 ac_check_lib_save_LIBS=$LIBS
16100 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
16101 cat >"conftest.$ac_ext" <<_ACEOF
16102 #line 16102 "configure"
16103 #include "confdefs.h"
16105 /* Override any gcc2 internal prototype to avoid an error. */
16109 /* We use char because int might match the return type of a gcc2
16110 builtin and then its argument prototype would still apply. */
16111 char XOpenDisplay ();
16120 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16121 if { (eval echo "$as_me:16121: \"$ac_link\"") >&5
16122 (eval $ac_link) 2>&5
16124 echo "$as_me:16124: \$? = $ac_status" >&5
16125 (exit "$ac_status"); } &&
16126 { ac_try='test -s "conftest$ac_exeext"'
16127 { (eval echo "$as_me:16127: \"$ac_try\"") >&5
16128 (eval $ac_try) 2>&5
16130 echo "$as_me:16130: \$? = $ac_status" >&5
16131 (exit "$ac_status"); }; }; then
16132 ac_cv_lib_X11_XOpenDisplay=yes
16134 echo "$as_me: failed program was:" >&5
16135 cat "conftest.$ac_ext" >&5
16136 ac_cv_lib_X11_XOpenDisplay=no
16138 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16139 LIBS=$ac_check_lib_save_LIBS
16141 echo "$as_me:16141: result: $ac_cv_lib_X11_XOpenDisplay" >&5
16142 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
16143 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
16145 cf_add_libs="$LIBS"
16148 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16149 # filter duplicates
16150 for cf_add_1lib in $cf_add_0lib; do
16151 for cf_add_2lib in $cf_add_libs; do
16152 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16157 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16159 LIBS="$cf_add_libs"
16163 echo "$as_me:16163: checking for XCurses library" >&5
16164 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
16165 if test "${cf_cv_lib_XCurses+set}" = set; then
16166 echo $ECHO_N "(cached) $ECHO_C" >&6
16169 cf_add_libs="$LIBS"
16172 for cf_add_1lib in -lXCurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16173 # filter duplicates
16174 for cf_add_1lib in $cf_add_0lib; do
16175 for cf_add_2lib in $cf_add_libs; do
16176 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16181 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16183 LIBS="$cf_add_libs"
16185 cat >"conftest.$ac_ext" <<_ACEOF
16186 #line 16186 "configure"
16187 #include "confdefs.h"
16189 #include <xcurses.h>
16190 char *XCursesProgramName = "test";
16200 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16201 if { (eval echo "$as_me:16201: \"$ac_link\"") >&5
16202 (eval $ac_link) 2>&5
16204 echo "$as_me:16204: \$? = $ac_status" >&5
16205 (exit "$ac_status"); } &&
16206 { ac_try='test -s "conftest$ac_exeext"'
16207 { (eval echo "$as_me:16207: \"$ac_try\"") >&5
16208 (eval $ac_try) 2>&5
16210 echo "$as_me:16210: \$? = $ac_status" >&5
16211 (exit "$ac_status"); }; }; then
16212 cf_cv_lib_XCurses=yes
16214 echo "$as_me: failed program was:" >&5
16215 cat "conftest.$ac_ext" >&5
16216 cf_cv_lib_XCurses=no
16218 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16221 echo "$as_me:16221: result: $cf_cv_lib_XCurses" >&5
16222 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
16226 if test "$cf_cv_lib_XCurses" = yes ; then
16228 cat >>confdefs.h <<\EOF
16232 cat >>confdefs.h <<\EOF
16236 echo "$as_me:16236: checking for xcurses.h" >&5
16237 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
16238 if test "${ac_cv_header_xcurses_h+set}" = set; then
16239 echo $ECHO_N "(cached) $ECHO_C" >&6
16241 cat >"conftest.$ac_ext" <<_ACEOF
16242 #line 16242 "configure"
16243 #include "confdefs.h"
16244 #include <xcurses.h>
16246 if { (eval echo "$as_me:16246: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16247 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16249 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16251 cat conftest.err >&5
16252 echo "$as_me:16252: \$? = $ac_status" >&5
16253 (exit "$ac_status"); } >/dev/null; then
16254 if test -s conftest.err; then
16255 ac_cpp_err=$ac_c_preproc_warn_flag
16262 if test -z "$ac_cpp_err"; then
16263 ac_cv_header_xcurses_h=yes
16265 echo "$as_me: failed program was:" >&5
16266 cat "conftest.$ac_ext" >&5
16267 ac_cv_header_xcurses_h=no
16269 rm -f conftest.err "conftest.$ac_ext"
16271 echo "$as_me:16271: result: $ac_cv_header_xcurses_h" >&5
16272 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
16273 if test "$ac_cv_header_xcurses_h" = yes; then
16275 cat >>confdefs.h <<\EOF
16276 #define HAVE_XCURSES 1
16282 { { echo "$as_me:16282: error: Cannot link with XCurses" >&5
16283 echo "$as_me: error: Cannot link with XCurses" >&2;}
16284 { (exit 1); exit 1; }; }
16289 { { echo "$as_me:16289: error: unexpected screen-value: $cf_cv_screen" >&5
16290 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
16291 { (exit 1); exit 1; }; }
16295 : ${cf_nculib_root:=$cf_cv_screen}
16296 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
16297 echo "$as_me:16297: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
16298 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
16299 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16300 echo $ECHO_N "(cached) $ECHO_C" >&6
16302 ac_check_lib_save_LIBS=$LIBS
16303 LIBS="-l$cf_nculib_root $LIBS"
16304 cat >"conftest.$ac_ext" <<_ACEOF
16305 #line 16305 "configure"
16306 #include "confdefs.h"
16308 /* Override any gcc2 internal prototype to avoid an error. */
16312 /* We use char because int might match the return type of a gcc2
16313 builtin and then its argument prototype would still apply. */
16314 char _nc_init_pthreads ();
16318 _nc_init_pthreads ();
16323 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16324 if { (eval echo "$as_me:16324: \"$ac_link\"") >&5
16325 (eval $ac_link) 2>&5
16327 echo "$as_me:16327: \$? = $ac_status" >&5
16328 (exit "$ac_status"); } &&
16329 { ac_try='test -s "conftest$ac_exeext"'
16330 { (eval echo "$as_me:16330: \"$ac_try\"") >&5
16331 (eval $ac_try) 2>&5
16333 echo "$as_me:16333: \$? = $ac_status" >&5
16334 (exit "$ac_status"); }; }; then
16335 eval "$as_ac_Lib=yes"
16337 echo "$as_me: failed program was:" >&5
16338 cat "conftest.$ac_ext" >&5
16339 eval "$as_ac_Lib=no"
16341 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16342 LIBS=$ac_check_lib_save_LIBS
16344 echo "$as_me:16344: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
16345 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
16346 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
16347 cf_cv_ncurses_pthreads=yes
16349 cf_cv_ncurses_pthreads=no
16352 if test "$cf_cv_ncurses_pthreads" = yes
16355 cf_add_libs="$LIBS"
16358 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16359 # filter duplicates
16360 for cf_add_1lib in $cf_add_0lib; do
16361 for cf_add_2lib in $cf_add_libs; do
16362 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16367 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16369 LIBS="$cf_add_libs"
16373 case $cf_cv_screen in
16375 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
16379 echo "$as_me:16379: checking for X11 rgb file" >&5
16380 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
16382 # Check whether --with-x11-rgb or --without-x11-rgb was given.
16383 if test "${with_x11_rgb+set}" = set; then
16384 withval="$with_x11_rgb"
16390 if test "x$RGB_PATH" = xauto
16392 RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
16394 /opt/local/share/X11/rgb.txt \
16395 /opt/X11/share/X11/rgb.txt \
16396 /usr/share/X11/rgb.txt \
16397 /usr/X11/share/X11/rgb.txt \
16398 /usr/X11/lib/X11/rgb.txt \
16399 /usr/lib/X11/rgb.txt \
16401 /usr/pkg/lib/X11/rgb.txt \
16402 /usr/X11R7/lib/X11/rgb.txt \
16403 /usr/X11R6/lib/X11/rgb.txt \
16404 /usr/X11R5/lib/X11/rgb.txt \
16405 /usr/X11R4/lib/X11/rgb.txt \
16406 /usr/local/lib/X11/rgb.txt \
16407 /usr/local/share/X11/rgb.txt \
16408 /usr/lib64/X11/rgb.txt
16410 if test -f "$cf_path" ; then
16411 RGB_PATH="$cf_path"
16418 if test "x$prefix" != xNONE; then
16419 cf_path_syntax="$prefix"
16421 cf_path_syntax="$ac_default_prefix"
16424 case ".$cf_path" in
16425 (.\$\(*\)*|.\'*\'*)
16429 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
16431 (.\$\{*prefix\}*|.\$\{*dir\}*)
16432 eval cf_path="$cf_path"
16433 case ".$cf_path" in
16435 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
16440 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
16443 { { echo "$as_me:16443: error: expected a pathname, not \"$cf_path\"" >&5
16444 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
16445 { (exit 1); exit 1; }; }
16451 echo "$as_me:16451: result: $RGB_PATH" >&5
16452 echo "${ECHO_T}$RGB_PATH" >&6
16454 cat >>confdefs.h <<EOF
16455 #define RGB_PATH "$cf_path"
16459 if test "$RGB_PATH" = no
16466 case $cf_cv_screen in
16468 cf_default_panel=no
16471 cf_default_tinfo=no
16473 (xcurses|bsdcurses)
16474 cf_default_panel=no
16477 cf_default_tinfo=yes
16480 cf_default_panel=yes
16481 cf_default_form=yes
16482 cf_default_menu=yes
16483 cf_default_tinfo=yes
16484 case $cf_cv_screen in
16486 cf_curses_headers="nc_alloc.h nomacros.h term_entry.h"
16492 echo "$as_me:16492: checking for desired basename for form library" >&5
16493 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
16495 # Check whether --with-form-libname or --without-form-libname was given.
16496 if test "${with_form_libname+set}" = set; then
16497 withval="$with_form_libname"
16498 with_lib_basename=$withval
16500 with_lib_basename=form
16502 FORM_NAME="$with_lib_basename"
16504 case "x$FORM_NAME" in
16512 echo "$as_me:16512: result: $FORM_NAME" >&5
16513 echo "${ECHO_T}$FORM_NAME" >&6
16515 echo "$as_me:16515: checking for desired basename for menu library" >&5
16516 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
16518 # Check whether --with-menu-libname or --without-menu-libname was given.
16519 if test "${with_menu_libname+set}" = set; then
16520 withval="$with_menu_libname"
16521 with_lib_basename=$withval
16523 with_lib_basename=menu
16525 MENU_NAME="$with_lib_basename"
16527 case "x$MENU_NAME" in
16535 echo "$as_me:16535: result: $MENU_NAME" >&5
16536 echo "${ECHO_T}$MENU_NAME" >&6
16538 echo "$as_me:16538: checking for desired basename for panel library" >&5
16539 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
16541 # Check whether --with-panel-libname or --without-panel-libname was given.
16542 if test "${with_panel_libname+set}" = set; then
16543 withval="$with_panel_libname"
16544 with_lib_basename=$withval
16546 with_lib_basename=panel
16548 PANEL_NAME="$with_lib_basename"
16550 case "x$PANEL_NAME" in
16558 echo "$as_me:16558: result: $PANEL_NAME" >&5
16559 echo "${ECHO_T}$PANEL_NAME" >&6
16561 echo "$as_me:16561: checking if you want to check for panel functions" >&5
16562 echo $ECHO_N "checking if you want to check for panel functions... $ECHO_C" >&6
16564 # Check whether --enable-panel or --disable-panel was given.
16565 if test "${enable_panel+set}" = set; then
16566 enableval="$enable_panel"
16567 test "$enableval" != no && enableval=yes
16568 if test "$enableval" != "yes" ; then
16571 cf_enable_panel=$cf_default_panel
16575 cf_enable_panel=$cf_default_panel
16578 echo "$as_me:16578: result: $cf_enable_panel" >&5
16579 echo "${ECHO_T}$cf_enable_panel" >&6
16580 if test $cf_enable_panel = yes
16583 cf_have_curses_lib=no
16585 : ${NCURSES_CONFIG_PKG:=none}
16586 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16588 elif test "x${PKG_CONFIG:=none}" != xnone; then
16589 echo "$as_me:16589: checking pkg-config for $PANEL_NAME$cf_cv_libtype" >&5
16590 echo $ECHO_N "checking pkg-config for $PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
16591 if "$PKG_CONFIG" --exists "$PANEL_NAME$cf_cv_libtype" ; then
16592 echo "$as_me:16592: result: yes" >&5
16593 echo "${ECHO_T}yes" >&6
16595 echo "$as_me:16595: checking if the $PANEL_NAME$cf_cv_libtype package files work" >&5
16596 echo $ECHO_N "checking if the $PANEL_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
16598 cf_save_CPPFLAGS="$CPPFLAGS"
16599 cf_save_LIBS="$LIBS"
16604 cf_new_extra_cppflags=
16606 for cf_add_cflags in `$PKG_CONFIG --cflags "$PANEL_NAME$cf_cv_libtype"`
16608 case "$cf_fix_cppflags" in
16610 case "$cf_add_cflags" in
16611 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16612 case "$cf_add_cflags" in
16614 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16616 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16617 && test -z "${cf_tst_cflags}" \
16618 && cf_fix_cppflags=yes
16620 if test "$cf_fix_cppflags" = yes ; then
16622 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16623 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16626 elif test "${cf_tst_cflags}" = "\"'" ; then
16628 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16629 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16635 case "$CPPFLAGS" in
16639 case "$cf_add_cflags" in
16641 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16643 CPPFLAGS=`echo "$CPPFLAGS" | \
16644 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16645 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16650 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16651 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16658 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16659 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16666 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16667 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16669 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16671 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16672 && test -z "${cf_tst_cflags}" \
16673 && cf_fix_cppflags=no
16678 if test -n "$cf_new_cflags" ; then
16680 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16681 CFLAGS="${CFLAGS}$cf_new_cflags"
16685 if test -n "$cf_new_cppflags" ; then
16687 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16688 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16692 if test -n "$cf_new_extra_cppflags" ; then
16694 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16695 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16699 cf_add_libs="$LIBS"
16702 for cf_add_1lib in `$PKG_CONFIG --libs "$PANEL_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16703 # filter duplicates
16704 for cf_add_1lib in $cf_add_0lib; do
16705 for cf_add_2lib in $cf_add_libs; do
16706 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16711 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16713 LIBS="$cf_add_libs"
16715 cat >"conftest.$ac_ext" <<_ACEOF
16716 #line 16716 "configure"
16717 #include "confdefs.h"
16718 #include <$PANEL_NAME.h>
16722 (void) new_panel ( 0 );
16727 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16728 if { (eval echo "$as_me:16728: \"$ac_link\"") >&5
16729 (eval $ac_link) 2>&5
16731 echo "$as_me:16731: \$? = $ac_status" >&5
16732 (exit "$ac_status"); } &&
16733 { ac_try='test -s "conftest$ac_exeext"'
16734 { (eval echo "$as_me:16734: \"$ac_try\"") >&5
16735 (eval $ac_try) 2>&5
16737 echo "$as_me:16737: \$? = $ac_status" >&5
16738 (exit "$ac_status"); }; }; then
16739 if test "$cross_compiling" = yes; then
16740 cf_have_curses_lib=maybe
16742 cat >"conftest.$ac_ext" <<_ACEOF
16743 #line 16743 "configure"
16744 #include "confdefs.h"
16745 #include <$PANEL_NAME.h>
16747 { (void) new_panel ( 0 ); return 0; }
16749 rm -f "conftest$ac_exeext"
16750 if { (eval echo "$as_me:16750: \"$ac_link\"") >&5
16751 (eval $ac_link) 2>&5
16753 echo "$as_me:16753: \$? = $ac_status" >&5
16754 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16755 { (eval echo "$as_me:16755: \"$ac_try\"") >&5
16756 (eval $ac_try) 2>&5
16758 echo "$as_me:16758: \$? = $ac_status" >&5
16759 (exit "$ac_status"); }; }; then
16760 cf_have_curses_lib=yes
16762 echo "$as_me: program exited with status $ac_status" >&5
16763 echo "$as_me: failed program was:" >&5
16764 cat "conftest.$ac_ext" >&5
16765 cf_have_curses_lib=no
16767 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16770 echo "$as_me: failed program was:" >&5
16771 cat "conftest.$ac_ext" >&5
16772 cf_have_curses_lib=no
16774 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16775 echo "$as_me:16775: result: $cf_have_curses_lib" >&5
16776 echo "${ECHO_T}$cf_have_curses_lib" >&6
16777 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
16778 if test "$cf_have_curses_lib" != "yes"
16780 CPPFLAGS="$cf_save_CPPFLAGS"
16781 LIBS="$cf_save_LIBS"
16784 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16786 cat >>confdefs.h <<EOF
16787 #define $cf_upper 1
16793 if test "$cf_have_curses_lib" = no; then
16794 as_ac_Lib=`echo "ac_cv_lib_$PANEL_NAME$cf_cv_libtype''_new_panel" | $as_tr_sh`
16795 echo "$as_me:16795: checking for new_panel in -l$PANEL_NAME$cf_cv_libtype" >&5
16796 echo $ECHO_N "checking for new_panel in -l$PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
16797 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16798 echo $ECHO_N "(cached) $ECHO_C" >&6
16800 ac_check_lib_save_LIBS=$LIBS
16801 LIBS="-l$PANEL_NAME$cf_cv_libtype $LIBS"
16802 cat >"conftest.$ac_ext" <<_ACEOF
16803 #line 16803 "configure"
16804 #include "confdefs.h"
16806 /* Override any gcc2 internal prototype to avoid an error. */
16810 /* We use char because int might match the return type of a gcc2
16811 builtin and then its argument prototype would still apply. */
16821 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16822 if { (eval echo "$as_me:16822: \"$ac_link\"") >&5
16823 (eval $ac_link) 2>&5
16825 echo "$as_me:16825: \$? = $ac_status" >&5
16826 (exit "$ac_status"); } &&
16827 { ac_try='test -s "conftest$ac_exeext"'
16828 { (eval echo "$as_me:16828: \"$ac_try\"") >&5
16829 (eval $ac_try) 2>&5
16831 echo "$as_me:16831: \$? = $ac_status" >&5
16832 (exit "$ac_status"); }; }; then
16833 eval "$as_ac_Lib=yes"
16835 echo "$as_me: failed program was:" >&5
16836 cat "conftest.$ac_ext" >&5
16837 eval "$as_ac_Lib=no"
16839 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16840 LIBS=$ac_check_lib_save_LIBS
16842 echo "$as_me:16842: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
16843 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
16844 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
16846 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16848 cf_add_libs="$LIBS"
16851 for cf_add_1lib in -l$PANEL_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16852 # filter duplicates
16853 for cf_add_1lib in $cf_add_0lib; do
16854 for cf_add_2lib in $cf_add_libs; do
16855 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16860 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16862 LIBS="$cf_add_libs"
16864 cat >>confdefs.h <<EOF
16865 #define $cf_upper 1
16872 cf_curses_headers="$cf_curses_headers panel.h"
16875 echo "$as_me:16875: checking if you want to check for menu functions" >&5
16876 echo $ECHO_N "checking if you want to check for menu functions... $ECHO_C" >&6
16878 # Check whether --enable-menu or --disable-menu was given.
16879 if test "${enable_menu+set}" = set; then
16880 enableval="$enable_menu"
16881 test "$enableval" != no && enableval=yes
16882 if test "$enableval" != "yes" ; then
16885 cf_enable_menu=$cf_default_menu
16889 cf_enable_menu=$cf_default_menu
16892 echo "$as_me:16892: result: $cf_enable_menu" >&5
16893 echo "${ECHO_T}$cf_enable_menu" >&6
16894 if test $cf_enable_menu = yes
16896 case $cf_cv_screen in
16901 echo "$as_me:16901: checking for NetBSD menu.h" >&5
16902 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
16903 if test "${cf_cv_netbsd_menu_h+set}" = set; then
16904 echo $ECHO_N "(cached) $ECHO_C" >&6
16907 cat >"conftest.$ac_ext" <<_ACEOF
16908 #line 16908 "configure"
16909 #include "confdefs.h"
16911 #include <${cf_cv_ncurses_header:-curses.h}>
16919 int y = menu->max_item_width;
16925 rm -f "conftest.$ac_objext"
16926 if { (eval echo "$as_me:16926: \"$ac_compile\"") >&5
16927 (eval $ac_compile) 2>&5
16929 echo "$as_me:16929: \$? = $ac_status" >&5
16930 (exit "$ac_status"); } &&
16931 { ac_try='test -s "conftest.$ac_objext"'
16932 { (eval echo "$as_me:16932: \"$ac_try\"") >&5
16933 (eval $ac_try) 2>&5
16935 echo "$as_me:16935: \$? = $ac_status" >&5
16936 (exit "$ac_status"); }; }; then
16937 cf_cv_netbsd_menu_h=yes
16940 echo "$as_me: failed program was:" >&5
16941 cat "conftest.$ac_ext" >&5
16942 cf_cv_netbsd_menu_h=no
16944 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16947 echo "$as_me:16947: result: $cf_cv_netbsd_menu_h" >&5
16948 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
16950 test "$cf_cv_netbsd_menu_h" = yes &&
16951 cat >>confdefs.h <<\EOF
16952 #define HAVE_NETBSD_MENU_H 1
16958 cf_have_curses_lib=no
16960 : ${NCURSES_CONFIG_PKG:=none}
16961 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16963 elif test "x${PKG_CONFIG:=none}" != xnone; then
16964 echo "$as_me:16964: checking pkg-config for $MENU_NAME$cf_cv_libtype" >&5
16965 echo $ECHO_N "checking pkg-config for $MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
16966 if "$PKG_CONFIG" --exists "$MENU_NAME$cf_cv_libtype" ; then
16967 echo "$as_me:16967: result: yes" >&5
16968 echo "${ECHO_T}yes" >&6
16970 echo "$as_me:16970: checking if the $MENU_NAME$cf_cv_libtype package files work" >&5
16971 echo $ECHO_N "checking if the $MENU_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
16973 cf_save_CPPFLAGS="$CPPFLAGS"
16974 cf_save_LIBS="$LIBS"
16979 cf_new_extra_cppflags=
16981 for cf_add_cflags in `$PKG_CONFIG --cflags "$MENU_NAME$cf_cv_libtype"`
16983 case "$cf_fix_cppflags" in
16985 case "$cf_add_cflags" in
16986 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16987 case "$cf_add_cflags" in
16989 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16991 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16992 && test -z "${cf_tst_cflags}" \
16993 && cf_fix_cppflags=yes
16995 if test "$cf_fix_cppflags" = yes ; then
16997 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16998 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17001 elif test "${cf_tst_cflags}" = "\"'" ; then
17003 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17004 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17010 case "$CPPFLAGS" in
17014 case "$cf_add_cflags" in
17016 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17018 CPPFLAGS=`echo "$CPPFLAGS" | \
17019 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17020 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17025 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17026 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17033 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17034 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17041 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17042 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17044 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17046 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17047 && test -z "${cf_tst_cflags}" \
17048 && cf_fix_cppflags=no
17053 if test -n "$cf_new_cflags" ; then
17055 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17056 CFLAGS="${CFLAGS}$cf_new_cflags"
17060 if test -n "$cf_new_cppflags" ; then
17062 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17063 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17067 if test -n "$cf_new_extra_cppflags" ; then
17069 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17070 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17074 cf_add_libs="$LIBS"
17077 for cf_add_1lib in `$PKG_CONFIG --libs "$MENU_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17078 # filter duplicates
17079 for cf_add_1lib in $cf_add_0lib; do
17080 for cf_add_2lib in $cf_add_libs; do
17081 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17086 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17088 LIBS="$cf_add_libs"
17090 cat >"conftest.$ac_ext" <<_ACEOF
17091 #line 17091 "configure"
17092 #include "confdefs.h"
17093 #include <$MENU_NAME.h>
17097 (void) menu_driver ( 0,0 );
17102 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17103 if { (eval echo "$as_me:17103: \"$ac_link\"") >&5
17104 (eval $ac_link) 2>&5
17106 echo "$as_me:17106: \$? = $ac_status" >&5
17107 (exit "$ac_status"); } &&
17108 { ac_try='test -s "conftest$ac_exeext"'
17109 { (eval echo "$as_me:17109: \"$ac_try\"") >&5
17110 (eval $ac_try) 2>&5
17112 echo "$as_me:17112: \$? = $ac_status" >&5
17113 (exit "$ac_status"); }; }; then
17114 if test "$cross_compiling" = yes; then
17115 cf_have_curses_lib=maybe
17117 cat >"conftest.$ac_ext" <<_ACEOF
17118 #line 17118 "configure"
17119 #include "confdefs.h"
17120 #include <$MENU_NAME.h>
17122 { (void) menu_driver ( 0,0 ); return 0; }
17124 rm -f "conftest$ac_exeext"
17125 if { (eval echo "$as_me:17125: \"$ac_link\"") >&5
17126 (eval $ac_link) 2>&5
17128 echo "$as_me:17128: \$? = $ac_status" >&5
17129 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17130 { (eval echo "$as_me:17130: \"$ac_try\"") >&5
17131 (eval $ac_try) 2>&5
17133 echo "$as_me:17133: \$? = $ac_status" >&5
17134 (exit "$ac_status"); }; }; then
17135 cf_have_curses_lib=yes
17137 echo "$as_me: program exited with status $ac_status" >&5
17138 echo "$as_me: failed program was:" >&5
17139 cat "conftest.$ac_ext" >&5
17140 cf_have_curses_lib=no
17142 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17145 echo "$as_me: failed program was:" >&5
17146 cat "conftest.$ac_ext" >&5
17147 cf_have_curses_lib=no
17149 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17150 echo "$as_me:17150: result: $cf_have_curses_lib" >&5
17151 echo "${ECHO_T}$cf_have_curses_lib" >&6
17152 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17153 if test "$cf_have_curses_lib" != "yes"
17155 CPPFLAGS="$cf_save_CPPFLAGS"
17156 LIBS="$cf_save_LIBS"
17159 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17161 cat >>confdefs.h <<EOF
17162 #define $cf_upper 1
17168 if test "$cf_have_curses_lib" = no; then
17169 as_ac_Lib=`echo "ac_cv_lib_$MENU_NAME$cf_cv_libtype''_menu_driver" | $as_tr_sh`
17170 echo "$as_me:17170: checking for menu_driver in -l$MENU_NAME$cf_cv_libtype" >&5
17171 echo $ECHO_N "checking for menu_driver in -l$MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
17172 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17173 echo $ECHO_N "(cached) $ECHO_C" >&6
17175 ac_check_lib_save_LIBS=$LIBS
17176 LIBS="-l$MENU_NAME$cf_cv_libtype $LIBS"
17177 cat >"conftest.$ac_ext" <<_ACEOF
17178 #line 17178 "configure"
17179 #include "confdefs.h"
17181 /* Override any gcc2 internal prototype to avoid an error. */
17185 /* We use char because int might match the return type of a gcc2
17186 builtin and then its argument prototype would still apply. */
17187 char menu_driver ();
17196 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17197 if { (eval echo "$as_me:17197: \"$ac_link\"") >&5
17198 (eval $ac_link) 2>&5
17200 echo "$as_me:17200: \$? = $ac_status" >&5
17201 (exit "$ac_status"); } &&
17202 { ac_try='test -s "conftest$ac_exeext"'
17203 { (eval echo "$as_me:17203: \"$ac_try\"") >&5
17204 (eval $ac_try) 2>&5
17206 echo "$as_me:17206: \$? = $ac_status" >&5
17207 (exit "$ac_status"); }; }; then
17208 eval "$as_ac_Lib=yes"
17210 echo "$as_me: failed program was:" >&5
17211 cat "conftest.$ac_ext" >&5
17212 eval "$as_ac_Lib=no"
17214 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17215 LIBS=$ac_check_lib_save_LIBS
17217 echo "$as_me:17217: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
17218 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
17219 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
17221 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17223 cf_add_libs="$LIBS"
17226 for cf_add_1lib in -l$MENU_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17227 # filter duplicates
17228 for cf_add_1lib in $cf_add_0lib; do
17229 for cf_add_2lib in $cf_add_libs; do
17230 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17235 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17237 LIBS="$cf_add_libs"
17239 cat >>confdefs.h <<EOF
17240 #define $cf_upper 1
17247 cf_curses_headers="$cf_curses_headers menu.h"
17250 echo "$as_me:17250: checking if you want to check for form functions" >&5
17251 echo $ECHO_N "checking if you want to check for form functions... $ECHO_C" >&6
17253 # Check whether --enable-form or --disable-form was given.
17254 if test "${enable_form+set}" = set; then
17255 enableval="$enable_form"
17256 test "$enableval" != no && enableval=yes
17257 if test "$enableval" != "yes" ; then
17260 cf_enable_form=$cf_default_form
17264 cf_enable_form=$cf_default_form
17267 echo "$as_me:17267: result: $cf_enable_form" >&5
17268 echo "${ECHO_T}$cf_enable_form" >&6
17269 if test $cf_enable_form = yes
17271 case $cf_cv_screen in
17276 echo "$as_me:17276: checking for NetBSD form.h" >&5
17277 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
17278 if test "${cf_cv_netbsd_form_h+set}" = set; then
17279 echo $ECHO_N "(cached) $ECHO_C" >&6
17282 cat >"conftest.$ac_ext" <<_ACEOF
17283 #line 17283 "configure"
17284 #include "confdefs.h"
17286 #include <${cf_cv_ncurses_header:-curses.h}>
17294 int y = current_field(form)->cursor_ypos;
17295 int x = current_field(form)->cursor_xpos;
17301 rm -f "conftest.$ac_objext"
17302 if { (eval echo "$as_me:17302: \"$ac_compile\"") >&5
17303 (eval $ac_compile) 2>&5
17305 echo "$as_me:17305: \$? = $ac_status" >&5
17306 (exit "$ac_status"); } &&
17307 { ac_try='test -s "conftest.$ac_objext"'
17308 { (eval echo "$as_me:17308: \"$ac_try\"") >&5
17309 (eval $ac_try) 2>&5
17311 echo "$as_me:17311: \$? = $ac_status" >&5
17312 (exit "$ac_status"); }; }; then
17313 cf_cv_netbsd_form_h=yes
17316 echo "$as_me: failed program was:" >&5
17317 cat "conftest.$ac_ext" >&5
17318 cf_cv_netbsd_form_h=no
17320 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17323 echo "$as_me:17323: result: $cf_cv_netbsd_form_h" >&5
17324 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
17326 test "$cf_cv_netbsd_form_h" = yes &&
17327 cat >>confdefs.h <<\EOF
17328 #define HAVE_NETBSD_FORM_H 1
17334 cf_have_curses_lib=no
17336 : ${NCURSES_CONFIG_PKG:=none}
17337 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
17339 elif test "x${PKG_CONFIG:=none}" != xnone; then
17340 echo "$as_me:17340: checking pkg-config for $FORM_NAME$cf_cv_libtype" >&5
17341 echo $ECHO_N "checking pkg-config for $FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
17342 if "$PKG_CONFIG" --exists "$FORM_NAME$cf_cv_libtype" ; then
17343 echo "$as_me:17343: result: yes" >&5
17344 echo "${ECHO_T}yes" >&6
17346 echo "$as_me:17346: checking if the $FORM_NAME$cf_cv_libtype package files work" >&5
17347 echo $ECHO_N "checking if the $FORM_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
17349 cf_save_CPPFLAGS="$CPPFLAGS"
17350 cf_save_LIBS="$LIBS"
17355 cf_new_extra_cppflags=
17357 for cf_add_cflags in `$PKG_CONFIG --cflags "$FORM_NAME$cf_cv_libtype"`
17359 case "$cf_fix_cppflags" in
17361 case "$cf_add_cflags" in
17362 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17363 case "$cf_add_cflags" in
17365 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17367 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17368 && test -z "${cf_tst_cflags}" \
17369 && cf_fix_cppflags=yes
17371 if test "$cf_fix_cppflags" = yes ; then
17373 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17374 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17377 elif test "${cf_tst_cflags}" = "\"'" ; then
17379 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17380 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17386 case "$CPPFLAGS" in
17390 case "$cf_add_cflags" in
17392 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17394 CPPFLAGS=`echo "$CPPFLAGS" | \
17395 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17396 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17401 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17402 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17409 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17410 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17417 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17418 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17420 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17422 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17423 && test -z "${cf_tst_cflags}" \
17424 && cf_fix_cppflags=no
17429 if test -n "$cf_new_cflags" ; then
17431 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17432 CFLAGS="${CFLAGS}$cf_new_cflags"
17436 if test -n "$cf_new_cppflags" ; then
17438 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17439 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17443 if test -n "$cf_new_extra_cppflags" ; then
17445 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17446 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17450 cf_add_libs="$LIBS"
17453 for cf_add_1lib in `$PKG_CONFIG --libs "$FORM_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17454 # filter duplicates
17455 for cf_add_1lib in $cf_add_0lib; do
17456 for cf_add_2lib in $cf_add_libs; do
17457 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17462 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17464 LIBS="$cf_add_libs"
17466 cat >"conftest.$ac_ext" <<_ACEOF
17467 #line 17467 "configure"
17468 #include "confdefs.h"
17469 #include <$FORM_NAME.h>
17473 (void) form_driver ( 0,0 );
17478 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17479 if { (eval echo "$as_me:17479: \"$ac_link\"") >&5
17480 (eval $ac_link) 2>&5
17482 echo "$as_me:17482: \$? = $ac_status" >&5
17483 (exit "$ac_status"); } &&
17484 { ac_try='test -s "conftest$ac_exeext"'
17485 { (eval echo "$as_me:17485: \"$ac_try\"") >&5
17486 (eval $ac_try) 2>&5
17488 echo "$as_me:17488: \$? = $ac_status" >&5
17489 (exit "$ac_status"); }; }; then
17490 if test "$cross_compiling" = yes; then
17491 cf_have_curses_lib=maybe
17493 cat >"conftest.$ac_ext" <<_ACEOF
17494 #line 17494 "configure"
17495 #include "confdefs.h"
17496 #include <$FORM_NAME.h>
17498 { (void) form_driver ( 0,0 ); return 0; }
17500 rm -f "conftest$ac_exeext"
17501 if { (eval echo "$as_me:17501: \"$ac_link\"") >&5
17502 (eval $ac_link) 2>&5
17504 echo "$as_me:17504: \$? = $ac_status" >&5
17505 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17506 { (eval echo "$as_me:17506: \"$ac_try\"") >&5
17507 (eval $ac_try) 2>&5
17509 echo "$as_me:17509: \$? = $ac_status" >&5
17510 (exit "$ac_status"); }; }; then
17511 cf_have_curses_lib=yes
17513 echo "$as_me: program exited with status $ac_status" >&5
17514 echo "$as_me: failed program was:" >&5
17515 cat "conftest.$ac_ext" >&5
17516 cf_have_curses_lib=no
17518 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17521 echo "$as_me: failed program was:" >&5
17522 cat "conftest.$ac_ext" >&5
17523 cf_have_curses_lib=no
17525 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17526 echo "$as_me:17526: result: $cf_have_curses_lib" >&5
17527 echo "${ECHO_T}$cf_have_curses_lib" >&6
17528 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17529 if test "$cf_have_curses_lib" != "yes"
17531 CPPFLAGS="$cf_save_CPPFLAGS"
17532 LIBS="$cf_save_LIBS"
17535 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17537 cat >>confdefs.h <<EOF
17538 #define $cf_upper 1
17544 if test "$cf_have_curses_lib" = no; then
17545 as_ac_Lib=`echo "ac_cv_lib_$FORM_NAME$cf_cv_libtype''_form_driver" | $as_tr_sh`
17546 echo "$as_me:17546: checking for form_driver in -l$FORM_NAME$cf_cv_libtype" >&5
17547 echo $ECHO_N "checking for form_driver in -l$FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
17548 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17549 echo $ECHO_N "(cached) $ECHO_C" >&6
17551 ac_check_lib_save_LIBS=$LIBS
17552 LIBS="-l$FORM_NAME$cf_cv_libtype $LIBS"
17553 cat >"conftest.$ac_ext" <<_ACEOF
17554 #line 17554 "configure"
17555 #include "confdefs.h"
17557 /* Override any gcc2 internal prototype to avoid an error. */
17561 /* We use char because int might match the return type of a gcc2
17562 builtin and then its argument prototype would still apply. */
17563 char form_driver ();
17572 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17573 if { (eval echo "$as_me:17573: \"$ac_link\"") >&5
17574 (eval $ac_link) 2>&5
17576 echo "$as_me:17576: \$? = $ac_status" >&5
17577 (exit "$ac_status"); } &&
17578 { ac_try='test -s "conftest$ac_exeext"'
17579 { (eval echo "$as_me:17579: \"$ac_try\"") >&5
17580 (eval $ac_try) 2>&5
17582 echo "$as_me:17582: \$? = $ac_status" >&5
17583 (exit "$ac_status"); }; }; then
17584 eval "$as_ac_Lib=yes"
17586 echo "$as_me: failed program was:" >&5
17587 cat "conftest.$ac_ext" >&5
17588 eval "$as_ac_Lib=no"
17590 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17591 LIBS=$ac_check_lib_save_LIBS
17593 echo "$as_me:17593: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
17594 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
17595 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
17597 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17599 cf_add_libs="$LIBS"
17602 for cf_add_1lib in -l$FORM_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17603 # filter duplicates
17604 for cf_add_1lib in $cf_add_0lib; do
17605 for cf_add_2lib in $cf_add_libs; do
17606 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17611 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17613 LIBS="$cf_add_libs"
17615 cat >>confdefs.h <<EOF
17616 #define $cf_upper 1
17623 cf_curses_headers="$cf_curses_headers form.h"
17626 # look for curses-related headers
17628 for ac_header in $cf_curses_headers
17630 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17631 echo "$as_me:17631: checking for $ac_header" >&5
17632 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17633 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17634 echo $ECHO_N "(cached) $ECHO_C" >&6
17636 cat >"conftest.$ac_ext" <<_ACEOF
17637 #line 17637 "configure"
17638 #include "confdefs.h"
17639 #include <$ac_header>
17641 if { (eval echo "$as_me:17641: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17642 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17644 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17646 cat conftest.err >&5
17647 echo "$as_me:17647: \$? = $ac_status" >&5
17648 (exit "$ac_status"); } >/dev/null; then
17649 if test -s conftest.err; then
17650 ac_cpp_err=$ac_c_preproc_warn_flag
17657 if test -z "$ac_cpp_err"; then
17658 eval "$as_ac_Header=yes"
17660 echo "$as_me: failed program was:" >&5
17661 cat "conftest.$ac_ext" >&5
17662 eval "$as_ac_Header=no"
17664 rm -f conftest.err "conftest.$ac_ext"
17666 echo "$as_me:17666: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17667 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17668 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17669 cat >>confdefs.h <<EOF
17670 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17676 echo "$as_me:17676: checking for ANSI C header files" >&5
17677 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
17678 if test "${ac_cv_header_stdc+set}" = set; then
17679 echo $ECHO_N "(cached) $ECHO_C" >&6
17681 cat >"conftest.$ac_ext" <<_ACEOF
17682 #line 17682 "configure"
17683 #include "confdefs.h"
17684 #include <stdlib.h>
17685 #include <stdarg.h>
17686 #include <string.h>
17690 if { (eval echo "$as_me:17690: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17691 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17693 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17695 cat conftest.err >&5
17696 echo "$as_me:17696: \$? = $ac_status" >&5
17697 (exit "$ac_status"); } >/dev/null; then
17698 if test -s conftest.err; then
17699 ac_cpp_err=$ac_c_preproc_warn_flag
17706 if test -z "$ac_cpp_err"; then
17707 ac_cv_header_stdc=yes
17709 echo "$as_me: failed program was:" >&5
17710 cat "conftest.$ac_ext" >&5
17711 ac_cv_header_stdc=no
17713 rm -f conftest.err "conftest.$ac_ext"
17715 if test $ac_cv_header_stdc = yes; then
17716 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
17717 cat >"conftest.$ac_ext" <<_ACEOF
17718 #line 17718 "configure"
17719 #include "confdefs.h"
17720 #include <string.h>
17723 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17724 $EGREP "memchr" >/dev/null 2>&1; then
17727 ac_cv_header_stdc=no
17733 if test $ac_cv_header_stdc = yes; then
17734 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
17735 cat >"conftest.$ac_ext" <<_ACEOF
17736 #line 17736 "configure"
17737 #include "confdefs.h"
17738 #include <stdlib.h>
17741 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17742 $EGREP "free" >/dev/null 2>&1; then
17745 ac_cv_header_stdc=no
17751 if test $ac_cv_header_stdc = yes; then
17752 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
17753 if test "$cross_compiling" = yes; then
17756 cat >"conftest.$ac_ext" <<_ACEOF
17757 #line 17757 "configure"
17758 #include "confdefs.h"
17760 #if ((' ' & 0x0FF) == 0x020)
17761 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
17762 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
17764 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
17765 || ('j' <= (c) && (c) <= 'r') \
17766 || ('s' <= (c) && (c) <= 'z'))
17767 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
17770 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
17775 for (i = 0; i < 256; i++)
17776 if (XOR (islower (i), ISLOWER (i))
17777 || toupper (i) != TOUPPER (i))
17778 $ac_main_return(2);
17779 $ac_main_return (0);
17782 rm -f "conftest$ac_exeext"
17783 if { (eval echo "$as_me:17783: \"$ac_link\"") >&5
17784 (eval $ac_link) 2>&5
17786 echo "$as_me:17786: \$? = $ac_status" >&5
17787 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17788 { (eval echo "$as_me:17788: \"$ac_try\"") >&5
17789 (eval $ac_try) 2>&5
17791 echo "$as_me:17791: \$? = $ac_status" >&5
17792 (exit "$ac_status"); }; }; then
17795 echo "$as_me: program exited with status $ac_status" >&5
17796 echo "$as_me: failed program was:" >&5
17797 cat "conftest.$ac_ext" >&5
17798 ac_cv_header_stdc=no
17800 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17804 echo "$as_me:17804: result: $ac_cv_header_stdc" >&5
17805 echo "${ECHO_T}$ac_cv_header_stdc" >&6
17806 if test $ac_cv_header_stdc = yes; then
17808 cat >>confdefs.h <<\EOF
17809 #define STDC_HEADERS 1
17814 echo "$as_me:17814: checking whether time.h and sys/time.h may both be included" >&5
17815 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17816 if test "${ac_cv_header_time+set}" = set; then
17817 echo $ECHO_N "(cached) $ECHO_C" >&6
17819 cat >"conftest.$ac_ext" <<_ACEOF
17820 #line 17820 "configure"
17821 #include "confdefs.h"
17822 #include <sys/types.h>
17823 #include <sys/time.h>
17829 if ((struct tm *) 0)
17835 rm -f "conftest.$ac_objext"
17836 if { (eval echo "$as_me:17836: \"$ac_compile\"") >&5
17837 (eval $ac_compile) 2>&5
17839 echo "$as_me:17839: \$? = $ac_status" >&5
17840 (exit "$ac_status"); } &&
17841 { ac_try='test -s "conftest.$ac_objext"'
17842 { (eval echo "$as_me:17842: \"$ac_try\"") >&5
17843 (eval $ac_try) 2>&5
17845 echo "$as_me:17845: \$? = $ac_status" >&5
17846 (exit "$ac_status"); }; }; then
17847 ac_cv_header_time=yes
17849 echo "$as_me: failed program was:" >&5
17850 cat "conftest.$ac_ext" >&5
17851 ac_cv_header_time=no
17853 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17855 echo "$as_me:17855: result: $ac_cv_header_time" >&5
17856 echo "${ECHO_T}$ac_cv_header_time" >&6
17857 if test $ac_cv_header_time = yes; then
17859 cat >>confdefs.h <<\EOF
17860 #define TIME_WITH_SYS_TIME 1
17878 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17879 echo "$as_me:17879: checking for $ac_header" >&5
17880 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17881 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17882 echo $ECHO_N "(cached) $ECHO_C" >&6
17884 cat >"conftest.$ac_ext" <<_ACEOF
17885 #line 17885 "configure"
17886 #include "confdefs.h"
17887 #include <$ac_header>
17889 if { (eval echo "$as_me:17889: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17890 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17892 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17894 cat conftest.err >&5
17895 echo "$as_me:17895: \$? = $ac_status" >&5
17896 (exit "$ac_status"); } >/dev/null; then
17897 if test -s conftest.err; then
17898 ac_cpp_err=$ac_c_preproc_warn_flag
17905 if test -z "$ac_cpp_err"; then
17906 eval "$as_ac_Header=yes"
17908 echo "$as_me: failed program was:" >&5
17909 cat "conftest.$ac_ext" >&5
17910 eval "$as_ac_Header=no"
17912 rm -f conftest.err "conftest.$ac_ext"
17914 echo "$as_me:17914: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17915 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17916 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17917 cat >>confdefs.h <<EOF
17918 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17924 for ac_header in unistd.h getopt.h
17926 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17927 echo "$as_me:17927: checking for $ac_header" >&5
17928 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17929 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17930 echo $ECHO_N "(cached) $ECHO_C" >&6
17932 cat >"conftest.$ac_ext" <<_ACEOF
17933 #line 17933 "configure"
17934 #include "confdefs.h"
17935 #include <$ac_header>
17937 if { (eval echo "$as_me:17937: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17938 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17940 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17942 cat conftest.err >&5
17943 echo "$as_me:17943: \$? = $ac_status" >&5
17944 (exit "$ac_status"); } >/dev/null; then
17945 if test -s conftest.err; then
17946 ac_cpp_err=$ac_c_preproc_warn_flag
17953 if test -z "$ac_cpp_err"; then
17954 eval "$as_ac_Header=yes"
17956 echo "$as_me: failed program was:" >&5
17957 cat "conftest.$ac_ext" >&5
17958 eval "$as_ac_Header=no"
17960 rm -f conftest.err "conftest.$ac_ext"
17962 echo "$as_me:17962: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17963 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17964 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17965 cat >>confdefs.h <<EOF
17966 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17972 echo "$as_me:17972: checking for header declaring getopt variables" >&5
17973 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
17974 if test "${cf_cv_getopt_header+set}" = set; then
17975 echo $ECHO_N "(cached) $ECHO_C" >&6
17978 cf_cv_getopt_header=none
17979 for cf_header in stdio.h stdlib.h unistd.h getopt.h
17981 cat >"conftest.$ac_ext" <<_ACEOF
17982 #line 17982 "configure"
17983 #include "confdefs.h"
17985 #include <$cf_header>
17989 int x = optind; char *y = optarg; (void)x; (void)y
17994 rm -f "conftest.$ac_objext"
17995 if { (eval echo "$as_me:17995: \"$ac_compile\"") >&5
17996 (eval $ac_compile) 2>&5
17998 echo "$as_me:17998: \$? = $ac_status" >&5
17999 (exit "$ac_status"); } &&
18000 { ac_try='test -s "conftest.$ac_objext"'
18001 { (eval echo "$as_me:18001: \"$ac_try\"") >&5
18002 (eval $ac_try) 2>&5
18004 echo "$as_me:18004: \$? = $ac_status" >&5
18005 (exit "$ac_status"); }; }; then
18006 cf_cv_getopt_header=$cf_header
18009 echo "$as_me: failed program was:" >&5
18010 cat "conftest.$ac_ext" >&5
18012 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18016 echo "$as_me:18016: result: $cf_cv_getopt_header" >&5
18017 echo "${ECHO_T}$cf_cv_getopt_header" >&6
18018 if test "$cf_cv_getopt_header" != none ; then
18020 cat >>confdefs.h <<\EOF
18021 #define HAVE_GETOPT_HEADER 1
18025 if test "$cf_cv_getopt_header" = getopt.h ; then
18027 cat >>confdefs.h <<\EOF
18028 #define NEED_GETOPT_H 1
18042 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18043 echo "$as_me:18043: checking for $ac_func" >&5
18044 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18045 if eval "test \"\${$as_ac_var+set}\" = set"; then
18046 echo $ECHO_N "(cached) $ECHO_C" >&6
18048 cat >"conftest.$ac_ext" <<_ACEOF
18049 #line 18049 "configure"
18050 #include "confdefs.h"
18051 #define $ac_func autoconf_temporary
18052 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
18059 /* We use char because int might match the return type of a gcc2
18060 builtin and then its argument prototype would still apply. */
18061 char $ac_func (void);
18067 /* The GNU C library defines stubs for functions which it implements
18068 to always fail with ENOSYS. Some functions are actually named
18069 something starting with __ and the normal name is an alias. */
18070 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18071 #error found stub for $ac_func
18074 return $ac_func ();
18079 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18080 if { (eval echo "$as_me:18080: \"$ac_link\"") >&5
18081 (eval $ac_link) 2>&5
18083 echo "$as_me:18083: \$? = $ac_status" >&5
18084 (exit "$ac_status"); } &&
18085 { ac_try='test -s "conftest$ac_exeext"'
18086 { (eval echo "$as_me:18086: \"$ac_try\"") >&5
18087 (eval $ac_try) 2>&5
18089 echo "$as_me:18089: \$? = $ac_status" >&5
18090 (exit "$ac_status"); }; }; then
18091 eval "$as_ac_var=yes"
18093 echo "$as_me: failed program was:" >&5
18094 cat "conftest.$ac_ext" >&5
18095 eval "$as_ac_var=no"
18097 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18099 echo "$as_me:18099: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18100 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18101 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18102 cat >>confdefs.h <<EOF
18103 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18109 # use a compile-check to work with ncurses*-config and subdirectory includes
18110 echo "$as_me:18110: checking if we can use termcap.h" >&5
18111 echo $ECHO_N "checking if we can use termcap.h... $ECHO_C" >&6
18112 if test "${cf_cv_have_termcap_h+set}" = set; then
18113 echo $ECHO_N "(cached) $ECHO_C" >&6
18116 cat >"conftest.$ac_ext" <<_ACEOF
18117 #line 18117 "configure"
18118 #include "confdefs.h"
18120 #include <curses.h>
18121 #ifdef NCURSES_VERSION
18122 #undef NCURSES_VERSION
18124 #include <termcap.h>
18125 #ifndef NCURSES_VERSION
18126 #error wrong header
18137 rm -f "conftest.$ac_objext"
18138 if { (eval echo "$as_me:18138: \"$ac_compile\"") >&5
18139 (eval $ac_compile) 2>&5
18141 echo "$as_me:18141: \$? = $ac_status" >&5
18142 (exit "$ac_status"); } &&
18143 { ac_try='test -s "conftest.$ac_objext"'
18144 { (eval echo "$as_me:18144: \"$ac_try\"") >&5
18145 (eval $ac_try) 2>&5
18147 echo "$as_me:18147: \$? = $ac_status" >&5
18148 (exit "$ac_status"); }; }; then
18149 cf_cv_have_termcap_h=yes
18151 echo "$as_me: failed program was:" >&5
18152 cat "conftest.$ac_ext" >&5
18153 cf_cv_have_termcap_h=no
18155 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18157 echo "$as_me:18157: result: $cf_cv_have_termcap_h" >&5
18158 echo "${ECHO_T}$cf_cv_have_termcap_h" >&6
18159 if test "x$cf_cv_have_termcap_h" = xyes
18162 cat >>confdefs.h <<\EOF
18163 #define HAVE_TERMCAP_H 1
18167 echo "$as_me:18167: checking if we can use ncurses/termcap.h" >&5
18168 echo $ECHO_N "checking if we can use ncurses/termcap.h... $ECHO_C" >&6
18169 if test "${cf_cv_have_ncurses_termcap_h+set}" = set; then
18170 echo $ECHO_N "(cached) $ECHO_C" >&6
18173 cat >"conftest.$ac_ext" <<_ACEOF
18174 #line 18174 "configure"
18175 #include "confdefs.h"
18177 #include <ncurses/curses.h>
18178 #ifdef NCURSES_VERSION
18179 #undef NCURSES_VERSION
18181 #include <ncurses/termcap.h>
18182 #ifndef NCURSES_VERSION
18183 #error wrong header
18194 rm -f "conftest.$ac_objext"
18195 if { (eval echo "$as_me:18195: \"$ac_compile\"") >&5
18196 (eval $ac_compile) 2>&5
18198 echo "$as_me:18198: \$? = $ac_status" >&5
18199 (exit "$ac_status"); } &&
18200 { ac_try='test -s "conftest.$ac_objext"'
18201 { (eval echo "$as_me:18201: \"$ac_try\"") >&5
18202 (eval $ac_try) 2>&5
18204 echo "$as_me:18204: \$? = $ac_status" >&5
18205 (exit "$ac_status"); }; }; then
18206 cf_cv_have_ncurses_termcap_h=yes
18208 echo "$as_me: failed program was:" >&5
18209 cat "conftest.$ac_ext" >&5
18210 cf_cv_have_ncurses_termcap_h=no
18212 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18214 echo "$as_me:18214: result: $cf_cv_have_ncurses_termcap_h" >&5
18215 echo "${ECHO_T}$cf_cv_have_ncurses_termcap_h" >&6
18216 test "x$cf_cv_have_ncurses_termcap_h" = xyes &&
18217 cat >>confdefs.h <<\EOF
18218 #define HAVE_NCURSES_TERMCAP_H 1
18223 if test "x$ac_cv_func_getopt" = xno; then
18224 { { echo "$as_me:18224: error: getopt is required for building programs" >&5
18225 echo "$as_me: error: getopt is required for building programs" >&2;}
18226 { (exit 1); exit 1; }; }
18229 if test "$cf_enable_widec" = yes; then
18242 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18243 echo "$as_me:18243: checking for $ac_func" >&5
18244 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18245 if eval "test \"\${$as_ac_var+set}\" = set"; then
18246 echo $ECHO_N "(cached) $ECHO_C" >&6
18248 cat >"conftest.$ac_ext" <<_ACEOF
18249 #line 18249 "configure"
18250 #include "confdefs.h"
18251 #define $ac_func autoconf_temporary
18252 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
18259 /* We use char because int might match the return type of a gcc2
18260 builtin and then its argument prototype would still apply. */
18261 char $ac_func (void);
18267 /* The GNU C library defines stubs for functions which it implements
18268 to always fail with ENOSYS. Some functions are actually named
18269 something starting with __ and the normal name is an alias. */
18270 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18271 #error found stub for $ac_func
18274 return $ac_func ();
18279 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18280 if { (eval echo "$as_me:18280: \"$ac_link\"") >&5
18281 (eval $ac_link) 2>&5
18283 echo "$as_me:18283: \$? = $ac_status" >&5
18284 (exit "$ac_status"); } &&
18285 { ac_try='test -s "conftest$ac_exeext"'
18286 { (eval echo "$as_me:18286: \"$ac_try\"") >&5
18287 (eval $ac_try) 2>&5
18289 echo "$as_me:18289: \$? = $ac_status" >&5
18290 (exit "$ac_status"); }; }; then
18291 eval "$as_ac_var=yes"
18293 echo "$as_me: failed program was:" >&5
18294 cat "conftest.$ac_ext" >&5
18295 eval "$as_ac_var=no"
18297 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18299 echo "$as_me:18299: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18300 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18301 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18302 cat >>confdefs.h <<EOF
18303 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18311 echo "$as_me:18311: checking definition to turn on extended curses functions" >&5
18312 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
18313 if test "${cf_cv_need_xopen_extension+set}" = set; then
18314 echo $ECHO_N "(cached) $ECHO_C" >&6
18317 cf_cv_need_xopen_extension=unknown
18318 cat >"conftest.$ac_ext" <<_ACEOF
18319 #line 18319 "configure"
18320 #include "confdefs.h"
18322 #include <stdlib.h>
18323 #include <${cf_cv_ncurses_header:-curses.h}>
18328 #if defined(NCURSES_VERSION_PATCH)
18329 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
18333 #ifdef NCURSES_WIDECHAR
18334 make an error /* prefer to fall-through on the second checks */
18337 int check2 = curs_set((int)sizeof(check));
18338 long x = winnstr(stdscr, "", 0);
18341 getbegyx(stdscr, y1, x1);
18350 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18351 if { (eval echo "$as_me:18351: \"$ac_link\"") >&5
18352 (eval $ac_link) 2>&5
18354 echo "$as_me:18354: \$? = $ac_status" >&5
18355 (exit "$ac_status"); } &&
18356 { ac_try='test -s "conftest$ac_exeext"'
18357 { (eval echo "$as_me:18357: \"$ac_try\"") >&5
18358 (eval $ac_try) 2>&5
18360 echo "$as_me:18360: \$? = $ac_status" >&5
18361 (exit "$ac_status"); }; }; then
18362 cf_cv_need_xopen_extension=none
18364 echo "$as_me: failed program was:" >&5
18365 cat "conftest.$ac_ext" >&5
18367 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
18369 cat >"conftest.$ac_ext" <<_ACEOF
18370 #line 18370 "configure"
18371 #include "confdefs.h"
18373 #define $cf_try_xopen_extension 1
18374 #include <stdlib.h>
18375 #include <${cf_cv_ncurses_header:-curses.h}>
18381 int check2 = curs_set((int)sizeof(check));
18382 long x = winnstr(stdscr, "", 0);
18384 getbegyx(stdscr, y1, x1);
18394 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18395 if { (eval echo "$as_me:18395: \"$ac_link\"") >&5
18396 (eval $ac_link) 2>&5
18398 echo "$as_me:18398: \$? = $ac_status" >&5
18399 (exit "$ac_status"); } &&
18400 { ac_try='test -s "conftest$ac_exeext"'
18401 { (eval echo "$as_me:18401: \"$ac_try\"") >&5
18402 (eval $ac_try) 2>&5
18404 echo "$as_me:18404: \$? = $ac_status" >&5
18405 (exit "$ac_status"); }; }; then
18406 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
18408 echo "$as_me: failed program was:" >&5
18409 cat "conftest.$ac_ext" >&5
18411 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18415 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18418 echo "$as_me:18418: result: $cf_cv_need_xopen_extension" >&5
18419 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
18421 case "$cf_cv_need_xopen_extension" in
18424 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18425 CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
18430 echo "$as_me:18430: checking for term.h" >&5
18431 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
18432 if test "${cf_cv_term_header+set}" = set; then
18433 echo $ECHO_N "(cached) $ECHO_C" >&6
18436 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
18437 # for <term.h> if we do not find the variant.
18439 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
18441 case "${cf_cv_ncurses_header:-curses.h}" in
18443 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
18444 cf_header_list="$cf_header_item $cf_header_list"
18448 for cf_header in $cf_header_list
18450 cat >"conftest.$ac_ext" <<_ACEOF
18451 #line 18451 "configure"
18452 #include "confdefs.h"
18454 #include <${cf_cv_ncurses_header:-curses.h}>
18455 #include <${cf_header}>
18464 rm -f "conftest.$ac_objext"
18465 if { (eval echo "$as_me:18465: \"$ac_compile\"") >&5
18466 (eval $ac_compile) 2>&5
18468 echo "$as_me:18468: \$? = $ac_status" >&5
18469 (exit "$ac_status"); } &&
18470 { ac_try='test -s "conftest.$ac_objext"'
18471 { (eval echo "$as_me:18471: \"$ac_try\"") >&5
18472 (eval $ac_try) 2>&5
18474 echo "$as_me:18474: \$? = $ac_status" >&5
18475 (exit "$ac_status"); }; }; then
18476 cf_cv_term_header=$cf_header
18479 echo "$as_me: failed program was:" >&5
18480 cat "conftest.$ac_ext" >&5
18481 cf_cv_term_header=no
18483 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18486 case "$cf_cv_term_header" in
18488 # If curses is ncurses, some packagers still mess it up by trying to make
18489 # us use GNU termcap. This handles the most common case.
18490 for cf_header in ncurses/term.h ncursesw/term.h
18492 cat >"conftest.$ac_ext" <<_ACEOF
18493 #line 18493 "configure"
18494 #include "confdefs.h"
18496 #include <${cf_cv_ncurses_header:-curses.h}>
18497 #ifdef NCURSES_VERSION
18498 #include <${cf_header}>
18510 rm -f "conftest.$ac_objext"
18511 if { (eval echo "$as_me:18511: \"$ac_compile\"") >&5
18512 (eval $ac_compile) 2>&5
18514 echo "$as_me:18514: \$? = $ac_status" >&5
18515 (exit "$ac_status"); } &&
18516 { ac_try='test -s "conftest.$ac_objext"'
18517 { (eval echo "$as_me:18517: \"$ac_try\"") >&5
18518 (eval $ac_try) 2>&5
18520 echo "$as_me:18520: \$? = $ac_status" >&5
18521 (exit "$ac_status"); }; }; then
18522 cf_cv_term_header=$cf_header
18525 echo "$as_me: failed program was:" >&5
18526 cat "conftest.$ac_ext" >&5
18527 cf_cv_term_header=no
18529 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18535 echo "$as_me:18535: result: $cf_cv_term_header" >&5
18536 echo "${ECHO_T}$cf_cv_term_header" >&6
18538 case "$cf_cv_term_header" in
18541 cat >>confdefs.h <<\EOF
18542 #define HAVE_TERM_H 1
18548 cat >>confdefs.h <<\EOF
18549 #define HAVE_NCURSES_TERM_H 1
18555 cat >>confdefs.h <<\EOF
18556 #define HAVE_NCURSESW_TERM_H 1
18562 echo "$as_me:18562: checking for unctrl.h" >&5
18563 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
18564 if test "${cf_cv_unctrl_header+set}" = set; then
18565 echo $ECHO_N "(cached) $ECHO_C" >&6
18568 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
18569 # for <unctrl.h> if we do not find the variant.
18571 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
18573 case "${cf_cv_ncurses_header:-curses.h}" in
18575 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
18576 cf_header_list="$cf_header_item $cf_header_list"
18580 for cf_header in $cf_header_list
18582 cat >"conftest.$ac_ext" <<_ACEOF
18583 #line 18583 "configure"
18584 #include "confdefs.h"
18586 #include <${cf_cv_ncurses_header:-curses.h}>
18587 #include <${cf_header}>
18596 rm -f "conftest.$ac_objext"
18597 if { (eval echo "$as_me:18597: \"$ac_compile\"") >&5
18598 (eval $ac_compile) 2>&5
18600 echo "$as_me:18600: \$? = $ac_status" >&5
18601 (exit "$ac_status"); } &&
18602 { ac_try='test -s "conftest.$ac_objext"'
18603 { (eval echo "$as_me:18603: \"$ac_try\"") >&5
18604 (eval $ac_try) 2>&5
18606 echo "$as_me:18606: \$? = $ac_status" >&5
18607 (exit "$ac_status"); }; }; then
18608 cf_cv_unctrl_header=$cf_header
18611 echo "$as_me: failed program was:" >&5
18612 cat "conftest.$ac_ext" >&5
18613 cf_cv_unctrl_header=no
18615 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18619 echo "$as_me:18619: result: $cf_cv_unctrl_header" >&5
18620 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
18622 case "$cf_cv_unctrl_header" in
18624 { echo "$as_me:18624: WARNING: unctrl.h header not found" >&5
18625 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
18629 case "$cf_cv_unctrl_header" in
18632 cat >>confdefs.h <<\EOF
18633 #define HAVE_UNCTRL_H 1
18639 cat >>confdefs.h <<\EOF
18640 #define HAVE_NCURSES_UNCTRL_H 1
18644 (ncursesw/unctrl.h)
18646 cat >>confdefs.h <<\EOF
18647 #define HAVE_NCURSESW_UNCTRL_H 1
18655 assume_default_colors \
18672 init_extended_color \
18680 reset_color_pairs \
18696 use_default_colors \
18698 use_extended_names \
18714 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18716 echo "$as_me:18716: checking for ${cf_func}" >&5
18717 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
18719 echo "${as_me:-configure}:18719: testing ${cf_func} ..." 1>&5
18721 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
18722 echo $ECHO_N "(cached) $ECHO_C" >&6
18725 eval cf_result='$ac_cv_func_'$cf_func
18726 if test ".$cf_result" != ".no"; then
18727 cat >"conftest.$ac_ext" <<_ACEOF
18728 #line 18728 "configure"
18729 #include "confdefs.h"
18731 #ifdef HAVE_XCURSES
18732 #include <xcurses.h>
18733 char * XCursesProgramName = "test";
18735 #include <${cf_cv_ncurses_header:-curses.h}>
18736 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
18737 #include <ncursesw/term.h>
18738 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
18739 #include <ncurses/term.h>
18740 #elif defined(HAVE_TERM_H)
18750 long foo = (long)(&${cf_func});
18751 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
18752 if (foo + 1234L > 5678L)
18753 ${cf_cv_main_return:-return}(foo != 0);
18760 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18761 if { (eval echo "$as_me:18761: \"$ac_link\"") >&5
18762 (eval $ac_link) 2>&5
18764 echo "$as_me:18764: \$? = $ac_status" >&5
18765 (exit "$ac_status"); } &&
18766 { ac_try='test -s "conftest$ac_exeext"'
18767 { (eval echo "$as_me:18767: \"$ac_try\"") >&5
18768 (eval $ac_try) 2>&5
18770 echo "$as_me:18770: \$? = $ac_status" >&5
18771 (exit "$ac_status"); }; }; then
18774 echo "$as_me: failed program was:" >&5
18775 cat "conftest.$ac_ext" >&5
18778 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18780 eval 'cf_cv_func_'$cf_func'="$cf_result"'
18784 # use the computed/retrieved cache-value:
18785 eval 'cf_result=$cf_cv_func_'$cf_func
18786 echo "$as_me:18786: result: $cf_result" >&5
18787 echo "${ECHO_T}$cf_result" >&6
18788 if test "$cf_result" != no; then
18789 cat >>confdefs.h <<EOF
18790 #define HAVE_${cf_tr_func} 1
18796 for cf_func in tputs
18799 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18801 echo "$as_me:18801: checking for ${cf_func}" >&5
18802 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
18804 echo "${as_me:-configure}:18804: testing ${cf_func} ..." 1>&5
18806 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
18807 echo $ECHO_N "(cached) $ECHO_C" >&6
18810 eval cf_result='$ac_cv_func_'$cf_func
18811 if test ".$cf_result" != ".no"; then
18812 cat >"conftest.$ac_ext" <<_ACEOF
18813 #line 18813 "configure"
18814 #include "confdefs.h"
18816 #ifdef HAVE_XCURSES
18817 #include <xcurses.h>
18818 char * XCursesProgramName = "test";
18820 #include <${cf_cv_ncurses_header:-curses.h}>
18821 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
18822 #include <ncursesw/term.h>
18823 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
18824 #include <ncurses/term.h>
18825 #elif defined(HAVE_TERM_H)
18835 long foo = (long)(&${cf_func});
18836 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
18837 if (foo + 1234L > 5678L)
18838 ${cf_cv_main_return:-return}(foo != 0);
18845 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18846 if { (eval echo "$as_me:18846: \"$ac_link\"") >&5
18847 (eval $ac_link) 2>&5
18849 echo "$as_me:18849: \$? = $ac_status" >&5
18850 (exit "$ac_status"); } &&
18851 { ac_try='test -s "conftest$ac_exeext"'
18852 { (eval echo "$as_me:18852: \"$ac_try\"") >&5
18853 (eval $ac_try) 2>&5
18855 echo "$as_me:18855: \$? = $ac_status" >&5
18856 (exit "$ac_status"); }; }; then
18859 echo "$as_me: failed program was:" >&5
18860 cat "conftest.$ac_ext" >&5
18863 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18865 eval 'cf_cv_func_'$cf_func'="$cf_result"'
18869 # use the computed/retrieved cache-value:
18870 eval 'cf_result=$cf_cv_func_'$cf_func
18871 echo "$as_me:18871: result: $cf_result" >&5
18872 echo "${ECHO_T}$cf_result" >&6
18873 if test "$cf_result" != no; then
18874 cat >>confdefs.h <<EOF
18875 #define HAVE_${cf_tr_func} 1
18881 if test "x$cf_cv_func_tputs" = xyes
18884 for cf_arg in int char
18886 for cf_ret in int void
18888 if test "$cf_ret" = void
18890 cf_return="/* nothing */"
18892 cf_return="return value"
18894 cat >"conftest.$ac_ext" <<_ACEOF
18895 #line 18895 "configure"
18896 #include "confdefs.h"
18898 #include <${cf_cv_ncurses_header:-curses.h}>
18899 #include <$cf_cv_term_header>
18901 static $cf_ret outc($cf_arg value) { $cf_return; }
18907 tputs("hello", 0, outc);
18908 ${cf_cv_main_return:-return}(0);
18914 rm -f "conftest.$ac_objext"
18915 if { (eval echo "$as_me:18915: \"$ac_compile\"") >&5
18916 (eval $ac_compile) 2>&5
18918 echo "$as_me:18918: \$? = $ac_status" >&5
18919 (exit "$ac_status"); } &&
18920 { ac_try='test -s "conftest.$ac_objext"'
18921 { (eval echo "$as_me:18921: \"$ac_try\"") >&5
18922 (eval $ac_try) 2>&5
18924 echo "$as_me:18924: \$? = $ac_status" >&5
18925 (exit "$ac_status"); }; }; then
18927 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
18929 echo "${as_me:-configure}:18929: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
18931 cat >>confdefs.h <<EOF
18932 #define TPUTS_ARG $cf_arg
18933 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
18934 #define TPUTS_RETURN(value) $cf_return
18940 echo "$as_me: failed program was:" >&5
18941 cat "conftest.$ac_ext" >&5
18943 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18945 test "$cf_done" = yes && break
18949 echo "$as_me:18949: checking for ncurses extended functions" >&5
18950 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
18951 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
18952 echo $ECHO_N "(cached) $ECHO_C" >&6
18955 cat >"conftest.$ac_ext" <<_ACEOF
18956 #line 18956 "configure"
18957 #include "confdefs.h"
18959 #include <${cf_cv_ncurses_header:-curses.h}>
18964 int x = NCURSES_EXT_FUNCS
18970 rm -f "conftest.$ac_objext"
18971 if { (eval echo "$as_me:18971: \"$ac_compile\"") >&5
18972 (eval $ac_compile) 2>&5
18974 echo "$as_me:18974: \$? = $ac_status" >&5
18975 (exit "$ac_status"); } &&
18976 { ac_try='test -s "conftest.$ac_objext"'
18977 { (eval echo "$as_me:18977: \"$ac_try\"") >&5
18978 (eval $ac_try) 2>&5
18980 echo "$as_me:18980: \$? = $ac_status" >&5
18981 (exit "$ac_status"); }; }; then
18982 cf_cv_ncurses_ext_funcs=defined
18984 echo "$as_me: failed program was:" >&5
18985 cat "conftest.$ac_ext" >&5
18987 cat >"conftest.$ac_ext" <<_ACEOF
18988 #line 18988 "configure"
18989 #include "confdefs.h"
18991 #include <${cf_cv_ncurses_header:-curses.h}>
18996 (void) assume_default_colors (0, 0);
18997 (void) curses_version ();
18998 (void) define_key (0, 0);
18999 (void) is_term_resized (0, 0);
19000 (void) key_defined (0);
19001 (void) keybound (0, 0);
19002 (void) keyok (0, 0);
19003 (void) resize_term (0, 0);
19004 (void) resizeterm (0, 0);
19005 (void) use_default_colors ();
19006 (void) use_extended_names (0);
19007 (void) wresize (0, 0, 0);
19012 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19013 if { (eval echo "$as_me:19013: \"$ac_link\"") >&5
19014 (eval $ac_link) 2>&5
19016 echo "$as_me:19016: \$? = $ac_status" >&5
19017 (exit "$ac_status"); } &&
19018 { ac_try='test -s "conftest$ac_exeext"'
19019 { (eval echo "$as_me:19019: \"$ac_try\"") >&5
19020 (eval $ac_try) 2>&5
19022 echo "$as_me:19022: \$? = $ac_status" >&5
19023 (exit "$ac_status"); }; }; then
19024 cf_cv_ncurses_ext_funcs=yes
19026 echo "$as_me: failed program was:" >&5
19027 cat "conftest.$ac_ext" >&5
19028 cf_cv_ncurses_ext_funcs=no
19030 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19033 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19036 echo "$as_me:19036: result: $cf_cv_ncurses_ext_funcs" >&5
19037 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
19038 test "$cf_cv_ncurses_ext_funcs" = yes &&
19039 cat >>confdefs.h <<\EOF
19040 #define NCURSES_EXT_FUNCS 1
19043 if test "$cf_enable_widec" = yes
19045 # workaround for systems with ncurses before 20111029, due to change of
19046 # feature test macro from _XPG5 to _XOPEN_SOURCE
19047 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
19050 echo "$as_me:19050: checking if _XPG5 should be defined to enable wide-characters" >&5
19051 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
19053 cat >"conftest.$ac_ext" <<_ACEOF
19054 #line 19054 "configure"
19055 #include "confdefs.h"
19057 #include <${cf_cv_ncurses_header:-curses.h}>
19066 rm -f "conftest.$ac_objext"
19067 if { (eval echo "$as_me:19067: \"$ac_compile\"") >&5
19068 (eval $ac_compile) 2>&5
19070 echo "$as_me:19070: \$? = $ac_status" >&5
19071 (exit "$ac_status"); } &&
19072 { ac_try='test -s "conftest.$ac_objext"'
19073 { (eval echo "$as_me:19073: \"$ac_try\"") >&5
19074 (eval $ac_try) 2>&5
19076 echo "$as_me:19076: \$? = $ac_status" >&5
19077 (exit "$ac_status"); }; }; then
19080 echo "$as_me: failed program was:" >&5
19081 cat "conftest.$ac_ext" >&5
19082 cf_save_cppflags="$CPPFLAGS"
19083 CPPFLAGS="$CPPFLAGS -D_XPG5"
19084 cat >"conftest.$ac_ext" <<_ACEOF
19085 #line 19085 "configure"
19086 #include "confdefs.h"
19088 #include <${cf_cv_ncurses_header:-curses.h}>
19097 rm -f "conftest.$ac_objext"
19098 if { (eval echo "$as_me:19098: \"$ac_compile\"") >&5
19099 (eval $ac_compile) 2>&5
19101 echo "$as_me:19101: \$? = $ac_status" >&5
19102 (exit "$ac_status"); } &&
19103 { ac_try='test -s "conftest.$ac_objext"'
19104 { (eval echo "$as_me:19104: \"$ac_try\"") >&5
19105 (eval $ac_try) 2>&5
19107 echo "$as_me:19107: \$? = $ac_status" >&5
19108 (exit "$ac_status"); }; }; then
19111 echo "$as_me: failed program was:" >&5
19112 cat "conftest.$ac_ext" >&5
19114 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19115 CPPFLAGS="$cf_save_cppflags"
19117 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19118 echo "$as_me:19118: result: $cf_define_xpg5" >&5
19119 echo "${ECHO_T}$cf_define_xpg5" >&6
19121 if test "$cf_define_xpg5" = yes
19123 CPPFLAGS="$CPPFLAGS -D_XPG5"
19127 echo "$as_me:19127: checking for wide-character functions" >&5
19128 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
19129 if test "${cf_cv_widechar_funcs+set}" = set; then
19130 echo $ECHO_N "(cached) $ECHO_C" >&6
19133 cat >"conftest.$ac_ext" <<_ACEOF
19134 #line 19134 "configure"
19135 #include "confdefs.h"
19137 #include <${cf_cv_ncurses_header:-curses.h}>
19142 static wchar_t src_wchar[2];
19143 static cchar_t dst_cchar;
19144 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
19150 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19151 if { (eval echo "$as_me:19151: \"$ac_link\"") >&5
19152 (eval $ac_link) 2>&5
19154 echo "$as_me:19154: \$? = $ac_status" >&5
19155 (exit "$ac_status"); } &&
19156 { ac_try='test -s "conftest$ac_exeext"'
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_widechar_funcs=yes
19164 echo "$as_me: failed program was:" >&5
19165 cat "conftest.$ac_ext" >&5
19166 cf_cv_widechar_funcs=no
19168 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19171 echo "$as_me:19171: result: $cf_cv_widechar_funcs" >&5
19172 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
19173 if test "$cf_cv_widechar_funcs" != no ; then
19175 cat >>confdefs.h <<\EOF
19176 #define USE_WIDEC_SUPPORT 1
19180 cat >>confdefs.h <<\EOF
19181 #define USE_WIDEC_SUPPORT 0
19186 cat >>confdefs.h <<\EOF
19187 #define USE_WIDEC_SUPPORT 0
19192 echo "$as_me:19192: checking if $cf_cv_screen library uses pthreads" >&5
19193 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
19194 if test "${cf_cv_use_pthreads+set}" = set; then
19195 echo $ECHO_N "(cached) $ECHO_C" >&6
19198 cat >"conftest.$ac_ext" <<_ACEOF
19199 #line 19199 "configure"
19200 #include "confdefs.h"
19202 #include <${cf_cv_ncurses_header:-curses.h}>
19203 extern void _nc_init_pthreads(void);
19210 _nc_init_pthreads();
19216 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19217 if { (eval echo "$as_me:19217: \"$ac_link\"") >&5
19218 (eval $ac_link) 2>&5
19220 echo "$as_me:19220: \$? = $ac_status" >&5
19221 (exit "$ac_status"); } &&
19222 { ac_try='test -s "conftest$ac_exeext"'
19223 { (eval echo "$as_me:19223: \"$ac_try\"") >&5
19224 (eval $ac_try) 2>&5
19226 echo "$as_me:19226: \$? = $ac_status" >&5
19227 (exit "$ac_status"); }; }; then
19228 cf_cv_use_pthreads=yes
19230 echo "$as_me: failed program was:" >&5
19231 cat "conftest.$ac_ext" >&5
19232 cf_cv_use_pthreads=no
19234 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19237 echo "$as_me:19237: result: $cf_cv_use_pthreads" >&5
19238 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
19239 test $cf_cv_use_pthreads = yes &&
19240 cat >>confdefs.h <<\EOF
19241 #define USE_PTHREADS 1
19244 echo "$as_me:19244: checking if sys/time.h works with sys/select.h" >&5
19245 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
19246 if test "${cf_cv_sys_time_select+set}" = set; then
19247 echo $ECHO_N "(cached) $ECHO_C" >&6
19250 cat >"conftest.$ac_ext" <<_ACEOF
19251 #line 19251 "configure"
19252 #include "confdefs.h"
19254 #include <sys/types.h>
19255 #ifdef HAVE_SYS_TIME_H
19256 #include <sys/time.h>
19258 #ifdef HAVE_SYS_SELECT_H
19259 #include <sys/select.h>
19270 rm -f "conftest.$ac_objext"
19271 if { (eval echo "$as_me:19271: \"$ac_compile\"") >&5
19272 (eval $ac_compile) 2>&5
19274 echo "$as_me:19274: \$? = $ac_status" >&5
19275 (exit "$ac_status"); } &&
19276 { ac_try='test -s "conftest.$ac_objext"'
19277 { (eval echo "$as_me:19277: \"$ac_try\"") >&5
19278 (eval $ac_try) 2>&5
19280 echo "$as_me:19280: \$? = $ac_status" >&5
19281 (exit "$ac_status"); }; }; then
19282 cf_cv_sys_time_select=yes
19284 echo "$as_me: failed program was:" >&5
19285 cat "conftest.$ac_ext" >&5
19286 cf_cv_sys_time_select=no
19288 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19292 echo "$as_me:19292: result: $cf_cv_sys_time_select" >&5
19293 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
19294 test "$cf_cv_sys_time_select" = yes &&
19295 cat >>confdefs.h <<\EOF
19296 #define HAVE_SYS_TIME_SELECT 1
19299 # special check for test/ditto.c
19301 echo "$as_me:19301: checking for openpty in -lutil" >&5
19302 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
19303 if test "${ac_cv_lib_util_openpty+set}" = set; then
19304 echo $ECHO_N "(cached) $ECHO_C" >&6
19306 ac_check_lib_save_LIBS=$LIBS
19307 LIBS="-lutil $LIBS"
19308 cat >"conftest.$ac_ext" <<_ACEOF
19309 #line 19309 "configure"
19310 #include "confdefs.h"
19312 /* Override any gcc2 internal prototype to avoid an error. */
19316 /* We use char because int might match the return type of a gcc2
19317 builtin and then its argument prototype would still apply. */
19327 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19328 if { (eval echo "$as_me:19328: \"$ac_link\"") >&5
19329 (eval $ac_link) 2>&5
19331 echo "$as_me:19331: \$? = $ac_status" >&5
19332 (exit "$ac_status"); } &&
19333 { ac_try='test -s "conftest$ac_exeext"'
19334 { (eval echo "$as_me:19334: \"$ac_try\"") >&5
19335 (eval $ac_try) 2>&5
19337 echo "$as_me:19337: \$? = $ac_status" >&5
19338 (exit "$ac_status"); }; }; then
19339 ac_cv_lib_util_openpty=yes
19341 echo "$as_me: failed program was:" >&5
19342 cat "conftest.$ac_ext" >&5
19343 ac_cv_lib_util_openpty=no
19345 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19346 LIBS=$ac_check_lib_save_LIBS
19348 echo "$as_me:19348: result: $ac_cv_lib_util_openpty" >&5
19349 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
19350 if test "$ac_cv_lib_util_openpty" = yes; then
19356 echo "$as_me:19356: checking for openpty header" >&5
19357 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
19358 if test "${cf_cv_func_openpty+set}" = set; then
19359 echo $ECHO_N "(cached) $ECHO_C" >&6
19362 cf_save_LIBS="$LIBS"
19363 test "$cf_cv_lib_util" = yes && {
19364 cf_add_libs="$LIBS"
19367 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19368 # filter duplicates
19369 for cf_add_1lib in $cf_add_0lib; do
19370 for cf_add_2lib in $cf_add_libs; do
19371 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19376 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19378 LIBS="$cf_add_libs"
19380 for cf_header in pty.h libutil.h util.h
19382 cat >"conftest.$ac_ext" <<_ACEOF
19383 #line 19383 "configure"
19384 #include "confdefs.h"
19386 #include <$cf_header>
19392 int x = openpty((int *)0, (int *)0, (char *)0,
19393 (struct termios *)0, (struct winsize *)0);
19399 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19400 if { (eval echo "$as_me:19400: \"$ac_link\"") >&5
19401 (eval $ac_link) 2>&5
19403 echo "$as_me:19403: \$? = $ac_status" >&5
19404 (exit "$ac_status"); } &&
19405 { ac_try='test -s "conftest$ac_exeext"'
19406 { (eval echo "$as_me:19406: \"$ac_try\"") >&5
19407 (eval $ac_try) 2>&5
19409 echo "$as_me:19409: \$? = $ac_status" >&5
19410 (exit "$ac_status"); }; }; then
19412 cf_cv_func_openpty=$cf_header
19416 echo "$as_me: failed program was:" >&5
19417 cat "conftest.$ac_ext" >&5
19419 cf_cv_func_openpty=no
19422 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19424 LIBS="$cf_save_LIBS"
19427 echo "$as_me:19427: result: $cf_cv_func_openpty" >&5
19428 echo "${ECHO_T}$cf_cv_func_openpty" >&6
19430 if test "$cf_cv_func_openpty" != no ; then
19432 cat >>confdefs.h <<EOF
19433 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
19436 cat >>confdefs.h <<\EOF
19437 #define USE_XTERM_PTY 1
19440 if test "x$cf_cv_lib_util" = xyes ; then
19442 cf_add_libs="$TEST_LIBS"
19445 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19446 # filter duplicates
19447 for cf_add_1lib in $cf_add_0lib; do
19448 for cf_add_2lib in $cf_add_libs; do
19449 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19454 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19456 TEST_LIBS="$cf_add_libs"
19461 echo "$as_me:19461: checking for function curses_version" >&5
19462 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
19463 if test "${cf_cv_func_curses_version+set}" = set; then
19464 echo $ECHO_N "(cached) $ECHO_C" >&6
19467 if test "$cross_compiling" = yes; then
19468 cf_cv_func_curses_version=unknown
19470 cat >"conftest.$ac_ext" <<_ACEOF
19471 #line 19471 "configure"
19472 #include "confdefs.h"
19474 #include <${cf_cv_ncurses_header:-curses.h}>
19478 sprintf(temp, "%s\\n", curses_version());
19479 ${cf_cv_main_return:-return}(0);
19483 rm -f "conftest$ac_exeext"
19484 if { (eval echo "$as_me:19484: \"$ac_link\"") >&5
19485 (eval $ac_link) 2>&5
19487 echo "$as_me:19487: \$? = $ac_status" >&5
19488 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
19489 { (eval echo "$as_me:19489: \"$ac_try\"") >&5
19490 (eval $ac_try) 2>&5
19492 echo "$as_me:19492: \$? = $ac_status" >&5
19493 (exit "$ac_status"); }; }; then
19494 cf_cv_func_curses_version=yes
19497 echo "$as_me: program exited with status $ac_status" >&5
19498 echo "$as_me: failed program was:" >&5
19499 cat "conftest.$ac_ext" >&5
19500 cf_cv_func_curses_version=no
19503 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
19507 echo "$as_me:19507: result: $cf_cv_func_curses_version" >&5
19508 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
19509 test "$cf_cv_func_curses_version" = yes &&
19510 cat >>confdefs.h <<\EOF
19511 #define HAVE_CURSES_VERSION 1
19514 echo "$as_me:19514: checking for alternate character set array" >&5
19515 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
19516 if test "${cf_cv_curses_acs_map+set}" = set; then
19517 echo $ECHO_N "(cached) $ECHO_C" >&6
19520 cf_cv_curses_acs_map=unknown
19521 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
19523 cat >"conftest.$ac_ext" <<_ACEOF
19524 #line 19524 "configure"
19525 #include "confdefs.h"
19527 #include <${cf_cv_ncurses_header:-curses.h}>
19533 ${name}['k'] = ACS_PLUS
19539 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19540 if { (eval echo "$as_me:19540: \"$ac_link\"") >&5
19541 (eval $ac_link) 2>&5
19543 echo "$as_me:19543: \$? = $ac_status" >&5
19544 (exit "$ac_status"); } &&
19545 { ac_try='test -s "conftest$ac_exeext"'
19546 { (eval echo "$as_me:19546: \"$ac_try\"") >&5
19547 (eval $ac_try) 2>&5
19549 echo "$as_me:19549: \$? = $ac_status" >&5
19550 (exit "$ac_status"); }; }; then
19551 cf_cv_curses_acs_map=$name; break
19553 echo "$as_me: failed program was:" >&5
19554 cat "conftest.$ac_ext" >&5
19556 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19560 echo "$as_me:19560: result: $cf_cv_curses_acs_map" >&5
19561 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
19563 test "$cf_cv_curses_acs_map" != unknown &&
19564 cat >>confdefs.h <<EOF
19565 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
19568 if test "$cf_enable_widec" = yes; then
19570 echo "$as_me:19570: checking for wide alternate character set array" >&5
19571 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
19572 if test "${cf_cv_curses_wacs_map+set}" = set; then
19573 echo $ECHO_N "(cached) $ECHO_C" >&6
19576 cf_cv_curses_wacs_map=unknown
19577 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
19579 cat >"conftest.$ac_ext" <<_ACEOF
19580 #line 19580 "configure"
19581 #include "confdefs.h"
19583 #ifndef _XOPEN_SOURCE_EXTENDED
19584 #define _XOPEN_SOURCE_EXTENDED
19586 #include <${cf_cv_ncurses_header:-curses.h}>
19590 void *foo = &(${name}['k']); (void)foo
19595 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19596 if { (eval echo "$as_me:19596: \"$ac_link\"") >&5
19597 (eval $ac_link) 2>&5
19599 echo "$as_me:19599: \$? = $ac_status" >&5
19600 (exit "$ac_status"); } &&
19601 { ac_try='test -s "conftest$ac_exeext"'
19602 { (eval echo "$as_me:19602: \"$ac_try\"") >&5
19603 (eval $ac_try) 2>&5
19605 echo "$as_me:19605: \$? = $ac_status" >&5
19606 (exit "$ac_status"); }; }; then
19607 cf_cv_curses_wacs_map=$name
19610 echo "$as_me: failed program was:" >&5
19611 cat "conftest.$ac_ext" >&5
19613 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19616 echo "$as_me:19616: result: $cf_cv_curses_wacs_map" >&5
19617 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
19619 test "$cf_cv_curses_wacs_map" != unknown &&
19620 cat >>confdefs.h <<EOF
19621 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
19624 echo "$as_me:19624: checking for wide alternate character constants" >&5
19625 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
19626 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
19627 echo $ECHO_N "(cached) $ECHO_C" >&6
19630 cf_cv_curses_wacs_symbols=no
19631 if test "$cf_cv_curses_wacs_map" != unknown
19633 cat >"conftest.$ac_ext" <<_ACEOF
19634 #line 19634 "configure"
19635 #include "confdefs.h"
19637 #ifndef _XOPEN_SOURCE_EXTENDED
19638 #define _XOPEN_SOURCE_EXTENDED
19640 #include <${cf_cv_ncurses_header:-curses.h}>
19644 cchar_t *foo = WACS_PLUS;
19645 ${cf_cv_curses_wacs_map}['k'] = *WACS_PLUS; (void)foo
19650 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19651 if { (eval echo "$as_me:19651: \"$ac_link\"") >&5
19652 (eval $ac_link) 2>&5
19654 echo "$as_me:19654: \$? = $ac_status" >&5
19655 (exit "$ac_status"); } &&
19656 { ac_try='test -s "conftest$ac_exeext"'
19657 { (eval echo "$as_me:19657: \"$ac_try\"") >&5
19658 (eval $ac_try) 2>&5
19660 echo "$as_me:19660: \$? = $ac_status" >&5
19661 (exit "$ac_status"); }; }; then
19662 cf_cv_curses_wacs_symbols=yes
19664 echo "$as_me: failed program was:" >&5
19665 cat "conftest.$ac_ext" >&5
19667 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19669 cat >"conftest.$ac_ext" <<_ACEOF
19670 #line 19670 "configure"
19671 #include "confdefs.h"
19673 #ifndef _XOPEN_SOURCE_EXTENDED
19674 #define _XOPEN_SOURCE_EXTENDED
19676 #include <${cf_cv_ncurses_header:-curses.h}>
19680 cchar_t *foo = WACS_PLUS; (void)foo
19685 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19686 if { (eval echo "$as_me:19686: \"$ac_link\"") >&5
19687 (eval $ac_link) 2>&5
19689 echo "$as_me:19689: \$? = $ac_status" >&5
19690 (exit "$ac_status"); } &&
19691 { ac_try='test -s "conftest$ac_exeext"'
19692 { (eval echo "$as_me:19692: \"$ac_try\"") >&5
19693 (eval $ac_try) 2>&5
19695 echo "$as_me:19695: \$? = $ac_status" >&5
19696 (exit "$ac_status"); }; }; then
19697 cf_cv_curses_wacs_symbols=yes
19699 echo "$as_me: failed program was:" >&5
19700 cat "conftest.$ac_ext" >&5
19702 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19706 echo "$as_me:19706: result: $cf_cv_curses_wacs_symbols" >&5
19707 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
19709 test "$cf_cv_curses_wacs_symbols" != no &&
19710 cat >>confdefs.h <<\EOF
19711 #define CURSES_WACS_SYMBOLS 1
19716 echo "$as_me:19716: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19717 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19718 cat >"conftest.$ac_ext" <<_ACEOF
19719 #line 19719 "configure"
19720 #include "confdefs.h"
19722 #ifndef _XOPEN_SOURCE_EXTENDED
19723 #define _XOPEN_SOURCE_EXTENDED
19725 #include <${cf_cv_ncurses_header:-curses.h}>
19736 rm -f "conftest.$ac_objext"
19737 if { (eval echo "$as_me:19737: \"$ac_compile\"") >&5
19738 (eval $ac_compile) 2>&5
19740 echo "$as_me:19740: \$? = $ac_status" >&5
19741 (exit "$ac_status"); } &&
19742 { ac_try='test -s "conftest.$ac_objext"'
19743 { (eval echo "$as_me:19743: \"$ac_try\"") >&5
19744 (eval $ac_try) 2>&5
19746 echo "$as_me:19746: \$? = $ac_status" >&5
19747 (exit "$ac_status"); }; }; then
19750 echo "$as_me: failed program was:" >&5
19751 cat "conftest.$ac_ext" >&5
19754 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19755 echo "$as_me:19755: result: $cf_result" >&5
19756 echo "${ECHO_T}$cf_result" >&6
19757 if test "$cf_result" = yes ; then
19759 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19761 cat >>confdefs.h <<EOF
19762 #define $cf_result 1
19767 cat >>confdefs.h <<EOF
19768 #define attr_t long
19773 if test "$cf_enable_widec" = yes; then
19775 # This is needed on Tru64 5.0 to declare mbstate_t
19776 echo "$as_me:19776: checking if we must include wchar.h to declare mbstate_t" >&5
19777 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
19778 if test "${cf_cv_mbstate_t+set}" = set; then
19779 echo $ECHO_N "(cached) $ECHO_C" >&6
19782 cat >"conftest.$ac_ext" <<_ACEOF
19783 #line 19783 "configure"
19784 #include "confdefs.h"
19786 #include <stdlib.h>
19787 #include <stdarg.h>
19789 #ifdef HAVE_LIBUTF8_H
19790 #include <libutf8.h>
19800 rm -f "conftest.$ac_objext"
19801 if { (eval echo "$as_me:19801: \"$ac_compile\"") >&5
19802 (eval $ac_compile) 2>&5
19804 echo "$as_me:19804: \$? = $ac_status" >&5
19805 (exit "$ac_status"); } &&
19806 { ac_try='test -s "conftest.$ac_objext"'
19807 { (eval echo "$as_me:19807: \"$ac_try\"") >&5
19808 (eval $ac_try) 2>&5
19810 echo "$as_me:19810: \$? = $ac_status" >&5
19811 (exit "$ac_status"); }; }; then
19814 echo "$as_me: failed program was:" >&5
19815 cat "conftest.$ac_ext" >&5
19816 cat >"conftest.$ac_ext" <<_ACEOF
19817 #line 19817 "configure"
19818 #include "confdefs.h"
19820 #include <stdlib.h>
19821 #include <stdarg.h>
19824 #ifdef HAVE_LIBUTF8_H
19825 #include <libutf8.h>
19835 rm -f "conftest.$ac_objext"
19836 if { (eval echo "$as_me:19836: \"$ac_compile\"") >&5
19837 (eval $ac_compile) 2>&5
19839 echo "$as_me:19839: \$? = $ac_status" >&5
19840 (exit "$ac_status"); } &&
19841 { ac_try='test -s "conftest.$ac_objext"'
19842 { (eval echo "$as_me:19842: \"$ac_try\"") >&5
19843 (eval $ac_try) 2>&5
19845 echo "$as_me:19845: \$? = $ac_status" >&5
19846 (exit "$ac_status"); }; }; then
19847 cf_cv_mbstate_t=yes
19849 echo "$as_me: failed program was:" >&5
19850 cat "conftest.$ac_ext" >&5
19851 cf_cv_mbstate_t=unknown
19853 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19855 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19857 echo "$as_me:19857: result: $cf_cv_mbstate_t" >&5
19858 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
19860 if test "$cf_cv_mbstate_t" = yes ; then
19862 cat >>confdefs.h <<\EOF
19863 #define NEED_WCHAR_H 1
19869 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
19870 if test "$cf_cv_mbstate_t" = unknown ; then
19871 NCURSES_MBSTATE_T=1
19874 # if we find mbstate_t in either place, use substitution to provide a fallback.
19875 if test "$cf_cv_mbstate_t" != unknown ; then
19876 NCURSES_OK_MBSTATE_T=1
19879 # This is needed on Tru64 5.0 to declare wchar_t
19880 echo "$as_me:19880: checking if we must include wchar.h to declare wchar_t" >&5
19881 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
19882 if test "${cf_cv_wchar_t+set}" = set; then
19883 echo $ECHO_N "(cached) $ECHO_C" >&6
19886 cat >"conftest.$ac_ext" <<_ACEOF
19887 #line 19887 "configure"
19888 #include "confdefs.h"
19890 #include <stdlib.h>
19891 #include <stdarg.h>
19893 #ifdef HAVE_LIBUTF8_H
19894 #include <libutf8.h>
19904 rm -f "conftest.$ac_objext"
19905 if { (eval echo "$as_me:19905: \"$ac_compile\"") >&5
19906 (eval $ac_compile) 2>&5
19908 echo "$as_me:19908: \$? = $ac_status" >&5
19909 (exit "$ac_status"); } &&
19910 { ac_try='test -s "conftest.$ac_objext"'
19911 { (eval echo "$as_me:19911: \"$ac_try\"") >&5
19912 (eval $ac_try) 2>&5
19914 echo "$as_me:19914: \$? = $ac_status" >&5
19915 (exit "$ac_status"); }; }; then
19918 echo "$as_me: failed program was:" >&5
19919 cat "conftest.$ac_ext" >&5
19920 cat >"conftest.$ac_ext" <<_ACEOF
19921 #line 19921 "configure"
19922 #include "confdefs.h"
19924 #include <stdlib.h>
19925 #include <stdarg.h>
19928 #ifdef HAVE_LIBUTF8_H
19929 #include <libutf8.h>
19939 rm -f "conftest.$ac_objext"
19940 if { (eval echo "$as_me:19940: \"$ac_compile\"") >&5
19941 (eval $ac_compile) 2>&5
19943 echo "$as_me:19943: \$? = $ac_status" >&5
19944 (exit "$ac_status"); } &&
19945 { ac_try='test -s "conftest.$ac_objext"'
19946 { (eval echo "$as_me:19946: \"$ac_try\"") >&5
19947 (eval $ac_try) 2>&5
19949 echo "$as_me:19949: \$? = $ac_status" >&5
19950 (exit "$ac_status"); }; }; then
19953 echo "$as_me: failed program was:" >&5
19954 cat "conftest.$ac_ext" >&5
19955 cf_cv_wchar_t=unknown
19957 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19959 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19961 echo "$as_me:19961: result: $cf_cv_wchar_t" >&5
19962 echo "${ECHO_T}$cf_cv_wchar_t" >&6
19964 if test "$cf_cv_wchar_t" = yes ; then
19966 cat >>confdefs.h <<\EOF
19967 #define NEED_WCHAR_H 1
19973 # if we do not find wchar_t in either place, use substitution to provide a fallback.
19974 if test "$cf_cv_wchar_t" = unknown ; then
19978 # if we find wchar_t in either place, use substitution to provide a fallback.
19979 if test "$cf_cv_wchar_t" != unknown ; then
19980 NCURSES_OK_WCHAR_T=1
19983 # This is needed on Tru64 5.0 to declare wint_t
19984 echo "$as_me:19984: checking if we must include wchar.h to declare wint_t" >&5
19985 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
19986 if test "${cf_cv_wint_t+set}" = set; then
19987 echo $ECHO_N "(cached) $ECHO_C" >&6
19990 cat >"conftest.$ac_ext" <<_ACEOF
19991 #line 19991 "configure"
19992 #include "confdefs.h"
19994 #include <stdlib.h>
19995 #include <stdarg.h>
19997 #ifdef HAVE_LIBUTF8_H
19998 #include <libutf8.h>
20008 rm -f "conftest.$ac_objext"
20009 if { (eval echo "$as_me:20009: \"$ac_compile\"") >&5
20010 (eval $ac_compile) 2>&5
20012 echo "$as_me:20012: \$? = $ac_status" >&5
20013 (exit "$ac_status"); } &&
20014 { ac_try='test -s "conftest.$ac_objext"'
20015 { (eval echo "$as_me:20015: \"$ac_try\"") >&5
20016 (eval $ac_try) 2>&5
20018 echo "$as_me:20018: \$? = $ac_status" >&5
20019 (exit "$ac_status"); }; }; then
20022 echo "$as_me: failed program was:" >&5
20023 cat "conftest.$ac_ext" >&5
20024 cat >"conftest.$ac_ext" <<_ACEOF
20025 #line 20025 "configure"
20026 #include "confdefs.h"
20028 #include <stdlib.h>
20029 #include <stdarg.h>
20032 #ifdef HAVE_LIBUTF8_H
20033 #include <libutf8.h>
20043 rm -f "conftest.$ac_objext"
20044 if { (eval echo "$as_me:20044: \"$ac_compile\"") >&5
20045 (eval $ac_compile) 2>&5
20047 echo "$as_me:20047: \$? = $ac_status" >&5
20048 (exit "$ac_status"); } &&
20049 { ac_try='test -s "conftest.$ac_objext"'
20050 { (eval echo "$as_me:20050: \"$ac_try\"") >&5
20051 (eval $ac_try) 2>&5
20053 echo "$as_me:20053: \$? = $ac_status" >&5
20054 (exit "$ac_status"); }; }; then
20057 echo "$as_me: failed program was:" >&5
20058 cat "conftest.$ac_ext" >&5
20059 cf_cv_wint_t=unknown
20061 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20063 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20065 echo "$as_me:20065: result: $cf_cv_wint_t" >&5
20066 echo "${ECHO_T}$cf_cv_wint_t" >&6
20068 if test "$cf_cv_wint_t" = yes ; then
20070 cat >>confdefs.h <<\EOF
20071 #define NEED_WCHAR_H 1
20077 # if we do not find wint_t in either place, use substitution to provide a fallback.
20078 if test "$cf_cv_wint_t" = unknown ; then
20082 # if we find wint_t in either place, use substitution to provide a fallback.
20083 if test "$cf_cv_wint_t" != unknown ; then
20084 NCURSES_OK_WINT_T=1
20087 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
20089 echo "$as_me:20089: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20090 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20091 cat >"conftest.$ac_ext" <<_ACEOF
20092 #line 20092 "configure"
20093 #include "confdefs.h"
20095 #ifndef _XOPEN_SOURCE_EXTENDED
20096 #define _XOPEN_SOURCE_EXTENDED
20098 #include <${cf_cv_ncurses_header:-curses.h}>
20109 rm -f "conftest.$ac_objext"
20110 if { (eval echo "$as_me:20110: \"$ac_compile\"") >&5
20111 (eval $ac_compile) 2>&5
20113 echo "$as_me:20113: \$? = $ac_status" >&5
20114 (exit "$ac_status"); } &&
20115 { ac_try='test -s "conftest.$ac_objext"'
20116 { (eval echo "$as_me:20116: \"$ac_try\"") >&5
20117 (eval $ac_try) 2>&5
20119 echo "$as_me:20119: \$? = $ac_status" >&5
20120 (exit "$ac_status"); }; }; then
20123 echo "$as_me: failed program was:" >&5
20124 cat "conftest.$ac_ext" >&5
20127 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20128 echo "$as_me:20128: result: $cf_result" >&5
20129 echo "${ECHO_T}$cf_result" >&6
20130 if test "$cf_result" = yes ; then
20132 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20134 cat >>confdefs.h <<EOF
20135 #define $cf_result 1
20140 cat >>confdefs.h <<EOF
20141 #define mbstate_t long
20148 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
20150 echo "$as_me:20150: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20151 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20152 cat >"conftest.$ac_ext" <<_ACEOF
20153 #line 20153 "configure"
20154 #include "confdefs.h"
20156 #ifndef _XOPEN_SOURCE_EXTENDED
20157 #define _XOPEN_SOURCE_EXTENDED
20159 #include <${cf_cv_ncurses_header:-curses.h}>
20170 rm -f "conftest.$ac_objext"
20171 if { (eval echo "$as_me:20171: \"$ac_compile\"") >&5
20172 (eval $ac_compile) 2>&5
20174 echo "$as_me:20174: \$? = $ac_status" >&5
20175 (exit "$ac_status"); } &&
20176 { ac_try='test -s "conftest.$ac_objext"'
20177 { (eval echo "$as_me:20177: \"$ac_try\"") >&5
20178 (eval $ac_try) 2>&5
20180 echo "$as_me:20180: \$? = $ac_status" >&5
20181 (exit "$ac_status"); }; }; then
20184 echo "$as_me: failed program was:" >&5
20185 cat "conftest.$ac_ext" >&5
20188 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20189 echo "$as_me:20189: result: $cf_result" >&5
20190 echo "${ECHO_T}$cf_result" >&6
20191 if test "$cf_result" = yes ; then
20193 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20195 cat >>confdefs.h <<EOF
20196 #define $cf_result 1
20201 cat >>confdefs.h <<EOF
20202 #define wchar_t long
20209 if test "$NCURSES_OK_WINT_T" = 0 ; then
20211 echo "$as_me:20211: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20212 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20213 cat >"conftest.$ac_ext" <<_ACEOF
20214 #line 20214 "configure"
20215 #include "confdefs.h"
20217 #ifndef _XOPEN_SOURCE_EXTENDED
20218 #define _XOPEN_SOURCE_EXTENDED
20220 #include <${cf_cv_ncurses_header:-curses.h}>
20231 rm -f "conftest.$ac_objext"
20232 if { (eval echo "$as_me:20232: \"$ac_compile\"") >&5
20233 (eval $ac_compile) 2>&5
20235 echo "$as_me:20235: \$? = $ac_status" >&5
20236 (exit "$ac_status"); } &&
20237 { ac_try='test -s "conftest.$ac_objext"'
20238 { (eval echo "$as_me:20238: \"$ac_try\"") >&5
20239 (eval $ac_try) 2>&5
20241 echo "$as_me:20241: \$? = $ac_status" >&5
20242 (exit "$ac_status"); }; }; then
20245 echo "$as_me: failed program was:" >&5
20246 cat "conftest.$ac_ext" >&5
20249 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20250 echo "$as_me:20250: result: $cf_result" >&5
20251 echo "${ECHO_T}$cf_result" >&6
20252 if test "$cf_result" = yes ; then
20254 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20256 cat >>confdefs.h <<EOF
20257 #define $cf_result 1
20262 cat >>confdefs.h <<EOF
20263 #define wint_t long
20279 echo "$as_me:20279: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
20280 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20282 cat >"conftest.$ac_ext" <<_ACEOF
20283 #line 20283 "configure"
20284 #include "confdefs.h"
20286 #ifdef HAVE_XCURSES
20287 #include <xcurses.h>
20288 char * XCursesProgramName = "test";
20290 #include <${cf_cv_ncurses_header:-curses.h}>
20291 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20292 #include <ncursesw/term.h>
20293 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20294 #include <ncurses/term.h>
20295 #elif defined(HAVE_TERM_H)
20304 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20305 const void *foo = (const void *)($cf_data);
20307 const void *foo = &($cf_data);
20309 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20315 rm -f "conftest.$ac_objext"
20316 if { (eval echo "$as_me:20316: \"$ac_compile\"") >&5
20317 (eval $ac_compile) 2>&5
20319 echo "$as_me:20319: \$? = $ac_status" >&5
20320 (exit "$ac_status"); } &&
20321 { ac_try='test -s "conftest.$ac_objext"'
20322 { (eval echo "$as_me:20322: \"$ac_try\"") >&5
20323 (eval $ac_try) 2>&5
20325 echo "$as_me:20325: \$? = $ac_status" >&5
20326 (exit "$ac_status"); }; }; then
20330 echo "$as_me: failed program was:" >&5
20331 cat "conftest.$ac_ext" >&5
20334 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20335 echo "$as_me:20335: result: $cf_result" >&5
20336 echo "${ECHO_T}$cf_result" >&6
20338 if test "$cf_result" = yes ; then
20340 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20342 cat >>confdefs.h <<EOF
20343 #define $cf_result 1
20347 echo "$as_me:20347: checking for data $cf_data in library" >&5
20348 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
20349 # BSD linkers insist on making weak linkage, but resolve at runtime.
20350 if test "$cross_compiling" = yes; then
20353 cat >"conftest.$ac_ext" <<_ACEOF
20354 #line 20354 "configure"
20355 #include "confdefs.h"
20357 #ifdef HAVE_XCURSES
20358 #include <xcurses.h>
20359 char * XCursesProgramName = "test";
20361 #include <${cf_cv_ncurses_header:-curses.h}>
20362 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20363 #include <ncursesw/term.h>
20364 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20365 #include <ncurses/term.h>
20366 #elif defined(HAVE_TERM_H)
20371 extern char $cf_data;
20378 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20379 const void *foo = (const void *)($cf_data);
20381 const void *foo = &($cf_data);
20383 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20385 ${cf_cv_main_return:-return}(foo == 0);
20392 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20393 if { (eval echo "$as_me:20393: \"$ac_link\"") >&5
20394 (eval $ac_link) 2>&5
20396 echo "$as_me:20396: \$? = $ac_status" >&5
20397 (exit "$ac_status"); } &&
20398 { ac_try='test -s "conftest$ac_exeext"'
20399 { (eval echo "$as_me:20399: \"$ac_try\"") >&5
20400 (eval $ac_try) 2>&5
20402 echo "$as_me:20402: \$? = $ac_status" >&5
20403 (exit "$ac_status"); }; }; then
20406 echo "$as_me: failed program was:" >&5
20407 cat "conftest.$ac_ext" >&5
20410 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20413 cat >"conftest.$ac_ext" <<_ACEOF
20414 #line 20414 "configure"
20415 #include "confdefs.h"
20417 #ifdef HAVE_XCURSES
20418 #include <xcurses.h>
20419 char * XCursesProgramName = "test";
20421 #include <${cf_cv_ncurses_header:-curses.h}>
20422 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20423 #include <ncursesw/term.h>
20424 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20425 #include <ncurses/term.h>
20426 #elif defined(HAVE_TERM_H)
20431 extern char $cf_data;
20435 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20436 const void *foo = (const void *)($cf_data);
20438 const void *foo = &($cf_data);
20440 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20442 ${cf_cv_main_return:-return}(foo == 0);
20445 rm -f "conftest$ac_exeext"
20446 if { (eval echo "$as_me:20446: \"$ac_link\"") >&5
20447 (eval $ac_link) 2>&5
20449 echo "$as_me:20449: \$? = $ac_status" >&5
20450 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20451 { (eval echo "$as_me:20451: \"$ac_try\"") >&5
20452 (eval $ac_try) 2>&5
20454 echo "$as_me:20454: \$? = $ac_status" >&5
20455 (exit "$ac_status"); }; }; then
20459 echo "$as_me: program exited with status $ac_status" >&5
20460 echo "$as_me: failed program was:" >&5
20461 cat "conftest.$ac_ext" >&5
20464 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20466 echo "$as_me:20466: result: $cf_result" >&5
20467 echo "${ECHO_T}$cf_result" >&6
20468 if test "$cf_result" = yes ; then
20470 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20472 cat >>confdefs.h <<EOF
20473 #define $cf_result 1
20476 # do not exit loop here, since we prefer system's declarations
20481 if test -n "$with_screen" && test "x$with_screen" = "xpdcurses"
20483 echo "$as_me:20483: checking for X" >&5
20484 echo $ECHO_N "checking for X... $ECHO_C" >&6
20486 # Check whether --with-x or --without-x was given.
20487 if test "${with_x+set}" = set; then
20491 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
20492 if test "x$with_x" = xno; then
20493 # The user explicitly disabled X.
20496 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
20497 # Both variables are already set.
20500 if test "${ac_cv_have_x+set}" = set; then
20501 echo $ECHO_N "(cached) $ECHO_C" >&6
20503 # One or both of the vars are not set, and there is no cached value.
20504 ac_x_includes=no ac_x_libraries=no
20505 rm -fr conftest.dir
20506 if mkdir conftest.dir; then
20508 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
20509 cat >Imakefile <<'EOF'
20511 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
20513 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
20514 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
20515 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
20516 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
20517 for ac_extension in a so sl dylib dll; do
20518 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
20519 test -f "$ac_im_libdir/libX11.$ac_extension"; then
20520 ac_im_usrlibdir=$ac_im_libdir; break
20523 # Screen out bogus values from the imake configuration. They are
20524 # bogus both because they are the default anyway, and because
20525 # using them would break gcc on systems where it needs fixed includes.
20526 case $ac_im_incroot in
20528 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
20530 case $ac_im_usrlibdir in
20531 /usr/lib | /lib) ;;
20532 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
20536 rm -fr conftest.dir
20539 # Standard set of common directories for X headers.
20540 # Check X11 before X11Rn because it is often a symlink to the current release.
20557 /usr/local/X11/include
20558 /usr/local/X11R7/include
20559 /usr/local/X11R6/include
20560 /usr/local/X11R5/include
20561 /usr/local/X11R4/include
20563 /usr/local/include/X11
20564 /usr/local/include/X11R7
20565 /usr/local/include/X11R6
20566 /usr/local/include/X11R5
20567 /usr/local/include/X11R4
20571 /usr/XFree86/include/X11
20575 /usr/unsupported/include
20576 /usr/athena/include
20577 /usr/local/x11r5/include
20578 /usr/lpp/Xamples/include
20580 /usr/openwin/include
20581 /usr/openwin/share/include'
20583 if test "$ac_x_includes" = no; then
20584 # Guess where to find include files, by looking for Intrinsic.h.
20585 # First, try using that file with no special directory specified.
20586 cat >"conftest.$ac_ext" <<_ACEOF
20587 #line 20587 "configure"
20588 #include "confdefs.h"
20589 #include <X11/Intrinsic.h>
20591 if { (eval echo "$as_me:20591: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20592 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20594 $EGREP -v '^ *\+' conftest.er1 >conftest.err
20596 cat conftest.err >&5
20597 echo "$as_me:20597: \$? = $ac_status" >&5
20598 (exit "$ac_status"); } >/dev/null; then
20599 if test -s conftest.err; then
20600 ac_cpp_err=$ac_c_preproc_warn_flag
20607 if test -z "$ac_cpp_err"; then
20608 # We can compile using X headers with no special include directory.
20611 echo "$as_me: failed program was:" >&5
20612 cat "conftest.$ac_ext" >&5
20613 for ac_dir in $ac_x_header_dirs; do
20614 if test -r "$ac_dir/X11/Intrinsic.h"; then
20615 ac_x_includes=$ac_dir
20620 rm -f conftest.err "conftest.$ac_ext"
20621 fi # $ac_x_includes = no
20623 if test "$ac_x_libraries" = no; then
20624 # Check for the libraries.
20625 # See if we find them without any special options.
20626 # Don't add to $LIBS permanently.
20629 cat >"conftest.$ac_ext" <<_ACEOF
20630 #line 20630 "configure"
20631 #include "confdefs.h"
20632 #include <X11/Intrinsic.h>
20641 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20642 if { (eval echo "$as_me:20642: \"$ac_link\"") >&5
20643 (eval $ac_link) 2>&5
20645 echo "$as_me:20645: \$? = $ac_status" >&5
20646 (exit "$ac_status"); } &&
20647 { ac_try='test -s "conftest$ac_exeext"'
20648 { (eval echo "$as_me:20648: \"$ac_try\"") >&5
20649 (eval $ac_try) 2>&5
20651 echo "$as_me:20651: \$? = $ac_status" >&5
20652 (exit "$ac_status"); }; }; then
20654 # We can link X programs with no special library path.
20657 echo "$as_me: failed program was:" >&5
20658 cat "conftest.$ac_ext" >&5
20660 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
20662 # Don't even attempt the hair of trying to link an X program!
20663 for ac_extension in a so sl dylib dll; do
20664 if test -r "$ac_dir/libXt.$ac_extension"; then
20665 ac_x_libraries=$ac_dir
20671 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20672 fi # $ac_x_libraries = no
20674 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
20675 # Didn't find X anywhere. Cache the known absence of X.
20676 ac_cv_have_x="have_x=no"
20678 # Record where we found X for the cache.
20679 ac_cv_have_x="have_x=yes \
20680 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
20685 eval "$ac_cv_have_x"
20688 if test "$have_x" != yes; then
20689 echo "$as_me:20689: result: $have_x" >&5
20690 echo "${ECHO_T}$have_x" >&6
20693 # If each of the values was on the command line, it overrides each guess.
20694 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
20695 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
20696 # Update the cache value to reflect the command line values.
20697 ac_cv_have_x="have_x=yes \
20698 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
20699 echo "$as_me:20699: result: libraries $x_libraries, headers $x_includes" >&5
20700 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
20703 if test "$no_x" = yes; then
20704 # Not all programs may use this symbol, but it does not hurt to define it.
20706 cat >>confdefs.h <<\EOF
20707 #define X_DISPLAY_MISSING 1
20715 if test -n "$x_includes"; then
20716 X_CFLAGS="$X_CFLAGS -I$x_includes"
20719 # It would also be nice to do this for all -L options, not just this one.
20720 if test -n "$x_libraries"; then
20721 X_LIBS="$X_LIBS -L$x_libraries"
20722 # For Solaris; some versions of Sun CC require a space after -R and
20723 # others require no space. Words are not sufficient . . . .
20724 case `(uname -sr) 2>/dev/null` in
20726 echo "$as_me:20726: checking whether -R must be followed by a space" >&5
20727 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
20728 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
20729 cat >"conftest.$ac_ext" <<_ACEOF
20730 #line 20730 "configure"
20731 #include "confdefs.h"
20741 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20742 if { (eval echo "$as_me:20742: \"$ac_link\"") >&5
20743 (eval $ac_link) 2>&5
20745 echo "$as_me:20745: \$? = $ac_status" >&5
20746 (exit "$ac_status"); } &&
20747 { ac_try='test -s "conftest$ac_exeext"'
20748 { (eval echo "$as_me:20748: \"$ac_try\"") >&5
20749 (eval $ac_try) 2>&5
20751 echo "$as_me:20751: \$? = $ac_status" >&5
20752 (exit "$ac_status"); }; }; then
20755 echo "$as_me: failed program was:" >&5
20756 cat "conftest.$ac_ext" >&5
20759 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20760 if test $ac_R_nospace = yes; then
20761 echo "$as_me:20761: result: no" >&5
20762 echo "${ECHO_T}no" >&6
20763 X_LIBS="$X_LIBS -R$x_libraries"
20765 LIBS="$ac_xsave_LIBS -R $x_libraries"
20766 cat >"conftest.$ac_ext" <<_ACEOF
20767 #line 20767 "configure"
20768 #include "confdefs.h"
20778 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20779 if { (eval echo "$as_me:20779: \"$ac_link\"") >&5
20780 (eval $ac_link) 2>&5
20782 echo "$as_me:20782: \$? = $ac_status" >&5
20783 (exit "$ac_status"); } &&
20784 { ac_try='test -s "conftest$ac_exeext"'
20785 { (eval echo "$as_me:20785: \"$ac_try\"") >&5
20786 (eval $ac_try) 2>&5
20788 echo "$as_me:20788: \$? = $ac_status" >&5
20789 (exit "$ac_status"); }; }; then
20792 echo "$as_me: failed program was:" >&5
20793 cat "conftest.$ac_ext" >&5
20796 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20797 if test $ac_R_space = yes; then
20798 echo "$as_me:20798: result: yes" >&5
20799 echo "${ECHO_T}yes" >&6
20800 X_LIBS="$X_LIBS -R $x_libraries"
20802 echo "$as_me:20802: result: neither works" >&5
20803 echo "${ECHO_T}neither works" >&6
20806 LIBS=$ac_xsave_LIBS
20810 # Check for system-dependent libraries X programs must link with.
20811 # Do this before checking for the system-independent R6 libraries
20812 # (-lICE), since we may need -lsocket or whatever for X linking.
20814 if test "$ISC" = yes; then
20815 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
20817 # Martyn Johnson says this is needed for Ultrix, if the X
20818 # libraries were built with DECnet support. And Karl Berry says
20819 # the Alpha needs dnet_stub (dnet does not exist).
20820 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
20821 cat >"conftest.$ac_ext" <<_ACEOF
20822 #line 20822 "configure"
20823 #include "confdefs.h"
20825 /* Override any gcc2 internal prototype to avoid an error. */
20829 /* We use char because int might match the return type of a gcc2
20830 builtin and then its argument prototype would still apply. */
20831 char XOpenDisplay ();
20840 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20841 if { (eval echo "$as_me:20841: \"$ac_link\"") >&5
20842 (eval $ac_link) 2>&5
20844 echo "$as_me:20844: \$? = $ac_status" >&5
20845 (exit "$ac_status"); } &&
20846 { ac_try='test -s "conftest$ac_exeext"'
20847 { (eval echo "$as_me:20847: \"$ac_try\"") >&5
20848 (eval $ac_try) 2>&5
20850 echo "$as_me:20850: \$? = $ac_status" >&5
20851 (exit "$ac_status"); }; }; then
20854 echo "$as_me: failed program was:" >&5
20855 cat "conftest.$ac_ext" >&5
20856 echo "$as_me:20856: checking for dnet_ntoa in -ldnet" >&5
20857 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
20858 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
20859 echo $ECHO_N "(cached) $ECHO_C" >&6
20861 ac_check_lib_save_LIBS=$LIBS
20862 LIBS="-ldnet $LIBS"
20863 cat >"conftest.$ac_ext" <<_ACEOF
20864 #line 20864 "configure"
20865 #include "confdefs.h"
20867 /* Override any gcc2 internal prototype to avoid an error. */
20871 /* We use char because int might match the return type of a gcc2
20872 builtin and then its argument prototype would still apply. */
20882 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20883 if { (eval echo "$as_me:20883: \"$ac_link\"") >&5
20884 (eval $ac_link) 2>&5
20886 echo "$as_me:20886: \$? = $ac_status" >&5
20887 (exit "$ac_status"); } &&
20888 { ac_try='test -s "conftest$ac_exeext"'
20889 { (eval echo "$as_me:20889: \"$ac_try\"") >&5
20890 (eval $ac_try) 2>&5
20892 echo "$as_me:20892: \$? = $ac_status" >&5
20893 (exit "$ac_status"); }; }; then
20894 ac_cv_lib_dnet_dnet_ntoa=yes
20896 echo "$as_me: failed program was:" >&5
20897 cat "conftest.$ac_ext" >&5
20898 ac_cv_lib_dnet_dnet_ntoa=no
20900 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20901 LIBS=$ac_check_lib_save_LIBS
20903 echo "$as_me:20903: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
20904 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
20905 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
20906 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
20909 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
20910 echo "$as_me:20910: checking for dnet_ntoa in -ldnet_stub" >&5
20911 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
20912 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
20913 echo $ECHO_N "(cached) $ECHO_C" >&6
20915 ac_check_lib_save_LIBS=$LIBS
20916 LIBS="-ldnet_stub $LIBS"
20917 cat >"conftest.$ac_ext" <<_ACEOF
20918 #line 20918 "configure"
20919 #include "confdefs.h"
20921 /* Override any gcc2 internal prototype to avoid an error. */
20925 /* We use char because int might match the return type of a gcc2
20926 builtin and then its argument prototype would still apply. */
20936 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20937 if { (eval echo "$as_me:20937: \"$ac_link\"") >&5
20938 (eval $ac_link) 2>&5
20940 echo "$as_me:20940: \$? = $ac_status" >&5
20941 (exit "$ac_status"); } &&
20942 { ac_try='test -s "conftest$ac_exeext"'
20943 { (eval echo "$as_me:20943: \"$ac_try\"") >&5
20944 (eval $ac_try) 2>&5
20946 echo "$as_me:20946: \$? = $ac_status" >&5
20947 (exit "$ac_status"); }; }; then
20948 ac_cv_lib_dnet_stub_dnet_ntoa=yes
20950 echo "$as_me: failed program was:" >&5
20951 cat "conftest.$ac_ext" >&5
20952 ac_cv_lib_dnet_stub_dnet_ntoa=no
20954 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20955 LIBS=$ac_check_lib_save_LIBS
20957 echo "$as_me:20957: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
20958 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
20959 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
20960 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
20965 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20966 LIBS="$ac_xsave_LIBS"
20968 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
20969 # to get the SysV transport functions.
20970 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
20972 # The nsl library prevents programs from opening the X display
20973 # on Irix 5.2, according to T.E. Dickey.
20974 # The functions gethostbyname, getservbyname, and inet_addr are
20975 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
20976 echo "$as_me:20976: checking for gethostbyname" >&5
20977 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
20978 if test "${ac_cv_func_gethostbyname+set}" = set; then
20979 echo $ECHO_N "(cached) $ECHO_C" >&6
20981 cat >"conftest.$ac_ext" <<_ACEOF
20982 #line 20982 "configure"
20983 #include "confdefs.h"
20984 #define gethostbyname autoconf_temporary
20985 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
20986 #undef gethostbyname
20992 /* We use char because int might match the return type of a gcc2
20993 builtin and then its argument prototype would still apply. */
20994 char gethostbyname (void);
21000 /* The GNU C library defines stubs for functions which it implements
21001 to always fail with ENOSYS. Some functions are actually named
21002 something starting with __ and the normal name is an alias. */
21003 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
21004 #error found stub for gethostbyname
21007 return gethostbyname ();
21012 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21013 if { (eval echo "$as_me:21013: \"$ac_link\"") >&5
21014 (eval $ac_link) 2>&5
21016 echo "$as_me:21016: \$? = $ac_status" >&5
21017 (exit "$ac_status"); } &&
21018 { ac_try='test -s "conftest$ac_exeext"'
21019 { (eval echo "$as_me:21019: \"$ac_try\"") >&5
21020 (eval $ac_try) 2>&5
21022 echo "$as_me:21022: \$? = $ac_status" >&5
21023 (exit "$ac_status"); }; }; then
21024 ac_cv_func_gethostbyname=yes
21026 echo "$as_me: failed program was:" >&5
21027 cat "conftest.$ac_ext" >&5
21028 ac_cv_func_gethostbyname=no
21030 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21032 echo "$as_me:21032: result: $ac_cv_func_gethostbyname" >&5
21033 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
21035 if test $ac_cv_func_gethostbyname = no; then
21036 echo "$as_me:21036: checking for gethostbyname in -lnsl" >&5
21037 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
21038 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
21039 echo $ECHO_N "(cached) $ECHO_C" >&6
21041 ac_check_lib_save_LIBS=$LIBS
21043 cat >"conftest.$ac_ext" <<_ACEOF
21044 #line 21044 "configure"
21045 #include "confdefs.h"
21047 /* Override any gcc2 internal prototype to avoid an error. */
21051 /* We use char because int might match the return type of a gcc2
21052 builtin and then its argument prototype would still apply. */
21053 char gethostbyname ();
21062 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21063 if { (eval echo "$as_me:21063: \"$ac_link\"") >&5
21064 (eval $ac_link) 2>&5
21066 echo "$as_me:21066: \$? = $ac_status" >&5
21067 (exit "$ac_status"); } &&
21068 { ac_try='test -s "conftest$ac_exeext"'
21069 { (eval echo "$as_me:21069: \"$ac_try\"") >&5
21070 (eval $ac_try) 2>&5
21072 echo "$as_me:21072: \$? = $ac_status" >&5
21073 (exit "$ac_status"); }; }; then
21074 ac_cv_lib_nsl_gethostbyname=yes
21076 echo "$as_me: failed program was:" >&5
21077 cat "conftest.$ac_ext" >&5
21078 ac_cv_lib_nsl_gethostbyname=no
21080 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21081 LIBS=$ac_check_lib_save_LIBS
21083 echo "$as_me:21083: result: $ac_cv_lib_nsl_gethostbyname" >&5
21084 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
21085 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
21086 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
21089 if test $ac_cv_lib_nsl_gethostbyname = no; then
21090 echo "$as_me:21090: checking for gethostbyname in -lbsd" >&5
21091 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
21092 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
21093 echo $ECHO_N "(cached) $ECHO_C" >&6
21095 ac_check_lib_save_LIBS=$LIBS
21097 cat >"conftest.$ac_ext" <<_ACEOF
21098 #line 21098 "configure"
21099 #include "confdefs.h"
21101 /* Override any gcc2 internal prototype to avoid an error. */
21105 /* We use char because int might match the return type of a gcc2
21106 builtin and then its argument prototype would still apply. */
21107 char gethostbyname ();
21116 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21117 if { (eval echo "$as_me:21117: \"$ac_link\"") >&5
21118 (eval $ac_link) 2>&5
21120 echo "$as_me:21120: \$? = $ac_status" >&5
21121 (exit "$ac_status"); } &&
21122 { ac_try='test -s "conftest$ac_exeext"'
21123 { (eval echo "$as_me:21123: \"$ac_try\"") >&5
21124 (eval $ac_try) 2>&5
21126 echo "$as_me:21126: \$? = $ac_status" >&5
21127 (exit "$ac_status"); }; }; then
21128 ac_cv_lib_bsd_gethostbyname=yes
21130 echo "$as_me: failed program was:" >&5
21131 cat "conftest.$ac_ext" >&5
21132 ac_cv_lib_bsd_gethostbyname=no
21134 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21135 LIBS=$ac_check_lib_save_LIBS
21137 echo "$as_me:21137: result: $ac_cv_lib_bsd_gethostbyname" >&5
21138 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
21139 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
21140 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
21146 # lieder@skyler.mavd.honeywell.com says without -lsocket,
21147 # socket/setsockopt and other routines are undefined under SCO ODT
21148 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
21149 # on later versions), says Simon Leinen: it contains gethostby*
21150 # variants that don't use the nameserver (or something). -lsocket
21151 # must be given before -lnsl if both are needed. We assume that
21152 # if connect needs -lnsl, so does gethostbyname.
21153 echo "$as_me:21153: checking for connect" >&5
21154 echo $ECHO_N "checking for connect... $ECHO_C" >&6
21155 if test "${ac_cv_func_connect+set}" = set; then
21156 echo $ECHO_N "(cached) $ECHO_C" >&6
21158 cat >"conftest.$ac_ext" <<_ACEOF
21159 #line 21159 "configure"
21160 #include "confdefs.h"
21161 #define connect autoconf_temporary
21162 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21169 /* We use char because int might match the return type of a gcc2
21170 builtin and then its argument prototype would still apply. */
21171 char connect (void);
21177 /* The GNU C library defines stubs for functions which it implements
21178 to always fail with ENOSYS. Some functions are actually named
21179 something starting with __ and the normal name is an alias. */
21180 #if defined (__stub_connect) || defined (__stub___connect)
21181 #error found stub for connect
21189 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21190 if { (eval echo "$as_me:21190: \"$ac_link\"") >&5
21191 (eval $ac_link) 2>&5
21193 echo "$as_me:21193: \$? = $ac_status" >&5
21194 (exit "$ac_status"); } &&
21195 { ac_try='test -s "conftest$ac_exeext"'
21196 { (eval echo "$as_me:21196: \"$ac_try\"") >&5
21197 (eval $ac_try) 2>&5
21199 echo "$as_me:21199: \$? = $ac_status" >&5
21200 (exit "$ac_status"); }; }; then
21201 ac_cv_func_connect=yes
21203 echo "$as_me: failed program was:" >&5
21204 cat "conftest.$ac_ext" >&5
21205 ac_cv_func_connect=no
21207 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21209 echo "$as_me:21209: result: $ac_cv_func_connect" >&5
21210 echo "${ECHO_T}$ac_cv_func_connect" >&6
21212 if test $ac_cv_func_connect = no; then
21213 echo "$as_me:21213: checking for connect in -lsocket" >&5
21214 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
21215 if test "${ac_cv_lib_socket_connect+set}" = set; then
21216 echo $ECHO_N "(cached) $ECHO_C" >&6
21218 ac_check_lib_save_LIBS=$LIBS
21219 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
21220 cat >"conftest.$ac_ext" <<_ACEOF
21221 #line 21221 "configure"
21222 #include "confdefs.h"
21224 /* Override any gcc2 internal prototype to avoid an error. */
21228 /* We use char because int might match the return type of a gcc2
21229 builtin and then its argument prototype would still apply. */
21239 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21240 if { (eval echo "$as_me:21240: \"$ac_link\"") >&5
21241 (eval $ac_link) 2>&5
21243 echo "$as_me:21243: \$? = $ac_status" >&5
21244 (exit "$ac_status"); } &&
21245 { ac_try='test -s "conftest$ac_exeext"'
21246 { (eval echo "$as_me:21246: \"$ac_try\"") >&5
21247 (eval $ac_try) 2>&5
21249 echo "$as_me:21249: \$? = $ac_status" >&5
21250 (exit "$ac_status"); }; }; then
21251 ac_cv_lib_socket_connect=yes
21253 echo "$as_me: failed program was:" >&5
21254 cat "conftest.$ac_ext" >&5
21255 ac_cv_lib_socket_connect=no
21257 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21258 LIBS=$ac_check_lib_save_LIBS
21260 echo "$as_me:21260: result: $ac_cv_lib_socket_connect" >&5
21261 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
21262 if test "$ac_cv_lib_socket_connect" = yes; then
21263 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
21268 # Guillermo Gomez says -lposix is necessary on A/UX.
21269 echo "$as_me:21269: checking for remove" >&5
21270 echo $ECHO_N "checking for remove... $ECHO_C" >&6
21271 if test "${ac_cv_func_remove+set}" = set; then
21272 echo $ECHO_N "(cached) $ECHO_C" >&6
21274 cat >"conftest.$ac_ext" <<_ACEOF
21275 #line 21275 "configure"
21276 #include "confdefs.h"
21277 #define remove autoconf_temporary
21278 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21285 /* We use char because int might match the return type of a gcc2
21286 builtin and then its argument prototype would still apply. */
21287 char remove (void);
21293 /* The GNU C library defines stubs for functions which it implements
21294 to always fail with ENOSYS. Some functions are actually named
21295 something starting with __ and the normal name is an alias. */
21296 #if defined (__stub_remove) || defined (__stub___remove)
21297 #error found stub for remove
21305 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21306 if { (eval echo "$as_me:21306: \"$ac_link\"") >&5
21307 (eval $ac_link) 2>&5
21309 echo "$as_me:21309: \$? = $ac_status" >&5
21310 (exit "$ac_status"); } &&
21311 { ac_try='test -s "conftest$ac_exeext"'
21312 { (eval echo "$as_me:21312: \"$ac_try\"") >&5
21313 (eval $ac_try) 2>&5
21315 echo "$as_me:21315: \$? = $ac_status" >&5
21316 (exit "$ac_status"); }; }; then
21317 ac_cv_func_remove=yes
21319 echo "$as_me: failed program was:" >&5
21320 cat "conftest.$ac_ext" >&5
21321 ac_cv_func_remove=no
21323 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21325 echo "$as_me:21325: result: $ac_cv_func_remove" >&5
21326 echo "${ECHO_T}$ac_cv_func_remove" >&6
21328 if test $ac_cv_func_remove = no; then
21329 echo "$as_me:21329: checking for remove in -lposix" >&5
21330 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
21331 if test "${ac_cv_lib_posix_remove+set}" = set; then
21332 echo $ECHO_N "(cached) $ECHO_C" >&6
21334 ac_check_lib_save_LIBS=$LIBS
21335 LIBS="-lposix $LIBS"
21336 cat >"conftest.$ac_ext" <<_ACEOF
21337 #line 21337 "configure"
21338 #include "confdefs.h"
21340 /* Override any gcc2 internal prototype to avoid an error. */
21344 /* We use char because int might match the return type of a gcc2
21345 builtin and then its argument prototype would still apply. */
21355 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21356 if { (eval echo "$as_me:21356: \"$ac_link\"") >&5
21357 (eval $ac_link) 2>&5
21359 echo "$as_me:21359: \$? = $ac_status" >&5
21360 (exit "$ac_status"); } &&
21361 { ac_try='test -s "conftest$ac_exeext"'
21362 { (eval echo "$as_me:21362: \"$ac_try\"") >&5
21363 (eval $ac_try) 2>&5
21365 echo "$as_me:21365: \$? = $ac_status" >&5
21366 (exit "$ac_status"); }; }; then
21367 ac_cv_lib_posix_remove=yes
21369 echo "$as_me: failed program was:" >&5
21370 cat "conftest.$ac_ext" >&5
21371 ac_cv_lib_posix_remove=no
21373 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21374 LIBS=$ac_check_lib_save_LIBS
21376 echo "$as_me:21376: result: $ac_cv_lib_posix_remove" >&5
21377 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
21378 if test "$ac_cv_lib_posix_remove" = yes; then
21379 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
21384 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
21385 echo "$as_me:21385: checking for shmat" >&5
21386 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
21387 if test "${ac_cv_func_shmat+set}" = set; then
21388 echo $ECHO_N "(cached) $ECHO_C" >&6
21390 cat >"conftest.$ac_ext" <<_ACEOF
21391 #line 21391 "configure"
21392 #include "confdefs.h"
21393 #define shmat autoconf_temporary
21394 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21401 /* We use char because int might match the return type of a gcc2
21402 builtin and then its argument prototype would still apply. */
21409 /* The GNU C library defines stubs for functions which it implements
21410 to always fail with ENOSYS. Some functions are actually named
21411 something starting with __ and the normal name is an alias. */
21412 #if defined (__stub_shmat) || defined (__stub___shmat)
21413 #error found stub for shmat
21421 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21422 if { (eval echo "$as_me:21422: \"$ac_link\"") >&5
21423 (eval $ac_link) 2>&5
21425 echo "$as_me:21425: \$? = $ac_status" >&5
21426 (exit "$ac_status"); } &&
21427 { ac_try='test -s "conftest$ac_exeext"'
21428 { (eval echo "$as_me:21428: \"$ac_try\"") >&5
21429 (eval $ac_try) 2>&5
21431 echo "$as_me:21431: \$? = $ac_status" >&5
21432 (exit "$ac_status"); }; }; then
21433 ac_cv_func_shmat=yes
21435 echo "$as_me: failed program was:" >&5
21436 cat "conftest.$ac_ext" >&5
21437 ac_cv_func_shmat=no
21439 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21441 echo "$as_me:21441: result: $ac_cv_func_shmat" >&5
21442 echo "${ECHO_T}$ac_cv_func_shmat" >&6
21444 if test $ac_cv_func_shmat = no; then
21445 echo "$as_me:21445: checking for shmat in -lipc" >&5
21446 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
21447 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
21448 echo $ECHO_N "(cached) $ECHO_C" >&6
21450 ac_check_lib_save_LIBS=$LIBS
21452 cat >"conftest.$ac_ext" <<_ACEOF
21453 #line 21453 "configure"
21454 #include "confdefs.h"
21456 /* Override any gcc2 internal prototype to avoid an error. */
21460 /* We use char because int might match the return type of a gcc2
21461 builtin and then its argument prototype would still apply. */
21471 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21472 if { (eval echo "$as_me:21472: \"$ac_link\"") >&5
21473 (eval $ac_link) 2>&5
21475 echo "$as_me:21475: \$? = $ac_status" >&5
21476 (exit "$ac_status"); } &&
21477 { ac_try='test -s "conftest$ac_exeext"'
21478 { (eval echo "$as_me:21478: \"$ac_try\"") >&5
21479 (eval $ac_try) 2>&5
21481 echo "$as_me:21481: \$? = $ac_status" >&5
21482 (exit "$ac_status"); }; }; then
21483 ac_cv_lib_ipc_shmat=yes
21485 echo "$as_me: failed program was:" >&5
21486 cat "conftest.$ac_ext" >&5
21487 ac_cv_lib_ipc_shmat=no
21489 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21490 LIBS=$ac_check_lib_save_LIBS
21492 echo "$as_me:21492: result: $ac_cv_lib_ipc_shmat" >&5
21493 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
21494 if test "$ac_cv_lib_ipc_shmat" = yes; then
21495 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
21501 # Check for libraries that X11R6 Xt/Xaw programs need.
21502 ac_save_LDFLAGS=$LDFLAGS
21503 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
21504 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
21505 # check for ICE first), but we must link in the order -lSM -lICE or
21506 # we get undefined symbols. So assume we have SM if we have ICE.
21507 # These have to be linked with before -lX11, unlike the other
21508 # libraries we check for below, so use a different variable.
21509 # John Interrante, Karl Berry
21510 echo "$as_me:21510: checking for IceConnectionNumber in -lICE" >&5
21511 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
21512 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
21513 echo $ECHO_N "(cached) $ECHO_C" >&6
21515 ac_check_lib_save_LIBS=$LIBS
21516 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
21517 cat >"conftest.$ac_ext" <<_ACEOF
21518 #line 21518 "configure"
21519 #include "confdefs.h"
21521 /* Override any gcc2 internal prototype to avoid an error. */
21525 /* We use char because int might match the return type of a gcc2
21526 builtin and then its argument prototype would still apply. */
21527 char IceConnectionNumber ();
21531 IceConnectionNumber ();
21536 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21537 if { (eval echo "$as_me:21537: \"$ac_link\"") >&5
21538 (eval $ac_link) 2>&5
21540 echo "$as_me:21540: \$? = $ac_status" >&5
21541 (exit "$ac_status"); } &&
21542 { ac_try='test -s "conftest$ac_exeext"'
21543 { (eval echo "$as_me:21543: \"$ac_try\"") >&5
21544 (eval $ac_try) 2>&5
21546 echo "$as_me:21546: \$? = $ac_status" >&5
21547 (exit "$ac_status"); }; }; then
21548 ac_cv_lib_ICE_IceConnectionNumber=yes
21550 echo "$as_me: failed program was:" >&5
21551 cat "conftest.$ac_ext" >&5
21552 ac_cv_lib_ICE_IceConnectionNumber=no
21554 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21555 LIBS=$ac_check_lib_save_LIBS
21557 echo "$as_me:21557: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
21558 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
21559 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
21560 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
21563 LDFLAGS=$ac_save_LDFLAGS
21569 if test "$GCC" = yes || test "$GXX" = yes
21572 if test "$GCC" = yes || test "$GXX" = yes
21576 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
21578 echo "${as_me:-configure}:21578: testing repairing CFLAGS: $CFLAGS ..." 1>&5
21581 for cf_temp_scan in $CFLAGS
21583 case "x$cf_temp_scan" in
21586 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
21587 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
21592 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
21593 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
21598 CFLAGS="$cf_temp_flags"
21599 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
21601 echo "${as_me:-configure}:21601: testing ... fixed $CFLAGS ..." 1>&5
21603 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
21605 echo "${as_me:-configure}:21605: testing ... extra $EXTRA_CFLAGS ..." 1>&5
21611 if test "$GCC" = yes || test "$GXX" = yes
21615 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
21617 echo "${as_me:-configure}:21617: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
21620 for cf_temp_scan in $CPPFLAGS
21622 case "x$cf_temp_scan" in
21625 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
21626 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
21631 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
21632 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
21637 CPPFLAGS="$cf_temp_flags"
21638 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
21640 echo "${as_me:-configure}:21640: testing ... fixed $CPPFLAGS ..." 1>&5
21642 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
21644 echo "${as_me:-configure}:21644: testing ... extra $EXTRA_CFLAGS ..." 1>&5
21650 if test "$GCC" = yes || test "$GXX" = yes
21654 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
21656 echo "${as_me:-configure}:21656: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
21659 for cf_temp_scan in $LDFLAGS
21661 case "x$cf_temp_scan" in
21664 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
21665 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
21670 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
21671 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
21676 LDFLAGS="$cf_temp_flags"
21677 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
21679 echo "${as_me:-configure}:21679: testing ... fixed $LDFLAGS ..." 1>&5
21681 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
21683 echo "${as_me:-configure}:21683: testing ... extra $EXTRA_CFLAGS ..." 1>&5
21689 echo "$as_me:21689: checking if you want to turn on gcc warnings" >&5
21690 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
21692 # Check whether --enable-warnings or --disable-warnings was given.
21693 if test "${enable_warnings+set}" = set; then
21694 enableval="$enable_warnings"
21695 test "$enableval" != yes && enableval=no
21696 if test "$enableval" != "no" ; then
21697 enable_warnings=yes
21706 echo "$as_me:21706: result: $enable_warnings" >&5
21707 echo "${ECHO_T}$enable_warnings" >&6
21708 if test "$enable_warnings" = "yes"
21711 if test "$GCC" = yes || test "$GXX" = yes
21713 cat > conftest.i <<EOF
21715 #define GCC_PRINTF 0
21718 #define GCC_SCANF 0
21720 #ifndef GCC_NORETURN
21721 #define GCC_NORETURN /* nothing */
21724 #define GCC_UNUSED /* nothing */
21727 if test "$GCC" = yes
21729 { echo "$as_me:21729: checking for $CC __attribute__ directives..." >&5
21730 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
21731 cat > "conftest.$ac_ext" <<EOF
21732 #line 21732 "${as_me:-configure}"
21733 #include "confdefs.h"
21734 #include "conftest.h"
21735 #include "conftest.i"
21737 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
21739 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
21742 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
21744 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
21746 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
21747 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
21748 extern GCC_NORETURN void foo(void);
21749 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
21751 cf_printf_attribute=no
21752 cf_scanf_attribute=no
21753 for cf_attribute in scanf printf unused noreturn
21756 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21758 cf_directive="__attribute__(($cf_attribute))"
21759 echo "checking for $CC $cf_directive" 1>&5
21761 case "$cf_attribute" in
21763 cf_printf_attribute=yes
21764 cat >conftest.h <<EOF
21765 #define GCC_$cf_ATTRIBUTE 1
21769 cf_scanf_attribute=yes
21770 cat >conftest.h <<EOF
21771 #define GCC_$cf_ATTRIBUTE 1
21775 cat >conftest.h <<EOF
21776 #define GCC_$cf_ATTRIBUTE $cf_directive
21781 if { (eval echo "$as_me:21781: \"$ac_compile\"") >&5
21782 (eval $ac_compile) 2>&5
21784 echo "$as_me:21784: \$? = $ac_status" >&5
21785 (exit "$ac_status"); }; then
21786 test -n "$verbose" && echo "$as_me:21786: result: ... $cf_attribute" >&5
21787 echo "${ECHO_T}... $cf_attribute" >&6
21788 cat conftest.h >>confdefs.h
21789 case "$cf_attribute" in
21792 cat >>confdefs.h <<EOF
21793 #define GCC_NORETURN $cf_directive
21798 cf_value='/* nothing */'
21799 if test "$cf_printf_attribute" != no ; then
21800 cf_value='__attribute__((format(printf,fmt,var)))'
21802 cat >>confdefs.h <<\EOF
21803 #define GCC_PRINTF 1
21808 cat >>confdefs.h <<EOF
21809 #define GCC_PRINTFLIKE(fmt,var) $cf_value
21814 cf_value='/* nothing */'
21815 if test "$cf_scanf_attribute" != no ; then
21816 cf_value='__attribute__((format(scanf,fmt,var)))'
21818 cat >>confdefs.h <<\EOF
21819 #define GCC_SCANF 1
21824 cat >>confdefs.h <<EOF
21825 #define GCC_SCANFLIKE(fmt,var) $cf_value
21831 cat >>confdefs.h <<EOF
21832 #define GCC_UNUSED $cf_directive
21840 ${FGREP-fgrep} define conftest.i >>confdefs.h
21845 if test "x$have_x" = xyes; then
21847 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
21848 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
21849 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
21850 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
21851 for cf_X_CFLAGS in $X_CFLAGS
21853 case "x$cf_X_CFLAGS" in
21855 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
21858 CFLAGS="$CFLAGS $cf_X_CFLAGS"
21863 cat >"conftest.$ac_ext" <<_ACEOF
21864 #line 21864 "configure"
21865 #include "confdefs.h"
21867 #include <stdlib.h>
21868 #include <X11/Intrinsic.h>
21873 String foo = malloc(1); free((void*)foo)
21878 rm -f "conftest.$ac_objext"
21879 if { (eval echo "$as_me:21879: \"$ac_compile\"") >&5
21880 (eval $ac_compile) 2>&5
21882 echo "$as_me:21882: \$? = $ac_status" >&5
21883 (exit "$ac_status"); } &&
21884 { ac_try='test -s "conftest.$ac_objext"'
21885 { (eval echo "$as_me:21885: \"$ac_try\"") >&5
21886 (eval $ac_try) 2>&5
21888 echo "$as_me:21888: \$? = $ac_status" >&5
21889 (exit "$ac_status"); }; }; then
21891 echo "$as_me:21891: checking for X11/Xt const-feature" >&5
21892 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
21893 if test "${cf_cv_const_x_string+set}" = set; then
21894 echo $ECHO_N "(cached) $ECHO_C" >&6
21897 cat >"conftest.$ac_ext" <<_ACEOF
21898 #line 21898 "configure"
21899 #include "confdefs.h"
21901 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
21902 #undef XTSTRINGDEFINES /* X11R5 and later */
21903 #include <stdlib.h>
21904 #include <X11/Intrinsic.h>
21909 String foo = malloc(1); *foo = 0
21914 rm -f "conftest.$ac_objext"
21915 if { (eval echo "$as_me:21915: \"$ac_compile\"") >&5
21916 (eval $ac_compile) 2>&5
21918 echo "$as_me:21918: \$? = $ac_status" >&5
21919 (exit "$ac_status"); } &&
21920 { ac_try='test -s "conftest.$ac_objext"'
21921 { (eval echo "$as_me:21921: \"$ac_try\"") >&5
21922 (eval $ac_try) 2>&5
21924 echo "$as_me:21924: \$? = $ac_status" >&5
21925 (exit "$ac_status"); }; }; then
21927 cf_cv_const_x_string=no
21930 echo "$as_me: failed program was:" >&5
21931 cat "conftest.$ac_ext" >&5
21933 cf_cv_const_x_string=yes
21936 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21939 echo "$as_me:21939: result: $cf_cv_const_x_string" >&5
21940 echo "${ECHO_T}$cf_cv_const_x_string" >&6
21942 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
21943 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
21944 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
21946 case "$cf_cv_const_x_string" in
21949 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21950 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
21955 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21956 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
21962 echo "$as_me: failed program was:" >&5
21963 cat "conftest.$ac_ext" >&5
21965 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21967 cat > "conftest.$ac_ext" <<EOF
21968 #line 21968 "${as_me:-configure}"
21969 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
21971 if test "$INTEL_COMPILER" = yes
21973 # The "-wdXXX" options suppress warnings:
21974 # remark #1419: external declaration in primary source file
21975 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
21976 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
21977 # remark #193: zero used for undefined preprocessing identifier
21978 # remark #593: variable "curs_sb_left_arrow" was set but never used
21979 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
21980 # remark #869: parameter "tw" was never referenced
21981 # remark #981: operands are evaluated in unspecified order
21982 # warning #279: controlling expression is constant
21984 { echo "$as_me:21984: checking for $CC warning options..." >&5
21985 echo "$as_me: checking for $CC warning options..." >&6;}
21986 cf_save_CFLAGS="$CFLAGS"
21987 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
21999 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
22000 if { (eval echo "$as_me:22000: \"$ac_compile\"") >&5
22001 (eval $ac_compile) 2>&5
22003 echo "$as_me:22003: \$? = $ac_status" >&5
22004 (exit "$ac_status"); }; then
22005 test -n "$verbose" && echo "$as_me:22005: result: ... -$cf_opt" >&5
22006 echo "${ECHO_T}... -$cf_opt" >&6
22007 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
22010 CFLAGS="$cf_save_CFLAGS"
22011 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
22013 { echo "$as_me:22013: checking for $CC warning options..." >&5
22014 echo "$as_me: checking for $CC warning options..." >&6;}
22015 cf_save_CFLAGS="$CFLAGS"
22017 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
22018 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
22019 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
22020 for cf_opt in W Wall \
22021 Wbad-function-cast \
22024 Wdeclaration-after-statement \
22027 Wmissing-declarations \
22028 Wmissing-prototypes \
22032 Wstrict-prototypes \
22033 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
22035 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
22036 if { (eval echo "$as_me:22036: \"$ac_compile\"") >&5
22037 (eval $ac_compile) 2>&5
22039 echo "$as_me:22039: \$? = $ac_status" >&5
22040 (exit "$ac_status"); }; then
22041 test -n "$verbose" && echo "$as_me:22041: result: ... -$cf_opt" >&5
22042 echo "${ECHO_T}... -$cf_opt" >&6
22045 case "$GCC_VERSION" in
22047 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
22049 echo "${as_me:-configure}:22049: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
22055 case "$GCC_VERSION" in
22057 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
22059 echo "${as_me:-configure}:22059: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
22065 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
22068 CFLAGS="$cf_save_CFLAGS"
22076 echo "$as_me:22076: checking if you want to use dmalloc for testing" >&5
22077 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
22079 # Check whether --with-dmalloc or --without-dmalloc was given.
22080 if test "${with_dmalloc+set}" = set; then
22081 withval="$with_dmalloc"
22082 case "x$withval" in
22085 : "${with_cflags:=-g}"
22086 : "${enable_leaks:=no}"
22089 cat >>confdefs.h <<EOF
22090 #define USE_DMALLOC 1
22098 echo "$as_me:22098: result: ${with_dmalloc:-no}" >&5
22099 echo "${ECHO_T}${with_dmalloc:-no}" >&6
22101 case ".$with_cflags" in
22111 cf_new_extra_cppflags=
22113 for cf_add_cflags in -g
22115 case "$cf_fix_cppflags" in
22117 case "$cf_add_cflags" in
22118 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22119 case "$cf_add_cflags" in
22121 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22123 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22124 && test -z "${cf_tst_cflags}" \
22125 && cf_fix_cppflags=yes
22127 if test "$cf_fix_cppflags" = yes ; then
22129 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22130 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22133 elif test "${cf_tst_cflags}" = "\"'" ; then
22135 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22136 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22142 case "$CPPFLAGS" in
22146 case "$cf_add_cflags" in
22148 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22150 CPPFLAGS=`echo "$CPPFLAGS" | \
22151 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22152 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22157 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22158 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22165 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22166 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22173 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22174 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22176 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22178 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22179 && test -z "${cf_tst_cflags}" \
22180 && cf_fix_cppflags=no
22185 if test -n "$cf_new_cflags" ; then
22187 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22188 CFLAGS="${CFLAGS}$cf_new_cflags"
22192 if test -n "$cf_new_cppflags" ; then
22194 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22195 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22199 if test -n "$cf_new_extra_cppflags" ; then
22201 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22202 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22211 if test "$with_dmalloc" = yes ; then
22212 echo "$as_me:22212: checking for dmalloc.h" >&5
22213 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
22214 if test "${ac_cv_header_dmalloc_h+set}" = set; then
22215 echo $ECHO_N "(cached) $ECHO_C" >&6
22217 cat >"conftest.$ac_ext" <<_ACEOF
22218 #line 22218 "configure"
22219 #include "confdefs.h"
22220 #include <dmalloc.h>
22222 if { (eval echo "$as_me:22222: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22223 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22225 $EGREP -v '^ *\+' conftest.er1 >conftest.err
22227 cat conftest.err >&5
22228 echo "$as_me:22228: \$? = $ac_status" >&5
22229 (exit "$ac_status"); } >/dev/null; then
22230 if test -s conftest.err; then
22231 ac_cpp_err=$ac_c_preproc_warn_flag
22238 if test -z "$ac_cpp_err"; then
22239 ac_cv_header_dmalloc_h=yes
22241 echo "$as_me: failed program was:" >&5
22242 cat "conftest.$ac_ext" >&5
22243 ac_cv_header_dmalloc_h=no
22245 rm -f conftest.err "conftest.$ac_ext"
22247 echo "$as_me:22247: result: $ac_cv_header_dmalloc_h" >&5
22248 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
22249 if test "$ac_cv_header_dmalloc_h" = yes; then
22251 echo "$as_me:22251: checking for dmalloc_debug in -ldmalloc" >&5
22252 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
22253 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
22254 echo $ECHO_N "(cached) $ECHO_C" >&6
22256 ac_check_lib_save_LIBS=$LIBS
22257 LIBS="-ldmalloc $LIBS"
22258 cat >"conftest.$ac_ext" <<_ACEOF
22259 #line 22259 "configure"
22260 #include "confdefs.h"
22262 /* Override any gcc2 internal prototype to avoid an error. */
22266 /* We use char because int might match the return type of a gcc2
22267 builtin and then its argument prototype would still apply. */
22268 char dmalloc_debug ();
22277 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22278 if { (eval echo "$as_me:22278: \"$ac_link\"") >&5
22279 (eval $ac_link) 2>&5
22281 echo "$as_me:22281: \$? = $ac_status" >&5
22282 (exit "$ac_status"); } &&
22283 { ac_try='test -s "conftest$ac_exeext"'
22284 { (eval echo "$as_me:22284: \"$ac_try\"") >&5
22285 (eval $ac_try) 2>&5
22287 echo "$as_me:22287: \$? = $ac_status" >&5
22288 (exit "$ac_status"); }; }; then
22289 ac_cv_lib_dmalloc_dmalloc_debug=yes
22291 echo "$as_me: failed program was:" >&5
22292 cat "conftest.$ac_ext" >&5
22293 ac_cv_lib_dmalloc_dmalloc_debug=no
22295 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22296 LIBS=$ac_check_lib_save_LIBS
22298 echo "$as_me:22298: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
22299 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
22300 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
22301 cat >>confdefs.h <<EOF
22302 #define HAVE_LIBDMALLOC 1
22305 LIBS="-ldmalloc $LIBS"
22313 echo "$as_me:22313: checking if you want to use dbmalloc for testing" >&5
22314 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
22316 # Check whether --with-dbmalloc or --without-dbmalloc was given.
22317 if test "${with_dbmalloc+set}" = set; then
22318 withval="$with_dbmalloc"
22319 case "x$withval" in
22322 : "${with_cflags:=-g}"
22323 : "${enable_leaks:=no}"
22326 cat >>confdefs.h <<EOF
22327 #define USE_DBMALLOC 1
22335 echo "$as_me:22335: result: ${with_dbmalloc:-no}" >&5
22336 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
22338 case ".$with_cflags" in
22348 cf_new_extra_cppflags=
22350 for cf_add_cflags in -g
22352 case "$cf_fix_cppflags" in
22354 case "$cf_add_cflags" in
22355 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22356 case "$cf_add_cflags" in
22358 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22360 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22361 && test -z "${cf_tst_cflags}" \
22362 && cf_fix_cppflags=yes
22364 if test "$cf_fix_cppflags" = yes ; then
22366 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22367 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22370 elif test "${cf_tst_cflags}" = "\"'" ; then
22372 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22373 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22379 case "$CPPFLAGS" in
22383 case "$cf_add_cflags" in
22385 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22387 CPPFLAGS=`echo "$CPPFLAGS" | \
22388 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22389 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22394 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22395 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22402 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22403 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22410 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22411 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22413 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22415 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22416 && test -z "${cf_tst_cflags}" \
22417 && cf_fix_cppflags=no
22422 if test -n "$cf_new_cflags" ; then
22424 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22425 CFLAGS="${CFLAGS}$cf_new_cflags"
22429 if test -n "$cf_new_cppflags" ; then
22431 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22432 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22436 if test -n "$cf_new_extra_cppflags" ; then
22438 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22439 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22448 if test "$with_dbmalloc" = yes ; then
22449 echo "$as_me:22449: checking for dbmalloc.h" >&5
22450 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
22451 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
22452 echo $ECHO_N "(cached) $ECHO_C" >&6
22454 cat >"conftest.$ac_ext" <<_ACEOF
22455 #line 22455 "configure"
22456 #include "confdefs.h"
22457 #include <dbmalloc.h>
22459 if { (eval echo "$as_me:22459: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22460 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22462 $EGREP -v '^ *\+' conftest.er1 >conftest.err
22464 cat conftest.err >&5
22465 echo "$as_me:22465: \$? = $ac_status" >&5
22466 (exit "$ac_status"); } >/dev/null; then
22467 if test -s conftest.err; then
22468 ac_cpp_err=$ac_c_preproc_warn_flag
22475 if test -z "$ac_cpp_err"; then
22476 ac_cv_header_dbmalloc_h=yes
22478 echo "$as_me: failed program was:" >&5
22479 cat "conftest.$ac_ext" >&5
22480 ac_cv_header_dbmalloc_h=no
22482 rm -f conftest.err "conftest.$ac_ext"
22484 echo "$as_me:22484: result: $ac_cv_header_dbmalloc_h" >&5
22485 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
22486 if test "$ac_cv_header_dbmalloc_h" = yes; then
22488 echo "$as_me:22488: checking for debug_malloc in -ldbmalloc" >&5
22489 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
22490 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
22491 echo $ECHO_N "(cached) $ECHO_C" >&6
22493 ac_check_lib_save_LIBS=$LIBS
22494 LIBS="-ldbmalloc $LIBS"
22495 cat >"conftest.$ac_ext" <<_ACEOF
22496 #line 22496 "configure"
22497 #include "confdefs.h"
22499 /* Override any gcc2 internal prototype to avoid an error. */
22503 /* We use char because int might match the return type of a gcc2
22504 builtin and then its argument prototype would still apply. */
22505 char debug_malloc ();
22514 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22515 if { (eval echo "$as_me:22515: \"$ac_link\"") >&5
22516 (eval $ac_link) 2>&5
22518 echo "$as_me:22518: \$? = $ac_status" >&5
22519 (exit "$ac_status"); } &&
22520 { ac_try='test -s "conftest$ac_exeext"'
22521 { (eval echo "$as_me:22521: \"$ac_try\"") >&5
22522 (eval $ac_try) 2>&5
22524 echo "$as_me:22524: \$? = $ac_status" >&5
22525 (exit "$ac_status"); }; }; then
22526 ac_cv_lib_dbmalloc_debug_malloc=yes
22528 echo "$as_me: failed program was:" >&5
22529 cat "conftest.$ac_ext" >&5
22530 ac_cv_lib_dbmalloc_debug_malloc=no
22532 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22533 LIBS=$ac_check_lib_save_LIBS
22535 echo "$as_me:22535: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
22536 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
22537 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
22538 cat >>confdefs.h <<EOF
22539 #define HAVE_LIBDBMALLOC 1
22542 LIBS="-ldbmalloc $LIBS"
22550 echo "$as_me:22550: checking if you want to use valgrind for testing" >&5
22551 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
22553 # Check whether --with-valgrind or --without-valgrind was given.
22554 if test "${with_valgrind+set}" = set; then
22555 withval="$with_valgrind"
22556 case "x$withval" in
22559 : "${with_cflags:=-g}"
22560 : "${enable_leaks:=no}"
22563 cat >>confdefs.h <<EOF
22564 #define USE_VALGRIND 1
22572 echo "$as_me:22572: result: ${with_valgrind:-no}" >&5
22573 echo "${ECHO_T}${with_valgrind:-no}" >&6
22575 case ".$with_cflags" in
22585 cf_new_extra_cppflags=
22587 for cf_add_cflags in -g
22589 case "$cf_fix_cppflags" in
22591 case "$cf_add_cflags" in
22592 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22593 case "$cf_add_cflags" in
22595 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22597 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22598 && test -z "${cf_tst_cflags}" \
22599 && cf_fix_cppflags=yes
22601 if test "$cf_fix_cppflags" = yes ; then
22603 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22604 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22607 elif test "${cf_tst_cflags}" = "\"'" ; then
22609 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22610 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22616 case "$CPPFLAGS" in
22620 case "$cf_add_cflags" in
22622 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22624 CPPFLAGS=`echo "$CPPFLAGS" | \
22625 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22626 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22631 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22632 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22639 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22640 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22647 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22648 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22650 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22652 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22653 && test -z "${cf_tst_cflags}" \
22654 && cf_fix_cppflags=no
22659 if test -n "$cf_new_cflags" ; then
22661 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22662 CFLAGS="${CFLAGS}$cf_new_cflags"
22666 if test -n "$cf_new_cppflags" ; then
22668 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22669 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22673 if test -n "$cf_new_extra_cppflags" ; then
22675 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22676 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22685 echo "$as_me:22685: checking if you want to perform memory-leak testing" >&5
22686 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
22688 # Check whether --enable-leaks or --disable-leaks was given.
22689 if test "${enable_leaks+set}" = set; then
22690 enableval="$enable_leaks"
22691 enable_leaks=$enableval
22695 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
22696 echo "$as_me:22696: result: $with_no_leaks" >&5
22697 echo "${ECHO_T}$with_no_leaks" >&6
22699 if test "$enable_leaks" = no ; then
22701 cat >>confdefs.h <<\EOF
22705 cat >>confdefs.h <<\EOF
22706 #define YY_NO_LEAKS 1
22712 if test "x$cf_cv_enable_rpath" != xno
22714 echo "$as_me:22714: checking for an rpath option" >&5
22715 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
22716 case "$cf_cv_system_name" in
22718 if test "$GCC" = yes; then
22719 LD_RPATH_OPT="-Wl,-rpath,"
22721 LD_RPATH_OPT="-rpath "
22724 (linux*|gnu*|k*bsd*-gnu|freebsd*)
22725 LD_RPATH_OPT="-Wl,-rpath,"
22727 (openbsd[2-9].*|mirbsd*)
22728 LD_RPATH_OPT="-Wl,-rpath,"
22731 LD_RPATH_OPT="-rpath "
22734 LD_RPATH_OPT="-Wl,-rpath,"
22737 LD_RPATH_OPT="-rpath "
22745 echo "$as_me:22745: result: $LD_RPATH_OPT" >&5
22746 echo "${ECHO_T}$LD_RPATH_OPT" >&6
22748 case "x$LD_RPATH_OPT" in
22750 echo "$as_me:22750: checking if we need a space after rpath option" >&5
22751 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
22752 cf_save_LIBS="$LIBS"
22754 cf_add_libs="$LIBS"
22757 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22758 # filter duplicates
22759 for cf_add_1lib in $cf_add_0lib; do
22760 for cf_add_2lib in $cf_add_libs; do
22761 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22766 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22768 LIBS="$cf_add_libs"
22770 cat >"conftest.$ac_ext" <<_ACEOF
22771 #line 22771 "configure"
22772 #include "confdefs.h"
22782 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22783 if { (eval echo "$as_me:22783: \"$ac_link\"") >&5
22784 (eval $ac_link) 2>&5
22786 echo "$as_me:22786: \$? = $ac_status" >&5
22787 (exit "$ac_status"); } &&
22788 { ac_try='test -s "conftest$ac_exeext"'
22789 { (eval echo "$as_me:22789: \"$ac_try\"") >&5
22790 (eval $ac_try) 2>&5
22792 echo "$as_me:22792: \$? = $ac_status" >&5
22793 (exit "$ac_status"); }; }; then
22796 echo "$as_me: failed program was:" >&5
22797 cat "conftest.$ac_ext" >&5
22800 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22801 LIBS="$cf_save_LIBS"
22802 echo "$as_me:22802: result: $cf_rpath_space" >&5
22803 echo "${ECHO_T}$cf_rpath_space" >&6
22804 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
22809 echo "$as_me:22809: checking if rpath-hack should be disabled" >&5
22810 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
22812 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
22813 if test "${enable_rpath_hack+set}" = set; then
22814 enableval="$enable_rpath_hack"
22815 test "$enableval" != no && enableval=yes
22816 if test "$enableval" != "yes" ; then
22817 enable_rpath_hack=no
22819 enable_rpath_hack=yes
22823 enable_rpath_hack=yes
22826 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
22827 echo "$as_me:22827: result: $cf_disable_rpath_hack" >&5
22828 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
22830 if test "$enable_rpath_hack" = yes ; then
22832 echo "$as_me:22832: checking for updated LDFLAGS" >&5
22833 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
22834 if test -n "$LD_RPATH_OPT" ; then
22835 echo "$as_me:22835: result: maybe" >&5
22836 echo "${ECHO_T}maybe" >&6
22840 # Extract the first word of "$ac_prog", so it can be a program name with args.
22841 set dummy $ac_prog; ac_word=$2
22842 echo "$as_me:22842: checking for $ac_word" >&5
22843 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22844 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
22845 echo $ECHO_N "(cached) $ECHO_C" >&6
22847 if test -n "$cf_ldd_prog"; then
22848 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
22850 ac_save_IFS=$IFS; IFS=$ac_path_separator
22852 for ac_dir in $ac_dummy; do
22854 test -z "$ac_dir" && ac_dir=.
22855 $as_executable_p "$ac_dir/$ac_word" || continue
22856 ac_cv_prog_cf_ldd_prog="$ac_prog"
22857 echo "$as_me:22857: found $ac_dir/$ac_word" >&5
22863 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
22864 if test -n "$cf_ldd_prog"; then
22865 echo "$as_me:22865: result: $cf_ldd_prog" >&5
22866 echo "${ECHO_T}$cf_ldd_prog" >&6
22868 echo "$as_me:22868: result: no" >&5
22869 echo "${ECHO_T}no" >&6
22872 test -n "$cf_ldd_prog" && break
22874 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
22876 cf_rpath_list="/usr/lib /lib"
22877 if test "$cf_ldd_prog" != no
22881 cat >"conftest.$ac_ext" <<_ACEOF
22882 #line 22882 "configure"
22883 #include "confdefs.h"
22893 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22894 if { (eval echo "$as_me:22894: \"$ac_link\"") >&5
22895 (eval $ac_link) 2>&5
22897 echo "$as_me:22897: \$? = $ac_status" >&5
22898 (exit "$ac_status"); } &&
22899 { ac_try='test -s "conftest$ac_exeext"'
22900 { (eval echo "$as_me:22900: \"$ac_try\"") >&5
22901 (eval $ac_try) 2>&5
22903 echo "$as_me:22903: \$? = $ac_status" >&5
22904 (exit "$ac_status"); }; }; then
22905 cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
22906 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
22908 echo "$as_me: failed program was:" >&5
22909 cat "conftest.$ac_ext" >&5
22911 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22913 # If we passed the link-test, but get a "not found" on a given library,
22914 # this could be due to inept reconfiguration of gcc to make it only
22915 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
22916 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
22917 # /usr/local libraries.
22918 if test -n "$cf_rpath_oops"
22920 for cf_rpath_src in $cf_rpath_oops
22922 for cf_rpath_dir in \
22927 if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
22929 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
22931 echo "${as_me:-configure}:22931: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
22933 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
22941 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
22943 echo "${as_me:-configure}:22943: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
22945 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
22947 echo "${as_me:-configure}:22947: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
22950 for cf_rpath_src in $LDFLAGS
22952 case "$cf_rpath_src" in
22955 # check if this refers to a directory which we will ignore
22957 if test -n "$cf_rpath_list"
22959 for cf_rpath_item in $cf_rpath_list
22961 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
22969 if test "$cf_rpath_skip" = no
22971 # transform the option
22972 if test "$LD_RPATH_OPT" = "-R " ; then
22973 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
22975 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
22978 # if we have not already added this, add it now
22979 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
22980 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
22982 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
22984 echo "${as_me:-configure}:22984: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
22986 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
22991 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
22993 LDFLAGS=$cf_rpath_dst
22995 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
22997 echo "${as_me:-configure}:22997: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
22999 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
23001 echo "${as_me:-configure}:23001: testing ...checking LIBS $LIBS ..." 1>&5
23004 for cf_rpath_src in $LIBS
23006 case "$cf_rpath_src" in
23009 # check if this refers to a directory which we will ignore
23011 if test -n "$cf_rpath_list"
23013 for cf_rpath_item in $cf_rpath_list
23015 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
23023 if test "$cf_rpath_skip" = no
23025 # transform the option
23026 if test "$LD_RPATH_OPT" = "-R " ; then
23027 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
23029 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
23032 # if we have not already added this, add it now
23033 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
23034 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
23036 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
23038 echo "${as_me:-configure}:23038: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
23040 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
23045 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
23049 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
23051 echo "${as_me:-configure}:23051: testing ...checked LIBS $LIBS ..." 1>&5
23053 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
23055 echo "${as_me:-configure}:23055: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
23058 echo "$as_me:23058: result: no" >&5
23059 echo "${ECHO_T}no" >&6
23067 ac_config_files="$ac_config_files Makefile"
23068 ac_config_commands="$ac_config_commands default"
23069 cat >confcache <<\_ACEOF
23070 # This file is a shell script that caches the results of configure
23071 # tests run on this system so they can be shared between configure
23072 # scripts and configure runs, see configure's option --config-cache.
23073 # It is not useful on other systems. If it contains results you don't
23074 # want to keep, you may remove or edit it.
23076 # config.status only pays attention to the cache file if you give it
23077 # the --recheck option to rerun configure.
23079 # `ac_cv_env_foo' variables (set or unset) will be overriden when
23080 # loading this file, other *unset* `ac_cv_foo' will be assigned the
23081 # following values.
23085 # The following way of writing the cache mishandles newlines in values,
23086 # but we know of no workaround that is simple, portable, and efficient.
23087 # So, don't put newlines in cache variables' values.
23088 # Ultrix sh set writes to stderr and can't be redirected directly,
23089 # and sets the high bit in the cache file unless we assign to the vars.
23092 case `(ac_space=' '; set | grep ac_space) 2>&1` in
23094 # `set' does not quote correctly, so add quotes (double-quote
23095 # substitution turns \\\\ into \\, and sed turns \\ into \).
23098 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23101 # `set' quotes correctly as required by POSIX, so do not add quotes.
23103 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
23110 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23112 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23114 if cmp -s $cache_file confcache; then :; else
23115 if test -w $cache_file; then
23116 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23117 cat confcache >$cache_file
23119 echo "not updating unwritable cache $cache_file"
23124 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23125 # Let make expand exec_prefix.
23126 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23128 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23129 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23130 # trailing colons and then remove the whole line if VPATH becomes empty
23131 # (actually we leave an empty line to preserve line numbers).
23132 if test "x$srcdir" = x.; then
23133 ac_vpsub='/^[ ]*VPATH[ ]*=/{
23134 s/:*\$(srcdir):*/:/;
23135 s/:*\${srcdir}:*/:/;
23137 s/^\([^=]*=[ ]*\):*/\1/;
23143 DEFS=-DHAVE_CONFIG_H
23145 : "${CONFIG_STATUS=./config.status}"
23146 ac_clean_files_save=$ac_clean_files
23147 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23148 { echo "$as_me:23148: creating $CONFIG_STATUS" >&5
23149 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23150 cat >"$CONFIG_STATUS" <<_ACEOF
23152 # Generated automatically by configure.
23153 # Run this file to recreate the current configuration.
23154 # Compiler output produced by configure, useful for debugging
23155 # configure, is in config.log if it exists.
23158 SHELL=\${CONFIG_SHELL-$SHELL}
23159 ac_cs_invocation="\$0 \$@"
23161 CLICOLOR_FORCE= GREP_OPTIONS=
23162 unset CLICOLOR_FORCE GREP_OPTIONS
23165 cat >>"$CONFIG_STATUS" <<\_ACEOF
23166 # Be Bourne compatible
23167 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23170 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23174 # Name of the executable.
23175 as_me=`echo "$0" |sed 's,.*[\\/],,'`
23177 if expr a : '\(a\)' >/dev/null 2>&1; then
23183 rm -f conf$$ conf$$.exe conf$$.file
23185 if ln -s conf$$.file conf$$ 2>/dev/null; then
23186 # We could just check for DJGPP; but this test a) works b) is more generic
23187 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23188 if test -f conf$$.exe; then
23189 # Don't use ln at all; we don't have any links
23194 elif ln conf$$.file conf$$ 2>/dev/null; then
23199 rm -f conf$$ conf$$.exe conf$$.file
23201 as_executable_p="test -f"
23203 # Support unset when possible.
23204 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
23211 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
23212 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
23213 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
23214 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
23215 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
23216 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
23217 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
23218 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
23221 # We need space, tab and new line, in precisely that order.
23227 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
23233 # Files that config.status was made for.
23234 if test -n "$ac_config_files"; then
23235 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
23238 if test -n "$ac_config_headers"; then
23239 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
23242 if test -n "$ac_config_links"; then
23243 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
23246 if test -n "$ac_config_commands"; then
23247 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
23250 cat >>"$CONFIG_STATUS" <<\EOF
23253 \`$as_me' instantiates files from templates according to the
23254 current configuration.
23256 Usage: $0 [OPTIONS] [FILE]...
23258 -h, --help print this help, then exit
23259 -V, --version print version number, then exit
23260 -d, --debug don't remove temporary files
23261 --recheck update $as_me by reconfiguring in the same conditions
23262 --file=FILE[:TEMPLATE]
23263 instantiate the configuration file FILE
23264 --header=FILE[:TEMPLATE]
23265 instantiate the configuration header FILE
23267 Configuration files:
23270 Configuration headers:
23273 Configuration commands:
23276 Report bugs to <dickey@invisible-island.net>."
23279 cat >>"$CONFIG_STATUS" <<EOF
23282 configured by $0, generated by GNU Autoconf 2.52.20210509,
23283 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23285 Copyright 2003-2020,2021 Thomas E. Dickey
23286 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
23287 Free Software Foundation, Inc.
23288 This config.status script is free software; the Free Software Foundation
23289 gives unlimited permission to copy, distribute and modify it."
23294 cat >>"$CONFIG_STATUS" <<\EOF
23295 # If no file are specified by the user, then we need to provide default
23296 # value. By we need to know if files were specified by the user.
23302 ac_option=`expr "x$1" : 'x\([^=]*\)='`
23303 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23305 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
23309 *) # This is not an option, so the user has probably given explicit
23311 ac_need_defaults=false;;
23315 # Handling of the options.
23317 cat >>"$CONFIG_STATUS" <<EOF
23318 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23319 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
23320 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
23322 cat >>"$CONFIG_STATUS" <<\EOF
23323 --version | --vers* | -V )
23324 echo "$ac_cs_version"; exit 0 ;;
23326 # Conflict between --help and --header
23327 { { echo "$as_me:23327: error: ambiguous option: $1
23328 Try \`$0 --help' for more information." >&5
23329 echo "$as_me: error: ambiguous option: $1
23330 Try \`$0 --help' for more information." >&2;}
23331 { (exit 1); exit 1; }; };;
23332 --help | --hel | -h )
23333 echo "$ac_cs_usage"; exit 0 ;;
23334 --debug | --d* | -d )
23336 --file | --fil | --fi | --f )
23338 CONFIG_FILES="$CONFIG_FILES $1"
23339 ac_need_defaults=false;;
23340 --header | --heade | --head | --hea )
23342 CONFIG_HEADERS="$CONFIG_HEADERS $1"
23343 ac_need_defaults=false;;
23345 # This is an error.
23346 -*) { { echo "$as_me:23346: error: unrecognized option: $1
23347 Try \`$0 --help' for more information." >&5
23348 echo "$as_me: error: unrecognized option: $1
23349 Try \`$0 --help' for more information." >&2;}
23350 { (exit 1); exit 1; }; } ;;
23352 *) ac_config_targets="$ac_config_targets $1" ;;
23361 ## ----------------------- ##
23362 ## Running config.status. ##
23363 ## ----------------------- ##
23365 This file was extended by $as_me 2.52.20210509, executed with
23366 CONFIG_FILES = $CONFIG_FILES
23367 CONFIG_HEADERS = $CONFIG_HEADERS
23368 CONFIG_LINKS = $CONFIG_LINKS
23369 CONFIG_COMMANDS = $CONFIG_COMMANDS
23370 > "$ac_cs_invocation"
23371 on `(hostname || uname -n) 2>/dev/null | sed 1q`
23376 cat >>"$CONFIG_STATUS" <<EOF
23378 # INIT-COMMANDS section.
23388 cat >>"$CONFIG_STATUS" <<\EOF
23389 for ac_config_target in $ac_config_targets
23391 case "$ac_config_target" in
23392 # Handling of arguments.
23393 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23394 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23395 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
23396 *) { { echo "$as_me:23396: error: invalid argument: $ac_config_target" >&5
23397 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23398 { (exit 1); exit 1; }; };;
23402 # If the user did not use the arguments to specify the items to instantiate,
23403 # then the envvar interface is used. Set only those that are not.
23404 # We use the long form for the default assignment because of an extremely
23405 # bizarre bug on SunOS 4.1.3.
23406 if "$ac_need_defaults"; then
23407 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23408 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23409 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23412 # Create a temporary directory, and hook for its removal unless debugging.
23415 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23416 trap '{ (exit 1); exit 1; }' 1 2 13 15
23419 # Create a (secure) tmp directory for tmp files.
23422 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
23423 test -n "$tmp" && test -d "$tmp"
23426 tmp=$TMPDIR/cs$$-$RANDOM
23427 (umask 077 && mkdir $tmp)
23430 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
23431 { (exit 1); exit 1; }
23436 cat >>"$CONFIG_STATUS" <<EOF
23439 # CONFIG_FILES section.
23442 # No need to generate the scripts if there are no CONFIG_FILES.
23443 # This happens for instance when ./config.status config.h
23444 if test -n "\$CONFIG_FILES"; then
23445 # Protect against being on the right side of a sed subst in config.status.
23446 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23447 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23448 s,@SHELL@,$SHELL,;t t
23449 s,@exec_prefix@,$exec_prefix,;t t
23450 s,@prefix@,$prefix,;t t
23451 s,@program_transform_name@,$program_transform_name,;t t
23452 s,@bindir@,$bindir,;t t
23453 s,@sbindir@,$sbindir,;t t
23454 s,@libexecdir@,$libexecdir,;t t
23455 s,@datarootdir@,$datarootdir,;t t
23456 s,@datadir@,$datadir,;t t
23457 s,@sysconfdir@,$sysconfdir,;t t
23458 s,@sharedstatedir@,$sharedstatedir,;t t
23459 s,@localstatedir@,$localstatedir,;t t
23460 s,@runstatedir@,$runstatedir,;t t
23461 s,@libdir@,$libdir,;t t
23462 s,@includedir@,$includedir,;t t
23463 s,@oldincludedir@,$oldincludedir,;t t
23464 s,@infodir@,$infodir,;t t
23465 s,@mandir@,$mandir,;t t
23466 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23467 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23468 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23469 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23470 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23471 s,@build_alias@,$build_alias,;t t
23472 s,@host_alias@,$host_alias,;t t
23473 s,@target_alias@,$target_alias,;t t
23474 s,@ECHO_C@,$ECHO_C,;t t
23475 s,@ECHO_N@,$ECHO_N,;t t
23476 s,@ECHO_T@,$ECHO_T,;t t
23477 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23478 s,@DEFS@,$DEFS,;t t
23479 s,@LIBS@,$LIBS,;t t
23480 s,@build@,$build,;t t
23481 s,@build_cpu@,$build_cpu,;t t
23482 s,@build_vendor@,$build_vendor,;t t
23483 s,@build_os@,$build_os,;t t
23484 s,@host@,$host,;t t
23485 s,@host_cpu@,$host_cpu,;t t
23486 s,@host_vendor@,$host_vendor,;t t
23487 s,@host_os@,$host_os,;t t
23488 s,@SET_MAKE@,$SET_MAKE,;t t
23490 s,@CFLAGS@,$CFLAGS,;t t
23491 s,@LDFLAGS@,$LDFLAGS,;t t
23492 s,@CPPFLAGS@,$CPPFLAGS,;t t
23493 s,@ac_ct_CC@,$ac_ct_CC,;t t
23494 s,@EXEEXT@,$EXEEXT,;t t
23495 s,@OBJEXT@,$OBJEXT,;t t
23496 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
23498 s,@GREP@,$GREP,;t t
23499 s,@EGREP@,$EGREP,;t t
23501 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23502 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23503 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
23504 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
23505 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
23506 s,@LINT@,$LINT,;t t
23507 s,@LINT_OPTS@,$LINT_OPTS,;t t
23508 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
23509 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
23510 s,@CTAGS@,$CTAGS,;t t
23511 s,@ETAGS@,$ETAGS,;t t
23512 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
23513 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
23514 s,@MATH_LIB@,$MATH_LIB,;t t
23515 s,@top_builddir@,$top_builddir,;t t
23516 s,@CC_G_OPT@,$CC_G_OPT,;t t
23517 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
23518 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
23519 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
23520 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
23522 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23523 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23524 s,@LD_MODEL@,$LD_MODEL,;t t
23525 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
23526 s,@LIBTOOL@,$LIBTOOL,;t t
23527 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
23528 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
23529 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
23530 s,@LIB_LINK@,$LIB_LINK,;t t
23531 s,@LINK_TESTS@,$LINK_TESTS,;t t
23532 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
23533 s,@PACKAGE@,$PACKAGE,;t t
23534 s,@PTHREAD@,$PTHREAD,;t t
23535 s,@TEST_ARGS@,$TEST_ARGS,;t t
23536 s,@TEST_DEPS@,$TEST_DEPS,;t t
23537 s,@TEST_LIBS@,$TEST_LIBS,;t t
23538 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23539 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23540 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
23541 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
23542 s,@includesubdir@,$includesubdir,;t t
23543 s,@FGREP@,$FGREP,;t t
23544 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
23545 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
23546 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
23547 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
23548 s,@ECHO_LT@,$ECHO_LT,;t t
23549 s,@ECHO_LD@,$ECHO_LD,;t t
23550 s,@RULE_CC@,$RULE_CC,;t t
23551 s,@SHOW_CC@,$SHOW_CC,;t t
23552 s,@ECHO_CC@,$ECHO_CC,;t t
23553 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
23554 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
23555 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
23556 s,@X_CFLAGS@,$X_CFLAGS,;t t
23557 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
23558 s,@X_LIBS@,$X_LIBS,;t t
23559 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
23560 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
23561 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
23562 s,@RGB_PATH@,$RGB_PATH,;t t
23563 s,@no_x11_rgb@,$no_x11_rgb,;t t
23564 s,@FORM_NAME@,$FORM_NAME,;t t
23565 s,@MENU_NAME@,$MENU_NAME,;t t
23566 s,@PANEL_NAME@,$PANEL_NAME,;t t
23567 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
23568 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
23569 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
23574 cat >>"$CONFIG_STATUS" <<\EOF
23575 # Split the substitutions into bite-sized pieces for seds with
23576 # small command number limits, like on Digital OSF/1 and HP-UX.
23577 ac_max_sed_lines=48
23578 ac_sed_frag=1 # Number of current file.
23579 ac_beg=1 # First line for current file.
23580 ac_end=$ac_max_sed_lines # Line after last line for current file.
23583 while "$ac_more_lines"; do
23584 if test "$ac_beg" -gt 1; then
23585 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23587 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23589 if test ! -s $tmp/subs.frag; then
23590 ac_more_lines=false
23592 # The purpose of the label and of the branching condition is to
23593 # speed up the sed processing (if there are no `@' at all, there
23594 # is no need to browse any of the substitutions).
23595 # These are the two extra sed commands mentioned above.
23597 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23598 # It is possible to make a multiline substitution using escaped newlines.
23599 # Ensure that we do not split the substitution between script fragments.
23601 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
23602 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
23603 if test -s $tmp/subs.next; then
23604 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
23605 if test ! -s $tmp/subs.edit; then
23606 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
23607 if test ! -s $tmp/subs.edit; then
23608 if test "$ac_beg" -gt 1; then
23609 ac_end=`expr "$ac_end" - 1`
23616 if test -z "$ac_sed_cmds"; then
23617 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23619 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23621 ac_sed_frag=`expr "$ac_sed_frag" + 1`
23623 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
23626 if test -z "$ac_sed_cmds"; then
23629 fi # test -n "$CONFIG_FILES"
23632 cat >>"$CONFIG_STATUS" <<\EOF
23633 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23634 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23636 - | *:- | *:-:* ) # input from stdin
23638 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23639 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23640 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23641 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23642 * ) ac_file_in=$ac_file.in ;;
23645 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23646 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23647 X"$ac_file" : 'X\(//\)[^/]' \| \
23648 X"$ac_file" : 'X\(//\)$' \| \
23649 X"$ac_file" : 'X\(/\)' \| \
23650 . : '\(.\)' 2>/dev/null ||
23652 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23653 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23654 /^X\(\/\/\)$/{ s//\1/; q; }
23655 /^X\(\/\).*/{ s//\1/; q; }
23657 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23658 { case "$ac_dir" in
23659 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23663 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23664 case $as_mkdir_dir in
23665 # Skip DOS drivespec
23666 ?:) as_incr_dir=$as_mkdir_dir ;;
23668 as_incr_dir=$as_incr_dir/$as_mkdir_dir
23669 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23674 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23675 # A "../" for each directory in $ac_dir_suffix.
23676 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23678 ac_dir_suffix= ac_dots=
23683 if test -z "$ac_dots"; then
23686 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
23688 [\\/]* | ?:[\\/]* )
23689 ac_srcdir="$srcdir$ac_dir_suffix";
23690 ac_top_srcdir="$srcdir" ;;
23691 *) # Relative path.
23692 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
23693 ac_top_srcdir="$ac_dots$srcdir" ;;
23697 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23698 *) ac_INSTALL=$ac_dots$INSTALL ;;
23701 if test x"$ac_file" != x-; then
23702 { echo "$as_me:23702: creating $ac_file" >&5
23703 echo "$as_me: creating $ac_file" >&6;}
23706 # Let's still pretend it is `configure' which instantiates (i.e., don't
23707 # use $as_me), people would be surprised to read:
23708 # /* config.h. Generated automatically by config.status. */
23709 configure_input="Generated automatically from `echo $ac_file_in |
23710 sed 's,.*/,,'` by configure."
23712 # First look for the input files in the build tree, otherwise in the
23714 ac_file_inputs=`IFS=:
23715 for f in $ac_file_in; do
23717 -) echo $tmp/stdin ;;
23719 # Absolute (can't be DOS-style, as IFS=:)
23720 test -f "$f" || { { echo "$as_me:23720: error: cannot find input file: $f" >&5
23721 echo "$as_me: error: cannot find input file: $f" >&2;}
23722 { (exit 1); exit 1; }; }
23725 if test -f "$f"; then
23728 elif test -f "$srcdir/$f"; then
23733 { { echo "$as_me:23733: error: cannot find input file: $f" >&5
23734 echo "$as_me: error: cannot find input file: $f" >&2;}
23735 { (exit 1); exit 1; }; }
23738 done` || { (exit 1); exit 1; }
23740 cat >>"$CONFIG_STATUS" <<\EOF
23741 ac_warn_datarootdir=no
23742 if test x"$ac_file" != x-; then
23743 for ac_item in $ac_file_inputs
23745 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
23746 if test -n "$ac_seen"; then
23747 ac_used=`grep '@datarootdir@' "$ac_item"`
23748 if test -z "$ac_used"; then
23749 { echo "$as_me:23749: WARNING: datarootdir was used implicitly but not set:
23751 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23753 ac_warn_datarootdir=yes
23756 ac_seen=`grep '${datarootdir}' "$ac_item"`
23757 if test -n "$ac_seen"; then
23758 { echo "$as_me:23758: WARNING: datarootdir was used explicitly but not set:
23760 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23762 ac_warn_datarootdir=yes
23767 if test "x$ac_warn_datarootdir" = xyes; then
23768 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23772 cat >>"$CONFIG_STATUS" <<EOF
23776 cat >>"$CONFIG_STATUS" <<\EOF
23778 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23779 s,@configure_input@,$configure_input,;t t
23780 s,@srcdir@,$ac_srcdir,;t t
23781 s,@top_srcdir@,$ac_top_srcdir,;t t
23782 s,@INSTALL@,$ac_INSTALL,;t t
23783 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23785 if test x"$ac_file" != x-; then
23786 cp "$tmp/out" "$ac_file"
23788 for ac_name in prefix exec_prefix datarootdir
23790 ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
23791 if test -n "$ac_seen"; then
23792 ac_init=`${EGREP-egrep} '[ ]*'$ac_name'[ ]*=' "$ac_file"`
23793 if test -z "$ac_init"; then
23794 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23795 { echo "$as_me:23795: WARNING: Variable $ac_name is used but was not set:
23797 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23802 ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
23803 ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
23804 if test -s $tmp/out; then
23805 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23806 { echo "$as_me:23806: WARNING: Some variables may not be substituted:
23808 echo "$as_me: WARNING: Some variables may not be substituted:
23818 cat >>"$CONFIG_STATUS" <<\EOF
23821 # CONFIG_HEADER section.
23824 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23825 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23827 # ac_d sets the value in "#define NAME VALUE" lines.
23828 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
23829 ac_dB='[ ].*$,\1#\2'
23832 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23833 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
23834 ac_iB='\([ ]\),\1#\2define\3'
23837 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23838 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
23839 ac_uB='$,\1#\2define\3'
23843 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23844 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23846 - | *:- | *:-:* ) # input from stdin
23848 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23849 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23850 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23851 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23852 * ) ac_file_in=$ac_file.in ;;
23855 test x"$ac_file" != x- && { echo "$as_me:23855: creating $ac_file" >&5
23856 echo "$as_me: creating $ac_file" >&6;}
23858 # First look for the input files in the build tree, otherwise in the
23860 ac_file_inputs=`IFS=:
23861 for f in $ac_file_in; do
23863 -) echo $tmp/stdin ;;
23865 # Absolute (can't be DOS-style, as IFS=:)
23866 test -f "$f" || { { echo "$as_me:23866: error: cannot find input file: $f" >&5
23867 echo "$as_me: error: cannot find input file: $f" >&2;}
23868 { (exit 1); exit 1; }; }
23871 if test -f "$f"; then
23874 elif test -f "$srcdir/$f"; then
23879 { { echo "$as_me:23879: error: cannot find input file: $f" >&5
23880 echo "$as_me: error: cannot find input file: $f" >&2;}
23881 { (exit 1); exit 1; }; }
23884 done` || { (exit 1); exit 1; }
23885 # Remove the trailing spaces.
23886 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
23890 # Transform confdefs.h into a list of #define's. We won't use it as a sed
23891 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
23892 # be either 'cat' or 'sort'.
23893 cat confdefs.h | uniq >conftest.vals
23895 # Break up conftest.vals because some shells have a limit on
23896 # the size of here documents, and old seds have small limits too.
23898 rm -f conftest.tail
23899 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
23900 while grep . conftest.vals >/dev/null
23902 # Write chunks of a limited-size here document to conftest.frag.
23903 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
23904 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
23905 echo 'CEOF' >> "$CONFIG_STATUS"
23906 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
23907 rm -f conftest.vals
23908 mv conftest.tail conftest.vals
23910 rm -f conftest.vals
23912 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23914 echo ' cat >> conftest.edit <<CEOF
23915 /@DEFS@/r conftest.frag
23918 sed -f conftest.edit $tmp/in > $tmp/out
23920 mv $tmp/out $tmp/in
23921 rm -f conftest.edit conftest.frag
23922 ' >> "$CONFIG_STATUS"
23924 cat >>"$CONFIG_STATUS" <<\EOF
23925 # Let's still pretend it is `configure' which instantiates (i.e., don't
23926 # use $as_me), people would be surprised to read:
23927 # /* config.h. Generated automatically by config.status. */
23928 if test x"$ac_file" = x-; then
23929 echo "/* Generated automatically by configure. */" >$tmp/config.h
23931 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
23933 cat $tmp/in >>$tmp/config.h
23935 if test x"$ac_file" != x-; then
23936 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
23937 { echo "$as_me:23937: $ac_file is unchanged" >&5
23938 echo "$as_me: $ac_file is unchanged" >&6;}
23940 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23941 X"$ac_file" : 'X\(//\)[^/]' \| \
23942 X"$ac_file" : 'X\(//\)$' \| \
23943 X"$ac_file" : 'X\(/\)' \| \
23944 . : '\(.\)' 2>/dev/null ||
23946 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23947 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23948 /^X\(\/\/\)$/{ s//\1/; q; }
23949 /^X\(\/\).*/{ s//\1/; q; }
23951 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23952 { case "$ac_dir" in
23953 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23957 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23958 case $as_mkdir_dir in
23959 # Skip DOS drivespec
23960 ?:) as_incr_dir=$as_mkdir_dir ;;
23962 as_incr_dir=$as_incr_dir/$as_mkdir_dir
23963 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23970 mv "$tmp/config.h" "$ac_file"
23974 rm -f $tmp/config.h
23978 cat >>"$CONFIG_STATUS" <<\EOF
23980 # CONFIG_COMMANDS section.
23982 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23983 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23984 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23991 if test ! -d "$srcdir/$cf_dir" ; then
23993 elif test -f "$srcdir/$cf_dir/programs" ; then
23994 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
23998 cat >>Makefile <<TEST_EOF
24000 # These rules are generated so we do not rely on suffix rules, which do not
24001 # work consistently for different make-programs (the '\$(MODEL)/' confuses
24002 # some, and the '\$x' confuses others).
24005 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
24008 cat >>Makefile <<TEST_EOF
24010 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
24011 \$(srcdir)/test.priv.h \\
24014 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) -DMODULE_NAME="$N" \$(srcdir)/$N.c
24018 if test -f ../config.guess && test -f ../config.sub
24020 cat >>Makefile <<TEST_EOF
24022 # if we used CF_INHERIT for getting these files, we can remove them
24024 rm -f config.guess config.sub
24032 cat >>"$CONFIG_STATUS" <<\EOF
24034 { (exit 0); exit 0; }
24036 chmod +x "$CONFIG_STATUS"
24037 ac_clean_files=$ac_clean_files_save
24039 # configure is writing to config.log, and then calls config.status.
24040 # config.status does its own redirection, appending to config.log.
24041 # Unfortunately, on DOS this fails, as config.log is still kept open
24042 # by configure, so config.status won't be able to write to it; its
24043 # output is simply discarded. So we exec the FD to /dev/null,
24044 # effectively closing config.log, so it can be properly (re)opened and
24045 # appended to by config.status. When coming back to configure, we
24046 # need to make the FD available again.
24047 if test "$no_create" != yes; then
24050 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
24052 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24053 # would make configure fail if this is the last instruction.
24054 "$ac_cs_success" || { (exit 1); exit 1; }