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 if filesystem supports mixed-case filenames" >&5
3001 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3002 if test "${cf_cv_mixedcase+set}" = set; then
3003 echo $ECHO_N "(cached) $ECHO_C" >&6
3006 if test "$cross_compiling" = yes ; then
3007 case "$target_alias" in
3008 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3016 rm -f conftest CONFTEST
3018 if test -f CONFTEST ; then
3023 rm -f conftest CONFTEST
3027 echo "$as_me:3027: result: $cf_cv_mixedcase" >&5
3028 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3029 test "$cf_cv_mixedcase" = yes &&
3030 cat >>confdefs.h <<\EOF
3031 #define MIXEDCASE_FILENAMES 1
3034 for ac_prog in exctags ctags
3036 # Extract the first word of "$ac_prog", so it can be a program name with args.
3037 set dummy $ac_prog; ac_word=$2
3038 echo "$as_me:3038: checking for $ac_word" >&5
3039 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3040 if test "${ac_cv_prog_CTAGS+set}" = set; then
3041 echo $ECHO_N "(cached) $ECHO_C" >&6
3043 if test -n "$CTAGS"; then
3044 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3046 ac_save_IFS=$IFS; IFS=$ac_path_separator
3048 for ac_dir in $ac_dummy; do
3050 test -z "$ac_dir" && ac_dir=.
3051 $as_executable_p "$ac_dir/$ac_word" || continue
3052 ac_cv_prog_CTAGS="$ac_prog"
3053 echo "$as_me:3053: found $ac_dir/$ac_word" >&5
3059 CTAGS=$ac_cv_prog_CTAGS
3060 if test -n "$CTAGS"; then
3061 echo "$as_me:3061: result: $CTAGS" >&5
3062 echo "${ECHO_T}$CTAGS" >&6
3064 echo "$as_me:3064: result: no" >&5
3065 echo "${ECHO_T}no" >&6
3068 test -n "$CTAGS" && break
3071 for ac_prog in exetags etags
3073 # Extract the first word of "$ac_prog", so it can be a program name with args.
3074 set dummy $ac_prog; ac_word=$2
3075 echo "$as_me:3075: checking for $ac_word" >&5
3076 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3077 if test "${ac_cv_prog_ETAGS+set}" = set; then
3078 echo $ECHO_N "(cached) $ECHO_C" >&6
3080 if test -n "$ETAGS"; then
3081 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3083 ac_save_IFS=$IFS; IFS=$ac_path_separator
3085 for ac_dir in $ac_dummy; do
3087 test -z "$ac_dir" && ac_dir=.
3088 $as_executable_p "$ac_dir/$ac_word" || continue
3089 ac_cv_prog_ETAGS="$ac_prog"
3090 echo "$as_me:3090: found $ac_dir/$ac_word" >&5
3096 ETAGS=$ac_cv_prog_ETAGS
3097 if test -n "$ETAGS"; then
3098 echo "$as_me:3098: result: $ETAGS" >&5
3099 echo "${ECHO_T}$ETAGS" >&6
3101 echo "$as_me:3101: result: no" >&5
3102 echo "${ECHO_T}no" >&6
3105 test -n "$ETAGS" && break
3108 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3109 set dummy ${CTAGS:-ctags}; ac_word=$2
3110 echo "$as_me:3110: checking for $ac_word" >&5
3111 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3112 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3113 echo $ECHO_N "(cached) $ECHO_C" >&6
3115 if test -n "$MAKE_LOWER_TAGS"; then
3116 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3118 ac_save_IFS=$IFS; IFS=$ac_path_separator
3120 for ac_dir in $ac_dummy; do
3122 test -z "$ac_dir" && ac_dir=.
3123 $as_executable_p "$ac_dir/$ac_word" || continue
3124 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3125 echo "$as_me:3125: found $ac_dir/$ac_word" >&5
3129 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3132 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3133 if test -n "$MAKE_LOWER_TAGS"; then
3134 echo "$as_me:3134: result: $MAKE_LOWER_TAGS" >&5
3135 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3137 echo "$as_me:3137: result: no" >&5
3138 echo "${ECHO_T}no" >&6
3141 if test "$cf_cv_mixedcase" = yes ; then
3142 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3143 set dummy ${ETAGS:-etags}; ac_word=$2
3144 echo "$as_me:3144: checking for $ac_word" >&5
3145 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3146 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3147 echo $ECHO_N "(cached) $ECHO_C" >&6
3149 if test -n "$MAKE_UPPER_TAGS"; then
3150 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3152 ac_save_IFS=$IFS; IFS=$ac_path_separator
3154 for ac_dir in $ac_dummy; do
3156 test -z "$ac_dir" && ac_dir=.
3157 $as_executable_p "$ac_dir/$ac_word" || continue
3158 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3159 echo "$as_me:3159: found $ac_dir/$ac_word" >&5
3163 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3166 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3167 if test -n "$MAKE_UPPER_TAGS"; then
3168 echo "$as_me:3168: result: $MAKE_UPPER_TAGS" >&5
3169 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3171 echo "$as_me:3171: result: no" >&5
3172 echo "${ECHO_T}no" >&6
3179 if test "$MAKE_UPPER_TAGS" = yes ; then
3185 if test "$MAKE_LOWER_TAGS" = yes ; then
3191 echo "$as_me:3191: checking if -lm needed for math functions" >&5
3192 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
3193 if test "${cf_cv_need_libm+set}" = set; then
3194 echo $ECHO_N "(cached) $ECHO_C" >&6
3197 cat >"conftest.$ac_ext" <<_ACEOF
3198 #line 3198 "configure"
3199 #include "confdefs.h"
3208 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
3213 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3214 if { (eval echo "$as_me:3214: \"$ac_link\"") >&5
3215 (eval $ac_link) 2>&5
3217 echo "$as_me:3217: \$? = $ac_status" >&5
3218 (exit "$ac_status"); } &&
3219 { ac_try='test -s "conftest$ac_exeext"'
3220 { (eval echo "$as_me:3220: \"$ac_try\"") >&5
3223 echo "$as_me:3223: \$? = $ac_status" >&5
3224 (exit "$ac_status"); }; }; then
3227 echo "$as_me: failed program was:" >&5
3228 cat "conftest.$ac_ext" >&5
3231 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3233 echo "$as_me:3233: result: $cf_cv_need_libm" >&5
3234 echo "${ECHO_T}$cf_cv_need_libm" >&6
3235 if test "$cf_cv_need_libm" = yes
3243 CC_SHARED_OPTS=unknown
3244 CPPFLAGS="$CPPFLAGS"
3246 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
3247 DFT_UPR_MODEL="NORMAL"
3260 PACKAGE="ncurses-examples"
3266 TINFO_LIBS='$(LIBS_CURSES)'
3267 cf_cv_abi_version=""
3268 cf_cv_rel_version=""
3274 echo "$as_me:3274: checking for fgrep" >&5
3275 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
3276 if test "${ac_cv_path_FGREP+set}" = set; then
3277 echo $ECHO_N "(cached) $ECHO_C" >&6
3279 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
3280 then ac_cv_path_FGREP="$GREP -F"
3282 for ac_prog in gfgrep fgrep
3284 # Extract the first word of "$ac_prog", so it can be a program name with args.
3285 set dummy $ac_prog; ac_word=$2
3286 echo "$as_me:3286: checking for $ac_word" >&5
3287 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3288 if test "${ac_cv_path_FGREP+set}" = set; then
3289 echo $ECHO_N "(cached) $ECHO_C" >&6
3293 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
3296 ac_save_IFS=$IFS; IFS=$ac_path_separator
3298 for ac_dir in $ac_dummy; do
3300 test -z "$ac_dir" && ac_dir=.
3301 if $as_executable_p "$ac_dir/$ac_word"; then
3302 ac_cv_path_FGREP="$ac_dir/$ac_word"
3303 echo "$as_me:3303: found $ac_dir/$ac_word" >&5
3311 FGREP=$ac_cv_path_FGREP
3313 if test -n "$FGREP"; then
3314 echo "$as_me:3314: result: $FGREP" >&5
3315 echo "${ECHO_T}$FGREP" >&6
3317 echo "$as_me:3317: result: no" >&5
3318 echo "${ECHO_T}no" >&6
3321 test -n "$FGREP" && break
3323 test -n "$FGREP" || FGREP=": "
3325 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:3325: error: cannot find workable fgrep" >&5
3326 echo "$as_me: error: cannot find workable fgrep" >&2;}
3327 { (exit 1); exit 1; }; }
3330 echo "$as_me:3330: result: $ac_cv_path_FGREP" >&5
3331 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
3332 FGREP="$ac_cv_path_FGREP"
3334 echo "$as_me:3334: checking if you want to use C11 _Noreturn feature" >&5
3335 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
3337 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
3338 if test "${enable_stdnoreturn+set}" = set; then
3339 enableval="$enable_stdnoreturn"
3340 test "$enableval" != yes && enableval=no
3341 if test "$enableval" != "no" ; then
3342 enable_stdnoreturn=yes
3344 enable_stdnoreturn=no
3348 enable_stdnoreturn=no
3351 echo "$as_me:3351: result: $enable_stdnoreturn" >&5
3352 echo "${ECHO_T}$enable_stdnoreturn" >&6
3354 if test $enable_stdnoreturn = yes; then
3355 echo "$as_me:3355: checking for C11 _Noreturn feature" >&5
3356 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
3357 if test "${cf_cv_c11_noreturn+set}" = set; then
3358 echo $ECHO_N "(cached) $ECHO_C" >&6
3360 cat >"conftest.$ac_ext" <<_ACEOF
3361 #line 3361 "configure"
3362 #include "confdefs.h"
3366 #include <stdnoreturn.h>
3367 static _Noreturn void giveup(void) { exit(0); }
3372 if (feof(stdin)) giveup()
3377 rm -f "conftest.$ac_objext"
3378 if { (eval echo "$as_me:3378: \"$ac_compile\"") >&5
3379 (eval $ac_compile) 2>&5
3381 echo "$as_me:3381: \$? = $ac_status" >&5
3382 (exit "$ac_status"); } &&
3383 { ac_try='test -s "conftest.$ac_objext"'
3384 { (eval echo "$as_me:3384: \"$ac_try\"") >&5
3387 echo "$as_me:3387: \$? = $ac_status" >&5
3388 (exit "$ac_status"); }; }; then
3389 cf_cv_c11_noreturn=yes
3391 echo "$as_me: failed program was:" >&5
3392 cat "conftest.$ac_ext" >&5
3393 cf_cv_c11_noreturn=no
3395 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3398 echo "$as_me:3398: result: $cf_cv_c11_noreturn" >&5
3399 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
3401 cf_cv_c11_noreturn=no,
3404 if test "$cf_cv_c11_noreturn" = yes; then
3406 cat >>confdefs.h <<\EOF
3407 #define HAVE_STDNORETURN_H 1
3410 cat >>confdefs.h <<EOF
3411 #define STDC_NORETURN _Noreturn
3414 HAVE_STDNORETURN_H=1
3416 HAVE_STDNORETURN_H=0
3419 if test "$GCC" = yes || test "$GXX" = yes
3421 cat > conftest.i <<EOF
3423 #define GCC_PRINTF 0
3428 #ifndef GCC_NORETURN
3429 #define GCC_NORETURN /* nothing */
3432 #define GCC_UNUSED /* nothing */
3435 if test "$GCC" = yes
3437 { echo "$as_me:3437: checking for $CC __attribute__ directives..." >&5
3438 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
3439 cat > "conftest.$ac_ext" <<EOF
3440 #line 3440 "${as_me:-configure}"
3441 #include "confdefs.h"
3442 #include "conftest.h"
3443 #include "conftest.i"
3445 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3447 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
3450 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
3452 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
3454 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
3455 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
3456 extern GCC_NORETURN void foo(void);
3457 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
3459 cf_printf_attribute=no
3460 cf_scanf_attribute=no
3461 for cf_attribute in scanf printf unused noreturn
3464 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3466 cf_directive="__attribute__(($cf_attribute))"
3467 echo "checking for $CC $cf_directive" 1>&5
3469 case "$cf_attribute" in
3471 cf_printf_attribute=yes
3472 cat >conftest.h <<EOF
3473 #define GCC_$cf_ATTRIBUTE 1
3477 cf_scanf_attribute=yes
3478 cat >conftest.h <<EOF
3479 #define GCC_$cf_ATTRIBUTE 1
3483 cat >conftest.h <<EOF
3484 #define GCC_$cf_ATTRIBUTE $cf_directive
3489 if { (eval echo "$as_me:3489: \"$ac_compile\"") >&5
3490 (eval $ac_compile) 2>&5
3492 echo "$as_me:3492: \$? = $ac_status" >&5
3493 (exit "$ac_status"); }; then
3494 test -n "$verbose" && echo "$as_me:3494: result: ... $cf_attribute" >&5
3495 echo "${ECHO_T}... $cf_attribute" >&6
3496 cat conftest.h >>confdefs.h
3497 case "$cf_attribute" in
3500 cat >>confdefs.h <<EOF
3501 #define GCC_NORETURN $cf_directive
3506 cf_value='/* nothing */'
3507 if test "$cf_printf_attribute" != no ; then
3508 cf_value='__attribute__((format(printf,fmt,var)))'
3510 cat >>confdefs.h <<\EOF
3511 #define GCC_PRINTF 1
3516 cat >>confdefs.h <<EOF
3517 #define GCC_PRINTFLIKE(fmt,var) $cf_value
3522 cf_value='/* nothing */'
3523 if test "$cf_scanf_attribute" != no ; then
3524 cf_value='__attribute__((format(scanf,fmt,var)))'
3526 cat >>confdefs.h <<\EOF
3532 cat >>confdefs.h <<EOF
3533 #define GCC_SCANFLIKE(fmt,var) $cf_value
3539 cat >>confdefs.h <<EOF
3540 #define GCC_UNUSED $cf_directive
3548 ${FGREP-fgrep} define conftest.i >>confdefs.h
3553 echo "$as_me:3553: checking if you want to work around bogus compiler/loader warnings" >&5
3554 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
3556 # Check whether --enable-string-hacks or --disable-string-hacks was given.
3557 if test "${enable_string_hacks+set}" = set; then
3558 enableval="$enable_string_hacks"
3559 enable_string_hacks=$enableval
3561 enable_string_hacks=no
3563 echo "$as_me:3563: result: $enable_string_hacks" >&5
3564 echo "${ECHO_T}$enable_string_hacks" >&6
3566 if test "x$enable_string_hacks" = "xyes"; then
3568 cat >>confdefs.h <<\EOF
3569 #define USE_STRING_HACKS 1
3572 { echo "$as_me:3572: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
3573 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
3574 echo "$as_me:3574: checking for strlcat" >&5
3575 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
3576 if test "${ac_cv_func_strlcat+set}" = set; then
3577 echo $ECHO_N "(cached) $ECHO_C" >&6
3579 cat >"conftest.$ac_ext" <<_ACEOF
3580 #line 3580 "configure"
3581 #include "confdefs.h"
3582 #define strlcat autoconf_temporary
3583 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3590 /* We use char because int might match the return type of a gcc2
3591 builtin and then its argument prototype would still apply. */
3592 char strlcat (void);
3598 /* The GNU C library defines stubs for functions which it implements
3599 to always fail with ENOSYS. Some functions are actually named
3600 something starting with __ and the normal name is an alias. */
3601 #if defined (__stub_strlcat) || defined (__stub___strlcat)
3602 #error found stub for strlcat
3610 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3611 if { (eval echo "$as_me:3611: \"$ac_link\"") >&5
3612 (eval $ac_link) 2>&5
3614 echo "$as_me:3614: \$? = $ac_status" >&5
3615 (exit "$ac_status"); } &&
3616 { ac_try='test -s "conftest$ac_exeext"'
3617 { (eval echo "$as_me:3617: \"$ac_try\"") >&5
3620 echo "$as_me:3620: \$? = $ac_status" >&5
3621 (exit "$ac_status"); }; }; then
3622 ac_cv_func_strlcat=yes
3624 echo "$as_me: failed program was:" >&5
3625 cat "conftest.$ac_ext" >&5
3626 ac_cv_func_strlcat=no
3628 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3630 echo "$as_me:3630: result: $ac_cv_func_strlcat" >&5
3631 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
3632 if test "$ac_cv_func_strlcat" = yes; then
3634 cat >>confdefs.h <<\EOF
3635 #define HAVE_STRLCAT 1
3640 echo "$as_me:3640: checking for strlcat in -lbsd" >&5
3641 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
3642 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
3643 echo $ECHO_N "(cached) $ECHO_C" >&6
3645 ac_check_lib_save_LIBS=$LIBS
3647 cat >"conftest.$ac_ext" <<_ACEOF
3648 #line 3648 "configure"
3649 #include "confdefs.h"
3651 /* Override any gcc2 internal prototype to avoid an error. */
3655 /* We use char because int might match the return type of a gcc2
3656 builtin and then its argument prototype would still apply. */
3666 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3667 if { (eval echo "$as_me:3667: \"$ac_link\"") >&5
3668 (eval $ac_link) 2>&5
3670 echo "$as_me:3670: \$? = $ac_status" >&5
3671 (exit "$ac_status"); } &&
3672 { ac_try='test -s "conftest$ac_exeext"'
3673 { (eval echo "$as_me:3673: \"$ac_try\"") >&5
3676 echo "$as_me:3676: \$? = $ac_status" >&5
3677 (exit "$ac_status"); }; }; then
3678 ac_cv_lib_bsd_strlcat=yes
3680 echo "$as_me: failed program was:" >&5
3681 cat "conftest.$ac_ext" >&5
3682 ac_cv_lib_bsd_strlcat=no
3684 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3685 LIBS=$ac_check_lib_save_LIBS
3687 echo "$as_me:3687: result: $ac_cv_lib_bsd_strlcat" >&5
3688 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
3689 if test "$ac_cv_lib_bsd_strlcat" = yes; then
3694 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
3696 for cf_add_1lib in $cf_add_0lib; do
3697 for cf_add_2lib in $cf_add_libs; do
3698 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
3703 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
3707 for ac_header in bsd/string.h
3709 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3710 echo "$as_me:3710: checking for $ac_header" >&5
3711 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3712 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3713 echo $ECHO_N "(cached) $ECHO_C" >&6
3715 cat >"conftest.$ac_ext" <<_ACEOF
3716 #line 3716 "configure"
3717 #include "confdefs.h"
3718 #include <$ac_header>
3720 if { (eval echo "$as_me:3720: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3721 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3723 $EGREP -v '^ *\+' conftest.er1 >conftest.err
3725 cat conftest.err >&5
3726 echo "$as_me:3726: \$? = $ac_status" >&5
3727 (exit "$ac_status"); } >/dev/null; then
3728 if test -s conftest.err; then
3729 ac_cpp_err=$ac_c_preproc_warn_flag
3736 if test -z "$ac_cpp_err"; then
3737 eval "$as_ac_Header=yes"
3739 echo "$as_me: failed program was:" >&5
3740 cat "conftest.$ac_ext" >&5
3741 eval "$as_ac_Header=no"
3743 rm -f conftest.err "conftest.$ac_ext"
3745 echo "$as_me:3745: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
3746 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
3747 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
3748 cat >>confdefs.h <<EOF
3749 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3755 cat >>confdefs.h <<\EOF
3756 #define HAVE_STRLCAT 1
3763 for ac_func in strlcpy snprintf
3765 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3766 echo "$as_me:3766: checking for $ac_func" >&5
3767 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3768 if eval "test \"\${$as_ac_var+set}\" = set"; then
3769 echo $ECHO_N "(cached) $ECHO_C" >&6
3771 cat >"conftest.$ac_ext" <<_ACEOF
3772 #line 3772 "configure"
3773 #include "confdefs.h"
3774 #define $ac_func autoconf_temporary
3775 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3782 /* We use char because int might match the return type of a gcc2
3783 builtin and then its argument prototype would still apply. */
3784 char $ac_func (void);
3790 /* The GNU C library defines stubs for functions which it implements
3791 to always fail with ENOSYS. Some functions are actually named
3792 something starting with __ and the normal name is an alias. */
3793 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3794 #error found stub for $ac_func
3802 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3803 if { (eval echo "$as_me:3803: \"$ac_link\"") >&5
3804 (eval $ac_link) 2>&5
3806 echo "$as_me:3806: \$? = $ac_status" >&5
3807 (exit "$ac_status"); } &&
3808 { ac_try='test -s "conftest$ac_exeext"'
3809 { (eval echo "$as_me:3809: \"$ac_try\"") >&5
3812 echo "$as_me:3812: \$? = $ac_status" >&5
3813 (exit "$ac_status"); }; }; then
3814 eval "$as_ac_var=yes"
3816 echo "$as_me: failed program was:" >&5
3817 cat "conftest.$ac_ext" >&5
3818 eval "$as_ac_var=no"
3820 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3822 echo "$as_me:3822: result: `eval echo '${'"$as_ac_var"'}'`" >&5
3823 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
3824 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
3825 cat >>confdefs.h <<EOF
3826 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3834 echo "$as_me:3834: checking if the POSIX test-macros are already defined" >&5
3835 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
3836 if test "${cf_cv_posix_visible+set}" = set; then
3837 echo $ECHO_N "(cached) $ECHO_C" >&6
3840 cat >"conftest.$ac_ext" <<_ACEOF
3841 #line 3841 "configure"
3842 #include "confdefs.h"
3848 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
3849 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
3850 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
3851 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
3852 #error conflicting symbols found
3859 rm -f "conftest.$ac_objext"
3860 if { (eval echo "$as_me:3860: \"$ac_compile\"") >&5
3861 (eval $ac_compile) 2>&5
3863 echo "$as_me:3863: \$? = $ac_status" >&5
3864 (exit "$ac_status"); } &&
3865 { ac_try='test -s "conftest.$ac_objext"'
3866 { (eval echo "$as_me:3866: \"$ac_try\"") >&5
3869 echo "$as_me:3869: \$? = $ac_status" >&5
3870 (exit "$ac_status"); }; }; then
3871 cf_cv_posix_visible=no
3873 echo "$as_me: failed program was:" >&5
3874 cat "conftest.$ac_ext" >&5
3875 cf_cv_posix_visible=yes
3877 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3880 echo "$as_me:3880: result: $cf_cv_posix_visible" >&5
3881 echo "${ECHO_T}$cf_cv_posix_visible" >&6
3883 if test "$cf_cv_posix_visible" = no; then
3886 cf_POSIX_C_SOURCE=199506L
3891 cf_xopen_source="-D_ALL_SOURCE"
3897 cf_xopen_source="-D_APPLE_C_SOURCE"
3900 cf_xopen_source="-D_DARWIN_C_SOURCE"
3903 (freebsd*|dragonfly*|midnightbsd*)
3904 # 5.x headers associate
3905 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3906 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3907 cf_POSIX_C_SOURCE=200112L
3909 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3912 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3915 cf_xopen_source="-D_HPUX_SOURCE"
3918 cf_xopen_source="-D_SGI_SOURCE"
3921 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3923 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3925 echo "$as_me:3925: checking if this is the GNU C library" >&5
3926 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3927 if test "${cf_cv_gnu_library+set}" = set; then
3928 echo $ECHO_N "(cached) $ECHO_C" >&6
3931 cat >"conftest.$ac_ext" <<_ACEOF
3932 #line 3932 "configure"
3933 #include "confdefs.h"
3934 #include <sys/types.h>
3939 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3941 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
3944 # error not GNU C library
3950 rm -f "conftest.$ac_objext"
3951 if { (eval echo "$as_me:3951: \"$ac_compile\"") >&5
3952 (eval $ac_compile) 2>&5
3954 echo "$as_me:3954: \$? = $ac_status" >&5
3955 (exit "$ac_status"); } &&
3956 { ac_try='test -s "conftest.$ac_objext"'
3957 { (eval echo "$as_me:3957: \"$ac_try\"") >&5
3960 echo "$as_me:3960: \$? = $ac_status" >&5
3961 (exit "$ac_status"); }; }; then
3962 cf_cv_gnu_library=yes
3964 echo "$as_me: failed program was:" >&5
3965 cat "conftest.$ac_ext" >&5
3966 cf_cv_gnu_library=no
3968 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3971 echo "$as_me:3971: result: $cf_cv_gnu_library" >&5
3972 echo "${ECHO_T}$cf_cv_gnu_library" >&6
3974 if test x$cf_cv_gnu_library = xyes; then
3976 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3977 # was changed to help a little. newlib incorporated the change about 4
3979 echo "$as_me:3979: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3980 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3981 if test "${cf_cv_gnu_library_219+set}" = set; then
3982 echo $ECHO_N "(cached) $ECHO_C" >&6
3987 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3988 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3990 cat >"conftest.$ac_ext" <<_ACEOF
3991 #line 3991 "configure"
3992 #include "confdefs.h"
3993 #include <sys/types.h>
3998 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
4000 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
4003 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
4009 rm -f "conftest.$ac_objext"
4010 if { (eval echo "$as_me:4010: \"$ac_compile\"") >&5
4011 (eval $ac_compile) 2>&5
4013 echo "$as_me:4013: \$? = $ac_status" >&5
4014 (exit "$ac_status"); } &&
4015 { ac_try='test -s "conftest.$ac_objext"'
4016 { (eval echo "$as_me:4016: \"$ac_try\"") >&5
4019 echo "$as_me:4019: \$? = $ac_status" >&5
4020 (exit "$ac_status"); }; }; then
4021 cf_cv_gnu_library_219=yes
4023 echo "$as_me: failed program was:" >&5
4024 cat "conftest.$ac_ext" >&5
4025 cf_cv_gnu_library_219=no
4027 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4031 echo "$as_me:4031: result: $cf_cv_gnu_library_219" >&5
4032 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
4034 if test "x$cf_cv_gnu_library_219" = xyes; then
4036 echo "$as_me:4036: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
4037 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
4038 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
4039 echo $ECHO_N "(cached) $ECHO_C" >&6
4045 cf_new_extra_cppflags=
4047 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
4049 case "$cf_fix_cppflags" in
4051 case "$cf_add_cflags" in
4052 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4053 case "$cf_add_cflags" in
4055 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4057 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4058 && test -z "${cf_tst_cflags}" \
4059 && cf_fix_cppflags=yes
4061 if test "$cf_fix_cppflags" = yes ; then
4063 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4064 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4067 elif test "${cf_tst_cflags}" = "\"'" ; then
4069 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4070 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4080 case "$cf_add_cflags" in
4082 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4084 CPPFLAGS=`echo "$CPPFLAGS" | \
4085 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4086 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4091 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4092 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4099 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4100 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4107 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4108 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4110 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4112 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4113 && test -z "${cf_tst_cflags}" \
4114 && cf_fix_cppflags=no
4119 if test -n "$cf_new_cflags" ; then
4121 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4122 CFLAGS="${CFLAGS}$cf_new_cflags"
4126 if test -n "$cf_new_cppflags" ; then
4128 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4129 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4133 if test -n "$cf_new_extra_cppflags" ; then
4135 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4136 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4140 cat >"conftest.$ac_ext" <<_ACEOF
4141 #line 4141 "configure"
4142 #include "confdefs.h"
4145 #include <sys/types.h>
4151 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
4154 # error GNU C library is too old
4160 rm -f "conftest.$ac_objext"
4161 if { (eval echo "$as_me:4161: \"$ac_compile\"") >&5
4162 (eval $ac_compile) 2>&5
4164 echo "$as_me:4164: \$? = $ac_status" >&5
4165 (exit "$ac_status"); } &&
4166 { ac_try='test -s "conftest.$ac_objext"'
4167 { (eval echo "$as_me:4167: \"$ac_try\"") >&5
4170 echo "$as_me:4170: \$? = $ac_status" >&5
4171 (exit "$ac_status"); }; }; then
4172 cf_cv_gnu_dftsrc_219=yes
4174 echo "$as_me: failed program was:" >&5
4175 cat "conftest.$ac_ext" >&5
4176 cf_cv_gnu_dftsrc_219=no
4178 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4181 echo "$as_me:4181: result: $cf_cv_gnu_dftsrc_219" >&5
4182 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
4183 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
4185 cf_cv_gnu_dftsrc_219=maybe
4188 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
4190 echo "$as_me:4190: checking if we must define _GNU_SOURCE" >&5
4191 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
4192 if test "${cf_cv_gnu_source+set}" = set; then
4193 echo $ECHO_N "(cached) $ECHO_C" >&6
4196 cat >"conftest.$ac_ext" <<_ACEOF
4197 #line 4197 "configure"
4198 #include "confdefs.h"
4199 #include <sys/types.h>
4204 #ifndef _XOPEN_SOURCE
4205 #error expected _XOPEN_SOURCE to be defined
4211 rm -f "conftest.$ac_objext"
4212 if { (eval echo "$as_me:4212: \"$ac_compile\"") >&5
4213 (eval $ac_compile) 2>&5
4215 echo "$as_me:4215: \$? = $ac_status" >&5
4216 (exit "$ac_status"); } &&
4217 { ac_try='test -s "conftest.$ac_objext"'
4218 { (eval echo "$as_me:4218: \"$ac_try\"") >&5
4221 echo "$as_me:4221: \$? = $ac_status" >&5
4222 (exit "$ac_status"); }; }; then
4225 echo "$as_me: failed program was:" >&5
4226 cat "conftest.$ac_ext" >&5
4232 cf_new_extra_cppflags=
4234 for cf_add_cflags in -D_GNU_SOURCE
4236 case "$cf_fix_cppflags" in
4238 case "$cf_add_cflags" in
4239 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4240 case "$cf_add_cflags" in
4242 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4244 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4245 && test -z "${cf_tst_cflags}" \
4246 && cf_fix_cppflags=yes
4248 if test "$cf_fix_cppflags" = yes ; then
4250 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4251 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4254 elif test "${cf_tst_cflags}" = "\"'" ; then
4256 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4257 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4267 case "$cf_add_cflags" in
4269 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4271 CPPFLAGS=`echo "$CPPFLAGS" | \
4272 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4273 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4278 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4279 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4286 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4287 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4294 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4295 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4297 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4299 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4300 && test -z "${cf_tst_cflags}" \
4301 && cf_fix_cppflags=no
4306 if test -n "$cf_new_cflags" ; then
4308 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4309 CFLAGS="${CFLAGS}$cf_new_cflags"
4313 if test -n "$cf_new_cppflags" ; then
4315 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4316 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4320 if test -n "$cf_new_extra_cppflags" ; then
4322 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4323 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4327 cat >"conftest.$ac_ext" <<_ACEOF
4328 #line 4328 "configure"
4329 #include "confdefs.h"
4330 #include <sys/types.h>
4335 #ifdef _XOPEN_SOURCE
4336 #error expected _XOPEN_SOURCE to be undefined
4342 rm -f "conftest.$ac_objext"
4343 if { (eval echo "$as_me:4343: \"$ac_compile\"") >&5
4344 (eval $ac_compile) 2>&5
4346 echo "$as_me:4346: \$? = $ac_status" >&5
4347 (exit "$ac_status"); } &&
4348 { ac_try='test -s "conftest.$ac_objext"'
4349 { (eval echo "$as_me:4349: \"$ac_try\"") >&5
4352 echo "$as_me:4352: \$? = $ac_status" >&5
4353 (exit "$ac_status"); }; }; then
4356 echo "$as_me: failed program was:" >&5
4357 cat "conftest.$ac_ext" >&5
4358 cf_cv_gnu_source=yes
4360 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4364 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4367 echo "$as_me:4367: result: $cf_cv_gnu_source" >&5
4368 echo "${ECHO_T}$cf_cv_gnu_source" >&6
4370 if test "$cf_cv_gnu_source" = yes
4372 echo "$as_me:4372: checking if we should also define _DEFAULT_SOURCE" >&5
4373 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
4374 if test "${cf_cv_default_source+set}" = set; then
4375 echo $ECHO_N "(cached) $ECHO_C" >&6
4378 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4379 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
4381 cat >"conftest.$ac_ext" <<_ACEOF
4382 #line 4382 "configure"
4383 #include "confdefs.h"
4384 #include <sys/types.h>
4389 #ifdef _DEFAULT_SOURCE
4390 #error expected _DEFAULT_SOURCE to be undefined
4396 rm -f "conftest.$ac_objext"
4397 if { (eval echo "$as_me:4397: \"$ac_compile\"") >&5
4398 (eval $ac_compile) 2>&5
4400 echo "$as_me:4400: \$? = $ac_status" >&5
4401 (exit "$ac_status"); } &&
4402 { ac_try='test -s "conftest.$ac_objext"'
4403 { (eval echo "$as_me:4403: \"$ac_try\"") >&5
4406 echo "$as_me:4406: \$? = $ac_status" >&5
4407 (exit "$ac_status"); }; }; then
4408 cf_cv_default_source=no
4410 echo "$as_me: failed program was:" >&5
4411 cat "conftest.$ac_ext" >&5
4412 cf_cv_default_source=yes
4414 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4417 echo "$as_me:4417: result: $cf_cv_default_source" >&5
4418 echo "${ECHO_T}$cf_cv_default_source" >&6
4419 if test "$cf_cv_default_source" = yes
4422 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4423 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
4433 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
4436 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
4439 if test "$cf_cv_posix_visible" = no; then
4441 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4443 cf_save_CFLAGS="$CFLAGS"
4444 cf_save_CPPFLAGS="$CPPFLAGS"
4446 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4447 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4448 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4450 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4451 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4452 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4454 echo "$as_me:4454: checking if we should define _POSIX_C_SOURCE" >&5
4455 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4456 if test "${cf_cv_posix_c_source+set}" = set; then
4457 echo $ECHO_N "(cached) $ECHO_C" >&6
4460 echo "${as_me:-configure}:4460: testing if the symbol is already defined go no further ..." 1>&5
4462 cat >"conftest.$ac_ext" <<_ACEOF
4463 #line 4463 "configure"
4464 #include "confdefs.h"
4465 #include <sys/types.h>
4470 #ifndef _POSIX_C_SOURCE
4477 rm -f "conftest.$ac_objext"
4478 if { (eval echo "$as_me:4478: \"$ac_compile\"") >&5
4479 (eval $ac_compile) 2>&5
4481 echo "$as_me:4481: \$? = $ac_status" >&5
4482 (exit "$ac_status"); } &&
4483 { ac_try='test -s "conftest.$ac_objext"'
4484 { (eval echo "$as_me:4484: \"$ac_try\"") >&5
4487 echo "$as_me:4487: \$? = $ac_status" >&5
4488 (exit "$ac_status"); }; }; then
4489 cf_cv_posix_c_source=no
4491 echo "$as_me: failed program was:" >&5
4492 cat "conftest.$ac_ext" >&5
4493 cf_want_posix_source=no
4494 case .$cf_POSIX_C_SOURCE in
4496 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4499 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4500 cf_want_posix_source=yes
4503 cf_want_posix_source=yes
4506 if test "$cf_want_posix_source" = yes ; then
4507 cat >"conftest.$ac_ext" <<_ACEOF
4508 #line 4508 "configure"
4509 #include "confdefs.h"
4510 #include <sys/types.h>
4515 #ifdef _POSIX_SOURCE
4522 rm -f "conftest.$ac_objext"
4523 if { (eval echo "$as_me:4523: \"$ac_compile\"") >&5
4524 (eval $ac_compile) 2>&5
4526 echo "$as_me:4526: \$? = $ac_status" >&5
4527 (exit "$ac_status"); } &&
4528 { ac_try='test -s "conftest.$ac_objext"'
4529 { (eval echo "$as_me:4529: \"$ac_try\"") >&5
4532 echo "$as_me:4532: \$? = $ac_status" >&5
4533 (exit "$ac_status"); }; }; then
4536 echo "$as_me: failed program was:" >&5
4537 cat "conftest.$ac_ext" >&5
4538 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4540 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4543 echo "${as_me:-configure}:4543: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4545 CFLAGS="$cf_trim_CFLAGS"
4546 CPPFLAGS="$cf_trim_CPPFLAGS"
4548 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4549 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4551 echo "${as_me:-configure}:4551: testing if the second compile does not leave our definition intact error ..." 1>&5
4553 cat >"conftest.$ac_ext" <<_ACEOF
4554 #line 4554 "configure"
4555 #include "confdefs.h"
4556 #include <sys/types.h>
4561 #ifndef _POSIX_C_SOURCE
4568 rm -f "conftest.$ac_objext"
4569 if { (eval echo "$as_me:4569: \"$ac_compile\"") >&5
4570 (eval $ac_compile) 2>&5
4572 echo "$as_me:4572: \$? = $ac_status" >&5
4573 (exit "$ac_status"); } &&
4574 { ac_try='test -s "conftest.$ac_objext"'
4575 { (eval echo "$as_me:4575: \"$ac_try\"") >&5
4578 echo "$as_me:4578: \$? = $ac_status" >&5
4579 (exit "$ac_status"); }; }; then
4582 echo "$as_me: failed program was:" >&5
4583 cat "conftest.$ac_ext" >&5
4584 cf_cv_posix_c_source=no
4586 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4587 CFLAGS="$cf_save_CFLAGS"
4588 CPPFLAGS="$cf_save_CPPFLAGS"
4591 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4594 echo "$as_me:4594: result: $cf_cv_posix_c_source" >&5
4595 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4597 if test "$cf_cv_posix_c_source" != no ; then
4598 CFLAGS="$cf_trim_CFLAGS"
4599 CPPFLAGS="$cf_trim_CPPFLAGS"
4604 cf_new_extra_cppflags=
4606 for cf_add_cflags in $cf_cv_posix_c_source
4608 case "$cf_fix_cppflags" in
4610 case "$cf_add_cflags" in
4611 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4612 case "$cf_add_cflags" in
4614 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4616 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4617 && test -z "${cf_tst_cflags}" \
4618 && cf_fix_cppflags=yes
4620 if test "$cf_fix_cppflags" = yes ; then
4622 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4623 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4626 elif test "${cf_tst_cflags}" = "\"'" ; then
4628 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4629 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4639 case "$cf_add_cflags" in
4641 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4643 CPPFLAGS=`echo "$CPPFLAGS" | \
4644 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4645 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4650 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4651 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4658 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4659 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4666 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4667 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4669 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4671 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4672 && test -z "${cf_tst_cflags}" \
4673 && cf_fix_cppflags=no
4678 if test -n "$cf_new_cflags" ; then
4680 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4681 CFLAGS="${CFLAGS}$cf_new_cflags"
4685 if test -n "$cf_new_cppflags" ; then
4687 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4688 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4692 if test -n "$cf_new_extra_cppflags" ; then
4694 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4695 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4701 fi # cf_cv_posix_visible
4705 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4708 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
4709 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
4710 # Abusing the conformance level is a workaround.
4711 { echo "$as_me:4711: WARNING: this system does not provide usable locale support" >&5
4712 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
4713 cf_xopen_source="-D_BSD_SOURCE"
4717 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
4718 cf_xopen_source="-D_BSD_SOURCE"
4722 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
4725 cf_xopen_source="-D_OSF_SOURCE"
4728 cf_xopen_source="-D_QNX_SOURCE"
4731 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
4734 cf_xopen_source="-D__EXTENSIONS__"
4735 cf_cv_xopen_source=broken
4737 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
4743 echo "$as_me:4743: checking if we should define _XOPEN_SOURCE" >&5
4744 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4745 if test "${cf_cv_xopen_source+set}" = set; then
4746 echo $ECHO_N "(cached) $ECHO_C" >&6
4749 cat >"conftest.$ac_ext" <<_ACEOF
4750 #line 4750 "configure"
4751 #include "confdefs.h"
4755 #include <sys/types.h>
4761 #ifndef _XOPEN_SOURCE
4768 rm -f "conftest.$ac_objext"
4769 if { (eval echo "$as_me:4769: \"$ac_compile\"") >&5
4770 (eval $ac_compile) 2>&5
4772 echo "$as_me:4772: \$? = $ac_status" >&5
4773 (exit "$ac_status"); } &&
4774 { ac_try='test -s "conftest.$ac_objext"'
4775 { (eval echo "$as_me:4775: \"$ac_try\"") >&5
4778 echo "$as_me:4778: \$? = $ac_status" >&5
4779 (exit "$ac_status"); }; }; then
4780 cf_cv_xopen_source=no
4782 echo "$as_me: failed program was:" >&5
4783 cat "conftest.$ac_ext" >&5
4786 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4787 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4789 cat >"conftest.$ac_ext" <<_ACEOF
4790 #line 4790 "configure"
4791 #include "confdefs.h"
4795 #include <sys/types.h>
4801 #ifdef _XOPEN_SOURCE
4808 rm -f "conftest.$ac_objext"
4809 if { (eval echo "$as_me:4809: \"$ac_compile\"") >&5
4810 (eval $ac_compile) 2>&5
4812 echo "$as_me:4812: \$? = $ac_status" >&5
4813 (exit "$ac_status"); } &&
4814 { ac_try='test -s "conftest.$ac_objext"'
4815 { (eval echo "$as_me:4815: \"$ac_try\"") >&5
4818 echo "$as_me:4818: \$? = $ac_status" >&5
4819 (exit "$ac_status"); }; }; then
4820 cf_cv_xopen_source=no
4822 echo "$as_me: failed program was:" >&5
4823 cat "conftest.$ac_ext" >&5
4824 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4826 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4830 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4833 echo "$as_me:4833: result: $cf_cv_xopen_source" >&5
4834 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4836 if test "$cf_cv_xopen_source" != no ; then
4838 CFLAGS=`echo "$CFLAGS" | \
4839 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4840 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4842 CPPFLAGS=`echo "$CPPFLAGS" | \
4843 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4844 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4846 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4851 cf_new_extra_cppflags=
4853 for cf_add_cflags in $cf_temp_xopen_source
4855 case "$cf_fix_cppflags" in
4857 case "$cf_add_cflags" in
4858 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4859 case "$cf_add_cflags" in
4861 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4863 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4864 && test -z "${cf_tst_cflags}" \
4865 && cf_fix_cppflags=yes
4867 if test "$cf_fix_cppflags" = yes ; then
4869 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4870 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4873 elif test "${cf_tst_cflags}" = "\"'" ; then
4875 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4876 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4886 case "$cf_add_cflags" in
4888 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4890 CPPFLAGS=`echo "$CPPFLAGS" | \
4891 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4892 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4897 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4898 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4905 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4906 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4913 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4914 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4916 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4918 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4919 && test -z "${cf_tst_cflags}" \
4920 && cf_fix_cppflags=no
4925 if test -n "$cf_new_cflags" ; then
4927 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4928 CFLAGS="${CFLAGS}$cf_new_cflags"
4932 if test -n "$cf_new_cppflags" ; then
4934 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4935 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4939 if test -n "$cf_new_extra_cppflags" ; then
4941 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4942 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4948 if test "$cf_cv_posix_visible" = no; then
4950 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4952 cf_save_CFLAGS="$CFLAGS"
4953 cf_save_CPPFLAGS="$CPPFLAGS"
4955 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4956 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4957 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4959 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4960 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4961 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4963 echo "$as_me:4963: checking if we should define _POSIX_C_SOURCE" >&5
4964 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4965 if test "${cf_cv_posix_c_source+set}" = set; then
4966 echo $ECHO_N "(cached) $ECHO_C" >&6
4969 echo "${as_me:-configure}:4969: testing if the symbol is already defined go no further ..." 1>&5
4971 cat >"conftest.$ac_ext" <<_ACEOF
4972 #line 4972 "configure"
4973 #include "confdefs.h"
4974 #include <sys/types.h>
4979 #ifndef _POSIX_C_SOURCE
4986 rm -f "conftest.$ac_objext"
4987 if { (eval echo "$as_me:4987: \"$ac_compile\"") >&5
4988 (eval $ac_compile) 2>&5
4990 echo "$as_me:4990: \$? = $ac_status" >&5
4991 (exit "$ac_status"); } &&
4992 { ac_try='test -s "conftest.$ac_objext"'
4993 { (eval echo "$as_me:4993: \"$ac_try\"") >&5
4996 echo "$as_me:4996: \$? = $ac_status" >&5
4997 (exit "$ac_status"); }; }; then
4998 cf_cv_posix_c_source=no
5000 echo "$as_me: failed program was:" >&5
5001 cat "conftest.$ac_ext" >&5
5002 cf_want_posix_source=no
5003 case .$cf_POSIX_C_SOURCE in
5005 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
5008 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
5009 cf_want_posix_source=yes
5012 cf_want_posix_source=yes
5015 if test "$cf_want_posix_source" = yes ; then
5016 cat >"conftest.$ac_ext" <<_ACEOF
5017 #line 5017 "configure"
5018 #include "confdefs.h"
5019 #include <sys/types.h>
5024 #ifdef _POSIX_SOURCE
5031 rm -f "conftest.$ac_objext"
5032 if { (eval echo "$as_me:5032: \"$ac_compile\"") >&5
5033 (eval $ac_compile) 2>&5
5035 echo "$as_me:5035: \$? = $ac_status" >&5
5036 (exit "$ac_status"); } &&
5037 { ac_try='test -s "conftest.$ac_objext"'
5038 { (eval echo "$as_me:5038: \"$ac_try\"") >&5
5041 echo "$as_me:5041: \$? = $ac_status" >&5
5042 (exit "$ac_status"); }; }; then
5045 echo "$as_me: failed program was:" >&5
5046 cat "conftest.$ac_ext" >&5
5047 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
5049 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5052 echo "${as_me:-configure}:5052: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
5054 CFLAGS="$cf_trim_CFLAGS"
5055 CPPFLAGS="$cf_trim_CPPFLAGS"
5057 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5058 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
5060 echo "${as_me:-configure}:5060: testing if the second compile does not leave our definition intact error ..." 1>&5
5062 cat >"conftest.$ac_ext" <<_ACEOF
5063 #line 5063 "configure"
5064 #include "confdefs.h"
5065 #include <sys/types.h>
5070 #ifndef _POSIX_C_SOURCE
5077 rm -f "conftest.$ac_objext"
5078 if { (eval echo "$as_me:5078: \"$ac_compile\"") >&5
5079 (eval $ac_compile) 2>&5
5081 echo "$as_me:5081: \$? = $ac_status" >&5
5082 (exit "$ac_status"); } &&
5083 { ac_try='test -s "conftest.$ac_objext"'
5084 { (eval echo "$as_me:5084: \"$ac_try\"") >&5
5087 echo "$as_me:5087: \$? = $ac_status" >&5
5088 (exit "$ac_status"); }; }; then
5091 echo "$as_me: failed program was:" >&5
5092 cat "conftest.$ac_ext" >&5
5093 cf_cv_posix_c_source=no
5095 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5096 CFLAGS="$cf_save_CFLAGS"
5097 CPPFLAGS="$cf_save_CPPFLAGS"
5100 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5103 echo "$as_me:5103: result: $cf_cv_posix_c_source" >&5
5104 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
5106 if test "$cf_cv_posix_c_source" != no ; then
5107 CFLAGS="$cf_trim_CFLAGS"
5108 CPPFLAGS="$cf_trim_CPPFLAGS"
5113 cf_new_extra_cppflags=
5115 for cf_add_cflags in $cf_cv_posix_c_source
5117 case "$cf_fix_cppflags" in
5119 case "$cf_add_cflags" in
5120 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5121 case "$cf_add_cflags" in
5123 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5125 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5126 && test -z "${cf_tst_cflags}" \
5127 && cf_fix_cppflags=yes
5129 if test "$cf_fix_cppflags" = yes ; then
5131 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5132 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5135 elif test "${cf_tst_cflags}" = "\"'" ; then
5137 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5138 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5148 case "$cf_add_cflags" in
5150 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5152 CPPFLAGS=`echo "$CPPFLAGS" | \
5153 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5154 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5159 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5160 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5167 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5168 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5175 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5176 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5178 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5180 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5181 && test -z "${cf_tst_cflags}" \
5182 && cf_fix_cppflags=no
5187 if test -n "$cf_new_cflags" ; then
5189 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5190 CFLAGS="${CFLAGS}$cf_new_cflags"
5194 if test -n "$cf_new_cppflags" ; then
5196 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5197 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5201 if test -n "$cf_new_extra_cppflags" ; then
5203 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5204 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5210 fi # cf_cv_posix_visible
5215 if test -n "$cf_xopen_source" ; then
5220 cf_new_extra_cppflags=
5222 for cf_add_cflags in $cf_xopen_source
5224 case "$cf_fix_cppflags" in
5226 case "$cf_add_cflags" in
5227 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5228 case "$cf_add_cflags" in
5230 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5232 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5233 && test -z "${cf_tst_cflags}" \
5234 && cf_fix_cppflags=yes
5236 if test "$cf_fix_cppflags" = yes ; then
5238 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5239 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5242 elif test "${cf_tst_cflags}" = "\"'" ; then
5244 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5245 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5255 case "$cf_add_cflags" in
5257 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5259 CPPFLAGS=`echo "$CPPFLAGS" | \
5260 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5261 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5266 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5267 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5274 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5275 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5282 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5283 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5285 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5287 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5288 && test -z "${cf_tst_cflags}" \
5289 && cf_fix_cppflags=no
5294 if test -n "$cf_new_cflags" ; then
5295 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
5297 echo "${as_me:-configure}:5297: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
5299 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5300 CFLAGS="${CFLAGS}$cf_new_cflags"
5304 if test -n "$cf_new_cppflags" ; then
5305 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
5307 echo "${as_me:-configure}:5307: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
5309 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5310 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5314 if test -n "$cf_new_extra_cppflags" ; then
5315 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
5317 echo "${as_me:-configure}:5317: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
5319 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5320 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5326 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
5327 echo "$as_me:5327: checking if _XOPEN_SOURCE really is set" >&5
5328 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
5329 cat >"conftest.$ac_ext" <<_ACEOF
5330 #line 5330 "configure"
5331 #include "confdefs.h"
5337 #ifndef _XOPEN_SOURCE
5344 rm -f "conftest.$ac_objext"
5345 if { (eval echo "$as_me:5345: \"$ac_compile\"") >&5
5346 (eval $ac_compile) 2>&5
5348 echo "$as_me:5348: \$? = $ac_status" >&5
5349 (exit "$ac_status"); } &&
5350 { ac_try='test -s "conftest.$ac_objext"'
5351 { (eval echo "$as_me:5351: \"$ac_try\"") >&5
5354 echo "$as_me:5354: \$? = $ac_status" >&5
5355 (exit "$ac_status"); }; }; then
5356 cf_XOPEN_SOURCE_set=yes
5358 echo "$as_me: failed program was:" >&5
5359 cat "conftest.$ac_ext" >&5
5360 cf_XOPEN_SOURCE_set=no
5362 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5363 echo "$as_me:5363: result: $cf_XOPEN_SOURCE_set" >&5
5364 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
5365 if test "$cf_XOPEN_SOURCE_set" = yes
5367 cat >"conftest.$ac_ext" <<_ACEOF
5368 #line 5368 "configure"
5369 #include "confdefs.h"
5375 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
5382 rm -f "conftest.$ac_objext"
5383 if { (eval echo "$as_me:5383: \"$ac_compile\"") >&5
5384 (eval $ac_compile) 2>&5
5386 echo "$as_me:5386: \$? = $ac_status" >&5
5387 (exit "$ac_status"); } &&
5388 { ac_try='test -s "conftest.$ac_objext"'
5389 { (eval echo "$as_me:5389: \"$ac_try\"") >&5
5392 echo "$as_me:5392: \$? = $ac_status" >&5
5393 (exit "$ac_status"); }; }; then
5394 cf_XOPEN_SOURCE_set_ok=yes
5396 echo "$as_me: failed program was:" >&5
5397 cat "conftest.$ac_ext" >&5
5398 cf_XOPEN_SOURCE_set_ok=no
5400 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5401 if test "$cf_XOPEN_SOURCE_set_ok" = no
5403 { echo "$as_me:5403: WARNING: _XOPEN_SOURCE is lower than requested" >&5
5404 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
5408 echo "$as_me:5408: checking if we should define _XOPEN_SOURCE" >&5
5409 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
5410 if test "${cf_cv_xopen_source+set}" = set; then
5411 echo $ECHO_N "(cached) $ECHO_C" >&6
5414 cat >"conftest.$ac_ext" <<_ACEOF
5415 #line 5415 "configure"
5416 #include "confdefs.h"
5420 #include <sys/types.h>
5426 #ifndef _XOPEN_SOURCE
5433 rm -f "conftest.$ac_objext"
5434 if { (eval echo "$as_me:5434: \"$ac_compile\"") >&5
5435 (eval $ac_compile) 2>&5
5437 echo "$as_me:5437: \$? = $ac_status" >&5
5438 (exit "$ac_status"); } &&
5439 { ac_try='test -s "conftest.$ac_objext"'
5440 { (eval echo "$as_me:5440: \"$ac_try\"") >&5
5443 echo "$as_me:5443: \$? = $ac_status" >&5
5444 (exit "$ac_status"); }; }; then
5445 cf_cv_xopen_source=no
5447 echo "$as_me: failed program was:" >&5
5448 cat "conftest.$ac_ext" >&5
5451 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5452 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
5454 cat >"conftest.$ac_ext" <<_ACEOF
5455 #line 5455 "configure"
5456 #include "confdefs.h"
5460 #include <sys/types.h>
5466 #ifdef _XOPEN_SOURCE
5473 rm -f "conftest.$ac_objext"
5474 if { (eval echo "$as_me:5474: \"$ac_compile\"") >&5
5475 (eval $ac_compile) 2>&5
5477 echo "$as_me:5477: \$? = $ac_status" >&5
5478 (exit "$ac_status"); } &&
5479 { ac_try='test -s "conftest.$ac_objext"'
5480 { (eval echo "$as_me:5480: \"$ac_try\"") >&5
5483 echo "$as_me:5483: \$? = $ac_status" >&5
5484 (exit "$ac_status"); }; }; then
5485 cf_cv_xopen_source=no
5487 echo "$as_me: failed program was:" >&5
5488 cat "conftest.$ac_ext" >&5
5489 cf_cv_xopen_source=$cf_XOPEN_SOURCE
5491 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5495 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5498 echo "$as_me:5498: result: $cf_cv_xopen_source" >&5
5499 echo "${ECHO_T}$cf_cv_xopen_source" >&6
5501 if test "$cf_cv_xopen_source" != no ; then
5503 CFLAGS=`echo "$CFLAGS" | \
5504 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5505 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5507 CPPFLAGS=`echo "$CPPFLAGS" | \
5508 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5509 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5511 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
5516 cf_new_extra_cppflags=
5518 for cf_add_cflags in $cf_temp_xopen_source
5520 case "$cf_fix_cppflags" in
5522 case "$cf_add_cflags" in
5523 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5524 case "$cf_add_cflags" in
5526 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5528 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5529 && test -z "${cf_tst_cflags}" \
5530 && cf_fix_cppflags=yes
5532 if test "$cf_fix_cppflags" = yes ; then
5534 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5535 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5538 elif test "${cf_tst_cflags}" = "\"'" ; then
5540 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5541 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5551 case "$cf_add_cflags" in
5553 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5555 CPPFLAGS=`echo "$CPPFLAGS" | \
5556 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5557 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5562 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5563 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5570 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5571 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5578 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5579 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5581 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5583 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5584 && test -z "${cf_tst_cflags}" \
5585 && cf_fix_cppflags=no
5590 if test -n "$cf_new_cflags" ; then
5592 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5593 CFLAGS="${CFLAGS}$cf_new_cflags"
5597 if test -n "$cf_new_cppflags" ; then
5599 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5600 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5604 if test -n "$cf_new_extra_cppflags" ; then
5606 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5607 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5615 fi # cf_cv_posix_visible
5617 echo "$as_me:5617: checking for signal global datatype" >&5
5618 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
5619 if test "${cf_cv_sig_atomic_t+set}" = set; then
5620 echo $ECHO_N "(cached) $ECHO_C" >&6
5624 "volatile sig_atomic_t" \
5628 cat >"conftest.$ac_ext" <<_ACEOF
5629 #line 5629 "configure"
5630 #include "confdefs.h"
5632 #include <sys/types.h>
5638 static void handler(int sig)
5646 signal(SIGINT, handler);
5652 rm -f "conftest.$ac_objext"
5653 if { (eval echo "$as_me:5653: \"$ac_compile\"") >&5
5654 (eval $ac_compile) 2>&5
5656 echo "$as_me:5656: \$? = $ac_status" >&5
5657 (exit "$ac_status"); } &&
5658 { ac_try='test -s "conftest.$ac_objext"'
5659 { (eval echo "$as_me:5659: \"$ac_try\"") >&5
5662 echo "$as_me:5662: \$? = $ac_status" >&5
5663 (exit "$ac_status"); }; }; then
5664 cf_cv_sig_atomic_t=$cf_type
5666 echo "$as_me: failed program was:" >&5
5667 cat "conftest.$ac_ext" >&5
5668 cf_cv_sig_atomic_t=no
5670 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5671 test "$cf_cv_sig_atomic_t" != no && break
5676 echo "$as_me:5676: result: $cf_cv_sig_atomic_t" >&5
5677 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
5678 test "$cf_cv_sig_atomic_t" != no &&
5679 cat >>confdefs.h <<EOF
5680 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
5683 # Work around breakage on OS X
5685 echo "$as_me:5685: checking if SIGWINCH is defined" >&5
5686 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
5687 if test "${cf_cv_define_sigwinch+set}" = set; then
5688 echo $ECHO_N "(cached) $ECHO_C" >&6
5691 cat >"conftest.$ac_ext" <<_ACEOF
5692 #line 5692 "configure"
5693 #include "confdefs.h"
5695 #include <sys/types.h>
5696 #include <sys/signal.h>
5701 int x = SIGWINCH; (void)x
5706 rm -f "conftest.$ac_objext"
5707 if { (eval echo "$as_me:5707: \"$ac_compile\"") >&5
5708 (eval $ac_compile) 2>&5
5710 echo "$as_me:5710: \$? = $ac_status" >&5
5711 (exit "$ac_status"); } &&
5712 { ac_try='test -s "conftest.$ac_objext"'
5713 { (eval echo "$as_me:5713: \"$ac_try\"") >&5
5716 echo "$as_me:5716: \$? = $ac_status" >&5
5717 (exit "$ac_status"); }; }; then
5718 cf_cv_define_sigwinch=yes
5720 echo "$as_me: failed program was:" >&5
5721 cat "conftest.$ac_ext" >&5
5722 cat >"conftest.$ac_ext" <<_ACEOF
5723 #line 5723 "configure"
5724 #include "confdefs.h"
5726 #undef _XOPEN_SOURCE
5727 #undef _POSIX_SOURCE
5728 #undef _POSIX_C_SOURCE
5729 #include <sys/types.h>
5730 #include <sys/signal.h>
5735 int x = SIGWINCH; (void)x
5740 rm -f "conftest.$ac_objext"
5741 if { (eval echo "$as_me:5741: \"$ac_compile\"") >&5
5742 (eval $ac_compile) 2>&5
5744 echo "$as_me:5744: \$? = $ac_status" >&5
5745 (exit "$ac_status"); } &&
5746 { ac_try='test -s "conftest.$ac_objext"'
5747 { (eval echo "$as_me:5747: \"$ac_try\"") >&5
5750 echo "$as_me:5750: \$? = $ac_status" >&5
5751 (exit "$ac_status"); }; }; then
5752 cf_cv_define_sigwinch=maybe
5754 echo "$as_me: failed program was:" >&5
5755 cat "conftest.$ac_ext" >&5
5756 cf_cv_define_sigwinch=no
5758 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5761 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5764 echo "$as_me:5764: result: $cf_cv_define_sigwinch" >&5
5765 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
5767 if test "$cf_cv_define_sigwinch" = maybe ; then
5768 echo "$as_me:5768: checking for actual SIGWINCH definition" >&5
5769 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
5770 if test "${cf_cv_fixup_sigwinch+set}" = set; then
5771 echo $ECHO_N "(cached) $ECHO_C" >&6
5774 cf_cv_fixup_sigwinch=unknown
5776 while test "$cf_sigwinch" != 1
5778 cat >"conftest.$ac_ext" <<_ACEOF
5779 #line 5779 "configure"
5780 #include "confdefs.h"
5782 #undef _XOPEN_SOURCE
5783 #undef _POSIX_SOURCE
5784 #undef _POSIX_C_SOURCE
5785 #include <sys/types.h>
5786 #include <sys/signal.h>
5792 #if SIGWINCH != $cf_sigwinch
5795 int x = SIGWINCH; (void)x
5800 rm -f "conftest.$ac_objext"
5801 if { (eval echo "$as_me:5801: \"$ac_compile\"") >&5
5802 (eval $ac_compile) 2>&5
5804 echo "$as_me:5804: \$? = $ac_status" >&5
5805 (exit "$ac_status"); } &&
5806 { ac_try='test -s "conftest.$ac_objext"'
5807 { (eval echo "$as_me:5807: \"$ac_try\"") >&5
5810 echo "$as_me:5810: \$? = $ac_status" >&5
5811 (exit "$ac_status"); }; }; then
5812 cf_cv_fixup_sigwinch=$cf_sigwinch
5815 echo "$as_me: failed program was:" >&5
5816 cat "conftest.$ac_ext" >&5
5818 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5820 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
5824 echo "$as_me:5824: result: $cf_cv_fixup_sigwinch" >&5
5825 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
5827 if test "$cf_cv_fixup_sigwinch" != unknown ; then
5828 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
5832 # Checks for CODESET support.
5834 echo "$as_me:5834: checking for nl_langinfo and CODESET" >&5
5835 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
5836 if test "${am_cv_langinfo_codeset+set}" = set; then
5837 echo $ECHO_N "(cached) $ECHO_C" >&6
5839 cat >"conftest.$ac_ext" <<_ACEOF
5840 #line 5840 "configure"
5841 #include "confdefs.h"
5842 #include <langinfo.h>
5846 char* cs = nl_langinfo(CODESET); (void)cs
5851 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5852 if { (eval echo "$as_me:5852: \"$ac_link\"") >&5
5853 (eval $ac_link) 2>&5
5855 echo "$as_me:5855: \$? = $ac_status" >&5
5856 (exit "$ac_status"); } &&
5857 { ac_try='test -s "conftest$ac_exeext"'
5858 { (eval echo "$as_me:5858: \"$ac_try\"") >&5
5861 echo "$as_me:5861: \$? = $ac_status" >&5
5862 (exit "$ac_status"); }; }; then
5863 am_cv_langinfo_codeset=yes
5865 echo "$as_me: failed program was:" >&5
5866 cat "conftest.$ac_ext" >&5
5867 am_cv_langinfo_codeset=no
5869 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5872 echo "$as_me:5872: result: $am_cv_langinfo_codeset" >&5
5873 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
5874 if test "$am_cv_langinfo_codeset" = yes; then
5876 cat >>confdefs.h <<\EOF
5877 #define HAVE_LANGINFO_CODESET 1
5882 echo "$as_me:5882: checking if you want to use pkg-config" >&5
5883 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
5885 # Check whether --with-pkg-config or --without-pkg-config was given.
5886 if test "${with_pkg_config+set}" = set; then
5887 withval="$with_pkg_config"
5888 cf_pkg_config=$withval
5892 echo "$as_me:5892: result: $cf_pkg_config" >&5
5893 echo "${ECHO_T}$cf_pkg_config" >&6
5895 case "$cf_pkg_config" in
5901 if test -n "$ac_tool_prefix"; then
5902 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5903 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5904 echo "$as_me:5904: checking for $ac_word" >&5
5905 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5906 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
5907 echo $ECHO_N "(cached) $ECHO_C" >&6
5911 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5914 ac_save_IFS=$IFS; IFS=$ac_path_separator
5916 for ac_dir in $ac_dummy; do
5918 test -z "$ac_dir" && ac_dir=.
5919 if $as_executable_p "$ac_dir/$ac_word"; then
5920 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
5921 echo "$as_me:5921: found $ac_dir/$ac_word" >&5
5929 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5931 if test -n "$PKG_CONFIG"; then
5932 echo "$as_me:5932: result: $PKG_CONFIG" >&5
5933 echo "${ECHO_T}$PKG_CONFIG" >&6
5935 echo "$as_me:5935: result: no" >&5
5936 echo "${ECHO_T}no" >&6
5940 if test -z "$ac_cv_path_PKG_CONFIG"; then
5941 ac_pt_PKG_CONFIG=$PKG_CONFIG
5942 # Extract the first word of "pkg-config", so it can be a program name with args.
5943 set dummy pkg-config; ac_word=$2
5944 echo "$as_me:5944: checking for $ac_word" >&5
5945 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5946 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
5947 echo $ECHO_N "(cached) $ECHO_C" >&6
5949 case $ac_pt_PKG_CONFIG in
5951 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5954 ac_save_IFS=$IFS; IFS=$ac_path_separator
5956 for ac_dir in $ac_dummy; do
5958 test -z "$ac_dir" && ac_dir=.
5959 if $as_executable_p "$ac_dir/$ac_word"; then
5960 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
5961 echo "$as_me:5961: found $ac_dir/$ac_word" >&5
5966 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
5970 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5972 if test -n "$ac_pt_PKG_CONFIG"; then
5973 echo "$as_me:5973: result: $ac_pt_PKG_CONFIG" >&5
5974 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
5976 echo "$as_me:5976: result: no" >&5
5977 echo "${ECHO_T}no" >&6
5980 PKG_CONFIG=$ac_pt_PKG_CONFIG
5982 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5991 test -z "$PKG_CONFIG" && PKG_CONFIG=none
5992 if test "$PKG_CONFIG" != none ; then
5994 if test "x$prefix" != xNONE; then
5995 cf_path_syntax="$prefix"
5997 cf_path_syntax="$ac_default_prefix"
6000 case ".$PKG_CONFIG" in
6005 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
6007 (.\$\{*prefix\}*|.\$\{*dir\}*)
6008 eval PKG_CONFIG="$PKG_CONFIG"
6009 case ".$PKG_CONFIG" in
6011 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
6016 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
6019 { { echo "$as_me:6019: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
6020 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
6021 { (exit 1); exit 1; }; }
6025 elif test "x$cf_pkg_config" != xno ; then
6026 { echo "$as_me:6026: WARNING: pkg-config is not installed" >&5
6027 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
6030 echo "$as_me:6030: checking if you want to see long compiling messages" >&5
6031 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
6033 # Check whether --enable-echo or --disable-echo was given.
6034 if test "${enable_echo+set}" = set; then
6035 enableval="$enable_echo"
6036 test "$enableval" != no && enableval=yes
6037 if test "$enableval" != "yes" ; then
6040 ECHO_LD='@echo linking $@;'
6041 RULE_CC='@echo compiling $<'
6042 SHOW_CC='@echo compiling $@'
6064 echo "$as_me:6064: result: $enableval" >&5
6065 echo "${ECHO_T}$enableval" >&6
6067 echo "$as_me:6067: checking for ncurses wrap-prefix" >&5
6068 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
6070 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
6071 if test "${with_ncurses_wrap_prefix+set}" = set; then
6072 withval="$with_ncurses_wrap_prefix"
6073 NCURSES_WRAP_PREFIX=$withval
6075 NCURSES_WRAP_PREFIX=_nc_
6077 echo "$as_me:6077: result: $NCURSES_WRAP_PREFIX" >&5
6078 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
6080 echo "$as_me:6080: checking if you want to check for wide-character functions" >&5
6081 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
6083 # Check whether --enable-widec or --disable-widec was given.
6084 if test "${enable_widec+set}" = set; then
6085 enableval="$enable_widec"
6086 test "$enableval" != no && enableval=yes
6087 if test "$enableval" != "yes" ; then
6097 echo "$as_me:6097: result: $cf_enable_widec" >&5
6098 echo "${ECHO_T}$cf_enable_widec" >&6
6100 echo "$as_me:6100: checking for specific curses-directory" >&5
6101 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
6103 # Check whether --with-curses-dir or --without-curses-dir was given.
6104 if test "${with_curses_dir+set}" = set; then
6105 withval="$with_curses_dir"
6106 cf_cv_curses_dir=$withval
6110 echo "$as_me:6110: result: $cf_cv_curses_dir" >&5
6111 echo "${ECHO_T}$cf_cv_curses_dir" >&6
6113 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6116 if test "x$prefix" != xNONE; then
6117 cf_path_syntax="$prefix"
6119 cf_path_syntax="$ac_default_prefix"
6127 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
6129 (.\$\{*prefix\}*|.\$\{*dir\}*)
6130 eval withval="$withval"
6133 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
6138 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
6141 { { echo "$as_me:6141: error: expected a pathname, not \"$withval\"" >&5
6142 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6143 { (exit 1); exit 1; }; }
6147 if test -d "$cf_cv_curses_dir"
6150 if test -n "$cf_cv_curses_dir/include" ; then
6151 for cf_add_incdir in $cf_cv_curses_dir/include
6153 while test "$cf_add_incdir" != /usr/include
6155 if test -d "$cf_add_incdir"
6158 if test -n "$CFLAGS$CPPFLAGS" ; then
6159 # a loop is needed to ensure we can add subdirs of existing dirs
6160 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6161 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6162 cf_have_incdir=yes; break
6167 if test "$cf_have_incdir" = no ; then
6168 if test "$cf_add_incdir" = /usr/local/include ; then
6169 if test "$GCC" = yes
6171 cf_save_CPPFLAGS=$CPPFLAGS
6173 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6174 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6176 cat >"conftest.$ac_ext" <<_ACEOF
6177 #line 6177 "configure"
6178 #include "confdefs.h"
6188 rm -f "conftest.$ac_objext"
6189 if { (eval echo "$as_me:6189: \"$ac_compile\"") >&5
6190 (eval $ac_compile) 2>&5
6192 echo "$as_me:6192: \$? = $ac_status" >&5
6193 (exit "$ac_status"); } &&
6194 { ac_try='test -s "conftest.$ac_objext"'
6195 { (eval echo "$as_me:6195: \"$ac_try\"") >&5
6198 echo "$as_me:6198: \$? = $ac_status" >&5
6199 (exit "$ac_status"); }; }; then
6202 echo "$as_me: failed program was:" >&5
6203 cat "conftest.$ac_ext" >&5
6206 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6207 CPPFLAGS=$cf_save_CPPFLAGS
6212 if test "$cf_have_incdir" = no ; then
6213 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6215 echo "${as_me:-configure}:6215: testing adding $cf_add_incdir to include-path ..." 1>&5
6217 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6219 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
6220 test "$cf_top_incdir" = "$cf_add_incdir" && break
6221 cf_add_incdir="$cf_top_incdir"
6232 if test -n "$cf_cv_curses_dir/lib" ; then
6233 for cf_add_libdir in $cf_cv_curses_dir/lib
6235 if test "$cf_add_libdir" = /usr/lib ; then
6237 elif test -d "$cf_add_libdir"
6240 if test -n "$LDFLAGS$LIBS" ; then
6241 # a loop is needed to ensure we can add subdirs of existing dirs
6242 for cf_test_libdir in $LDFLAGS $LIBS ; do
6243 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6244 cf_have_libdir=yes; break
6248 if test "$cf_have_libdir" = no ; then
6249 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6251 echo "${as_me:-configure}:6251: testing adding $cf_add_libdir to library-path ..." 1>&5
6253 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6264 echo "$as_me:6264: checking for specified curses library type" >&5
6265 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
6267 # Check whether --with-screen or --without-screen was given.
6268 if test "${with_screen+set}" = set; then
6269 withval="$with_screen"
6270 cf_cv_screen=$withval
6273 # Check whether --with-ncursesw or --without-ncursesw was given.
6274 if test "${with_ncursesw+set}" = set; then
6275 withval="$with_ncursesw"
6276 cf_cv_screen=ncursesw
6279 # Check whether --with-ncurses or --without-ncurses was given.
6280 if test "${with_ncurses+set}" = set; then
6281 withval="$with_ncurses"
6282 cf_cv_screen=ncurses
6285 # Check whether --with-pdcurses or --without-pdcurses was given.
6286 if test "${with_pdcurses+set}" = set; then
6287 withval="$with_pdcurses"
6288 cf_cv_screen=pdcurses
6291 # Check whether --with-curses-colr or --without-curses-colr was given.
6292 if test "${with_curses_colr+set}" = set; then
6293 withval="$with_curses_colr"
6294 cf_cv_screen=curses_colr
6297 # Check whether --with-curses-5lib or --without-curses-5lib was given.
6298 if test "${with_curses_5lib+set}" = set; then
6299 withval="$with_curses_5lib"
6300 cf_cv_screen=curses_5lib
6308 echo "$as_me:6308: result: $cf_cv_screen" >&5
6309 echo "${ECHO_T}$cf_cv_screen" >&6
6311 case $cf_cv_screen in
6314 echo "$as_me:6314: checking for extra include directories" >&5
6315 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
6316 if test "${cf_cv_curses_incdir+set}" = set; then
6317 echo $ECHO_N "(cached) $ECHO_C" >&6
6320 cf_cv_curses_incdir=no
6323 if test "x$cf_cv_screen" = "xcurses_colr"
6325 test -d /usr/include/curses_colr && \
6326 cf_cv_curses_incdir="-I/usr/include/curses_colr"
6330 if test "x$cf_cv_screen" = "xcurses_5lib"
6332 test -d /usr/5lib && \
6333 test -d /usr/5include && \
6334 cf_cv_curses_incdir="-I/usr/5include"
6340 echo "$as_me:6340: result: $cf_cv_curses_incdir" >&5
6341 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
6342 if test "$cf_cv_curses_incdir" != no
6345 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6346 CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
6350 echo "$as_me:6350: checking if we have identified curses headers" >&5
6351 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6352 if test "${cf_cv_ncurses_header+set}" = set; then
6353 echo $ECHO_N "(cached) $ECHO_C" >&6
6356 cf_cv_ncurses_header=none
6359 curses.h ncurses/ncurses.h ncurses/curses.h
6361 cat >"conftest.$ac_ext" <<_ACEOF
6362 #line 6362 "configure"
6363 #include "confdefs.h"
6364 #include <${cf_header}>
6368 initscr(); tgoto("?", 0,0)
6373 rm -f "conftest.$ac_objext"
6374 if { (eval echo "$as_me:6374: \"$ac_compile\"") >&5
6375 (eval $ac_compile) 2>&5
6377 echo "$as_me:6377: \$? = $ac_status" >&5
6378 (exit "$ac_status"); } &&
6379 { ac_try='test -s "conftest.$ac_objext"'
6380 { (eval echo "$as_me:6380: \"$ac_try\"") >&5
6383 echo "$as_me:6383: \$? = $ac_status" >&5
6384 (exit "$ac_status"); }; }; then
6385 cf_cv_ncurses_header=$cf_header; break
6387 echo "$as_me: failed program was:" >&5
6388 cat "conftest.$ac_ext" >&5
6390 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6394 echo "$as_me:6394: result: $cf_cv_ncurses_header" >&5
6395 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6397 if test "$cf_cv_ncurses_header" = none ; then
6398 { { echo "$as_me:6398: error: No curses header-files found" >&5
6399 echo "$as_me: error: No curses header-files found" >&2;}
6400 { (exit 1); exit 1; }; }
6403 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6405 for ac_header in $cf_cv_ncurses_header
6407 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6408 echo "$as_me:6408: checking for $ac_header" >&5
6409 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6410 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6411 echo $ECHO_N "(cached) $ECHO_C" >&6
6413 cat >"conftest.$ac_ext" <<_ACEOF
6414 #line 6414 "configure"
6415 #include "confdefs.h"
6416 #include <$ac_header>
6418 if { (eval echo "$as_me:6418: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6419 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6421 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6423 cat conftest.err >&5
6424 echo "$as_me:6424: \$? = $ac_status" >&5
6425 (exit "$ac_status"); } >/dev/null; then
6426 if test -s conftest.err; then
6427 ac_cpp_err=$ac_c_preproc_warn_flag
6434 if test -z "$ac_cpp_err"; then
6435 eval "$as_ac_Header=yes"
6437 echo "$as_me: failed program was:" >&5
6438 cat "conftest.$ac_ext" >&5
6439 eval "$as_ac_Header=no"
6441 rm -f conftest.err "conftest.$ac_ext"
6443 echo "$as_me:6443: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6444 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6445 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6446 cat >>confdefs.h <<EOF
6447 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6453 echo "$as_me:6453: checking for terminfo header" >&5
6454 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6455 if test "${cf_cv_term_header+set}" = set; then
6456 echo $ECHO_N "(cached) $ECHO_C" >&6
6459 case "${cf_cv_ncurses_header}" in
6460 (*/ncurses.h|*/ncursesw.h)
6461 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6464 cf_term_header=term.h
6468 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6470 cat >"conftest.$ac_ext" <<_ACEOF
6471 #line 6471 "configure"
6472 #include "confdefs.h"
6474 #include <${cf_cv_ncurses_header:-curses.h}>
6480 int x = auto_left_margin; (void)x
6485 rm -f "conftest.$ac_objext"
6486 if { (eval echo "$as_me:6486: \"$ac_compile\"") >&5
6487 (eval $ac_compile) 2>&5
6489 echo "$as_me:6489: \$? = $ac_status" >&5
6490 (exit "$ac_status"); } &&
6491 { ac_try='test -s "conftest.$ac_objext"'
6492 { (eval echo "$as_me:6492: \"$ac_try\"") >&5
6495 echo "$as_me:6495: \$? = $ac_status" >&5
6496 (exit "$ac_status"); }; }; then
6498 cf_cv_term_header="$cf_test"
6500 echo "$as_me: failed program was:" >&5
6501 cat "conftest.$ac_ext" >&5
6503 cf_cv_term_header=unknown
6506 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6507 test "$cf_cv_term_header" != unknown && break
6511 echo "$as_me:6511: result: $cf_cv_term_header" >&5
6512 echo "${ECHO_T}$cf_cv_term_header" >&6
6514 # Set definitions to allow ifdef'ing to accommodate subdirectories
6516 case "$cf_cv_term_header" in
6519 cat >>confdefs.h <<\EOF
6520 #define HAVE_TERM_H 1
6526 case "$cf_cv_term_header" in
6529 cat >>confdefs.h <<\EOF
6530 #define HAVE_NCURSES_TERM_H 1
6536 cat >>confdefs.h <<\EOF
6537 #define HAVE_NCURSESW_TERM_H 1
6543 echo "$as_me:6543: checking for ncurses version" >&5
6544 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6545 if test "${cf_cv_ncurses_version+set}" = set; then
6546 echo $ECHO_N "(cached) $ECHO_C" >&6
6549 cf_cv_ncurses_version=no
6551 rm -f "$cf_tempfile"
6552 if test "$cross_compiling" = yes; then
6554 # This will not work if the preprocessor splits the line after the
6555 # Autoconf token. The 'unproto' program does that.
6556 cat > "conftest.$ac_ext" <<EOF
6557 #include <${cf_cv_ncurses_header:-curses.h}>
6559 #ifdef NCURSES_VERSION
6560 Autoconf NCURSES_VERSION
6568 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6569 { (eval echo "$as_me:6569: \"$cf_try\"") >&5
6572 echo "$as_me:6572: \$? = $ac_status" >&5
6573 (exit "$ac_status"); }
6574 if test -f conftest.out ; then
6575 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
6576 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6581 cat >"conftest.$ac_ext" <<_ACEOF
6582 #line 6582 "configure"
6583 #include "confdefs.h"
6585 #include <${cf_cv_ncurses_header:-curses.h}>
6589 FILE *fp = fopen("$cf_tempfile", "w");
6590 #ifdef NCURSES_VERSION
6591 # ifdef NCURSES_VERSION_PATCH
6592 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6594 fprintf(fp, "%s\\n", NCURSES_VERSION);
6598 fprintf(fp, "old\\n");
6603 ${cf_cv_main_return:-return}(0);
6606 rm -f "conftest$ac_exeext"
6607 if { (eval echo "$as_me:6607: \"$ac_link\"") >&5
6608 (eval $ac_link) 2>&5
6610 echo "$as_me:6610: \$? = $ac_status" >&5
6611 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6612 { (eval echo "$as_me:6612: \"$ac_try\"") >&5
6615 echo "$as_me:6615: \$? = $ac_status" >&5
6616 (exit "$ac_status"); }; }; then
6618 cf_cv_ncurses_version=`cat $cf_tempfile`
6620 echo "$as_me: program exited with status $ac_status" >&5
6621 echo "$as_me: failed program was:" >&5
6622 cat "conftest.$ac_ext" >&5
6624 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6626 rm -f "$cf_tempfile"
6629 echo "$as_me:6629: result: $cf_cv_ncurses_version" >&5
6630 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6631 test "$cf_cv_ncurses_version" = no ||
6632 cat >>confdefs.h <<\EOF
6636 echo "$as_me:6636: checking if we have identified curses libraries" >&5
6637 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
6638 cat >"conftest.$ac_ext" <<_ACEOF
6639 #line 6639 "configure"
6640 #include "confdefs.h"
6641 #include <${cf_cv_ncurses_header:-curses.h}>
6645 initscr(); tgoto("?", 0,0)
6650 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6651 if { (eval echo "$as_me:6651: \"$ac_link\"") >&5
6652 (eval $ac_link) 2>&5
6654 echo "$as_me:6654: \$? = $ac_status" >&5
6655 (exit "$ac_status"); } &&
6656 { ac_try='test -s "conftest$ac_exeext"'
6657 { (eval echo "$as_me:6657: \"$ac_try\"") >&5
6660 echo "$as_me:6660: \$? = $ac_status" >&5
6661 (exit "$ac_status"); }; }; then
6664 echo "$as_me: failed program was:" >&5
6665 cat "conftest.$ac_ext" >&5
6668 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6669 echo "$as_me:6669: result: $cf_result" >&5
6670 echo "${ECHO_T}$cf_result" >&6
6672 if test "$cf_result" = no ; then
6675 echo "$as_me:6675: checking for tgoto in -lmytinfo" >&5
6676 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6677 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6678 echo $ECHO_N "(cached) $ECHO_C" >&6
6680 ac_check_lib_save_LIBS=$LIBS
6681 LIBS="-lmytinfo $LIBS"
6682 cat >"conftest.$ac_ext" <<_ACEOF
6683 #line 6683 "configure"
6684 #include "confdefs.h"
6686 /* Override any gcc2 internal prototype to avoid an error. */
6690 /* We use char because int might match the return type of a gcc2
6691 builtin and then its argument prototype would still apply. */
6701 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6702 if { (eval echo "$as_me:6702: \"$ac_link\"") >&5
6703 (eval $ac_link) 2>&5
6705 echo "$as_me:6705: \$? = $ac_status" >&5
6706 (exit "$ac_status"); } &&
6707 { ac_try='test -s "conftest$ac_exeext"'
6708 { (eval echo "$as_me:6708: \"$ac_try\"") >&5
6711 echo "$as_me:6711: \$? = $ac_status" >&5
6712 (exit "$ac_status"); }; }; then
6713 ac_cv_lib_mytinfo_tgoto=yes
6715 echo "$as_me: failed program was:" >&5
6716 cat "conftest.$ac_ext" >&5
6717 ac_cv_lib_mytinfo_tgoto=no
6719 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6720 LIBS=$ac_check_lib_save_LIBS
6722 echo "$as_me:6722: result: $ac_cv_lib_mytinfo_tgoto" >&5
6723 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6724 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6729 for cf_add_1lib in -lmytinfo; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6731 for cf_add_1lib in $cf_add_0lib; do
6732 for cf_add_2lib in $cf_add_libs; do
6733 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6738 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6746 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
6747 # next (1998), and xcurses "newer" (2000). There is no header file for
6748 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
6749 # term.h) for cur_colr
6750 if test "x$cf_cv_screen" = "xcurses_colr"
6752 echo "$as_me:6752: checking for initscr in -lcur_colr" >&5
6753 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
6754 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
6755 echo $ECHO_N "(cached) $ECHO_C" >&6
6757 ac_check_lib_save_LIBS=$LIBS
6758 LIBS="-lcur_colr $LIBS"
6759 cat >"conftest.$ac_ext" <<_ACEOF
6760 #line 6760 "configure"
6761 #include "confdefs.h"
6763 /* Override any gcc2 internal prototype to avoid an error. */
6767 /* We use char because int might match the return type of a gcc2
6768 builtin and then its argument prototype would still apply. */
6778 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6779 if { (eval echo "$as_me:6779: \"$ac_link\"") >&5
6780 (eval $ac_link) 2>&5
6782 echo "$as_me:6782: \$? = $ac_status" >&5
6783 (exit "$ac_status"); } &&
6784 { ac_try='test -s "conftest$ac_exeext"'
6785 { (eval echo "$as_me:6785: \"$ac_try\"") >&5
6788 echo "$as_me:6788: \$? = $ac_status" >&5
6789 (exit "$ac_status"); }; }; then
6790 ac_cv_lib_cur_colr_initscr=yes
6792 echo "$as_me: failed program was:" >&5
6793 cat "conftest.$ac_ext" >&5
6794 ac_cv_lib_cur_colr_initscr=no
6796 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6797 LIBS=$ac_check_lib_save_LIBS
6799 echo "$as_me:6799: result: $ac_cv_lib_cur_colr_initscr" >&5
6800 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
6801 if test "$ac_cv_lib_cur_colr_initscr" = yes; then
6806 for cf_add_1lib in -lcur_colr; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6808 for cf_add_1lib in $cf_add_0lib; do
6809 for cf_add_2lib in $cf_add_libs; do
6810 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6815 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6819 ac_cv_func_initscr=yes
6823 echo "$as_me:6823: checking for initscr in -lHcurses" >&5
6824 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
6825 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
6826 echo $ECHO_N "(cached) $ECHO_C" >&6
6828 ac_check_lib_save_LIBS=$LIBS
6829 LIBS="-lHcurses $LIBS"
6830 cat >"conftest.$ac_ext" <<_ACEOF
6831 #line 6831 "configure"
6832 #include "confdefs.h"
6834 /* Override any gcc2 internal prototype to avoid an error. */
6838 /* We use char because int might match the return type of a gcc2
6839 builtin and then its argument prototype would still apply. */
6849 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6850 if { (eval echo "$as_me:6850: \"$ac_link\"") >&5
6851 (eval $ac_link) 2>&5
6853 echo "$as_me:6853: \$? = $ac_status" >&5
6854 (exit "$ac_status"); } &&
6855 { ac_try='test -s "conftest$ac_exeext"'
6856 { (eval echo "$as_me:6856: \"$ac_try\"") >&5
6859 echo "$as_me:6859: \$? = $ac_status" >&5
6860 (exit "$ac_status"); }; }; then
6861 ac_cv_lib_Hcurses_initscr=yes
6863 echo "$as_me: failed program was:" >&5
6864 cat "conftest.$ac_ext" >&5
6865 ac_cv_lib_Hcurses_initscr=no
6867 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6868 LIBS=$ac_check_lib_save_LIBS
6870 echo "$as_me:6870: result: $ac_cv_lib_Hcurses_initscr" >&5
6871 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
6872 if test "$ac_cv_lib_Hcurses_initscr" = yes; then
6874 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
6879 for cf_add_1lib in -lHcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6881 for cf_add_1lib in $cf_add_0lib; do
6882 for cf_add_2lib in $cf_add_libs; do
6883 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6888 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6892 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6893 CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
6895 ac_cv_func_initscr=yes
6904 case `arch 2>/dev/null` in
6909 if test -n "/lib64" ; then
6910 for cf_add_libdir in /lib64
6912 if test "$cf_add_libdir" = /usr/lib ; then
6914 elif test -d "$cf_add_libdir"
6917 if test -n "$LDFLAGS$LIBS" ; then
6918 # a loop is needed to ensure we can add subdirs of existing dirs
6919 for cf_test_libdir in $LDFLAGS $LIBS ; do
6920 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6921 cf_have_libdir=yes; break
6925 if test "$cf_have_libdir" = no ; then
6926 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6928 echo "${as_me:-configure}:6928: testing adding $cf_add_libdir to library-path ..." 1>&5
6930 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6938 if test -n "/lib" ; then
6939 for cf_add_libdir in /lib
6941 if test "$cf_add_libdir" = /usr/lib ; then
6943 elif test -d "$cf_add_libdir"
6946 if test -n "$LDFLAGS$LIBS" ; then
6947 # a loop is needed to ensure we can add subdirs of existing dirs
6948 for cf_test_libdir in $LDFLAGS $LIBS ; do
6949 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6950 cf_have_libdir=yes; break
6954 if test "$cf_have_libdir" = no ; then
6955 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6957 echo "${as_me:-configure}:6957: testing adding $cf_add_libdir to library-path ..." 1>&5
6959 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6969 if test -n "/lib" ; then
6970 for cf_add_libdir in /lib
6972 if test "$cf_add_libdir" = /usr/lib ; then
6974 elif test -d "$cf_add_libdir"
6977 if test -n "$LDFLAGS$LIBS" ; then
6978 # a loop is needed to ensure we can add subdirs of existing dirs
6979 for cf_test_libdir in $LDFLAGS $LIBS ; do
6980 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6981 cf_have_libdir=yes; break
6985 if test "$cf_have_libdir" = no ; then
6986 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6988 echo "${as_me:-configure}:6988: testing adding $cf_add_libdir to library-path ..." 1>&5
6990 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7000 if test "x$cf_cv_screen" = "xcurses_5lib"
7002 if test -d /usr/5lib ; then
7004 if test -n "/usr/5lib" ; then
7005 for cf_add_libdir in /usr/5lib
7007 if test "$cf_add_libdir" = /usr/lib ; then
7009 elif test -d "$cf_add_libdir"
7012 if test -n "$LDFLAGS$LIBS" ; then
7013 # a loop is needed to ensure we can add subdirs of existing dirs
7014 for cf_test_libdir in $LDFLAGS $LIBS ; do
7015 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7016 cf_have_libdir=yes; break
7020 if test "$cf_have_libdir" = no ; then
7021 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7023 echo "${as_me:-configure}:7023: testing adding $cf_add_libdir to library-path ..." 1>&5
7025 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7034 for cf_add_1lib in -lcurses -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7036 for cf_add_1lib in $cf_add_0lib; do
7037 for cf_add_2lib in $cf_add_libs; do
7038 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7043 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7049 ac_cv_func_initscr=yes
7053 if test ".$ac_cv_func_initscr" != .yes ; then
7054 cf_save_LIBS="$LIBS"
7056 if test ".${cf_cv_ncurses_version:-no}" != .no
7058 cf_check_list="ncurses curses cursesX"
7060 cf_check_list="cursesX curses ncurses"
7063 # Check for library containing tgoto. Do this before curses library
7064 # because it may be needed to link the test-case for initscr.
7065 if test "x$cf_term_lib" = x
7067 echo "$as_me:7067: checking for tgoto" >&5
7068 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
7069 if test "${ac_cv_func_tgoto+set}" = set; then
7070 echo $ECHO_N "(cached) $ECHO_C" >&6
7072 cat >"conftest.$ac_ext" <<_ACEOF
7073 #line 7073 "configure"
7074 #include "confdefs.h"
7075 #define tgoto autoconf_temporary
7076 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
7083 /* We use char because int might match the return type of a gcc2
7084 builtin and then its argument prototype would still apply. */
7091 /* The GNU C library defines stubs for functions which it implements
7092 to always fail with ENOSYS. Some functions are actually named
7093 something starting with __ and the normal name is an alias. */
7094 #if defined (__stub_tgoto) || defined (__stub___tgoto)
7095 #error found stub for tgoto
7103 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7104 if { (eval echo "$as_me:7104: \"$ac_link\"") >&5
7105 (eval $ac_link) 2>&5
7107 echo "$as_me:7107: \$? = $ac_status" >&5
7108 (exit "$ac_status"); } &&
7109 { ac_try='test -s "conftest$ac_exeext"'
7110 { (eval echo "$as_me:7110: \"$ac_try\"") >&5
7113 echo "$as_me:7113: \$? = $ac_status" >&5
7114 (exit "$ac_status"); }; }; then
7115 ac_cv_func_tgoto=yes
7117 echo "$as_me: failed program was:" >&5
7118 cat "conftest.$ac_ext" >&5
7121 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7123 echo "$as_me:7123: result: $ac_cv_func_tgoto" >&5
7124 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
7125 if test "$ac_cv_func_tgoto" = yes; then
7126 cf_term_lib=predefined
7129 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
7131 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
7132 echo "$as_me:7132: checking for tgoto in -l$cf_term_lib" >&5
7133 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
7134 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
7135 echo $ECHO_N "(cached) $ECHO_C" >&6
7137 ac_check_lib_save_LIBS=$LIBS
7138 LIBS="-l$cf_term_lib $LIBS"
7139 cat >"conftest.$ac_ext" <<_ACEOF
7140 #line 7140 "configure"
7141 #include "confdefs.h"
7143 /* Override any gcc2 internal prototype to avoid an error. */
7147 /* We use char because int might match the return type of a gcc2
7148 builtin and then its argument prototype would still apply. */
7158 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7159 if { (eval echo "$as_me:7159: \"$ac_link\"") >&5
7160 (eval $ac_link) 2>&5
7162 echo "$as_me:7162: \$? = $ac_status" >&5
7163 (exit "$ac_status"); } &&
7164 { ac_try='test -s "conftest$ac_exeext"'
7165 { (eval echo "$as_me:7165: \"$ac_try\"") >&5
7168 echo "$as_me:7168: \$? = $ac_status" >&5
7169 (exit "$ac_status"); }; }; then
7170 eval "$as_ac_Lib=yes"
7172 echo "$as_me: failed program was:" >&5
7173 cat "conftest.$ac_ext" >&5
7174 eval "$as_ac_Lib=no"
7176 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7177 LIBS=$ac_check_lib_save_LIBS
7179 echo "$as_me:7179: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
7180 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
7181 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
7183 : "${cf_nculib_root:=$cf_term_lib}"
7194 # Check for library containing initscr
7195 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
7196 if test "x$cf_curs_lib" = x
7198 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
7200 LIBS="-l$cf_curs_lib $cf_save_LIBS"
7201 if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
7202 echo "$as_me:7202: checking if we can link with $cf_curs_lib library" >&5
7203 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
7204 cat >"conftest.$ac_ext" <<_ACEOF
7205 #line 7205 "configure"
7206 #include "confdefs.h"
7207 #include <${cf_cv_ncurses_header:-curses.h}>
7216 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7217 if { (eval echo "$as_me:7217: \"$ac_link\"") >&5
7218 (eval $ac_link) 2>&5
7220 echo "$as_me:7220: \$? = $ac_status" >&5
7221 (exit "$ac_status"); } &&
7222 { ac_try='test -s "conftest$ac_exeext"'
7223 { (eval echo "$as_me:7223: \"$ac_try\"") >&5
7226 echo "$as_me:7226: \$? = $ac_status" >&5
7227 (exit "$ac_status"); }; }; then
7230 echo "$as_me: failed program was:" >&5
7231 cat "conftest.$ac_ext" >&5
7234 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7235 echo "$as_me:7235: result: $cf_result" >&5
7236 echo "${ECHO_T}$cf_result" >&6
7237 test "$cf_result" = yes && break
7238 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
7240 elif test "$cf_term_lib" != predefined ; then
7241 echo "$as_me:7241: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
7242 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
7243 cat >"conftest.$ac_ext" <<_ACEOF
7244 #line 7244 "configure"
7245 #include "confdefs.h"
7246 #include <${cf_cv_ncurses_header:-curses.h}>
7250 initscr(); tgoto((char *)0, 0, 0);
7255 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7256 if { (eval echo "$as_me:7256: \"$ac_link\"") >&5
7257 (eval $ac_link) 2>&5
7259 echo "$as_me:7259: \$? = $ac_status" >&5
7260 (exit "$ac_status"); } &&
7261 { ac_try='test -s "conftest$ac_exeext"'
7262 { (eval echo "$as_me:7262: \"$ac_try\"") >&5
7265 echo "$as_me:7265: \$? = $ac_status" >&5
7266 (exit "$ac_status"); }; }; then
7269 echo "$as_me: failed program was:" >&5
7270 cat "conftest.$ac_ext" >&5
7272 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
7273 cat >"conftest.$ac_ext" <<_ACEOF
7274 #line 7274 "configure"
7275 #include "confdefs.h"
7276 #include <${cf_cv_ncurses_header:-curses.h}>
7285 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7286 if { (eval echo "$as_me:7286: \"$ac_link\"") >&5
7287 (eval $ac_link) 2>&5
7289 echo "$as_me:7289: \$? = $ac_status" >&5
7290 (exit "$ac_status"); } &&
7291 { ac_try='test -s "conftest$ac_exeext"'
7292 { (eval echo "$as_me:7292: \"$ac_try\"") >&5
7295 echo "$as_me:7295: \$? = $ac_status" >&5
7296 (exit "$ac_status"); }; }; then
7299 echo "$as_me: failed program was:" >&5
7300 cat "conftest.$ac_ext" >&5
7303 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7306 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7307 echo "$as_me:7307: result: $cf_result" >&5
7308 echo "${ECHO_T}$cf_result" >&6
7309 test "$cf_result" != error && break
7313 test "$cf_curs_lib" = unknown && { { echo "$as_me:7313: error: no curses library found" >&5
7314 echo "$as_me: error: no curses library found" >&2;}
7315 { (exit 1); exit 1; }; }
7322 for ac_header in wchar.h
7324 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7325 echo "$as_me:7325: checking for $ac_header" >&5
7326 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7327 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7328 echo $ECHO_N "(cached) $ECHO_C" >&6
7330 cat >"conftest.$ac_ext" <<_ACEOF
7331 #line 7331 "configure"
7332 #include "confdefs.h"
7333 #include <$ac_header>
7335 if { (eval echo "$as_me:7335: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7336 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7338 $EGREP -v '^ *\+' conftest.er1 >conftest.err
7340 cat conftest.err >&5
7341 echo "$as_me:7341: \$? = $ac_status" >&5
7342 (exit "$ac_status"); } >/dev/null; then
7343 if test -s conftest.err; then
7344 ac_cpp_err=$ac_c_preproc_warn_flag
7351 if test -z "$ac_cpp_err"; then
7352 eval "$as_ac_Header=yes"
7354 echo "$as_me: failed program was:" >&5
7355 cat "conftest.$ac_ext" >&5
7356 eval "$as_ac_Header=no"
7358 rm -f conftest.err "conftest.$ac_ext"
7360 echo "$as_me:7360: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7361 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7362 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7363 cat >>confdefs.h <<EOF
7364 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7370 echo "$as_me:7370: checking for multibyte character support" >&5
7371 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7372 if test "${cf_cv_utf8_lib+set}" = set; then
7373 echo $ECHO_N "(cached) $ECHO_C" >&6
7376 cf_save_LIBS="$LIBS"
7377 cat >"conftest.$ac_ext" <<_ACEOF
7378 #line 7378 "configure"
7379 #include "confdefs.h"
7395 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7396 if { (eval echo "$as_me:7396: \"$ac_link\"") >&5
7397 (eval $ac_link) 2>&5
7399 echo "$as_me:7399: \$? = $ac_status" >&5
7400 (exit "$ac_status"); } &&
7401 { ac_try='test -s "conftest$ac_exeext"'
7402 { (eval echo "$as_me:7402: \"$ac_try\"") >&5
7405 echo "$as_me:7405: \$? = $ac_status" >&5
7406 (exit "$ac_status"); }; }; then
7409 echo "$as_me: failed program was:" >&5
7410 cat "conftest.$ac_ext" >&5
7412 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7413 # will be set on completion of the AC_TRY_LINK below.
7414 cf_cv_header_path_utf8=
7415 cf_cv_library_path_utf8=
7417 echo "${as_me:-configure}:7417: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7419 cf_save_LIBS="$LIBS"
7421 cat >"conftest.$ac_ext" <<_ACEOF
7422 #line 7422 "configure"
7423 #include "confdefs.h"
7425 #include <libutf8.h>
7434 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7435 if { (eval echo "$as_me:7435: \"$ac_link\"") >&5
7436 (eval $ac_link) 2>&5
7438 echo "$as_me:7438: \$? = $ac_status" >&5
7439 (exit "$ac_status"); } &&
7440 { ac_try='test -s "conftest$ac_exeext"'
7441 { (eval echo "$as_me:7441: \"$ac_try\"") >&5
7444 echo "$as_me:7444: \$? = $ac_status" >&5
7445 (exit "$ac_status"); }; }; then
7447 cf_cv_find_linkage_utf8=yes
7448 cf_cv_header_path_utf8=/usr/include
7449 cf_cv_library_path_utf8=/usr/lib
7452 echo "$as_me: failed program was:" >&5
7453 cat "conftest.$ac_ext" >&5
7455 LIBS="-lutf8 $cf_save_LIBS"
7457 cat >"conftest.$ac_ext" <<_ACEOF
7458 #line 7458 "configure"
7459 #include "confdefs.h"
7461 #include <libutf8.h>
7470 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7471 if { (eval echo "$as_me:7471: \"$ac_link\"") >&5
7472 (eval $ac_link) 2>&5
7474 echo "$as_me:7474: \$? = $ac_status" >&5
7475 (exit "$ac_status"); } &&
7476 { ac_try='test -s "conftest$ac_exeext"'
7477 { (eval echo "$as_me:7477: \"$ac_try\"") >&5
7480 echo "$as_me:7480: \$? = $ac_status" >&5
7481 (exit "$ac_status"); }; }; then
7483 cf_cv_find_linkage_utf8=yes
7484 cf_cv_header_path_utf8=/usr/include
7485 cf_cv_library_path_utf8=/usr/lib
7486 cf_cv_library_file_utf8="-lutf8"
7489 echo "$as_me: failed program was:" >&5
7490 cat "conftest.$ac_ext" >&5
7492 cf_cv_find_linkage_utf8=no
7493 LIBS="$cf_save_LIBS"
7495 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
7497 echo "${as_me:-configure}:7497: testing find linkage for utf8 library ..." 1>&5
7499 echo "${as_me:-configure}:7499: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7501 cf_save_CPPFLAGS="$CPPFLAGS"
7502 cf_test_CPPFLAGS="$CPPFLAGS"
7506 # collect the current set of include-directories from compiler flags
7507 cf_header_path_list=""
7508 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7509 for cf_header_path in $CPPFLAGS $CFLAGS
7511 case "$cf_header_path" in
7513 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7515 test "x$cf_header_path" != "xNONE" && \
7516 test -d "$cf_header_path" && \
7518 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7519 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
7520 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
7521 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
7522 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
7523 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7526 cf_header_path_list="$cf_header_path_list $cf_search"
7532 # add the variations for the package we are looking for
7536 test "x$prefix" != "xNONE" && \
7537 test -d "$prefix" && \
7539 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7540 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
7541 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
7542 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
7543 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
7544 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
7547 for cf_subdir_prefix in \
7556 test "x$cf_subdir_prefix" != "x$prefix" && \
7557 test -d "$cf_subdir_prefix" && \
7558 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7559 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7560 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
7561 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
7562 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
7563 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
7564 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
7569 test "$includedir" != NONE && \
7570 test "$includedir" != "/usr/include" && \
7571 test -d "$includedir" && {
7572 test -d "$includedir" && cf_search="$cf_search $includedir"
7573 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
7576 test "$oldincludedir" != NONE && \
7577 test "$oldincludedir" != "/usr/include" && \
7578 test -d "$oldincludedir" && {
7579 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
7580 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
7583 cf_search="$cf_search $cf_header_path_list"
7585 for cf_cv_header_path_utf8 in $cf_search
7587 if test -d "$cf_cv_header_path_utf8" ; then
7588 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
7590 echo "${as_me:-configure}:7590: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7592 CPPFLAGS="$cf_save_CPPFLAGS"
7594 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7595 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
7597 cat >"conftest.$ac_ext" <<_ACEOF
7598 #line 7598 "configure"
7599 #include "confdefs.h"
7601 #include <libutf8.h>
7610 rm -f "conftest.$ac_objext"
7611 if { (eval echo "$as_me:7611: \"$ac_compile\"") >&5
7612 (eval $ac_compile) 2>&5
7614 echo "$as_me:7614: \$? = $ac_status" >&5
7615 (exit "$ac_status"); } &&
7616 { ac_try='test -s "conftest.$ac_objext"'
7617 { (eval echo "$as_me:7617: \"$ac_try\"") >&5
7620 echo "$as_me:7620: \$? = $ac_status" >&5
7621 (exit "$ac_status"); }; }; then
7623 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7625 echo "${as_me:-configure}:7625: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7627 cf_cv_find_linkage_utf8=maybe
7628 cf_test_CPPFLAGS="$CPPFLAGS"
7631 echo "$as_me: failed program was:" >&5
7632 cat "conftest.$ac_ext" >&5
7634 CPPFLAGS="$cf_save_CPPFLAGS"
7637 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7641 if test "$cf_cv_find_linkage_utf8" = maybe ; then
7643 echo "${as_me:-configure}:7643: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7645 cf_save_LIBS="$LIBS"
7646 cf_save_LDFLAGS="$LDFLAGS"
7648 if test "$cf_cv_find_linkage_utf8" != yes ; then
7651 cf_library_path_list=""
7652 if test -n "${LDFLAGS}${LIBS}" ; then
7653 for cf_library_path in $LDFLAGS $LIBS
7655 case "$cf_library_path" in
7657 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7659 test "x$cf_library_path" != "xNONE" && \
7660 test -d "$cf_library_path" && \
7662 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7663 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
7664 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
7665 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7666 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
7667 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7670 cf_library_path_list="$cf_library_path_list $cf_search"
7678 test "x$prefix" != "xNONE" && \
7679 test -d "$prefix" && \
7681 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7682 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
7683 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
7684 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
7685 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
7686 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
7689 for cf_subdir_prefix in \
7698 test "x$cf_subdir_prefix" != "x$prefix" && \
7699 test -d "$cf_subdir_prefix" && \
7700 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7701 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7702 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
7703 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
7704 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
7705 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
7706 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
7711 cf_search="$cf_library_path_list $cf_search"
7713 for cf_cv_library_path_utf8 in $cf_search
7715 if test -d "$cf_cv_library_path_utf8" ; then
7716 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7718 echo "${as_me:-configure}:7718: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7720 CPPFLAGS="$cf_test_CPPFLAGS"
7721 LIBS="-lutf8 $cf_save_LIBS"
7722 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7723 cat >"conftest.$ac_ext" <<_ACEOF
7724 #line 7724 "configure"
7725 #include "confdefs.h"
7727 #include <libutf8.h>
7736 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7737 if { (eval echo "$as_me:7737: \"$ac_link\"") >&5
7738 (eval $ac_link) 2>&5
7740 echo "$as_me:7740: \$? = $ac_status" >&5
7741 (exit "$ac_status"); } &&
7742 { ac_try='test -s "conftest$ac_exeext"'
7743 { (eval echo "$as_me:7743: \"$ac_try\"") >&5
7746 echo "$as_me:7746: \$? = $ac_status" >&5
7747 (exit "$ac_status"); }; }; then
7749 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7751 echo "${as_me:-configure}:7751: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7753 cf_cv_find_linkage_utf8=yes
7754 cf_cv_library_file_utf8="-lutf8"
7757 echo "$as_me: failed program was:" >&5
7758 cat "conftest.$ac_ext" >&5
7760 CPPFLAGS="$cf_save_CPPFLAGS"
7761 LIBS="$cf_save_LIBS"
7762 LDFLAGS="$cf_save_LDFLAGS"
7765 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7768 CPPFLAGS="$cf_save_CPPFLAGS"
7769 LDFLAGS="$cf_save_LDFLAGS"
7773 cf_cv_find_linkage_utf8=no
7777 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7780 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7782 LIBS="$cf_save_LIBS"
7784 if test "$cf_cv_find_linkage_utf8" = yes ; then
7785 cf_cv_utf8_lib=add-on
7791 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7793 echo "$as_me:7793: result: $cf_cv_utf8_lib" >&5
7794 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7796 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7798 if test "$cf_cv_utf8_lib" = "add-on" ; then
7800 cat >>confdefs.h <<\EOF
7801 #define HAVE_LIBUTF8_H 1
7804 if test -n "$cf_cv_header_path_utf8" ; then
7805 for cf_add_incdir in $cf_cv_header_path_utf8
7807 while test "$cf_add_incdir" != /usr/include
7809 if test -d "$cf_add_incdir"
7812 if test -n "$CFLAGS$CPPFLAGS" ; then
7813 # a loop is needed to ensure we can add subdirs of existing dirs
7814 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7815 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7816 cf_have_incdir=yes; break
7821 if test "$cf_have_incdir" = no ; then
7822 if test "$cf_add_incdir" = /usr/local/include ; then
7823 if test "$GCC" = yes
7825 cf_save_CPPFLAGS=$CPPFLAGS
7827 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7828 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7830 cat >"conftest.$ac_ext" <<_ACEOF
7831 #line 7831 "configure"
7832 #include "confdefs.h"
7842 rm -f "conftest.$ac_objext"
7843 if { (eval echo "$as_me:7843: \"$ac_compile\"") >&5
7844 (eval $ac_compile) 2>&5
7846 echo "$as_me:7846: \$? = $ac_status" >&5
7847 (exit "$ac_status"); } &&
7848 { ac_try='test -s "conftest.$ac_objext"'
7849 { (eval echo "$as_me:7849: \"$ac_try\"") >&5
7852 echo "$as_me:7852: \$? = $ac_status" >&5
7853 (exit "$ac_status"); }; }; then
7856 echo "$as_me: failed program was:" >&5
7857 cat "conftest.$ac_ext" >&5
7860 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7861 CPPFLAGS=$cf_save_CPPFLAGS
7866 if test "$cf_have_incdir" = no ; then
7867 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7869 echo "${as_me:-configure}:7869: testing adding $cf_add_incdir to include-path ..." 1>&5
7871 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7873 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7874 test "$cf_top_incdir" = "$cf_add_incdir" && break
7875 cf_add_incdir="$cf_top_incdir"
7886 if test -n "$cf_cv_library_path_utf8" ; then
7887 for cf_add_libdir in $cf_cv_library_path_utf8
7889 if test "$cf_add_libdir" = /usr/lib ; then
7891 elif test -d "$cf_add_libdir"
7894 if test -n "$LDFLAGS$LIBS" ; then
7895 # a loop is needed to ensure we can add subdirs of existing dirs
7896 for cf_test_libdir in $LDFLAGS $LIBS ; do
7897 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7898 cf_have_libdir=yes; break
7902 if test "$cf_have_libdir" = no ; then
7903 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7905 echo "${as_me:-configure}:7905: testing adding $cf_add_libdir to library-path ..." 1>&5
7907 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7916 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7918 for cf_add_1lib in $cf_add_0lib; do
7919 for cf_add_2lib in $cf_add_libs; do
7920 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7925 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7931 cf_ncuconfig_root=$cf_cv_screen
7932 cf_have_ncuconfig=no
7934 if test "x${PKG_CONFIG:=none}" != xnone; then
7935 echo "$as_me:7935: checking pkg-config for $cf_ncuconfig_root" >&5
7936 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7937 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7938 echo "$as_me:7938: result: yes" >&5
7939 echo "${ECHO_T}yes" >&6
7941 echo "$as_me:7941: checking if the $cf_ncuconfig_root package files work" >&5
7942 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7943 cf_have_ncuconfig=unknown
7945 cf_save_CFLAGS="$CFLAGS"
7946 cf_save_CPPFLAGS="$CPPFLAGS"
7947 cf_save_LIBS="$LIBS"
7949 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7950 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7952 # while -W for passing linker flags is prevalent, it is not "standard".
7953 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7954 # incompatible _and_ non-standard -W option which gives an error. Work
7955 # around that pitfall.
7956 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7962 cf_new_extra_cppflags=
7964 for cf_add_cflags in $cf_pkg_cflags
7966 case "$cf_fix_cppflags" in
7968 case "$cf_add_cflags" in
7969 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7970 case "$cf_add_cflags" in
7972 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7974 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7975 && test -z "${cf_tst_cflags}" \
7976 && cf_fix_cppflags=yes
7978 if test "$cf_fix_cppflags" = yes ; then
7980 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7981 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7984 elif test "${cf_tst_cflags}" = "\"'" ; then
7986 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7987 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7997 case "$cf_add_cflags" in
7999 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8001 CPPFLAGS=`echo "$CPPFLAGS" | \
8002 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8003 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8008 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8009 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8016 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8017 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8024 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8025 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8027 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8029 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8030 && test -z "${cf_tst_cflags}" \
8031 && cf_fix_cppflags=no
8036 if test -n "$cf_new_cflags" ; then
8038 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8039 CFLAGS="${CFLAGS}$cf_new_cflags"
8043 if test -n "$cf_new_cppflags" ; then
8045 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8046 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8050 if test -n "$cf_new_extra_cppflags" ; then
8052 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8053 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8060 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8062 for cf_add_1lib in $cf_add_0lib; do
8063 for cf_add_2lib in $cf_add_libs; do
8064 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8069 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8073 cat >"conftest.$ac_ext" <<_ACEOF
8074 #line 8074 "configure"
8075 #include "confdefs.h"
8076 #include <${cf_cv_ncurses_header:-curses.h}>
8080 initscr(); mousemask(0,0); tigetstr((char *)0);
8085 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8086 if { (eval echo "$as_me:8086: \"$ac_link\"") >&5
8087 (eval $ac_link) 2>&5
8089 echo "$as_me:8089: \$? = $ac_status" >&5
8090 (exit "$ac_status"); } &&
8091 { ac_try='test -s "conftest$ac_exeext"'
8092 { (eval echo "$as_me:8092: \"$ac_try\"") >&5
8095 echo "$as_me:8095: \$? = $ac_status" >&5
8096 (exit "$ac_status"); }; }; then
8097 if test "$cross_compiling" = yes; then
8098 cf_test_ncuconfig=maybe
8100 cat >"conftest.$ac_ext" <<_ACEOF
8101 #line 8101 "configure"
8102 #include "confdefs.h"
8103 #include <${cf_cv_ncurses_header:-curses.h}>
8105 { const char *xx = curses_version(); return (xx == 0); }
8107 rm -f "conftest$ac_exeext"
8108 if { (eval echo "$as_me:8108: \"$ac_link\"") >&5
8109 (eval $ac_link) 2>&5
8111 echo "$as_me:8111: \$? = $ac_status" >&5
8112 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8113 { (eval echo "$as_me:8113: \"$ac_try\"") >&5
8116 echo "$as_me:8116: \$? = $ac_status" >&5
8117 (exit "$ac_status"); }; }; then
8118 cf_test_ncuconfig=yes
8120 echo "$as_me: program exited with status $ac_status" >&5
8121 echo "$as_me: failed program was:" >&5
8122 cat "conftest.$ac_ext" >&5
8123 cf_test_ncuconfig=no
8125 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8128 echo "$as_me: failed program was:" >&5
8129 cat "conftest.$ac_ext" >&5
8130 cf_test_ncuconfig=no
8132 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8134 CFLAGS="$cf_save_CFLAGS"
8135 CPPFLAGS="$cf_save_CPPFLAGS"
8136 LIBS="$cf_save_LIBS"
8138 if test "x$cf_test_ncuconfig" != xyes; then
8139 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
8140 cf_pkg_cflags="$cf_temp"
8141 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
8142 cf_pkg_libs="$cf_temp"
8150 cf_new_extra_cppflags=
8152 for cf_add_cflags in $cf_pkg_cflags
8154 case "$cf_fix_cppflags" in
8156 case "$cf_add_cflags" in
8157 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8158 case "$cf_add_cflags" in
8160 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8162 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8163 && test -z "${cf_tst_cflags}" \
8164 && cf_fix_cppflags=yes
8166 if test "$cf_fix_cppflags" = yes ; then
8168 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8169 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8172 elif test "${cf_tst_cflags}" = "\"'" ; then
8174 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8175 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8185 case "$cf_add_cflags" in
8187 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8189 CPPFLAGS=`echo "$CPPFLAGS" | \
8190 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8191 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8196 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8197 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8204 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8205 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8212 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8213 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8215 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8217 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8218 && test -z "${cf_tst_cflags}" \
8219 && cf_fix_cppflags=no
8224 if test -n "$cf_new_cflags" ; then
8226 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8227 CFLAGS="${CFLAGS}$cf_new_cflags"
8231 if test -n "$cf_new_cppflags" ; then
8233 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8234 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8238 if test -n "$cf_new_extra_cppflags" ; then
8240 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8241 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8248 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8250 for cf_add_1lib in $cf_add_0lib; do
8251 for cf_add_2lib in $cf_add_libs; do
8252 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8257 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8261 cat >"conftest.$ac_ext" <<_ACEOF
8262 #line 8262 "configure"
8263 #include "confdefs.h"
8264 #include <${cf_cv_ncurses_header:-curses.h}>
8268 initscr(); mousemask(0,0); tigetstr((char *)0);
8273 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8274 if { (eval echo "$as_me:8274: \"$ac_link\"") >&5
8275 (eval $ac_link) 2>&5
8277 echo "$as_me:8277: \$? = $ac_status" >&5
8278 (exit "$ac_status"); } &&
8279 { ac_try='test -s "conftest$ac_exeext"'
8280 { (eval echo "$as_me:8280: \"$ac_try\"") >&5
8283 echo "$as_me:8283: \$? = $ac_status" >&5
8284 (exit "$ac_status"); }; }; then
8285 if test "$cross_compiling" = yes; then
8286 cf_have_ncuconfig=maybe
8288 cat >"conftest.$ac_ext" <<_ACEOF
8289 #line 8289 "configure"
8290 #include "confdefs.h"
8291 #include <${cf_cv_ncurses_header:-curses.h}>
8293 { const char *xx = curses_version(); return (xx == 0); }
8295 rm -f "conftest$ac_exeext"
8296 if { (eval echo "$as_me:8296: \"$ac_link\"") >&5
8297 (eval $ac_link) 2>&5
8299 echo "$as_me:8299: \$? = $ac_status" >&5
8300 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8301 { (eval echo "$as_me:8301: \"$ac_try\"") >&5
8304 echo "$as_me:8304: \$? = $ac_status" >&5
8305 (exit "$ac_status"); }; }; then
8306 cf_have_ncuconfig=yes
8308 echo "$as_me: program exited with status $ac_status" >&5
8309 echo "$as_me: failed program was:" >&5
8310 cat "conftest.$ac_ext" >&5
8311 cf_have_ncuconfig=no
8313 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8316 echo "$as_me: failed program was:" >&5
8317 cat "conftest.$ac_ext" >&5
8318 cf_have_ncuconfig=no
8320 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8321 echo "$as_me:8321: result: $cf_have_ncuconfig" >&5
8322 echo "${ECHO_T}$cf_have_ncuconfig" >&6
8323 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
8324 if test "$cf_have_ncuconfig" != "yes"
8326 CPPFLAGS="$cf_save_CPPFLAGS"
8327 LIBS="$cf_save_LIBS"
8328 NCURSES_CONFIG_PKG=none
8331 cat >>confdefs.h <<\EOF
8335 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
8337 echo "$as_me:8337: checking for terminfo header" >&5
8338 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8339 if test "${cf_cv_term_header+set}" = set; then
8340 echo $ECHO_N "(cached) $ECHO_C" >&6
8343 case "${cf_cv_ncurses_header}" in
8344 (*/ncurses.h|*/ncursesw.h)
8345 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8348 cf_term_header=term.h
8352 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8354 cat >"conftest.$ac_ext" <<_ACEOF
8355 #line 8355 "configure"
8356 #include "confdefs.h"
8358 #include <${cf_cv_ncurses_header:-curses.h}>
8364 int x = auto_left_margin; (void)x
8369 rm -f "conftest.$ac_objext"
8370 if { (eval echo "$as_me:8370: \"$ac_compile\"") >&5
8371 (eval $ac_compile) 2>&5
8373 echo "$as_me:8373: \$? = $ac_status" >&5
8374 (exit "$ac_status"); } &&
8375 { ac_try='test -s "conftest.$ac_objext"'
8376 { (eval echo "$as_me:8376: \"$ac_try\"") >&5
8379 echo "$as_me:8379: \$? = $ac_status" >&5
8380 (exit "$ac_status"); }; }; then
8382 cf_cv_term_header="$cf_test"
8384 echo "$as_me: failed program was:" >&5
8385 cat "conftest.$ac_ext" >&5
8387 cf_cv_term_header=unknown
8390 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8391 test "$cf_cv_term_header" != unknown && break
8395 echo "$as_me:8395: result: $cf_cv_term_header" >&5
8396 echo "${ECHO_T}$cf_cv_term_header" >&6
8398 # Set definitions to allow ifdef'ing to accommodate subdirectories
8400 case "$cf_cv_term_header" in
8403 cat >>confdefs.h <<\EOF
8404 #define HAVE_TERM_H 1
8410 case "$cf_cv_term_header" in
8413 cat >>confdefs.h <<\EOF
8414 #define HAVE_NCURSES_TERM_H 1
8420 cat >>confdefs.h <<\EOF
8421 #define HAVE_NCURSESW_TERM_H 1
8430 echo "$as_me:8430: result: no" >&5
8431 echo "${ECHO_T}no" >&6
8432 NCURSES_CONFIG_PKG=none
8435 NCURSES_CONFIG_PKG=none
8438 if test "x$cf_have_ncuconfig" = "xno"; then
8439 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
8441 if test -n "$ac_tool_prefix"; then
8442 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8444 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8445 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8446 echo "$as_me:8446: checking for $ac_word" >&5
8447 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8448 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8449 echo $ECHO_N "(cached) $ECHO_C" >&6
8451 if test -n "$NCURSES_CONFIG"; then
8452 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8454 ac_save_IFS=$IFS; IFS=$ac_path_separator
8456 for ac_dir in $ac_dummy; do
8458 test -z "$ac_dir" && ac_dir=.
8459 $as_executable_p "$ac_dir/$ac_word" || continue
8460 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8461 echo "$as_me:8461: found $ac_dir/$ac_word" >&5
8467 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8468 if test -n "$NCURSES_CONFIG"; then
8469 echo "$as_me:8469: result: $NCURSES_CONFIG" >&5
8470 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8472 echo "$as_me:8472: result: no" >&5
8473 echo "${ECHO_T}no" >&6
8476 test -n "$NCURSES_CONFIG" && break
8479 if test -z "$NCURSES_CONFIG"; then
8480 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8481 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8483 # Extract the first word of "$ac_prog", so it can be a program name with args.
8484 set dummy $ac_prog; ac_word=$2
8485 echo "$as_me:8485: checking for $ac_word" >&5
8486 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8487 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8488 echo $ECHO_N "(cached) $ECHO_C" >&6
8490 if test -n "$ac_ct_NCURSES_CONFIG"; then
8491 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8493 ac_save_IFS=$IFS; IFS=$ac_path_separator
8495 for ac_dir in $ac_dummy; do
8497 test -z "$ac_dir" && ac_dir=.
8498 $as_executable_p "$ac_dir/$ac_word" || continue
8499 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8500 echo "$as_me:8500: found $ac_dir/$ac_word" >&5
8506 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8507 if test -n "$ac_ct_NCURSES_CONFIG"; then
8508 echo "$as_me:8508: result: $ac_ct_NCURSES_CONFIG" >&5
8509 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8511 echo "$as_me:8511: result: no" >&5
8512 echo "${ECHO_T}no" >&6
8515 test -n "$ac_ct_NCURSES_CONFIG" && break
8517 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8519 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8522 if test "$NCURSES_CONFIG" != none ; then
8527 cf_new_extra_cppflags=
8529 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
8531 case "$cf_fix_cppflags" in
8533 case "$cf_add_cflags" in
8534 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8535 case "$cf_add_cflags" in
8537 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8539 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8540 && test -z "${cf_tst_cflags}" \
8541 && cf_fix_cppflags=yes
8543 if test "$cf_fix_cppflags" = yes ; then
8545 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8546 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8549 elif test "${cf_tst_cflags}" = "\"'" ; then
8551 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8552 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8562 case "$cf_add_cflags" in
8564 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8566 CPPFLAGS=`echo "$CPPFLAGS" | \
8567 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8568 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8573 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8574 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8581 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8582 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8589 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8590 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8592 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8594 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8595 && test -z "${cf_tst_cflags}" \
8596 && cf_fix_cppflags=no
8601 if test -n "$cf_new_cflags" ; then
8603 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8604 CFLAGS="${CFLAGS}$cf_new_cflags"
8608 if test -n "$cf_new_cppflags" ; then
8610 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8611 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8615 if test -n "$cf_new_extra_cppflags" ; then
8617 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8618 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8625 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8627 for cf_add_1lib in $cf_add_0lib; do
8628 for cf_add_2lib in $cf_add_libs; do
8629 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8634 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8638 # even with config script, some packages use no-override for curses.h
8640 echo "$as_me:8640: checking if we have identified curses headers" >&5
8641 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8642 if test "${cf_cv_ncurses_header+set}" = set; then
8643 echo $ECHO_N "(cached) $ECHO_C" >&6
8646 cf_cv_ncurses_header=none
8648 ncurses.h $cf_cv_screen/ncurses.h \
8649 curses.h $cf_cv_screen/curses.h
8651 cat >"conftest.$ac_ext" <<_ACEOF
8652 #line 8652 "configure"
8653 #include "confdefs.h"
8654 #include <${cf_header}>
8658 initscr(); tgoto("?", 0,0)
8663 rm -f "conftest.$ac_objext"
8664 if { (eval echo "$as_me:8664: \"$ac_compile\"") >&5
8665 (eval $ac_compile) 2>&5
8667 echo "$as_me:8667: \$? = $ac_status" >&5
8668 (exit "$ac_status"); } &&
8669 { ac_try='test -s "conftest.$ac_objext"'
8670 { (eval echo "$as_me:8670: \"$ac_try\"") >&5
8673 echo "$as_me:8673: \$? = $ac_status" >&5
8674 (exit "$ac_status"); }; }; then
8675 cf_cv_ncurses_header=$cf_header; break
8677 echo "$as_me: failed program was:" >&5
8678 cat "conftest.$ac_ext" >&5
8680 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8684 echo "$as_me:8684: result: $cf_cv_ncurses_header" >&5
8685 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8687 if test "$cf_cv_ncurses_header" = none ; then
8688 { { echo "$as_me:8688: error: No curses header-files found" >&5
8689 echo "$as_me: error: No curses header-files found" >&2;}
8690 { (exit 1); exit 1; }; }
8693 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8695 for ac_header in $cf_cv_ncurses_header
8697 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8698 echo "$as_me:8698: checking for $ac_header" >&5
8699 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8700 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8701 echo $ECHO_N "(cached) $ECHO_C" >&6
8703 cat >"conftest.$ac_ext" <<_ACEOF
8704 #line 8704 "configure"
8705 #include "confdefs.h"
8706 #include <$ac_header>
8708 if { (eval echo "$as_me:8708: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8709 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8711 $EGREP -v '^ *\+' conftest.er1 >conftest.err
8713 cat conftest.err >&5
8714 echo "$as_me:8714: \$? = $ac_status" >&5
8715 (exit "$ac_status"); } >/dev/null; then
8716 if test -s conftest.err; then
8717 ac_cpp_err=$ac_c_preproc_warn_flag
8724 if test -z "$ac_cpp_err"; then
8725 eval "$as_ac_Header=yes"
8727 echo "$as_me: failed program was:" >&5
8728 cat "conftest.$ac_ext" >&5
8729 eval "$as_ac_Header=no"
8731 rm -f conftest.err "conftest.$ac_ext"
8733 echo "$as_me:8733: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8734 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8735 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8736 cat >>confdefs.h <<EOF
8737 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8743 cat >>confdefs.h <<\EOF
8747 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8749 cat >>confdefs.h <<EOF
8750 #define $cf_nculib_ROOT 1
8753 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
8757 cf_ncuhdr_root=$cf_cv_screen
8759 test -n "$cf_cv_curses_dir" && \
8760 test "$cf_cv_curses_dir" != "no" && { \
8762 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8763 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8765 while test "$cf_add_incdir" != /usr/include
8767 if test -d "$cf_add_incdir"
8770 if test -n "$CFLAGS$CPPFLAGS" ; then
8771 # a loop is needed to ensure we can add subdirs of existing dirs
8772 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8773 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8774 cf_have_incdir=yes; break
8779 if test "$cf_have_incdir" = no ; then
8780 if test "$cf_add_incdir" = /usr/local/include ; then
8781 if test "$GCC" = yes
8783 cf_save_CPPFLAGS=$CPPFLAGS
8785 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8786 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8788 cat >"conftest.$ac_ext" <<_ACEOF
8789 #line 8789 "configure"
8790 #include "confdefs.h"
8800 rm -f "conftest.$ac_objext"
8801 if { (eval echo "$as_me:8801: \"$ac_compile\"") >&5
8802 (eval $ac_compile) 2>&5
8804 echo "$as_me:8804: \$? = $ac_status" >&5
8805 (exit "$ac_status"); } &&
8806 { ac_try='test -s "conftest.$ac_objext"'
8807 { (eval echo "$as_me:8807: \"$ac_try\"") >&5
8810 echo "$as_me:8810: \$? = $ac_status" >&5
8811 (exit "$ac_status"); }; }; then
8814 echo "$as_me: failed program was:" >&5
8815 cat "conftest.$ac_ext" >&5
8818 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8819 CPPFLAGS=$cf_save_CPPFLAGS
8824 if test "$cf_have_incdir" = no ; then
8825 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8827 echo "${as_me:-configure}:8827: testing adding $cf_add_incdir to include-path ..." 1>&5
8829 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8831 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8832 test "$cf_top_incdir" = "$cf_add_incdir" && break
8833 cf_add_incdir="$cf_top_incdir"
8846 echo "$as_me:8846: checking for $cf_ncuhdr_root header in include-path" >&5
8847 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8848 if test "${cf_cv_ncurses_h+set}" = set; then
8849 echo $ECHO_N "(cached) $ECHO_C" >&6
8852 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8853 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
8854 for cf_header in $cf_header_list
8857 cat >"conftest.$ac_ext" <<_ACEOF
8858 #line 8858 "configure"
8859 #include "confdefs.h"
8861 #include <$cf_header>
8866 #ifdef NCURSES_VERSION
8868 printf("%s\\n", NCURSES_VERSION);
8881 rm -f "conftest.$ac_objext"
8882 if { (eval echo "$as_me:8882: \"$ac_compile\"") >&5
8883 (eval $ac_compile) 2>&5
8885 echo "$as_me:8885: \$? = $ac_status" >&5
8886 (exit "$ac_status"); } &&
8887 { ac_try='test -s "conftest.$ac_objext"'
8888 { (eval echo "$as_me:8888: \"$ac_try\"") >&5
8891 echo "$as_me:8891: \$? = $ac_status" >&5
8892 (exit "$ac_status"); }; }; then
8893 cf_cv_ncurses_h=$cf_header
8896 echo "$as_me: failed program was:" >&5
8897 cat "conftest.$ac_ext" >&5
8900 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8902 test "$cf_cv_ncurses_h" != no && break
8906 echo "$as_me:8906: result: $cf_cv_ncurses_h" >&5
8907 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8909 if test "$cf_cv_ncurses_h" != no ; then
8910 cf_cv_ncurses_header=$cf_cv_ncurses_h
8913 echo "$as_me:8913: checking for $cf_ncuhdr_root include-path" >&5
8914 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8915 if test "${cf_cv_ncurses_h2+set}" = set; then
8916 echo $ECHO_N "(cached) $ECHO_C" >&6
8919 test -n "$verbose" && echo
8923 # collect the current set of include-directories from compiler flags
8924 cf_header_path_list=""
8925 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8926 for cf_header_path in $CPPFLAGS $CFLAGS
8928 case "$cf_header_path" in
8930 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8932 test "x$cf_header_path" != "xNONE" && \
8933 test -d "$cf_header_path" && \
8935 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8936 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8937 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8938 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8939 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8940 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"
8943 cf_header_path_list="$cf_header_path_list $cf_search"
8949 # add the variations for the package we are looking for
8953 test "x$prefix" != "xNONE" && \
8954 test -d "$prefix" && \
8956 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8957 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8958 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8959 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8960 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8961 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8964 for cf_subdir_prefix in \
8973 test "x$cf_subdir_prefix" != "x$prefix" && \
8974 test -d "$cf_subdir_prefix" && \
8975 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8976 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8977 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8978 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8979 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8980 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8981 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"
8986 test "$includedir" != NONE && \
8987 test "$includedir" != "/usr/include" && \
8988 test -d "$includedir" && {
8989 test -d "$includedir" && cf_search="$cf_search $includedir"
8990 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8993 test "$oldincludedir" != NONE && \
8994 test "$oldincludedir" != "/usr/include" && \
8995 test -d "$oldincludedir" && {
8996 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8997 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
9000 cf_search="$cf_search $cf_header_path_list"
9002 test -n "$verbose" && echo "search path $cf_search"
9003 cf_save2_CPPFLAGS="$CPPFLAGS"
9004 for cf_incdir in $cf_search
9007 if test -n "$cf_incdir" ; then
9008 for cf_add_incdir in $cf_incdir
9010 while test "$cf_add_incdir" != /usr/include
9012 if test -d "$cf_add_incdir"
9015 if test -n "$CFLAGS$CPPFLAGS" ; then
9016 # a loop is needed to ensure we can add subdirs of existing dirs
9017 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9018 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9019 cf_have_incdir=yes; break
9024 if test "$cf_have_incdir" = no ; then
9025 if test "$cf_add_incdir" = /usr/local/include ; then
9026 if test "$GCC" = yes
9028 cf_save_CPPFLAGS=$CPPFLAGS
9030 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9031 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9033 cat >"conftest.$ac_ext" <<_ACEOF
9034 #line 9034 "configure"
9035 #include "confdefs.h"
9045 rm -f "conftest.$ac_objext"
9046 if { (eval echo "$as_me:9046: \"$ac_compile\"") >&5
9047 (eval $ac_compile) 2>&5
9049 echo "$as_me:9049: \$? = $ac_status" >&5
9050 (exit "$ac_status"); } &&
9051 { ac_try='test -s "conftest.$ac_objext"'
9052 { (eval echo "$as_me:9052: \"$ac_try\"") >&5
9055 echo "$as_me:9055: \$? = $ac_status" >&5
9056 (exit "$ac_status"); }; }; then
9059 echo "$as_me: failed program was:" >&5
9060 cat "conftest.$ac_ext" >&5
9063 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9064 CPPFLAGS=$cf_save_CPPFLAGS
9069 if test "$cf_have_incdir" = no ; then
9070 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9072 echo "${as_me:-configure}:9072: testing adding $cf_add_incdir to include-path ..." 1>&5
9074 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9076 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9077 test "$cf_top_incdir" = "$cf_add_incdir" && break
9078 cf_add_incdir="$cf_top_incdir"
9094 cat >"conftest.$ac_ext" <<_ACEOF
9095 #line 9095 "configure"
9096 #include "confdefs.h"
9098 #include <$cf_header>
9103 #ifdef NCURSES_VERSION
9105 printf("%s\\n", NCURSES_VERSION);
9118 rm -f "conftest.$ac_objext"
9119 if { (eval echo "$as_me:9119: \"$ac_compile\"") >&5
9120 (eval $ac_compile) 2>&5
9122 echo "$as_me:9122: \$? = $ac_status" >&5
9123 (exit "$ac_status"); } &&
9124 { ac_try='test -s "conftest.$ac_objext"'
9125 { (eval echo "$as_me:9125: \"$ac_try\"") >&5
9128 echo "$as_me:9128: \$? = $ac_status" >&5
9129 (exit "$ac_status"); }; }; then
9130 cf_cv_ncurses_h2=$cf_header
9133 echo "$as_me: failed program was:" >&5
9134 cat "conftest.$ac_ext" >&5
9137 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9139 if test "$cf_cv_ncurses_h2" != no ; then
9140 cf_cv_ncurses_h2=$cf_incdir/$cf_header
9141 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
9144 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
9146 CPPFLAGS="$cf_save2_CPPFLAGS"
9147 test "$cf_cv_ncurses_h2" != no && break
9149 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9149: error: not found" >&5
9150 echo "$as_me: error: not found" >&2;}
9151 { (exit 1); exit 1; }; }
9154 echo "$as_me:9154: result: $cf_cv_ncurses_h2" >&5
9155 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
9157 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
9158 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
9159 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
9160 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
9163 if test -n "$cf_1st_incdir" ; then
9164 for cf_add_incdir in $cf_1st_incdir
9166 while test "$cf_add_incdir" != /usr/include
9168 if test -d "$cf_add_incdir"
9171 if test -n "$CFLAGS$CPPFLAGS" ; then
9172 # a loop is needed to ensure we can add subdirs of existing dirs
9173 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9174 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9175 cf_have_incdir=yes; break
9180 if test "$cf_have_incdir" = no ; then
9181 if test "$cf_add_incdir" = /usr/local/include ; then
9182 if test "$GCC" = yes
9184 cf_save_CPPFLAGS=$CPPFLAGS
9186 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9187 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9189 cat >"conftest.$ac_ext" <<_ACEOF
9190 #line 9190 "configure"
9191 #include "confdefs.h"
9201 rm -f "conftest.$ac_objext"
9202 if { (eval echo "$as_me:9202: \"$ac_compile\"") >&5
9203 (eval $ac_compile) 2>&5
9205 echo "$as_me:9205: \$? = $ac_status" >&5
9206 (exit "$ac_status"); } &&
9207 { ac_try='test -s "conftest.$ac_objext"'
9208 { (eval echo "$as_me:9208: \"$ac_try\"") >&5
9211 echo "$as_me:9211: \$? = $ac_status" >&5
9212 (exit "$ac_status"); }; }; then
9215 echo "$as_me: failed program was:" >&5
9216 cat "conftest.$ac_ext" >&5
9219 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9220 CPPFLAGS=$cf_save_CPPFLAGS
9225 if test "$cf_have_incdir" = no ; then
9226 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9228 echo "${as_me:-configure}:9228: testing adding $cf_add_incdir to include-path ..." 1>&5
9230 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9232 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9233 test "$cf_top_incdir" = "$cf_add_incdir" && break
9234 cf_add_incdir="$cf_top_incdir"
9247 # Set definitions to allow ifdef'ing for ncurses.h
9249 case "$cf_cv_ncurses_header" in
9252 cat >>confdefs.h <<\EOF
9253 #define HAVE_NCURSES_H 1
9259 case "$cf_cv_ncurses_header" in
9260 (ncurses/curses.h|ncurses/ncurses.h)
9262 cat >>confdefs.h <<\EOF
9263 #define HAVE_NCURSES_NCURSES_H 1
9267 (ncursesw/curses.h|ncursesw/ncurses.h)
9269 cat >>confdefs.h <<\EOF
9270 #define HAVE_NCURSESW_NCURSES_H 1
9276 echo "$as_me:9276: checking for terminfo header" >&5
9277 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9278 if test "${cf_cv_term_header+set}" = set; then
9279 echo $ECHO_N "(cached) $ECHO_C" >&6
9282 case "${cf_cv_ncurses_header}" in
9283 (*/ncurses.h|*/ncursesw.h)
9284 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9287 cf_term_header=term.h
9291 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9293 cat >"conftest.$ac_ext" <<_ACEOF
9294 #line 9294 "configure"
9295 #include "confdefs.h"
9297 #include <${cf_cv_ncurses_header:-curses.h}>
9303 int x = auto_left_margin; (void)x
9308 rm -f "conftest.$ac_objext"
9309 if { (eval echo "$as_me:9309: \"$ac_compile\"") >&5
9310 (eval $ac_compile) 2>&5
9312 echo "$as_me:9312: \$? = $ac_status" >&5
9313 (exit "$ac_status"); } &&
9314 { ac_try='test -s "conftest.$ac_objext"'
9315 { (eval echo "$as_me:9315: \"$ac_try\"") >&5
9318 echo "$as_me:9318: \$? = $ac_status" >&5
9319 (exit "$ac_status"); }; }; then
9321 cf_cv_term_header="$cf_test"
9323 echo "$as_me: failed program was:" >&5
9324 cat "conftest.$ac_ext" >&5
9326 cf_cv_term_header=unknown
9329 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9330 test "$cf_cv_term_header" != unknown && break
9334 echo "$as_me:9334: result: $cf_cv_term_header" >&5
9335 echo "${ECHO_T}$cf_cv_term_header" >&6
9337 # Set definitions to allow ifdef'ing to accommodate subdirectories
9339 case "$cf_cv_term_header" in
9342 cat >>confdefs.h <<\EOF
9343 #define HAVE_TERM_H 1
9349 case "$cf_cv_term_header" in
9352 cat >>confdefs.h <<\EOF
9353 #define HAVE_NCURSES_TERM_H 1
9359 cat >>confdefs.h <<\EOF
9360 #define HAVE_NCURSESW_TERM_H 1
9366 # some applications need this, but should check for NCURSES_VERSION
9368 cat >>confdefs.h <<\EOF
9372 echo "$as_me:9372: checking for ncurses version" >&5
9373 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9374 if test "${cf_cv_ncurses_version+set}" = set; then
9375 echo $ECHO_N "(cached) $ECHO_C" >&6
9378 cf_cv_ncurses_version=no
9380 rm -f "$cf_tempfile"
9381 if test "$cross_compiling" = yes; then
9383 # This will not work if the preprocessor splits the line after the
9384 # Autoconf token. The 'unproto' program does that.
9385 cat > "conftest.$ac_ext" <<EOF
9386 #include <${cf_cv_ncurses_header:-curses.h}>
9388 #ifdef NCURSES_VERSION
9389 Autoconf NCURSES_VERSION
9397 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9398 { (eval echo "$as_me:9398: \"$cf_try\"") >&5
9401 echo "$as_me:9401: \$? = $ac_status" >&5
9402 (exit "$ac_status"); }
9403 if test -f conftest.out ; then
9404 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
9405 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9410 cat >"conftest.$ac_ext" <<_ACEOF
9411 #line 9411 "configure"
9412 #include "confdefs.h"
9414 #include <${cf_cv_ncurses_header:-curses.h}>
9418 FILE *fp = fopen("$cf_tempfile", "w");
9419 #ifdef NCURSES_VERSION
9420 # ifdef NCURSES_VERSION_PATCH
9421 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9423 fprintf(fp, "%s\\n", NCURSES_VERSION);
9427 fprintf(fp, "old\\n");
9432 ${cf_cv_main_return:-return}(0);
9435 rm -f "conftest$ac_exeext"
9436 if { (eval echo "$as_me:9436: \"$ac_link\"") >&5
9437 (eval $ac_link) 2>&5
9439 echo "$as_me:9439: \$? = $ac_status" >&5
9440 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9441 { (eval echo "$as_me:9441: \"$ac_try\"") >&5
9444 echo "$as_me:9444: \$? = $ac_status" >&5
9445 (exit "$ac_status"); }; }; then
9447 cf_cv_ncurses_version=`cat $cf_tempfile`
9449 echo "$as_me: program exited with status $ac_status" >&5
9450 echo "$as_me: failed program was:" >&5
9451 cat "conftest.$ac_ext" >&5
9453 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9455 rm -f "$cf_tempfile"
9458 echo "$as_me:9458: result: $cf_cv_ncurses_version" >&5
9459 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9460 test "$cf_cv_ncurses_version" = no ||
9461 cat >>confdefs.h <<\EOF
9465 cf_nculib_root=$cf_cv_screen
9466 # This works, except for the special case where we find gpm, but
9467 # ncurses is in a nonstandard location via $LIBS, and we really want
9470 cf_ncurses_SAVE="$LIBS"
9471 echo "$as_me:9471: checking for Gpm_Open in -lgpm" >&5
9472 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9473 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9474 echo $ECHO_N "(cached) $ECHO_C" >&6
9476 ac_check_lib_save_LIBS=$LIBS
9478 cat >"conftest.$ac_ext" <<_ACEOF
9479 #line 9479 "configure"
9480 #include "confdefs.h"
9482 /* Override any gcc2 internal prototype to avoid an error. */
9486 /* We use char because int might match the return type of a gcc2
9487 builtin and then its argument prototype would still apply. */
9497 rm -f "conftest.$ac_objext" "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"); } &&
9503 { ac_try='test -s "conftest$ac_exeext"'
9504 { (eval echo "$as_me:9504: \"$ac_try\"") >&5
9507 echo "$as_me:9507: \$? = $ac_status" >&5
9508 (exit "$ac_status"); }; }; then
9509 ac_cv_lib_gpm_Gpm_Open=yes
9511 echo "$as_me: failed program was:" >&5
9512 cat "conftest.$ac_ext" >&5
9513 ac_cv_lib_gpm_Gpm_Open=no
9515 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9516 LIBS=$ac_check_lib_save_LIBS
9518 echo "$as_me:9518: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9519 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9520 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
9521 echo "$as_me:9521: checking for initscr in -lgpm" >&5
9522 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9523 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9524 echo $ECHO_N "(cached) $ECHO_C" >&6
9526 ac_check_lib_save_LIBS=$LIBS
9528 cat >"conftest.$ac_ext" <<_ACEOF
9529 #line 9529 "configure"
9530 #include "confdefs.h"
9532 /* Override any gcc2 internal prototype to avoid an error. */
9536 /* We use char because int might match the return type of a gcc2
9537 builtin and then its argument prototype would still apply. */
9547 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9548 if { (eval echo "$as_me:9548: \"$ac_link\"") >&5
9549 (eval $ac_link) 2>&5
9551 echo "$as_me:9551: \$? = $ac_status" >&5
9552 (exit "$ac_status"); } &&
9553 { ac_try='test -s "conftest$ac_exeext"'
9554 { (eval echo "$as_me:9554: \"$ac_try\"") >&5
9557 echo "$as_me:9557: \$? = $ac_status" >&5
9558 (exit "$ac_status"); }; }; then
9559 ac_cv_lib_gpm_initscr=yes
9561 echo "$as_me: failed program was:" >&5
9562 cat "conftest.$ac_ext" >&5
9563 ac_cv_lib_gpm_initscr=no
9565 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9566 LIBS=$ac_check_lib_save_LIBS
9568 echo "$as_me:9568: result: $ac_cv_lib_gpm_initscr" >&5
9569 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9570 if test "$ac_cv_lib_gpm_initscr" = yes; then
9571 LIBS="$cf_ncurses_SAVE"
9573 cf_ncurses_LIBS="-lgpm"
9580 # This is only necessary if you are linking against an obsolete
9581 # version of ncurses (but it should do no harm, since it's static).
9582 if test "$cf_nculib_root" = ncurses ; then
9583 echo "$as_me:9583: checking for tgoto in -lmytinfo" >&5
9584 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9585 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9586 echo $ECHO_N "(cached) $ECHO_C" >&6
9588 ac_check_lib_save_LIBS=$LIBS
9589 LIBS="-lmytinfo $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_mytinfo_tgoto=yes
9623 echo "$as_me: failed program was:" >&5
9624 cat "conftest.$ac_ext" >&5
9625 ac_cv_lib_mytinfo_tgoto=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_mytinfo_tgoto" >&5
9631 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9632 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
9633 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9643 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9645 for cf_add_1lib in $cf_add_0lib; do
9646 for cf_add_2lib in $cf_add_libs; do
9647 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9652 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9656 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
9662 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9664 for cf_add_1lib in $cf_add_0lib; do
9665 for cf_add_2lib in $cf_add_libs; do
9666 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9671 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9677 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
9679 echo "$as_me:9679: checking for initscr" >&5
9680 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9681 if test "${ac_cv_func_initscr+set}" = set; then
9682 echo $ECHO_N "(cached) $ECHO_C" >&6
9684 cat >"conftest.$ac_ext" <<_ACEOF
9685 #line 9685 "configure"
9686 #include "confdefs.h"
9687 #define initscr autoconf_temporary
9688 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9695 /* We use char because int might match the return type of a gcc2
9696 builtin and then its argument prototype would still apply. */
9697 char initscr (void);
9703 /* The GNU C library defines stubs for functions which it implements
9704 to always fail with ENOSYS. Some functions are actually named
9705 something starting with __ and the normal name is an alias. */
9706 #if defined (__stub_initscr) || defined (__stub___initscr)
9707 #error found stub for initscr
9715 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9716 if { (eval echo "$as_me:9716: \"$ac_link\"") >&5
9717 (eval $ac_link) 2>&5
9719 echo "$as_me:9719: \$? = $ac_status" >&5
9720 (exit "$ac_status"); } &&
9721 { ac_try='test -s "conftest$ac_exeext"'
9722 { (eval echo "$as_me:9722: \"$ac_try\"") >&5
9725 echo "$as_me:9725: \$? = $ac_status" >&5
9726 (exit "$ac_status"); }; }; then
9727 ac_cv_func_initscr=yes
9729 echo "$as_me: failed program was:" >&5
9730 cat "conftest.$ac_ext" >&5
9731 ac_cv_func_initscr=no
9733 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9735 echo "$as_me:9735: result: $ac_cv_func_initscr" >&5
9736 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9737 if test "$ac_cv_func_initscr" = yes; then
9738 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9741 cf_save_LIBS="$LIBS"
9742 echo "$as_me:9742: checking for initscr in -l$cf_nculib_root" >&5
9743 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9744 LIBS="-l$cf_nculib_root $LIBS"
9745 cat >"conftest.$ac_ext" <<_ACEOF
9746 #line 9746 "configure"
9747 #include "confdefs.h"
9748 #include <${cf_cv_ncurses_header:-curses.h}>
9757 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9758 if { (eval echo "$as_me:9758: \"$ac_link\"") >&5
9759 (eval $ac_link) 2>&5
9761 echo "$as_me:9761: \$? = $ac_status" >&5
9762 (exit "$ac_status"); } &&
9763 { ac_try='test -s "conftest$ac_exeext"'
9764 { (eval echo "$as_me:9764: \"$ac_try\"") >&5
9767 echo "$as_me:9767: \$? = $ac_status" >&5
9768 (exit "$ac_status"); }; }; then
9769 echo "$as_me:9769: result: yes" >&5
9770 echo "${ECHO_T}yes" >&6
9771 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9774 echo "$as_me: failed program was:" >&5
9775 cat "conftest.$ac_ext" >&5
9776 echo "$as_me:9776: result: no" >&5
9777 echo "${ECHO_T}no" >&6
9780 cf_library_path_list=""
9781 if test -n "${LDFLAGS}${LIBS}" ; then
9782 for cf_library_path in $LDFLAGS $LIBS
9784 case "$cf_library_path" in
9786 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9788 test "x$cf_library_path" != "xNONE" && \
9789 test -d "$cf_library_path" && \
9791 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9792 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
9793 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9794 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9795 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9796 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"
9799 cf_library_path_list="$cf_library_path_list $cf_search"
9807 test "x$prefix" != "xNONE" && \
9808 test -d "$prefix" && \
9810 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9811 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
9812 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9813 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9814 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9815 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9818 for cf_subdir_prefix in \
9827 test "x$cf_subdir_prefix" != "x$prefix" && \
9828 test -d "$cf_subdir_prefix" && \
9829 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9830 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9831 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
9832 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9833 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9834 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9835 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"
9840 cf_search="$cf_library_path_list $cf_search"
9842 for cf_libdir in $cf_search
9844 echo "$as_me:9844: checking for -l$cf_nculib_root in $cf_libdir" >&5
9845 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9846 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9847 cat >"conftest.$ac_ext" <<_ACEOF
9848 #line 9848 "configure"
9849 #include "confdefs.h"
9850 #include <${cf_cv_ncurses_header:-curses.h}>
9859 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9860 if { (eval echo "$as_me:9860: \"$ac_link\"") >&5
9861 (eval $ac_link) 2>&5
9863 echo "$as_me:9863: \$? = $ac_status" >&5
9864 (exit "$ac_status"); } &&
9865 { ac_try='test -s "conftest$ac_exeext"'
9866 { (eval echo "$as_me:9866: \"$ac_try\"") >&5
9869 echo "$as_me:9869: \$? = $ac_status" >&5
9870 (exit "$ac_status"); }; }; then
9871 echo "$as_me:9871: result: yes" >&5
9872 echo "${ECHO_T}yes" >&6
9873 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9876 echo "$as_me: failed program was:" >&5
9877 cat "conftest.$ac_ext" >&5
9878 echo "$as_me:9878: result: no" >&5
9879 echo "${ECHO_T}no" >&6
9880 LIBS="$cf_save_LIBS"
9882 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9886 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9890 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
9892 if test "$cf_found_library" = no ; then
9893 { { echo "$as_me:9893: error: Cannot link $cf_nculib_root library" >&5
9894 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9895 { (exit 1); exit 1; }; }
9900 if test -n "$cf_ncurses_LIBS" ; then
9901 echo "$as_me:9901: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9902 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9903 cf_ncurses_SAVE="$LIBS"
9904 for p in $cf_ncurses_LIBS ; do
9905 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
9906 if test "$q" != "$LIBS" ; then
9910 cat >"conftest.$ac_ext" <<_ACEOF
9911 #line 9911 "configure"
9912 #include "confdefs.h"
9913 #include <${cf_cv_ncurses_header:-curses.h}>
9917 initscr(); mousemask(0,0); tigetstr((char *)0);
9922 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9923 if { (eval echo "$as_me:9923: \"$ac_link\"") >&5
9924 (eval $ac_link) 2>&5
9926 echo "$as_me:9926: \$? = $ac_status" >&5
9927 (exit "$ac_status"); } &&
9928 { ac_try='test -s "conftest$ac_exeext"'
9929 { (eval echo "$as_me:9929: \"$ac_try\"") >&5
9932 echo "$as_me:9932: \$? = $ac_status" >&5
9933 (exit "$ac_status"); }; }; then
9934 echo "$as_me:9934: result: yes" >&5
9935 echo "${ECHO_T}yes" >&6
9937 echo "$as_me: failed program was:" >&5
9938 cat "conftest.$ac_ext" >&5
9939 echo "$as_me:9939: result: no" >&5
9940 echo "${ECHO_T}no" >&6
9941 LIBS="$cf_ncurses_SAVE"
9943 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9946 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9948 cat >>confdefs.h <<EOF
9949 #define $cf_nculib_ROOT 1
9960 cf_ncuconfig_root=$cf_cv_screen
9961 cf_have_ncuconfig=no
9963 if test "x${PKG_CONFIG:=none}" != xnone; then
9964 echo "$as_me:9964: checking pkg-config for $cf_ncuconfig_root" >&5
9965 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9966 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9967 echo "$as_me:9967: result: yes" >&5
9968 echo "${ECHO_T}yes" >&6
9970 echo "$as_me:9970: checking if the $cf_ncuconfig_root package files work" >&5
9971 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9972 cf_have_ncuconfig=unknown
9974 cf_save_CFLAGS="$CFLAGS"
9975 cf_save_CPPFLAGS="$CPPFLAGS"
9976 cf_save_LIBS="$LIBS"
9978 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
9979 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9981 # while -W for passing linker flags is prevalent, it is not "standard".
9982 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9983 # incompatible _and_ non-standard -W option which gives an error. Work
9984 # around that pitfall.
9985 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9991 cf_new_extra_cppflags=
9993 for cf_add_cflags in $cf_pkg_cflags
9995 case "$cf_fix_cppflags" in
9997 case "$cf_add_cflags" in
9998 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9999 case "$cf_add_cflags" in
10001 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10003 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10004 && test -z "${cf_tst_cflags}" \
10005 && cf_fix_cppflags=yes
10007 if test "$cf_fix_cppflags" = yes ; then
10009 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10010 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10013 elif test "${cf_tst_cflags}" = "\"'" ; then
10015 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10016 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10022 case "$CPPFLAGS" in
10026 case "$cf_add_cflags" in
10028 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10030 CPPFLAGS=`echo "$CPPFLAGS" | \
10031 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10032 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10037 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10038 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10045 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10046 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10053 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10054 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10056 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10058 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10059 && test -z "${cf_tst_cflags}" \
10060 && cf_fix_cppflags=no
10065 if test -n "$cf_new_cflags" ; then
10067 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10068 CFLAGS="${CFLAGS}$cf_new_cflags"
10072 if test -n "$cf_new_cppflags" ; then
10074 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10075 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10079 if test -n "$cf_new_extra_cppflags" ; then
10081 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10082 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10086 cf_add_libs="$LIBS"
10089 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10090 # filter duplicates
10091 for cf_add_1lib in $cf_add_0lib; do
10092 for cf_add_2lib in $cf_add_libs; do
10093 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10098 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10100 LIBS="$cf_add_libs"
10102 cat >"conftest.$ac_ext" <<_ACEOF
10103 #line 10103 "configure"
10104 #include "confdefs.h"
10105 #include <${cf_cv_ncurses_header:-curses.h}>
10109 initscr(); mousemask(0,0); tigetstr((char *)0);
10114 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10115 if { (eval echo "$as_me:10115: \"$ac_link\"") >&5
10116 (eval $ac_link) 2>&5
10118 echo "$as_me:10118: \$? = $ac_status" >&5
10119 (exit "$ac_status"); } &&
10120 { ac_try='test -s "conftest$ac_exeext"'
10121 { (eval echo "$as_me:10121: \"$ac_try\"") >&5
10122 (eval $ac_try) 2>&5
10124 echo "$as_me:10124: \$? = $ac_status" >&5
10125 (exit "$ac_status"); }; }; then
10126 if test "$cross_compiling" = yes; then
10127 cf_test_ncuconfig=maybe
10129 cat >"conftest.$ac_ext" <<_ACEOF
10130 #line 10130 "configure"
10131 #include "confdefs.h"
10132 #include <${cf_cv_ncurses_header:-curses.h}>
10134 { const char *xx = curses_version(); return (xx == 0); }
10136 rm -f "conftest$ac_exeext"
10137 if { (eval echo "$as_me:10137: \"$ac_link\"") >&5
10138 (eval $ac_link) 2>&5
10140 echo "$as_me:10140: \$? = $ac_status" >&5
10141 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10142 { (eval echo "$as_me:10142: \"$ac_try\"") >&5
10143 (eval $ac_try) 2>&5
10145 echo "$as_me:10145: \$? = $ac_status" >&5
10146 (exit "$ac_status"); }; }; then
10147 cf_test_ncuconfig=yes
10149 echo "$as_me: program exited with status $ac_status" >&5
10150 echo "$as_me: failed program was:" >&5
10151 cat "conftest.$ac_ext" >&5
10152 cf_test_ncuconfig=no
10154 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10157 echo "$as_me: failed program was:" >&5
10158 cat "conftest.$ac_ext" >&5
10159 cf_test_ncuconfig=no
10161 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10163 CFLAGS="$cf_save_CFLAGS"
10164 CPPFLAGS="$cf_save_CPPFLAGS"
10165 LIBS="$cf_save_LIBS"
10167 if test "x$cf_test_ncuconfig" != xyes; then
10168 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
10169 cf_pkg_cflags="$cf_temp"
10170 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
10171 cf_pkg_libs="$cf_temp"
10179 cf_new_extra_cppflags=
10181 for cf_add_cflags in $cf_pkg_cflags
10183 case "$cf_fix_cppflags" in
10185 case "$cf_add_cflags" in
10186 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10187 case "$cf_add_cflags" in
10189 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10191 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10192 && test -z "${cf_tst_cflags}" \
10193 && cf_fix_cppflags=yes
10195 if test "$cf_fix_cppflags" = yes ; then
10197 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10198 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10201 elif test "${cf_tst_cflags}" = "\"'" ; then
10203 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10204 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10210 case "$CPPFLAGS" in
10214 case "$cf_add_cflags" in
10216 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10218 CPPFLAGS=`echo "$CPPFLAGS" | \
10219 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10220 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10225 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10226 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10233 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10234 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10241 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10242 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10244 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10246 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10247 && test -z "${cf_tst_cflags}" \
10248 && cf_fix_cppflags=no
10253 if test -n "$cf_new_cflags" ; then
10255 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10256 CFLAGS="${CFLAGS}$cf_new_cflags"
10260 if test -n "$cf_new_cppflags" ; then
10262 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10263 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10267 if test -n "$cf_new_extra_cppflags" ; then
10269 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10270 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10274 cf_add_libs="$LIBS"
10277 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10278 # filter duplicates
10279 for cf_add_1lib in $cf_add_0lib; do
10280 for cf_add_2lib in $cf_add_libs; do
10281 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10286 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10288 LIBS="$cf_add_libs"
10290 cat >"conftest.$ac_ext" <<_ACEOF
10291 #line 10291 "configure"
10292 #include "confdefs.h"
10293 #include <${cf_cv_ncurses_header:-curses.h}>
10297 initscr(); mousemask(0,0); tigetstr((char *)0);
10302 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10303 if { (eval echo "$as_me:10303: \"$ac_link\"") >&5
10304 (eval $ac_link) 2>&5
10306 echo "$as_me:10306: \$? = $ac_status" >&5
10307 (exit "$ac_status"); } &&
10308 { ac_try='test -s "conftest$ac_exeext"'
10309 { (eval echo "$as_me:10309: \"$ac_try\"") >&5
10310 (eval $ac_try) 2>&5
10312 echo "$as_me:10312: \$? = $ac_status" >&5
10313 (exit "$ac_status"); }; }; then
10314 if test "$cross_compiling" = yes; then
10315 cf_have_ncuconfig=maybe
10317 cat >"conftest.$ac_ext" <<_ACEOF
10318 #line 10318 "configure"
10319 #include "confdefs.h"
10320 #include <${cf_cv_ncurses_header:-curses.h}>
10322 { const char *xx = curses_version(); return (xx == 0); }
10324 rm -f "conftest$ac_exeext"
10325 if { (eval echo "$as_me:10325: \"$ac_link\"") >&5
10326 (eval $ac_link) 2>&5
10328 echo "$as_me:10328: \$? = $ac_status" >&5
10329 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10330 { (eval echo "$as_me:10330: \"$ac_try\"") >&5
10331 (eval $ac_try) 2>&5
10333 echo "$as_me:10333: \$? = $ac_status" >&5
10334 (exit "$ac_status"); }; }; then
10335 cf_have_ncuconfig=yes
10337 echo "$as_me: program exited with status $ac_status" >&5
10338 echo "$as_me: failed program was:" >&5
10339 cat "conftest.$ac_ext" >&5
10340 cf_have_ncuconfig=no
10342 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10345 echo "$as_me: failed program was:" >&5
10346 cat "conftest.$ac_ext" >&5
10347 cf_have_ncuconfig=no
10349 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10350 echo "$as_me:10350: result: $cf_have_ncuconfig" >&5
10351 echo "${ECHO_T}$cf_have_ncuconfig" >&6
10352 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
10353 if test "$cf_have_ncuconfig" != "yes"
10355 CPPFLAGS="$cf_save_CPPFLAGS"
10356 LIBS="$cf_save_LIBS"
10357 NCURSES_CONFIG_PKG=none
10360 cat >>confdefs.h <<\EOF
10364 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
10366 echo "$as_me:10366: checking for terminfo header" >&5
10367 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10368 if test "${cf_cv_term_header+set}" = set; then
10369 echo $ECHO_N "(cached) $ECHO_C" >&6
10372 case "${cf_cv_ncurses_header}" in
10373 (*/ncurses.h|*/ncursesw.h)
10374 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10377 cf_term_header=term.h
10381 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10383 cat >"conftest.$ac_ext" <<_ACEOF
10384 #line 10384 "configure"
10385 #include "confdefs.h"
10387 #include <${cf_cv_ncurses_header:-curses.h}>
10388 #include <$cf_test>
10393 int x = auto_left_margin; (void)x
10398 rm -f "conftest.$ac_objext"
10399 if { (eval echo "$as_me:10399: \"$ac_compile\"") >&5
10400 (eval $ac_compile) 2>&5
10402 echo "$as_me:10402: \$? = $ac_status" >&5
10403 (exit "$ac_status"); } &&
10404 { ac_try='test -s "conftest.$ac_objext"'
10405 { (eval echo "$as_me:10405: \"$ac_try\"") >&5
10406 (eval $ac_try) 2>&5
10408 echo "$as_me:10408: \$? = $ac_status" >&5
10409 (exit "$ac_status"); }; }; then
10411 cf_cv_term_header="$cf_test"
10413 echo "$as_me: failed program was:" >&5
10414 cat "conftest.$ac_ext" >&5
10416 cf_cv_term_header=unknown
10419 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10420 test "$cf_cv_term_header" != unknown && break
10424 echo "$as_me:10424: result: $cf_cv_term_header" >&5
10425 echo "${ECHO_T}$cf_cv_term_header" >&6
10427 # Set definitions to allow ifdef'ing to accommodate subdirectories
10429 case "$cf_cv_term_header" in
10432 cat >>confdefs.h <<\EOF
10433 #define HAVE_TERM_H 1
10439 case "$cf_cv_term_header" in
10442 cat >>confdefs.h <<\EOF
10443 #define HAVE_NCURSES_TERM_H 1
10449 cat >>confdefs.h <<\EOF
10450 #define HAVE_NCURSESW_TERM_H 1
10459 echo "$as_me:10459: result: no" >&5
10460 echo "${ECHO_T}no" >&6
10461 NCURSES_CONFIG_PKG=none
10464 NCURSES_CONFIG_PKG=none
10467 if test "x$cf_have_ncuconfig" = "xno"; then
10468 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
10470 if test -n "$ac_tool_prefix"; then
10471 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10473 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
10474 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
10475 echo "$as_me:10475: checking for $ac_word" >&5
10476 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10477 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
10478 echo $ECHO_N "(cached) $ECHO_C" >&6
10480 if test -n "$NCURSES_CONFIG"; then
10481 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
10483 ac_save_IFS=$IFS; IFS=$ac_path_separator
10485 for ac_dir in $ac_dummy; do
10487 test -z "$ac_dir" && ac_dir=.
10488 $as_executable_p "$ac_dir/$ac_word" || continue
10489 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
10490 echo "$as_me:10490: found $ac_dir/$ac_word" >&5
10496 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
10497 if test -n "$NCURSES_CONFIG"; then
10498 echo "$as_me:10498: result: $NCURSES_CONFIG" >&5
10499 echo "${ECHO_T}$NCURSES_CONFIG" >&6
10501 echo "$as_me:10501: result: no" >&5
10502 echo "${ECHO_T}no" >&6
10505 test -n "$NCURSES_CONFIG" && break
10508 if test -z "$NCURSES_CONFIG"; then
10509 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
10510 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10512 # Extract the first word of "$ac_prog", so it can be a program name with args.
10513 set dummy $ac_prog; ac_word=$2
10514 echo "$as_me:10514: checking for $ac_word" >&5
10515 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10516 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
10517 echo $ECHO_N "(cached) $ECHO_C" >&6
10519 if test -n "$ac_ct_NCURSES_CONFIG"; then
10520 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
10522 ac_save_IFS=$IFS; IFS=$ac_path_separator
10524 for ac_dir in $ac_dummy; do
10526 test -z "$ac_dir" && ac_dir=.
10527 $as_executable_p "$ac_dir/$ac_word" || continue
10528 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
10529 echo "$as_me:10529: found $ac_dir/$ac_word" >&5
10535 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
10536 if test -n "$ac_ct_NCURSES_CONFIG"; then
10537 echo "$as_me:10537: result: $ac_ct_NCURSES_CONFIG" >&5
10538 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
10540 echo "$as_me:10540: result: no" >&5
10541 echo "${ECHO_T}no" >&6
10544 test -n "$ac_ct_NCURSES_CONFIG" && break
10546 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
10548 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
10551 if test "$NCURSES_CONFIG" != none ; then
10556 cf_new_extra_cppflags=
10558 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
10560 case "$cf_fix_cppflags" in
10562 case "$cf_add_cflags" in
10563 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10564 case "$cf_add_cflags" in
10566 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10568 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10569 && test -z "${cf_tst_cflags}" \
10570 && cf_fix_cppflags=yes
10572 if test "$cf_fix_cppflags" = yes ; then
10574 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10575 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10578 elif test "${cf_tst_cflags}" = "\"'" ; then
10580 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10581 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10587 case "$CPPFLAGS" in
10591 case "$cf_add_cflags" in
10593 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10595 CPPFLAGS=`echo "$CPPFLAGS" | \
10596 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10597 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10602 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10603 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10610 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10611 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10618 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10619 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10621 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10623 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10624 && test -z "${cf_tst_cflags}" \
10625 && cf_fix_cppflags=no
10630 if test -n "$cf_new_cflags" ; then
10632 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10633 CFLAGS="${CFLAGS}$cf_new_cflags"
10637 if test -n "$cf_new_cppflags" ; then
10639 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10640 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10644 if test -n "$cf_new_extra_cppflags" ; then
10646 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10647 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10651 cf_add_libs="$LIBS"
10654 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10655 # filter duplicates
10656 for cf_add_1lib in $cf_add_0lib; do
10657 for cf_add_2lib in $cf_add_libs; do
10658 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10663 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10665 LIBS="$cf_add_libs"
10667 # even with config script, some packages use no-override for curses.h
10669 echo "$as_me:10669: checking if we have identified curses headers" >&5
10670 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10671 if test "${cf_cv_ncurses_header+set}" = set; then
10672 echo $ECHO_N "(cached) $ECHO_C" >&6
10675 cf_cv_ncurses_header=none
10677 ncurses.h $cf_cv_screen/ncurses.h \
10678 curses.h $cf_cv_screen/curses.h
10680 cat >"conftest.$ac_ext" <<_ACEOF
10681 #line 10681 "configure"
10682 #include "confdefs.h"
10683 #include <${cf_header}>
10687 initscr(); tgoto("?", 0,0)
10692 rm -f "conftest.$ac_objext"
10693 if { (eval echo "$as_me:10693: \"$ac_compile\"") >&5
10694 (eval $ac_compile) 2>&5
10696 echo "$as_me:10696: \$? = $ac_status" >&5
10697 (exit "$ac_status"); } &&
10698 { ac_try='test -s "conftest.$ac_objext"'
10699 { (eval echo "$as_me:10699: \"$ac_try\"") >&5
10700 (eval $ac_try) 2>&5
10702 echo "$as_me:10702: \$? = $ac_status" >&5
10703 (exit "$ac_status"); }; }; then
10704 cf_cv_ncurses_header=$cf_header; break
10706 echo "$as_me: failed program was:" >&5
10707 cat "conftest.$ac_ext" >&5
10709 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10713 echo "$as_me:10713: result: $cf_cv_ncurses_header" >&5
10714 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10716 if test "$cf_cv_ncurses_header" = none ; then
10717 { { echo "$as_me:10717: error: No curses header-files found" >&5
10718 echo "$as_me: error: No curses header-files found" >&2;}
10719 { (exit 1); exit 1; }; }
10722 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10724 for ac_header in $cf_cv_ncurses_header
10726 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10727 echo "$as_me:10727: checking for $ac_header" >&5
10728 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10729 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10730 echo $ECHO_N "(cached) $ECHO_C" >&6
10732 cat >"conftest.$ac_ext" <<_ACEOF
10733 #line 10733 "configure"
10734 #include "confdefs.h"
10735 #include <$ac_header>
10737 if { (eval echo "$as_me:10737: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10738 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10740 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10742 cat conftest.err >&5
10743 echo "$as_me:10743: \$? = $ac_status" >&5
10744 (exit "$ac_status"); } >/dev/null; then
10745 if test -s conftest.err; then
10746 ac_cpp_err=$ac_c_preproc_warn_flag
10753 if test -z "$ac_cpp_err"; then
10754 eval "$as_ac_Header=yes"
10756 echo "$as_me: failed program was:" >&5
10757 cat "conftest.$ac_ext" >&5
10758 eval "$as_ac_Header=no"
10760 rm -f conftest.err "conftest.$ac_ext"
10762 echo "$as_me:10762: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10763 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10764 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10765 cat >>confdefs.h <<EOF
10766 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10772 cat >>confdefs.h <<\EOF
10776 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10778 cat >>confdefs.h <<EOF
10779 #define $cf_nculib_ROOT 1
10782 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
10786 cf_ncuhdr_root=$cf_cv_screen
10788 test -n "$cf_cv_curses_dir" && \
10789 test "$cf_cv_curses_dir" != "no" && { \
10791 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
10792 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
10794 while test "$cf_add_incdir" != /usr/include
10796 if test -d "$cf_add_incdir"
10799 if test -n "$CFLAGS$CPPFLAGS" ; then
10800 # a loop is needed to ensure we can add subdirs of existing dirs
10801 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10802 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10803 cf_have_incdir=yes; break
10808 if test "$cf_have_incdir" = no ; then
10809 if test "$cf_add_incdir" = /usr/local/include ; then
10810 if test "$GCC" = yes
10812 cf_save_CPPFLAGS=$CPPFLAGS
10814 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10815 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10817 cat >"conftest.$ac_ext" <<_ACEOF
10818 #line 10818 "configure"
10819 #include "confdefs.h"
10829 rm -f "conftest.$ac_objext"
10830 if { (eval echo "$as_me:10830: \"$ac_compile\"") >&5
10831 (eval $ac_compile) 2>&5
10833 echo "$as_me:10833: \$? = $ac_status" >&5
10834 (exit "$ac_status"); } &&
10835 { ac_try='test -s "conftest.$ac_objext"'
10836 { (eval echo "$as_me:10836: \"$ac_try\"") >&5
10837 (eval $ac_try) 2>&5
10839 echo "$as_me:10839: \$? = $ac_status" >&5
10840 (exit "$ac_status"); }; }; then
10843 echo "$as_me: failed program was:" >&5
10844 cat "conftest.$ac_ext" >&5
10847 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10848 CPPFLAGS=$cf_save_CPPFLAGS
10853 if test "$cf_have_incdir" = no ; then
10854 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10856 echo "${as_me:-configure}:10856: testing adding $cf_add_incdir to include-path ..." 1>&5
10858 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10860 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10861 test "$cf_top_incdir" = "$cf_add_incdir" && break
10862 cf_add_incdir="$cf_top_incdir"
10875 echo "$as_me:10875: checking for $cf_ncuhdr_root header in include-path" >&5
10876 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10877 if test "${cf_cv_ncurses_h+set}" = set; then
10878 echo $ECHO_N "(cached) $ECHO_C" >&6
10881 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10882 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
10883 for cf_header in $cf_header_list
10886 cat >"conftest.$ac_ext" <<_ACEOF
10887 #line 10887 "configure"
10888 #include "confdefs.h"
10890 #include <$cf_header>
10895 #ifdef NCURSES_VERSION
10897 printf("%s\\n", NCURSES_VERSION);
10910 rm -f "conftest.$ac_objext"
10911 if { (eval echo "$as_me:10911: \"$ac_compile\"") >&5
10912 (eval $ac_compile) 2>&5
10914 echo "$as_me:10914: \$? = $ac_status" >&5
10915 (exit "$ac_status"); } &&
10916 { ac_try='test -s "conftest.$ac_objext"'
10917 { (eval echo "$as_me:10917: \"$ac_try\"") >&5
10918 (eval $ac_try) 2>&5
10920 echo "$as_me:10920: \$? = $ac_status" >&5
10921 (exit "$ac_status"); }; }; then
10922 cf_cv_ncurses_h=$cf_header
10925 echo "$as_me: failed program was:" >&5
10926 cat "conftest.$ac_ext" >&5
10929 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10931 test "$cf_cv_ncurses_h" != no && break
10935 echo "$as_me:10935: result: $cf_cv_ncurses_h" >&5
10936 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10938 if test "$cf_cv_ncurses_h" != no ; then
10939 cf_cv_ncurses_header=$cf_cv_ncurses_h
10942 echo "$as_me:10942: checking for $cf_ncuhdr_root include-path" >&5
10943 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10944 if test "${cf_cv_ncurses_h2+set}" = set; then
10945 echo $ECHO_N "(cached) $ECHO_C" >&6
10948 test -n "$verbose" && echo
10952 # collect the current set of include-directories from compiler flags
10953 cf_header_path_list=""
10954 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10955 for cf_header_path in $CPPFLAGS $CFLAGS
10957 case "$cf_header_path" in
10959 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10961 test "x$cf_header_path" != "xNONE" && \
10962 test -d "$cf_header_path" && \
10964 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10965 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
10966 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10967 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10968 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10969 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"
10972 cf_header_path_list="$cf_header_path_list $cf_search"
10978 # add the variations for the package we are looking for
10982 test "x$prefix" != "xNONE" && \
10983 test -d "$prefix" && \
10985 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10986 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
10987 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10988 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10989 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10990 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10993 for cf_subdir_prefix in \
11002 test "x$cf_subdir_prefix" != "x$prefix" && \
11003 test -d "$cf_subdir_prefix" && \
11004 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11005 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
11006 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
11007 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
11008 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
11009 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
11010 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"
11015 test "$includedir" != NONE && \
11016 test "$includedir" != "/usr/include" && \
11017 test -d "$includedir" && {
11018 test -d "$includedir" && cf_search="$cf_search $includedir"
11019 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
11022 test "$oldincludedir" != NONE && \
11023 test "$oldincludedir" != "/usr/include" && \
11024 test -d "$oldincludedir" && {
11025 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
11026 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
11029 cf_search="$cf_search $cf_header_path_list"
11031 test -n "$verbose" && echo "search path $cf_search"
11032 cf_save2_CPPFLAGS="$CPPFLAGS"
11033 for cf_incdir in $cf_search
11036 if test -n "$cf_incdir" ; then
11037 for cf_add_incdir in $cf_incdir
11039 while test "$cf_add_incdir" != /usr/include
11041 if test -d "$cf_add_incdir"
11044 if test -n "$CFLAGS$CPPFLAGS" ; then
11045 # a loop is needed to ensure we can add subdirs of existing dirs
11046 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11047 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11048 cf_have_incdir=yes; break
11053 if test "$cf_have_incdir" = no ; then
11054 if test "$cf_add_incdir" = /usr/local/include ; then
11055 if test "$GCC" = yes
11057 cf_save_CPPFLAGS=$CPPFLAGS
11059 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11060 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11062 cat >"conftest.$ac_ext" <<_ACEOF
11063 #line 11063 "configure"
11064 #include "confdefs.h"
11074 rm -f "conftest.$ac_objext"
11075 if { (eval echo "$as_me:11075: \"$ac_compile\"") >&5
11076 (eval $ac_compile) 2>&5
11078 echo "$as_me:11078: \$? = $ac_status" >&5
11079 (exit "$ac_status"); } &&
11080 { ac_try='test -s "conftest.$ac_objext"'
11081 { (eval echo "$as_me:11081: \"$ac_try\"") >&5
11082 (eval $ac_try) 2>&5
11084 echo "$as_me:11084: \$? = $ac_status" >&5
11085 (exit "$ac_status"); }; }; then
11088 echo "$as_me: failed program was:" >&5
11089 cat "conftest.$ac_ext" >&5
11092 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11093 CPPFLAGS=$cf_save_CPPFLAGS
11098 if test "$cf_have_incdir" = no ; then
11099 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11101 echo "${as_me:-configure}:11101: testing adding $cf_add_incdir to include-path ..." 1>&5
11103 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11105 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11106 test "$cf_top_incdir" = "$cf_add_incdir" && break
11107 cf_add_incdir="$cf_top_incdir"
11123 cat >"conftest.$ac_ext" <<_ACEOF
11124 #line 11124 "configure"
11125 #include "confdefs.h"
11127 #include <$cf_header>
11132 #ifdef NCURSES_VERSION
11134 printf("%s\\n", NCURSES_VERSION);
11147 rm -f "conftest.$ac_objext"
11148 if { (eval echo "$as_me:11148: \"$ac_compile\"") >&5
11149 (eval $ac_compile) 2>&5
11151 echo "$as_me:11151: \$? = $ac_status" >&5
11152 (exit "$ac_status"); } &&
11153 { ac_try='test -s "conftest.$ac_objext"'
11154 { (eval echo "$as_me:11154: \"$ac_try\"") >&5
11155 (eval $ac_try) 2>&5
11157 echo "$as_me:11157: \$? = $ac_status" >&5
11158 (exit "$ac_status"); }; }; then
11159 cf_cv_ncurses_h2=$cf_header
11162 echo "$as_me: failed program was:" >&5
11163 cat "conftest.$ac_ext" >&5
11164 cf_cv_ncurses_h2=no
11166 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11168 if test "$cf_cv_ncurses_h2" != no ; then
11169 cf_cv_ncurses_h2=$cf_incdir/$cf_header
11170 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
11173 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
11175 CPPFLAGS="$cf_save2_CPPFLAGS"
11176 test "$cf_cv_ncurses_h2" != no && break
11178 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:11178: error: not found" >&5
11179 echo "$as_me: error: not found" >&2;}
11180 { (exit 1); exit 1; }; }
11183 echo "$as_me:11183: result: $cf_cv_ncurses_h2" >&5
11184 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
11186 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
11187 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
11188 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
11189 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
11192 if test -n "$cf_1st_incdir" ; then
11193 for cf_add_incdir in $cf_1st_incdir
11195 while test "$cf_add_incdir" != /usr/include
11197 if test -d "$cf_add_incdir"
11200 if test -n "$CFLAGS$CPPFLAGS" ; then
11201 # a loop is needed to ensure we can add subdirs of existing dirs
11202 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11203 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11204 cf_have_incdir=yes; break
11209 if test "$cf_have_incdir" = no ; then
11210 if test "$cf_add_incdir" = /usr/local/include ; then
11211 if test "$GCC" = yes
11213 cf_save_CPPFLAGS=$CPPFLAGS
11215 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11216 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11218 cat >"conftest.$ac_ext" <<_ACEOF
11219 #line 11219 "configure"
11220 #include "confdefs.h"
11230 rm -f "conftest.$ac_objext"
11231 if { (eval echo "$as_me:11231: \"$ac_compile\"") >&5
11232 (eval $ac_compile) 2>&5
11234 echo "$as_me:11234: \$? = $ac_status" >&5
11235 (exit "$ac_status"); } &&
11236 { ac_try='test -s "conftest.$ac_objext"'
11237 { (eval echo "$as_me:11237: \"$ac_try\"") >&5
11238 (eval $ac_try) 2>&5
11240 echo "$as_me:11240: \$? = $ac_status" >&5
11241 (exit "$ac_status"); }; }; then
11244 echo "$as_me: failed program was:" >&5
11245 cat "conftest.$ac_ext" >&5
11248 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11249 CPPFLAGS=$cf_save_CPPFLAGS
11254 if test "$cf_have_incdir" = no ; then
11255 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11257 echo "${as_me:-configure}:11257: testing adding $cf_add_incdir to include-path ..." 1>&5
11259 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11261 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11262 test "$cf_top_incdir" = "$cf_add_incdir" && break
11263 cf_add_incdir="$cf_top_incdir"
11276 # Set definitions to allow ifdef'ing for ncurses.h
11278 case "$cf_cv_ncurses_header" in
11281 cat >>confdefs.h <<\EOF
11282 #define HAVE_NCURSES_H 1
11288 case "$cf_cv_ncurses_header" in
11289 (ncurses/curses.h|ncurses/ncurses.h)
11291 cat >>confdefs.h <<\EOF
11292 #define HAVE_NCURSES_NCURSES_H 1
11296 (ncursesw/curses.h|ncursesw/ncurses.h)
11298 cat >>confdefs.h <<\EOF
11299 #define HAVE_NCURSESW_NCURSES_H 1
11305 echo "$as_me:11305: checking for terminfo header" >&5
11306 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
11307 if test "${cf_cv_term_header+set}" = set; then
11308 echo $ECHO_N "(cached) $ECHO_C" >&6
11311 case "${cf_cv_ncurses_header}" in
11312 (*/ncurses.h|*/ncursesw.h)
11313 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
11316 cf_term_header=term.h
11320 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
11322 cat >"conftest.$ac_ext" <<_ACEOF
11323 #line 11323 "configure"
11324 #include "confdefs.h"
11326 #include <${cf_cv_ncurses_header:-curses.h}>
11327 #include <$cf_test>
11332 int x = auto_left_margin; (void)x
11337 rm -f "conftest.$ac_objext"
11338 if { (eval echo "$as_me:11338: \"$ac_compile\"") >&5
11339 (eval $ac_compile) 2>&5
11341 echo "$as_me:11341: \$? = $ac_status" >&5
11342 (exit "$ac_status"); } &&
11343 { ac_try='test -s "conftest.$ac_objext"'
11344 { (eval echo "$as_me:11344: \"$ac_try\"") >&5
11345 (eval $ac_try) 2>&5
11347 echo "$as_me:11347: \$? = $ac_status" >&5
11348 (exit "$ac_status"); }; }; then
11350 cf_cv_term_header="$cf_test"
11352 echo "$as_me: failed program was:" >&5
11353 cat "conftest.$ac_ext" >&5
11355 cf_cv_term_header=unknown
11358 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11359 test "$cf_cv_term_header" != unknown && break
11363 echo "$as_me:11363: result: $cf_cv_term_header" >&5
11364 echo "${ECHO_T}$cf_cv_term_header" >&6
11366 # Set definitions to allow ifdef'ing to accommodate subdirectories
11368 case "$cf_cv_term_header" in
11371 cat >>confdefs.h <<\EOF
11372 #define HAVE_TERM_H 1
11378 case "$cf_cv_term_header" in
11381 cat >>confdefs.h <<\EOF
11382 #define HAVE_NCURSES_TERM_H 1
11388 cat >>confdefs.h <<\EOF
11389 #define HAVE_NCURSESW_TERM_H 1
11395 # some applications need this, but should check for NCURSES_VERSION
11397 cat >>confdefs.h <<\EOF
11401 echo "$as_me:11401: checking for ncurses version" >&5
11402 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
11403 if test "${cf_cv_ncurses_version+set}" = set; then
11404 echo $ECHO_N "(cached) $ECHO_C" >&6
11407 cf_cv_ncurses_version=no
11409 rm -f "$cf_tempfile"
11410 if test "$cross_compiling" = yes; then
11412 # This will not work if the preprocessor splits the line after the
11413 # Autoconf token. The 'unproto' program does that.
11414 cat > "conftest.$ac_ext" <<EOF
11415 #include <${cf_cv_ncurses_header:-curses.h}>
11417 #ifdef NCURSES_VERSION
11418 Autoconf NCURSES_VERSION
11426 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
11427 { (eval echo "$as_me:11427: \"$cf_try\"") >&5
11428 (eval $cf_try) 2>&5
11430 echo "$as_me:11430: \$? = $ac_status" >&5
11431 (exit "$ac_status"); }
11432 if test -f conftest.out ; then
11433 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
11434 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
11439 cat >"conftest.$ac_ext" <<_ACEOF
11440 #line 11440 "configure"
11441 #include "confdefs.h"
11443 #include <${cf_cv_ncurses_header:-curses.h}>
11447 FILE *fp = fopen("$cf_tempfile", "w");
11448 #ifdef NCURSES_VERSION
11449 # ifdef NCURSES_VERSION_PATCH
11450 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
11452 fprintf(fp, "%s\\n", NCURSES_VERSION);
11455 # ifdef __NCURSES_H
11456 fprintf(fp, "old\\n");
11461 ${cf_cv_main_return:-return}(0);
11464 rm -f "conftest$ac_exeext"
11465 if { (eval echo "$as_me:11465: \"$ac_link\"") >&5
11466 (eval $ac_link) 2>&5
11468 echo "$as_me:11468: \$? = $ac_status" >&5
11469 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
11470 { (eval echo "$as_me:11470: \"$ac_try\"") >&5
11471 (eval $ac_try) 2>&5
11473 echo "$as_me:11473: \$? = $ac_status" >&5
11474 (exit "$ac_status"); }; }; then
11476 cf_cv_ncurses_version=`cat $cf_tempfile`
11478 echo "$as_me: program exited with status $ac_status" >&5
11479 echo "$as_me: failed program was:" >&5
11480 cat "conftest.$ac_ext" >&5
11482 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
11484 rm -f "$cf_tempfile"
11487 echo "$as_me:11487: result: $cf_cv_ncurses_version" >&5
11488 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
11489 test "$cf_cv_ncurses_version" = no ||
11490 cat >>confdefs.h <<\EOF
11494 cf_nculib_root=$cf_cv_screen
11495 # This works, except for the special case where we find gpm, but
11496 # ncurses is in a nonstandard location via $LIBS, and we really want
11499 cf_ncurses_SAVE="$LIBS"
11500 echo "$as_me:11500: checking for Gpm_Open in -lgpm" >&5
11501 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
11502 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
11503 echo $ECHO_N "(cached) $ECHO_C" >&6
11505 ac_check_lib_save_LIBS=$LIBS
11507 cat >"conftest.$ac_ext" <<_ACEOF
11508 #line 11508 "configure"
11509 #include "confdefs.h"
11511 /* Override any gcc2 internal prototype to avoid an error. */
11515 /* We use char because int might match the return type of a gcc2
11516 builtin and then its argument prototype would still apply. */
11526 rm -f "conftest.$ac_objext" "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"); } &&
11532 { ac_try='test -s "conftest$ac_exeext"'
11533 { (eval echo "$as_me:11533: \"$ac_try\"") >&5
11534 (eval $ac_try) 2>&5
11536 echo "$as_me:11536: \$? = $ac_status" >&5
11537 (exit "$ac_status"); }; }; then
11538 ac_cv_lib_gpm_Gpm_Open=yes
11540 echo "$as_me: failed program was:" >&5
11541 cat "conftest.$ac_ext" >&5
11542 ac_cv_lib_gpm_Gpm_Open=no
11544 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11545 LIBS=$ac_check_lib_save_LIBS
11547 echo "$as_me:11547: result: $ac_cv_lib_gpm_Gpm_Open" >&5
11548 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
11549 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
11550 echo "$as_me:11550: checking for initscr in -lgpm" >&5
11551 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
11552 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
11553 echo $ECHO_N "(cached) $ECHO_C" >&6
11555 ac_check_lib_save_LIBS=$LIBS
11557 cat >"conftest.$ac_ext" <<_ACEOF
11558 #line 11558 "configure"
11559 #include "confdefs.h"
11561 /* Override any gcc2 internal prototype to avoid an error. */
11565 /* We use char because int might match the return type of a gcc2
11566 builtin and then its argument prototype would still apply. */
11576 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11577 if { (eval echo "$as_me:11577: \"$ac_link\"") >&5
11578 (eval $ac_link) 2>&5
11580 echo "$as_me:11580: \$? = $ac_status" >&5
11581 (exit "$ac_status"); } &&
11582 { ac_try='test -s "conftest$ac_exeext"'
11583 { (eval echo "$as_me:11583: \"$ac_try\"") >&5
11584 (eval $ac_try) 2>&5
11586 echo "$as_me:11586: \$? = $ac_status" >&5
11587 (exit "$ac_status"); }; }; then
11588 ac_cv_lib_gpm_initscr=yes
11590 echo "$as_me: failed program was:" >&5
11591 cat "conftest.$ac_ext" >&5
11592 ac_cv_lib_gpm_initscr=no
11594 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11595 LIBS=$ac_check_lib_save_LIBS
11597 echo "$as_me:11597: result: $ac_cv_lib_gpm_initscr" >&5
11598 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
11599 if test "$ac_cv_lib_gpm_initscr" = yes; then
11600 LIBS="$cf_ncurses_SAVE"
11602 cf_ncurses_LIBS="-lgpm"
11609 # This is only necessary if you are linking against an obsolete
11610 # version of ncurses (but it should do no harm, since it's static).
11611 if test "$cf_nculib_root" = ncurses ; then
11612 echo "$as_me:11612: checking for tgoto in -lmytinfo" >&5
11613 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
11614 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
11615 echo $ECHO_N "(cached) $ECHO_C" >&6
11617 ac_check_lib_save_LIBS=$LIBS
11618 LIBS="-lmytinfo $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_mytinfo_tgoto=yes
11652 echo "$as_me: failed program was:" >&5
11653 cat "conftest.$ac_ext" >&5
11654 ac_cv_lib_mytinfo_tgoto=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_mytinfo_tgoto" >&5
11660 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11661 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
11662 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
11669 cf_add_libs="$LIBS"
11672 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11673 # filter duplicates
11674 for cf_add_1lib in $cf_add_0lib; do
11675 for cf_add_2lib in $cf_add_libs; do
11676 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11681 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11683 LIBS="$cf_add_libs"
11685 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
11688 cf_add_libs="$LIBS"
11691 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11692 # filter duplicates
11693 for cf_add_1lib in $cf_add_0lib; do
11694 for cf_add_2lib in $cf_add_libs; do
11695 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11700 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11702 LIBS="$cf_add_libs"
11706 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
11708 echo "$as_me:11708: checking for initscr" >&5
11709 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
11710 if test "${ac_cv_func_initscr+set}" = set; then
11711 echo $ECHO_N "(cached) $ECHO_C" >&6
11713 cat >"conftest.$ac_ext" <<_ACEOF
11714 #line 11714 "configure"
11715 #include "confdefs.h"
11716 #define initscr autoconf_temporary
11717 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11724 /* We use char because int might match the return type of a gcc2
11725 builtin and then its argument prototype would still apply. */
11726 char initscr (void);
11732 /* The GNU C library defines stubs for functions which it implements
11733 to always fail with ENOSYS. Some functions are actually named
11734 something starting with __ and the normal name is an alias. */
11735 #if defined (__stub_initscr) || defined (__stub___initscr)
11736 #error found stub for initscr
11744 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11745 if { (eval echo "$as_me:11745: \"$ac_link\"") >&5
11746 (eval $ac_link) 2>&5
11748 echo "$as_me:11748: \$? = $ac_status" >&5
11749 (exit "$ac_status"); } &&
11750 { ac_try='test -s "conftest$ac_exeext"'
11751 { (eval echo "$as_me:11751: \"$ac_try\"") >&5
11752 (eval $ac_try) 2>&5
11754 echo "$as_me:11754: \$? = $ac_status" >&5
11755 (exit "$ac_status"); }; }; then
11756 ac_cv_func_initscr=yes
11758 echo "$as_me: failed program was:" >&5
11759 cat "conftest.$ac_ext" >&5
11760 ac_cv_func_initscr=no
11762 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11764 echo "$as_me:11764: result: $ac_cv_func_initscr" >&5
11765 echo "${ECHO_T}$ac_cv_func_initscr" >&6
11766 if test "$ac_cv_func_initscr" = yes; then
11767 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11770 cf_save_LIBS="$LIBS"
11771 echo "$as_me:11771: checking for initscr in -l$cf_nculib_root" >&5
11772 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
11773 LIBS="-l$cf_nculib_root $LIBS"
11774 cat >"conftest.$ac_ext" <<_ACEOF
11775 #line 11775 "configure"
11776 #include "confdefs.h"
11777 #include <${cf_cv_ncurses_header:-curses.h}>
11786 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11787 if { (eval echo "$as_me:11787: \"$ac_link\"") >&5
11788 (eval $ac_link) 2>&5
11790 echo "$as_me:11790: \$? = $ac_status" >&5
11791 (exit "$ac_status"); } &&
11792 { ac_try='test -s "conftest$ac_exeext"'
11793 { (eval echo "$as_me:11793: \"$ac_try\"") >&5
11794 (eval $ac_try) 2>&5
11796 echo "$as_me:11796: \$? = $ac_status" >&5
11797 (exit "$ac_status"); }; }; then
11798 echo "$as_me:11798: result: yes" >&5
11799 echo "${ECHO_T}yes" >&6
11800 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11803 echo "$as_me: failed program was:" >&5
11804 cat "conftest.$ac_ext" >&5
11805 echo "$as_me:11805: result: no" >&5
11806 echo "${ECHO_T}no" >&6
11809 cf_library_path_list=""
11810 if test -n "${LDFLAGS}${LIBS}" ; then
11811 for cf_library_path in $LDFLAGS $LIBS
11813 case "$cf_library_path" in
11815 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11817 test "x$cf_library_path" != "xNONE" && \
11818 test -d "$cf_library_path" && \
11820 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11821 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
11822 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11823 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11824 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11825 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"
11828 cf_library_path_list="$cf_library_path_list $cf_search"
11836 test "x$prefix" != "xNONE" && \
11837 test -d "$prefix" && \
11839 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11840 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
11841 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11842 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11843 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11844 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11847 for cf_subdir_prefix in \
11856 test "x$cf_subdir_prefix" != "x$prefix" && \
11857 test -d "$cf_subdir_prefix" && \
11858 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11859 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11860 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
11861 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11862 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11863 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11864 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"
11869 cf_search="$cf_library_path_list $cf_search"
11871 for cf_libdir in $cf_search
11873 echo "$as_me:11873: checking for -l$cf_nculib_root in $cf_libdir" >&5
11874 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11875 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11876 cat >"conftest.$ac_ext" <<_ACEOF
11877 #line 11877 "configure"
11878 #include "confdefs.h"
11879 #include <${cf_cv_ncurses_header:-curses.h}>
11888 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11889 if { (eval echo "$as_me:11889: \"$ac_link\"") >&5
11890 (eval $ac_link) 2>&5
11892 echo "$as_me:11892: \$? = $ac_status" >&5
11893 (exit "$ac_status"); } &&
11894 { ac_try='test -s "conftest$ac_exeext"'
11895 { (eval echo "$as_me:11895: \"$ac_try\"") >&5
11896 (eval $ac_try) 2>&5
11898 echo "$as_me:11898: \$? = $ac_status" >&5
11899 (exit "$ac_status"); }; }; then
11900 echo "$as_me:11900: result: yes" >&5
11901 echo "${ECHO_T}yes" >&6
11902 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11905 echo "$as_me: failed program was:" >&5
11906 cat "conftest.$ac_ext" >&5
11907 echo "$as_me:11907: result: no" >&5
11908 echo "${ECHO_T}no" >&6
11909 LIBS="$cf_save_LIBS"
11911 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11915 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11919 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
11921 if test "$cf_found_library" = no ; then
11922 { { echo "$as_me:11922: error: Cannot link $cf_nculib_root library" >&5
11923 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11924 { (exit 1); exit 1; }; }
11929 if test -n "$cf_ncurses_LIBS" ; then
11930 echo "$as_me:11930: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11931 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11932 cf_ncurses_SAVE="$LIBS"
11933 for p in $cf_ncurses_LIBS ; do
11934 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
11935 if test "$q" != "$LIBS" ; then
11939 cat >"conftest.$ac_ext" <<_ACEOF
11940 #line 11940 "configure"
11941 #include "confdefs.h"
11942 #include <${cf_cv_ncurses_header:-curses.h}>
11946 initscr(); mousemask(0,0); tigetstr((char *)0);
11951 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11952 if { (eval echo "$as_me:11952: \"$ac_link\"") >&5
11953 (eval $ac_link) 2>&5
11955 echo "$as_me:11955: \$? = $ac_status" >&5
11956 (exit "$ac_status"); } &&
11957 { ac_try='test -s "conftest$ac_exeext"'
11958 { (eval echo "$as_me:11958: \"$ac_try\"") >&5
11959 (eval $ac_try) 2>&5
11961 echo "$as_me:11961: \$? = $ac_status" >&5
11962 (exit "$ac_status"); }; }; then
11963 echo "$as_me:11963: result: yes" >&5
11964 echo "${ECHO_T}yes" >&6
11966 echo "$as_me: failed program was:" >&5
11967 cat "conftest.$ac_ext" >&5
11968 echo "$as_me:11968: result: no" >&5
11969 echo "${ECHO_T}no" >&6
11970 LIBS="$cf_ncurses_SAVE"
11972 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11975 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11977 cat >>confdefs.h <<EOF
11978 #define $cf_nculib_ROOT 1
11983 NCURSES_CONFIG=none
11988 echo "$as_me:11988: checking for X" >&5
11989 echo $ECHO_N "checking for X... $ECHO_C" >&6
11991 # Check whether --with-x or --without-x was given.
11992 if test "${with_x+set}" = set; then
11996 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
11997 if test "x$with_x" = xno; then
11998 # The user explicitly disabled X.
12001 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
12002 # Both variables are already set.
12005 if test "${ac_cv_have_x+set}" = set; then
12006 echo $ECHO_N "(cached) $ECHO_C" >&6
12008 # One or both of the vars are not set, and there is no cached value.
12009 ac_x_includes=no ac_x_libraries=no
12010 rm -fr conftest.dir
12011 if mkdir conftest.dir; then
12013 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
12014 cat >Imakefile <<'EOF'
12016 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
12018 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
12019 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
12020 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
12021 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
12022 for ac_extension in a so sl dylib dll; do
12023 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
12024 test -f "$ac_im_libdir/libX11.$ac_extension"; then
12025 ac_im_usrlibdir=$ac_im_libdir; break
12028 # Screen out bogus values from the imake configuration. They are
12029 # bogus both because they are the default anyway, and because
12030 # using them would break gcc on systems where it needs fixed includes.
12031 case $ac_im_incroot in
12033 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
12035 case $ac_im_usrlibdir in
12036 /usr/lib | /lib) ;;
12037 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
12041 rm -fr conftest.dir
12044 # Standard set of common directories for X headers.
12045 # Check X11 before X11Rn because it is often a symlink to the current release.
12062 /usr/local/X11/include
12063 /usr/local/X11R7/include
12064 /usr/local/X11R6/include
12065 /usr/local/X11R5/include
12066 /usr/local/X11R4/include
12068 /usr/local/include/X11
12069 /usr/local/include/X11R7
12070 /usr/local/include/X11R6
12071 /usr/local/include/X11R5
12072 /usr/local/include/X11R4
12076 /usr/XFree86/include/X11
12080 /usr/unsupported/include
12081 /usr/athena/include
12082 /usr/local/x11r5/include
12083 /usr/lpp/Xamples/include
12085 /usr/openwin/include
12086 /usr/openwin/share/include'
12088 if test "$ac_x_includes" = no; then
12089 # Guess where to find include files, by looking for Intrinsic.h.
12090 # First, try using that file with no special directory specified.
12091 cat >"conftest.$ac_ext" <<_ACEOF
12092 #line 12092 "configure"
12093 #include "confdefs.h"
12094 #include <X11/Intrinsic.h>
12096 if { (eval echo "$as_me:12096: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12097 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12099 $EGREP -v '^ *\+' conftest.er1 >conftest.err
12101 cat conftest.err >&5
12102 echo "$as_me:12102: \$? = $ac_status" >&5
12103 (exit "$ac_status"); } >/dev/null; then
12104 if test -s conftest.err; then
12105 ac_cpp_err=$ac_c_preproc_warn_flag
12112 if test -z "$ac_cpp_err"; then
12113 # We can compile using X headers with no special include directory.
12116 echo "$as_me: failed program was:" >&5
12117 cat "conftest.$ac_ext" >&5
12118 for ac_dir in $ac_x_header_dirs; do
12119 if test -r "$ac_dir/X11/Intrinsic.h"; then
12120 ac_x_includes=$ac_dir
12125 rm -f conftest.err "conftest.$ac_ext"
12126 fi # $ac_x_includes = no
12128 if test "$ac_x_libraries" = no; then
12129 # Check for the libraries.
12130 # See if we find them without any special options.
12131 # Don't add to $LIBS permanently.
12134 cat >"conftest.$ac_ext" <<_ACEOF
12135 #line 12135 "configure"
12136 #include "confdefs.h"
12137 #include <X11/Intrinsic.h>
12146 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12147 if { (eval echo "$as_me:12147: \"$ac_link\"") >&5
12148 (eval $ac_link) 2>&5
12150 echo "$as_me:12150: \$? = $ac_status" >&5
12151 (exit "$ac_status"); } &&
12152 { ac_try='test -s "conftest$ac_exeext"'
12153 { (eval echo "$as_me:12153: \"$ac_try\"") >&5
12154 (eval $ac_try) 2>&5
12156 echo "$as_me:12156: \$? = $ac_status" >&5
12157 (exit "$ac_status"); }; }; then
12159 # We can link X programs with no special library path.
12162 echo "$as_me: failed program was:" >&5
12163 cat "conftest.$ac_ext" >&5
12165 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
12167 # Don't even attempt the hair of trying to link an X program!
12168 for ac_extension in a so sl dylib dll; do
12169 if test -r "$ac_dir/libXt.$ac_extension"; then
12170 ac_x_libraries=$ac_dir
12176 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12177 fi # $ac_x_libraries = no
12179 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
12180 # Didn't find X anywhere. Cache the known absence of X.
12181 ac_cv_have_x="have_x=no"
12183 # Record where we found X for the cache.
12184 ac_cv_have_x="have_x=yes \
12185 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
12190 eval "$ac_cv_have_x"
12193 if test "$have_x" != yes; then
12194 echo "$as_me:12194: result: $have_x" >&5
12195 echo "${ECHO_T}$have_x" >&6
12198 # If each of the values was on the command line, it overrides each guess.
12199 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
12200 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
12201 # Update the cache value to reflect the command line values.
12202 ac_cv_have_x="have_x=yes \
12203 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
12204 echo "$as_me:12204: result: libraries $x_libraries, headers $x_includes" >&5
12205 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
12208 if test "$no_x" = yes; then
12209 # Not all programs may use this symbol, but it does not hurt to define it.
12211 cat >>confdefs.h <<\EOF
12212 #define X_DISPLAY_MISSING 1
12220 if test -n "$x_includes"; then
12221 X_CFLAGS="$X_CFLAGS -I$x_includes"
12224 # It would also be nice to do this for all -L options, not just this one.
12225 if test -n "$x_libraries"; then
12226 X_LIBS="$X_LIBS -L$x_libraries"
12227 # For Solaris; some versions of Sun CC require a space after -R and
12228 # others require no space. Words are not sufficient . . . .
12229 case `(uname -sr) 2>/dev/null` in
12231 echo "$as_me:12231: checking whether -R must be followed by a space" >&5
12232 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
12233 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
12234 cat >"conftest.$ac_ext" <<_ACEOF
12235 #line 12235 "configure"
12236 #include "confdefs.h"
12246 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12247 if { (eval echo "$as_me:12247: \"$ac_link\"") >&5
12248 (eval $ac_link) 2>&5
12250 echo "$as_me:12250: \$? = $ac_status" >&5
12251 (exit "$ac_status"); } &&
12252 { ac_try='test -s "conftest$ac_exeext"'
12253 { (eval echo "$as_me:12253: \"$ac_try\"") >&5
12254 (eval $ac_try) 2>&5
12256 echo "$as_me:12256: \$? = $ac_status" >&5
12257 (exit "$ac_status"); }; }; then
12260 echo "$as_me: failed program was:" >&5
12261 cat "conftest.$ac_ext" >&5
12264 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12265 if test $ac_R_nospace = yes; then
12266 echo "$as_me:12266: result: no" >&5
12267 echo "${ECHO_T}no" >&6
12268 X_LIBS="$X_LIBS -R$x_libraries"
12270 LIBS="$ac_xsave_LIBS -R $x_libraries"
12271 cat >"conftest.$ac_ext" <<_ACEOF
12272 #line 12272 "configure"
12273 #include "confdefs.h"
12283 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12284 if { (eval echo "$as_me:12284: \"$ac_link\"") >&5
12285 (eval $ac_link) 2>&5
12287 echo "$as_me:12287: \$? = $ac_status" >&5
12288 (exit "$ac_status"); } &&
12289 { ac_try='test -s "conftest$ac_exeext"'
12290 { (eval echo "$as_me:12290: \"$ac_try\"") >&5
12291 (eval $ac_try) 2>&5
12293 echo "$as_me:12293: \$? = $ac_status" >&5
12294 (exit "$ac_status"); }; }; then
12297 echo "$as_me: failed program was:" >&5
12298 cat "conftest.$ac_ext" >&5
12301 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12302 if test $ac_R_space = yes; then
12303 echo "$as_me:12303: result: yes" >&5
12304 echo "${ECHO_T}yes" >&6
12305 X_LIBS="$X_LIBS -R $x_libraries"
12307 echo "$as_me:12307: result: neither works" >&5
12308 echo "${ECHO_T}neither works" >&6
12311 LIBS=$ac_xsave_LIBS
12315 # Check for system-dependent libraries X programs must link with.
12316 # Do this before checking for the system-independent R6 libraries
12317 # (-lICE), since we may need -lsocket or whatever for X linking.
12319 if test "$ISC" = yes; then
12320 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
12322 # Martyn Johnson says this is needed for Ultrix, if the X
12323 # libraries were built with DECnet support. And Karl Berry says
12324 # the Alpha needs dnet_stub (dnet does not exist).
12325 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
12326 cat >"conftest.$ac_ext" <<_ACEOF
12327 #line 12327 "configure"
12328 #include "confdefs.h"
12330 /* Override any gcc2 internal prototype to avoid an error. */
12334 /* We use char because int might match the return type of a gcc2
12335 builtin and then its argument prototype would still apply. */
12336 char XOpenDisplay ();
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
12361 echo "$as_me:12361: checking for dnet_ntoa in -ldnet" >&5
12362 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
12363 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
12364 echo $ECHO_N "(cached) $ECHO_C" >&6
12366 ac_check_lib_save_LIBS=$LIBS
12367 LIBS="-ldnet $LIBS"
12368 cat >"conftest.$ac_ext" <<_ACEOF
12369 #line 12369 "configure"
12370 #include "confdefs.h"
12372 /* Override any gcc2 internal prototype to avoid an error. */
12376 /* We use char because int might match the return type of a gcc2
12377 builtin and then its argument prototype would still apply. */
12387 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12388 if { (eval echo "$as_me:12388: \"$ac_link\"") >&5
12389 (eval $ac_link) 2>&5
12391 echo "$as_me:12391: \$? = $ac_status" >&5
12392 (exit "$ac_status"); } &&
12393 { ac_try='test -s "conftest$ac_exeext"'
12394 { (eval echo "$as_me:12394: \"$ac_try\"") >&5
12395 (eval $ac_try) 2>&5
12397 echo "$as_me:12397: \$? = $ac_status" >&5
12398 (exit "$ac_status"); }; }; then
12399 ac_cv_lib_dnet_dnet_ntoa=yes
12401 echo "$as_me: failed program was:" >&5
12402 cat "conftest.$ac_ext" >&5
12403 ac_cv_lib_dnet_dnet_ntoa=no
12405 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12406 LIBS=$ac_check_lib_save_LIBS
12408 echo "$as_me:12408: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
12409 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
12410 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
12411 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
12414 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
12415 echo "$as_me:12415: checking for dnet_ntoa in -ldnet_stub" >&5
12416 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
12417 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
12418 echo $ECHO_N "(cached) $ECHO_C" >&6
12420 ac_check_lib_save_LIBS=$LIBS
12421 LIBS="-ldnet_stub $LIBS"
12422 cat >"conftest.$ac_ext" <<_ACEOF
12423 #line 12423 "configure"
12424 #include "confdefs.h"
12426 /* Override any gcc2 internal prototype to avoid an error. */
12430 /* We use char because int might match the return type of a gcc2
12431 builtin and then its argument prototype would still apply. */
12441 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12442 if { (eval echo "$as_me:12442: \"$ac_link\"") >&5
12443 (eval $ac_link) 2>&5
12445 echo "$as_me:12445: \$? = $ac_status" >&5
12446 (exit "$ac_status"); } &&
12447 { ac_try='test -s "conftest$ac_exeext"'
12448 { (eval echo "$as_me:12448: \"$ac_try\"") >&5
12449 (eval $ac_try) 2>&5
12451 echo "$as_me:12451: \$? = $ac_status" >&5
12452 (exit "$ac_status"); }; }; then
12453 ac_cv_lib_dnet_stub_dnet_ntoa=yes
12455 echo "$as_me: failed program was:" >&5
12456 cat "conftest.$ac_ext" >&5
12457 ac_cv_lib_dnet_stub_dnet_ntoa=no
12459 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12460 LIBS=$ac_check_lib_save_LIBS
12462 echo "$as_me:12462: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
12463 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
12464 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
12465 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
12470 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12471 LIBS="$ac_xsave_LIBS"
12473 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
12474 # to get the SysV transport functions.
12475 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
12477 # The nsl library prevents programs from opening the X display
12478 # on Irix 5.2, according to T.E. Dickey.
12479 # The functions gethostbyname, getservbyname, and inet_addr are
12480 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
12481 echo "$as_me:12481: checking for gethostbyname" >&5
12482 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
12483 if test "${ac_cv_func_gethostbyname+set}" = set; then
12484 echo $ECHO_N "(cached) $ECHO_C" >&6
12486 cat >"conftest.$ac_ext" <<_ACEOF
12487 #line 12487 "configure"
12488 #include "confdefs.h"
12489 #define gethostbyname autoconf_temporary
12490 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12491 #undef gethostbyname
12497 /* We use char because int might match the return type of a gcc2
12498 builtin and then its argument prototype would still apply. */
12499 char gethostbyname (void);
12505 /* The GNU C library defines stubs for functions which it implements
12506 to always fail with ENOSYS. Some functions are actually named
12507 something starting with __ and the normal name is an alias. */
12508 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
12509 #error found stub for gethostbyname
12512 return gethostbyname ();
12517 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12518 if { (eval echo "$as_me:12518: \"$ac_link\"") >&5
12519 (eval $ac_link) 2>&5
12521 echo "$as_me:12521: \$? = $ac_status" >&5
12522 (exit "$ac_status"); } &&
12523 { ac_try='test -s "conftest$ac_exeext"'
12524 { (eval echo "$as_me:12524: \"$ac_try\"") >&5
12525 (eval $ac_try) 2>&5
12527 echo "$as_me:12527: \$? = $ac_status" >&5
12528 (exit "$ac_status"); }; }; then
12529 ac_cv_func_gethostbyname=yes
12531 echo "$as_me: failed program was:" >&5
12532 cat "conftest.$ac_ext" >&5
12533 ac_cv_func_gethostbyname=no
12535 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12537 echo "$as_me:12537: result: $ac_cv_func_gethostbyname" >&5
12538 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
12540 if test $ac_cv_func_gethostbyname = no; then
12541 echo "$as_me:12541: checking for gethostbyname in -lnsl" >&5
12542 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
12543 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
12544 echo $ECHO_N "(cached) $ECHO_C" >&6
12546 ac_check_lib_save_LIBS=$LIBS
12548 cat >"conftest.$ac_ext" <<_ACEOF
12549 #line 12549 "configure"
12550 #include "confdefs.h"
12552 /* Override any gcc2 internal prototype to avoid an error. */
12556 /* We use char because int might match the return type of a gcc2
12557 builtin and then its argument prototype would still apply. */
12558 char gethostbyname ();
12567 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12568 if { (eval echo "$as_me:12568: \"$ac_link\"") >&5
12569 (eval $ac_link) 2>&5
12571 echo "$as_me:12571: \$? = $ac_status" >&5
12572 (exit "$ac_status"); } &&
12573 { ac_try='test -s "conftest$ac_exeext"'
12574 { (eval echo "$as_me:12574: \"$ac_try\"") >&5
12575 (eval $ac_try) 2>&5
12577 echo "$as_me:12577: \$? = $ac_status" >&5
12578 (exit "$ac_status"); }; }; then
12579 ac_cv_lib_nsl_gethostbyname=yes
12581 echo "$as_me: failed program was:" >&5
12582 cat "conftest.$ac_ext" >&5
12583 ac_cv_lib_nsl_gethostbyname=no
12585 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12586 LIBS=$ac_check_lib_save_LIBS
12588 echo "$as_me:12588: result: $ac_cv_lib_nsl_gethostbyname" >&5
12589 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
12590 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
12591 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
12594 if test $ac_cv_lib_nsl_gethostbyname = no; then
12595 echo "$as_me:12595: checking for gethostbyname in -lbsd" >&5
12596 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
12597 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
12598 echo $ECHO_N "(cached) $ECHO_C" >&6
12600 ac_check_lib_save_LIBS=$LIBS
12602 cat >"conftest.$ac_ext" <<_ACEOF
12603 #line 12603 "configure"
12604 #include "confdefs.h"
12606 /* Override any gcc2 internal prototype to avoid an error. */
12610 /* We use char because int might match the return type of a gcc2
12611 builtin and then its argument prototype would still apply. */
12612 char gethostbyname ();
12621 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12622 if { (eval echo "$as_me:12622: \"$ac_link\"") >&5
12623 (eval $ac_link) 2>&5
12625 echo "$as_me:12625: \$? = $ac_status" >&5
12626 (exit "$ac_status"); } &&
12627 { ac_try='test -s "conftest$ac_exeext"'
12628 { (eval echo "$as_me:12628: \"$ac_try\"") >&5
12629 (eval $ac_try) 2>&5
12631 echo "$as_me:12631: \$? = $ac_status" >&5
12632 (exit "$ac_status"); }; }; then
12633 ac_cv_lib_bsd_gethostbyname=yes
12635 echo "$as_me: failed program was:" >&5
12636 cat "conftest.$ac_ext" >&5
12637 ac_cv_lib_bsd_gethostbyname=no
12639 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12640 LIBS=$ac_check_lib_save_LIBS
12642 echo "$as_me:12642: result: $ac_cv_lib_bsd_gethostbyname" >&5
12643 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
12644 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
12645 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
12651 # lieder@skyler.mavd.honeywell.com says without -lsocket,
12652 # socket/setsockopt and other routines are undefined under SCO ODT
12653 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
12654 # on later versions), says Simon Leinen: it contains gethostby*
12655 # variants that don't use the nameserver (or something). -lsocket
12656 # must be given before -lnsl if both are needed. We assume that
12657 # if connect needs -lnsl, so does gethostbyname.
12658 echo "$as_me:12658: checking for connect" >&5
12659 echo $ECHO_N "checking for connect... $ECHO_C" >&6
12660 if test "${ac_cv_func_connect+set}" = set; then
12661 echo $ECHO_N "(cached) $ECHO_C" >&6
12663 cat >"conftest.$ac_ext" <<_ACEOF
12664 #line 12664 "configure"
12665 #include "confdefs.h"
12666 #define connect autoconf_temporary
12667 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12674 /* We use char because int might match the return type of a gcc2
12675 builtin and then its argument prototype would still apply. */
12676 char connect (void);
12682 /* The GNU C library defines stubs for functions which it implements
12683 to always fail with ENOSYS. Some functions are actually named
12684 something starting with __ and the normal name is an alias. */
12685 #if defined (__stub_connect) || defined (__stub___connect)
12686 #error found stub for connect
12694 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12695 if { (eval echo "$as_me:12695: \"$ac_link\"") >&5
12696 (eval $ac_link) 2>&5
12698 echo "$as_me:12698: \$? = $ac_status" >&5
12699 (exit "$ac_status"); } &&
12700 { ac_try='test -s "conftest$ac_exeext"'
12701 { (eval echo "$as_me:12701: \"$ac_try\"") >&5
12702 (eval $ac_try) 2>&5
12704 echo "$as_me:12704: \$? = $ac_status" >&5
12705 (exit "$ac_status"); }; }; then
12706 ac_cv_func_connect=yes
12708 echo "$as_me: failed program was:" >&5
12709 cat "conftest.$ac_ext" >&5
12710 ac_cv_func_connect=no
12712 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12714 echo "$as_me:12714: result: $ac_cv_func_connect" >&5
12715 echo "${ECHO_T}$ac_cv_func_connect" >&6
12717 if test $ac_cv_func_connect = no; then
12718 echo "$as_me:12718: checking for connect in -lsocket" >&5
12719 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
12720 if test "${ac_cv_lib_socket_connect+set}" = set; then
12721 echo $ECHO_N "(cached) $ECHO_C" >&6
12723 ac_check_lib_save_LIBS=$LIBS
12724 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
12725 cat >"conftest.$ac_ext" <<_ACEOF
12726 #line 12726 "configure"
12727 #include "confdefs.h"
12729 /* Override any gcc2 internal prototype to avoid an error. */
12733 /* We use char because int might match the return type of a gcc2
12734 builtin and then its argument prototype would still apply. */
12744 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12745 if { (eval echo "$as_me:12745: \"$ac_link\"") >&5
12746 (eval $ac_link) 2>&5
12748 echo "$as_me:12748: \$? = $ac_status" >&5
12749 (exit "$ac_status"); } &&
12750 { ac_try='test -s "conftest$ac_exeext"'
12751 { (eval echo "$as_me:12751: \"$ac_try\"") >&5
12752 (eval $ac_try) 2>&5
12754 echo "$as_me:12754: \$? = $ac_status" >&5
12755 (exit "$ac_status"); }; }; then
12756 ac_cv_lib_socket_connect=yes
12758 echo "$as_me: failed program was:" >&5
12759 cat "conftest.$ac_ext" >&5
12760 ac_cv_lib_socket_connect=no
12762 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12763 LIBS=$ac_check_lib_save_LIBS
12765 echo "$as_me:12765: result: $ac_cv_lib_socket_connect" >&5
12766 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
12767 if test "$ac_cv_lib_socket_connect" = yes; then
12768 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
12773 # Guillermo Gomez says -lposix is necessary on A/UX.
12774 echo "$as_me:12774: checking for remove" >&5
12775 echo $ECHO_N "checking for remove... $ECHO_C" >&6
12776 if test "${ac_cv_func_remove+set}" = set; then
12777 echo $ECHO_N "(cached) $ECHO_C" >&6
12779 cat >"conftest.$ac_ext" <<_ACEOF
12780 #line 12780 "configure"
12781 #include "confdefs.h"
12782 #define remove autoconf_temporary
12783 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12790 /* We use char because int might match the return type of a gcc2
12791 builtin and then its argument prototype would still apply. */
12792 char remove (void);
12798 /* The GNU C library defines stubs for functions which it implements
12799 to always fail with ENOSYS. Some functions are actually named
12800 something starting with __ and the normal name is an alias. */
12801 #if defined (__stub_remove) || defined (__stub___remove)
12802 #error found stub for remove
12810 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12811 if { (eval echo "$as_me:12811: \"$ac_link\"") >&5
12812 (eval $ac_link) 2>&5
12814 echo "$as_me:12814: \$? = $ac_status" >&5
12815 (exit "$ac_status"); } &&
12816 { ac_try='test -s "conftest$ac_exeext"'
12817 { (eval echo "$as_me:12817: \"$ac_try\"") >&5
12818 (eval $ac_try) 2>&5
12820 echo "$as_me:12820: \$? = $ac_status" >&5
12821 (exit "$ac_status"); }; }; then
12822 ac_cv_func_remove=yes
12824 echo "$as_me: failed program was:" >&5
12825 cat "conftest.$ac_ext" >&5
12826 ac_cv_func_remove=no
12828 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12830 echo "$as_me:12830: result: $ac_cv_func_remove" >&5
12831 echo "${ECHO_T}$ac_cv_func_remove" >&6
12833 if test $ac_cv_func_remove = no; then
12834 echo "$as_me:12834: checking for remove in -lposix" >&5
12835 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
12836 if test "${ac_cv_lib_posix_remove+set}" = set; then
12837 echo $ECHO_N "(cached) $ECHO_C" >&6
12839 ac_check_lib_save_LIBS=$LIBS
12840 LIBS="-lposix $LIBS"
12841 cat >"conftest.$ac_ext" <<_ACEOF
12842 #line 12842 "configure"
12843 #include "confdefs.h"
12845 /* Override any gcc2 internal prototype to avoid an error. */
12849 /* We use char because int might match the return type of a gcc2
12850 builtin and then its argument prototype would still apply. */
12860 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12861 if { (eval echo "$as_me:12861: \"$ac_link\"") >&5
12862 (eval $ac_link) 2>&5
12864 echo "$as_me:12864: \$? = $ac_status" >&5
12865 (exit "$ac_status"); } &&
12866 { ac_try='test -s "conftest$ac_exeext"'
12867 { (eval echo "$as_me:12867: \"$ac_try\"") >&5
12868 (eval $ac_try) 2>&5
12870 echo "$as_me:12870: \$? = $ac_status" >&5
12871 (exit "$ac_status"); }; }; then
12872 ac_cv_lib_posix_remove=yes
12874 echo "$as_me: failed program was:" >&5
12875 cat "conftest.$ac_ext" >&5
12876 ac_cv_lib_posix_remove=no
12878 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12879 LIBS=$ac_check_lib_save_LIBS
12881 echo "$as_me:12881: result: $ac_cv_lib_posix_remove" >&5
12882 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
12883 if test "$ac_cv_lib_posix_remove" = yes; then
12884 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
12889 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
12890 echo "$as_me:12890: checking for shmat" >&5
12891 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
12892 if test "${ac_cv_func_shmat+set}" = set; then
12893 echo $ECHO_N "(cached) $ECHO_C" >&6
12895 cat >"conftest.$ac_ext" <<_ACEOF
12896 #line 12896 "configure"
12897 #include "confdefs.h"
12898 #define shmat autoconf_temporary
12899 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12906 /* We use char because int might match the return type of a gcc2
12907 builtin and then its argument prototype would still apply. */
12914 /* The GNU C library defines stubs for functions which it implements
12915 to always fail with ENOSYS. Some functions are actually named
12916 something starting with __ and the normal name is an alias. */
12917 #if defined (__stub_shmat) || defined (__stub___shmat)
12918 #error found stub for shmat
12926 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12927 if { (eval echo "$as_me:12927: \"$ac_link\"") >&5
12928 (eval $ac_link) 2>&5
12930 echo "$as_me:12930: \$? = $ac_status" >&5
12931 (exit "$ac_status"); } &&
12932 { ac_try='test -s "conftest$ac_exeext"'
12933 { (eval echo "$as_me:12933: \"$ac_try\"") >&5
12934 (eval $ac_try) 2>&5
12936 echo "$as_me:12936: \$? = $ac_status" >&5
12937 (exit "$ac_status"); }; }; then
12938 ac_cv_func_shmat=yes
12940 echo "$as_me: failed program was:" >&5
12941 cat "conftest.$ac_ext" >&5
12942 ac_cv_func_shmat=no
12944 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12946 echo "$as_me:12946: result: $ac_cv_func_shmat" >&5
12947 echo "${ECHO_T}$ac_cv_func_shmat" >&6
12949 if test $ac_cv_func_shmat = no; then
12950 echo "$as_me:12950: checking for shmat in -lipc" >&5
12951 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
12952 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
12953 echo $ECHO_N "(cached) $ECHO_C" >&6
12955 ac_check_lib_save_LIBS=$LIBS
12957 cat >"conftest.$ac_ext" <<_ACEOF
12958 #line 12958 "configure"
12959 #include "confdefs.h"
12961 /* Override any gcc2 internal prototype to avoid an error. */
12965 /* We use char because int might match the return type of a gcc2
12966 builtin and then its argument prototype would still apply. */
12976 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12977 if { (eval echo "$as_me:12977: \"$ac_link\"") >&5
12978 (eval $ac_link) 2>&5
12980 echo "$as_me:12980: \$? = $ac_status" >&5
12981 (exit "$ac_status"); } &&
12982 { ac_try='test -s "conftest$ac_exeext"'
12983 { (eval echo "$as_me:12983: \"$ac_try\"") >&5
12984 (eval $ac_try) 2>&5
12986 echo "$as_me:12986: \$? = $ac_status" >&5
12987 (exit "$ac_status"); }; }; then
12988 ac_cv_lib_ipc_shmat=yes
12990 echo "$as_me: failed program was:" >&5
12991 cat "conftest.$ac_ext" >&5
12992 ac_cv_lib_ipc_shmat=no
12994 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12995 LIBS=$ac_check_lib_save_LIBS
12997 echo "$as_me:12997: result: $ac_cv_lib_ipc_shmat" >&5
12998 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
12999 if test "$ac_cv_lib_ipc_shmat" = yes; then
13000 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
13006 # Check for libraries that X11R6 Xt/Xaw programs need.
13007 ac_save_LDFLAGS=$LDFLAGS
13008 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
13009 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
13010 # check for ICE first), but we must link in the order -lSM -lICE or
13011 # we get undefined symbols. So assume we have SM if we have ICE.
13012 # These have to be linked with before -lX11, unlike the other
13013 # libraries we check for below, so use a different variable.
13014 # John Interrante, Karl Berry
13015 echo "$as_me:13015: checking for IceConnectionNumber in -lICE" >&5
13016 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
13017 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
13018 echo $ECHO_N "(cached) $ECHO_C" >&6
13020 ac_check_lib_save_LIBS=$LIBS
13021 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
13022 cat >"conftest.$ac_ext" <<_ACEOF
13023 #line 13023 "configure"
13024 #include "confdefs.h"
13026 /* Override any gcc2 internal prototype to avoid an error. */
13030 /* We use char because int might match the return type of a gcc2
13031 builtin and then its argument prototype would still apply. */
13032 char IceConnectionNumber ();
13036 IceConnectionNumber ();
13041 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13042 if { (eval echo "$as_me:13042: \"$ac_link\"") >&5
13043 (eval $ac_link) 2>&5
13045 echo "$as_me:13045: \$? = $ac_status" >&5
13046 (exit "$ac_status"); } &&
13047 { ac_try='test -s "conftest$ac_exeext"'
13048 { (eval echo "$as_me:13048: \"$ac_try\"") >&5
13049 (eval $ac_try) 2>&5
13051 echo "$as_me:13051: \$? = $ac_status" >&5
13052 (exit "$ac_status"); }; }; then
13053 ac_cv_lib_ICE_IceConnectionNumber=yes
13055 echo "$as_me: failed program was:" >&5
13056 cat "conftest.$ac_ext" >&5
13057 ac_cv_lib_ICE_IceConnectionNumber=no
13059 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13060 LIBS=$ac_check_lib_save_LIBS
13062 echo "$as_me:13062: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
13063 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
13064 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
13065 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
13068 LDFLAGS=$ac_save_LDFLAGS
13072 cf_x_athena=${cf_x_athena:-Xaw}
13074 echo "$as_me:13074: checking if you want to link with Xaw 3d library" >&5
13075 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
13078 # Check whether --with-Xaw3d or --without-Xaw3d was given.
13079 if test "${with_Xaw3d+set}" = set; then
13080 withval="$with_Xaw3d"
13083 if test "$withval" = yes ; then
13085 echo "$as_me:13085: result: yes" >&5
13086 echo "${ECHO_T}yes" >&6
13088 echo "$as_me:13088: result: no" >&5
13089 echo "${ECHO_T}no" >&6
13092 echo "$as_me:13092: checking if you want to link with Xaw 3d xft library" >&5
13093 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
13096 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
13097 if test "${with_Xaw3dxft+set}" = set; then
13098 withval="$with_Xaw3dxft"
13101 if test "$withval" = yes ; then
13102 cf_x_athena=Xaw3dxft
13103 echo "$as_me:13103: result: yes" >&5
13104 echo "${ECHO_T}yes" >&6
13106 echo "$as_me:13106: result: no" >&5
13107 echo "${ECHO_T}no" >&6
13110 echo "$as_me:13110: checking if you want to link with neXT Athena library" >&5
13111 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
13114 # Check whether --with-neXtaw or --without-neXtaw was given.
13115 if test "${with_neXtaw+set}" = set; then
13116 withval="$with_neXtaw"
13119 if test "$withval" = yes ; then
13121 echo "$as_me:13121: result: yes" >&5
13122 echo "${ECHO_T}yes" >&6
13124 echo "$as_me:13124: result: no" >&5
13125 echo "${ECHO_T}no" >&6
13128 echo "$as_me:13128: checking if you want to link with Athena-Plus library" >&5
13129 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
13132 # Check whether --with-XawPlus or --without-XawPlus was given.
13133 if test "${with_XawPlus+set}" = set; then
13134 withval="$with_XawPlus"
13137 if test "$withval" = yes ; then
13138 cf_x_athena=XawPlus
13139 echo "$as_me:13139: result: yes" >&5
13140 echo "${ECHO_T}yes" >&6
13142 echo "$as_me:13142: result: no" >&5
13143 echo "${ECHO_T}no" >&6
13148 if test "$PKG_CONFIG" != none ; then
13150 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
13151 for cf_athena_pkg in \
13154 ${cf_x_athena}-devel \
13155 lib${cf_x_athena} \
13156 lib${cf_x_athena}-devel
13159 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_athena_pkg"; then
13160 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
13162 echo "${as_me:-configure}:13162: testing found package $cf_athena_pkg ..." 1>&5
13164 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_athena_pkg" 2>/dev/null`"
13165 cf_pkgconfig_libs="`$PKG_CONFIG --libs "$cf_athena_pkg" 2>/dev/null`"
13166 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
13168 echo "${as_me:-configure}:13168: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13170 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
13172 echo "${as_me:-configure}:13172: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
13177 cf_new_extra_cppflags=
13179 for cf_add_cflags in $cf_pkgconfig_incs
13181 case "$cf_fix_cppflags" in
13183 case "$cf_add_cflags" in
13184 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13185 case "$cf_add_cflags" in
13187 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13189 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13190 && test -z "${cf_tst_cflags}" \
13191 && cf_fix_cppflags=yes
13193 if test "$cf_fix_cppflags" = yes ; then
13195 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13196 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13199 elif test "${cf_tst_cflags}" = "\"'" ; then
13201 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13202 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13208 case "$CPPFLAGS" in
13212 case "$cf_add_cflags" in
13214 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13216 CPPFLAGS=`echo "$CPPFLAGS" | \
13217 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13218 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13223 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13224 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13231 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13232 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13239 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13240 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13242 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13244 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13245 && test -z "${cf_tst_cflags}" \
13246 && cf_fix_cppflags=no
13251 if test -n "$cf_new_cflags" ; then
13253 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13254 CFLAGS="${CFLAGS}$cf_new_cflags"
13258 if test -n "$cf_new_cppflags" ; then
13260 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13261 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13265 if test -n "$cf_new_extra_cppflags" ; then
13267 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13268 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13272 cf_add_libs="$LIBS"
13275 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13276 # filter duplicates
13277 for cf_add_1lib in $cf_add_0lib; do
13278 for cf_add_2lib in $cf_add_libs; do
13279 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13284 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13286 LIBS="$cf_add_libs"
13288 cf_x_athena_lib="$cf_pkgconfig_libs"
13290 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13292 cat >>confdefs.h <<EOF
13293 #define $cf_x_athena_LIBS 1
13296 for cf_trim_lib in Xmu Xt X11
13299 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13300 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13301 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13303 echo "${as_me:-configure}:13303: testing ..trimmed $LIBS ..." 1>&5
13309 echo "$as_me:13309: checking for usable $cf_x_athena/Xmu package" >&5
13310 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
13311 if test "${cf_cv_xaw_compat+set}" = set; then
13312 echo $ECHO_N "(cached) $ECHO_C" >&6
13315 cat >"conftest.$ac_ext" <<_ACEOF
13316 #line 13316 "configure"
13317 #include "confdefs.h"
13319 #include <X11/Xmu/CharSet.h>
13325 int check = XmuCompareISOLatin1("big", "small");
13332 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13333 if { (eval echo "$as_me:13333: \"$ac_link\"") >&5
13334 (eval $ac_link) 2>&5
13336 echo "$as_me:13336: \$? = $ac_status" >&5
13337 (exit "$ac_status"); } &&
13338 { ac_try='test -s "conftest$ac_exeext"'
13339 { (eval echo "$as_me:13339: \"$ac_try\"") >&5
13340 (eval $ac_try) 2>&5
13342 echo "$as_me:13342: \$? = $ac_status" >&5
13343 (exit "$ac_status"); }; }; then
13344 cf_cv_xaw_compat=yes
13346 echo "$as_me: failed program was:" >&5
13347 cat "conftest.$ac_ext" >&5
13348 cf_cv_xaw_compat=no
13350 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13352 echo "$as_me:13352: result: $cf_cv_xaw_compat" >&5
13353 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
13355 if test "$cf_cv_xaw_compat" = no
13357 # workaround for broken ".pc" files...
13358 case "$cf_x_athena_lib" in
13362 test -n "$verbose" && echo " work around broken package" 1>&6
13364 echo "${as_me:-configure}:13364: testing work around broken package ..." 1>&5
13366 cf_save_xmu="$LIBS"
13367 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
13369 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xmu"; then
13370 test -n "$verbose" && echo " found package xmu" 1>&6
13372 echo "${as_me:-configure}:13372: testing found package xmu ..." 1>&5
13374 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xmu" 2>/dev/null`"
13375 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xmu" 2>/dev/null`"
13376 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
13378 echo "${as_me:-configure}:13378: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13380 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
13382 echo "${as_me:-configure}:13382: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
13387 cf_new_extra_cppflags=
13389 for cf_add_cflags in $cf_pkgconfig_incs
13391 case "$cf_fix_cppflags" in
13393 case "$cf_add_cflags" in
13394 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13395 case "$cf_add_cflags" in
13397 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13399 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13400 && test -z "${cf_tst_cflags}" \
13401 && cf_fix_cppflags=yes
13403 if test "$cf_fix_cppflags" = yes ; then
13405 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13406 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13409 elif test "${cf_tst_cflags}" = "\"'" ; then
13411 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13412 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13418 case "$CPPFLAGS" in
13422 case "$cf_add_cflags" in
13424 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13426 CPPFLAGS=`echo "$CPPFLAGS" | \
13427 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13428 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13433 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13434 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13441 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13442 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13449 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13450 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13452 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13454 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13455 && test -z "${cf_tst_cflags}" \
13456 && cf_fix_cppflags=no
13461 if test -n "$cf_new_cflags" ; then
13463 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13464 CFLAGS="${CFLAGS}$cf_new_cflags"
13468 if test -n "$cf_new_cppflags" ; then
13470 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13471 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13475 if test -n "$cf_new_extra_cppflags" ; then
13477 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13478 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13482 cf_add_libs="$LIBS"
13485 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13486 # filter duplicates
13487 for cf_add_1lib in $cf_add_0lib; do
13488 for cf_add_2lib in $cf_add_libs; do
13489 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13494 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13496 LIBS="$cf_add_libs"
13498 LIBS="$cf_save_xmu"
13500 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13502 echo "${as_me:-configure}:13502: testing ...before $LIBS ..." 1>&5
13504 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
13505 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13507 echo "${as_me:-configure}:13507: testing ...after $LIBS ..." 1>&5
13513 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13515 echo "${as_me:-configure}:13515: testing ...before $LIBS ..." 1>&5
13517 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
13518 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13520 echo "${as_me:-configure}:13520: testing ...after $LIBS ..." 1>&5
13524 for cf_trim_lib in Xmu Xt X11
13527 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13528 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13529 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13531 echo "${as_me:-configure}:13531: testing ..trimmed $LIBS ..." 1>&5
13551 if test -z "$cf_x_athena_lib" ; then
13553 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
13554 test -n "$verbose" && echo " found package Xext" 1>&6
13556 echo "${as_me:-configure}:13556: testing found package Xext ..." 1>&5
13558 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
13559 cf_pkgconfig_libs="`$PKG_CONFIG --libs "Xext" 2>/dev/null`"
13560 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
13562 echo "${as_me:-configure}:13562: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13564 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
13566 echo "${as_me:-configure}:13566: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
13571 cf_new_extra_cppflags=
13573 for cf_add_cflags in $cf_pkgconfig_incs
13575 case "$cf_fix_cppflags" in
13577 case "$cf_add_cflags" in
13578 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13579 case "$cf_add_cflags" in
13581 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13583 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13584 && test -z "${cf_tst_cflags}" \
13585 && cf_fix_cppflags=yes
13587 if test "$cf_fix_cppflags" = yes ; then
13589 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13590 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13593 elif test "${cf_tst_cflags}" = "\"'" ; then
13595 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13596 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13602 case "$CPPFLAGS" in
13606 case "$cf_add_cflags" in
13608 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13610 CPPFLAGS=`echo "$CPPFLAGS" | \
13611 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13612 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13617 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13618 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13625 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13626 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13633 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13634 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13636 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13638 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13639 && test -z "${cf_tst_cflags}" \
13640 && cf_fix_cppflags=no
13645 if test -n "$cf_new_cflags" ; then
13647 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13648 CFLAGS="${CFLAGS}$cf_new_cflags"
13652 if test -n "$cf_new_cppflags" ; then
13654 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13655 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13659 if test -n "$cf_new_extra_cppflags" ; then
13661 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13662 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13666 cf_add_libs="$LIBS"
13669 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13670 # filter duplicates
13671 for cf_add_1lib in $cf_add_0lib; do
13672 for cf_add_2lib in $cf_add_libs; do
13673 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13678 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13680 LIBS="$cf_add_libs"
13687 echo "$as_me:13687: checking for XextCreateExtension in -lXext" >&5
13688 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
13689 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
13690 echo $ECHO_N "(cached) $ECHO_C" >&6
13692 ac_check_lib_save_LIBS=$LIBS
13693 LIBS="-lXext $LIBS"
13694 cat >"conftest.$ac_ext" <<_ACEOF
13695 #line 13695 "configure"
13696 #include "confdefs.h"
13698 /* Override any gcc2 internal prototype to avoid an error. */
13702 /* We use char because int might match the return type of a gcc2
13703 builtin and then its argument prototype would still apply. */
13704 char XextCreateExtension ();
13708 XextCreateExtension ();
13713 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13714 if { (eval echo "$as_me:13714: \"$ac_link\"") >&5
13715 (eval $ac_link) 2>&5
13717 echo "$as_me:13717: \$? = $ac_status" >&5
13718 (exit "$ac_status"); } &&
13719 { ac_try='test -s "conftest$ac_exeext"'
13720 { (eval echo "$as_me:13720: \"$ac_try\"") >&5
13721 (eval $ac_try) 2>&5
13723 echo "$as_me:13723: \$? = $ac_status" >&5
13724 (exit "$ac_status"); }; }; then
13725 ac_cv_lib_Xext_XextCreateExtension=yes
13727 echo "$as_me: failed program was:" >&5
13728 cat "conftest.$ac_ext" >&5
13729 ac_cv_lib_Xext_XextCreateExtension=no
13731 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13732 LIBS=$ac_check_lib_save_LIBS
13734 echo "$as_me:13734: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
13735 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
13736 if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
13738 cf_add_libs="$LIBS"
13741 for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13742 # filter duplicates
13743 for cf_add_1lib in $cf_add_0lib; do
13744 for cf_add_2lib in $cf_add_libs; do
13745 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13750 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13752 LIBS="$cf_add_libs"
13758 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
13759 # in some cases has installed dummy files in the former, other cases replaced
13760 # it with a link to the new location). This complicates the configure script.
13761 # Check for that pitfall, and recover using pkg-config
13763 # If none of these are set, the configuration is almost certainly broken.
13764 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
13767 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
13768 test -n "$verbose" && echo " found package x11" 1>&6
13770 echo "${as_me:-configure}:13770: testing found package x11 ..." 1>&5
13772 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
13773 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
13774 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
13776 echo "${as_me:-configure}:13776: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13778 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
13780 echo "${as_me:-configure}:13780: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
13785 cf_new_extra_cppflags=
13787 for cf_add_cflags in $cf_pkgconfig_incs
13789 case "$cf_fix_cppflags" in
13791 case "$cf_add_cflags" in
13792 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13793 case "$cf_add_cflags" in
13795 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13797 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13798 && test -z "${cf_tst_cflags}" \
13799 && cf_fix_cppflags=yes
13801 if test "$cf_fix_cppflags" = yes ; then
13803 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13804 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13807 elif test "${cf_tst_cflags}" = "\"'" ; then
13809 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13810 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13816 case "$CPPFLAGS" in
13820 case "$cf_add_cflags" in
13822 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13824 CPPFLAGS=`echo "$CPPFLAGS" | \
13825 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13826 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13831 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13832 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13839 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13840 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13847 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13848 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13850 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13852 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13853 && test -z "${cf_tst_cflags}" \
13854 && cf_fix_cppflags=no
13859 if test -n "$cf_new_cflags" ; then
13861 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13862 CFLAGS="${CFLAGS}$cf_new_cflags"
13866 if test -n "$cf_new_cppflags" ; then
13868 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13869 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13873 if test -n "$cf_new_extra_cppflags" ; then
13875 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13876 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13880 cf_add_libs="$LIBS"
13883 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13884 # filter duplicates
13885 for cf_add_1lib in $cf_add_0lib; do
13886 for cf_add_2lib in $cf_add_libs; do
13887 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13892 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13894 LIBS="$cf_add_libs"
13900 { echo "$as_me:13900: WARNING: unable to find X11 library" >&5
13901 echo "$as_me: WARNING: unable to find X11 library" >&2;}
13904 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
13905 test -n "$verbose" && echo " found package ice" 1>&6
13907 echo "${as_me:-configure}:13907: testing found package ice ..." 1>&5
13909 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
13910 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
13911 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
13913 echo "${as_me:-configure}:13913: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13915 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
13917 echo "${as_me:-configure}:13917: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
13922 cf_new_extra_cppflags=
13924 for cf_add_cflags in $cf_pkgconfig_incs
13926 case "$cf_fix_cppflags" in
13928 case "$cf_add_cflags" in
13929 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13930 case "$cf_add_cflags" in
13932 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13934 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13935 && test -z "${cf_tst_cflags}" \
13936 && cf_fix_cppflags=yes
13938 if test "$cf_fix_cppflags" = yes ; then
13940 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13941 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13944 elif test "${cf_tst_cflags}" = "\"'" ; then
13946 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13947 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13953 case "$CPPFLAGS" in
13957 case "$cf_add_cflags" in
13959 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13961 CPPFLAGS=`echo "$CPPFLAGS" | \
13962 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13963 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13968 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13969 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13976 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13977 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13984 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13985 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13987 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13989 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13990 && test -z "${cf_tst_cflags}" \
13991 && cf_fix_cppflags=no
13996 if test -n "$cf_new_cflags" ; then
13998 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13999 CFLAGS="${CFLAGS}$cf_new_cflags"
14003 if test -n "$cf_new_cppflags" ; then
14005 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14006 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14010 if test -n "$cf_new_extra_cppflags" ; then
14012 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14013 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14017 cf_add_libs="$LIBS"
14020 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14021 # filter duplicates
14022 for cf_add_1lib in $cf_add_0lib; do
14023 for cf_add_2lib in $cf_add_libs; do
14024 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14029 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14031 LIBS="$cf_add_libs"
14037 { echo "$as_me:14037: WARNING: unable to find ICE library" >&5
14038 echo "$as_me: WARNING: unable to find ICE library" >&2;}
14041 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
14042 test -n "$verbose" && echo " found package sm" 1>&6
14044 echo "${as_me:-configure}:14044: testing found package sm ..." 1>&5
14046 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
14047 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
14048 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
14050 echo "${as_me:-configure}:14050: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14052 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
14054 echo "${as_me:-configure}:14054: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
14059 cf_new_extra_cppflags=
14061 for cf_add_cflags in $cf_pkgconfig_incs
14063 case "$cf_fix_cppflags" in
14065 case "$cf_add_cflags" in
14066 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14067 case "$cf_add_cflags" in
14069 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14071 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14072 && test -z "${cf_tst_cflags}" \
14073 && cf_fix_cppflags=yes
14075 if test "$cf_fix_cppflags" = yes ; then
14077 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14078 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14081 elif test "${cf_tst_cflags}" = "\"'" ; then
14083 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14084 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14090 case "$CPPFLAGS" in
14094 case "$cf_add_cflags" in
14096 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14098 CPPFLAGS=`echo "$CPPFLAGS" | \
14099 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14100 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14105 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14106 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14113 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14114 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14121 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14122 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14124 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14126 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14127 && test -z "${cf_tst_cflags}" \
14128 && cf_fix_cppflags=no
14133 if test -n "$cf_new_cflags" ; then
14135 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14136 CFLAGS="${CFLAGS}$cf_new_cflags"
14140 if test -n "$cf_new_cppflags" ; then
14142 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14143 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14147 if test -n "$cf_new_extra_cppflags" ; then
14149 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14150 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14154 cf_add_libs="$LIBS"
14157 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14158 # filter duplicates
14159 for cf_add_1lib in $cf_add_0lib; do
14160 for cf_add_2lib in $cf_add_libs; do
14161 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14166 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14168 LIBS="$cf_add_libs"
14174 { echo "$as_me:14174: WARNING: unable to find SM library" >&5
14175 echo "$as_me: WARNING: unable to find SM library" >&2;}
14178 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
14179 test -n "$verbose" && echo " found package xt" 1>&6
14181 echo "${as_me:-configure}:14181: testing found package xt ..." 1>&5
14183 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
14184 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
14185 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
14187 echo "${as_me:-configure}:14187: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14189 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
14191 echo "${as_me:-configure}:14191: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
14196 cf_new_extra_cppflags=
14198 for cf_add_cflags in $cf_pkgconfig_incs
14200 case "$cf_fix_cppflags" in
14202 case "$cf_add_cflags" in
14203 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14204 case "$cf_add_cflags" in
14206 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14208 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14209 && test -z "${cf_tst_cflags}" \
14210 && cf_fix_cppflags=yes
14212 if test "$cf_fix_cppflags" = yes ; then
14214 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14215 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14218 elif test "${cf_tst_cflags}" = "\"'" ; then
14220 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14221 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14227 case "$CPPFLAGS" in
14231 case "$cf_add_cflags" in
14233 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14235 CPPFLAGS=`echo "$CPPFLAGS" | \
14236 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14237 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14242 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14243 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14250 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14251 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14258 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14259 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14261 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14263 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14264 && test -z "${cf_tst_cflags}" \
14265 && cf_fix_cppflags=no
14270 if test -n "$cf_new_cflags" ; then
14272 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14273 CFLAGS="${CFLAGS}$cf_new_cflags"
14277 if test -n "$cf_new_cppflags" ; then
14279 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14280 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14284 if test -n "$cf_new_extra_cppflags" ; then
14286 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14287 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14291 cf_add_libs="$LIBS"
14294 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14295 # filter duplicates
14296 for cf_add_1lib in $cf_add_0lib; do
14297 for cf_add_2lib in $cf_add_libs; do
14298 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14303 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14305 LIBS="$cf_add_libs"
14311 { echo "$as_me:14311: WARNING: unable to find Xt library" >&5
14312 echo "$as_me: WARNING: unable to find Xt library" >&2;}
14316 LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
14321 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
14322 test -n "$verbose" && echo " found package xt" 1>&6
14324 echo "${as_me:-configure}:14324: testing found package xt ..." 1>&5
14326 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
14327 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
14328 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
14330 echo "${as_me:-configure}:14330: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14332 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
14334 echo "${as_me:-configure}:14334: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
14339 cf_new_extra_cppflags=
14341 for cf_add_cflags in $cf_pkgconfig_incs
14343 case "$cf_fix_cppflags" in
14345 case "$cf_add_cflags" in
14346 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14347 case "$cf_add_cflags" in
14349 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14351 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14352 && test -z "${cf_tst_cflags}" \
14353 && cf_fix_cppflags=yes
14355 if test "$cf_fix_cppflags" = yes ; then
14357 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14358 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14361 elif test "${cf_tst_cflags}" = "\"'" ; then
14363 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14364 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14370 case "$CPPFLAGS" in
14374 case "$cf_add_cflags" in
14376 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14378 CPPFLAGS=`echo "$CPPFLAGS" | \
14379 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14380 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14385 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14386 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14393 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14394 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14401 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14402 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14404 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14406 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14407 && test -z "${cf_tst_cflags}" \
14408 && cf_fix_cppflags=no
14413 if test -n "$cf_new_cflags" ; then
14415 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14416 CFLAGS="${CFLAGS}$cf_new_cflags"
14420 if test -n "$cf_new_cppflags" ; then
14422 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14423 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14427 if test -n "$cf_new_extra_cppflags" ; then
14429 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14430 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14434 cf_add_libs="$LIBS"
14437 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14438 # filter duplicates
14439 for cf_add_1lib in $cf_add_0lib; do
14440 for cf_add_2lib in $cf_add_libs; do
14441 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14446 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14448 LIBS="$cf_add_libs"
14454 # we have an "xt" package, but it may omit Xt's dependency on X11
14455 echo "$as_me:14455: checking for usable X dependency" >&5
14456 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
14457 if test "${cf_cv_xt_x11_compat+set}" = set; then
14458 echo $ECHO_N "(cached) $ECHO_C" >&6
14461 cat >"conftest.$ac_ext" <<_ACEOF
14462 #line 14462 "configure"
14463 #include "confdefs.h"
14465 #include <X11/Xlib.h>
14471 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
14472 int rc2 = XClearWindow((Display*) 0, (Window) 0);
14473 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
14474 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
14480 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14481 if { (eval echo "$as_me:14481: \"$ac_link\"") >&5
14482 (eval $ac_link) 2>&5
14484 echo "$as_me:14484: \$? = $ac_status" >&5
14485 (exit "$ac_status"); } &&
14486 { ac_try='test -s "conftest$ac_exeext"'
14487 { (eval echo "$as_me:14487: \"$ac_try\"") >&5
14488 (eval $ac_try) 2>&5
14490 echo "$as_me:14490: \$? = $ac_status" >&5
14491 (exit "$ac_status"); }; }; then
14492 cf_cv_xt_x11_compat=yes
14494 echo "$as_me: failed program was:" >&5
14495 cat "conftest.$ac_ext" >&5
14496 cf_cv_xt_x11_compat=no
14498 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14500 echo "$as_me:14500: result: $cf_cv_xt_x11_compat" >&5
14501 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
14502 if test "$cf_cv_xt_x11_compat" = no
14504 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
14506 echo "${as_me:-configure}:14506: testing work around broken X11 dependency ..." 1>&5
14508 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
14510 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
14511 test -n "$verbose" && echo " found package x11" 1>&6
14513 echo "${as_me:-configure}:14513: testing found package x11 ..." 1>&5
14515 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
14516 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
14517 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
14519 echo "${as_me:-configure}:14519: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14521 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
14523 echo "${as_me:-configure}:14523: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
14528 cf_new_extra_cppflags=
14530 for cf_add_cflags in $cf_pkgconfig_incs
14532 case "$cf_fix_cppflags" in
14534 case "$cf_add_cflags" in
14535 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14536 case "$cf_add_cflags" in
14538 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14540 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14541 && test -z "${cf_tst_cflags}" \
14542 && cf_fix_cppflags=yes
14544 if test "$cf_fix_cppflags" = yes ; then
14546 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14547 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14550 elif test "${cf_tst_cflags}" = "\"'" ; then
14552 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14553 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14559 case "$CPPFLAGS" in
14563 case "$cf_add_cflags" in
14565 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14567 CPPFLAGS=`echo "$CPPFLAGS" | \
14568 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14569 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14574 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14575 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14582 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14583 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14590 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14591 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14593 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14595 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14596 && test -z "${cf_tst_cflags}" \
14597 && cf_fix_cppflags=no
14602 if test -n "$cf_new_cflags" ; then
14604 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14605 CFLAGS="${CFLAGS}$cf_new_cflags"
14609 if test -n "$cf_new_cppflags" ; then
14611 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14612 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14616 if test -n "$cf_new_extra_cppflags" ; then
14618 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14619 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14623 cf_add_libs="$LIBS"
14626 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14627 # filter duplicates
14628 for cf_add_1lib in $cf_add_0lib; do
14629 for cf_add_2lib in $cf_add_libs; do
14630 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14635 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14637 LIBS="$cf_add_libs"
14644 test -n "$verbose" && echo " ...before $LIBS" 1>&6
14646 echo "${as_me:-configure}:14646: testing ...before $LIBS ..." 1>&5
14648 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
14649 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14651 echo "${as_me:-configure}:14651: testing ...after $LIBS ..." 1>&5
14659 echo "$as_me:14659: checking for usable X Toolkit package" >&5
14660 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
14661 if test "${cf_cv_xt_ice_compat+set}" = set; then
14662 echo $ECHO_N "(cached) $ECHO_C" >&6
14665 cat >"conftest.$ac_ext" <<_ACEOF
14666 #line 14666 "configure"
14667 #include "confdefs.h"
14669 #include <X11/Shell.h>
14674 int num = IceConnectionNumber(0); (void) num
14680 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14681 if { (eval echo "$as_me:14681: \"$ac_link\"") >&5
14682 (eval $ac_link) 2>&5
14684 echo "$as_me:14684: \$? = $ac_status" >&5
14685 (exit "$ac_status"); } &&
14686 { ac_try='test -s "conftest$ac_exeext"'
14687 { (eval echo "$as_me:14687: \"$ac_try\"") >&5
14688 (eval $ac_try) 2>&5
14690 echo "$as_me:14690: \$? = $ac_status" >&5
14691 (exit "$ac_status"); }; }; then
14692 cf_cv_xt_ice_compat=yes
14694 echo "$as_me: failed program was:" >&5
14695 cat "conftest.$ac_ext" >&5
14696 cf_cv_xt_ice_compat=no
14698 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14700 echo "$as_me:14700: result: $cf_cv_xt_ice_compat" >&5
14701 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
14703 if test "$cf_cv_xt_ice_compat" = no
14705 # workaround for broken ".pc" files used for X Toolkit.
14706 case "x$X_PRE_LIBS" in
14712 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
14714 echo "${as_me:-configure}:14714: testing work around broken ICE dependency ..." 1>&5
14716 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
14717 test -n "$verbose" && echo " found package ice" 1>&6
14719 echo "${as_me:-configure}:14719: testing found package ice ..." 1>&5
14721 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
14722 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
14723 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
14725 echo "${as_me:-configure}:14725: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14727 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
14729 echo "${as_me:-configure}:14729: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
14734 cf_new_extra_cppflags=
14736 for cf_add_cflags in $cf_pkgconfig_incs
14738 case "$cf_fix_cppflags" in
14740 case "$cf_add_cflags" in
14741 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14742 case "$cf_add_cflags" in
14744 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14746 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14747 && test -z "${cf_tst_cflags}" \
14748 && cf_fix_cppflags=yes
14750 if test "$cf_fix_cppflags" = yes ; then
14752 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14753 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14756 elif test "${cf_tst_cflags}" = "\"'" ; then
14758 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14759 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14765 case "$CPPFLAGS" in
14769 case "$cf_add_cflags" in
14771 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14773 CPPFLAGS=`echo "$CPPFLAGS" | \
14774 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14775 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14780 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14781 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14788 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14789 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14796 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14797 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14799 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14801 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14802 && test -z "${cf_tst_cflags}" \
14803 && cf_fix_cppflags=no
14808 if test -n "$cf_new_cflags" ; then
14810 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14811 CFLAGS="${CFLAGS}$cf_new_cflags"
14815 if test -n "$cf_new_cppflags" ; then
14817 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14818 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14822 if test -n "$cf_new_extra_cppflags" ; then
14824 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14825 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14829 cf_add_libs="$LIBS"
14832 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14833 # filter duplicates
14834 for cf_add_1lib in $cf_add_0lib; do
14835 for cf_add_2lib in $cf_add_libs; do
14836 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14841 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14843 LIBS="$cf_add_libs"
14845 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
14846 test -n "$verbose" && echo " found package sm" 1>&6
14848 echo "${as_me:-configure}:14848: testing found package sm ..." 1>&5
14850 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
14851 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
14852 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
14854 echo "${as_me:-configure}:14854: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14856 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
14858 echo "${as_me:-configure}:14858: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
14863 cf_new_extra_cppflags=
14865 for cf_add_cflags in $cf_pkgconfig_incs
14867 case "$cf_fix_cppflags" in
14869 case "$cf_add_cflags" in
14870 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14871 case "$cf_add_cflags" in
14873 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14875 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14876 && test -z "${cf_tst_cflags}" \
14877 && cf_fix_cppflags=yes
14879 if test "$cf_fix_cppflags" = yes ; then
14881 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14882 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14885 elif test "${cf_tst_cflags}" = "\"'" ; then
14887 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14888 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14894 case "$CPPFLAGS" in
14898 case "$cf_add_cflags" in
14900 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14902 CPPFLAGS=`echo "$CPPFLAGS" | \
14903 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14904 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14909 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14910 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14917 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14918 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14925 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14926 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14928 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14930 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14931 && test -z "${cf_tst_cflags}" \
14932 && cf_fix_cppflags=no
14937 if test -n "$cf_new_cflags" ; then
14939 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14940 CFLAGS="${CFLAGS}$cf_new_cflags"
14944 if test -n "$cf_new_cppflags" ; then
14946 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14947 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14951 if test -n "$cf_new_extra_cppflags" ; then
14953 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14954 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14958 cf_add_libs="$LIBS"
14961 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14962 # filter duplicates
14963 for cf_add_1lib in $cf_add_0lib; do
14964 for cf_add_2lib in $cf_add_libs; do
14965 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14970 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14972 LIBS="$cf_add_libs"
14985 test -n "$verbose" && echo " ...before $LIBS" 1>&6
14987 echo "${as_me:-configure}:14987: testing ...before $LIBS ..." 1>&5
14989 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
14990 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14992 echo "${as_me:-configure}:14992: testing ...after $LIBS ..." 1>&5
15008 LDFLAGS="$X_LIBS $LDFLAGS"
15010 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
15012 echo "${as_me:-configure}:15012: testing checking additions to CFLAGS ..." 1>&5
15014 cf_check_cflags="$CFLAGS"
15015 cf_check_cppflags="$CPPFLAGS"
15020 cf_new_extra_cppflags=
15022 for cf_add_cflags in $X_CFLAGS
15024 case "$cf_fix_cppflags" in
15026 case "$cf_add_cflags" in
15027 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15028 case "$cf_add_cflags" in
15030 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15032 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15033 && test -z "${cf_tst_cflags}" \
15034 && cf_fix_cppflags=yes
15036 if test "$cf_fix_cppflags" = yes ; then
15038 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15039 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15042 elif test "${cf_tst_cflags}" = "\"'" ; then
15044 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15045 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15051 case "$CPPFLAGS" in
15055 case "$cf_add_cflags" in
15057 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15059 CPPFLAGS=`echo "$CPPFLAGS" | \
15060 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15061 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15066 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15067 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15074 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15075 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15082 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15083 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15085 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15087 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15088 && test -z "${cf_tst_cflags}" \
15089 && cf_fix_cppflags=no
15094 if test -n "$cf_new_cflags" ; then
15095 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
15097 echo "${as_me:-configure}:15097: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
15099 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15100 CFLAGS="${CFLAGS}$cf_new_cflags"
15104 if test -n "$cf_new_cppflags" ; then
15105 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
15107 echo "${as_me:-configure}:15107: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
15109 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15110 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15114 if test -n "$cf_new_extra_cppflags" ; then
15115 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
15117 echo "${as_me:-configure}:15117: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
15119 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15120 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15124 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
15125 cat >"conftest.$ac_ext" <<_ACEOF
15126 #line 15126 "configure"
15127 #include "confdefs.h"
15132 printf("Hello world");
15137 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15138 if { (eval echo "$as_me:15138: \"$ac_link\"") >&5
15139 (eval $ac_link) 2>&5
15141 echo "$as_me:15141: \$? = $ac_status" >&5
15142 (exit "$ac_status"); } &&
15143 { ac_try='test -s "conftest$ac_exeext"'
15144 { (eval echo "$as_me:15144: \"$ac_try\"") >&5
15145 (eval $ac_try) 2>&5
15147 echo "$as_me:15147: \$? = $ac_status" >&5
15148 (exit "$ac_status"); }; }; then
15151 echo "$as_me: failed program was:" >&5
15152 cat "conftest.$ac_ext" >&5
15153 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
15155 echo "${as_me:-configure}:15155: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
15157 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
15158 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
15160 echo "${as_me:-configure}:15160: testing but keeping change to \$CPPFLAGS ..." 1>&5
15163 CFLAGS="$cf_check_cflags"
15165 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15168 echo "$as_me:15168: checking for XOpenDisplay" >&5
15169 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
15170 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
15171 echo $ECHO_N "(cached) $ECHO_C" >&6
15173 cat >"conftest.$ac_ext" <<_ACEOF
15174 #line 15174 "configure"
15175 #include "confdefs.h"
15176 #define XOpenDisplay autoconf_temporary
15177 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15178 #undef XOpenDisplay
15184 /* We use char because int might match the return type of a gcc2
15185 builtin and then its argument prototype would still apply. */
15186 char XOpenDisplay (void);
15192 /* The GNU C library defines stubs for functions which it implements
15193 to always fail with ENOSYS. Some functions are actually named
15194 something starting with __ and the normal name is an alias. */
15195 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
15196 #error found stub for XOpenDisplay
15199 return XOpenDisplay ();
15204 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15205 if { (eval echo "$as_me:15205: \"$ac_link\"") >&5
15206 (eval $ac_link) 2>&5
15208 echo "$as_me:15208: \$? = $ac_status" >&5
15209 (exit "$ac_status"); } &&
15210 { ac_try='test -s "conftest$ac_exeext"'
15211 { (eval echo "$as_me:15211: \"$ac_try\"") >&5
15212 (eval $ac_try) 2>&5
15214 echo "$as_me:15214: \$? = $ac_status" >&5
15215 (exit "$ac_status"); }; }; then
15216 ac_cv_func_XOpenDisplay=yes
15218 echo "$as_me: failed program was:" >&5
15219 cat "conftest.$ac_ext" >&5
15220 ac_cv_func_XOpenDisplay=no
15222 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15224 echo "$as_me:15224: result: $ac_cv_func_XOpenDisplay" >&5
15225 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
15226 if test "$ac_cv_func_XOpenDisplay" = yes; then
15230 echo "$as_me:15230: checking for XOpenDisplay in -lX11" >&5
15231 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
15232 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
15233 echo $ECHO_N "(cached) $ECHO_C" >&6
15235 ac_check_lib_save_LIBS=$LIBS
15237 cat >"conftest.$ac_ext" <<_ACEOF
15238 #line 15238 "configure"
15239 #include "confdefs.h"
15241 /* Override any gcc2 internal prototype to avoid an error. */
15245 /* We use char because int might match the return type of a gcc2
15246 builtin and then its argument prototype would still apply. */
15247 char XOpenDisplay ();
15256 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15257 if { (eval echo "$as_me:15257: \"$ac_link\"") >&5
15258 (eval $ac_link) 2>&5
15260 echo "$as_me:15260: \$? = $ac_status" >&5
15261 (exit "$ac_status"); } &&
15262 { ac_try='test -s "conftest$ac_exeext"'
15263 { (eval echo "$as_me:15263: \"$ac_try\"") >&5
15264 (eval $ac_try) 2>&5
15266 echo "$as_me:15266: \$? = $ac_status" >&5
15267 (exit "$ac_status"); }; }; then
15268 ac_cv_lib_X11_XOpenDisplay=yes
15270 echo "$as_me: failed program was:" >&5
15271 cat "conftest.$ac_ext" >&5
15272 ac_cv_lib_X11_XOpenDisplay=no
15274 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15275 LIBS=$ac_check_lib_save_LIBS
15277 echo "$as_me:15277: result: $ac_cv_lib_X11_XOpenDisplay" >&5
15278 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
15279 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
15281 cf_add_libs="$LIBS"
15284 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15285 # filter duplicates
15286 for cf_add_1lib in $cf_add_0lib; do
15287 for cf_add_2lib in $cf_add_libs; do
15288 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15293 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15295 LIBS="$cf_add_libs"
15301 echo "$as_me:15301: checking for XtAppInitialize" >&5
15302 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
15303 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
15304 echo $ECHO_N "(cached) $ECHO_C" >&6
15306 cat >"conftest.$ac_ext" <<_ACEOF
15307 #line 15307 "configure"
15308 #include "confdefs.h"
15309 #define XtAppInitialize autoconf_temporary
15310 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15311 #undef XtAppInitialize
15317 /* We use char because int might match the return type of a gcc2
15318 builtin and then its argument prototype would still apply. */
15319 char XtAppInitialize (void);
15325 /* The GNU C library defines stubs for functions which it implements
15326 to always fail with ENOSYS. Some functions are actually named
15327 something starting with __ and the normal name is an alias. */
15328 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
15329 #error found stub for XtAppInitialize
15332 return XtAppInitialize ();
15337 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15338 if { (eval echo "$as_me:15338: \"$ac_link\"") >&5
15339 (eval $ac_link) 2>&5
15341 echo "$as_me:15341: \$? = $ac_status" >&5
15342 (exit "$ac_status"); } &&
15343 { ac_try='test -s "conftest$ac_exeext"'
15344 { (eval echo "$as_me:15344: \"$ac_try\"") >&5
15345 (eval $ac_try) 2>&5
15347 echo "$as_me:15347: \$? = $ac_status" >&5
15348 (exit "$ac_status"); }; }; then
15349 ac_cv_func_XtAppInitialize=yes
15351 echo "$as_me: failed program was:" >&5
15352 cat "conftest.$ac_ext" >&5
15353 ac_cv_func_XtAppInitialize=no
15355 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15357 echo "$as_me:15357: result: $ac_cv_func_XtAppInitialize" >&5
15358 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
15359 if test "$ac_cv_func_XtAppInitialize" = yes; then
15363 echo "$as_me:15363: checking for XtAppInitialize in -lXt" >&5
15364 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
15365 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
15366 echo $ECHO_N "(cached) $ECHO_C" >&6
15368 ac_check_lib_save_LIBS=$LIBS
15370 cat >"conftest.$ac_ext" <<_ACEOF
15371 #line 15371 "configure"
15372 #include "confdefs.h"
15374 /* Override any gcc2 internal prototype to avoid an error. */
15378 /* We use char because int might match the return type of a gcc2
15379 builtin and then its argument prototype would still apply. */
15380 char XtAppInitialize ();
15384 XtAppInitialize ();
15389 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15390 if { (eval echo "$as_me:15390: \"$ac_link\"") >&5
15391 (eval $ac_link) 2>&5
15393 echo "$as_me:15393: \$? = $ac_status" >&5
15394 (exit "$ac_status"); } &&
15395 { ac_try='test -s "conftest$ac_exeext"'
15396 { (eval echo "$as_me:15396: \"$ac_try\"") >&5
15397 (eval $ac_try) 2>&5
15399 echo "$as_me:15399: \$? = $ac_status" >&5
15400 (exit "$ac_status"); }; }; then
15401 ac_cv_lib_Xt_XtAppInitialize=yes
15403 echo "$as_me: failed program was:" >&5
15404 cat "conftest.$ac_ext" >&5
15405 ac_cv_lib_Xt_XtAppInitialize=no
15407 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15408 LIBS=$ac_check_lib_save_LIBS
15410 echo "$as_me:15410: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
15411 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
15412 if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
15414 cat >>confdefs.h <<\EOF
15415 #define HAVE_LIBXT 1
15426 if test "$cf_have_X_LIBS" = no ; then
15427 { echo "$as_me:15427: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15428 test program. You will have to check and add the proper libraries by hand
15430 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15431 test program. You will have to check and add the proper libraries by hand
15432 to makefile." >&2;}
15435 cf_x_athena_root=$cf_x_athena
15438 for cf_path in default \
15439 /usr/contrib/X11R6 \
15440 /usr/contrib/X11R5 \
15444 if test -z "$cf_x_athena_inc" ; then
15446 cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
15447 cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
15448 cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
15449 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15450 for cf_X_CFLAGS in $X_CFLAGS
15452 case "x$cf_X_CFLAGS" in
15454 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15457 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15462 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
15463 if test "$cf_path" != default ; then
15465 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15466 CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
15468 echo "$as_me:15468: checking for $cf_test in $cf_path" >&5
15469 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
15471 echo "$as_me:15471: checking for $cf_test" >&5
15472 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
15474 cat >"conftest.$ac_ext" <<_ACEOF
15475 #line 15475 "configure"
15476 #include "confdefs.h"
15478 #include <X11/Intrinsic.h>
15479 #include <$cf_test>
15488 rm -f "conftest.$ac_objext"
15489 if { (eval echo "$as_me:15489: \"$ac_compile\"") >&5
15490 (eval $ac_compile) 2>&5
15492 echo "$as_me:15492: \$? = $ac_status" >&5
15493 (exit "$ac_status"); } &&
15494 { ac_try='test -s "conftest.$ac_objext"'
15495 { (eval echo "$as_me:15495: \"$ac_try\"") >&5
15496 (eval $ac_try) 2>&5
15498 echo "$as_me:15498: \$? = $ac_status" >&5
15499 (exit "$ac_status"); }; }; then
15502 echo "$as_me: failed program was:" >&5
15503 cat "conftest.$ac_ext" >&5
15506 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15507 echo "$as_me:15507: result: $cf_result" >&5
15508 echo "${ECHO_T}$cf_result" >&6
15510 LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
15511 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
15512 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
15514 if test "$cf_result" = yes ; then
15515 test "$cf_path" = default && cf_x_athena_inc=default
15516 test "$cf_path" != default && cf_x_athena_inc="$cf_path/include"
15522 if test -z "$cf_x_athena_inc" ; then
15523 { echo "$as_me:15523: WARNING: Unable to find Athena header files" >&5
15524 echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
15525 elif test "$cf_x_athena_inc" != default ; then
15527 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15528 CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
15532 cf_x_athena_root=$cf_x_athena
15535 for cf_path in default \
15536 /usr/contrib/X11R6 \
15537 /usr/contrib/X11R5 \
15542 ${cf_x_athena_root} \
15543 ${cf_x_athena_root}7 \
15544 ${cf_x_athena_root}6
15547 "-l$cf_lib -lXmu" \
15548 "-l$cf_lib -lXpm -lXmu" \
15549 "-l${cf_lib}_s -lXmu_s"
15551 test -n "$cf_x_athena_lib" && break
15553 cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
15554 cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
15555 cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
15556 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15557 for cf_X_CFLAGS in $X_CFLAGS
15559 case "x$cf_X_CFLAGS" in
15561 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15564 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15569 cf_test=XawSimpleMenuAddGlobalActions
15570 test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
15572 cf_add_libs="$LIBS"
15575 for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15576 # filter duplicates
15577 for cf_add_1lib in $cf_add_0lib; do
15578 for cf_add_2lib in $cf_add_libs; do
15579 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15584 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15586 LIBS="$cf_add_libs"
15588 echo "$as_me:15588: checking for $cf_test in $cf_libs" >&5
15589 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
15590 cat >"conftest.$ac_ext" <<_ACEOF
15591 #line 15591 "configure"
15592 #include "confdefs.h"
15594 #include <X11/Intrinsic.h>
15595 #include <X11/$cf_x_athena_root/SimpleMenu.h>
15601 $cf_test((XtAppContext) 0)
15606 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15607 if { (eval echo "$as_me:15607: \"$ac_link\"") >&5
15608 (eval $ac_link) 2>&5
15610 echo "$as_me:15610: \$? = $ac_status" >&5
15611 (exit "$ac_status"); } &&
15612 { ac_try='test -s "conftest$ac_exeext"'
15613 { (eval echo "$as_me:15613: \"$ac_try\"") >&5
15614 (eval $ac_try) 2>&5
15616 echo "$as_me:15616: \$? = $ac_status" >&5
15617 (exit "$ac_status"); }; }; then
15620 echo "$as_me: failed program was:" >&5
15621 cat "conftest.$ac_ext" >&5
15624 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15625 echo "$as_me:15625: result: $cf_result" >&5
15626 echo "${ECHO_T}$cf_result" >&6
15628 LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
15629 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
15630 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
15632 if test "$cf_result" = yes ; then
15633 cf_x_athena_lib="$cf_libs"
15637 test -n "$cf_x_athena_lib" && break
15641 if test -z "$cf_x_athena_lib" ; then
15642 { { echo "$as_me:15642: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
15643 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
15644 { (exit 1); exit 1; }; }
15647 cf_add_libs="$LIBS"
15650 for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15651 # filter duplicates
15652 for cf_add_1lib in $cf_add_0lib; do
15653 for cf_add_2lib in $cf_add_libs; do
15654 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15659 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15661 LIBS="$cf_add_libs"
15663 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15665 cat >>confdefs.h <<EOF
15666 #define $cf_x_athena_LIBS 1
15671 if test -n "$ac_tool_prefix"; then
15672 for ac_prog in xcurses-config
15674 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
15675 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
15676 echo "$as_me:15676: checking for $ac_word" >&5
15677 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15678 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
15679 echo $ECHO_N "(cached) $ECHO_C" >&6
15681 if test -n "$XCURSES_CONFIG"; then
15682 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
15684 ac_save_IFS=$IFS; IFS=$ac_path_separator
15686 for ac_dir in $ac_dummy; do
15688 test -z "$ac_dir" && ac_dir=.
15689 $as_executable_p "$ac_dir/$ac_word" || continue
15690 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
15691 echo "$as_me:15691: found $ac_dir/$ac_word" >&5
15697 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
15698 if test -n "$XCURSES_CONFIG"; then
15699 echo "$as_me:15699: result: $XCURSES_CONFIG" >&5
15700 echo "${ECHO_T}$XCURSES_CONFIG" >&6
15702 echo "$as_me:15702: result: no" >&5
15703 echo "${ECHO_T}no" >&6
15706 test -n "$XCURSES_CONFIG" && break
15709 if test -z "$XCURSES_CONFIG"; then
15710 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
15711 for ac_prog in xcurses-config
15713 # Extract the first word of "$ac_prog", so it can be a program name with args.
15714 set dummy $ac_prog; ac_word=$2
15715 echo "$as_me:15715: checking for $ac_word" >&5
15716 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15717 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
15718 echo $ECHO_N "(cached) $ECHO_C" >&6
15720 if test -n "$ac_ct_XCURSES_CONFIG"; then
15721 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
15723 ac_save_IFS=$IFS; IFS=$ac_path_separator
15725 for ac_dir in $ac_dummy; do
15727 test -z "$ac_dir" && ac_dir=.
15728 $as_executable_p "$ac_dir/$ac_word" || continue
15729 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
15730 echo "$as_me:15730: found $ac_dir/$ac_word" >&5
15736 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
15737 if test -n "$ac_ct_XCURSES_CONFIG"; then
15738 echo "$as_me:15738: result: $ac_ct_XCURSES_CONFIG" >&5
15739 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
15741 echo "$as_me:15741: result: no" >&5
15742 echo "${ECHO_T}no" >&6
15745 test -n "$ac_ct_XCURSES_CONFIG" && break
15747 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
15749 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
15752 if test "$XCURSES_CONFIG" != none ; then
15757 cf_new_extra_cppflags=
15759 for cf_add_cflags in `$XCURSES_CONFIG --cflags`
15761 case "$cf_fix_cppflags" in
15763 case "$cf_add_cflags" in
15764 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15765 case "$cf_add_cflags" in
15767 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15769 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15770 && test -z "${cf_tst_cflags}" \
15771 && cf_fix_cppflags=yes
15773 if test "$cf_fix_cppflags" = yes ; then
15775 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15776 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15779 elif test "${cf_tst_cflags}" = "\"'" ; then
15781 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15782 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15788 case "$CPPFLAGS" in
15792 case "$cf_add_cflags" in
15794 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15796 CPPFLAGS=`echo "$CPPFLAGS" | \
15797 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15798 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15803 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15804 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15811 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15812 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15819 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15820 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15822 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15824 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15825 && test -z "${cf_tst_cflags}" \
15826 && cf_fix_cppflags=no
15831 if test -n "$cf_new_cflags" ; then
15833 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15834 CFLAGS="${CFLAGS}$cf_new_cflags"
15838 if test -n "$cf_new_cppflags" ; then
15840 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15841 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15845 if test -n "$cf_new_extra_cppflags" ; then
15847 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15848 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15852 cf_add_libs="$LIBS"
15855 for cf_add_1lib in `$XCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15856 # filter duplicates
15857 for cf_add_1lib in $cf_add_0lib; do
15858 for cf_add_2lib in $cf_add_libs; do
15859 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15864 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15866 LIBS="$cf_add_libs"
15868 cf_cv_lib_XCurses=yes
15872 LDFLAGS="$LDFLAGS $X_LIBS"
15874 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
15876 echo "${as_me:-configure}:15876: testing checking additions to CFLAGS ..." 1>&5
15878 cf_check_cflags="$CFLAGS"
15879 cf_check_cppflags="$CPPFLAGS"
15884 cf_new_extra_cppflags=
15886 for cf_add_cflags in $X_CFLAGS
15888 case "$cf_fix_cppflags" in
15890 case "$cf_add_cflags" in
15891 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15892 case "$cf_add_cflags" in
15894 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15896 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15897 && test -z "${cf_tst_cflags}" \
15898 && cf_fix_cppflags=yes
15900 if test "$cf_fix_cppflags" = yes ; then
15902 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15903 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15906 elif test "${cf_tst_cflags}" = "\"'" ; then
15908 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15909 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15915 case "$CPPFLAGS" in
15919 case "$cf_add_cflags" in
15921 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15923 CPPFLAGS=`echo "$CPPFLAGS" | \
15924 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15925 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15930 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15931 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15938 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15939 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15946 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15947 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15949 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15951 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15952 && test -z "${cf_tst_cflags}" \
15953 && cf_fix_cppflags=no
15958 if test -n "$cf_new_cflags" ; then
15959 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
15961 echo "${as_me:-configure}:15961: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
15963 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15964 CFLAGS="${CFLAGS}$cf_new_cflags"
15968 if test -n "$cf_new_cppflags" ; then
15969 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
15971 echo "${as_me:-configure}:15971: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
15973 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15974 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15978 if test -n "$cf_new_extra_cppflags" ; then
15979 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
15981 echo "${as_me:-configure}:15981: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
15983 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15984 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15988 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
15989 cat >"conftest.$ac_ext" <<_ACEOF
15990 #line 15990 "configure"
15991 #include "confdefs.h"
15996 printf("Hello world");
16001 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16002 if { (eval echo "$as_me:16002: \"$ac_link\"") >&5
16003 (eval $ac_link) 2>&5
16005 echo "$as_me:16005: \$? = $ac_status" >&5
16006 (exit "$ac_status"); } &&
16007 { ac_try='test -s "conftest$ac_exeext"'
16008 { (eval echo "$as_me:16008: \"$ac_try\"") >&5
16009 (eval $ac_try) 2>&5
16011 echo "$as_me:16011: \$? = $ac_status" >&5
16012 (exit "$ac_status"); }; }; then
16015 echo "$as_me: failed program was:" >&5
16016 cat "conftest.$ac_ext" >&5
16017 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
16019 echo "${as_me:-configure}:16019: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
16021 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
16022 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
16024 echo "${as_me:-configure}:16024: testing but keeping change to \$CPPFLAGS ..." 1>&5
16027 CFLAGS="$cf_check_cflags"
16029 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16032 echo "$as_me:16032: checking for XOpenDisplay in -lX11" >&5
16033 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
16034 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
16035 echo $ECHO_N "(cached) $ECHO_C" >&6
16037 ac_check_lib_save_LIBS=$LIBS
16038 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
16039 cat >"conftest.$ac_ext" <<_ACEOF
16040 #line 16040 "configure"
16041 #include "confdefs.h"
16043 /* Override any gcc2 internal prototype to avoid an error. */
16047 /* We use char because int might match the return type of a gcc2
16048 builtin and then its argument prototype would still apply. */
16049 char XOpenDisplay ();
16058 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16059 if { (eval echo "$as_me:16059: \"$ac_link\"") >&5
16060 (eval $ac_link) 2>&5
16062 echo "$as_me:16062: \$? = $ac_status" >&5
16063 (exit "$ac_status"); } &&
16064 { ac_try='test -s "conftest$ac_exeext"'
16065 { (eval echo "$as_me:16065: \"$ac_try\"") >&5
16066 (eval $ac_try) 2>&5
16068 echo "$as_me:16068: \$? = $ac_status" >&5
16069 (exit "$ac_status"); }; }; then
16070 ac_cv_lib_X11_XOpenDisplay=yes
16072 echo "$as_me: failed program was:" >&5
16073 cat "conftest.$ac_ext" >&5
16074 ac_cv_lib_X11_XOpenDisplay=no
16076 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16077 LIBS=$ac_check_lib_save_LIBS
16079 echo "$as_me:16079: result: $ac_cv_lib_X11_XOpenDisplay" >&5
16080 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
16081 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
16083 cf_add_libs="$LIBS"
16086 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16087 # filter duplicates
16088 for cf_add_1lib in $cf_add_0lib; do
16089 for cf_add_2lib in $cf_add_libs; do
16090 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16095 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16097 LIBS="$cf_add_libs"
16101 echo "$as_me:16101: checking for XCurses library" >&5
16102 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
16103 if test "${cf_cv_lib_XCurses+set}" = set; then
16104 echo $ECHO_N "(cached) $ECHO_C" >&6
16107 cf_add_libs="$LIBS"
16110 for cf_add_1lib in -lXCurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16111 # filter duplicates
16112 for cf_add_1lib in $cf_add_0lib; do
16113 for cf_add_2lib in $cf_add_libs; do
16114 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16119 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16121 LIBS="$cf_add_libs"
16123 cat >"conftest.$ac_ext" <<_ACEOF
16124 #line 16124 "configure"
16125 #include "confdefs.h"
16127 #include <xcurses.h>
16128 char *XCursesProgramName = "test";
16138 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16139 if { (eval echo "$as_me:16139: \"$ac_link\"") >&5
16140 (eval $ac_link) 2>&5
16142 echo "$as_me:16142: \$? = $ac_status" >&5
16143 (exit "$ac_status"); } &&
16144 { ac_try='test -s "conftest$ac_exeext"'
16145 { (eval echo "$as_me:16145: \"$ac_try\"") >&5
16146 (eval $ac_try) 2>&5
16148 echo "$as_me:16148: \$? = $ac_status" >&5
16149 (exit "$ac_status"); }; }; then
16150 cf_cv_lib_XCurses=yes
16152 echo "$as_me: failed program was:" >&5
16153 cat "conftest.$ac_ext" >&5
16154 cf_cv_lib_XCurses=no
16156 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16159 echo "$as_me:16159: result: $cf_cv_lib_XCurses" >&5
16160 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
16164 if test "$cf_cv_lib_XCurses" = yes ; then
16166 cat >>confdefs.h <<\EOF
16170 cat >>confdefs.h <<\EOF
16174 echo "$as_me:16174: checking for xcurses.h" >&5
16175 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
16176 if test "${ac_cv_header_xcurses_h+set}" = set; then
16177 echo $ECHO_N "(cached) $ECHO_C" >&6
16179 cat >"conftest.$ac_ext" <<_ACEOF
16180 #line 16180 "configure"
16181 #include "confdefs.h"
16182 #include <xcurses.h>
16184 if { (eval echo "$as_me:16184: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16185 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16187 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16189 cat conftest.err >&5
16190 echo "$as_me:16190: \$? = $ac_status" >&5
16191 (exit "$ac_status"); } >/dev/null; then
16192 if test -s conftest.err; then
16193 ac_cpp_err=$ac_c_preproc_warn_flag
16200 if test -z "$ac_cpp_err"; then
16201 ac_cv_header_xcurses_h=yes
16203 echo "$as_me: failed program was:" >&5
16204 cat "conftest.$ac_ext" >&5
16205 ac_cv_header_xcurses_h=no
16207 rm -f conftest.err "conftest.$ac_ext"
16209 echo "$as_me:16209: result: $ac_cv_header_xcurses_h" >&5
16210 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
16211 if test "$ac_cv_header_xcurses_h" = yes; then
16213 cat >>confdefs.h <<\EOF
16214 #define HAVE_XCURSES 1
16220 { { echo "$as_me:16220: error: Cannot link with XCurses" >&5
16221 echo "$as_me: error: Cannot link with XCurses" >&2;}
16222 { (exit 1); exit 1; }; }
16227 { { echo "$as_me:16227: error: unexpected screen-value: $cf_cv_screen" >&5
16228 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
16229 { (exit 1); exit 1; }; }
16233 : ${cf_nculib_root:=$cf_cv_screen}
16234 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
16235 echo "$as_me:16235: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
16236 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
16237 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16238 echo $ECHO_N "(cached) $ECHO_C" >&6
16240 ac_check_lib_save_LIBS=$LIBS
16241 LIBS="-l$cf_nculib_root $LIBS"
16242 cat >"conftest.$ac_ext" <<_ACEOF
16243 #line 16243 "configure"
16244 #include "confdefs.h"
16246 /* Override any gcc2 internal prototype to avoid an error. */
16250 /* We use char because int might match the return type of a gcc2
16251 builtin and then its argument prototype would still apply. */
16252 char _nc_init_pthreads ();
16256 _nc_init_pthreads ();
16261 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16262 if { (eval echo "$as_me:16262: \"$ac_link\"") >&5
16263 (eval $ac_link) 2>&5
16265 echo "$as_me:16265: \$? = $ac_status" >&5
16266 (exit "$ac_status"); } &&
16267 { ac_try='test -s "conftest$ac_exeext"'
16268 { (eval echo "$as_me:16268: \"$ac_try\"") >&5
16269 (eval $ac_try) 2>&5
16271 echo "$as_me:16271: \$? = $ac_status" >&5
16272 (exit "$ac_status"); }; }; then
16273 eval "$as_ac_Lib=yes"
16275 echo "$as_me: failed program was:" >&5
16276 cat "conftest.$ac_ext" >&5
16277 eval "$as_ac_Lib=no"
16279 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16280 LIBS=$ac_check_lib_save_LIBS
16282 echo "$as_me:16282: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
16283 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
16284 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
16285 cf_cv_ncurses_pthreads=yes
16287 cf_cv_ncurses_pthreads=no
16290 if test "$cf_cv_ncurses_pthreads" = yes
16293 cf_add_libs="$LIBS"
16296 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16297 # filter duplicates
16298 for cf_add_1lib in $cf_add_0lib; do
16299 for cf_add_2lib in $cf_add_libs; do
16300 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16305 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16307 LIBS="$cf_add_libs"
16311 case $cf_cv_screen in
16313 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
16317 echo "$as_me:16317: checking for X11 rgb file" >&5
16318 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
16320 # Check whether --with-x11-rgb or --without-x11-rgb was given.
16321 if test "${with_x11_rgb+set}" = set; then
16322 withval="$with_x11_rgb"
16328 if test "x$RGB_PATH" = xauto
16330 RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
16332 /opt/local/share/X11/rgb.txt \
16333 /opt/X11/share/X11/rgb.txt \
16334 /usr/share/X11/rgb.txt \
16335 /usr/X11/share/X11/rgb.txt \
16336 /usr/X11/lib/X11/rgb.txt \
16337 /usr/lib/X11/rgb.txt \
16339 /usr/pkg/lib/X11/rgb.txt \
16340 /usr/X11R7/lib/X11/rgb.txt \
16341 /usr/X11R6/lib/X11/rgb.txt \
16342 /usr/X11R5/lib/X11/rgb.txt \
16343 /usr/X11R4/lib/X11/rgb.txt \
16344 /usr/local/lib/X11/rgb.txt \
16345 /usr/local/share/X11/rgb.txt \
16346 /usr/lib64/X11/rgb.txt
16348 if test -f "$cf_path" ; then
16349 RGB_PATH="$cf_path"
16356 if test "x$prefix" != xNONE; then
16357 cf_path_syntax="$prefix"
16359 cf_path_syntax="$ac_default_prefix"
16362 case ".$cf_path" in
16363 (.\$\(*\)*|.\'*\'*)
16367 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
16369 (.\$\{*prefix\}*|.\$\{*dir\}*)
16370 eval cf_path="$cf_path"
16371 case ".$cf_path" in
16373 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
16378 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
16381 { { echo "$as_me:16381: error: expected a pathname, not \"$cf_path\"" >&5
16382 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
16383 { (exit 1); exit 1; }; }
16389 echo "$as_me:16389: result: $RGB_PATH" >&5
16390 echo "${ECHO_T}$RGB_PATH" >&6
16392 cat >>confdefs.h <<EOF
16393 #define RGB_PATH "$cf_path"
16397 if test "$RGB_PATH" = no
16404 case $cf_cv_screen in
16406 cf_default_panel=no
16409 cf_default_tinfo=no
16411 (xcurses|bsdcurses)
16412 cf_default_panel=no
16415 cf_default_tinfo=yes
16418 cf_default_panel=yes
16419 cf_default_form=yes
16420 cf_default_menu=yes
16421 cf_default_tinfo=yes
16422 case $cf_cv_screen in
16424 cf_curses_headers="nc_alloc.h nomacros.h term_entry.h"
16430 echo "$as_me:16430: checking for desired basename for form library" >&5
16431 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
16433 # Check whether --with-form-libname or --without-form-libname was given.
16434 if test "${with_form_libname+set}" = set; then
16435 withval="$with_form_libname"
16436 with_lib_basename=$withval
16438 with_lib_basename=form
16440 FORM_NAME="$with_lib_basename"
16442 case "x$FORM_NAME" in
16450 echo "$as_me:16450: result: $FORM_NAME" >&5
16451 echo "${ECHO_T}$FORM_NAME" >&6
16453 echo "$as_me:16453: checking for desired basename for menu library" >&5
16454 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
16456 # Check whether --with-menu-libname or --without-menu-libname was given.
16457 if test "${with_menu_libname+set}" = set; then
16458 withval="$with_menu_libname"
16459 with_lib_basename=$withval
16461 with_lib_basename=menu
16463 MENU_NAME="$with_lib_basename"
16465 case "x$MENU_NAME" in
16473 echo "$as_me:16473: result: $MENU_NAME" >&5
16474 echo "${ECHO_T}$MENU_NAME" >&6
16476 echo "$as_me:16476: checking for desired basename for panel library" >&5
16477 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
16479 # Check whether --with-panel-libname or --without-panel-libname was given.
16480 if test "${with_panel_libname+set}" = set; then
16481 withval="$with_panel_libname"
16482 with_lib_basename=$withval
16484 with_lib_basename=panel
16486 PANEL_NAME="$with_lib_basename"
16488 case "x$PANEL_NAME" in
16496 echo "$as_me:16496: result: $PANEL_NAME" >&5
16497 echo "${ECHO_T}$PANEL_NAME" >&6
16499 echo "$as_me:16499: checking if you want to check for panel functions" >&5
16500 echo $ECHO_N "checking if you want to check for panel functions... $ECHO_C" >&6
16502 # Check whether --enable-panel or --disable-panel was given.
16503 if test "${enable_panel+set}" = set; then
16504 enableval="$enable_panel"
16505 test "$enableval" != no && enableval=yes
16506 if test "$enableval" != "yes" ; then
16509 cf_enable_panel=$cf_default_panel
16513 cf_enable_panel=$cf_default_panel
16516 echo "$as_me:16516: result: $cf_enable_panel" >&5
16517 echo "${ECHO_T}$cf_enable_panel" >&6
16518 if test $cf_enable_panel = yes
16521 cf_have_curses_lib=no
16523 : ${NCURSES_CONFIG_PKG:=none}
16524 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16526 elif test "x${PKG_CONFIG:=none}" != xnone; then
16527 echo "$as_me:16527: checking pkg-config for $PANEL_NAME$cf_cv_libtype" >&5
16528 echo $ECHO_N "checking pkg-config for $PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
16529 if "$PKG_CONFIG" --exists "$PANEL_NAME$cf_cv_libtype" ; then
16530 echo "$as_me:16530: result: yes" >&5
16531 echo "${ECHO_T}yes" >&6
16533 echo "$as_me:16533: checking if the $PANEL_NAME$cf_cv_libtype package files work" >&5
16534 echo $ECHO_N "checking if the $PANEL_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
16536 cf_save_CPPFLAGS="$CPPFLAGS"
16537 cf_save_LIBS="$LIBS"
16542 cf_new_extra_cppflags=
16544 for cf_add_cflags in `$PKG_CONFIG --cflags "$PANEL_NAME$cf_cv_libtype"`
16546 case "$cf_fix_cppflags" in
16548 case "$cf_add_cflags" in
16549 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16550 case "$cf_add_cflags" in
16552 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16554 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16555 && test -z "${cf_tst_cflags}" \
16556 && cf_fix_cppflags=yes
16558 if test "$cf_fix_cppflags" = yes ; then
16560 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16561 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16564 elif test "${cf_tst_cflags}" = "\"'" ; then
16566 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16567 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16573 case "$CPPFLAGS" in
16577 case "$cf_add_cflags" in
16579 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16581 CPPFLAGS=`echo "$CPPFLAGS" | \
16582 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16583 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16588 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16589 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16596 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16597 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16604 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16605 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16607 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16609 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16610 && test -z "${cf_tst_cflags}" \
16611 && cf_fix_cppflags=no
16616 if test -n "$cf_new_cflags" ; then
16618 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16619 CFLAGS="${CFLAGS}$cf_new_cflags"
16623 if test -n "$cf_new_cppflags" ; then
16625 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16626 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16630 if test -n "$cf_new_extra_cppflags" ; then
16632 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16633 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16637 cf_add_libs="$LIBS"
16640 for cf_add_1lib in `$PKG_CONFIG --libs "$PANEL_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16641 # filter duplicates
16642 for cf_add_1lib in $cf_add_0lib; do
16643 for cf_add_2lib in $cf_add_libs; do
16644 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16649 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16651 LIBS="$cf_add_libs"
16653 cat >"conftest.$ac_ext" <<_ACEOF
16654 #line 16654 "configure"
16655 #include "confdefs.h"
16656 #include <$PANEL_NAME.h>
16660 (void) new_panel ( 0 );
16665 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16666 if { (eval echo "$as_me:16666: \"$ac_link\"") >&5
16667 (eval $ac_link) 2>&5
16669 echo "$as_me:16669: \$? = $ac_status" >&5
16670 (exit "$ac_status"); } &&
16671 { ac_try='test -s "conftest$ac_exeext"'
16672 { (eval echo "$as_me:16672: \"$ac_try\"") >&5
16673 (eval $ac_try) 2>&5
16675 echo "$as_me:16675: \$? = $ac_status" >&5
16676 (exit "$ac_status"); }; }; then
16677 if test "$cross_compiling" = yes; then
16678 cf_have_curses_lib=maybe
16680 cat >"conftest.$ac_ext" <<_ACEOF
16681 #line 16681 "configure"
16682 #include "confdefs.h"
16683 #include <$PANEL_NAME.h>
16685 { (void) new_panel ( 0 ); return 0; }
16687 rm -f "conftest$ac_exeext"
16688 if { (eval echo "$as_me:16688: \"$ac_link\"") >&5
16689 (eval $ac_link) 2>&5
16691 echo "$as_me:16691: \$? = $ac_status" >&5
16692 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16693 { (eval echo "$as_me:16693: \"$ac_try\"") >&5
16694 (eval $ac_try) 2>&5
16696 echo "$as_me:16696: \$? = $ac_status" >&5
16697 (exit "$ac_status"); }; }; then
16698 cf_have_curses_lib=yes
16700 echo "$as_me: program exited with status $ac_status" >&5
16701 echo "$as_me: failed program was:" >&5
16702 cat "conftest.$ac_ext" >&5
16703 cf_have_curses_lib=no
16705 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16708 echo "$as_me: failed program was:" >&5
16709 cat "conftest.$ac_ext" >&5
16710 cf_have_curses_lib=no
16712 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16713 echo "$as_me:16713: result: $cf_have_curses_lib" >&5
16714 echo "${ECHO_T}$cf_have_curses_lib" >&6
16715 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
16716 if test "$cf_have_curses_lib" != "yes"
16718 CPPFLAGS="$cf_save_CPPFLAGS"
16719 LIBS="$cf_save_LIBS"
16722 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16724 cat >>confdefs.h <<EOF
16725 #define $cf_upper 1
16731 if test "$cf_have_curses_lib" = no; then
16732 as_ac_Lib=`echo "ac_cv_lib_$PANEL_NAME$cf_cv_libtype''_new_panel" | $as_tr_sh`
16733 echo "$as_me:16733: checking for new_panel in -l$PANEL_NAME$cf_cv_libtype" >&5
16734 echo $ECHO_N "checking for new_panel in -l$PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
16735 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16736 echo $ECHO_N "(cached) $ECHO_C" >&6
16738 ac_check_lib_save_LIBS=$LIBS
16739 LIBS="-l$PANEL_NAME$cf_cv_libtype $LIBS"
16740 cat >"conftest.$ac_ext" <<_ACEOF
16741 #line 16741 "configure"
16742 #include "confdefs.h"
16744 /* Override any gcc2 internal prototype to avoid an error. */
16748 /* We use char because int might match the return type of a gcc2
16749 builtin and then its argument prototype would still apply. */
16759 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16760 if { (eval echo "$as_me:16760: \"$ac_link\"") >&5
16761 (eval $ac_link) 2>&5
16763 echo "$as_me:16763: \$? = $ac_status" >&5
16764 (exit "$ac_status"); } &&
16765 { ac_try='test -s "conftest$ac_exeext"'
16766 { (eval echo "$as_me:16766: \"$ac_try\"") >&5
16767 (eval $ac_try) 2>&5
16769 echo "$as_me:16769: \$? = $ac_status" >&5
16770 (exit "$ac_status"); }; }; then
16771 eval "$as_ac_Lib=yes"
16773 echo "$as_me: failed program was:" >&5
16774 cat "conftest.$ac_ext" >&5
16775 eval "$as_ac_Lib=no"
16777 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16778 LIBS=$ac_check_lib_save_LIBS
16780 echo "$as_me:16780: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
16781 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
16782 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
16784 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16786 cf_add_libs="$LIBS"
16789 for cf_add_1lib in -l$PANEL_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16790 # filter duplicates
16791 for cf_add_1lib in $cf_add_0lib; do
16792 for cf_add_2lib in $cf_add_libs; do
16793 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16798 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16800 LIBS="$cf_add_libs"
16802 cat >>confdefs.h <<EOF
16803 #define $cf_upper 1
16810 cf_curses_headers="$cf_curses_headers panel.h"
16813 echo "$as_me:16813: checking if you want to check for menu functions" >&5
16814 echo $ECHO_N "checking if you want to check for menu functions... $ECHO_C" >&6
16816 # Check whether --enable-menu or --disable-menu was given.
16817 if test "${enable_menu+set}" = set; then
16818 enableval="$enable_menu"
16819 test "$enableval" != no && enableval=yes
16820 if test "$enableval" != "yes" ; then
16823 cf_enable_menu=$cf_default_menu
16827 cf_enable_menu=$cf_default_menu
16830 echo "$as_me:16830: result: $cf_enable_menu" >&5
16831 echo "${ECHO_T}$cf_enable_menu" >&6
16832 if test $cf_enable_menu = yes
16834 case $cf_cv_screen in
16839 echo "$as_me:16839: checking for NetBSD menu.h" >&5
16840 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
16841 if test "${cf_cv_netbsd_menu_h+set}" = set; then
16842 echo $ECHO_N "(cached) $ECHO_C" >&6
16845 cat >"conftest.$ac_ext" <<_ACEOF
16846 #line 16846 "configure"
16847 #include "confdefs.h"
16849 #include <${cf_cv_ncurses_header:-curses.h}>
16857 int y = menu->max_item_width;
16863 rm -f "conftest.$ac_objext"
16864 if { (eval echo "$as_me:16864: \"$ac_compile\"") >&5
16865 (eval $ac_compile) 2>&5
16867 echo "$as_me:16867: \$? = $ac_status" >&5
16868 (exit "$ac_status"); } &&
16869 { ac_try='test -s "conftest.$ac_objext"'
16870 { (eval echo "$as_me:16870: \"$ac_try\"") >&5
16871 (eval $ac_try) 2>&5
16873 echo "$as_me:16873: \$? = $ac_status" >&5
16874 (exit "$ac_status"); }; }; then
16875 cf_cv_netbsd_menu_h=yes
16878 echo "$as_me: failed program was:" >&5
16879 cat "conftest.$ac_ext" >&5
16880 cf_cv_netbsd_menu_h=no
16882 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16885 echo "$as_me:16885: result: $cf_cv_netbsd_menu_h" >&5
16886 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
16888 test "$cf_cv_netbsd_menu_h" = yes &&
16889 cat >>confdefs.h <<\EOF
16890 #define HAVE_NETBSD_MENU_H 1
16896 cf_have_curses_lib=no
16898 : ${NCURSES_CONFIG_PKG:=none}
16899 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16901 elif test "x${PKG_CONFIG:=none}" != xnone; then
16902 echo "$as_me:16902: checking pkg-config for $MENU_NAME$cf_cv_libtype" >&5
16903 echo $ECHO_N "checking pkg-config for $MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
16904 if "$PKG_CONFIG" --exists "$MENU_NAME$cf_cv_libtype" ; then
16905 echo "$as_me:16905: result: yes" >&5
16906 echo "${ECHO_T}yes" >&6
16908 echo "$as_me:16908: checking if the $MENU_NAME$cf_cv_libtype package files work" >&5
16909 echo $ECHO_N "checking if the $MENU_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
16911 cf_save_CPPFLAGS="$CPPFLAGS"
16912 cf_save_LIBS="$LIBS"
16917 cf_new_extra_cppflags=
16919 for cf_add_cflags in `$PKG_CONFIG --cflags "$MENU_NAME$cf_cv_libtype"`
16921 case "$cf_fix_cppflags" in
16923 case "$cf_add_cflags" in
16924 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16925 case "$cf_add_cflags" in
16927 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16929 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16930 && test -z "${cf_tst_cflags}" \
16931 && cf_fix_cppflags=yes
16933 if test "$cf_fix_cppflags" = yes ; then
16935 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16936 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16939 elif test "${cf_tst_cflags}" = "\"'" ; then
16941 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16942 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16948 case "$CPPFLAGS" in
16952 case "$cf_add_cflags" in
16954 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16956 CPPFLAGS=`echo "$CPPFLAGS" | \
16957 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16958 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16963 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16964 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16971 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16972 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16979 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16980 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16982 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16984 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16985 && test -z "${cf_tst_cflags}" \
16986 && cf_fix_cppflags=no
16991 if test -n "$cf_new_cflags" ; then
16993 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16994 CFLAGS="${CFLAGS}$cf_new_cflags"
16998 if test -n "$cf_new_cppflags" ; then
17000 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17001 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17005 if test -n "$cf_new_extra_cppflags" ; then
17007 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17008 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17012 cf_add_libs="$LIBS"
17015 for cf_add_1lib in `$PKG_CONFIG --libs "$MENU_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17016 # filter duplicates
17017 for cf_add_1lib in $cf_add_0lib; do
17018 for cf_add_2lib in $cf_add_libs; do
17019 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17024 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17026 LIBS="$cf_add_libs"
17028 cat >"conftest.$ac_ext" <<_ACEOF
17029 #line 17029 "configure"
17030 #include "confdefs.h"
17031 #include <$MENU_NAME.h>
17035 (void) menu_driver ( 0,0 );
17040 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17041 if { (eval echo "$as_me:17041: \"$ac_link\"") >&5
17042 (eval $ac_link) 2>&5
17044 echo "$as_me:17044: \$? = $ac_status" >&5
17045 (exit "$ac_status"); } &&
17046 { ac_try='test -s "conftest$ac_exeext"'
17047 { (eval echo "$as_me:17047: \"$ac_try\"") >&5
17048 (eval $ac_try) 2>&5
17050 echo "$as_me:17050: \$? = $ac_status" >&5
17051 (exit "$ac_status"); }; }; then
17052 if test "$cross_compiling" = yes; then
17053 cf_have_curses_lib=maybe
17055 cat >"conftest.$ac_ext" <<_ACEOF
17056 #line 17056 "configure"
17057 #include "confdefs.h"
17058 #include <$MENU_NAME.h>
17060 { (void) menu_driver ( 0,0 ); return 0; }
17062 rm -f "conftest$ac_exeext"
17063 if { (eval echo "$as_me:17063: \"$ac_link\"") >&5
17064 (eval $ac_link) 2>&5
17066 echo "$as_me:17066: \$? = $ac_status" >&5
17067 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17068 { (eval echo "$as_me:17068: \"$ac_try\"") >&5
17069 (eval $ac_try) 2>&5
17071 echo "$as_me:17071: \$? = $ac_status" >&5
17072 (exit "$ac_status"); }; }; then
17073 cf_have_curses_lib=yes
17075 echo "$as_me: program exited with status $ac_status" >&5
17076 echo "$as_me: failed program was:" >&5
17077 cat "conftest.$ac_ext" >&5
17078 cf_have_curses_lib=no
17080 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17083 echo "$as_me: failed program was:" >&5
17084 cat "conftest.$ac_ext" >&5
17085 cf_have_curses_lib=no
17087 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17088 echo "$as_me:17088: result: $cf_have_curses_lib" >&5
17089 echo "${ECHO_T}$cf_have_curses_lib" >&6
17090 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17091 if test "$cf_have_curses_lib" != "yes"
17093 CPPFLAGS="$cf_save_CPPFLAGS"
17094 LIBS="$cf_save_LIBS"
17097 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17099 cat >>confdefs.h <<EOF
17100 #define $cf_upper 1
17106 if test "$cf_have_curses_lib" = no; then
17107 as_ac_Lib=`echo "ac_cv_lib_$MENU_NAME$cf_cv_libtype''_menu_driver" | $as_tr_sh`
17108 echo "$as_me:17108: checking for menu_driver in -l$MENU_NAME$cf_cv_libtype" >&5
17109 echo $ECHO_N "checking for menu_driver in -l$MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
17110 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17111 echo $ECHO_N "(cached) $ECHO_C" >&6
17113 ac_check_lib_save_LIBS=$LIBS
17114 LIBS="-l$MENU_NAME$cf_cv_libtype $LIBS"
17115 cat >"conftest.$ac_ext" <<_ACEOF
17116 #line 17116 "configure"
17117 #include "confdefs.h"
17119 /* Override any gcc2 internal prototype to avoid an error. */
17123 /* We use char because int might match the return type of a gcc2
17124 builtin and then its argument prototype would still apply. */
17125 char menu_driver ();
17134 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17135 if { (eval echo "$as_me:17135: \"$ac_link\"") >&5
17136 (eval $ac_link) 2>&5
17138 echo "$as_me:17138: \$? = $ac_status" >&5
17139 (exit "$ac_status"); } &&
17140 { ac_try='test -s "conftest$ac_exeext"'
17141 { (eval echo "$as_me:17141: \"$ac_try\"") >&5
17142 (eval $ac_try) 2>&5
17144 echo "$as_me:17144: \$? = $ac_status" >&5
17145 (exit "$ac_status"); }; }; then
17146 eval "$as_ac_Lib=yes"
17148 echo "$as_me: failed program was:" >&5
17149 cat "conftest.$ac_ext" >&5
17150 eval "$as_ac_Lib=no"
17152 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17153 LIBS=$ac_check_lib_save_LIBS
17155 echo "$as_me:17155: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
17156 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
17157 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
17159 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17161 cf_add_libs="$LIBS"
17164 for cf_add_1lib in -l$MENU_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17165 # filter duplicates
17166 for cf_add_1lib in $cf_add_0lib; do
17167 for cf_add_2lib in $cf_add_libs; do
17168 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17173 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17175 LIBS="$cf_add_libs"
17177 cat >>confdefs.h <<EOF
17178 #define $cf_upper 1
17185 cf_curses_headers="$cf_curses_headers menu.h"
17188 echo "$as_me:17188: checking if you want to check for form functions" >&5
17189 echo $ECHO_N "checking if you want to check for form functions... $ECHO_C" >&6
17191 # Check whether --enable-form or --disable-form was given.
17192 if test "${enable_form+set}" = set; then
17193 enableval="$enable_form"
17194 test "$enableval" != no && enableval=yes
17195 if test "$enableval" != "yes" ; then
17198 cf_enable_form=$cf_default_form
17202 cf_enable_form=$cf_default_form
17205 echo "$as_me:17205: result: $cf_enable_form" >&5
17206 echo "${ECHO_T}$cf_enable_form" >&6
17207 if test $cf_enable_form = yes
17209 case $cf_cv_screen in
17214 echo "$as_me:17214: checking for NetBSD form.h" >&5
17215 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
17216 if test "${cf_cv_netbsd_form_h+set}" = set; then
17217 echo $ECHO_N "(cached) $ECHO_C" >&6
17220 cat >"conftest.$ac_ext" <<_ACEOF
17221 #line 17221 "configure"
17222 #include "confdefs.h"
17224 #include <${cf_cv_ncurses_header:-curses.h}>
17232 int y = current_field(form)->cursor_ypos;
17233 int x = current_field(form)->cursor_xpos;
17239 rm -f "conftest.$ac_objext"
17240 if { (eval echo "$as_me:17240: \"$ac_compile\"") >&5
17241 (eval $ac_compile) 2>&5
17243 echo "$as_me:17243: \$? = $ac_status" >&5
17244 (exit "$ac_status"); } &&
17245 { ac_try='test -s "conftest.$ac_objext"'
17246 { (eval echo "$as_me:17246: \"$ac_try\"") >&5
17247 (eval $ac_try) 2>&5
17249 echo "$as_me:17249: \$? = $ac_status" >&5
17250 (exit "$ac_status"); }; }; then
17251 cf_cv_netbsd_form_h=yes
17254 echo "$as_me: failed program was:" >&5
17255 cat "conftest.$ac_ext" >&5
17256 cf_cv_netbsd_form_h=no
17258 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17261 echo "$as_me:17261: result: $cf_cv_netbsd_form_h" >&5
17262 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
17264 test "$cf_cv_netbsd_form_h" = yes &&
17265 cat >>confdefs.h <<\EOF
17266 #define HAVE_NETBSD_FORM_H 1
17272 cf_have_curses_lib=no
17274 : ${NCURSES_CONFIG_PKG:=none}
17275 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
17277 elif test "x${PKG_CONFIG:=none}" != xnone; then
17278 echo "$as_me:17278: checking pkg-config for $FORM_NAME$cf_cv_libtype" >&5
17279 echo $ECHO_N "checking pkg-config for $FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
17280 if "$PKG_CONFIG" --exists "$FORM_NAME$cf_cv_libtype" ; then
17281 echo "$as_me:17281: result: yes" >&5
17282 echo "${ECHO_T}yes" >&6
17284 echo "$as_me:17284: checking if the $FORM_NAME$cf_cv_libtype package files work" >&5
17285 echo $ECHO_N "checking if the $FORM_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
17287 cf_save_CPPFLAGS="$CPPFLAGS"
17288 cf_save_LIBS="$LIBS"
17293 cf_new_extra_cppflags=
17295 for cf_add_cflags in `$PKG_CONFIG --cflags "$FORM_NAME$cf_cv_libtype"`
17297 case "$cf_fix_cppflags" in
17299 case "$cf_add_cflags" in
17300 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17301 case "$cf_add_cflags" in
17303 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17305 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17306 && test -z "${cf_tst_cflags}" \
17307 && cf_fix_cppflags=yes
17309 if test "$cf_fix_cppflags" = yes ; then
17311 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17312 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17315 elif test "${cf_tst_cflags}" = "\"'" ; then
17317 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17318 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17324 case "$CPPFLAGS" in
17328 case "$cf_add_cflags" in
17330 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17332 CPPFLAGS=`echo "$CPPFLAGS" | \
17333 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17334 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17339 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17340 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17347 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17348 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17355 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17356 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17358 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17360 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17361 && test -z "${cf_tst_cflags}" \
17362 && cf_fix_cppflags=no
17367 if test -n "$cf_new_cflags" ; then
17369 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17370 CFLAGS="${CFLAGS}$cf_new_cflags"
17374 if test -n "$cf_new_cppflags" ; then
17376 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17377 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17381 if test -n "$cf_new_extra_cppflags" ; then
17383 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17384 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17388 cf_add_libs="$LIBS"
17391 for cf_add_1lib in `$PKG_CONFIG --libs "$FORM_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17392 # filter duplicates
17393 for cf_add_1lib in $cf_add_0lib; do
17394 for cf_add_2lib in $cf_add_libs; do
17395 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17400 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17402 LIBS="$cf_add_libs"
17404 cat >"conftest.$ac_ext" <<_ACEOF
17405 #line 17405 "configure"
17406 #include "confdefs.h"
17407 #include <$FORM_NAME.h>
17411 (void) form_driver ( 0,0 );
17416 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17417 if { (eval echo "$as_me:17417: \"$ac_link\"") >&5
17418 (eval $ac_link) 2>&5
17420 echo "$as_me:17420: \$? = $ac_status" >&5
17421 (exit "$ac_status"); } &&
17422 { ac_try='test -s "conftest$ac_exeext"'
17423 { (eval echo "$as_me:17423: \"$ac_try\"") >&5
17424 (eval $ac_try) 2>&5
17426 echo "$as_me:17426: \$? = $ac_status" >&5
17427 (exit "$ac_status"); }; }; then
17428 if test "$cross_compiling" = yes; then
17429 cf_have_curses_lib=maybe
17431 cat >"conftest.$ac_ext" <<_ACEOF
17432 #line 17432 "configure"
17433 #include "confdefs.h"
17434 #include <$FORM_NAME.h>
17436 { (void) form_driver ( 0,0 ); return 0; }
17438 rm -f "conftest$ac_exeext"
17439 if { (eval echo "$as_me:17439: \"$ac_link\"") >&5
17440 (eval $ac_link) 2>&5
17442 echo "$as_me:17442: \$? = $ac_status" >&5
17443 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17444 { (eval echo "$as_me:17444: \"$ac_try\"") >&5
17445 (eval $ac_try) 2>&5
17447 echo "$as_me:17447: \$? = $ac_status" >&5
17448 (exit "$ac_status"); }; }; then
17449 cf_have_curses_lib=yes
17451 echo "$as_me: program exited with status $ac_status" >&5
17452 echo "$as_me: failed program was:" >&5
17453 cat "conftest.$ac_ext" >&5
17454 cf_have_curses_lib=no
17456 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17459 echo "$as_me: failed program was:" >&5
17460 cat "conftest.$ac_ext" >&5
17461 cf_have_curses_lib=no
17463 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17464 echo "$as_me:17464: result: $cf_have_curses_lib" >&5
17465 echo "${ECHO_T}$cf_have_curses_lib" >&6
17466 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17467 if test "$cf_have_curses_lib" != "yes"
17469 CPPFLAGS="$cf_save_CPPFLAGS"
17470 LIBS="$cf_save_LIBS"
17473 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17475 cat >>confdefs.h <<EOF
17476 #define $cf_upper 1
17482 if test "$cf_have_curses_lib" = no; then
17483 as_ac_Lib=`echo "ac_cv_lib_$FORM_NAME$cf_cv_libtype''_form_driver" | $as_tr_sh`
17484 echo "$as_me:17484: checking for form_driver in -l$FORM_NAME$cf_cv_libtype" >&5
17485 echo $ECHO_N "checking for form_driver in -l$FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
17486 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17487 echo $ECHO_N "(cached) $ECHO_C" >&6
17489 ac_check_lib_save_LIBS=$LIBS
17490 LIBS="-l$FORM_NAME$cf_cv_libtype $LIBS"
17491 cat >"conftest.$ac_ext" <<_ACEOF
17492 #line 17492 "configure"
17493 #include "confdefs.h"
17495 /* Override any gcc2 internal prototype to avoid an error. */
17499 /* We use char because int might match the return type of a gcc2
17500 builtin and then its argument prototype would still apply. */
17501 char form_driver ();
17510 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17511 if { (eval echo "$as_me:17511: \"$ac_link\"") >&5
17512 (eval $ac_link) 2>&5
17514 echo "$as_me:17514: \$? = $ac_status" >&5
17515 (exit "$ac_status"); } &&
17516 { ac_try='test -s "conftest$ac_exeext"'
17517 { (eval echo "$as_me:17517: \"$ac_try\"") >&5
17518 (eval $ac_try) 2>&5
17520 echo "$as_me:17520: \$? = $ac_status" >&5
17521 (exit "$ac_status"); }; }; then
17522 eval "$as_ac_Lib=yes"
17524 echo "$as_me: failed program was:" >&5
17525 cat "conftest.$ac_ext" >&5
17526 eval "$as_ac_Lib=no"
17528 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17529 LIBS=$ac_check_lib_save_LIBS
17531 echo "$as_me:17531: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
17532 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
17533 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
17535 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17537 cf_add_libs="$LIBS"
17540 for cf_add_1lib in -l$FORM_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17541 # filter duplicates
17542 for cf_add_1lib in $cf_add_0lib; do
17543 for cf_add_2lib in $cf_add_libs; do
17544 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17549 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17551 LIBS="$cf_add_libs"
17553 cat >>confdefs.h <<EOF
17554 #define $cf_upper 1
17561 cf_curses_headers="$cf_curses_headers form.h"
17564 # look for curses-related headers
17566 for ac_header in $cf_curses_headers
17568 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17569 echo "$as_me:17569: checking for $ac_header" >&5
17570 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17571 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17572 echo $ECHO_N "(cached) $ECHO_C" >&6
17574 cat >"conftest.$ac_ext" <<_ACEOF
17575 #line 17575 "configure"
17576 #include "confdefs.h"
17577 #include <$ac_header>
17579 if { (eval echo "$as_me:17579: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17580 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17582 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17584 cat conftest.err >&5
17585 echo "$as_me:17585: \$? = $ac_status" >&5
17586 (exit "$ac_status"); } >/dev/null; then
17587 if test -s conftest.err; then
17588 ac_cpp_err=$ac_c_preproc_warn_flag
17595 if test -z "$ac_cpp_err"; then
17596 eval "$as_ac_Header=yes"
17598 echo "$as_me: failed program was:" >&5
17599 cat "conftest.$ac_ext" >&5
17600 eval "$as_ac_Header=no"
17602 rm -f conftest.err "conftest.$ac_ext"
17604 echo "$as_me:17604: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17605 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17606 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17607 cat >>confdefs.h <<EOF
17608 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17614 echo "$as_me:17614: checking for ANSI C header files" >&5
17615 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
17616 if test "${ac_cv_header_stdc+set}" = set; then
17617 echo $ECHO_N "(cached) $ECHO_C" >&6
17619 cat >"conftest.$ac_ext" <<_ACEOF
17620 #line 17620 "configure"
17621 #include "confdefs.h"
17622 #include <stdlib.h>
17623 #include <stdarg.h>
17624 #include <string.h>
17628 if { (eval echo "$as_me:17628: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17629 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17631 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17633 cat conftest.err >&5
17634 echo "$as_me:17634: \$? = $ac_status" >&5
17635 (exit "$ac_status"); } >/dev/null; then
17636 if test -s conftest.err; then
17637 ac_cpp_err=$ac_c_preproc_warn_flag
17644 if test -z "$ac_cpp_err"; then
17645 ac_cv_header_stdc=yes
17647 echo "$as_me: failed program was:" >&5
17648 cat "conftest.$ac_ext" >&5
17649 ac_cv_header_stdc=no
17651 rm -f conftest.err "conftest.$ac_ext"
17653 if test $ac_cv_header_stdc = yes; then
17654 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
17655 cat >"conftest.$ac_ext" <<_ACEOF
17656 #line 17656 "configure"
17657 #include "confdefs.h"
17658 #include <string.h>
17661 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17662 $EGREP "memchr" >/dev/null 2>&1; then
17665 ac_cv_header_stdc=no
17671 if test $ac_cv_header_stdc = yes; then
17672 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
17673 cat >"conftest.$ac_ext" <<_ACEOF
17674 #line 17674 "configure"
17675 #include "confdefs.h"
17676 #include <stdlib.h>
17679 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17680 $EGREP "free" >/dev/null 2>&1; then
17683 ac_cv_header_stdc=no
17689 if test $ac_cv_header_stdc = yes; then
17690 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
17691 if test "$cross_compiling" = yes; then
17694 cat >"conftest.$ac_ext" <<_ACEOF
17695 #line 17695 "configure"
17696 #include "confdefs.h"
17698 #if ((' ' & 0x0FF) == 0x020)
17699 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
17700 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
17702 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
17703 || ('j' <= (c) && (c) <= 'r') \
17704 || ('s' <= (c) && (c) <= 'z'))
17705 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
17708 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
17713 for (i = 0; i < 256; i++)
17714 if (XOR (islower (i), ISLOWER (i))
17715 || toupper (i) != TOUPPER (i))
17716 $ac_main_return(2);
17717 $ac_main_return (0);
17720 rm -f "conftest$ac_exeext"
17721 if { (eval echo "$as_me:17721: \"$ac_link\"") >&5
17722 (eval $ac_link) 2>&5
17724 echo "$as_me:17724: \$? = $ac_status" >&5
17725 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17726 { (eval echo "$as_me:17726: \"$ac_try\"") >&5
17727 (eval $ac_try) 2>&5
17729 echo "$as_me:17729: \$? = $ac_status" >&5
17730 (exit "$ac_status"); }; }; then
17733 echo "$as_me: program exited with status $ac_status" >&5
17734 echo "$as_me: failed program was:" >&5
17735 cat "conftest.$ac_ext" >&5
17736 ac_cv_header_stdc=no
17738 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17742 echo "$as_me:17742: result: $ac_cv_header_stdc" >&5
17743 echo "${ECHO_T}$ac_cv_header_stdc" >&6
17744 if test $ac_cv_header_stdc = yes; then
17746 cat >>confdefs.h <<\EOF
17747 #define STDC_HEADERS 1
17752 echo "$as_me:17752: checking whether time.h and sys/time.h may both be included" >&5
17753 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17754 if test "${ac_cv_header_time+set}" = set; then
17755 echo $ECHO_N "(cached) $ECHO_C" >&6
17757 cat >"conftest.$ac_ext" <<_ACEOF
17758 #line 17758 "configure"
17759 #include "confdefs.h"
17760 #include <sys/types.h>
17761 #include <sys/time.h>
17767 if ((struct tm *) 0)
17773 rm -f "conftest.$ac_objext"
17774 if { (eval echo "$as_me:17774: \"$ac_compile\"") >&5
17775 (eval $ac_compile) 2>&5
17777 echo "$as_me:17777: \$? = $ac_status" >&5
17778 (exit "$ac_status"); } &&
17779 { ac_try='test -s "conftest.$ac_objext"'
17780 { (eval echo "$as_me:17780: \"$ac_try\"") >&5
17781 (eval $ac_try) 2>&5
17783 echo "$as_me:17783: \$? = $ac_status" >&5
17784 (exit "$ac_status"); }; }; then
17785 ac_cv_header_time=yes
17787 echo "$as_me: failed program was:" >&5
17788 cat "conftest.$ac_ext" >&5
17789 ac_cv_header_time=no
17791 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17793 echo "$as_me:17793: result: $ac_cv_header_time" >&5
17794 echo "${ECHO_T}$ac_cv_header_time" >&6
17795 if test $ac_cv_header_time = yes; then
17797 cat >>confdefs.h <<\EOF
17798 #define TIME_WITH_SYS_TIME 1
17816 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17817 echo "$as_me:17817: checking for $ac_header" >&5
17818 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17819 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17820 echo $ECHO_N "(cached) $ECHO_C" >&6
17822 cat >"conftest.$ac_ext" <<_ACEOF
17823 #line 17823 "configure"
17824 #include "confdefs.h"
17825 #include <$ac_header>
17827 if { (eval echo "$as_me:17827: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17828 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17830 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17832 cat conftest.err >&5
17833 echo "$as_me:17833: \$? = $ac_status" >&5
17834 (exit "$ac_status"); } >/dev/null; then
17835 if test -s conftest.err; then
17836 ac_cpp_err=$ac_c_preproc_warn_flag
17843 if test -z "$ac_cpp_err"; then
17844 eval "$as_ac_Header=yes"
17846 echo "$as_me: failed program was:" >&5
17847 cat "conftest.$ac_ext" >&5
17848 eval "$as_ac_Header=no"
17850 rm -f conftest.err "conftest.$ac_ext"
17852 echo "$as_me:17852: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17853 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17854 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17855 cat >>confdefs.h <<EOF
17856 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17862 for ac_header in unistd.h getopt.h
17864 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17865 echo "$as_me:17865: checking for $ac_header" >&5
17866 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17867 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17868 echo $ECHO_N "(cached) $ECHO_C" >&6
17870 cat >"conftest.$ac_ext" <<_ACEOF
17871 #line 17871 "configure"
17872 #include "confdefs.h"
17873 #include <$ac_header>
17875 if { (eval echo "$as_me:17875: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17876 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17878 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17880 cat conftest.err >&5
17881 echo "$as_me:17881: \$? = $ac_status" >&5
17882 (exit "$ac_status"); } >/dev/null; then
17883 if test -s conftest.err; then
17884 ac_cpp_err=$ac_c_preproc_warn_flag
17891 if test -z "$ac_cpp_err"; then
17892 eval "$as_ac_Header=yes"
17894 echo "$as_me: failed program was:" >&5
17895 cat "conftest.$ac_ext" >&5
17896 eval "$as_ac_Header=no"
17898 rm -f conftest.err "conftest.$ac_ext"
17900 echo "$as_me:17900: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17901 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17902 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17903 cat >>confdefs.h <<EOF
17904 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17910 echo "$as_me:17910: checking for header declaring getopt variables" >&5
17911 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
17912 if test "${cf_cv_getopt_header+set}" = set; then
17913 echo $ECHO_N "(cached) $ECHO_C" >&6
17916 cf_cv_getopt_header=none
17917 for cf_header in stdio.h stdlib.h unistd.h getopt.h
17919 cat >"conftest.$ac_ext" <<_ACEOF
17920 #line 17920 "configure"
17921 #include "confdefs.h"
17923 #include <$cf_header>
17927 int x = optind; char *y = optarg
17932 rm -f "conftest.$ac_objext"
17933 if { (eval echo "$as_me:17933: \"$ac_compile\"") >&5
17934 (eval $ac_compile) 2>&5
17936 echo "$as_me:17936: \$? = $ac_status" >&5
17937 (exit "$ac_status"); } &&
17938 { ac_try='test -s "conftest.$ac_objext"'
17939 { (eval echo "$as_me:17939: \"$ac_try\"") >&5
17940 (eval $ac_try) 2>&5
17942 echo "$as_me:17942: \$? = $ac_status" >&5
17943 (exit "$ac_status"); }; }; then
17944 cf_cv_getopt_header=$cf_header
17947 echo "$as_me: failed program was:" >&5
17948 cat "conftest.$ac_ext" >&5
17950 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17954 echo "$as_me:17954: result: $cf_cv_getopt_header" >&5
17955 echo "${ECHO_T}$cf_cv_getopt_header" >&6
17956 if test "$cf_cv_getopt_header" != none ; then
17958 cat >>confdefs.h <<\EOF
17959 #define HAVE_GETOPT_HEADER 1
17963 if test "$cf_cv_getopt_header" = getopt.h ; then
17965 cat >>confdefs.h <<\EOF
17966 #define NEED_GETOPT_H 1
17980 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17981 echo "$as_me:17981: checking for $ac_func" >&5
17982 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17983 if eval "test \"\${$as_ac_var+set}\" = set"; then
17984 echo $ECHO_N "(cached) $ECHO_C" >&6
17986 cat >"conftest.$ac_ext" <<_ACEOF
17987 #line 17987 "configure"
17988 #include "confdefs.h"
17989 #define $ac_func autoconf_temporary
17990 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17997 /* We use char because int might match the return type of a gcc2
17998 builtin and then its argument prototype would still apply. */
17999 char $ac_func (void);
18005 /* The GNU C library defines stubs for functions which it implements
18006 to always fail with ENOSYS. Some functions are actually named
18007 something starting with __ and the normal name is an alias. */
18008 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18009 #error found stub for $ac_func
18012 return $ac_func ();
18017 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18018 if { (eval echo "$as_me:18018: \"$ac_link\"") >&5
18019 (eval $ac_link) 2>&5
18021 echo "$as_me:18021: \$? = $ac_status" >&5
18022 (exit "$ac_status"); } &&
18023 { ac_try='test -s "conftest$ac_exeext"'
18024 { (eval echo "$as_me:18024: \"$ac_try\"") >&5
18025 (eval $ac_try) 2>&5
18027 echo "$as_me:18027: \$? = $ac_status" >&5
18028 (exit "$ac_status"); }; }; then
18029 eval "$as_ac_var=yes"
18031 echo "$as_me: failed program was:" >&5
18032 cat "conftest.$ac_ext" >&5
18033 eval "$as_ac_var=no"
18035 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18037 echo "$as_me:18037: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18038 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18039 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18040 cat >>confdefs.h <<EOF
18041 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18047 # use a compile-check to work with ncurses*-config and subdirectory includes
18048 echo "$as_me:18048: checking if we can use termcap.h" >&5
18049 echo $ECHO_N "checking if we can use termcap.h... $ECHO_C" >&6
18050 if test "${cf_cv_have_termcap_h+set}" = set; then
18051 echo $ECHO_N "(cached) $ECHO_C" >&6
18054 cat >"conftest.$ac_ext" <<_ACEOF
18055 #line 18055 "configure"
18056 #include "confdefs.h"
18058 #include <curses.h>
18059 #ifdef NCURSES_VERSION
18060 #undef NCURSES_VERSION
18062 #include <termcap.h>
18063 #ifndef NCURSES_VERSION
18064 #error wrong header
18075 rm -f "conftest.$ac_objext"
18076 if { (eval echo "$as_me:18076: \"$ac_compile\"") >&5
18077 (eval $ac_compile) 2>&5
18079 echo "$as_me:18079: \$? = $ac_status" >&5
18080 (exit "$ac_status"); } &&
18081 { ac_try='test -s "conftest.$ac_objext"'
18082 { (eval echo "$as_me:18082: \"$ac_try\"") >&5
18083 (eval $ac_try) 2>&5
18085 echo "$as_me:18085: \$? = $ac_status" >&5
18086 (exit "$ac_status"); }; }; then
18087 cf_cv_have_termcap_h=yes
18089 echo "$as_me: failed program was:" >&5
18090 cat "conftest.$ac_ext" >&5
18091 cf_cv_have_termcap_h=no
18093 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18095 echo "$as_me:18095: result: $cf_cv_have_termcap_h" >&5
18096 echo "${ECHO_T}$cf_cv_have_termcap_h" >&6
18097 if test "x$cf_cv_have_termcap_h" = xyes
18100 cat >>confdefs.h <<\EOF
18101 #define HAVE_TERMCAP_H 1
18105 echo "$as_me:18105: checking if we can use ncurses/termcap.h" >&5
18106 echo $ECHO_N "checking if we can use ncurses/termcap.h... $ECHO_C" >&6
18107 if test "${cf_cv_have_ncurses_termcap_h+set}" = set; then
18108 echo $ECHO_N "(cached) $ECHO_C" >&6
18111 cat >"conftest.$ac_ext" <<_ACEOF
18112 #line 18112 "configure"
18113 #include "confdefs.h"
18115 #include <ncurses/curses.h>
18116 #ifdef NCURSES_VERSION
18117 #undef NCURSES_VERSION
18119 #include <ncurses/termcap.h>
18120 #ifndef NCURSES_VERSION
18121 #error wrong header
18132 rm -f "conftest.$ac_objext"
18133 if { (eval echo "$as_me:18133: \"$ac_compile\"") >&5
18134 (eval $ac_compile) 2>&5
18136 echo "$as_me:18136: \$? = $ac_status" >&5
18137 (exit "$ac_status"); } &&
18138 { ac_try='test -s "conftest.$ac_objext"'
18139 { (eval echo "$as_me:18139: \"$ac_try\"") >&5
18140 (eval $ac_try) 2>&5
18142 echo "$as_me:18142: \$? = $ac_status" >&5
18143 (exit "$ac_status"); }; }; then
18144 cf_cv_have_ncurses_termcap_h=yes
18146 echo "$as_me: failed program was:" >&5
18147 cat "conftest.$ac_ext" >&5
18148 cf_cv_have_ncurses_termcap_h=no
18150 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18152 echo "$as_me:18152: result: $cf_cv_have_ncurses_termcap_h" >&5
18153 echo "${ECHO_T}$cf_cv_have_ncurses_termcap_h" >&6
18154 test "x$cf_cv_have_ncurses_termcap_h" = xyes &&
18155 cat >>confdefs.h <<\EOF
18156 #define HAVE_NCURSES_TERMCAP_H 1
18161 if test "x$ac_cv_func_getopt" = xno; then
18162 { { echo "$as_me:18162: error: getopt is required for building programs" >&5
18163 echo "$as_me: error: getopt is required for building programs" >&2;}
18164 { (exit 1); exit 1; }; }
18167 if test "$cf_enable_widec" = yes; then
18180 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18181 echo "$as_me:18181: checking for $ac_func" >&5
18182 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18183 if eval "test \"\${$as_ac_var+set}\" = set"; then
18184 echo $ECHO_N "(cached) $ECHO_C" >&6
18186 cat >"conftest.$ac_ext" <<_ACEOF
18187 #line 18187 "configure"
18188 #include "confdefs.h"
18189 #define $ac_func autoconf_temporary
18190 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
18197 /* We use char because int might match the return type of a gcc2
18198 builtin and then its argument prototype would still apply. */
18199 char $ac_func (void);
18205 /* The GNU C library defines stubs for functions which it implements
18206 to always fail with ENOSYS. Some functions are actually named
18207 something starting with __ and the normal name is an alias. */
18208 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18209 #error found stub for $ac_func
18212 return $ac_func ();
18217 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18218 if { (eval echo "$as_me:18218: \"$ac_link\"") >&5
18219 (eval $ac_link) 2>&5
18221 echo "$as_me:18221: \$? = $ac_status" >&5
18222 (exit "$ac_status"); } &&
18223 { ac_try='test -s "conftest$ac_exeext"'
18224 { (eval echo "$as_me:18224: \"$ac_try\"") >&5
18225 (eval $ac_try) 2>&5
18227 echo "$as_me:18227: \$? = $ac_status" >&5
18228 (exit "$ac_status"); }; }; then
18229 eval "$as_ac_var=yes"
18231 echo "$as_me: failed program was:" >&5
18232 cat "conftest.$ac_ext" >&5
18233 eval "$as_ac_var=no"
18235 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18237 echo "$as_me:18237: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18238 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18239 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18240 cat >>confdefs.h <<EOF
18241 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18249 echo "$as_me:18249: checking definition to turn on extended curses functions" >&5
18250 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
18251 if test "${cf_cv_need_xopen_extension+set}" = set; then
18252 echo $ECHO_N "(cached) $ECHO_C" >&6
18255 cf_cv_need_xopen_extension=unknown
18256 cat >"conftest.$ac_ext" <<_ACEOF
18257 #line 18257 "configure"
18258 #include "confdefs.h"
18260 #include <stdlib.h>
18261 #include <${cf_cv_ncurses_header:-curses.h}>
18266 #if defined(NCURSES_VERSION_PATCH)
18267 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
18271 #ifdef NCURSES_VERSION
18273 int check2 = curs_set((int)sizeof(check));
18275 long x = winnstr(stdscr, "", 0);
18277 #ifdef NCURSES_VERSION
18280 getbegyx(stdscr, y1, x1);
18289 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18290 if { (eval echo "$as_me:18290: \"$ac_link\"") >&5
18291 (eval $ac_link) 2>&5
18293 echo "$as_me:18293: \$? = $ac_status" >&5
18294 (exit "$ac_status"); } &&
18295 { ac_try='test -s "conftest$ac_exeext"'
18296 { (eval echo "$as_me:18296: \"$ac_try\"") >&5
18297 (eval $ac_try) 2>&5
18299 echo "$as_me:18299: \$? = $ac_status" >&5
18300 (exit "$ac_status"); }; }; then
18301 cf_cv_need_xopen_extension=none
18303 echo "$as_me: failed program was:" >&5
18304 cat "conftest.$ac_ext" >&5
18306 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
18308 cat >"conftest.$ac_ext" <<_ACEOF
18309 #line 18309 "configure"
18310 #include "confdefs.h"
18312 #define $cf_try_xopen_extension 1
18313 #include <stdlib.h>
18314 #include <${cf_cv_ncurses_header:-curses.h}>
18319 #ifdef NCURSES_VERSION
18321 int check2 = curs_set((int)sizeof(check));
18323 long x = winnstr(stdscr, "", 0);
18325 getbegyx(stdscr, y1, x1);
18326 #ifdef NCURSES_VERSION
18337 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18338 if { (eval echo "$as_me:18338: \"$ac_link\"") >&5
18339 (eval $ac_link) 2>&5
18341 echo "$as_me:18341: \$? = $ac_status" >&5
18342 (exit "$ac_status"); } &&
18343 { ac_try='test -s "conftest$ac_exeext"'
18344 { (eval echo "$as_me:18344: \"$ac_try\"") >&5
18345 (eval $ac_try) 2>&5
18347 echo "$as_me:18347: \$? = $ac_status" >&5
18348 (exit "$ac_status"); }; }; then
18349 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
18351 echo "$as_me: failed program was:" >&5
18352 cat "conftest.$ac_ext" >&5
18354 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18358 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18361 echo "$as_me:18361: result: $cf_cv_need_xopen_extension" >&5
18362 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
18364 case "$cf_cv_need_xopen_extension" in
18367 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18368 CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
18373 echo "$as_me:18373: checking for term.h" >&5
18374 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
18375 if test "${cf_cv_term_header+set}" = set; then
18376 echo $ECHO_N "(cached) $ECHO_C" >&6
18379 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
18380 # for <term.h> if we do not find the variant.
18382 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
18384 case "${cf_cv_ncurses_header:-curses.h}" in
18386 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
18387 cf_header_list="$cf_header_item $cf_header_list"
18391 for cf_header in $cf_header_list
18393 cat >"conftest.$ac_ext" <<_ACEOF
18394 #line 18394 "configure"
18395 #include "confdefs.h"
18397 #include <${cf_cv_ncurses_header:-curses.h}>
18398 #include <${cf_header}>
18407 rm -f "conftest.$ac_objext"
18408 if { (eval echo "$as_me:18408: \"$ac_compile\"") >&5
18409 (eval $ac_compile) 2>&5
18411 echo "$as_me:18411: \$? = $ac_status" >&5
18412 (exit "$ac_status"); } &&
18413 { ac_try='test -s "conftest.$ac_objext"'
18414 { (eval echo "$as_me:18414: \"$ac_try\"") >&5
18415 (eval $ac_try) 2>&5
18417 echo "$as_me:18417: \$? = $ac_status" >&5
18418 (exit "$ac_status"); }; }; then
18419 cf_cv_term_header=$cf_header
18422 echo "$as_me: failed program was:" >&5
18423 cat "conftest.$ac_ext" >&5
18424 cf_cv_term_header=no
18426 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18429 case "$cf_cv_term_header" in
18431 # If curses is ncurses, some packagers still mess it up by trying to make
18432 # us use GNU termcap. This handles the most common case.
18433 for cf_header in ncurses/term.h ncursesw/term.h
18435 cat >"conftest.$ac_ext" <<_ACEOF
18436 #line 18436 "configure"
18437 #include "confdefs.h"
18439 #include <${cf_cv_ncurses_header:-curses.h}>
18440 #ifdef NCURSES_VERSION
18441 #include <${cf_header}>
18453 rm -f "conftest.$ac_objext"
18454 if { (eval echo "$as_me:18454: \"$ac_compile\"") >&5
18455 (eval $ac_compile) 2>&5
18457 echo "$as_me:18457: \$? = $ac_status" >&5
18458 (exit "$ac_status"); } &&
18459 { ac_try='test -s "conftest.$ac_objext"'
18460 { (eval echo "$as_me:18460: \"$ac_try\"") >&5
18461 (eval $ac_try) 2>&5
18463 echo "$as_me:18463: \$? = $ac_status" >&5
18464 (exit "$ac_status"); }; }; then
18465 cf_cv_term_header=$cf_header
18468 echo "$as_me: failed program was:" >&5
18469 cat "conftest.$ac_ext" >&5
18470 cf_cv_term_header=no
18472 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18478 echo "$as_me:18478: result: $cf_cv_term_header" >&5
18479 echo "${ECHO_T}$cf_cv_term_header" >&6
18481 case "$cf_cv_term_header" in
18484 cat >>confdefs.h <<\EOF
18485 #define HAVE_TERM_H 1
18491 cat >>confdefs.h <<\EOF
18492 #define HAVE_NCURSES_TERM_H 1
18498 cat >>confdefs.h <<\EOF
18499 #define HAVE_NCURSESW_TERM_H 1
18505 echo "$as_me:18505: checking for unctrl.h" >&5
18506 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
18507 if test "${cf_cv_unctrl_header+set}" = set; then
18508 echo $ECHO_N "(cached) $ECHO_C" >&6
18511 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
18512 # for <unctrl.h> if we do not find the variant.
18514 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
18516 case "${cf_cv_ncurses_header:-curses.h}" in
18518 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
18519 cf_header_list="$cf_header_item $cf_header_list"
18523 for cf_header in $cf_header_list
18525 cat >"conftest.$ac_ext" <<_ACEOF
18526 #line 18526 "configure"
18527 #include "confdefs.h"
18529 #include <${cf_cv_ncurses_header:-curses.h}>
18530 #include <${cf_header}>
18539 rm -f "conftest.$ac_objext"
18540 if { (eval echo "$as_me:18540: \"$ac_compile\"") >&5
18541 (eval $ac_compile) 2>&5
18543 echo "$as_me:18543: \$? = $ac_status" >&5
18544 (exit "$ac_status"); } &&
18545 { ac_try='test -s "conftest.$ac_objext"'
18546 { (eval echo "$as_me:18546: \"$ac_try\"") >&5
18547 (eval $ac_try) 2>&5
18549 echo "$as_me:18549: \$? = $ac_status" >&5
18550 (exit "$ac_status"); }; }; then
18551 cf_cv_unctrl_header=$cf_header
18554 echo "$as_me: failed program was:" >&5
18555 cat "conftest.$ac_ext" >&5
18556 cf_cv_unctrl_header=no
18558 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18562 echo "$as_me:18562: result: $cf_cv_unctrl_header" >&5
18563 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
18565 case "$cf_cv_unctrl_header" in
18567 { echo "$as_me:18567: WARNING: unctrl.h header not found" >&5
18568 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
18572 case "$cf_cv_unctrl_header" in
18575 cat >>confdefs.h <<\EOF
18576 #define HAVE_UNCTRL_H 1
18582 cat >>confdefs.h <<\EOF
18583 #define HAVE_NCURSES_UNCTRL_H 1
18587 (ncursesw/unctrl.h)
18589 cat >>confdefs.h <<\EOF
18590 #define HAVE_NCURSESW_UNCTRL_H 1
18598 assume_default_colors \
18615 init_extended_color \
18623 reset_color_pairs \
18639 use_default_colors \
18641 use_extended_names \
18657 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18659 echo "$as_me:18659: checking for ${cf_func}" >&5
18660 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
18662 echo "${as_me:-configure}:18662: testing ${cf_func} ..." 1>&5
18664 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
18665 echo $ECHO_N "(cached) $ECHO_C" >&6
18668 eval cf_result='$ac_cv_func_'$cf_func
18669 if test ".$cf_result" != ".no"; then
18670 cat >"conftest.$ac_ext" <<_ACEOF
18671 #line 18671 "configure"
18672 #include "confdefs.h"
18674 #ifdef HAVE_XCURSES
18675 #include <xcurses.h>
18676 char * XCursesProgramName = "test";
18678 #include <${cf_cv_ncurses_header:-curses.h}>
18679 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
18680 #include <ncursesw/term.h>
18681 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
18682 #include <ncurses/term.h>
18683 #elif defined(HAVE_TERM_H)
18693 long foo = (long)(&${cf_func});
18694 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
18695 if (foo + 1234L > 5678L)
18696 ${cf_cv_main_return:-return}(foo != 0);
18703 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18704 if { (eval echo "$as_me:18704: \"$ac_link\"") >&5
18705 (eval $ac_link) 2>&5
18707 echo "$as_me:18707: \$? = $ac_status" >&5
18708 (exit "$ac_status"); } &&
18709 { ac_try='test -s "conftest$ac_exeext"'
18710 { (eval echo "$as_me:18710: \"$ac_try\"") >&5
18711 (eval $ac_try) 2>&5
18713 echo "$as_me:18713: \$? = $ac_status" >&5
18714 (exit "$ac_status"); }; }; then
18717 echo "$as_me: failed program was:" >&5
18718 cat "conftest.$ac_ext" >&5
18721 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18723 eval 'cf_cv_func_'$cf_func'="$cf_result"'
18727 # use the computed/retrieved cache-value:
18728 eval 'cf_result=$cf_cv_func_'$cf_func
18729 echo "$as_me:18729: result: $cf_result" >&5
18730 echo "${ECHO_T}$cf_result" >&6
18731 if test "$cf_result" != no; then
18732 cat >>confdefs.h <<EOF
18733 #define HAVE_${cf_tr_func} 1
18739 for cf_func in tputs
18742 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18744 echo "$as_me:18744: checking for ${cf_func}" >&5
18745 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
18747 echo "${as_me:-configure}:18747: testing ${cf_func} ..." 1>&5
18749 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
18750 echo $ECHO_N "(cached) $ECHO_C" >&6
18753 eval cf_result='$ac_cv_func_'$cf_func
18754 if test ".$cf_result" != ".no"; then
18755 cat >"conftest.$ac_ext" <<_ACEOF
18756 #line 18756 "configure"
18757 #include "confdefs.h"
18759 #ifdef HAVE_XCURSES
18760 #include <xcurses.h>
18761 char * XCursesProgramName = "test";
18763 #include <${cf_cv_ncurses_header:-curses.h}>
18764 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
18765 #include <ncursesw/term.h>
18766 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
18767 #include <ncurses/term.h>
18768 #elif defined(HAVE_TERM_H)
18778 long foo = (long)(&${cf_func});
18779 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
18780 if (foo + 1234L > 5678L)
18781 ${cf_cv_main_return:-return}(foo != 0);
18788 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18789 if { (eval echo "$as_me:18789: \"$ac_link\"") >&5
18790 (eval $ac_link) 2>&5
18792 echo "$as_me:18792: \$? = $ac_status" >&5
18793 (exit "$ac_status"); } &&
18794 { ac_try='test -s "conftest$ac_exeext"'
18795 { (eval echo "$as_me:18795: \"$ac_try\"") >&5
18796 (eval $ac_try) 2>&5
18798 echo "$as_me:18798: \$? = $ac_status" >&5
18799 (exit "$ac_status"); }; }; then
18802 echo "$as_me: failed program was:" >&5
18803 cat "conftest.$ac_ext" >&5
18806 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18808 eval 'cf_cv_func_'$cf_func'="$cf_result"'
18812 # use the computed/retrieved cache-value:
18813 eval 'cf_result=$cf_cv_func_'$cf_func
18814 echo "$as_me:18814: result: $cf_result" >&5
18815 echo "${ECHO_T}$cf_result" >&6
18816 if test "$cf_result" != no; then
18817 cat >>confdefs.h <<EOF
18818 #define HAVE_${cf_tr_func} 1
18824 if test "x$cf_cv_func_tputs" = xyes
18827 for cf_arg in int char
18829 for cf_ret in int void
18831 if test "$cf_ret" = void
18833 cf_return="/* nothing */"
18835 cf_return="return value"
18837 cat >"conftest.$ac_ext" <<_ACEOF
18838 #line 18838 "configure"
18839 #include "confdefs.h"
18841 #include <${cf_cv_ncurses_header:-curses.h}>
18842 #include <$cf_cv_term_header>
18844 static $cf_ret outc($cf_arg value) { $cf_return; }
18850 tputs("hello", 0, outc);
18851 ${cf_cv_main_return:-return}(0);
18857 rm -f "conftest.$ac_objext"
18858 if { (eval echo "$as_me:18858: \"$ac_compile\"") >&5
18859 (eval $ac_compile) 2>&5
18861 echo "$as_me:18861: \$? = $ac_status" >&5
18862 (exit "$ac_status"); } &&
18863 { ac_try='test -s "conftest.$ac_objext"'
18864 { (eval echo "$as_me:18864: \"$ac_try\"") >&5
18865 (eval $ac_try) 2>&5
18867 echo "$as_me:18867: \$? = $ac_status" >&5
18868 (exit "$ac_status"); }; }; then
18870 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
18872 echo "${as_me:-configure}:18872: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
18874 cat >>confdefs.h <<EOF
18875 #define TPUTS_ARG $cf_arg
18876 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
18877 #define TPUTS_RETURN(value) $cf_return
18883 echo "$as_me: failed program was:" >&5
18884 cat "conftest.$ac_ext" >&5
18886 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18888 test "$cf_done" = yes && break
18892 echo "$as_me:18892: checking for ncurses extended functions" >&5
18893 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
18894 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
18895 echo $ECHO_N "(cached) $ECHO_C" >&6
18898 cat >"conftest.$ac_ext" <<_ACEOF
18899 #line 18899 "configure"
18900 #include "confdefs.h"
18902 #include <${cf_cv_ncurses_header:-curses.h}>
18907 int x = NCURSES_EXT_FUNCS
18913 rm -f "conftest.$ac_objext"
18914 if { (eval echo "$as_me:18914: \"$ac_compile\"") >&5
18915 (eval $ac_compile) 2>&5
18917 echo "$as_me:18917: \$? = $ac_status" >&5
18918 (exit "$ac_status"); } &&
18919 { ac_try='test -s "conftest.$ac_objext"'
18920 { (eval echo "$as_me:18920: \"$ac_try\"") >&5
18921 (eval $ac_try) 2>&5
18923 echo "$as_me:18923: \$? = $ac_status" >&5
18924 (exit "$ac_status"); }; }; then
18925 cf_cv_ncurses_ext_funcs=defined
18927 echo "$as_me: failed program was:" >&5
18928 cat "conftest.$ac_ext" >&5
18930 cat >"conftest.$ac_ext" <<_ACEOF
18931 #line 18931 "configure"
18932 #include "confdefs.h"
18934 #include <${cf_cv_ncurses_header:-curses.h}>
18939 (void) assume_default_colors (0, 0);
18940 (void) curses_version ();
18941 (void) define_key (0, 0);
18942 (void) is_term_resized (0, 0);
18943 (void) key_defined (0);
18944 (void) keybound (0, 0);
18945 (void) keyok (0, 0);
18946 (void) resize_term (0, 0);
18947 (void) resizeterm (0, 0);
18948 (void) use_default_colors ();
18949 (void) use_extended_names (0);
18950 (void) wresize (0, 0, 0);
18955 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18956 if { (eval echo "$as_me:18956: \"$ac_link\"") >&5
18957 (eval $ac_link) 2>&5
18959 echo "$as_me:18959: \$? = $ac_status" >&5
18960 (exit "$ac_status"); } &&
18961 { ac_try='test -s "conftest$ac_exeext"'
18962 { (eval echo "$as_me:18962: \"$ac_try\"") >&5
18963 (eval $ac_try) 2>&5
18965 echo "$as_me:18965: \$? = $ac_status" >&5
18966 (exit "$ac_status"); }; }; then
18967 cf_cv_ncurses_ext_funcs=yes
18969 echo "$as_me: failed program was:" >&5
18970 cat "conftest.$ac_ext" >&5
18971 cf_cv_ncurses_ext_funcs=no
18973 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18976 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18979 echo "$as_me:18979: result: $cf_cv_ncurses_ext_funcs" >&5
18980 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
18981 test "$cf_cv_ncurses_ext_funcs" = yes &&
18982 cat >>confdefs.h <<\EOF
18983 #define NCURSES_EXT_FUNCS 1
18986 if test "$cf_enable_widec" = yes
18988 # workaround for systems with ncurses before 20111029, due to change of
18989 # feature test macro from _XPG5 to _XOPEN_SOURCE
18990 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
18993 echo "$as_me:18993: checking if _XPG5 should be defined to enable wide-characters" >&5
18994 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
18996 cat >"conftest.$ac_ext" <<_ACEOF
18997 #line 18997 "configure"
18998 #include "confdefs.h"
19000 #include <${cf_cv_ncurses_header:-curses.h}>
19009 rm -f "conftest.$ac_objext"
19010 if { (eval echo "$as_me:19010: \"$ac_compile\"") >&5
19011 (eval $ac_compile) 2>&5
19013 echo "$as_me:19013: \$? = $ac_status" >&5
19014 (exit "$ac_status"); } &&
19015 { ac_try='test -s "conftest.$ac_objext"'
19016 { (eval echo "$as_me:19016: \"$ac_try\"") >&5
19017 (eval $ac_try) 2>&5
19019 echo "$as_me:19019: \$? = $ac_status" >&5
19020 (exit "$ac_status"); }; }; then
19023 echo "$as_me: failed program was:" >&5
19024 cat "conftest.$ac_ext" >&5
19025 cf_save_cppflags="$CPPFLAGS"
19026 CPPFLAGS="$CPPFLAGS -D_XPG5"
19027 cat >"conftest.$ac_ext" <<_ACEOF
19028 #line 19028 "configure"
19029 #include "confdefs.h"
19031 #include <${cf_cv_ncurses_header:-curses.h}>
19040 rm -f "conftest.$ac_objext"
19041 if { (eval echo "$as_me:19041: \"$ac_compile\"") >&5
19042 (eval $ac_compile) 2>&5
19044 echo "$as_me:19044: \$? = $ac_status" >&5
19045 (exit "$ac_status"); } &&
19046 { ac_try='test -s "conftest.$ac_objext"'
19047 { (eval echo "$as_me:19047: \"$ac_try\"") >&5
19048 (eval $ac_try) 2>&5
19050 echo "$as_me:19050: \$? = $ac_status" >&5
19051 (exit "$ac_status"); }; }; then
19054 echo "$as_me: failed program was:" >&5
19055 cat "conftest.$ac_ext" >&5
19057 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19058 CPPFLAGS="$cf_save_cppflags"
19060 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19061 echo "$as_me:19061: result: $cf_define_xpg5" >&5
19062 echo "${ECHO_T}$cf_define_xpg5" >&6
19064 if test "$cf_define_xpg5" = yes
19066 CPPFLAGS="$CPPFLAGS -D_XPG5"
19070 echo "$as_me:19070: checking for wide-character functions" >&5
19071 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
19072 if test "${cf_cv_widechar_funcs+set}" = set; then
19073 echo $ECHO_N "(cached) $ECHO_C" >&6
19076 cat >"conftest.$ac_ext" <<_ACEOF
19077 #line 19077 "configure"
19078 #include "confdefs.h"
19080 #include <${cf_cv_ncurses_header:-curses.h}>
19085 static wchar_t src_wchar[2];
19086 static cchar_t dst_cchar;
19087 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
19093 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19094 if { (eval echo "$as_me:19094: \"$ac_link\"") >&5
19095 (eval $ac_link) 2>&5
19097 echo "$as_me:19097: \$? = $ac_status" >&5
19098 (exit "$ac_status"); } &&
19099 { ac_try='test -s "conftest$ac_exeext"'
19100 { (eval echo "$as_me:19100: \"$ac_try\"") >&5
19101 (eval $ac_try) 2>&5
19103 echo "$as_me:19103: \$? = $ac_status" >&5
19104 (exit "$ac_status"); }; }; then
19105 cf_cv_widechar_funcs=yes
19107 echo "$as_me: failed program was:" >&5
19108 cat "conftest.$ac_ext" >&5
19109 cf_cv_widechar_funcs=no
19111 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19114 echo "$as_me:19114: result: $cf_cv_widechar_funcs" >&5
19115 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
19116 if test "$cf_cv_widechar_funcs" != no ; then
19118 cat >>confdefs.h <<\EOF
19119 #define USE_WIDEC_SUPPORT 1
19123 cat >>confdefs.h <<\EOF
19124 #define USE_WIDEC_SUPPORT 0
19129 cat >>confdefs.h <<\EOF
19130 #define USE_WIDEC_SUPPORT 0
19135 echo "$as_me:19135: checking if $cf_cv_screen library uses pthreads" >&5
19136 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
19137 if test "${cf_cv_use_pthreads+set}" = set; then
19138 echo $ECHO_N "(cached) $ECHO_C" >&6
19141 cat >"conftest.$ac_ext" <<_ACEOF
19142 #line 19142 "configure"
19143 #include "confdefs.h"
19145 #include <${cf_cv_ncurses_header:-curses.h}>
19146 extern void _nc_init_pthreads(void);
19153 _nc_init_pthreads();
19159 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19160 if { (eval echo "$as_me:19160: \"$ac_link\"") >&5
19161 (eval $ac_link) 2>&5
19163 echo "$as_me:19163: \$? = $ac_status" >&5
19164 (exit "$ac_status"); } &&
19165 { ac_try='test -s "conftest$ac_exeext"'
19166 { (eval echo "$as_me:19166: \"$ac_try\"") >&5
19167 (eval $ac_try) 2>&5
19169 echo "$as_me:19169: \$? = $ac_status" >&5
19170 (exit "$ac_status"); }; }; then
19171 cf_cv_use_pthreads=yes
19173 echo "$as_me: failed program was:" >&5
19174 cat "conftest.$ac_ext" >&5
19175 cf_cv_use_pthreads=no
19177 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19180 echo "$as_me:19180: result: $cf_cv_use_pthreads" >&5
19181 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
19182 test $cf_cv_use_pthreads = yes &&
19183 cat >>confdefs.h <<\EOF
19184 #define USE_PTHREADS 1
19187 echo "$as_me:19187: checking if sys/time.h works with sys/select.h" >&5
19188 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
19189 if test "${cf_cv_sys_time_select+set}" = set; then
19190 echo $ECHO_N "(cached) $ECHO_C" >&6
19193 cat >"conftest.$ac_ext" <<_ACEOF
19194 #line 19194 "configure"
19195 #include "confdefs.h"
19197 #include <sys/types.h>
19198 #ifdef HAVE_SYS_TIME_H
19199 #include <sys/time.h>
19201 #ifdef HAVE_SYS_SELECT_H
19202 #include <sys/select.h>
19213 rm -f "conftest.$ac_objext"
19214 if { (eval echo "$as_me:19214: \"$ac_compile\"") >&5
19215 (eval $ac_compile) 2>&5
19217 echo "$as_me:19217: \$? = $ac_status" >&5
19218 (exit "$ac_status"); } &&
19219 { ac_try='test -s "conftest.$ac_objext"'
19220 { (eval echo "$as_me:19220: \"$ac_try\"") >&5
19221 (eval $ac_try) 2>&5
19223 echo "$as_me:19223: \$? = $ac_status" >&5
19224 (exit "$ac_status"); }; }; then
19225 cf_cv_sys_time_select=yes
19227 echo "$as_me: failed program was:" >&5
19228 cat "conftest.$ac_ext" >&5
19229 cf_cv_sys_time_select=no
19231 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19235 echo "$as_me:19235: result: $cf_cv_sys_time_select" >&5
19236 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
19237 test "$cf_cv_sys_time_select" = yes &&
19238 cat >>confdefs.h <<\EOF
19239 #define HAVE_SYS_TIME_SELECT 1
19242 # special check for test/ditto.c
19244 echo "$as_me:19244: checking for openpty in -lutil" >&5
19245 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
19246 if test "${ac_cv_lib_util_openpty+set}" = set; then
19247 echo $ECHO_N "(cached) $ECHO_C" >&6
19249 ac_check_lib_save_LIBS=$LIBS
19250 LIBS="-lutil $LIBS"
19251 cat >"conftest.$ac_ext" <<_ACEOF
19252 #line 19252 "configure"
19253 #include "confdefs.h"
19255 /* Override any gcc2 internal prototype to avoid an error. */
19259 /* We use char because int might match the return type of a gcc2
19260 builtin and then its argument prototype would still apply. */
19270 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19271 if { (eval echo "$as_me:19271: \"$ac_link\"") >&5
19272 (eval $ac_link) 2>&5
19274 echo "$as_me:19274: \$? = $ac_status" >&5
19275 (exit "$ac_status"); } &&
19276 { ac_try='test -s "conftest$ac_exeext"'
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 ac_cv_lib_util_openpty=yes
19284 echo "$as_me: failed program was:" >&5
19285 cat "conftest.$ac_ext" >&5
19286 ac_cv_lib_util_openpty=no
19288 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19289 LIBS=$ac_check_lib_save_LIBS
19291 echo "$as_me:19291: result: $ac_cv_lib_util_openpty" >&5
19292 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
19293 if test "$ac_cv_lib_util_openpty" = yes; then
19299 echo "$as_me:19299: checking for openpty header" >&5
19300 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
19301 if test "${cf_cv_func_openpty+set}" = set; then
19302 echo $ECHO_N "(cached) $ECHO_C" >&6
19305 cf_save_LIBS="$LIBS"
19306 test "$cf_cv_lib_util" = yes && {
19307 cf_add_libs="$LIBS"
19310 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19311 # filter duplicates
19312 for cf_add_1lib in $cf_add_0lib; do
19313 for cf_add_2lib in $cf_add_libs; do
19314 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19319 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19321 LIBS="$cf_add_libs"
19323 for cf_header in pty.h libutil.h util.h
19325 cat >"conftest.$ac_ext" <<_ACEOF
19326 #line 19326 "configure"
19327 #include "confdefs.h"
19329 #include <$cf_header>
19335 int x = openpty((int *)0, (int *)0, (char *)0,
19336 (struct termios *)0, (struct winsize *)0);
19342 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19343 if { (eval echo "$as_me:19343: \"$ac_link\"") >&5
19344 (eval $ac_link) 2>&5
19346 echo "$as_me:19346: \$? = $ac_status" >&5
19347 (exit "$ac_status"); } &&
19348 { ac_try='test -s "conftest$ac_exeext"'
19349 { (eval echo "$as_me:19349: \"$ac_try\"") >&5
19350 (eval $ac_try) 2>&5
19352 echo "$as_me:19352: \$? = $ac_status" >&5
19353 (exit "$ac_status"); }; }; then
19355 cf_cv_func_openpty=$cf_header
19359 echo "$as_me: failed program was:" >&5
19360 cat "conftest.$ac_ext" >&5
19362 cf_cv_func_openpty=no
19365 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19367 LIBS="$cf_save_LIBS"
19370 echo "$as_me:19370: result: $cf_cv_func_openpty" >&5
19371 echo "${ECHO_T}$cf_cv_func_openpty" >&6
19373 if test "$cf_cv_func_openpty" != no ; then
19375 cat >>confdefs.h <<EOF
19376 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
19379 cat >>confdefs.h <<\EOF
19380 #define USE_XTERM_PTY 1
19383 if test "x$cf_cv_lib_util" = xyes ; then
19385 cf_add_libs="$TEST_LIBS"
19388 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19389 # filter duplicates
19390 for cf_add_1lib in $cf_add_0lib; do
19391 for cf_add_2lib in $cf_add_libs; do
19392 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19397 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19399 TEST_LIBS="$cf_add_libs"
19404 echo "$as_me:19404: checking for function curses_version" >&5
19405 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
19406 if test "${cf_cv_func_curses_version+set}" = set; then
19407 echo $ECHO_N "(cached) $ECHO_C" >&6
19410 if test "$cross_compiling" = yes; then
19411 cf_cv_func_curses_version=unknown
19413 cat >"conftest.$ac_ext" <<_ACEOF
19414 #line 19414 "configure"
19415 #include "confdefs.h"
19417 #include <${cf_cv_ncurses_header:-curses.h}>
19421 sprintf(temp, "%s\\n", curses_version());
19422 ${cf_cv_main_return:-return}(0);
19426 rm -f "conftest$ac_exeext"
19427 if { (eval echo "$as_me:19427: \"$ac_link\"") >&5
19428 (eval $ac_link) 2>&5
19430 echo "$as_me:19430: \$? = $ac_status" >&5
19431 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
19432 { (eval echo "$as_me:19432: \"$ac_try\"") >&5
19433 (eval $ac_try) 2>&5
19435 echo "$as_me:19435: \$? = $ac_status" >&5
19436 (exit "$ac_status"); }; }; then
19437 cf_cv_func_curses_version=yes
19440 echo "$as_me: program exited with status $ac_status" >&5
19441 echo "$as_me: failed program was:" >&5
19442 cat "conftest.$ac_ext" >&5
19443 cf_cv_func_curses_version=no
19446 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
19450 echo "$as_me:19450: result: $cf_cv_func_curses_version" >&5
19451 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
19452 test "$cf_cv_func_curses_version" = yes &&
19453 cat >>confdefs.h <<\EOF
19454 #define HAVE_CURSES_VERSION 1
19457 echo "$as_me:19457: checking for alternate character set array" >&5
19458 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
19459 if test "${cf_cv_curses_acs_map+set}" = set; then
19460 echo $ECHO_N "(cached) $ECHO_C" >&6
19463 cf_cv_curses_acs_map=unknown
19464 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
19466 cat >"conftest.$ac_ext" <<_ACEOF
19467 #line 19467 "configure"
19468 #include "confdefs.h"
19470 #include <${cf_cv_ncurses_header:-curses.h}>
19476 ${name}['k'] = ACS_PLUS
19482 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19483 if { (eval echo "$as_me:19483: \"$ac_link\"") >&5
19484 (eval $ac_link) 2>&5
19486 echo "$as_me:19486: \$? = $ac_status" >&5
19487 (exit "$ac_status"); } &&
19488 { ac_try='test -s "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_curses_acs_map=$name; break
19496 echo "$as_me: failed program was:" >&5
19497 cat "conftest.$ac_ext" >&5
19499 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19503 echo "$as_me:19503: result: $cf_cv_curses_acs_map" >&5
19504 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
19506 test "$cf_cv_curses_acs_map" != unknown &&
19507 cat >>confdefs.h <<EOF
19508 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
19511 if test "$cf_enable_widec" = yes; then
19513 echo "$as_me:19513: checking for wide alternate character set array" >&5
19514 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
19515 if test "${cf_cv_curses_wacs_map+set}" = set; then
19516 echo $ECHO_N "(cached) $ECHO_C" >&6
19519 cf_cv_curses_wacs_map=unknown
19520 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
19522 cat >"conftest.$ac_ext" <<_ACEOF
19523 #line 19523 "configure"
19524 #include "confdefs.h"
19526 #ifndef _XOPEN_SOURCE_EXTENDED
19527 #define _XOPEN_SOURCE_EXTENDED
19529 #include <${cf_cv_ncurses_header:-curses.h}>
19533 void *foo = &(${name}['k']); (void)foo
19538 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19539 if { (eval echo "$as_me:19539: \"$ac_link\"") >&5
19540 (eval $ac_link) 2>&5
19542 echo "$as_me:19542: \$? = $ac_status" >&5
19543 (exit "$ac_status"); } &&
19544 { ac_try='test -s "conftest$ac_exeext"'
19545 { (eval echo "$as_me:19545: \"$ac_try\"") >&5
19546 (eval $ac_try) 2>&5
19548 echo "$as_me:19548: \$? = $ac_status" >&5
19549 (exit "$ac_status"); }; }; then
19550 cf_cv_curses_wacs_map=$name
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"
19559 echo "$as_me:19559: result: $cf_cv_curses_wacs_map" >&5
19560 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
19562 test "$cf_cv_curses_wacs_map" != unknown &&
19563 cat >>confdefs.h <<EOF
19564 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
19567 echo "$as_me:19567: checking for wide alternate character constants" >&5
19568 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
19569 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
19570 echo $ECHO_N "(cached) $ECHO_C" >&6
19573 cf_cv_curses_wacs_symbols=no
19574 if test "$cf_cv_curses_wacs_map" != unknown
19576 cat >"conftest.$ac_ext" <<_ACEOF
19577 #line 19577 "configure"
19578 #include "confdefs.h"
19580 #ifndef _XOPEN_SOURCE_EXTENDED
19581 #define _XOPEN_SOURCE_EXTENDED
19583 #include <${cf_cv_ncurses_header:-curses.h}>
19587 cchar_t *foo = WACS_PLUS;
19588 ${cf_cv_curses_wacs_map}['k'] = *WACS_PLUS; (void)foo
19593 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19594 if { (eval echo "$as_me:19594: \"$ac_link\"") >&5
19595 (eval $ac_link) 2>&5
19597 echo "$as_me:19597: \$? = $ac_status" >&5
19598 (exit "$ac_status"); } &&
19599 { ac_try='test -s "conftest$ac_exeext"'
19600 { (eval echo "$as_me:19600: \"$ac_try\"") >&5
19601 (eval $ac_try) 2>&5
19603 echo "$as_me:19603: \$? = $ac_status" >&5
19604 (exit "$ac_status"); }; }; then
19605 cf_cv_curses_wacs_symbols=yes
19607 echo "$as_me: failed program was:" >&5
19608 cat "conftest.$ac_ext" >&5
19610 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19612 cat >"conftest.$ac_ext" <<_ACEOF
19613 #line 19613 "configure"
19614 #include "confdefs.h"
19616 #ifndef _XOPEN_SOURCE_EXTENDED
19617 #define _XOPEN_SOURCE_EXTENDED
19619 #include <${cf_cv_ncurses_header:-curses.h}>
19623 cchar_t *foo = WACS_PLUS; (void)foo
19628 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19629 if { (eval echo "$as_me:19629: \"$ac_link\"") >&5
19630 (eval $ac_link) 2>&5
19632 echo "$as_me:19632: \$? = $ac_status" >&5
19633 (exit "$ac_status"); } &&
19634 { ac_try='test -s "conftest$ac_exeext"'
19635 { (eval echo "$as_me:19635: \"$ac_try\"") >&5
19636 (eval $ac_try) 2>&5
19638 echo "$as_me:19638: \$? = $ac_status" >&5
19639 (exit "$ac_status"); }; }; then
19640 cf_cv_curses_wacs_symbols=yes
19642 echo "$as_me: failed program was:" >&5
19643 cat "conftest.$ac_ext" >&5
19645 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19649 echo "$as_me:19649: result: $cf_cv_curses_wacs_symbols" >&5
19650 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
19652 test "$cf_cv_curses_wacs_symbols" != no &&
19653 cat >>confdefs.h <<\EOF
19654 #define CURSES_WACS_SYMBOLS 1
19659 echo "$as_me:19659: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19660 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19661 cat >"conftest.$ac_ext" <<_ACEOF
19662 #line 19662 "configure"
19663 #include "confdefs.h"
19665 #ifndef _XOPEN_SOURCE_EXTENDED
19666 #define _XOPEN_SOURCE_EXTENDED
19668 #include <${cf_cv_ncurses_header:-curses.h}>
19679 rm -f "conftest.$ac_objext"
19680 if { (eval echo "$as_me:19680: \"$ac_compile\"") >&5
19681 (eval $ac_compile) 2>&5
19683 echo "$as_me:19683: \$? = $ac_status" >&5
19684 (exit "$ac_status"); } &&
19685 { ac_try='test -s "conftest.$ac_objext"'
19686 { (eval echo "$as_me:19686: \"$ac_try\"") >&5
19687 (eval $ac_try) 2>&5
19689 echo "$as_me:19689: \$? = $ac_status" >&5
19690 (exit "$ac_status"); }; }; then
19693 echo "$as_me: failed program was:" >&5
19694 cat "conftest.$ac_ext" >&5
19697 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19698 echo "$as_me:19698: result: $cf_result" >&5
19699 echo "${ECHO_T}$cf_result" >&6
19700 if test "$cf_result" = yes ; then
19702 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19704 cat >>confdefs.h <<EOF
19705 #define $cf_result 1
19710 cat >>confdefs.h <<EOF
19711 #define attr_t long
19716 if test "$cf_enable_widec" = yes; then
19718 # This is needed on Tru64 5.0 to declare mbstate_t
19719 echo "$as_me:19719: checking if we must include wchar.h to declare mbstate_t" >&5
19720 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
19721 if test "${cf_cv_mbstate_t+set}" = set; then
19722 echo $ECHO_N "(cached) $ECHO_C" >&6
19725 cat >"conftest.$ac_ext" <<_ACEOF
19726 #line 19726 "configure"
19727 #include "confdefs.h"
19729 #include <stdlib.h>
19730 #include <stdarg.h>
19732 #ifdef HAVE_LIBUTF8_H
19733 #include <libutf8.h>
19743 rm -f "conftest.$ac_objext"
19744 if { (eval echo "$as_me:19744: \"$ac_compile\"") >&5
19745 (eval $ac_compile) 2>&5
19747 echo "$as_me:19747: \$? = $ac_status" >&5
19748 (exit "$ac_status"); } &&
19749 { ac_try='test -s "conftest.$ac_objext"'
19750 { (eval echo "$as_me:19750: \"$ac_try\"") >&5
19751 (eval $ac_try) 2>&5
19753 echo "$as_me:19753: \$? = $ac_status" >&5
19754 (exit "$ac_status"); }; }; then
19757 echo "$as_me: failed program was:" >&5
19758 cat "conftest.$ac_ext" >&5
19759 cat >"conftest.$ac_ext" <<_ACEOF
19760 #line 19760 "configure"
19761 #include "confdefs.h"
19763 #include <stdlib.h>
19764 #include <stdarg.h>
19767 #ifdef HAVE_LIBUTF8_H
19768 #include <libutf8.h>
19778 rm -f "conftest.$ac_objext"
19779 if { (eval echo "$as_me:19779: \"$ac_compile\"") >&5
19780 (eval $ac_compile) 2>&5
19782 echo "$as_me:19782: \$? = $ac_status" >&5
19783 (exit "$ac_status"); } &&
19784 { ac_try='test -s "conftest.$ac_objext"'
19785 { (eval echo "$as_me:19785: \"$ac_try\"") >&5
19786 (eval $ac_try) 2>&5
19788 echo "$as_me:19788: \$? = $ac_status" >&5
19789 (exit "$ac_status"); }; }; then
19790 cf_cv_mbstate_t=yes
19792 echo "$as_me: failed program was:" >&5
19793 cat "conftest.$ac_ext" >&5
19794 cf_cv_mbstate_t=unknown
19796 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19798 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19800 echo "$as_me:19800: result: $cf_cv_mbstate_t" >&5
19801 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
19803 if test "$cf_cv_mbstate_t" = yes ; then
19805 cat >>confdefs.h <<\EOF
19806 #define NEED_WCHAR_H 1
19812 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
19813 if test "$cf_cv_mbstate_t" = unknown ; then
19814 NCURSES_MBSTATE_T=1
19817 # if we find mbstate_t in either place, use substitution to provide a fallback.
19818 if test "$cf_cv_mbstate_t" != unknown ; then
19819 NCURSES_OK_MBSTATE_T=1
19822 # This is needed on Tru64 5.0 to declare wchar_t
19823 echo "$as_me:19823: checking if we must include wchar.h to declare wchar_t" >&5
19824 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
19825 if test "${cf_cv_wchar_t+set}" = set; then
19826 echo $ECHO_N "(cached) $ECHO_C" >&6
19829 cat >"conftest.$ac_ext" <<_ACEOF
19830 #line 19830 "configure"
19831 #include "confdefs.h"
19833 #include <stdlib.h>
19834 #include <stdarg.h>
19836 #ifdef HAVE_LIBUTF8_H
19837 #include <libutf8.h>
19847 rm -f "conftest.$ac_objext"
19848 if { (eval echo "$as_me:19848: \"$ac_compile\"") >&5
19849 (eval $ac_compile) 2>&5
19851 echo "$as_me:19851: \$? = $ac_status" >&5
19852 (exit "$ac_status"); } &&
19853 { ac_try='test -s "conftest.$ac_objext"'
19854 { (eval echo "$as_me:19854: \"$ac_try\"") >&5
19855 (eval $ac_try) 2>&5
19857 echo "$as_me:19857: \$? = $ac_status" >&5
19858 (exit "$ac_status"); }; }; then
19861 echo "$as_me: failed program was:" >&5
19862 cat "conftest.$ac_ext" >&5
19863 cat >"conftest.$ac_ext" <<_ACEOF
19864 #line 19864 "configure"
19865 #include "confdefs.h"
19867 #include <stdlib.h>
19868 #include <stdarg.h>
19871 #ifdef HAVE_LIBUTF8_H
19872 #include <libutf8.h>
19882 rm -f "conftest.$ac_objext"
19883 if { (eval echo "$as_me:19883: \"$ac_compile\"") >&5
19884 (eval $ac_compile) 2>&5
19886 echo "$as_me:19886: \$? = $ac_status" >&5
19887 (exit "$ac_status"); } &&
19888 { ac_try='test -s "conftest.$ac_objext"'
19889 { (eval echo "$as_me:19889: \"$ac_try\"") >&5
19890 (eval $ac_try) 2>&5
19892 echo "$as_me:19892: \$? = $ac_status" >&5
19893 (exit "$ac_status"); }; }; then
19896 echo "$as_me: failed program was:" >&5
19897 cat "conftest.$ac_ext" >&5
19898 cf_cv_wchar_t=unknown
19900 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19902 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19904 echo "$as_me:19904: result: $cf_cv_wchar_t" >&5
19905 echo "${ECHO_T}$cf_cv_wchar_t" >&6
19907 if test "$cf_cv_wchar_t" = yes ; then
19909 cat >>confdefs.h <<\EOF
19910 #define NEED_WCHAR_H 1
19916 # if we do not find wchar_t in either place, use substitution to provide a fallback.
19917 if test "$cf_cv_wchar_t" = unknown ; then
19921 # if we find wchar_t in either place, use substitution to provide a fallback.
19922 if test "$cf_cv_wchar_t" != unknown ; then
19923 NCURSES_OK_WCHAR_T=1
19926 # This is needed on Tru64 5.0 to declare wint_t
19927 echo "$as_me:19927: checking if we must include wchar.h to declare wint_t" >&5
19928 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
19929 if test "${cf_cv_wint_t+set}" = set; then
19930 echo $ECHO_N "(cached) $ECHO_C" >&6
19933 cat >"conftest.$ac_ext" <<_ACEOF
19934 #line 19934 "configure"
19935 #include "confdefs.h"
19937 #include <stdlib.h>
19938 #include <stdarg.h>
19940 #ifdef HAVE_LIBUTF8_H
19941 #include <libutf8.h>
19951 rm -f "conftest.$ac_objext"
19952 if { (eval echo "$as_me:19952: \"$ac_compile\"") >&5
19953 (eval $ac_compile) 2>&5
19955 echo "$as_me:19955: \$? = $ac_status" >&5
19956 (exit "$ac_status"); } &&
19957 { ac_try='test -s "conftest.$ac_objext"'
19958 { (eval echo "$as_me:19958: \"$ac_try\"") >&5
19959 (eval $ac_try) 2>&5
19961 echo "$as_me:19961: \$? = $ac_status" >&5
19962 (exit "$ac_status"); }; }; then
19965 echo "$as_me: failed program was:" >&5
19966 cat "conftest.$ac_ext" >&5
19967 cat >"conftest.$ac_ext" <<_ACEOF
19968 #line 19968 "configure"
19969 #include "confdefs.h"
19971 #include <stdlib.h>
19972 #include <stdarg.h>
19975 #ifdef HAVE_LIBUTF8_H
19976 #include <libutf8.h>
19986 rm -f "conftest.$ac_objext"
19987 if { (eval echo "$as_me:19987: \"$ac_compile\"") >&5
19988 (eval $ac_compile) 2>&5
19990 echo "$as_me:19990: \$? = $ac_status" >&5
19991 (exit "$ac_status"); } &&
19992 { ac_try='test -s "conftest.$ac_objext"'
19993 { (eval echo "$as_me:19993: \"$ac_try\"") >&5
19994 (eval $ac_try) 2>&5
19996 echo "$as_me:19996: \$? = $ac_status" >&5
19997 (exit "$ac_status"); }; }; then
20000 echo "$as_me: failed program was:" >&5
20001 cat "conftest.$ac_ext" >&5
20002 cf_cv_wint_t=unknown
20004 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20006 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20008 echo "$as_me:20008: result: $cf_cv_wint_t" >&5
20009 echo "${ECHO_T}$cf_cv_wint_t" >&6
20011 if test "$cf_cv_wint_t" = yes ; then
20013 cat >>confdefs.h <<\EOF
20014 #define NEED_WCHAR_H 1
20020 # if we do not find wint_t in either place, use substitution to provide a fallback.
20021 if test "$cf_cv_wint_t" = unknown ; then
20025 # if we find wint_t in either place, use substitution to provide a fallback.
20026 if test "$cf_cv_wint_t" != unknown ; then
20027 NCURSES_OK_WINT_T=1
20030 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
20032 echo "$as_me:20032: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20033 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20034 cat >"conftest.$ac_ext" <<_ACEOF
20035 #line 20035 "configure"
20036 #include "confdefs.h"
20038 #ifndef _XOPEN_SOURCE_EXTENDED
20039 #define _XOPEN_SOURCE_EXTENDED
20041 #include <${cf_cv_ncurses_header:-curses.h}>
20052 rm -f "conftest.$ac_objext"
20053 if { (eval echo "$as_me:20053: \"$ac_compile\"") >&5
20054 (eval $ac_compile) 2>&5
20056 echo "$as_me:20056: \$? = $ac_status" >&5
20057 (exit "$ac_status"); } &&
20058 { ac_try='test -s "conftest.$ac_objext"'
20059 { (eval echo "$as_me:20059: \"$ac_try\"") >&5
20060 (eval $ac_try) 2>&5
20062 echo "$as_me:20062: \$? = $ac_status" >&5
20063 (exit "$ac_status"); }; }; then
20066 echo "$as_me: failed program was:" >&5
20067 cat "conftest.$ac_ext" >&5
20070 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20071 echo "$as_me:20071: result: $cf_result" >&5
20072 echo "${ECHO_T}$cf_result" >&6
20073 if test "$cf_result" = yes ; then
20075 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20077 cat >>confdefs.h <<EOF
20078 #define $cf_result 1
20083 cat >>confdefs.h <<EOF
20084 #define mbstate_t long
20091 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
20093 echo "$as_me:20093: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20094 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20095 cat >"conftest.$ac_ext" <<_ACEOF
20096 #line 20096 "configure"
20097 #include "confdefs.h"
20099 #ifndef _XOPEN_SOURCE_EXTENDED
20100 #define _XOPEN_SOURCE_EXTENDED
20102 #include <${cf_cv_ncurses_header:-curses.h}>
20113 rm -f "conftest.$ac_objext"
20114 if { (eval echo "$as_me:20114: \"$ac_compile\"") >&5
20115 (eval $ac_compile) 2>&5
20117 echo "$as_me:20117: \$? = $ac_status" >&5
20118 (exit "$ac_status"); } &&
20119 { ac_try='test -s "conftest.$ac_objext"'
20120 { (eval echo "$as_me:20120: \"$ac_try\"") >&5
20121 (eval $ac_try) 2>&5
20123 echo "$as_me:20123: \$? = $ac_status" >&5
20124 (exit "$ac_status"); }; }; then
20127 echo "$as_me: failed program was:" >&5
20128 cat "conftest.$ac_ext" >&5
20131 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20132 echo "$as_me:20132: result: $cf_result" >&5
20133 echo "${ECHO_T}$cf_result" >&6
20134 if test "$cf_result" = yes ; then
20136 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20138 cat >>confdefs.h <<EOF
20139 #define $cf_result 1
20144 cat >>confdefs.h <<EOF
20145 #define wchar_t long
20152 if test "$NCURSES_OK_WINT_T" = 0 ; then
20154 echo "$as_me:20154: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20155 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20156 cat >"conftest.$ac_ext" <<_ACEOF
20157 #line 20157 "configure"
20158 #include "confdefs.h"
20160 #ifndef _XOPEN_SOURCE_EXTENDED
20161 #define _XOPEN_SOURCE_EXTENDED
20163 #include <${cf_cv_ncurses_header:-curses.h}>
20174 rm -f "conftest.$ac_objext"
20175 if { (eval echo "$as_me:20175: \"$ac_compile\"") >&5
20176 (eval $ac_compile) 2>&5
20178 echo "$as_me:20178: \$? = $ac_status" >&5
20179 (exit "$ac_status"); } &&
20180 { ac_try='test -s "conftest.$ac_objext"'
20181 { (eval echo "$as_me:20181: \"$ac_try\"") >&5
20182 (eval $ac_try) 2>&5
20184 echo "$as_me:20184: \$? = $ac_status" >&5
20185 (exit "$ac_status"); }; }; then
20188 echo "$as_me: failed program was:" >&5
20189 cat "conftest.$ac_ext" >&5
20192 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20193 echo "$as_me:20193: result: $cf_result" >&5
20194 echo "${ECHO_T}$cf_result" >&6
20195 if test "$cf_result" = yes ; then
20197 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20199 cat >>confdefs.h <<EOF
20200 #define $cf_result 1
20205 cat >>confdefs.h <<EOF
20206 #define wint_t long
20222 echo "$as_me:20222: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
20223 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20225 cat >"conftest.$ac_ext" <<_ACEOF
20226 #line 20226 "configure"
20227 #include "confdefs.h"
20229 #ifdef HAVE_XCURSES
20230 #include <xcurses.h>
20231 char * XCursesProgramName = "test";
20233 #include <${cf_cv_ncurses_header:-curses.h}>
20234 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20235 #include <ncursesw/term.h>
20236 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20237 #include <ncurses/term.h>
20238 #elif defined(HAVE_TERM_H)
20247 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20248 const void *foo = (const void *)($cf_data);
20250 const void *foo = &($cf_data);
20252 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20258 rm -f "conftest.$ac_objext"
20259 if { (eval echo "$as_me:20259: \"$ac_compile\"") >&5
20260 (eval $ac_compile) 2>&5
20262 echo "$as_me:20262: \$? = $ac_status" >&5
20263 (exit "$ac_status"); } &&
20264 { ac_try='test -s "conftest.$ac_objext"'
20265 { (eval echo "$as_me:20265: \"$ac_try\"") >&5
20266 (eval $ac_try) 2>&5
20268 echo "$as_me:20268: \$? = $ac_status" >&5
20269 (exit "$ac_status"); }; }; then
20273 echo "$as_me: failed program was:" >&5
20274 cat "conftest.$ac_ext" >&5
20277 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20278 echo "$as_me:20278: result: $cf_result" >&5
20279 echo "${ECHO_T}$cf_result" >&6
20281 if test "$cf_result" = yes ; then
20283 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20285 cat >>confdefs.h <<EOF
20286 #define $cf_result 1
20290 echo "$as_me:20290: checking for data $cf_data in library" >&5
20291 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
20292 # BSD linkers insist on making weak linkage, but resolve at runtime.
20293 if test "$cross_compiling" = yes; then
20296 cat >"conftest.$ac_ext" <<_ACEOF
20297 #line 20297 "configure"
20298 #include "confdefs.h"
20300 #ifdef HAVE_XCURSES
20301 #include <xcurses.h>
20302 char * XCursesProgramName = "test";
20304 #include <${cf_cv_ncurses_header:-curses.h}>
20305 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20306 #include <ncursesw/term.h>
20307 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20308 #include <ncurses/term.h>
20309 #elif defined(HAVE_TERM_H)
20314 extern char $cf_data;
20321 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20322 const void *foo = (const void *)($cf_data);
20324 const void *foo = &($cf_data);
20326 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20328 ${cf_cv_main_return:-return}(foo == 0);
20335 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20336 if { (eval echo "$as_me:20336: \"$ac_link\"") >&5
20337 (eval $ac_link) 2>&5
20339 echo "$as_me:20339: \$? = $ac_status" >&5
20340 (exit "$ac_status"); } &&
20341 { ac_try='test -s "conftest$ac_exeext"'
20342 { (eval echo "$as_me:20342: \"$ac_try\"") >&5
20343 (eval $ac_try) 2>&5
20345 echo "$as_me:20345: \$? = $ac_status" >&5
20346 (exit "$ac_status"); }; }; then
20349 echo "$as_me: failed program was:" >&5
20350 cat "conftest.$ac_ext" >&5
20353 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20356 cat >"conftest.$ac_ext" <<_ACEOF
20357 #line 20357 "configure"
20358 #include "confdefs.h"
20360 #ifdef HAVE_XCURSES
20361 #include <xcurses.h>
20362 char * XCursesProgramName = "test";
20364 #include <${cf_cv_ncurses_header:-curses.h}>
20365 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20366 #include <ncursesw/term.h>
20367 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20368 #include <ncurses/term.h>
20369 #elif defined(HAVE_TERM_H)
20374 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);
20388 rm -f "conftest$ac_exeext"
20389 if { (eval echo "$as_me:20389: \"$ac_link\"") >&5
20390 (eval $ac_link) 2>&5
20392 echo "$as_me:20392: \$? = $ac_status" >&5
20393 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20394 { (eval echo "$as_me:20394: \"$ac_try\"") >&5
20395 (eval $ac_try) 2>&5
20397 echo "$as_me:20397: \$? = $ac_status" >&5
20398 (exit "$ac_status"); }; }; then
20402 echo "$as_me: program exited with status $ac_status" >&5
20403 echo "$as_me: failed program was:" >&5
20404 cat "conftest.$ac_ext" >&5
20407 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20409 echo "$as_me:20409: result: $cf_result" >&5
20410 echo "${ECHO_T}$cf_result" >&6
20411 if test "$cf_result" = yes ; then
20413 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20415 cat >>confdefs.h <<EOF
20416 #define $cf_result 1
20419 # do not exit loop here, since we prefer system's declarations
20424 if test -n "$with_screen" && test "x$with_screen" = "xpdcurses"
20426 echo "$as_me:20426: checking for X" >&5
20427 echo $ECHO_N "checking for X... $ECHO_C" >&6
20429 # Check whether --with-x or --without-x was given.
20430 if test "${with_x+set}" = set; then
20434 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
20435 if test "x$with_x" = xno; then
20436 # The user explicitly disabled X.
20439 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
20440 # Both variables are already set.
20443 if test "${ac_cv_have_x+set}" = set; then
20444 echo $ECHO_N "(cached) $ECHO_C" >&6
20446 # One or both of the vars are not set, and there is no cached value.
20447 ac_x_includes=no ac_x_libraries=no
20448 rm -fr conftest.dir
20449 if mkdir conftest.dir; then
20451 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
20452 cat >Imakefile <<'EOF'
20454 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
20456 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
20457 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
20458 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
20459 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
20460 for ac_extension in a so sl dylib dll; do
20461 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
20462 test -f "$ac_im_libdir/libX11.$ac_extension"; then
20463 ac_im_usrlibdir=$ac_im_libdir; break
20466 # Screen out bogus values from the imake configuration. They are
20467 # bogus both because they are the default anyway, and because
20468 # using them would break gcc on systems where it needs fixed includes.
20469 case $ac_im_incroot in
20471 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
20473 case $ac_im_usrlibdir in
20474 /usr/lib | /lib) ;;
20475 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
20479 rm -fr conftest.dir
20482 # Standard set of common directories for X headers.
20483 # Check X11 before X11Rn because it is often a symlink to the current release.
20500 /usr/local/X11/include
20501 /usr/local/X11R7/include
20502 /usr/local/X11R6/include
20503 /usr/local/X11R5/include
20504 /usr/local/X11R4/include
20506 /usr/local/include/X11
20507 /usr/local/include/X11R7
20508 /usr/local/include/X11R6
20509 /usr/local/include/X11R5
20510 /usr/local/include/X11R4
20514 /usr/XFree86/include/X11
20518 /usr/unsupported/include
20519 /usr/athena/include
20520 /usr/local/x11r5/include
20521 /usr/lpp/Xamples/include
20523 /usr/openwin/include
20524 /usr/openwin/share/include'
20526 if test "$ac_x_includes" = no; then
20527 # Guess where to find include files, by looking for Intrinsic.h.
20528 # First, try using that file with no special directory specified.
20529 cat >"conftest.$ac_ext" <<_ACEOF
20530 #line 20530 "configure"
20531 #include "confdefs.h"
20532 #include <X11/Intrinsic.h>
20534 if { (eval echo "$as_me:20534: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20535 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20537 $EGREP -v '^ *\+' conftest.er1 >conftest.err
20539 cat conftest.err >&5
20540 echo "$as_me:20540: \$? = $ac_status" >&5
20541 (exit "$ac_status"); } >/dev/null; then
20542 if test -s conftest.err; then
20543 ac_cpp_err=$ac_c_preproc_warn_flag
20550 if test -z "$ac_cpp_err"; then
20551 # We can compile using X headers with no special include directory.
20554 echo "$as_me: failed program was:" >&5
20555 cat "conftest.$ac_ext" >&5
20556 for ac_dir in $ac_x_header_dirs; do
20557 if test -r "$ac_dir/X11/Intrinsic.h"; then
20558 ac_x_includes=$ac_dir
20563 rm -f conftest.err "conftest.$ac_ext"
20564 fi # $ac_x_includes = no
20566 if test "$ac_x_libraries" = no; then
20567 # Check for the libraries.
20568 # See if we find them without any special options.
20569 # Don't add to $LIBS permanently.
20572 cat >"conftest.$ac_ext" <<_ACEOF
20573 #line 20573 "configure"
20574 #include "confdefs.h"
20575 #include <X11/Intrinsic.h>
20584 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20585 if { (eval echo "$as_me:20585: \"$ac_link\"") >&5
20586 (eval $ac_link) 2>&5
20588 echo "$as_me:20588: \$? = $ac_status" >&5
20589 (exit "$ac_status"); } &&
20590 { ac_try='test -s "conftest$ac_exeext"'
20591 { (eval echo "$as_me:20591: \"$ac_try\"") >&5
20592 (eval $ac_try) 2>&5
20594 echo "$as_me:20594: \$? = $ac_status" >&5
20595 (exit "$ac_status"); }; }; then
20597 # We can link X programs with no special library path.
20600 echo "$as_me: failed program was:" >&5
20601 cat "conftest.$ac_ext" >&5
20603 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
20605 # Don't even attempt the hair of trying to link an X program!
20606 for ac_extension in a so sl dylib dll; do
20607 if test -r "$ac_dir/libXt.$ac_extension"; then
20608 ac_x_libraries=$ac_dir
20614 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20615 fi # $ac_x_libraries = no
20617 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
20618 # Didn't find X anywhere. Cache the known absence of X.
20619 ac_cv_have_x="have_x=no"
20621 # Record where we found X for the cache.
20622 ac_cv_have_x="have_x=yes \
20623 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
20628 eval "$ac_cv_have_x"
20631 if test "$have_x" != yes; then
20632 echo "$as_me:20632: result: $have_x" >&5
20633 echo "${ECHO_T}$have_x" >&6
20636 # If each of the values was on the command line, it overrides each guess.
20637 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
20638 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
20639 # Update the cache value to reflect the command line values.
20640 ac_cv_have_x="have_x=yes \
20641 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
20642 echo "$as_me:20642: result: libraries $x_libraries, headers $x_includes" >&5
20643 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
20646 if test "$no_x" = yes; then
20647 # Not all programs may use this symbol, but it does not hurt to define it.
20649 cat >>confdefs.h <<\EOF
20650 #define X_DISPLAY_MISSING 1
20658 if test -n "$x_includes"; then
20659 X_CFLAGS="$X_CFLAGS -I$x_includes"
20662 # It would also be nice to do this for all -L options, not just this one.
20663 if test -n "$x_libraries"; then
20664 X_LIBS="$X_LIBS -L$x_libraries"
20665 # For Solaris; some versions of Sun CC require a space after -R and
20666 # others require no space. Words are not sufficient . . . .
20667 case `(uname -sr) 2>/dev/null` in
20669 echo "$as_me:20669: checking whether -R must be followed by a space" >&5
20670 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
20671 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
20672 cat >"conftest.$ac_ext" <<_ACEOF
20673 #line 20673 "configure"
20674 #include "confdefs.h"
20684 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20685 if { (eval echo "$as_me:20685: \"$ac_link\"") >&5
20686 (eval $ac_link) 2>&5
20688 echo "$as_me:20688: \$? = $ac_status" >&5
20689 (exit "$ac_status"); } &&
20690 { ac_try='test -s "conftest$ac_exeext"'
20691 { (eval echo "$as_me:20691: \"$ac_try\"") >&5
20692 (eval $ac_try) 2>&5
20694 echo "$as_me:20694: \$? = $ac_status" >&5
20695 (exit "$ac_status"); }; }; then
20698 echo "$as_me: failed program was:" >&5
20699 cat "conftest.$ac_ext" >&5
20702 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20703 if test $ac_R_nospace = yes; then
20704 echo "$as_me:20704: result: no" >&5
20705 echo "${ECHO_T}no" >&6
20706 X_LIBS="$X_LIBS -R$x_libraries"
20708 LIBS="$ac_xsave_LIBS -R $x_libraries"
20709 cat >"conftest.$ac_ext" <<_ACEOF
20710 #line 20710 "configure"
20711 #include "confdefs.h"
20721 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20722 if { (eval echo "$as_me:20722: \"$ac_link\"") >&5
20723 (eval $ac_link) 2>&5
20725 echo "$as_me:20725: \$? = $ac_status" >&5
20726 (exit "$ac_status"); } &&
20727 { ac_try='test -s "conftest$ac_exeext"'
20728 { (eval echo "$as_me:20728: \"$ac_try\"") >&5
20729 (eval $ac_try) 2>&5
20731 echo "$as_me:20731: \$? = $ac_status" >&5
20732 (exit "$ac_status"); }; }; then
20735 echo "$as_me: failed program was:" >&5
20736 cat "conftest.$ac_ext" >&5
20739 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20740 if test $ac_R_space = yes; then
20741 echo "$as_me:20741: result: yes" >&5
20742 echo "${ECHO_T}yes" >&6
20743 X_LIBS="$X_LIBS -R $x_libraries"
20745 echo "$as_me:20745: result: neither works" >&5
20746 echo "${ECHO_T}neither works" >&6
20749 LIBS=$ac_xsave_LIBS
20753 # Check for system-dependent libraries X programs must link with.
20754 # Do this before checking for the system-independent R6 libraries
20755 # (-lICE), since we may need -lsocket or whatever for X linking.
20757 if test "$ISC" = yes; then
20758 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
20760 # Martyn Johnson says this is needed for Ultrix, if the X
20761 # libraries were built with DECnet support. And Karl Berry says
20762 # the Alpha needs dnet_stub (dnet does not exist).
20763 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
20764 cat >"conftest.$ac_ext" <<_ACEOF
20765 #line 20765 "configure"
20766 #include "confdefs.h"
20768 /* Override any gcc2 internal prototype to avoid an error. */
20772 /* We use char because int might match the return type of a gcc2
20773 builtin and then its argument prototype would still apply. */
20774 char XOpenDisplay ();
20783 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20784 if { (eval echo "$as_me:20784: \"$ac_link\"") >&5
20785 (eval $ac_link) 2>&5
20787 echo "$as_me:20787: \$? = $ac_status" >&5
20788 (exit "$ac_status"); } &&
20789 { ac_try='test -s "conftest$ac_exeext"'
20790 { (eval echo "$as_me:20790: \"$ac_try\"") >&5
20791 (eval $ac_try) 2>&5
20793 echo "$as_me:20793: \$? = $ac_status" >&5
20794 (exit "$ac_status"); }; }; then
20797 echo "$as_me: failed program was:" >&5
20798 cat "conftest.$ac_ext" >&5
20799 echo "$as_me:20799: checking for dnet_ntoa in -ldnet" >&5
20800 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
20801 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
20802 echo $ECHO_N "(cached) $ECHO_C" >&6
20804 ac_check_lib_save_LIBS=$LIBS
20805 LIBS="-ldnet $LIBS"
20806 cat >"conftest.$ac_ext" <<_ACEOF
20807 #line 20807 "configure"
20808 #include "confdefs.h"
20810 /* Override any gcc2 internal prototype to avoid an error. */
20814 /* We use char because int might match the return type of a gcc2
20815 builtin and then its argument prototype would still apply. */
20825 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20826 if { (eval echo "$as_me:20826: \"$ac_link\"") >&5
20827 (eval $ac_link) 2>&5
20829 echo "$as_me:20829: \$? = $ac_status" >&5
20830 (exit "$ac_status"); } &&
20831 { ac_try='test -s "conftest$ac_exeext"'
20832 { (eval echo "$as_me:20832: \"$ac_try\"") >&5
20833 (eval $ac_try) 2>&5
20835 echo "$as_me:20835: \$? = $ac_status" >&5
20836 (exit "$ac_status"); }; }; then
20837 ac_cv_lib_dnet_dnet_ntoa=yes
20839 echo "$as_me: failed program was:" >&5
20840 cat "conftest.$ac_ext" >&5
20841 ac_cv_lib_dnet_dnet_ntoa=no
20843 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20844 LIBS=$ac_check_lib_save_LIBS
20846 echo "$as_me:20846: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
20847 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
20848 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
20849 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
20852 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
20853 echo "$as_me:20853: checking for dnet_ntoa in -ldnet_stub" >&5
20854 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
20855 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
20856 echo $ECHO_N "(cached) $ECHO_C" >&6
20858 ac_check_lib_save_LIBS=$LIBS
20859 LIBS="-ldnet_stub $LIBS"
20860 cat >"conftest.$ac_ext" <<_ACEOF
20861 #line 20861 "configure"
20862 #include "confdefs.h"
20864 /* Override any gcc2 internal prototype to avoid an error. */
20868 /* We use char because int might match the return type of a gcc2
20869 builtin and then its argument prototype would still apply. */
20879 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20880 if { (eval echo "$as_me:20880: \"$ac_link\"") >&5
20881 (eval $ac_link) 2>&5
20883 echo "$as_me:20883: \$? = $ac_status" >&5
20884 (exit "$ac_status"); } &&
20885 { ac_try='test -s "conftest$ac_exeext"'
20886 { (eval echo "$as_me:20886: \"$ac_try\"") >&5
20887 (eval $ac_try) 2>&5
20889 echo "$as_me:20889: \$? = $ac_status" >&5
20890 (exit "$ac_status"); }; }; then
20891 ac_cv_lib_dnet_stub_dnet_ntoa=yes
20893 echo "$as_me: failed program was:" >&5
20894 cat "conftest.$ac_ext" >&5
20895 ac_cv_lib_dnet_stub_dnet_ntoa=no
20897 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20898 LIBS=$ac_check_lib_save_LIBS
20900 echo "$as_me:20900: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
20901 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
20902 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
20903 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
20908 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20909 LIBS="$ac_xsave_LIBS"
20911 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
20912 # to get the SysV transport functions.
20913 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
20915 # The nsl library prevents programs from opening the X display
20916 # on Irix 5.2, according to T.E. Dickey.
20917 # The functions gethostbyname, getservbyname, and inet_addr are
20918 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
20919 echo "$as_me:20919: checking for gethostbyname" >&5
20920 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
20921 if test "${ac_cv_func_gethostbyname+set}" = set; then
20922 echo $ECHO_N "(cached) $ECHO_C" >&6
20924 cat >"conftest.$ac_ext" <<_ACEOF
20925 #line 20925 "configure"
20926 #include "confdefs.h"
20927 #define gethostbyname autoconf_temporary
20928 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
20929 #undef gethostbyname
20935 /* We use char because int might match the return type of a gcc2
20936 builtin and then its argument prototype would still apply. */
20937 char gethostbyname (void);
20943 /* The GNU C library defines stubs for functions which it implements
20944 to always fail with ENOSYS. Some functions are actually named
20945 something starting with __ and the normal name is an alias. */
20946 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
20947 #error found stub for gethostbyname
20950 return gethostbyname ();
20955 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20956 if { (eval echo "$as_me:20956: \"$ac_link\"") >&5
20957 (eval $ac_link) 2>&5
20959 echo "$as_me:20959: \$? = $ac_status" >&5
20960 (exit "$ac_status"); } &&
20961 { ac_try='test -s "conftest$ac_exeext"'
20962 { (eval echo "$as_me:20962: \"$ac_try\"") >&5
20963 (eval $ac_try) 2>&5
20965 echo "$as_me:20965: \$? = $ac_status" >&5
20966 (exit "$ac_status"); }; }; then
20967 ac_cv_func_gethostbyname=yes
20969 echo "$as_me: failed program was:" >&5
20970 cat "conftest.$ac_ext" >&5
20971 ac_cv_func_gethostbyname=no
20973 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20975 echo "$as_me:20975: result: $ac_cv_func_gethostbyname" >&5
20976 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
20978 if test $ac_cv_func_gethostbyname = no; then
20979 echo "$as_me:20979: checking for gethostbyname in -lnsl" >&5
20980 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
20981 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
20982 echo $ECHO_N "(cached) $ECHO_C" >&6
20984 ac_check_lib_save_LIBS=$LIBS
20986 cat >"conftest.$ac_ext" <<_ACEOF
20987 #line 20987 "configure"
20988 #include "confdefs.h"
20990 /* Override any gcc2 internal prototype to avoid an error. */
20994 /* We use char because int might match the return type of a gcc2
20995 builtin and then its argument prototype would still apply. */
20996 char gethostbyname ();
21005 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21006 if { (eval echo "$as_me:21006: \"$ac_link\"") >&5
21007 (eval $ac_link) 2>&5
21009 echo "$as_me:21009: \$? = $ac_status" >&5
21010 (exit "$ac_status"); } &&
21011 { ac_try='test -s "conftest$ac_exeext"'
21012 { (eval echo "$as_me:21012: \"$ac_try\"") >&5
21013 (eval $ac_try) 2>&5
21015 echo "$as_me:21015: \$? = $ac_status" >&5
21016 (exit "$ac_status"); }; }; then
21017 ac_cv_lib_nsl_gethostbyname=yes
21019 echo "$as_me: failed program was:" >&5
21020 cat "conftest.$ac_ext" >&5
21021 ac_cv_lib_nsl_gethostbyname=no
21023 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21024 LIBS=$ac_check_lib_save_LIBS
21026 echo "$as_me:21026: result: $ac_cv_lib_nsl_gethostbyname" >&5
21027 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
21028 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
21029 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
21032 if test $ac_cv_lib_nsl_gethostbyname = no; then
21033 echo "$as_me:21033: checking for gethostbyname in -lbsd" >&5
21034 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
21035 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
21036 echo $ECHO_N "(cached) $ECHO_C" >&6
21038 ac_check_lib_save_LIBS=$LIBS
21040 cat >"conftest.$ac_ext" <<_ACEOF
21041 #line 21041 "configure"
21042 #include "confdefs.h"
21044 /* Override any gcc2 internal prototype to avoid an error. */
21048 /* We use char because int might match the return type of a gcc2
21049 builtin and then its argument prototype would still apply. */
21050 char gethostbyname ();
21059 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21060 if { (eval echo "$as_me:21060: \"$ac_link\"") >&5
21061 (eval $ac_link) 2>&5
21063 echo "$as_me:21063: \$? = $ac_status" >&5
21064 (exit "$ac_status"); } &&
21065 { ac_try='test -s "conftest$ac_exeext"'
21066 { (eval echo "$as_me:21066: \"$ac_try\"") >&5
21067 (eval $ac_try) 2>&5
21069 echo "$as_me:21069: \$? = $ac_status" >&5
21070 (exit "$ac_status"); }; }; then
21071 ac_cv_lib_bsd_gethostbyname=yes
21073 echo "$as_me: failed program was:" >&5
21074 cat "conftest.$ac_ext" >&5
21075 ac_cv_lib_bsd_gethostbyname=no
21077 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21078 LIBS=$ac_check_lib_save_LIBS
21080 echo "$as_me:21080: result: $ac_cv_lib_bsd_gethostbyname" >&5
21081 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
21082 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
21083 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
21089 # lieder@skyler.mavd.honeywell.com says without -lsocket,
21090 # socket/setsockopt and other routines are undefined under SCO ODT
21091 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
21092 # on later versions), says Simon Leinen: it contains gethostby*
21093 # variants that don't use the nameserver (or something). -lsocket
21094 # must be given before -lnsl if both are needed. We assume that
21095 # if connect needs -lnsl, so does gethostbyname.
21096 echo "$as_me:21096: checking for connect" >&5
21097 echo $ECHO_N "checking for connect... $ECHO_C" >&6
21098 if test "${ac_cv_func_connect+set}" = set; then
21099 echo $ECHO_N "(cached) $ECHO_C" >&6
21101 cat >"conftest.$ac_ext" <<_ACEOF
21102 #line 21102 "configure"
21103 #include "confdefs.h"
21104 #define connect autoconf_temporary
21105 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21112 /* We use char because int might match the return type of a gcc2
21113 builtin and then its argument prototype would still apply. */
21114 char connect (void);
21120 /* The GNU C library defines stubs for functions which it implements
21121 to always fail with ENOSYS. Some functions are actually named
21122 something starting with __ and the normal name is an alias. */
21123 #if defined (__stub_connect) || defined (__stub___connect)
21124 #error found stub for connect
21132 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21133 if { (eval echo "$as_me:21133: \"$ac_link\"") >&5
21134 (eval $ac_link) 2>&5
21136 echo "$as_me:21136: \$? = $ac_status" >&5
21137 (exit "$ac_status"); } &&
21138 { ac_try='test -s "conftest$ac_exeext"'
21139 { (eval echo "$as_me:21139: \"$ac_try\"") >&5
21140 (eval $ac_try) 2>&5
21142 echo "$as_me:21142: \$? = $ac_status" >&5
21143 (exit "$ac_status"); }; }; then
21144 ac_cv_func_connect=yes
21146 echo "$as_me: failed program was:" >&5
21147 cat "conftest.$ac_ext" >&5
21148 ac_cv_func_connect=no
21150 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21152 echo "$as_me:21152: result: $ac_cv_func_connect" >&5
21153 echo "${ECHO_T}$ac_cv_func_connect" >&6
21155 if test $ac_cv_func_connect = no; then
21156 echo "$as_me:21156: checking for connect in -lsocket" >&5
21157 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
21158 if test "${ac_cv_lib_socket_connect+set}" = set; then
21159 echo $ECHO_N "(cached) $ECHO_C" >&6
21161 ac_check_lib_save_LIBS=$LIBS
21162 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
21163 cat >"conftest.$ac_ext" <<_ACEOF
21164 #line 21164 "configure"
21165 #include "confdefs.h"
21167 /* Override any gcc2 internal prototype to avoid an error. */
21171 /* We use char because int might match the return type of a gcc2
21172 builtin and then its argument prototype would still apply. */
21182 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21183 if { (eval echo "$as_me:21183: \"$ac_link\"") >&5
21184 (eval $ac_link) 2>&5
21186 echo "$as_me:21186: \$? = $ac_status" >&5
21187 (exit "$ac_status"); } &&
21188 { ac_try='test -s "conftest$ac_exeext"'
21189 { (eval echo "$as_me:21189: \"$ac_try\"") >&5
21190 (eval $ac_try) 2>&5
21192 echo "$as_me:21192: \$? = $ac_status" >&5
21193 (exit "$ac_status"); }; }; then
21194 ac_cv_lib_socket_connect=yes
21196 echo "$as_me: failed program was:" >&5
21197 cat "conftest.$ac_ext" >&5
21198 ac_cv_lib_socket_connect=no
21200 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21201 LIBS=$ac_check_lib_save_LIBS
21203 echo "$as_me:21203: result: $ac_cv_lib_socket_connect" >&5
21204 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
21205 if test "$ac_cv_lib_socket_connect" = yes; then
21206 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
21211 # Guillermo Gomez says -lposix is necessary on A/UX.
21212 echo "$as_me:21212: checking for remove" >&5
21213 echo $ECHO_N "checking for remove... $ECHO_C" >&6
21214 if test "${ac_cv_func_remove+set}" = set; then
21215 echo $ECHO_N "(cached) $ECHO_C" >&6
21217 cat >"conftest.$ac_ext" <<_ACEOF
21218 #line 21218 "configure"
21219 #include "confdefs.h"
21220 #define remove autoconf_temporary
21221 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21228 /* We use char because int might match the return type of a gcc2
21229 builtin and then its argument prototype would still apply. */
21230 char remove (void);
21236 /* The GNU C library defines stubs for functions which it implements
21237 to always fail with ENOSYS. Some functions are actually named
21238 something starting with __ and the normal name is an alias. */
21239 #if defined (__stub_remove) || defined (__stub___remove)
21240 #error found stub for remove
21248 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21249 if { (eval echo "$as_me:21249: \"$ac_link\"") >&5
21250 (eval $ac_link) 2>&5
21252 echo "$as_me:21252: \$? = $ac_status" >&5
21253 (exit "$ac_status"); } &&
21254 { ac_try='test -s "conftest$ac_exeext"'
21255 { (eval echo "$as_me:21255: \"$ac_try\"") >&5
21256 (eval $ac_try) 2>&5
21258 echo "$as_me:21258: \$? = $ac_status" >&5
21259 (exit "$ac_status"); }; }; then
21260 ac_cv_func_remove=yes
21262 echo "$as_me: failed program was:" >&5
21263 cat "conftest.$ac_ext" >&5
21264 ac_cv_func_remove=no
21266 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21268 echo "$as_me:21268: result: $ac_cv_func_remove" >&5
21269 echo "${ECHO_T}$ac_cv_func_remove" >&6
21271 if test $ac_cv_func_remove = no; then
21272 echo "$as_me:21272: checking for remove in -lposix" >&5
21273 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
21274 if test "${ac_cv_lib_posix_remove+set}" = set; then
21275 echo $ECHO_N "(cached) $ECHO_C" >&6
21277 ac_check_lib_save_LIBS=$LIBS
21278 LIBS="-lposix $LIBS"
21279 cat >"conftest.$ac_ext" <<_ACEOF
21280 #line 21280 "configure"
21281 #include "confdefs.h"
21283 /* Override any gcc2 internal prototype to avoid an error. */
21287 /* We use char because int might match the return type of a gcc2
21288 builtin and then its argument prototype would still apply. */
21298 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21299 if { (eval echo "$as_me:21299: \"$ac_link\"") >&5
21300 (eval $ac_link) 2>&5
21302 echo "$as_me:21302: \$? = $ac_status" >&5
21303 (exit "$ac_status"); } &&
21304 { ac_try='test -s "conftest$ac_exeext"'
21305 { (eval echo "$as_me:21305: \"$ac_try\"") >&5
21306 (eval $ac_try) 2>&5
21308 echo "$as_me:21308: \$? = $ac_status" >&5
21309 (exit "$ac_status"); }; }; then
21310 ac_cv_lib_posix_remove=yes
21312 echo "$as_me: failed program was:" >&5
21313 cat "conftest.$ac_ext" >&5
21314 ac_cv_lib_posix_remove=no
21316 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21317 LIBS=$ac_check_lib_save_LIBS
21319 echo "$as_me:21319: result: $ac_cv_lib_posix_remove" >&5
21320 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
21321 if test "$ac_cv_lib_posix_remove" = yes; then
21322 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
21327 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
21328 echo "$as_me:21328: checking for shmat" >&5
21329 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
21330 if test "${ac_cv_func_shmat+set}" = set; then
21331 echo $ECHO_N "(cached) $ECHO_C" >&6
21333 cat >"conftest.$ac_ext" <<_ACEOF
21334 #line 21334 "configure"
21335 #include "confdefs.h"
21336 #define shmat autoconf_temporary
21337 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21344 /* We use char because int might match the return type of a gcc2
21345 builtin and then its argument prototype would still apply. */
21352 /* The GNU C library defines stubs for functions which it implements
21353 to always fail with ENOSYS. Some functions are actually named
21354 something starting with __ and the normal name is an alias. */
21355 #if defined (__stub_shmat) || defined (__stub___shmat)
21356 #error found stub for shmat
21364 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21365 if { (eval echo "$as_me:21365: \"$ac_link\"") >&5
21366 (eval $ac_link) 2>&5
21368 echo "$as_me:21368: \$? = $ac_status" >&5
21369 (exit "$ac_status"); } &&
21370 { ac_try='test -s "conftest$ac_exeext"'
21371 { (eval echo "$as_me:21371: \"$ac_try\"") >&5
21372 (eval $ac_try) 2>&5
21374 echo "$as_me:21374: \$? = $ac_status" >&5
21375 (exit "$ac_status"); }; }; then
21376 ac_cv_func_shmat=yes
21378 echo "$as_me: failed program was:" >&5
21379 cat "conftest.$ac_ext" >&5
21380 ac_cv_func_shmat=no
21382 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21384 echo "$as_me:21384: result: $ac_cv_func_shmat" >&5
21385 echo "${ECHO_T}$ac_cv_func_shmat" >&6
21387 if test $ac_cv_func_shmat = no; then
21388 echo "$as_me:21388: checking for shmat in -lipc" >&5
21389 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
21390 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
21391 echo $ECHO_N "(cached) $ECHO_C" >&6
21393 ac_check_lib_save_LIBS=$LIBS
21395 cat >"conftest.$ac_ext" <<_ACEOF
21396 #line 21396 "configure"
21397 #include "confdefs.h"
21399 /* Override any gcc2 internal prototype to avoid an error. */
21403 /* We use char because int might match the return type of a gcc2
21404 builtin and then its argument prototype would still apply. */
21414 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21415 if { (eval echo "$as_me:21415: \"$ac_link\"") >&5
21416 (eval $ac_link) 2>&5
21418 echo "$as_me:21418: \$? = $ac_status" >&5
21419 (exit "$ac_status"); } &&
21420 { ac_try='test -s "conftest$ac_exeext"'
21421 { (eval echo "$as_me:21421: \"$ac_try\"") >&5
21422 (eval $ac_try) 2>&5
21424 echo "$as_me:21424: \$? = $ac_status" >&5
21425 (exit "$ac_status"); }; }; then
21426 ac_cv_lib_ipc_shmat=yes
21428 echo "$as_me: failed program was:" >&5
21429 cat "conftest.$ac_ext" >&5
21430 ac_cv_lib_ipc_shmat=no
21432 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21433 LIBS=$ac_check_lib_save_LIBS
21435 echo "$as_me:21435: result: $ac_cv_lib_ipc_shmat" >&5
21436 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
21437 if test "$ac_cv_lib_ipc_shmat" = yes; then
21438 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
21444 # Check for libraries that X11R6 Xt/Xaw programs need.
21445 ac_save_LDFLAGS=$LDFLAGS
21446 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
21447 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
21448 # check for ICE first), but we must link in the order -lSM -lICE or
21449 # we get undefined symbols. So assume we have SM if we have ICE.
21450 # These have to be linked with before -lX11, unlike the other
21451 # libraries we check for below, so use a different variable.
21452 # John Interrante, Karl Berry
21453 echo "$as_me:21453: checking for IceConnectionNumber in -lICE" >&5
21454 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
21455 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
21456 echo $ECHO_N "(cached) $ECHO_C" >&6
21458 ac_check_lib_save_LIBS=$LIBS
21459 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
21460 cat >"conftest.$ac_ext" <<_ACEOF
21461 #line 21461 "configure"
21462 #include "confdefs.h"
21464 /* Override any gcc2 internal prototype to avoid an error. */
21468 /* We use char because int might match the return type of a gcc2
21469 builtin and then its argument prototype would still apply. */
21470 char IceConnectionNumber ();
21474 IceConnectionNumber ();
21479 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21480 if { (eval echo "$as_me:21480: \"$ac_link\"") >&5
21481 (eval $ac_link) 2>&5
21483 echo "$as_me:21483: \$? = $ac_status" >&5
21484 (exit "$ac_status"); } &&
21485 { ac_try='test -s "conftest$ac_exeext"'
21486 { (eval echo "$as_me:21486: \"$ac_try\"") >&5
21487 (eval $ac_try) 2>&5
21489 echo "$as_me:21489: \$? = $ac_status" >&5
21490 (exit "$ac_status"); }; }; then
21491 ac_cv_lib_ICE_IceConnectionNumber=yes
21493 echo "$as_me: failed program was:" >&5
21494 cat "conftest.$ac_ext" >&5
21495 ac_cv_lib_ICE_IceConnectionNumber=no
21497 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21498 LIBS=$ac_check_lib_save_LIBS
21500 echo "$as_me:21500: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
21501 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
21502 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
21503 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
21506 LDFLAGS=$ac_save_LDFLAGS
21512 if test "$GCC" = yes || test "$GXX" = yes
21515 if test "$GCC" = yes || test "$GXX" = yes
21519 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
21521 echo "${as_me:-configure}:21521: testing repairing CFLAGS: $CFLAGS ..." 1>&5
21524 for cf_temp_scan in $CFLAGS
21526 case "x$cf_temp_scan" in
21529 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
21530 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
21535 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
21536 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
21541 CFLAGS="$cf_temp_flags"
21542 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
21544 echo "${as_me:-configure}:21544: testing ... fixed $CFLAGS ..." 1>&5
21546 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
21548 echo "${as_me:-configure}:21548: testing ... extra $EXTRA_CFLAGS ..." 1>&5
21554 if test "$GCC" = yes || test "$GXX" = yes
21558 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
21560 echo "${as_me:-configure}:21560: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
21563 for cf_temp_scan in $CPPFLAGS
21565 case "x$cf_temp_scan" in
21568 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
21569 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
21574 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
21575 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
21580 CPPFLAGS="$cf_temp_flags"
21581 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
21583 echo "${as_me:-configure}:21583: testing ... fixed $CPPFLAGS ..." 1>&5
21585 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
21587 echo "${as_me:-configure}:21587: testing ... extra $EXTRA_CFLAGS ..." 1>&5
21593 if test "$GCC" = yes || test "$GXX" = yes
21597 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
21599 echo "${as_me:-configure}:21599: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
21602 for cf_temp_scan in $LDFLAGS
21604 case "x$cf_temp_scan" in
21607 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
21608 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
21613 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
21614 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
21619 LDFLAGS="$cf_temp_flags"
21620 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
21622 echo "${as_me:-configure}:21622: testing ... fixed $LDFLAGS ..." 1>&5
21624 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
21626 echo "${as_me:-configure}:21626: testing ... extra $EXTRA_CFLAGS ..." 1>&5
21632 echo "$as_me:21632: checking if you want to turn on gcc warnings" >&5
21633 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
21635 # Check whether --enable-warnings or --disable-warnings was given.
21636 if test "${enable_warnings+set}" = set; then
21637 enableval="$enable_warnings"
21638 test "$enableval" != yes && enableval=no
21639 if test "$enableval" != "no" ; then
21640 enable_warnings=yes
21649 echo "$as_me:21649: result: $enable_warnings" >&5
21650 echo "${ECHO_T}$enable_warnings" >&6
21651 if test "$enable_warnings" = "yes"
21654 if test "$GCC" = yes || test "$GXX" = yes
21656 cat > conftest.i <<EOF
21658 #define GCC_PRINTF 0
21661 #define GCC_SCANF 0
21663 #ifndef GCC_NORETURN
21664 #define GCC_NORETURN /* nothing */
21667 #define GCC_UNUSED /* nothing */
21670 if test "$GCC" = yes
21672 { echo "$as_me:21672: checking for $CC __attribute__ directives..." >&5
21673 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
21674 cat > "conftest.$ac_ext" <<EOF
21675 #line 21675 "${as_me:-configure}"
21676 #include "confdefs.h"
21677 #include "conftest.h"
21678 #include "conftest.i"
21680 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
21682 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
21685 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
21687 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
21689 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
21690 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
21691 extern GCC_NORETURN void foo(void);
21692 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
21694 cf_printf_attribute=no
21695 cf_scanf_attribute=no
21696 for cf_attribute in scanf printf unused noreturn
21699 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21701 cf_directive="__attribute__(($cf_attribute))"
21702 echo "checking for $CC $cf_directive" 1>&5
21704 case "$cf_attribute" in
21706 cf_printf_attribute=yes
21707 cat >conftest.h <<EOF
21708 #define GCC_$cf_ATTRIBUTE 1
21712 cf_scanf_attribute=yes
21713 cat >conftest.h <<EOF
21714 #define GCC_$cf_ATTRIBUTE 1
21718 cat >conftest.h <<EOF
21719 #define GCC_$cf_ATTRIBUTE $cf_directive
21724 if { (eval echo "$as_me:21724: \"$ac_compile\"") >&5
21725 (eval $ac_compile) 2>&5
21727 echo "$as_me:21727: \$? = $ac_status" >&5
21728 (exit "$ac_status"); }; then
21729 test -n "$verbose" && echo "$as_me:21729: result: ... $cf_attribute" >&5
21730 echo "${ECHO_T}... $cf_attribute" >&6
21731 cat conftest.h >>confdefs.h
21732 case "$cf_attribute" in
21735 cat >>confdefs.h <<EOF
21736 #define GCC_NORETURN $cf_directive
21741 cf_value='/* nothing */'
21742 if test "$cf_printf_attribute" != no ; then
21743 cf_value='__attribute__((format(printf,fmt,var)))'
21745 cat >>confdefs.h <<\EOF
21746 #define GCC_PRINTF 1
21751 cat >>confdefs.h <<EOF
21752 #define GCC_PRINTFLIKE(fmt,var) $cf_value
21757 cf_value='/* nothing */'
21758 if test "$cf_scanf_attribute" != no ; then
21759 cf_value='__attribute__((format(scanf,fmt,var)))'
21761 cat >>confdefs.h <<\EOF
21762 #define GCC_SCANF 1
21767 cat >>confdefs.h <<EOF
21768 #define GCC_SCANFLIKE(fmt,var) $cf_value
21774 cat >>confdefs.h <<EOF
21775 #define GCC_UNUSED $cf_directive
21783 ${FGREP-fgrep} define conftest.i >>confdefs.h
21788 if test "x$have_x" = xyes; then
21790 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
21791 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
21792 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
21793 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
21794 for cf_X_CFLAGS in $X_CFLAGS
21796 case "x$cf_X_CFLAGS" in
21798 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
21801 CFLAGS="$CFLAGS $cf_X_CFLAGS"
21806 cat >"conftest.$ac_ext" <<_ACEOF
21807 #line 21807 "configure"
21808 #include "confdefs.h"
21810 #include <stdlib.h>
21811 #include <X11/Intrinsic.h>
21816 String foo = malloc(1); (void)foo
21821 rm -f "conftest.$ac_objext"
21822 if { (eval echo "$as_me:21822: \"$ac_compile\"") >&5
21823 (eval $ac_compile) 2>&5
21825 echo "$as_me:21825: \$? = $ac_status" >&5
21826 (exit "$ac_status"); } &&
21827 { ac_try='test -s "conftest.$ac_objext"'
21828 { (eval echo "$as_me:21828: \"$ac_try\"") >&5
21829 (eval $ac_try) 2>&5
21831 echo "$as_me:21831: \$? = $ac_status" >&5
21832 (exit "$ac_status"); }; }; then
21834 echo "$as_me:21834: checking for X11/Xt const-feature" >&5
21835 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
21836 if test "${cf_cv_const_x_string+set}" = set; then
21837 echo $ECHO_N "(cached) $ECHO_C" >&6
21840 cat >"conftest.$ac_ext" <<_ACEOF
21841 #line 21841 "configure"
21842 #include "confdefs.h"
21844 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
21845 #undef XTSTRINGDEFINES /* X11R5 and later */
21846 #include <stdlib.h>
21847 #include <X11/Intrinsic.h>
21852 String foo = malloc(1); *foo = 0
21857 rm -f "conftest.$ac_objext"
21858 if { (eval echo "$as_me:21858: \"$ac_compile\"") >&5
21859 (eval $ac_compile) 2>&5
21861 echo "$as_me:21861: \$? = $ac_status" >&5
21862 (exit "$ac_status"); } &&
21863 { ac_try='test -s "conftest.$ac_objext"'
21864 { (eval echo "$as_me:21864: \"$ac_try\"") >&5
21865 (eval $ac_try) 2>&5
21867 echo "$as_me:21867: \$? = $ac_status" >&5
21868 (exit "$ac_status"); }; }; then
21870 cf_cv_const_x_string=no
21873 echo "$as_me: failed program was:" >&5
21874 cat "conftest.$ac_ext" >&5
21876 cf_cv_const_x_string=yes
21879 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21882 echo "$as_me:21882: result: $cf_cv_const_x_string" >&5
21883 echo "${ECHO_T}$cf_cv_const_x_string" >&6
21885 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
21886 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
21887 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
21889 case "$cf_cv_const_x_string" in
21892 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21893 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
21898 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21899 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
21905 echo "$as_me: failed program was:" >&5
21906 cat "conftest.$ac_ext" >&5
21908 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21910 cat > "conftest.$ac_ext" <<EOF
21911 #line 21911 "${as_me:-configure}"
21912 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
21914 if test "$INTEL_COMPILER" = yes
21916 # The "-wdXXX" options suppress warnings:
21917 # remark #1419: external declaration in primary source file
21918 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
21919 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
21920 # remark #193: zero used for undefined preprocessing identifier
21921 # remark #593: variable "curs_sb_left_arrow" was set but never used
21922 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
21923 # remark #869: parameter "tw" was never referenced
21924 # remark #981: operands are evaluated in unspecified order
21925 # warning #279: controlling expression is constant
21927 { echo "$as_me:21927: checking for $CC warning options..." >&5
21928 echo "$as_me: checking for $CC warning options..." >&6;}
21929 cf_save_CFLAGS="$CFLAGS"
21930 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
21942 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
21943 if { (eval echo "$as_me:21943: \"$ac_compile\"") >&5
21944 (eval $ac_compile) 2>&5
21946 echo "$as_me:21946: \$? = $ac_status" >&5
21947 (exit "$ac_status"); }; then
21948 test -n "$verbose" && echo "$as_me:21948: result: ... -$cf_opt" >&5
21949 echo "${ECHO_T}... -$cf_opt" >&6
21950 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
21953 CFLAGS="$cf_save_CFLAGS"
21954 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
21956 { echo "$as_me:21956: checking for $CC warning options..." >&5
21957 echo "$as_me: checking for $CC warning options..." >&6;}
21958 cf_save_CFLAGS="$CFLAGS"
21960 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
21961 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
21962 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
21963 for cf_opt in W Wall \
21964 Wbad-function-cast \
21967 Wdeclaration-after-statement \
21970 Wmissing-declarations \
21971 Wmissing-prototypes \
21975 Wstrict-prototypes \
21976 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
21978 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
21979 if { (eval echo "$as_me:21979: \"$ac_compile\"") >&5
21980 (eval $ac_compile) 2>&5
21982 echo "$as_me:21982: \$? = $ac_status" >&5
21983 (exit "$ac_status"); }; then
21984 test -n "$verbose" && echo "$as_me:21984: result: ... -$cf_opt" >&5
21985 echo "${ECHO_T}... -$cf_opt" >&6
21988 case "$GCC_VERSION" in
21990 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
21992 echo "${as_me:-configure}:21992: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
21998 case "$GCC_VERSION" in
22000 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
22002 echo "${as_me:-configure}:22002: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
22008 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
22011 CFLAGS="$cf_save_CFLAGS"
22019 echo "$as_me:22019: checking if you want to use dmalloc for testing" >&5
22020 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
22022 # Check whether --with-dmalloc or --without-dmalloc was given.
22023 if test "${with_dmalloc+set}" = set; then
22024 withval="$with_dmalloc"
22026 cat >>confdefs.h <<EOF
22027 #define USE_DMALLOC 1
22030 : "${with_cflags:=-g}"
22031 : "${enable_leaks:=no}"
22036 echo "$as_me:22036: result: ${with_dmalloc:-no}" >&5
22037 echo "${ECHO_T}${with_dmalloc:-no}" >&6
22039 case ".$with_cflags" in
22049 cf_new_extra_cppflags=
22051 for cf_add_cflags in -g
22053 case "$cf_fix_cppflags" in
22055 case "$cf_add_cflags" in
22056 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22057 case "$cf_add_cflags" in
22059 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22061 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22062 && test -z "${cf_tst_cflags}" \
22063 && cf_fix_cppflags=yes
22065 if test "$cf_fix_cppflags" = yes ; then
22067 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22068 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22071 elif test "${cf_tst_cflags}" = "\"'" ; then
22073 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22074 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22080 case "$CPPFLAGS" in
22084 case "$cf_add_cflags" in
22086 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22088 CPPFLAGS=`echo "$CPPFLAGS" | \
22089 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22090 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22095 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22096 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22103 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22104 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22111 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22112 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22114 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22116 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22117 && test -z "${cf_tst_cflags}" \
22118 && cf_fix_cppflags=no
22123 if test -n "$cf_new_cflags" ; then
22125 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22126 CFLAGS="${CFLAGS}$cf_new_cflags"
22130 if test -n "$cf_new_cppflags" ; then
22132 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22133 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22137 if test -n "$cf_new_extra_cppflags" ; then
22139 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22140 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22149 if test "$with_dmalloc" = yes ; then
22150 echo "$as_me:22150: checking for dmalloc.h" >&5
22151 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
22152 if test "${ac_cv_header_dmalloc_h+set}" = set; then
22153 echo $ECHO_N "(cached) $ECHO_C" >&6
22155 cat >"conftest.$ac_ext" <<_ACEOF
22156 #line 22156 "configure"
22157 #include "confdefs.h"
22158 #include <dmalloc.h>
22160 if { (eval echo "$as_me:22160: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22161 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22163 $EGREP -v '^ *\+' conftest.er1 >conftest.err
22165 cat conftest.err >&5
22166 echo "$as_me:22166: \$? = $ac_status" >&5
22167 (exit "$ac_status"); } >/dev/null; then
22168 if test -s conftest.err; then
22169 ac_cpp_err=$ac_c_preproc_warn_flag
22176 if test -z "$ac_cpp_err"; then
22177 ac_cv_header_dmalloc_h=yes
22179 echo "$as_me: failed program was:" >&5
22180 cat "conftest.$ac_ext" >&5
22181 ac_cv_header_dmalloc_h=no
22183 rm -f conftest.err "conftest.$ac_ext"
22185 echo "$as_me:22185: result: $ac_cv_header_dmalloc_h" >&5
22186 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
22187 if test "$ac_cv_header_dmalloc_h" = yes; then
22189 echo "$as_me:22189: checking for dmalloc_debug in -ldmalloc" >&5
22190 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
22191 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
22192 echo $ECHO_N "(cached) $ECHO_C" >&6
22194 ac_check_lib_save_LIBS=$LIBS
22195 LIBS="-ldmalloc $LIBS"
22196 cat >"conftest.$ac_ext" <<_ACEOF
22197 #line 22197 "configure"
22198 #include "confdefs.h"
22200 /* Override any gcc2 internal prototype to avoid an error. */
22204 /* We use char because int might match the return type of a gcc2
22205 builtin and then its argument prototype would still apply. */
22206 char dmalloc_debug ();
22215 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22216 if { (eval echo "$as_me:22216: \"$ac_link\"") >&5
22217 (eval $ac_link) 2>&5
22219 echo "$as_me:22219: \$? = $ac_status" >&5
22220 (exit "$ac_status"); } &&
22221 { ac_try='test -s "conftest$ac_exeext"'
22222 { (eval echo "$as_me:22222: \"$ac_try\"") >&5
22223 (eval $ac_try) 2>&5
22225 echo "$as_me:22225: \$? = $ac_status" >&5
22226 (exit "$ac_status"); }; }; then
22227 ac_cv_lib_dmalloc_dmalloc_debug=yes
22229 echo "$as_me: failed program was:" >&5
22230 cat "conftest.$ac_ext" >&5
22231 ac_cv_lib_dmalloc_dmalloc_debug=no
22233 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22234 LIBS=$ac_check_lib_save_LIBS
22236 echo "$as_me:22236: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
22237 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
22238 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
22239 cat >>confdefs.h <<EOF
22240 #define HAVE_LIBDMALLOC 1
22243 LIBS="-ldmalloc $LIBS"
22251 echo "$as_me:22251: checking if you want to use dbmalloc for testing" >&5
22252 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
22254 # Check whether --with-dbmalloc or --without-dbmalloc was given.
22255 if test "${with_dbmalloc+set}" = set; then
22256 withval="$with_dbmalloc"
22258 cat >>confdefs.h <<EOF
22259 #define USE_DBMALLOC 1
22262 : "${with_cflags:=-g}"
22263 : "${enable_leaks:=no}"
22268 echo "$as_me:22268: result: ${with_dbmalloc:-no}" >&5
22269 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
22271 case ".$with_cflags" in
22281 cf_new_extra_cppflags=
22283 for cf_add_cflags in -g
22285 case "$cf_fix_cppflags" in
22287 case "$cf_add_cflags" in
22288 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22289 case "$cf_add_cflags" in
22291 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22293 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22294 && test -z "${cf_tst_cflags}" \
22295 && cf_fix_cppflags=yes
22297 if test "$cf_fix_cppflags" = yes ; then
22299 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22300 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22303 elif test "${cf_tst_cflags}" = "\"'" ; then
22305 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22306 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22312 case "$CPPFLAGS" in
22316 case "$cf_add_cflags" in
22318 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22320 CPPFLAGS=`echo "$CPPFLAGS" | \
22321 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22322 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22327 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22328 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22335 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22336 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22343 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22344 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22346 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22348 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22349 && test -z "${cf_tst_cflags}" \
22350 && cf_fix_cppflags=no
22355 if test -n "$cf_new_cflags" ; then
22357 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22358 CFLAGS="${CFLAGS}$cf_new_cflags"
22362 if test -n "$cf_new_cppflags" ; then
22364 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22365 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22369 if test -n "$cf_new_extra_cppflags" ; then
22371 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22372 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22381 if test "$with_dbmalloc" = yes ; then
22382 echo "$as_me:22382: checking for dbmalloc.h" >&5
22383 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
22384 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
22385 echo $ECHO_N "(cached) $ECHO_C" >&6
22387 cat >"conftest.$ac_ext" <<_ACEOF
22388 #line 22388 "configure"
22389 #include "confdefs.h"
22390 #include <dbmalloc.h>
22392 if { (eval echo "$as_me:22392: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22393 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22395 $EGREP -v '^ *\+' conftest.er1 >conftest.err
22397 cat conftest.err >&5
22398 echo "$as_me:22398: \$? = $ac_status" >&5
22399 (exit "$ac_status"); } >/dev/null; then
22400 if test -s conftest.err; then
22401 ac_cpp_err=$ac_c_preproc_warn_flag
22408 if test -z "$ac_cpp_err"; then
22409 ac_cv_header_dbmalloc_h=yes
22411 echo "$as_me: failed program was:" >&5
22412 cat "conftest.$ac_ext" >&5
22413 ac_cv_header_dbmalloc_h=no
22415 rm -f conftest.err "conftest.$ac_ext"
22417 echo "$as_me:22417: result: $ac_cv_header_dbmalloc_h" >&5
22418 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
22419 if test "$ac_cv_header_dbmalloc_h" = yes; then
22421 echo "$as_me:22421: checking for debug_malloc in -ldbmalloc" >&5
22422 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
22423 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
22424 echo $ECHO_N "(cached) $ECHO_C" >&6
22426 ac_check_lib_save_LIBS=$LIBS
22427 LIBS="-ldbmalloc $LIBS"
22428 cat >"conftest.$ac_ext" <<_ACEOF
22429 #line 22429 "configure"
22430 #include "confdefs.h"
22432 /* Override any gcc2 internal prototype to avoid an error. */
22436 /* We use char because int might match the return type of a gcc2
22437 builtin and then its argument prototype would still apply. */
22438 char debug_malloc ();
22447 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22448 if { (eval echo "$as_me:22448: \"$ac_link\"") >&5
22449 (eval $ac_link) 2>&5
22451 echo "$as_me:22451: \$? = $ac_status" >&5
22452 (exit "$ac_status"); } &&
22453 { ac_try='test -s "conftest$ac_exeext"'
22454 { (eval echo "$as_me:22454: \"$ac_try\"") >&5
22455 (eval $ac_try) 2>&5
22457 echo "$as_me:22457: \$? = $ac_status" >&5
22458 (exit "$ac_status"); }; }; then
22459 ac_cv_lib_dbmalloc_debug_malloc=yes
22461 echo "$as_me: failed program was:" >&5
22462 cat "conftest.$ac_ext" >&5
22463 ac_cv_lib_dbmalloc_debug_malloc=no
22465 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22466 LIBS=$ac_check_lib_save_LIBS
22468 echo "$as_me:22468: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
22469 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
22470 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
22471 cat >>confdefs.h <<EOF
22472 #define HAVE_LIBDBMALLOC 1
22475 LIBS="-ldbmalloc $LIBS"
22483 echo "$as_me:22483: checking if you want to use valgrind for testing" >&5
22484 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
22486 # Check whether --with-valgrind or --without-valgrind was given.
22487 if test "${with_valgrind+set}" = set; then
22488 withval="$with_valgrind"
22490 cat >>confdefs.h <<EOF
22491 #define USE_VALGRIND 1
22494 : "${with_cflags:=-g}"
22495 : "${enable_leaks:=no}"
22500 echo "$as_me:22500: result: ${with_valgrind:-no}" >&5
22501 echo "${ECHO_T}${with_valgrind:-no}" >&6
22503 case ".$with_cflags" in
22513 cf_new_extra_cppflags=
22515 for cf_add_cflags in -g
22517 case "$cf_fix_cppflags" in
22519 case "$cf_add_cflags" in
22520 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22521 case "$cf_add_cflags" in
22523 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22525 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22526 && test -z "${cf_tst_cflags}" \
22527 && cf_fix_cppflags=yes
22529 if test "$cf_fix_cppflags" = yes ; then
22531 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22532 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22535 elif test "${cf_tst_cflags}" = "\"'" ; then
22537 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22538 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22544 case "$CPPFLAGS" in
22548 case "$cf_add_cflags" in
22550 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22552 CPPFLAGS=`echo "$CPPFLAGS" | \
22553 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22554 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22559 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22560 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22567 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22568 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22575 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22576 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22578 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22580 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22581 && test -z "${cf_tst_cflags}" \
22582 && cf_fix_cppflags=no
22587 if test -n "$cf_new_cflags" ; then
22589 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22590 CFLAGS="${CFLAGS}$cf_new_cflags"
22594 if test -n "$cf_new_cppflags" ; then
22596 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22597 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22601 if test -n "$cf_new_extra_cppflags" ; then
22603 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22604 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22613 echo "$as_me:22613: checking if you want to perform memory-leak testing" >&5
22614 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
22616 # Check whether --enable-leaks or --disable-leaks was given.
22617 if test "${enable_leaks+set}" = set; then
22618 enableval="$enable_leaks"
22619 enable_leaks=$enableval
22623 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
22624 echo "$as_me:22624: result: $with_no_leaks" >&5
22625 echo "${ECHO_T}$with_no_leaks" >&6
22627 if test "$enable_leaks" = no ; then
22629 cat >>confdefs.h <<\EOF
22633 cat >>confdefs.h <<\EOF
22634 #define YY_NO_LEAKS 1
22640 if test "x$cf_cv_enable_rpath" != xno
22642 echo "$as_me:22642: checking for an rpath option" >&5
22643 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
22644 case "$cf_cv_system_name" in
22646 if test "$GCC" = yes; then
22647 LD_RPATH_OPT="-Wl,-rpath,"
22649 LD_RPATH_OPT="-rpath "
22652 (linux*|gnu*|k*bsd*-gnu|freebsd*)
22653 LD_RPATH_OPT="-Wl,-rpath,"
22655 (openbsd[2-9].*|mirbsd*)
22656 LD_RPATH_OPT="-Wl,-rpath,"
22659 LD_RPATH_OPT="-rpath "
22662 LD_RPATH_OPT="-Wl,-rpath,"
22665 LD_RPATH_OPT="-rpath "
22673 echo "$as_me:22673: result: $LD_RPATH_OPT" >&5
22674 echo "${ECHO_T}$LD_RPATH_OPT" >&6
22676 case "x$LD_RPATH_OPT" in
22678 echo "$as_me:22678: checking if we need a space after rpath option" >&5
22679 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
22680 cf_save_LIBS="$LIBS"
22682 cf_add_libs="$LIBS"
22685 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22686 # filter duplicates
22687 for cf_add_1lib in $cf_add_0lib; do
22688 for cf_add_2lib in $cf_add_libs; do
22689 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22694 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22696 LIBS="$cf_add_libs"
22698 cat >"conftest.$ac_ext" <<_ACEOF
22699 #line 22699 "configure"
22700 #include "confdefs.h"
22710 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22711 if { (eval echo "$as_me:22711: \"$ac_link\"") >&5
22712 (eval $ac_link) 2>&5
22714 echo "$as_me:22714: \$? = $ac_status" >&5
22715 (exit "$ac_status"); } &&
22716 { ac_try='test -s "conftest$ac_exeext"'
22717 { (eval echo "$as_me:22717: \"$ac_try\"") >&5
22718 (eval $ac_try) 2>&5
22720 echo "$as_me:22720: \$? = $ac_status" >&5
22721 (exit "$ac_status"); }; }; then
22724 echo "$as_me: failed program was:" >&5
22725 cat "conftest.$ac_ext" >&5
22728 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22729 LIBS="$cf_save_LIBS"
22730 echo "$as_me:22730: result: $cf_rpath_space" >&5
22731 echo "${ECHO_T}$cf_rpath_space" >&6
22732 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
22737 echo "$as_me:22737: checking if rpath-hack should be disabled" >&5
22738 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
22740 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
22741 if test "${enable_rpath_hack+set}" = set; then
22742 enableval="$enable_rpath_hack"
22743 test "$enableval" != no && enableval=yes
22744 if test "$enableval" != "yes" ; then
22745 enable_rpath_hack=no
22747 enable_rpath_hack=yes
22751 enable_rpath_hack=yes
22754 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
22755 echo "$as_me:22755: result: $cf_disable_rpath_hack" >&5
22756 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
22758 if test "$enable_rpath_hack" = yes ; then
22760 echo "$as_me:22760: checking for updated LDFLAGS" >&5
22761 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
22762 if test -n "$LD_RPATH_OPT" ; then
22763 echo "$as_me:22763: result: maybe" >&5
22764 echo "${ECHO_T}maybe" >&6
22768 # Extract the first word of "$ac_prog", so it can be a program name with args.
22769 set dummy $ac_prog; ac_word=$2
22770 echo "$as_me:22770: checking for $ac_word" >&5
22771 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22772 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
22773 echo $ECHO_N "(cached) $ECHO_C" >&6
22775 if test -n "$cf_ldd_prog"; then
22776 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
22778 ac_save_IFS=$IFS; IFS=$ac_path_separator
22780 for ac_dir in $ac_dummy; do
22782 test -z "$ac_dir" && ac_dir=.
22783 $as_executable_p "$ac_dir/$ac_word" || continue
22784 ac_cv_prog_cf_ldd_prog="$ac_prog"
22785 echo "$as_me:22785: found $ac_dir/$ac_word" >&5
22791 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
22792 if test -n "$cf_ldd_prog"; then
22793 echo "$as_me:22793: result: $cf_ldd_prog" >&5
22794 echo "${ECHO_T}$cf_ldd_prog" >&6
22796 echo "$as_me:22796: result: no" >&5
22797 echo "${ECHO_T}no" >&6
22800 test -n "$cf_ldd_prog" && break
22802 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
22804 cf_rpath_list="/usr/lib /lib"
22805 if test "$cf_ldd_prog" != no
22809 cat >"conftest.$ac_ext" <<_ACEOF
22810 #line 22810 "configure"
22811 #include "confdefs.h"
22821 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22822 if { (eval echo "$as_me:22822: \"$ac_link\"") >&5
22823 (eval $ac_link) 2>&5
22825 echo "$as_me:22825: \$? = $ac_status" >&5
22826 (exit "$ac_status"); } &&
22827 { ac_try='test -s "conftest$ac_exeext"'
22828 { (eval echo "$as_me:22828: \"$ac_try\"") >&5
22829 (eval $ac_try) 2>&5
22831 echo "$as_me:22831: \$? = $ac_status" >&5
22832 (exit "$ac_status"); }; }; then
22833 cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
22834 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
22836 echo "$as_me: failed program was:" >&5
22837 cat "conftest.$ac_ext" >&5
22839 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22841 # If we passed the link-test, but get a "not found" on a given library,
22842 # this could be due to inept reconfiguration of gcc to make it only
22843 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
22844 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
22845 # /usr/local libraries.
22846 if test -n "$cf_rpath_oops"
22848 for cf_rpath_src in $cf_rpath_oops
22850 for cf_rpath_dir in \
22855 if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
22857 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
22859 echo "${as_me:-configure}:22859: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
22861 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
22869 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
22871 echo "${as_me:-configure}:22871: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
22873 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
22875 echo "${as_me:-configure}:22875: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
22878 for cf_rpath_src in $LDFLAGS
22880 case "$cf_rpath_src" in
22883 # check if this refers to a directory which we will ignore
22885 if test -n "$cf_rpath_list"
22887 for cf_rpath_item in $cf_rpath_list
22889 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
22897 if test "$cf_rpath_skip" = no
22899 # transform the option
22900 if test "$LD_RPATH_OPT" = "-R " ; then
22901 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
22903 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
22906 # if we have not already added this, add it now
22907 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
22908 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
22910 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
22912 echo "${as_me:-configure}:22912: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
22914 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
22919 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
22921 LDFLAGS=$cf_rpath_dst
22923 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
22925 echo "${as_me:-configure}:22925: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
22927 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
22929 echo "${as_me:-configure}:22929: testing ...checking LIBS $LIBS ..." 1>&5
22932 for cf_rpath_src in $LIBS
22934 case "$cf_rpath_src" in
22937 # check if this refers to a directory which we will ignore
22939 if test -n "$cf_rpath_list"
22941 for cf_rpath_item in $cf_rpath_list
22943 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
22951 if test "$cf_rpath_skip" = no
22953 # transform the option
22954 if test "$LD_RPATH_OPT" = "-R " ; then
22955 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
22957 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
22960 # if we have not already added this, add it now
22961 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
22962 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
22964 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
22966 echo "${as_me:-configure}:22966: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
22968 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
22973 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
22977 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
22979 echo "${as_me:-configure}:22979: testing ...checked LIBS $LIBS ..." 1>&5
22981 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
22983 echo "${as_me:-configure}:22983: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
22986 echo "$as_me:22986: result: no" >&5
22987 echo "${ECHO_T}no" >&6
22995 ac_config_files="$ac_config_files Makefile"
22996 ac_config_commands="$ac_config_commands default"
22997 cat >confcache <<\_ACEOF
22998 # This file is a shell script that caches the results of configure
22999 # tests run on this system so they can be shared between configure
23000 # scripts and configure runs, see configure's option --config-cache.
23001 # It is not useful on other systems. If it contains results you don't
23002 # want to keep, you may remove or edit it.
23004 # config.status only pays attention to the cache file if you give it
23005 # the --recheck option to rerun configure.
23007 # `ac_cv_env_foo' variables (set or unset) will be overriden when
23008 # loading this file, other *unset* `ac_cv_foo' will be assigned the
23009 # following values.
23013 # The following way of writing the cache mishandles newlines in values,
23014 # but we know of no workaround that is simple, portable, and efficient.
23015 # So, don't put newlines in cache variables' values.
23016 # Ultrix sh set writes to stderr and can't be redirected directly,
23017 # and sets the high bit in the cache file unless we assign to the vars.
23020 case `(ac_space=' '; set | grep ac_space) 2>&1` in
23022 # `set' does not quote correctly, so add quotes (double-quote
23023 # substitution turns \\\\ into \\, and sed turns \\ into \).
23026 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23029 # `set' quotes correctly as required by POSIX, so do not add quotes.
23031 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
23038 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23040 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23042 if cmp -s $cache_file confcache; then :; else
23043 if test -w $cache_file; then
23044 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23045 cat confcache >$cache_file
23047 echo "not updating unwritable cache $cache_file"
23052 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23053 # Let make expand exec_prefix.
23054 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23056 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23057 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23058 # trailing colons and then remove the whole line if VPATH becomes empty
23059 # (actually we leave an empty line to preserve line numbers).
23060 if test "x$srcdir" = x.; then
23061 ac_vpsub='/^[ ]*VPATH[ ]*=/{
23062 s/:*\$(srcdir):*/:/;
23063 s/:*\${srcdir}:*/:/;
23065 s/^\([^=]*=[ ]*\):*/\1/;
23071 DEFS=-DHAVE_CONFIG_H
23073 : "${CONFIG_STATUS=./config.status}"
23074 ac_clean_files_save=$ac_clean_files
23075 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23076 { echo "$as_me:23076: creating $CONFIG_STATUS" >&5
23077 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23078 cat >"$CONFIG_STATUS" <<_ACEOF
23080 # Generated automatically by configure.
23081 # Run this file to recreate the current configuration.
23082 # Compiler output produced by configure, useful for debugging
23083 # configure, is in config.log if it exists.
23086 SHELL=\${CONFIG_SHELL-$SHELL}
23087 ac_cs_invocation="\$0 \$@"
23089 CLICOLOR_FORCE= GREP_OPTIONS=
23090 unset CLICOLOR_FORCE GREP_OPTIONS
23093 cat >>"$CONFIG_STATUS" <<\_ACEOF
23094 # Be Bourne compatible
23095 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23098 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23102 # Name of the executable.
23103 as_me=`echo "$0" |sed 's,.*[\\/],,'`
23105 if expr a : '\(a\)' >/dev/null 2>&1; then
23111 rm -f conf$$ conf$$.exe conf$$.file
23113 if ln -s conf$$.file conf$$ 2>/dev/null; then
23114 # We could just check for DJGPP; but this test a) works b) is more generic
23115 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23116 if test -f conf$$.exe; then
23117 # Don't use ln at all; we don't have any links
23122 elif ln conf$$.file conf$$ 2>/dev/null; then
23127 rm -f conf$$ conf$$.exe conf$$.file
23129 as_executable_p="test -f"
23131 # Support unset when possible.
23132 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
23139 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
23140 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
23141 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
23142 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
23143 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
23144 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
23145 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
23146 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
23149 # We need space, tab and new line, in precisely that order.
23155 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
23161 # Files that config.status was made for.
23162 if test -n "$ac_config_files"; then
23163 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
23166 if test -n "$ac_config_headers"; then
23167 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
23170 if test -n "$ac_config_links"; then
23171 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
23174 if test -n "$ac_config_commands"; then
23175 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
23178 cat >>"$CONFIG_STATUS" <<\EOF
23181 \`$as_me' instantiates files from templates according to the
23182 current configuration.
23184 Usage: $0 [OPTIONS] [FILE]...
23186 -h, --help print this help, then exit
23187 -V, --version print version number, then exit
23188 -d, --debug don't remove temporary files
23189 --recheck update $as_me by reconfiguring in the same conditions
23190 --file=FILE[:TEMPLATE]
23191 instantiate the configuration file FILE
23192 --header=FILE[:TEMPLATE]
23193 instantiate the configuration header FILE
23195 Configuration files:
23198 Configuration headers:
23201 Configuration commands:
23204 Report bugs to <dickey@invisible-island.net>."
23207 cat >>"$CONFIG_STATUS" <<EOF
23210 configured by $0, generated by GNU Autoconf 2.52.20210509,
23211 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23213 Copyright 2003-2020,2021 Thomas E. Dickey
23214 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
23215 Free Software Foundation, Inc.
23216 This config.status script is free software; the Free Software Foundation
23217 gives unlimited permission to copy, distribute and modify it."
23222 cat >>"$CONFIG_STATUS" <<\EOF
23223 # If no file are specified by the user, then we need to provide default
23224 # value. By we need to know if files were specified by the user.
23230 ac_option=`expr "x$1" : 'x\([^=]*\)='`
23231 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23233 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
23237 *) # This is not an option, so the user has probably given explicit
23239 ac_need_defaults=false;;
23243 # Handling of the options.
23245 cat >>"$CONFIG_STATUS" <<EOF
23246 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23247 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
23248 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
23250 cat >>"$CONFIG_STATUS" <<\EOF
23251 --version | --vers* | -V )
23252 echo "$ac_cs_version"; exit 0 ;;
23254 # Conflict between --help and --header
23255 { { echo "$as_me:23255: error: ambiguous option: $1
23256 Try \`$0 --help' for more information." >&5
23257 echo "$as_me: error: ambiguous option: $1
23258 Try \`$0 --help' for more information." >&2;}
23259 { (exit 1); exit 1; }; };;
23260 --help | --hel | -h )
23261 echo "$ac_cs_usage"; exit 0 ;;
23262 --debug | --d* | -d )
23264 --file | --fil | --fi | --f )
23266 CONFIG_FILES="$CONFIG_FILES $1"
23267 ac_need_defaults=false;;
23268 --header | --heade | --head | --hea )
23270 CONFIG_HEADERS="$CONFIG_HEADERS $1"
23271 ac_need_defaults=false;;
23273 # This is an error.
23274 -*) { { echo "$as_me:23274: error: unrecognized option: $1
23275 Try \`$0 --help' for more information." >&5
23276 echo "$as_me: error: unrecognized option: $1
23277 Try \`$0 --help' for more information." >&2;}
23278 { (exit 1); exit 1; }; } ;;
23280 *) ac_config_targets="$ac_config_targets $1" ;;
23289 ## ----------------------- ##
23290 ## Running config.status. ##
23291 ## ----------------------- ##
23293 This file was extended by $as_me 2.52.20210509, executed with
23294 CONFIG_FILES = $CONFIG_FILES
23295 CONFIG_HEADERS = $CONFIG_HEADERS
23296 CONFIG_LINKS = $CONFIG_LINKS
23297 CONFIG_COMMANDS = $CONFIG_COMMANDS
23298 > "$ac_cs_invocation"
23299 on `(hostname || uname -n) 2>/dev/null | sed 1q`
23304 cat >>"$CONFIG_STATUS" <<EOF
23306 # INIT-COMMANDS section.
23316 cat >>"$CONFIG_STATUS" <<\EOF
23317 for ac_config_target in $ac_config_targets
23319 case "$ac_config_target" in
23320 # Handling of arguments.
23321 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23322 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23323 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
23324 *) { { echo "$as_me:23324: error: invalid argument: $ac_config_target" >&5
23325 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23326 { (exit 1); exit 1; }; };;
23330 # If the user did not use the arguments to specify the items to instantiate,
23331 # then the envvar interface is used. Set only those that are not.
23332 # We use the long form for the default assignment because of an extremely
23333 # bizarre bug on SunOS 4.1.3.
23334 if "$ac_need_defaults"; then
23335 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23336 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23337 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23340 # Create a temporary directory, and hook for its removal unless debugging.
23343 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23344 trap '{ (exit 1); exit 1; }' 1 2 13 15
23347 # Create a (secure) tmp directory for tmp files.
23350 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
23351 test -n "$tmp" && test -d "$tmp"
23354 tmp=$TMPDIR/cs$$-$RANDOM
23355 (umask 077 && mkdir $tmp)
23358 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
23359 { (exit 1); exit 1; }
23364 cat >>"$CONFIG_STATUS" <<EOF
23367 # CONFIG_FILES section.
23370 # No need to generate the scripts if there are no CONFIG_FILES.
23371 # This happens for instance when ./config.status config.h
23372 if test -n "\$CONFIG_FILES"; then
23373 # Protect against being on the right side of a sed subst in config.status.
23374 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23375 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23376 s,@SHELL@,$SHELL,;t t
23377 s,@exec_prefix@,$exec_prefix,;t t
23378 s,@prefix@,$prefix,;t t
23379 s,@program_transform_name@,$program_transform_name,;t t
23380 s,@bindir@,$bindir,;t t
23381 s,@sbindir@,$sbindir,;t t
23382 s,@libexecdir@,$libexecdir,;t t
23383 s,@datarootdir@,$datarootdir,;t t
23384 s,@datadir@,$datadir,;t t
23385 s,@sysconfdir@,$sysconfdir,;t t
23386 s,@sharedstatedir@,$sharedstatedir,;t t
23387 s,@localstatedir@,$localstatedir,;t t
23388 s,@runstatedir@,$runstatedir,;t t
23389 s,@libdir@,$libdir,;t t
23390 s,@includedir@,$includedir,;t t
23391 s,@oldincludedir@,$oldincludedir,;t t
23392 s,@infodir@,$infodir,;t t
23393 s,@mandir@,$mandir,;t t
23394 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23395 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23396 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23397 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23398 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23399 s,@build_alias@,$build_alias,;t t
23400 s,@host_alias@,$host_alias,;t t
23401 s,@target_alias@,$target_alias,;t t
23402 s,@ECHO_C@,$ECHO_C,;t t
23403 s,@ECHO_N@,$ECHO_N,;t t
23404 s,@ECHO_T@,$ECHO_T,;t t
23405 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23406 s,@DEFS@,$DEFS,;t t
23407 s,@LIBS@,$LIBS,;t t
23408 s,@build@,$build,;t t
23409 s,@build_cpu@,$build_cpu,;t t
23410 s,@build_vendor@,$build_vendor,;t t
23411 s,@build_os@,$build_os,;t t
23412 s,@host@,$host,;t t
23413 s,@host_cpu@,$host_cpu,;t t
23414 s,@host_vendor@,$host_vendor,;t t
23415 s,@host_os@,$host_os,;t t
23416 s,@SET_MAKE@,$SET_MAKE,;t t
23418 s,@CFLAGS@,$CFLAGS,;t t
23419 s,@LDFLAGS@,$LDFLAGS,;t t
23420 s,@CPPFLAGS@,$CPPFLAGS,;t t
23421 s,@ac_ct_CC@,$ac_ct_CC,;t t
23422 s,@EXEEXT@,$EXEEXT,;t t
23423 s,@OBJEXT@,$OBJEXT,;t t
23424 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
23426 s,@GREP@,$GREP,;t t
23427 s,@EGREP@,$EGREP,;t t
23429 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23430 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23431 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
23432 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
23433 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
23434 s,@LINT@,$LINT,;t t
23435 s,@LINT_OPTS@,$LINT_OPTS,;t t
23436 s,@CTAGS@,$CTAGS,;t t
23437 s,@ETAGS@,$ETAGS,;t t
23438 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
23439 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
23440 s,@MATH_LIB@,$MATH_LIB,;t t
23441 s,@top_builddir@,$top_builddir,;t t
23442 s,@CC_G_OPT@,$CC_G_OPT,;t t
23443 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
23444 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
23445 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
23446 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
23448 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23449 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23450 s,@LD_MODEL@,$LD_MODEL,;t t
23451 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
23452 s,@LIBTOOL@,$LIBTOOL,;t t
23453 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
23454 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
23455 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
23456 s,@LIB_LINK@,$LIB_LINK,;t t
23457 s,@LINK_TESTS@,$LINK_TESTS,;t t
23458 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
23459 s,@PACKAGE@,$PACKAGE,;t t
23460 s,@PTHREAD@,$PTHREAD,;t t
23461 s,@TEST_ARGS@,$TEST_ARGS,;t t
23462 s,@TEST_DEPS@,$TEST_DEPS,;t t
23463 s,@TEST_LIBS@,$TEST_LIBS,;t t
23464 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23465 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23466 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
23467 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
23468 s,@includesubdir@,$includesubdir,;t t
23469 s,@FGREP@,$FGREP,;t t
23470 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
23471 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
23472 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
23473 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
23474 s,@ECHO_LT@,$ECHO_LT,;t t
23475 s,@ECHO_LD@,$ECHO_LD,;t t
23476 s,@RULE_CC@,$RULE_CC,;t t
23477 s,@SHOW_CC@,$SHOW_CC,;t t
23478 s,@ECHO_CC@,$ECHO_CC,;t t
23479 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
23480 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
23481 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
23482 s,@X_CFLAGS@,$X_CFLAGS,;t t
23483 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
23484 s,@X_LIBS@,$X_LIBS,;t t
23485 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
23486 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
23487 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
23488 s,@RGB_PATH@,$RGB_PATH,;t t
23489 s,@no_x11_rgb@,$no_x11_rgb,;t t
23490 s,@FORM_NAME@,$FORM_NAME,;t t
23491 s,@MENU_NAME@,$MENU_NAME,;t t
23492 s,@PANEL_NAME@,$PANEL_NAME,;t t
23493 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
23494 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
23495 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
23500 cat >>"$CONFIG_STATUS" <<\EOF
23501 # Split the substitutions into bite-sized pieces for seds with
23502 # small command number limits, like on Digital OSF/1 and HP-UX.
23503 ac_max_sed_lines=48
23504 ac_sed_frag=1 # Number of current file.
23505 ac_beg=1 # First line for current file.
23506 ac_end=$ac_max_sed_lines # Line after last line for current file.
23509 while "$ac_more_lines"; do
23510 if test "$ac_beg" -gt 1; then
23511 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23513 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23515 if test ! -s $tmp/subs.frag; then
23516 ac_more_lines=false
23518 # The purpose of the label and of the branching condition is to
23519 # speed up the sed processing (if there are no `@' at all, there
23520 # is no need to browse any of the substitutions).
23521 # These are the two extra sed commands mentioned above.
23523 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23524 # It is possible to make a multiline substitution using escaped newlines.
23525 # Ensure that we do not split the substitution between script fragments.
23527 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
23528 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
23529 if test -s $tmp/subs.next; then
23530 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
23531 if test ! -s $tmp/subs.edit; then
23532 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
23533 if test ! -s $tmp/subs.edit; then
23534 if test "$ac_beg" -gt 1; then
23535 ac_end=`expr "$ac_end" - 1`
23542 if test -z "$ac_sed_cmds"; then
23543 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23545 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23547 ac_sed_frag=`expr "$ac_sed_frag" + 1`
23549 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
23552 if test -z "$ac_sed_cmds"; then
23555 fi # test -n "$CONFIG_FILES"
23558 cat >>"$CONFIG_STATUS" <<\EOF
23559 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23560 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23562 - | *:- | *:-:* ) # input from stdin
23564 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23565 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23566 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23567 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23568 * ) ac_file_in=$ac_file.in ;;
23571 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23572 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23573 X"$ac_file" : 'X\(//\)[^/]' \| \
23574 X"$ac_file" : 'X\(//\)$' \| \
23575 X"$ac_file" : 'X\(/\)' \| \
23576 . : '\(.\)' 2>/dev/null ||
23578 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23579 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23580 /^X\(\/\/\)$/{ s//\1/; q; }
23581 /^X\(\/\).*/{ s//\1/; q; }
23583 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23584 { case "$ac_dir" in
23585 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23589 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23590 case $as_mkdir_dir in
23591 # Skip DOS drivespec
23592 ?:) as_incr_dir=$as_mkdir_dir ;;
23594 as_incr_dir=$as_incr_dir/$as_mkdir_dir
23595 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23600 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23601 # A "../" for each directory in $ac_dir_suffix.
23602 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23604 ac_dir_suffix= ac_dots=
23609 if test -z "$ac_dots"; then
23612 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
23614 [\\/]* | ?:[\\/]* )
23615 ac_srcdir="$srcdir$ac_dir_suffix";
23616 ac_top_srcdir="$srcdir" ;;
23617 *) # Relative path.
23618 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
23619 ac_top_srcdir="$ac_dots$srcdir" ;;
23623 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23624 *) ac_INSTALL=$ac_dots$INSTALL ;;
23627 if test x"$ac_file" != x-; then
23628 { echo "$as_me:23628: creating $ac_file" >&5
23629 echo "$as_me: creating $ac_file" >&6;}
23632 # Let's still pretend it is `configure' which instantiates (i.e., don't
23633 # use $as_me), people would be surprised to read:
23634 # /* config.h. Generated automatically by config.status. */
23635 configure_input="Generated automatically from `echo $ac_file_in |
23636 sed 's,.*/,,'` by configure."
23638 # First look for the input files in the build tree, otherwise in the
23640 ac_file_inputs=`IFS=:
23641 for f in $ac_file_in; do
23643 -) echo $tmp/stdin ;;
23645 # Absolute (can't be DOS-style, as IFS=:)
23646 test -f "$f" || { { echo "$as_me:23646: error: cannot find input file: $f" >&5
23647 echo "$as_me: error: cannot find input file: $f" >&2;}
23648 { (exit 1); exit 1; }; }
23651 if test -f "$f"; then
23654 elif test -f "$srcdir/$f"; then
23659 { { echo "$as_me:23659: error: cannot find input file: $f" >&5
23660 echo "$as_me: error: cannot find input file: $f" >&2;}
23661 { (exit 1); exit 1; }; }
23664 done` || { (exit 1); exit 1; }
23666 cat >>"$CONFIG_STATUS" <<\EOF
23667 ac_warn_datarootdir=no
23668 if test x"$ac_file" != x-; then
23669 for ac_item in $ac_file_inputs
23671 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
23672 if test -n "$ac_seen"; then
23673 ac_used=`grep '@datarootdir@' "$ac_item"`
23674 if test -z "$ac_used"; then
23675 { echo "$as_me:23675: WARNING: datarootdir was used implicitly but not set:
23677 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23679 ac_warn_datarootdir=yes
23682 ac_seen=`grep '${datarootdir}' "$ac_item"`
23683 if test -n "$ac_seen"; then
23684 { echo "$as_me:23684: WARNING: datarootdir was used explicitly but not set:
23686 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23688 ac_warn_datarootdir=yes
23693 if test "x$ac_warn_datarootdir" = xyes; then
23694 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23698 cat >>"$CONFIG_STATUS" <<EOF
23702 cat >>"$CONFIG_STATUS" <<\EOF
23704 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23705 s,@configure_input@,$configure_input,;t t
23706 s,@srcdir@,$ac_srcdir,;t t
23707 s,@top_srcdir@,$ac_top_srcdir,;t t
23708 s,@INSTALL@,$ac_INSTALL,;t t
23709 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23711 if test x"$ac_file" != x-; then
23712 cp "$tmp/out" "$ac_file"
23714 for ac_name in prefix exec_prefix datarootdir
23716 ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
23717 if test -n "$ac_seen"; then
23718 ac_init=`${EGREP-egrep} '[ ]*'$ac_name'[ ]*=' "$ac_file"`
23719 if test -z "$ac_init"; then
23720 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23721 { echo "$as_me:23721: WARNING: Variable $ac_name is used but was not set:
23723 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23728 ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
23729 ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
23730 if test -s $tmp/out; then
23731 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23732 { echo "$as_me:23732: WARNING: Some variables may not be substituted:
23734 echo "$as_me: WARNING: Some variables may not be substituted:
23744 cat >>"$CONFIG_STATUS" <<\EOF
23747 # CONFIG_HEADER section.
23750 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23751 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23753 # ac_d sets the value in "#define NAME VALUE" lines.
23754 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
23755 ac_dB='[ ].*$,\1#\2'
23758 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23759 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
23760 ac_iB='\([ ]\),\1#\2define\3'
23763 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23764 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
23765 ac_uB='$,\1#\2define\3'
23769 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23770 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23772 - | *:- | *:-:* ) # input from stdin
23774 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23775 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23776 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23777 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23778 * ) ac_file_in=$ac_file.in ;;
23781 test x"$ac_file" != x- && { echo "$as_me:23781: creating $ac_file" >&5
23782 echo "$as_me: creating $ac_file" >&6;}
23784 # First look for the input files in the build tree, otherwise in the
23786 ac_file_inputs=`IFS=:
23787 for f in $ac_file_in; do
23789 -) echo $tmp/stdin ;;
23791 # Absolute (can't be DOS-style, as IFS=:)
23792 test -f "$f" || { { echo "$as_me:23792: error: cannot find input file: $f" >&5
23793 echo "$as_me: error: cannot find input file: $f" >&2;}
23794 { (exit 1); exit 1; }; }
23797 if test -f "$f"; then
23800 elif test -f "$srcdir/$f"; then
23805 { { echo "$as_me:23805: error: cannot find input file: $f" >&5
23806 echo "$as_me: error: cannot find input file: $f" >&2;}
23807 { (exit 1); exit 1; }; }
23810 done` || { (exit 1); exit 1; }
23811 # Remove the trailing spaces.
23812 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
23816 # Transform confdefs.h into a list of #define's. We won't use it as a sed
23817 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
23818 # be either 'cat' or 'sort'.
23819 cat confdefs.h | uniq >conftest.vals
23821 # Break up conftest.vals because some shells have a limit on
23822 # the size of here documents, and old seds have small limits too.
23824 rm -f conftest.tail
23825 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
23826 while grep . conftest.vals >/dev/null
23828 # Write chunks of a limited-size here document to conftest.frag.
23829 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
23830 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
23831 echo 'CEOF' >> "$CONFIG_STATUS"
23832 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
23833 rm -f conftest.vals
23834 mv conftest.tail conftest.vals
23836 rm -f conftest.vals
23838 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23840 echo ' cat >> conftest.edit <<CEOF
23841 /@DEFS@/r conftest.frag
23844 sed -f conftest.edit $tmp/in > $tmp/out
23846 mv $tmp/out $tmp/in
23847 rm -f conftest.edit conftest.frag
23848 ' >> "$CONFIG_STATUS"
23850 cat >>"$CONFIG_STATUS" <<\EOF
23851 # Let's still pretend it is `configure' which instantiates (i.e., don't
23852 # use $as_me), people would be surprised to read:
23853 # /* config.h. Generated automatically by config.status. */
23854 if test x"$ac_file" = x-; then
23855 echo "/* Generated automatically by configure. */" >$tmp/config.h
23857 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
23859 cat $tmp/in >>$tmp/config.h
23861 if test x"$ac_file" != x-; then
23862 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
23863 { echo "$as_me:23863: $ac_file is unchanged" >&5
23864 echo "$as_me: $ac_file is unchanged" >&6;}
23866 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23867 X"$ac_file" : 'X\(//\)[^/]' \| \
23868 X"$ac_file" : 'X\(//\)$' \| \
23869 X"$ac_file" : 'X\(/\)' \| \
23870 . : '\(.\)' 2>/dev/null ||
23872 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23873 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23874 /^X\(\/\/\)$/{ s//\1/; q; }
23875 /^X\(\/\).*/{ s//\1/; q; }
23877 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23878 { case "$ac_dir" in
23879 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23883 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23884 case $as_mkdir_dir in
23885 # Skip DOS drivespec
23886 ?:) as_incr_dir=$as_mkdir_dir ;;
23888 as_incr_dir=$as_incr_dir/$as_mkdir_dir
23889 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23896 mv "$tmp/config.h" "$ac_file"
23900 rm -f $tmp/config.h
23904 cat >>"$CONFIG_STATUS" <<\EOF
23906 # CONFIG_COMMANDS section.
23908 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23909 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23910 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23917 if test ! -d "$srcdir/$cf_dir" ; then
23919 elif test -f "$srcdir/$cf_dir/programs" ; then
23920 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
23924 cat >>Makefile <<TEST_EOF
23926 # These rules are generated so we do not rely on suffix rules, which do not
23927 # work consistently for different make-programs (the '\$(MODEL)/' confuses
23928 # some, and the '\$x' confuses others).
23931 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
23934 cat >>Makefile <<TEST_EOF
23936 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
23937 \$(srcdir)/test.priv.h \\
23940 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) -DMODULE_NAME="$N" \$(srcdir)/$N.c
23944 if test -f ../config.guess && test -f ../config.sub
23946 cat >>Makefile <<TEST_EOF
23948 # if we used CF_INHERIT for getting these files, we can remove them
23950 rm -f config.guess config.sub
23958 cat >>"$CONFIG_STATUS" <<\EOF
23960 { (exit 0); exit 0; }
23962 chmod +x "$CONFIG_STATUS"
23963 ac_clean_files=$ac_clean_files_save
23965 # configure is writing to config.log, and then calls config.status.
23966 # config.status does its own redirection, appending to config.log.
23967 # Unfortunately, on DOS this fails, as config.log is still kept open
23968 # by configure, so config.status won't be able to write to it; its
23969 # output is simply discarded. So we exec the FD to /dev/null,
23970 # effectively closing config.log, so it can be properly (re)opened and
23971 # appended to by config.status. When coming back to configure, we
23972 # need to make the FD available again.
23973 if test "$no_create" != yes; then
23976 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
23978 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23979 # would make configure fail if this is the last instruction.
23980 "$ac_cs_success" || { (exit 1); exit 1; }