2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20210509.
5 # Copyright 2003-2020,2021 Thomas E. Dickey
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35 if expr a : '\(a\)' >/dev/null 2>&1; then
41 rm -f conf$$ conf$$.exe conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44 # We could just check for DJGPP; but this test a) works b) is more generic
45 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46 if test -f conf$$.exe; then
47 # Don't use ln at all; we don't have any links
52 elif ln conf$$.file conf$$ 2>/dev/null; then
57 rm -f conf$$ conf$$.exe conf$$.file
59 as_executable_p="test -f"
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
79 # We need space, tab and new line, in precisely that order.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
97 ac_default_prefix=/usr/local
102 SHELL=${CONFIG_SHELL-/bin/sh}
104 # Maximum number of lines to put in a shell here document.
105 # This variable seems obsolete. It should probably be removed, and
106 # only ac_max_sed_lines should be used.
107 : "${ac_max_here_lines=38}"
109 ac_unique_file="ncurses.c"
111 # Initialize some variables set by options.
113 ac_init_version=false
114 # The variables have the same names as the options, with
115 # dashes changed to underlines.
123 program_transform_name=s,x,x,
131 # Installation directory options.
132 # These are left unexpanded so users can "make install exec_prefix=/foo"
133 # and all the variables that are supposed to be based on exec_prefix
134 # by default will actually change.
135 # Use braces instead of parens because sh, perl, etc. also accept them.
136 bindir='${exec_prefix}/bin'
137 sbindir='${exec_prefix}/sbin'
138 libexecdir='${exec_prefix}/libexec'
139 datarootdir='${prefix}/share'
140 datadir='${datarootdir}'
141 sysconfdir='${prefix}/etc'
142 sharedstatedir='${prefix}/com'
143 localstatedir='${prefix}/var'
144 runstatedir='${localstatedir}/run'
145 libdir='${exec_prefix}/lib'
146 includedir='${prefix}/include'
147 oldincludedir='/usr/include'
148 infodir='${datarootdir}/info'
149 mandir='${datarootdir}/man'
151 # Identity of this package.
161 # If the previous option needs an argument, assign it.
162 if test -n "$ac_prev"; then
163 eval "$ac_prev=\$ac_option"
168 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
170 # Accept the important Cygnus configure options, so we can diagnose typos.
174 -bindir | --bindir | --bindi | --bind | --bin | --bi)
176 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
179 -build | --build | --buil | --bui | --bu)
180 ac_prev=build_alias ;;
181 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
182 build_alias=$ac_optarg ;;
184 -cache-file | --cache-file | --cache-fil | --cache-fi \
185 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
186 ac_prev=cache_file ;;
187 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
188 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
189 cache_file=$ac_optarg ;;
192 cache_file=config.cache ;;
194 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
196 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
198 datadir=$ac_optarg ;;
200 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
201 | --dataroo | --dataro | --datar)
202 ac_prev=datarootdir ;;
203 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
204 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
205 datarootdir=$ac_optarg ;;
207 -disable-* | --disable-*)
208 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
209 # Reject names that are not valid shell variable names.
210 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
211 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
212 { (exit 1); exit 1; }; }
213 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
214 eval "enable_$ac_feature=no" ;;
216 -enable-* | --enable-*)
217 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
218 # Reject names that are not valid shell variable names.
219 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
220 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
221 { (exit 1); exit 1; }; }
222 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
224 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
227 eval "enable_$ac_feature='$ac_optarg'" ;;
229 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
230 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
231 | --exec | --exe | --ex)
232 ac_prev=exec_prefix ;;
233 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
234 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
235 | --exec=* | --exe=* | --ex=*)
236 exec_prefix=$ac_optarg ;;
238 -gas | --gas | --ga | --g)
239 # Obsolete; use --with-gas.
242 -help | --help | --hel | --he | -h)
244 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
245 ac_init_help=recursive ;;
246 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
247 ac_init_help=short ;;
249 -host | --host | --hos | --ho)
250 ac_prev=host_alias ;;
251 -host=* | --host=* | --hos=* | --ho=*)
252 host_alias=$ac_optarg ;;
254 -includedir | --includedir | --includedi | --included | --include \
255 | --includ | --inclu | --incl | --inc)
256 ac_prev=includedir ;;
257 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
258 | --includ=* | --inclu=* | --incl=* | --inc=*)
259 includedir=$ac_optarg ;;
261 -infodir | --infodir | --infodi | --infod | --info | --inf)
263 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
264 infodir=$ac_optarg ;;
266 -libdir | --libdir | --libdi | --libd)
268 -libdir=* | --libdir=* | --libdi=* | --libd=*)
271 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
272 | --libexe | --libex | --libe)
273 ac_prev=libexecdir ;;
274 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
275 | --libexe=* | --libex=* | --libe=*)
276 libexecdir=$ac_optarg ;;
278 -localstatedir | --localstatedir | --localstatedi | --localstated \
279 | --localstate | --localstat | --localsta | --localst \
280 | --locals | --local | --loca | --loc | --lo)
281 ac_prev=localstatedir ;;
282 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
283 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
284 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
285 localstatedir=$ac_optarg ;;
287 -runstatedir | --runstatedir | --runstatedi | --runstated \
288 | --runstate | --runstat | --runsta | --runst \
289 | --runs | --run | --ru)
290 ac_prev=runstatedir ;;
291 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
292 | --runstate=* | --runstat=* | --runsta=* | --runst=* \
293 | --runs=* | --run=* | --ru=*)
294 runstatedir=$ac_optarg ;;
296 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
298 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
302 # Obsolete; use --without-fp.
305 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
309 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
310 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
313 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
314 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
315 | --oldin | --oldi | --old | --ol | --o)
316 ac_prev=oldincludedir ;;
317 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
318 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
319 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
320 oldincludedir=$ac_optarg ;;
322 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
324 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
327 -program-prefix | --program-prefix | --program-prefi | --program-pref \
328 | --program-pre | --program-pr | --program-p)
329 ac_prev=program_prefix ;;
330 -program-prefix=* | --program-prefix=* | --program-prefi=* \
331 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
332 program_prefix=$ac_optarg ;;
334 -program-suffix | --program-suffix | --program-suffi | --program-suff \
335 | --program-suf | --program-su | --program-s)
336 ac_prev=program_suffix ;;
337 -program-suffix=* | --program-suffix=* | --program-suffi=* \
338 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
339 program_suffix=$ac_optarg ;;
341 -program-transform-name | --program-transform-name \
342 | --program-transform-nam | --program-transform-na \
343 | --program-transform-n | --program-transform- \
344 | --program-transform | --program-transfor \
345 | --program-transfo | --program-transf \
346 | --program-trans | --program-tran \
347 | --progr-tra | --program-tr | --program-t)
348 ac_prev=program_transform_name ;;
349 -program-transform-name=* | --program-transform-name=* \
350 | --program-transform-nam=* | --program-transform-na=* \
351 | --program-transform-n=* | --program-transform-=* \
352 | --program-transform=* | --program-transfor=* \
353 | --program-transfo=* | --program-transf=* \
354 | --program-trans=* | --program-tran=* \
355 | --progr-tra=* | --program-tr=* | --program-t=*)
356 program_transform_name=$ac_optarg ;;
358 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
359 | -silent | --silent | --silen | --sile | --sil)
362 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
364 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
366 sbindir=$ac_optarg ;;
368 -sharedstatedir | --sharedstatedir | --sharedstatedi \
369 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
370 | --sharedst | --shareds | --shared | --share | --shar \
372 ac_prev=sharedstatedir ;;
373 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
374 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
375 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
377 sharedstatedir=$ac_optarg ;;
379 -site | --site | --sit)
381 -site=* | --site=* | --sit=*)
384 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
386 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
389 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
390 | --syscon | --sysco | --sysc | --sys | --sy)
391 ac_prev=sysconfdir ;;
392 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
393 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
394 sysconfdir=$ac_optarg ;;
396 -target | --target | --targe | --targ | --tar | --ta | --t)
397 ac_prev=target_alias ;;
398 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
399 target_alias=$ac_optarg ;;
401 -v | -verbose | --verbose | --verbos | --verbo | --verb)
404 -version | --version | --versio | --versi | --vers | -V)
408 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
409 # Reject names that are not valid shell variable names.
410 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
411 { echo "$as_me: error: invalid package name: $ac_package" >&2
412 { (exit 1); exit 1; }; }
413 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
415 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
418 eval "with_$ac_package='$ac_optarg'" ;;
420 -without-* | --without-*)
421 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
422 # Reject names that are not valid shell variable names.
423 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
424 { echo "$as_me: error: invalid package name: $ac_package" >&2
425 { (exit 1); exit 1; }; }
426 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
427 eval "with_$ac_package=no" ;;
430 # Obsolete; use --with-x.
433 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
434 | --x-incl | --x-inc | --x-in | --x-i)
435 ac_prev=x_includes ;;
436 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
437 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
438 x_includes=$ac_optarg ;;
440 -x-libraries | --x-libraries | --x-librarie | --x-librari \
441 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
442 ac_prev=x_libraries ;;
443 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
444 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
445 x_libraries=$ac_optarg ;;
447 -*) { echo "$as_me: error: unrecognized option: $ac_option
448 Try \`$0 --help' for more information." >&2
449 { (exit 1); exit 1; }; }
453 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
454 # Reject names that are not valid shell variable names.
455 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
456 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
457 { (exit 1); exit 1; }; }
458 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
459 eval "$ac_envvar='$ac_optarg'"
460 export "$ac_envvar" ;;
463 # FIXME: should be removed in autoconf 3.0.
464 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
465 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
466 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
467 : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
473 if test -n "$ac_prev"; then
474 ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
475 { echo "$as_me: error: missing argument to $ac_option" >&2
476 { (exit 1); exit 1; }; }
479 # Be sure to have absolute paths.
480 for ac_var in exec_prefix prefix
482 eval ac_val=$`echo "$ac_var"`
484 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
485 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
486 { (exit 1); exit 1; }; };;
490 # Be sure to have absolute paths.
491 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
492 localstatedir libdir includedir oldincludedir infodir mandir
494 eval ac_val=$`echo "$ac_var"`
496 [\\/$]* | ?:[\\/]* ) ;;
497 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
498 { (exit 1); exit 1; }; };;
502 # There might be people who depend on the old broken behavior: `$host'
503 # used to hold the argument of --host etc.
508 # FIXME: should be removed in autoconf 3.0.
509 if test "x$host_alias" != x; then
510 if test "x$build_alias" = x; then
511 cross_compiling=maybe
512 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
513 If a cross compiler is detected then cross compile mode will be used." >&2
514 elif test "x$build_alias" != "x$host_alias"; then
520 test -n "$host_alias" && ac_tool_prefix=$host_alias-
522 test "$silent" = yes && exec 6>/dev/null
524 # Find the source files, if location was not specified.
525 if test -z "$srcdir"; then
526 ac_srcdir_defaulted=yes
527 # Try the directory containing this script, then its parent.
529 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
530 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
532 if test ! -r "$srcdir/$ac_unique_file"; then
536 ac_srcdir_defaulted=no
538 if test ! -r "$srcdir/$ac_unique_file"; then
539 if test "$ac_srcdir_defaulted" = yes; then
540 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
541 { (exit 1); exit 1; }; }
543 { echo "$as_me: error: cannot find sources in $srcdir" >&2
544 { (exit 1); exit 1; }; }
547 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
548 ac_env_build_alias_set=${build_alias+set}
549 ac_env_build_alias_value=$build_alias
550 ac_cv_env_build_alias_set=${build_alias+set}
551 ac_cv_env_build_alias_value=$build_alias
552 ac_env_host_alias_set=${host_alias+set}
553 ac_env_host_alias_value=$host_alias
554 ac_cv_env_host_alias_set=${host_alias+set}
555 ac_cv_env_host_alias_value=$host_alias
556 ac_env_target_alias_set=${target_alias+set}
557 ac_env_target_alias_value=$target_alias
558 ac_cv_env_target_alias_set=${target_alias+set}
559 ac_cv_env_target_alias_value=$target_alias
560 ac_env_CC_set=${CC+set}
562 ac_cv_env_CC_set=${CC+set}
563 ac_cv_env_CC_value=$CC
564 ac_env_CFLAGS_set=${CFLAGS+set}
565 ac_env_CFLAGS_value=$CFLAGS
566 ac_cv_env_CFLAGS_set=${CFLAGS+set}
567 ac_cv_env_CFLAGS_value=$CFLAGS
568 ac_env_LDFLAGS_set=${LDFLAGS+set}
569 ac_env_LDFLAGS_value=$LDFLAGS
570 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
571 ac_cv_env_LDFLAGS_value=$LDFLAGS
572 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
573 ac_env_CPPFLAGS_value=$CPPFLAGS
574 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
575 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
576 ac_env_CPP_set=${CPP+set}
577 ac_env_CPP_value=$CPP
578 ac_cv_env_CPP_set=${CPP+set}
579 ac_cv_env_CPP_value=$CPP
582 # Report the --help message.
584 if test "$ac_init_help" = "long"; then
585 # Omit some internal or obsolete options to make the list less imposing.
586 # This message is too long to be a string in the A/UX 3.1 sh.
588 \`configure' configures this package to adapt to many kinds of systems.
590 Usage: $0 [OPTION]... [VAR=VALUE]...
592 To assign environment variables (e.g., CC, CFLAGS...), specify them as
593 VAR=VALUE. See below for descriptions of some of the useful variables.
595 Defaults for the options are specified in brackets.
598 -h, --help display this help and exit
599 --help=short display options specific to this package
600 --help=recursive display the short help of all the included packages
601 -V, --version display version information and exit
602 -q, --quiet, --silent do not print \`checking...' messages
603 --cache-file=FILE cache test results in FILE [disabled]
604 -C, --config-cache alias for \`--cache-file=config.cache'
605 -n, --no-create do not create output files
606 --srcdir=DIR find the sources in DIR [configure dir or \`..']
611 Installation directories:
612 --prefix=PREFIX install architecture-independent files in PREFIX
614 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
617 By default, \`make install' will install all the files in
618 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
619 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
620 for instance \`--prefix=\$HOME'.
622 For better control, use the options below.
624 Fine tuning of the installation directories:
625 --bindir=DIR user executables [EPREFIX/bin]
626 --sbindir=DIR system admin executables [EPREFIX/sbin]
627 --libexecdir=DIR program executables [EPREFIX/libexec]
628 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
629 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
630 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
631 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
632 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
633 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
634 --libdir=DIR object code libraries [EPREFIX/lib]
635 --includedir=DIR C header files [PREFIX/include]
636 --oldincludedir=DIR C header files for non-gcc [/usr/include]
637 --infodir=DIR info documentation [DATAROOTDIR/info]
638 --mandir=DIR man documentation [DATAROOTDIR/man]
644 --program-prefix=PREFIX prepend PREFIX to installed program names
645 --program-suffix=SUFFIX append SUFFIX to installed program names
646 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
649 --x-includes=DIR X include files are in DIR
650 --x-libraries=DIR X library files are in DIR
653 --build=BUILD configure for building on BUILD [guessed]
654 --host=HOST build programs to run on HOST [BUILD]
658 if test -n "$ac_init_help"; then
663 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
664 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
667 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
668 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
671 --disable-stripping do not strip (debug info) installed executables
672 --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics
673 --enable-string-hacks work around bogus compiler/loader warnings
674 --with-pkg-config{=path} enable/disable use of pkg-config
675 --disable-echo do not display "compiling" commands
676 Curses Version-dependent Options:
677 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
678 --disable-widec disable checks for wide-character functions
679 --with-curses-dir=DIR directory in which (n)curses is installed
680 --with-screen=XXX use specified curses-libraries
681 --with-ncursesw use wide ncurses-libraries
682 --with-ncurses use ncurses-libraries
683 --with-pdcurses compile/link with pdcurses X11 library
684 --with-curses-colr compile/link with HPUX 10.x color-curses
685 --with-curses-5lib compile/link with SunOS 5lib curses
686 --with-Xaw3d link with Xaw 3d library
687 --with-Xaw3dxft link with Xaw 3d xft library
688 --with-neXtaw link with neXT Athena library
689 --with-XawPlus link with Athena-Plus library
690 --with-x use the X Window System
691 --with-x11-rgb=FILE file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
692 --with-form-libname=XXX override form basename of library
693 --with-menu-libname=XXX override menu basename of library
694 --with-panel-libname=XXX override panel basename of library
695 --disable-panel disable checks for panel functions
696 --disable-menu disable checks for menu functions
697 --disable-form disable checks for form functions
698 Testing/development Options:
699 --enable-warnings test: turn on gcc compiler warnings
700 --with-dmalloc test: use Gray Watson's dmalloc library
701 --with-dbmalloc test: use Conor Cahill's dbmalloc library
702 --with-valgrind test: use valgrind
703 --disable-leaks test: free permanent memory, analyze leaks
704 --disable-rpath-hack don't add rpath options for additional libraries
706 Some influential environment variables:
707 CC C compiler command
708 CFLAGS C compiler flags
709 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
710 nonstandard directory <lib dir>
711 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
712 headers in a nonstandard directory <include dir>
715 Use these variables to override the choices made by `configure' or to help
716 it to find libraries and programs with nonstandard names/locations.
721 if test "$ac_init_help" = "recursive"; then
722 # If there are subdirs, report their specific --help.
724 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
726 # A "../" for each directory in /$ac_subdir.
727 ac_dots=`echo "$ac_subdir" |
728 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
731 .) # No --srcdir option. We are building in place.
732 ac_sub_srcdir="$srcdir" ;;
733 [\\/]* | ?:[\\/]* ) # Absolute path.
734 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
736 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
739 # Check for guested configure; otherwise get Cygnus style configure.
740 if test -f "$ac_sub_srcdir/configure.gnu"; then
742 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
743 elif test -f "$ac_sub_srcdir/configure"; then
745 $SHELL "$ac_sub_srcdir/configure" --help=recursive
746 elif test -f "$ac_sub_srcdir/configure.ac" ||
747 test -f "$ac_sub_srcdir/configure.in"; then
749 "$ac_configure" --help
751 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
757 test -n "$ac_init_help" && exit 0
758 if "$ac_init_version"; then
761 Copyright 2003-2020,2021 Thomas E. Dickey
762 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
763 Free Software Foundation, Inc.
764 This configure script is free software; the Free Software Foundation
765 gives unlimited permission to copy, distribute and modify it.
771 This file contains any messages produced by compilers while
772 running configure, to aid debugging if configure makes a mistake.
774 It was created by $as_me, which was
775 generated by GNU Autoconf 2.52.20210509. Invocation command line was
786 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
787 uname -m = `(uname -m) 2>/dev/null || echo unknown`
788 uname -r = `(uname -r) 2>/dev/null || echo unknown`
789 uname -s = `(uname -s) 2>/dev/null || echo unknown`
790 uname -v = `(uname -v) 2>/dev/null || echo unknown`
792 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
793 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
795 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
796 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
797 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
798 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
799 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
800 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
801 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
815 # Keep a trace of the command line.
816 # Strip out --no-create and --no-recursion so they do not pile up.
817 # Also quote any args containing shell meta-characters.
823 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
824 | --no-cr | --no-c) ;;
825 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
826 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
827 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
828 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
829 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
831 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
834 # Get rid of the leading space.
837 # When interrupted or exit'd, cleanup temporary files, and complete
838 # config.log. We remove comments because anyway the quotes in there
839 # would cause problems or look ugly.
841 # Save into config.log some information that might help in debugging.
843 echo "## ----------------- ##" >&5
844 echo "## Cache variables. ##" >&5
845 echo "## ----------------- ##" >&5
847 # The following way of writing the cache mishandles newlines in values,
850 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
853 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
854 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
858 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
862 sed "/^$/d" confdefs.h >conftest.log
863 if test -s conftest.log; then
865 echo "## ------------ ##" >&5
866 echo "## confdefs.h. ##" >&5
867 echo "## ------------ ##" >&5
872 test "$ac_signal" != 0 &&
873 echo "$as_me: caught signal $ac_signal" >&5
874 echo "$as_me: exit $exit_status" >&5
875 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
878 for ac_signal in 1 2 13 15; do
879 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
883 # confdefs.h avoids OS command line length limits that DEFS can exceed.
884 rm -rf conftest* confdefs.h
885 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
888 # Let the site file select an alternate cache file if it wants to.
889 # Prefer explicitly selected file to automatically selected ones.
890 if test -z "$CONFIG_SITE"; then
891 if test "x$prefix" != xNONE; then
892 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
894 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
897 for ac_site_file in $CONFIG_SITE; do
898 if test -r "$ac_site_file"; then
899 { echo "$as_me:899: loading site script $ac_site_file" >&5
900 echo "$as_me: loading site script $ac_site_file" >&6;}
901 cat "$ac_site_file" >&5
906 if test -r "$cache_file"; then
907 # Some versions of bash will fail to source /dev/null (special
908 # files actually), so we avoid doing that.
909 if test -f "$cache_file"; then
910 { echo "$as_me:910: loading cache $cache_file" >&5
911 echo "$as_me: loading cache $cache_file" >&6;}
913 [\\/]* | ?:[\\/]* ) . $cache_file;;
918 { echo "$as_me:918: creating cache $cache_file" >&5
919 echo "$as_me: creating cache $cache_file" >&6;}
923 # Check that the precious variables saved in the cache have kept the same
925 ac_cache_corrupted=false
926 for ac_var in `(set) 2>&1 |
927 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
928 eval ac_old_set=\$ac_cv_env_${ac_var}_set
929 eval ac_new_set=\$ac_env_${ac_var}_set
930 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
931 eval ac_new_val="\$ac_env_${ac_var}_value"
932 case "$ac_old_set,$ac_new_set" in
934 { echo "$as_me:934: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
935 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
936 ac_cache_corrupted=: ;;
938 { echo "$as_me:938: error: \`$ac_var' was not set in the previous run" >&5
939 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
940 ac_cache_corrupted=: ;;
943 if test "x$ac_old_val" != "x$ac_new_val"; then
944 { echo "$as_me:944: error: \`$ac_var' has changed since the previous run:" >&5
945 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
946 { echo "$as_me:946: former value: $ac_old_val" >&5
947 echo "$as_me: former value: $ac_old_val" >&2;}
948 { echo "$as_me:948: current value: $ac_new_val" >&5
949 echo "$as_me: current value: $ac_new_val" >&2;}
953 # Pass precious variables to config.status. It doesn't matter if
954 # we pass some twice (in addition to the command line arguments).
955 if test "$ac_new_set" = set; then
956 case "$ac_new_val" in
957 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
958 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
959 ac_configure_args="$ac_configure_args '$ac_arg'"
961 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
966 if "$ac_cache_corrupted"; then
967 { echo "$as_me:967: error: changes in the environment can compromise the build" >&5
968 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
969 { { echo "$as_me:969: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
970 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
971 { (exit 1); exit 1; }; }
975 ac_cpp='$CPP $CPPFLAGS'
976 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
977 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
978 ac_compiler_gnu=$ac_cv_c_compiler_gnu
979 ac_main_return="return"
981 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
983 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
995 echo "#! $SHELL" >conftest.sh
996 echo "exit 0" >>conftest.sh
998 if { (echo "$as_me:998: PATH=\".;.\"; conftest.sh") >&5
999 (PATH=".;."; conftest.sh) 2>&5
1001 echo "$as_me:1001: \$? = $ac_status" >&5
1002 (exit "$ac_status"); }; then
1003 ac_path_separator=';'
1007 PATH_SEPARATOR="$ac_path_separator"
1010 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
1012 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
1014 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
1017 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1018 if test -f "$ac_dir/install-sh"; then
1020 ac_install_sh="$ac_aux_dir/install-sh -c"
1022 elif test -f "$ac_dir/install.sh"; then
1024 ac_install_sh="$ac_aux_dir/install.sh -c"
1026 elif test -f "$ac_dir/shtool"; then
1028 ac_install_sh="$ac_aux_dir/shtool install -c"
1032 if test -z "$ac_aux_dir"; then
1033 { { echo "$as_me:1033: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1034 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1035 { (exit 1); exit 1; }; }
1037 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1038 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1039 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1041 # Make sure we can run config.sub.
1042 $ac_config_sub sun4 >/dev/null 2>&1 ||
1043 { { echo "$as_me:1043: error: cannot run $ac_config_sub" >&5
1044 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1045 { (exit 1); exit 1; }; }
1047 echo "$as_me:1047: checking build system type" >&5
1048 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1049 if test "${ac_cv_build+set}" = set; then
1050 echo $ECHO_N "(cached) $ECHO_C" >&6
1052 ac_cv_build_alias=$build_alias
1053 test -z "$ac_cv_build_alias" &&
1054 ac_cv_build_alias=`$ac_config_guess`
1055 test -z "$ac_cv_build_alias" &&
1056 { { echo "$as_me:1056: error: cannot guess build type; you must specify one" >&5
1057 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1058 { (exit 1); exit 1; }; }
1059 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1060 { { echo "$as_me:1060: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1061 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1062 { (exit 1); exit 1; }; }
1065 echo "$as_me:1065: result: $ac_cv_build" >&5
1066 echo "${ECHO_T}$ac_cv_build" >&6
1068 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1069 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1070 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1072 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1073 echo "$as_me:1073: checking host system type" >&5
1074 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1075 if test "${ac_cv_host+set}" = set; then
1076 echo $ECHO_N "(cached) $ECHO_C" >&6
1078 ac_cv_host_alias=$host_alias
1079 test -z "$ac_cv_host_alias" &&
1080 ac_cv_host_alias=$ac_cv_build_alias
1081 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1082 { { echo "$as_me:1082: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1083 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1084 { (exit 1); exit 1; }; }
1087 echo "$as_me:1087: result: $ac_cv_host" >&5
1088 echo "${ECHO_T}$ac_cv_host" >&6
1090 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1091 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1092 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1094 system_name="$host_os"
1096 system_name="`(uname -s -r) 2>/dev/null`"
1097 if test -z "$system_name" ; then
1098 system_name="`(hostname) 2>/dev/null`"
1101 test -n "$system_name" &&
1102 cat >>confdefs.h <<EOF
1103 #define SYSTEM_NAME "$system_name"
1106 if test "${cf_cv_system_name+set}" = set; then
1107 echo $ECHO_N "(cached) $ECHO_C" >&6
1109 cf_cv_system_name="$system_name"
1112 test -z "$system_name" && system_name="$cf_cv_system_name"
1113 test -n "$cf_cv_system_name" && echo "$as_me:1113: result: Configuring for $cf_cv_system_name" >&5
1114 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1116 if test ".$system_name" != ".$cf_cv_system_name" ; then
1117 echo "$as_me:1117: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1118 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1119 { { echo "$as_me:1119: error: \"Please remove config.cache and try again.\"" >&5
1120 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1121 { (exit 1); exit 1; }; }
1124 test "$program_prefix" != NONE &&
1125 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1126 # Use a double $ so make ignores it.
1127 test "$program_suffix" != NONE &&
1128 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1129 # Double any \ or $. echo might interpret backslashes.
1130 # By default was `s,x,x', remove it if useless.
1131 cat <<\_ACEOF >conftest.sed
1132 s/[\\$]/&&/g;s/;s,x,x,$//
1134 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1137 echo "$as_me:1137: checking whether ${MAKE-make} sets \${MAKE}" >&5
1138 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1139 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1140 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1141 echo $ECHO_N "(cached) $ECHO_C" >&6
1143 cat >conftest.make <<\EOF
1145 @echo 'ac_maketemp="${MAKE}"'
1147 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1148 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1149 if test -n "$ac_maketemp"; then
1150 eval ac_cv_prog_make_${ac_make}_set=yes
1152 eval ac_cv_prog_make_${ac_make}_set=no
1156 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1157 echo "$as_me:1157: result: yes" >&5
1158 echo "${ECHO_T}yes" >&6
1161 echo "$as_me:1161: result: no" >&5
1162 echo "${ECHO_T}no" >&6
1163 SET_MAKE="MAKE=${MAKE-make}"
1167 ac_cpp='$CPP $CPPFLAGS'
1168 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1169 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1170 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1171 ac_main_return="return"
1172 if test -n "$ac_tool_prefix"; then
1173 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1174 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1175 echo "$as_me:1175: checking for $ac_word" >&5
1176 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1177 if test "${ac_cv_prog_CC+set}" = set; then
1178 echo $ECHO_N "(cached) $ECHO_C" >&6
1180 if test -n "$CC"; then
1181 ac_cv_prog_CC="$CC" # Let the user override the test.
1183 ac_save_IFS=$IFS; IFS=$ac_path_separator
1185 for ac_dir in $ac_dummy; do
1187 test -z "$ac_dir" && ac_dir=.
1188 $as_executable_p "$ac_dir/$ac_word" || continue
1189 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1190 echo "$as_me:1190: found $ac_dir/$ac_word" >&5
1197 if test -n "$CC"; then
1198 echo "$as_me:1198: result: $CC" >&5
1199 echo "${ECHO_T}$CC" >&6
1201 echo "$as_me:1201: result: no" >&5
1202 echo "${ECHO_T}no" >&6
1206 if test -z "$ac_cv_prog_CC"; then
1208 # Extract the first word of "gcc", so it can be a program name with args.
1209 set dummy gcc; ac_word=$2
1210 echo "$as_me:1210: checking for $ac_word" >&5
1211 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1212 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1213 echo $ECHO_N "(cached) $ECHO_C" >&6
1215 if test -n "$ac_ct_CC"; then
1216 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1218 ac_save_IFS=$IFS; IFS=$ac_path_separator
1220 for ac_dir in $ac_dummy; do
1222 test -z "$ac_dir" && ac_dir=.
1223 $as_executable_p "$ac_dir/$ac_word" || continue
1224 ac_cv_prog_ac_ct_CC="gcc"
1225 echo "$as_me:1225: found $ac_dir/$ac_word" >&5
1231 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1232 if test -n "$ac_ct_CC"; then
1233 echo "$as_me:1233: result: $ac_ct_CC" >&5
1234 echo "${ECHO_T}$ac_ct_CC" >&6
1236 echo "$as_me:1236: result: no" >&5
1237 echo "${ECHO_T}no" >&6
1245 if test -z "$CC"; then
1246 if test -n "$ac_tool_prefix"; then
1247 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1248 set dummy ${ac_tool_prefix}cc; ac_word=$2
1249 echo "$as_me:1249: checking for $ac_word" >&5
1250 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1251 if test "${ac_cv_prog_CC+set}" = set; then
1252 echo $ECHO_N "(cached) $ECHO_C" >&6
1254 if test -n "$CC"; then
1255 ac_cv_prog_CC="$CC" # Let the user override the test.
1257 ac_save_IFS=$IFS; IFS=$ac_path_separator
1259 for ac_dir in $ac_dummy; do
1261 test -z "$ac_dir" && ac_dir=.
1262 $as_executable_p "$ac_dir/$ac_word" || continue
1263 ac_cv_prog_CC="${ac_tool_prefix}cc"
1264 echo "$as_me:1264: found $ac_dir/$ac_word" >&5
1271 if test -n "$CC"; then
1272 echo "$as_me:1272: result: $CC" >&5
1273 echo "${ECHO_T}$CC" >&6
1275 echo "$as_me:1275: result: no" >&5
1276 echo "${ECHO_T}no" >&6
1280 if test -z "$ac_cv_prog_CC"; then
1282 # Extract the first word of "cc", so it can be a program name with args.
1283 set dummy cc; ac_word=$2
1284 echo "$as_me:1284: checking for $ac_word" >&5
1285 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1286 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1287 echo $ECHO_N "(cached) $ECHO_C" >&6
1289 if test -n "$ac_ct_CC"; then
1290 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1292 ac_save_IFS=$IFS; IFS=$ac_path_separator
1294 for ac_dir in $ac_dummy; do
1296 test -z "$ac_dir" && ac_dir=.
1297 $as_executable_p "$ac_dir/$ac_word" || continue
1298 ac_cv_prog_ac_ct_CC="cc"
1299 echo "$as_me:1299: found $ac_dir/$ac_word" >&5
1305 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1306 if test -n "$ac_ct_CC"; then
1307 echo "$as_me:1307: result: $ac_ct_CC" >&5
1308 echo "${ECHO_T}$ac_ct_CC" >&6
1310 echo "$as_me:1310: result: no" >&5
1311 echo "${ECHO_T}no" >&6
1320 if test -z "$CC"; then
1321 # Extract the first word of "cc", so it can be a program name with args.
1322 set dummy cc; ac_word=$2
1323 echo "$as_me:1323: checking for $ac_word" >&5
1324 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1325 if test "${ac_cv_prog_CC+set}" = set; then
1326 echo $ECHO_N "(cached) $ECHO_C" >&6
1328 if test -n "$CC"; then
1329 ac_cv_prog_CC="$CC" # Let the user override the test.
1332 ac_save_IFS=$IFS; IFS=$ac_path_separator
1334 for ac_dir in $ac_dummy; do
1336 test -z "$ac_dir" && ac_dir=.
1337 $as_executable_p "$ac_dir/$ac_word" || continue
1338 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1339 ac_prog_rejected=yes
1343 echo "$as_me:1343: found $ac_dir/$ac_word" >&5
1347 if test "$ac_prog_rejected" = yes; then
1348 # We found a bogon in the path, so make sure we never use it.
1349 set dummy $ac_cv_prog_CC
1351 if test $# != 0; then
1352 # We chose a different compiler from the bogus one.
1353 # However, it has the same basename, so the bogon will be chosen
1354 # first if we set CC to just the basename; use the full file name.
1356 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1364 if test -n "$CC"; then
1365 echo "$as_me:1365: result: $CC" >&5
1366 echo "${ECHO_T}$CC" >&6
1368 echo "$as_me:1368: result: no" >&5
1369 echo "${ECHO_T}no" >&6
1373 if test -z "$CC"; then
1374 if test -n "$ac_tool_prefix"; then
1377 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1378 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1379 echo "$as_me:1379: checking for $ac_word" >&5
1380 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1381 if test "${ac_cv_prog_CC+set}" = set; then
1382 echo $ECHO_N "(cached) $ECHO_C" >&6
1384 if test -n "$CC"; then
1385 ac_cv_prog_CC="$CC" # Let the user override the test.
1387 ac_save_IFS=$IFS; IFS=$ac_path_separator
1389 for ac_dir in $ac_dummy; do
1391 test -z "$ac_dir" && ac_dir=.
1392 $as_executable_p "$ac_dir/$ac_word" || continue
1393 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1394 echo "$as_me:1394: found $ac_dir/$ac_word" >&5
1401 if test -n "$CC"; then
1402 echo "$as_me:1402: result: $CC" >&5
1403 echo "${ECHO_T}$CC" >&6
1405 echo "$as_me:1405: result: no" >&5
1406 echo "${ECHO_T}no" >&6
1409 test -n "$CC" && break
1412 if test -z "$CC"; then
1416 # Extract the first word of "$ac_prog", so it can be a program name with args.
1417 set dummy $ac_prog; ac_word=$2
1418 echo "$as_me:1418: checking for $ac_word" >&5
1419 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1420 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1421 echo $ECHO_N "(cached) $ECHO_C" >&6
1423 if test -n "$ac_ct_CC"; then
1424 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1426 ac_save_IFS=$IFS; IFS=$ac_path_separator
1428 for ac_dir in $ac_dummy; do
1430 test -z "$ac_dir" && ac_dir=.
1431 $as_executable_p "$ac_dir/$ac_word" || continue
1432 ac_cv_prog_ac_ct_CC="$ac_prog"
1433 echo "$as_me:1433: found $ac_dir/$ac_word" >&5
1439 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1440 if test -n "$ac_ct_CC"; then
1441 echo "$as_me:1441: result: $ac_ct_CC" >&5
1442 echo "${ECHO_T}$ac_ct_CC" >&6
1444 echo "$as_me:1444: result: no" >&5
1445 echo "${ECHO_T}no" >&6
1448 test -n "$ac_ct_CC" && break
1456 test -z "$CC" && { { echo "$as_me:1456: error: no acceptable cc found in \$PATH" >&5
1457 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1458 { (exit 1); exit 1; }; }
1460 # Provide some information about the compiler.
1461 echo "$as_me:1461:" \
1462 "checking for C compiler version" >&5
1463 ac_compiler=`set X $ac_compile; echo "$2"`
1464 { (eval echo "$as_me:1464: \"$ac_compiler --version </dev/null >&5\"") >&5
1465 (eval $ac_compiler --version </dev/null >&5) 2>&5
1467 echo "$as_me:1467: \$? = $ac_status" >&5
1468 (exit "$ac_status"); }
1469 { (eval echo "$as_me:1469: \"$ac_compiler -v </dev/null >&5\"") >&5
1470 (eval $ac_compiler -v </dev/null >&5) 2>&5
1472 echo "$as_me:1472: \$? = $ac_status" >&5
1473 (exit "$ac_status"); }
1474 { (eval echo "$as_me:1474: \"$ac_compiler -V </dev/null >&5\"") >&5
1475 (eval $ac_compiler -V </dev/null >&5) 2>&5
1477 echo "$as_me:1477: \$? = $ac_status" >&5
1478 (exit "$ac_status"); }
1480 cat >"conftest.$ac_ext" <<_ACEOF
1481 #line 1481 "configure"
1482 #include "confdefs.h"
1492 ac_clean_files_save=$ac_clean_files
1493 ac_clean_files="$ac_clean_files a.out a.exe"
1494 # Try to create an executable without -o first, disregard a.out.
1495 # It will help us diagnose broken compilers, and finding out an intuition
1497 echo "$as_me:1497: checking for C compiler default output" >&5
1498 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1499 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1500 if { (eval echo "$as_me:1500: \"$ac_link_default\"") >&5
1501 (eval $ac_link_default) 2>&5
1503 echo "$as_me:1503: \$? = $ac_status" >&5
1504 (exit "$ac_status"); }; then
1505 # Find the output, starting from the most likely. This scheme is
1506 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1508 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1509 ls a.out conftest 2>/dev/null;
1510 ls a.* conftest.* 2>/dev/null`; do
1512 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1513 a.out ) # We found the default executable, but exeext='' is most
1516 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1517 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1524 echo "$as_me: failed program was:" >&5
1525 cat "conftest.$ac_ext" >&5
1526 { { echo "$as_me:1526: error: C compiler cannot create executables" >&5
1527 echo "$as_me: error: C compiler cannot create executables" >&2;}
1528 { (exit 77); exit 77; }; }
1531 ac_exeext=$ac_cv_exeext
1532 echo "$as_me:1532: result: $ac_file" >&5
1533 echo "${ECHO_T}$ac_file" >&6
1535 # Check the compiler produces executables we can run. If not, either
1536 # the compiler is broken, or we cross compile.
1537 echo "$as_me:1537: checking whether the C compiler works" >&5
1538 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1539 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1540 # If not cross compiling, check that we can run a simple program.
1541 if test "$cross_compiling" != yes; then
1542 if { ac_try='./$ac_file'
1543 { (eval echo "$as_me:1543: \"$ac_try\"") >&5
1546 echo "$as_me:1546: \$? = $ac_status" >&5
1547 (exit "$ac_status"); }; }; then
1550 if test "$cross_compiling" = maybe; then
1553 { { echo "$as_me:1553: error: cannot run C compiled programs.
1554 If you meant to cross compile, use \`--host'." >&5
1555 echo "$as_me: error: cannot run C compiled programs.
1556 If you meant to cross compile, use \`--host'." >&2;}
1557 { (exit 1); exit 1; }; }
1561 echo "$as_me:1561: result: yes" >&5
1562 echo "${ECHO_T}yes" >&6
1564 rm -f a.out a.exe "conftest$ac_cv_exeext"
1565 ac_clean_files=$ac_clean_files_save
1566 # Check the compiler produces executables we can run. If not, either
1567 # the compiler is broken, or we cross compile.
1568 echo "$as_me:1568: checking whether we are cross compiling" >&5
1569 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1570 echo "$as_me:1570: result: $cross_compiling" >&5
1571 echo "${ECHO_T}$cross_compiling" >&6
1573 echo "$as_me:1573: checking for executable suffix" >&5
1574 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1575 if { (eval echo "$as_me:1575: \"$ac_link\"") >&5
1576 (eval $ac_link) 2>&5
1578 echo "$as_me:1578: \$? = $ac_status" >&5
1579 (exit "$ac_status"); }; then
1580 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1581 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1582 # work properly (i.e., refer to `conftest.exe'), while it won't with
1584 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1586 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1587 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1594 { { echo "$as_me:1594: error: cannot compute EXEEXT: cannot compile and link" >&5
1595 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1596 { (exit 1); exit 1; }; }
1599 rm -f "conftest$ac_cv_exeext"
1600 echo "$as_me:1600: result: $ac_cv_exeext" >&5
1601 echo "${ECHO_T}$ac_cv_exeext" >&6
1603 rm -f "conftest.$ac_ext"
1604 EXEEXT=$ac_cv_exeext
1606 echo "$as_me:1606: checking for object suffix" >&5
1607 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1608 if test "${ac_cv_objext+set}" = set; then
1609 echo $ECHO_N "(cached) $ECHO_C" >&6
1611 cat >"conftest.$ac_ext" <<_ACEOF
1612 #line 1612 "configure"
1613 #include "confdefs.h"
1623 rm -f conftest.o conftest.obj
1624 if { (eval echo "$as_me:1624: \"$ac_compile\"") >&5
1625 (eval $ac_compile) 2>&5
1627 echo "$as_me:1627: \$? = $ac_status" >&5
1628 (exit "$ac_status"); }; then
1629 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1631 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1632 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1637 echo "$as_me: failed program was:" >&5
1638 cat "conftest.$ac_ext" >&5
1639 { { echo "$as_me:1639: error: cannot compute OBJEXT: cannot compile" >&5
1640 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1641 { (exit 1); exit 1; }; }
1644 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1646 echo "$as_me:1646: result: $ac_cv_objext" >&5
1647 echo "${ECHO_T}$ac_cv_objext" >&6
1648 OBJEXT=$ac_cv_objext
1650 echo "$as_me:1650: checking whether we are using the GNU C compiler" >&5
1651 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1652 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1653 echo $ECHO_N "(cached) $ECHO_C" >&6
1655 cat >"conftest.$ac_ext" <<_ACEOF
1656 #line 1656 "configure"
1657 #include "confdefs.h"
1670 rm -f "conftest.$ac_objext"
1671 if { (eval echo "$as_me:1671: \"$ac_compile\"") >&5
1672 (eval $ac_compile) 2>&5
1674 echo "$as_me:1674: \$? = $ac_status" >&5
1675 (exit "$ac_status"); } &&
1676 { ac_try='test -s "conftest.$ac_objext"'
1677 { (eval echo "$as_me:1677: \"$ac_try\"") >&5
1680 echo "$as_me:1680: \$? = $ac_status" >&5
1681 (exit "$ac_status"); }; }; then
1684 echo "$as_me: failed program was:" >&5
1685 cat "conftest.$ac_ext" >&5
1688 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1689 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1692 echo "$as_me:1692: result: $ac_cv_c_compiler_gnu" >&5
1693 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1694 GCC=`test $ac_compiler_gnu = yes && echo yes`
1695 ac_test_CFLAGS=${CFLAGS+set}
1696 ac_save_CFLAGS=$CFLAGS
1698 echo "$as_me:1698: checking whether $CC accepts -g" >&5
1699 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1700 if test "${ac_cv_prog_cc_g+set}" = set; then
1701 echo $ECHO_N "(cached) $ECHO_C" >&6
1703 cat >"conftest.$ac_ext" <<_ACEOF
1704 #line 1704 "configure"
1705 #include "confdefs.h"
1715 rm -f "conftest.$ac_objext"
1716 if { (eval echo "$as_me:1716: \"$ac_compile\"") >&5
1717 (eval $ac_compile) 2>&5
1719 echo "$as_me:1719: \$? = $ac_status" >&5
1720 (exit "$ac_status"); } &&
1721 { ac_try='test -s "conftest.$ac_objext"'
1722 { (eval echo "$as_me:1722: \"$ac_try\"") >&5
1725 echo "$as_me:1725: \$? = $ac_status" >&5
1726 (exit "$ac_status"); }; }; then
1729 echo "$as_me: failed program was:" >&5
1730 cat "conftest.$ac_ext" >&5
1733 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1735 echo "$as_me:1735: result: $ac_cv_prog_cc_g" >&5
1736 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1737 if test "$ac_test_CFLAGS" = set; then
1738 CFLAGS=$ac_save_CFLAGS
1739 elif test $ac_cv_prog_cc_g = yes; then
1740 if test "$GCC" = yes; then
1746 if test "$GCC" = yes; then
1752 # Some people use a C++ compiler to compile C. Since we use `exit',
1753 # in C++ we need to declare it. In case someone uses the same compiler
1754 # for both compiling C and C++ we need to have the C++ compiler decide
1755 # the declaration of exit, since it's the most demanding environment.
1756 cat >"conftest.$ac_ext" <<_ACEOF
1761 rm -f "conftest.$ac_objext"
1762 if { (eval echo "$as_me:1762: \"$ac_compile\"") >&5
1763 (eval $ac_compile) 2>&5
1765 echo "$as_me:1765: \$? = $ac_status" >&5
1766 (exit "$ac_status"); } &&
1767 { ac_try='test -s "conftest.$ac_objext"'
1768 { (eval echo "$as_me:1768: \"$ac_try\"") >&5
1771 echo "$as_me:1771: \$? = $ac_status" >&5
1772 (exit "$ac_status"); }; }; then
1773 for ac_declaration in \
1775 '#include <stdlib.h>' \
1776 'extern "C" void std::exit (int) throw (); using std::exit;' \
1777 'extern "C" void std::exit (int); using std::exit;' \
1778 'extern "C" void exit (int) throw ();' \
1779 'extern "C" void exit (int);' \
1782 cat >"conftest.$ac_ext" <<_ACEOF
1783 #line 1783 "configure"
1784 #include "confdefs.h"
1795 rm -f "conftest.$ac_objext"
1796 if { (eval echo "$as_me:1796: \"$ac_compile\"") >&5
1797 (eval $ac_compile) 2>&5
1799 echo "$as_me:1799: \$? = $ac_status" >&5
1800 (exit "$ac_status"); } &&
1801 { ac_try='test -s "conftest.$ac_objext"'
1802 { (eval echo "$as_me:1802: \"$ac_try\"") >&5
1805 echo "$as_me:1805: \$? = $ac_status" >&5
1806 (exit "$ac_status"); }; }; then
1809 echo "$as_me: failed program was:" >&5
1810 cat "conftest.$ac_ext" >&5
1813 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1814 cat >"conftest.$ac_ext" <<_ACEOF
1815 #line 1815 "configure"
1816 #include "confdefs.h"
1826 rm -f "conftest.$ac_objext"
1827 if { (eval echo "$as_me:1827: \"$ac_compile\"") >&5
1828 (eval $ac_compile) 2>&5
1830 echo "$as_me:1830: \$? = $ac_status" >&5
1831 (exit "$ac_status"); } &&
1832 { ac_try='test -s "conftest.$ac_objext"'
1833 { (eval echo "$as_me:1833: \"$ac_try\"") >&5
1836 echo "$as_me:1836: \$? = $ac_status" >&5
1837 (exit "$ac_status"); }; }; then
1840 echo "$as_me: failed program was:" >&5
1841 cat "conftest.$ac_ext" >&5
1843 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1846 if test -n "$ac_declaration"; then
1847 echo '#ifdef __cplusplus' >>confdefs.h
1848 echo "$ac_declaration" >>confdefs.h
1849 echo '#endif' >>confdefs.h
1853 echo "$as_me: failed program was:" >&5
1854 cat "conftest.$ac_ext" >&5
1856 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1858 ac_cpp='$CPP $CPPFLAGS'
1859 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1860 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1861 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1862 ac_main_return="return"
1865 if test "$GCC" = yes ; then
1866 echo "$as_me:1866: checking version of $CC" >&5
1867 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1868 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1869 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1870 echo "$as_me:1870: result: $GCC_VERSION" >&5
1871 echo "${ECHO_T}$GCC_VERSION" >&6
1876 if test "$GCC" = yes ; then
1879 echo "$as_me:1879: checking if this is really Intel C compiler" >&5
1880 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1881 cf_save_CFLAGS="$CFLAGS"
1882 CFLAGS="$CFLAGS -no-gcc"
1883 cat >"conftest.$ac_ext" <<_ACEOF
1884 #line 1884 "configure"
1885 #include "confdefs.h"
1891 #ifdef __INTEL_COMPILER
1900 rm -f "conftest.$ac_objext"
1901 if { (eval echo "$as_me:1901: \"$ac_compile\"") >&5
1902 (eval $ac_compile) 2>&5
1904 echo "$as_me:1904: \$? = $ac_status" >&5
1905 (exit "$ac_status"); } &&
1906 { ac_try='test -s "conftest.$ac_objext"'
1907 { (eval echo "$as_me:1907: \"$ac_try\"") >&5
1910 echo "$as_me:1910: \$? = $ac_status" >&5
1911 (exit "$ac_status"); }; }; then
1913 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1916 echo "$as_me: failed program was:" >&5
1917 cat "conftest.$ac_ext" >&5
1919 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1920 CFLAGS="$cf_save_CFLAGS"
1921 echo "$as_me:1921: result: $INTEL_COMPILER" >&5
1922 echo "${ECHO_T}$INTEL_COMPILER" >&6
1929 if test "$GCC" = yes ; then
1930 echo "$as_me:1930: checking if this is really Clang C compiler" >&5
1931 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1932 cf_save_CFLAGS="$CFLAGS"
1933 cat >"conftest.$ac_ext" <<_ACEOF
1934 #line 1934 "configure"
1935 #include "confdefs.h"
1950 rm -f "conftest.$ac_objext"
1951 if { (eval echo "$as_me:1951: \"$ac_compile\"") >&5
1952 (eval $ac_compile) 2>&5
1954 echo "$as_me:1954: \$? = $ac_status" >&5
1955 (exit "$ac_status"); } &&
1956 { ac_try='test -s "conftest.$ac_objext"'
1957 { (eval echo "$as_me:1957: \"$ac_try\"") >&5
1960 echo "$as_me:1960: \$? = $ac_status" >&5
1961 (exit "$ac_status"); }; }; then
1965 echo "$as_me: failed program was:" >&5
1966 cat "conftest.$ac_ext" >&5
1968 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1969 CFLAGS="$cf_save_CFLAGS"
1970 echo "$as_me:1970: result: $CLANG_COMPILER" >&5
1971 echo "${ECHO_T}$CLANG_COMPILER" >&6
1976 if test "x$CLANG_COMPILER" = "xyes" ; then
1978 (c[1-9][0-9]|*/c[1-9][0-9])
1979 { echo "$as_me:1979: WARNING: replacing broken compiler alias $CC" >&5
1980 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
1981 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
1986 echo "$as_me:1986: checking version of $CC" >&5
1987 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1988 CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1989 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
1990 echo "$as_me:1990: result: $CLANG_VERSION" >&5
1991 echo "${ECHO_T}$CLANG_VERSION" >&6
1993 for cf_clang_opt in \
1994 -Qunused-arguments \
1995 -Wno-error=implicit-function-declaration
1997 echo "$as_me:1997: checking if option $cf_clang_opt works" >&5
1998 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
1999 cf_save_CFLAGS="$CFLAGS"
2000 CFLAGS="$CFLAGS $cf_clang_opt"
2001 cat >"conftest.$ac_ext" <<_ACEOF
2002 #line 2002 "configure"
2003 #include "confdefs.h"
2010 printf("hello!\\n");
2015 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2016 if { (eval echo "$as_me:2016: \"$ac_link\"") >&5
2017 (eval $ac_link) 2>&5
2019 echo "$as_me:2019: \$? = $ac_status" >&5
2020 (exit "$ac_status"); } &&
2021 { ac_try='test -s "conftest$ac_exeext"'
2022 { (eval echo "$as_me:2022: \"$ac_try\"") >&5
2025 echo "$as_me:2025: \$? = $ac_status" >&5
2026 (exit "$ac_status"); }; }; then
2030 echo "$as_me: failed program was:" >&5
2031 cat "conftest.$ac_ext" >&5
2035 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2036 echo "$as_me:2036: result: $cf_clang_optok" >&5
2037 echo "${ECHO_T}$cf_clang_optok" >&6
2038 CFLAGS="$cf_save_CFLAGS"
2039 if test "$cf_clang_optok" = yes; then
2040 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2042 echo "${as_me:-configure}:2042: testing adding option $cf_clang_opt ..." 1>&5
2044 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2045 CFLAGS="${CFLAGS}$cf_clang_opt"
2051 echo "$as_me:2051: checking for $CC option to accept ANSI C" >&5
2052 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2053 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2054 echo $ECHO_N "(cached) $ECHO_C" >&6
2056 ac_cv_prog_cc_stdc=no
2058 cat >"conftest.$ac_ext" <<_ACEOF
2059 #line 2059 "configure"
2060 #include "confdefs.h"
2063 #include <sys/types.h>
2064 #include <sys/stat.h>
2065 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2066 struct buf { int x; };
2067 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2068 static char *e (p, i)
2074 static char *f (char * (*g) (char **, int), char **p, ...)
2079 s = g (p, va_arg (v,int));
2083 int test (int i, double x);
2084 struct s1 {int (*f) (int a);};
2085 struct s2 {int (*f) (double a);};
2086 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2092 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2097 # Don't try gcc -ansi; that turns off useful extensions and
2098 # breaks some systems' header files.
2099 # AIX -qlanglvl=ansi
2100 # Ultrix and OSF/1 -std1
2101 # HP-UX 10.20 and later -Ae
2102 # HP-UX older versions -Aa -D_HPUX_SOURCE
2103 # SVR4 -Xc -D__EXTENSIONS__
2104 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2106 CC="$ac_save_CC $ac_arg"
2107 rm -f "conftest.$ac_objext"
2108 if { (eval echo "$as_me:2108: \"$ac_compile\"") >&5
2109 (eval $ac_compile) 2>&5
2111 echo "$as_me:2111: \$? = $ac_status" >&5
2112 (exit "$ac_status"); } &&
2113 { ac_try='test -s "conftest.$ac_objext"'
2114 { (eval echo "$as_me:2114: \"$ac_try\"") >&5
2117 echo "$as_me:2117: \$? = $ac_status" >&5
2118 (exit "$ac_status"); }; }; then
2119 ac_cv_prog_cc_stdc=$ac_arg
2122 echo "$as_me: failed program was:" >&5
2123 cat "conftest.$ac_ext" >&5
2125 rm -f "conftest.$ac_objext"
2127 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2132 case "x$ac_cv_prog_cc_stdc" in
2134 echo "$as_me:2134: result: none needed" >&5
2135 echo "${ECHO_T}none needed" >&6 ;;
2137 echo "$as_me:2137: result: $ac_cv_prog_cc_stdc" >&5
2138 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2139 CC="$CC $ac_cv_prog_cc_stdc" ;;
2142 # This should have been defined by AC_PROG_CC
2145 echo "$as_me:2145: checking \$CFLAGS variable" >&5
2146 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2149 echo "$as_me:2149: result: broken" >&5
2150 echo "${ECHO_T}broken" >&6
2151 { echo "$as_me:2151: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2152 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2155 for cf_arg in $cf_flags
2161 cf_new_extra_cppflags=
2163 for cf_add_cflags in $cf_arg
2165 case "$cf_fix_cppflags" in
2167 case "$cf_add_cflags" in
2168 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2169 case "$cf_add_cflags" in
2171 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2173 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2174 && test -z "${cf_tst_cflags}" \
2175 && cf_fix_cppflags=yes
2177 if test "$cf_fix_cppflags" = yes ; then
2179 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2180 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2183 elif test "${cf_tst_cflags}" = "\"'" ; then
2185 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2186 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2196 case "$cf_add_cflags" in
2198 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2200 CPPFLAGS=`echo "$CPPFLAGS" | \
2201 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2202 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2207 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2208 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2215 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2216 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2223 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2224 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2226 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2228 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2229 && test -z "${cf_tst_cflags}" \
2230 && cf_fix_cppflags=no
2235 if test -n "$cf_new_cflags" ; then
2237 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2238 CFLAGS="${CFLAGS}$cf_new_cflags"
2242 if test -n "$cf_new_cppflags" ; then
2244 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2245 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2249 if test -n "$cf_new_extra_cppflags" ; then
2251 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2252 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2259 echo "$as_me:2259: result: ok" >&5
2260 echo "${ECHO_T}ok" >&6
2264 echo "$as_me:2264: checking \$CC variable" >&5
2265 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2268 echo "$as_me:2268: result: broken" >&5
2269 echo "${ECHO_T}broken" >&6
2270 { echo "$as_me:2270: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2271 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2273 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2274 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2276 for cf_arg in $cf_flags
2284 cf_new_extra_cppflags=
2286 for cf_add_cflags in $cf_arg
2288 case "$cf_fix_cppflags" in
2290 case "$cf_add_cflags" in
2291 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2292 case "$cf_add_cflags" in
2294 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2296 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2297 && test -z "${cf_tst_cflags}" \
2298 && cf_fix_cppflags=yes
2300 if test "$cf_fix_cppflags" = yes ; then
2302 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2303 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2306 elif test "${cf_tst_cflags}" = "\"'" ; then
2308 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2309 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2319 case "$cf_add_cflags" in
2321 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2323 CPPFLAGS=`echo "$CPPFLAGS" | \
2324 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2325 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2330 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2331 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2338 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2339 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2346 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2347 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2349 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2351 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2352 && test -z "${cf_tst_cflags}" \
2353 && cf_fix_cppflags=no
2358 if test -n "$cf_new_cflags" ; then
2360 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2361 CFLAGS="${CFLAGS}$cf_new_cflags"
2365 if test -n "$cf_new_cppflags" ; then
2367 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2368 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2372 if test -n "$cf_new_extra_cppflags" ; then
2374 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2375 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2385 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2387 echo "${as_me:-configure}:2387: testing resulting CC: '$CC' ..." 1>&5
2389 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2391 echo "${as_me:-configure}:2391: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2393 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2395 echo "${as_me:-configure}:2395: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2399 echo "$as_me:2399: result: ok" >&5
2400 echo "${ECHO_T}ok" >&6
2404 echo "$as_me:2404: checking for inline" >&5
2405 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2406 if test "${ac_cv_c_inline+set}" = set; then
2407 echo $ECHO_N "(cached) $ECHO_C" >&6
2410 for ac_kw in inline __inline__ __inline; do
2411 cat >"conftest.$ac_ext" <<_ACEOF
2412 #line 2412 "configure"
2413 #include "confdefs.h"
2415 static $ac_kw int static_foo () {return 0; }
2416 $ac_kw int foo () {return 0; }
2420 rm -f "conftest.$ac_objext"
2421 if { (eval echo "$as_me:2421: \"$ac_compile\"") >&5
2422 (eval $ac_compile) 2>&5
2424 echo "$as_me:2424: \$? = $ac_status" >&5
2425 (exit "$ac_status"); } &&
2426 { ac_try='test -s "conftest.$ac_objext"'
2427 { (eval echo "$as_me:2427: \"$ac_try\"") >&5
2430 echo "$as_me:2430: \$? = $ac_status" >&5
2431 (exit "$ac_status"); }; }; then
2432 ac_cv_c_inline=$ac_kw; break
2434 echo "$as_me: failed program was:" >&5
2435 cat "conftest.$ac_ext" >&5
2437 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2441 echo "$as_me:2441: result: $ac_cv_c_inline" >&5
2442 echo "${ECHO_T}$ac_cv_c_inline" >&6
2443 case $ac_cv_c_inline in
2446 cat >>confdefs.h <<\EOF
2450 *) cat >>confdefs.h <<EOF
2451 #define inline $ac_cv_c_inline
2456 for ac_prog in ggrep grep
2458 # Extract the first word of "$ac_prog", so it can be a program name with args.
2459 set dummy $ac_prog; ac_word=$2
2460 echo "$as_me:2460: checking for $ac_word" >&5
2461 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2462 if test "${ac_cv_prog_GREP+set}" = set; then
2463 echo $ECHO_N "(cached) $ECHO_C" >&6
2465 if test -n "$GREP"; then
2466 ac_cv_prog_GREP="$GREP" # Let the user override the test.
2468 ac_save_IFS=$IFS; IFS=$ac_path_separator
2470 for ac_dir in $ac_dummy; do
2472 test -z "$ac_dir" && ac_dir=.
2473 $as_executable_p "$ac_dir/$ac_word" || continue
2474 ac_cv_prog_GREP="$ac_prog"
2475 echo "$as_me:2475: found $ac_dir/$ac_word" >&5
2481 GREP=$ac_cv_prog_GREP
2482 if test -n "$GREP"; then
2483 echo "$as_me:2483: result: $GREP" >&5
2484 echo "${ECHO_T}$GREP" >&6
2486 echo "$as_me:2486: result: no" >&5
2487 echo "${ECHO_T}no" >&6
2490 test -n "$GREP" && break
2492 test -n "$GREP" || GREP=": "
2494 echo "$as_me:2494: checking for egrep" >&5
2495 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2496 if test "${ac_cv_path_EGREP+set}" = set; then
2497 echo $ECHO_N "(cached) $ECHO_C" >&6
2499 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2500 then ac_cv_path_EGREP="$GREP -E"
2502 for ac_prog in gegrep egrep
2504 # Extract the first word of "$ac_prog", so it can be a program name with args.
2505 set dummy $ac_prog; ac_word=$2
2506 echo "$as_me:2506: checking for $ac_word" >&5
2507 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2508 if test "${ac_cv_path_EGREP+set}" = set; then
2509 echo $ECHO_N "(cached) $ECHO_C" >&6
2513 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2516 ac_save_IFS=$IFS; IFS=$ac_path_separator
2518 for ac_dir in $ac_dummy; do
2520 test -z "$ac_dir" && ac_dir=.
2521 if $as_executable_p "$ac_dir/$ac_word"; then
2522 ac_cv_path_EGREP="$ac_dir/$ac_word"
2523 echo "$as_me:2523: found $ac_dir/$ac_word" >&5
2531 EGREP=$ac_cv_path_EGREP
2533 if test -n "$EGREP"; then
2534 echo "$as_me:2534: result: $EGREP" >&5
2535 echo "${ECHO_T}$EGREP" >&6
2537 echo "$as_me:2537: result: no" >&5
2538 echo "${ECHO_T}no" >&6
2541 test -n "$EGREP" && break
2543 test -n "$EGREP" || EGREP=": "
2545 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2545: error: cannot find workable egrep" >&5
2546 echo "$as_me: error: cannot find workable egrep" >&2;}
2547 { (exit 1); exit 1; }; }
2550 echo "$as_me:2550: result: $ac_cv_path_EGREP" >&5
2551 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2552 EGREP="$ac_cv_path_EGREP"
2555 ac_cpp='$CPP $CPPFLAGS'
2556 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2557 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2558 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2559 ac_main_return="return"
2560 echo "$as_me:2560: checking how to run the C preprocessor" >&5
2561 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2562 # On Suns, sometimes $CPP names a directory.
2563 if test -n "$CPP" && test -d "$CPP"; then
2566 if test -z "$CPP"; then
2567 if test "${ac_cv_prog_CPP+set}" = set; then
2568 echo $ECHO_N "(cached) $ECHO_C" >&6
2570 # Double quotes because CPP needs to be expanded
2571 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2574 for ac_c_preproc_warn_flag in '' yes
2576 # Use a header file that comes with gcc, so configuring glibc
2577 # with a fresh cross-compiler works.
2578 # On the NeXT, cc -E runs the code through the compiler's parser,
2579 # not just through cpp. "Syntax error" is here to catch this case.
2580 cat >"conftest.$ac_ext" <<_ACEOF
2581 #line 2581 "configure"
2582 #include "confdefs.h"
2586 if { (eval echo "$as_me:2586: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2587 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2589 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2591 cat conftest.err >&5
2592 echo "$as_me:2592: \$? = $ac_status" >&5
2593 (exit "$ac_status"); } >/dev/null; then
2594 if test -s conftest.err; then
2595 ac_cpp_err=$ac_c_preproc_warn_flag
2602 if test -z "$ac_cpp_err"; then
2605 echo "$as_me: failed program was:" >&5
2606 cat "conftest.$ac_ext" >&5
2607 # Broken: fails on valid input.
2610 rm -f conftest.err "conftest.$ac_ext"
2612 # OK, works on sane cases. Now check whether non-existent headers
2613 # can be detected and how.
2614 cat >"conftest.$ac_ext" <<_ACEOF
2615 #line 2615 "configure"
2616 #include "confdefs.h"
2617 #include <ac_nonexistent.h>
2619 if { (eval echo "$as_me:2619: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2620 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2622 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2624 cat conftest.err >&5
2625 echo "$as_me:2625: \$? = $ac_status" >&5
2626 (exit "$ac_status"); } >/dev/null; then
2627 if test -s conftest.err; then
2628 ac_cpp_err=$ac_c_preproc_warn_flag
2635 if test -z "$ac_cpp_err"; then
2636 # Broken: success on invalid input.
2639 echo "$as_me: failed program was:" >&5
2640 cat "conftest.$ac_ext" >&5
2641 # Passes both tests.
2645 rm -f conftest.err "conftest.$ac_ext"
2648 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2649 rm -f conftest.err "conftest.$ac_ext"
2650 if $ac_preproc_ok; then
2662 echo "$as_me:2662: result: $CPP" >&5
2663 echo "${ECHO_T}$CPP" >&6
2665 for ac_c_preproc_warn_flag in '' yes
2667 # Use a header file that comes with gcc, so configuring glibc
2668 # with a fresh cross-compiler works.
2669 # On the NeXT, cc -E runs the code through the compiler's parser,
2670 # not just through cpp. "Syntax error" is here to catch this case.
2671 cat >"conftest.$ac_ext" <<_ACEOF
2672 #line 2672 "configure"
2673 #include "confdefs.h"
2677 if { (eval echo "$as_me:2677: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2678 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2680 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2682 cat conftest.err >&5
2683 echo "$as_me:2683: \$? = $ac_status" >&5
2684 (exit "$ac_status"); } >/dev/null; then
2685 if test -s conftest.err; then
2686 ac_cpp_err=$ac_c_preproc_warn_flag
2693 if test -z "$ac_cpp_err"; then
2696 echo "$as_me: failed program was:" >&5
2697 cat "conftest.$ac_ext" >&5
2698 # Broken: fails on valid input.
2701 rm -f conftest.err "conftest.$ac_ext"
2703 # OK, works on sane cases. Now check whether non-existent headers
2704 # can be detected and how.
2705 cat >"conftest.$ac_ext" <<_ACEOF
2706 #line 2706 "configure"
2707 #include "confdefs.h"
2708 #include <ac_nonexistent.h>
2710 if { (eval echo "$as_me:2710: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2711 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2713 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2715 cat conftest.err >&5
2716 echo "$as_me:2716: \$? = $ac_status" >&5
2717 (exit "$ac_status"); } >/dev/null; then
2718 if test -s conftest.err; then
2719 ac_cpp_err=$ac_c_preproc_warn_flag
2726 if test -z "$ac_cpp_err"; then
2727 # Broken: success on invalid input.
2730 echo "$as_me: failed program was:" >&5
2731 cat "conftest.$ac_ext" >&5
2732 # Passes both tests.
2736 rm -f conftest.err "conftest.$ac_ext"
2739 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2740 rm -f conftest.err "conftest.$ac_ext"
2741 if $ac_preproc_ok; then
2744 { { echo "$as_me:2744: error: C preprocessor \"$CPP\" fails sanity check" >&5
2745 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2746 { (exit 1); exit 1; }; }
2750 ac_cpp='$CPP $CPPFLAGS'
2751 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2752 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2753 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2754 ac_main_return="return"
2756 for ac_prog in mawk gawk nawk awk
2758 # Extract the first word of "$ac_prog", so it can be a program name with args.
2759 set dummy $ac_prog; ac_word=$2
2760 echo "$as_me:2760: checking for $ac_word" >&5
2761 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2762 if test "${ac_cv_prog_AWK+set}" = set; then
2763 echo $ECHO_N "(cached) $ECHO_C" >&6
2765 if test -n "$AWK"; then
2766 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2768 ac_save_IFS=$IFS; IFS=$ac_path_separator
2770 for ac_dir in $ac_dummy; do
2772 test -z "$ac_dir" && ac_dir=.
2773 $as_executable_p "$ac_dir/$ac_word" || continue
2774 ac_cv_prog_AWK="$ac_prog"
2775 echo "$as_me:2775: found $ac_dir/$ac_word" >&5
2782 if test -n "$AWK"; then
2783 echo "$as_me:2783: result: $AWK" >&5
2784 echo "${ECHO_T}$AWK" >&6
2786 echo "$as_me:2786: result: no" >&5
2787 echo "${ECHO_T}no" >&6
2790 test -n "$AWK" && break
2793 # Find a good install program. We prefer a C program (faster),
2794 # so one script is as good as another. But avoid the broken or
2795 # incompatible versions:
2796 # SysV /etc/install, /usr/sbin/install
2797 # SunOS /usr/etc/install
2798 # IRIX /sbin/install
2800 # AmigaOS /C/install, which installs bootblocks on floppy discs
2801 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2802 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2803 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2804 # ./install, which can be erroneously created by make from ./install.sh.
2805 echo "$as_me:2805: checking for a BSD compatible install" >&5
2806 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2807 if test -z "$INSTALL"; then
2808 if test "${ac_cv_path_install+set}" = set; then
2809 echo $ECHO_N "(cached) $ECHO_C" >&6
2811 ac_save_IFS=$IFS; IFS=$ac_path_separator
2812 for ac_dir in $PATH; do
2814 # Account for people who put trailing slashes in PATH elements.
2816 / | ./ | .// | /cC/* \
2817 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2820 # OSF1 and SCO ODT 3.0 have their own names for install.
2821 # Don't use installbsd from OSF since it installs stuff as root
2823 for ac_prog in ginstall scoinst install; do
2824 if $as_executable_p "$ac_dir/$ac_prog"; then
2825 if test $ac_prog = install &&
2826 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2827 # AIX install. It has an incompatible calling convention.
2829 elif test $ac_prog = install &&
2830 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2831 # program-specific install script used by HP pwplus--don't use.
2834 ac_cv_path_install="$ac_dir/$ac_prog -c"
2844 if test "${ac_cv_path_install+set}" = set; then
2845 INSTALL=$ac_cv_path_install
2847 # As a last resort, use the slow shell script. We don't cache a
2848 # path for INSTALL within a source directory, because that will
2849 # break other packages using the cache if that directory is
2850 # removed, or if the path is relative.
2851 INSTALL=$ac_install_sh
2854 echo "$as_me:2854: result: $INSTALL" >&5
2855 echo "${ECHO_T}$INSTALL" >&6
2857 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2858 # It thinks the first close brace ends the variable substitution.
2859 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2861 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2863 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2869 cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
2870 test -z "$cf_dir" && cf_dir=.
2871 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
2875 echo "$as_me:2875: checking if you want to install stripped executables" >&5
2876 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2878 # Check whether --enable-stripping or --disable-stripping was given.
2879 if test "${enable_stripping+set}" = set; then
2880 enableval="$enable_stripping"
2881 test "$enableval" != no && enableval=yes
2882 if test "$enableval" != "yes" ; then
2885 enable_stripping=yes
2889 enable_stripping=yes
2892 echo "$as_me:2892: result: $enable_stripping" >&5
2893 echo "${ECHO_T}$enable_stripping" >&6
2895 if test "$enable_stripping" = yes
2902 : "${INSTALL:=install}"
2903 echo "$as_me:2903: checking if install accepts -p option" >&5
2904 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
2905 if test "${cf_cv_install_p+set}" = set; then
2906 echo $ECHO_N "(cached) $ECHO_C" >&6
2913 if $INSTALL -p conftest.in conftest.out 2>/dev/null
2915 if test -f conftest.out/conftest.in
2917 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
2918 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
2919 if test -s conftest.err
2934 echo "$as_me:2934: result: $cf_cv_install_p" >&5
2935 echo "${ECHO_T}$cf_cv_install_p" >&6
2937 echo "$as_me:2937: checking if install needs to be told about ownership" >&5
2938 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
2939 case `$ac_config_guess` in
2948 echo "$as_me:2948: result: $with_install_o" >&5
2949 echo "${ECHO_T}$with_install_o" >&6
2950 if test "x$with_install_o" = xyes
2952 INSTALL_OPT_O="`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`"
2957 for ac_prog in lint cppcheck splint
2959 # Extract the first word of "$ac_prog", so it can be a program name with args.
2960 set dummy $ac_prog; ac_word=$2
2961 echo "$as_me:2961: checking for $ac_word" >&5
2962 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2963 if test "${ac_cv_prog_LINT+set}" = set; then
2964 echo $ECHO_N "(cached) $ECHO_C" >&6
2966 if test -n "$LINT"; then
2967 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2969 ac_save_IFS=$IFS; IFS=$ac_path_separator
2971 for ac_dir in $ac_dummy; do
2973 test -z "$ac_dir" && ac_dir=.
2974 $as_executable_p "$ac_dir/$ac_word" || continue
2975 ac_cv_prog_LINT="$ac_prog"
2976 echo "$as_me:2976: found $ac_dir/$ac_word" >&5
2982 LINT=$ac_cv_prog_LINT
2983 if test -n "$LINT"; then
2984 echo "$as_me:2984: result: $LINT" >&5
2985 echo "${ECHO_T}$LINT" >&6
2987 echo "$as_me:2987: result: no" >&5
2988 echo "${ECHO_T}no" >&6
2991 test -n "$LINT" && break
2995 (xcppcheck|x*/cppcheck)
2996 test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3000 echo "$as_me:3000: checking for \".PHONY\" make-support" >&5
3001 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
3002 if test "${cf_cv_make_PHONY+set}" = set; then
3003 echo $ECHO_N "(cached) $ECHO_C" >&6
3008 mkdir conftest || exit 1
3010 cat >makefile <<'CF_EOF'
3014 @echo "** making $@ $(DATA)"
3016 @echo "** making $@ $(DATA)"
3018 @echo "** making $@ $(DATA)"
3021 @echo "** making $@ $(DATA)"
3024 for cf_data in 1 2 3
3026 ${MAKE:-make} always DATA=$cf_data
3027 ${MAKE:-make} once DATA=$cf_data
3028 ${MAKE:-make} -t always once
3029 if test -f always ; then
3030 echo "no (case 1)" > ../conftest.tmp
3031 elif test ! -f always.out ; then
3032 echo "no (case 2)" > ../conftest.tmp
3033 elif test ! -f once.out ; then
3034 echo "no (case 3)" > ../conftest.tmp
3035 elif ! cmp -s always.out once.out ; then
3036 echo "no (case 4)" > ../conftest.tmp
3037 diff always.out once.out
3039 cf_check="`cat always.out`"
3040 if test "x$cf_check" != "x$cf_data" ; then
3041 echo "no (case 5)" > ../conftest.tmp
3043 echo yes > ../conftest.tmp
3051 cf_cv_make_PHONY="`cat conftest.tmp`"
3055 echo "$as_me:3055: result: $cf_cv_make_PHONY" >&5
3056 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
3059 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
3060 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
3062 echo "$as_me:3062: checking if filesystem supports mixed-case filenames" >&5
3063 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3064 if test "${cf_cv_mixedcase+set}" = set; then
3065 echo $ECHO_N "(cached) $ECHO_C" >&6
3068 if test "$cross_compiling" = yes ; then
3069 case "$target_alias" in
3070 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3078 rm -f conftest CONFTEST
3080 if test -f CONFTEST ; then
3085 rm -f conftest CONFTEST
3089 echo "$as_me:3089: result: $cf_cv_mixedcase" >&5
3090 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3091 test "$cf_cv_mixedcase" = yes &&
3092 cat >>confdefs.h <<\EOF
3093 #define MIXEDCASE_FILENAMES 1
3096 for ac_prog in exctags ctags
3098 # Extract the first word of "$ac_prog", so it can be a program name with args.
3099 set dummy $ac_prog; ac_word=$2
3100 echo "$as_me:3100: checking for $ac_word" >&5
3101 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3102 if test "${ac_cv_prog_CTAGS+set}" = set; then
3103 echo $ECHO_N "(cached) $ECHO_C" >&6
3105 if test -n "$CTAGS"; then
3106 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3108 ac_save_IFS=$IFS; IFS=$ac_path_separator
3110 for ac_dir in $ac_dummy; do
3112 test -z "$ac_dir" && ac_dir=.
3113 $as_executable_p "$ac_dir/$ac_word" || continue
3114 ac_cv_prog_CTAGS="$ac_prog"
3115 echo "$as_me:3115: found $ac_dir/$ac_word" >&5
3121 CTAGS=$ac_cv_prog_CTAGS
3122 if test -n "$CTAGS"; then
3123 echo "$as_me:3123: result: $CTAGS" >&5
3124 echo "${ECHO_T}$CTAGS" >&6
3126 echo "$as_me:3126: result: no" >&5
3127 echo "${ECHO_T}no" >&6
3130 test -n "$CTAGS" && break
3133 for ac_prog in exetags etags
3135 # Extract the first word of "$ac_prog", so it can be a program name with args.
3136 set dummy $ac_prog; ac_word=$2
3137 echo "$as_me:3137: checking for $ac_word" >&5
3138 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3139 if test "${ac_cv_prog_ETAGS+set}" = set; then
3140 echo $ECHO_N "(cached) $ECHO_C" >&6
3142 if test -n "$ETAGS"; then
3143 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3145 ac_save_IFS=$IFS; IFS=$ac_path_separator
3147 for ac_dir in $ac_dummy; do
3149 test -z "$ac_dir" && ac_dir=.
3150 $as_executable_p "$ac_dir/$ac_word" || continue
3151 ac_cv_prog_ETAGS="$ac_prog"
3152 echo "$as_me:3152: found $ac_dir/$ac_word" >&5
3158 ETAGS=$ac_cv_prog_ETAGS
3159 if test -n "$ETAGS"; then
3160 echo "$as_me:3160: result: $ETAGS" >&5
3161 echo "${ECHO_T}$ETAGS" >&6
3163 echo "$as_me:3163: result: no" >&5
3164 echo "${ECHO_T}no" >&6
3167 test -n "$ETAGS" && break
3170 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3171 set dummy ${CTAGS:-ctags}; ac_word=$2
3172 echo "$as_me:3172: checking for $ac_word" >&5
3173 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3174 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3175 echo $ECHO_N "(cached) $ECHO_C" >&6
3177 if test -n "$MAKE_LOWER_TAGS"; then
3178 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3180 ac_save_IFS=$IFS; IFS=$ac_path_separator
3182 for ac_dir in $ac_dummy; do
3184 test -z "$ac_dir" && ac_dir=.
3185 $as_executable_p "$ac_dir/$ac_word" || continue
3186 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3187 echo "$as_me:3187: found $ac_dir/$ac_word" >&5
3191 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3194 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3195 if test -n "$MAKE_LOWER_TAGS"; then
3196 echo "$as_me:3196: result: $MAKE_LOWER_TAGS" >&5
3197 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3199 echo "$as_me:3199: result: no" >&5
3200 echo "${ECHO_T}no" >&6
3203 if test "$cf_cv_mixedcase" = yes ; then
3204 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3205 set dummy ${ETAGS:-etags}; ac_word=$2
3206 echo "$as_me:3206: checking for $ac_word" >&5
3207 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3208 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3209 echo $ECHO_N "(cached) $ECHO_C" >&6
3211 if test -n "$MAKE_UPPER_TAGS"; then
3212 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3214 ac_save_IFS=$IFS; IFS=$ac_path_separator
3216 for ac_dir in $ac_dummy; do
3218 test -z "$ac_dir" && ac_dir=.
3219 $as_executable_p "$ac_dir/$ac_word" || continue
3220 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3221 echo "$as_me:3221: found $ac_dir/$ac_word" >&5
3225 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3228 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3229 if test -n "$MAKE_UPPER_TAGS"; then
3230 echo "$as_me:3230: result: $MAKE_UPPER_TAGS" >&5
3231 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3233 echo "$as_me:3233: result: no" >&5
3234 echo "${ECHO_T}no" >&6
3241 if test "$MAKE_UPPER_TAGS" = yes ; then
3247 if test "$MAKE_LOWER_TAGS" = yes ; then
3253 echo "$as_me:3253: checking if -lm needed for math functions" >&5
3254 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
3255 if test "${cf_cv_need_libm+set}" = set; then
3256 echo $ECHO_N "(cached) $ECHO_C" >&6
3259 cat >"conftest.$ac_ext" <<_ACEOF
3260 #line 3260 "configure"
3261 #include "confdefs.h"
3270 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
3275 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3276 if { (eval echo "$as_me:3276: \"$ac_link\"") >&5
3277 (eval $ac_link) 2>&5
3279 echo "$as_me:3279: \$? = $ac_status" >&5
3280 (exit "$ac_status"); } &&
3281 { ac_try='test -s "conftest$ac_exeext"'
3282 { (eval echo "$as_me:3282: \"$ac_try\"") >&5
3285 echo "$as_me:3285: \$? = $ac_status" >&5
3286 (exit "$ac_status"); }; }; then
3289 echo "$as_me: failed program was:" >&5
3290 cat "conftest.$ac_ext" >&5
3293 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3295 echo "$as_me:3295: result: $cf_cv_need_libm" >&5
3296 echo "${ECHO_T}$cf_cv_need_libm" >&6
3297 if test "$cf_cv_need_libm" = yes
3305 CC_SHARED_OPTS=unknown
3306 CPPFLAGS="$CPPFLAGS"
3308 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
3309 DFT_UPR_MODEL="NORMAL"
3322 PACKAGE="ncurses-examples"
3328 TINFO_LIBS='$(LIBS_CURSES)'
3329 cf_cv_abi_version=""
3330 cf_cv_rel_version=""
3336 echo "$as_me:3336: checking for fgrep" >&5
3337 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
3338 if test "${ac_cv_path_FGREP+set}" = set; then
3339 echo $ECHO_N "(cached) $ECHO_C" >&6
3341 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
3342 then ac_cv_path_FGREP="$GREP -F"
3344 for ac_prog in gfgrep fgrep
3346 # Extract the first word of "$ac_prog", so it can be a program name with args.
3347 set dummy $ac_prog; ac_word=$2
3348 echo "$as_me:3348: checking for $ac_word" >&5
3349 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3350 if test "${ac_cv_path_FGREP+set}" = set; then
3351 echo $ECHO_N "(cached) $ECHO_C" >&6
3355 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
3358 ac_save_IFS=$IFS; IFS=$ac_path_separator
3360 for ac_dir in $ac_dummy; do
3362 test -z "$ac_dir" && ac_dir=.
3363 if $as_executable_p "$ac_dir/$ac_word"; then
3364 ac_cv_path_FGREP="$ac_dir/$ac_word"
3365 echo "$as_me:3365: found $ac_dir/$ac_word" >&5
3373 FGREP=$ac_cv_path_FGREP
3375 if test -n "$FGREP"; then
3376 echo "$as_me:3376: result: $FGREP" >&5
3377 echo "${ECHO_T}$FGREP" >&6
3379 echo "$as_me:3379: result: no" >&5
3380 echo "${ECHO_T}no" >&6
3383 test -n "$FGREP" && break
3385 test -n "$FGREP" || FGREP=": "
3387 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:3387: error: cannot find workable fgrep" >&5
3388 echo "$as_me: error: cannot find workable fgrep" >&2;}
3389 { (exit 1); exit 1; }; }
3392 echo "$as_me:3392: result: $ac_cv_path_FGREP" >&5
3393 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
3394 FGREP="$ac_cv_path_FGREP"
3396 echo "$as_me:3396: checking if you want to use C11 _Noreturn feature" >&5
3397 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
3399 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
3400 if test "${enable_stdnoreturn+set}" = set; then
3401 enableval="$enable_stdnoreturn"
3402 test "$enableval" != yes && enableval=no
3403 if test "$enableval" != "no" ; then
3404 enable_stdnoreturn=yes
3406 enable_stdnoreturn=no
3410 enable_stdnoreturn=no
3413 echo "$as_me:3413: result: $enable_stdnoreturn" >&5
3414 echo "${ECHO_T}$enable_stdnoreturn" >&6
3416 if test $enable_stdnoreturn = yes; then
3417 echo "$as_me:3417: checking for C11 _Noreturn feature" >&5
3418 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
3419 if test "${cf_cv_c11_noreturn+set}" = set; then
3420 echo $ECHO_N "(cached) $ECHO_C" >&6
3422 cat >"conftest.$ac_ext" <<_ACEOF
3423 #line 3423 "configure"
3424 #include "confdefs.h"
3428 #include <stdnoreturn.h>
3429 static _Noreturn void giveup(void) { exit(0); }
3434 if (feof(stdin)) giveup()
3439 rm -f "conftest.$ac_objext"
3440 if { (eval echo "$as_me:3440: \"$ac_compile\"") >&5
3441 (eval $ac_compile) 2>&5
3443 echo "$as_me:3443: \$? = $ac_status" >&5
3444 (exit "$ac_status"); } &&
3445 { ac_try='test -s "conftest.$ac_objext"'
3446 { (eval echo "$as_me:3446: \"$ac_try\"") >&5
3449 echo "$as_me:3449: \$? = $ac_status" >&5
3450 (exit "$ac_status"); }; }; then
3451 cf_cv_c11_noreturn=yes
3453 echo "$as_me: failed program was:" >&5
3454 cat "conftest.$ac_ext" >&5
3455 cf_cv_c11_noreturn=no
3457 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3460 echo "$as_me:3460: result: $cf_cv_c11_noreturn" >&5
3461 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
3463 cf_cv_c11_noreturn=no,
3466 if test "$cf_cv_c11_noreturn" = yes; then
3468 cat >>confdefs.h <<\EOF
3469 #define HAVE_STDNORETURN_H 1
3472 cat >>confdefs.h <<EOF
3473 #define STDC_NORETURN _Noreturn
3476 HAVE_STDNORETURN_H=1
3478 HAVE_STDNORETURN_H=0
3481 if test "$GCC" = yes || test "$GXX" = yes
3483 cat > conftest.i <<EOF
3485 #define GCC_PRINTF 0
3490 #ifndef GCC_NORETURN
3491 #define GCC_NORETURN /* nothing */
3494 #define GCC_UNUSED /* nothing */
3497 if test "$GCC" = yes
3499 { echo "$as_me:3499: checking for $CC __attribute__ directives..." >&5
3500 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
3501 cat > "conftest.$ac_ext" <<EOF
3502 #line 3502 "${as_me:-configure}"
3503 #include "confdefs.h"
3504 #include "conftest.h"
3505 #include "conftest.i"
3507 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3509 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
3512 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
3514 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
3516 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
3517 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
3518 extern GCC_NORETURN void foo(void);
3519 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
3521 cf_printf_attribute=no
3522 cf_scanf_attribute=no
3523 for cf_attribute in scanf printf unused noreturn
3526 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3528 cf_directive="__attribute__(($cf_attribute))"
3529 echo "checking for $CC $cf_directive" 1>&5
3531 case "$cf_attribute" in
3533 cf_printf_attribute=yes
3534 cat >conftest.h <<EOF
3535 #define GCC_$cf_ATTRIBUTE 1
3539 cf_scanf_attribute=yes
3540 cat >conftest.h <<EOF
3541 #define GCC_$cf_ATTRIBUTE 1
3545 cat >conftest.h <<EOF
3546 #define GCC_$cf_ATTRIBUTE $cf_directive
3551 if { (eval echo "$as_me:3551: \"$ac_compile\"") >&5
3552 (eval $ac_compile) 2>&5
3554 echo "$as_me:3554: \$? = $ac_status" >&5
3555 (exit "$ac_status"); }; then
3556 test -n "$verbose" && echo "$as_me:3556: result: ... $cf_attribute" >&5
3557 echo "${ECHO_T}... $cf_attribute" >&6
3558 cat conftest.h >>confdefs.h
3559 case "$cf_attribute" in
3562 cat >>confdefs.h <<EOF
3563 #define GCC_NORETURN $cf_directive
3568 cf_value='/* nothing */'
3569 if test "$cf_printf_attribute" != no ; then
3570 cf_value='__attribute__((format(printf,fmt,var)))'
3572 cat >>confdefs.h <<\EOF
3573 #define GCC_PRINTF 1
3578 cat >>confdefs.h <<EOF
3579 #define GCC_PRINTFLIKE(fmt,var) $cf_value
3584 cf_value='/* nothing */'
3585 if test "$cf_scanf_attribute" != no ; then
3586 cf_value='__attribute__((format(scanf,fmt,var)))'
3588 cat >>confdefs.h <<\EOF
3594 cat >>confdefs.h <<EOF
3595 #define GCC_SCANFLIKE(fmt,var) $cf_value
3601 cat >>confdefs.h <<EOF
3602 #define GCC_UNUSED $cf_directive
3610 ${FGREP-fgrep} define conftest.i >>confdefs.h
3615 echo "$as_me:3615: checking if you want to work around bogus compiler/loader warnings" >&5
3616 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
3618 # Check whether --enable-string-hacks or --disable-string-hacks was given.
3619 if test "${enable_string_hacks+set}" = set; then
3620 enableval="$enable_string_hacks"
3621 enable_string_hacks=$enableval
3623 enable_string_hacks=no
3625 echo "$as_me:3625: result: $enable_string_hacks" >&5
3626 echo "${ECHO_T}$enable_string_hacks" >&6
3628 if test "x$enable_string_hacks" = "xyes"; then
3630 cat >>confdefs.h <<\EOF
3631 #define USE_STRING_HACKS 1
3634 { echo "$as_me:3634: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
3635 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
3636 echo "$as_me:3636: checking for strlcat" >&5
3637 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
3638 if test "${ac_cv_func_strlcat+set}" = set; then
3639 echo $ECHO_N "(cached) $ECHO_C" >&6
3641 cat >"conftest.$ac_ext" <<_ACEOF
3642 #line 3642 "configure"
3643 #include "confdefs.h"
3644 #define strlcat autoconf_temporary
3645 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3652 /* We use char because int might match the return type of a gcc2
3653 builtin and then its argument prototype would still apply. */
3654 char strlcat (void);
3660 /* The GNU C library defines stubs for functions which it implements
3661 to always fail with ENOSYS. Some functions are actually named
3662 something starting with __ and the normal name is an alias. */
3663 #if defined (__stub_strlcat) || defined (__stub___strlcat)
3664 #error found stub for strlcat
3672 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3673 if { (eval echo "$as_me:3673: \"$ac_link\"") >&5
3674 (eval $ac_link) 2>&5
3676 echo "$as_me:3676: \$? = $ac_status" >&5
3677 (exit "$ac_status"); } &&
3678 { ac_try='test -s "conftest$ac_exeext"'
3679 { (eval echo "$as_me:3679: \"$ac_try\"") >&5
3682 echo "$as_me:3682: \$? = $ac_status" >&5
3683 (exit "$ac_status"); }; }; then
3684 ac_cv_func_strlcat=yes
3686 echo "$as_me: failed program was:" >&5
3687 cat "conftest.$ac_ext" >&5
3688 ac_cv_func_strlcat=no
3690 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3692 echo "$as_me:3692: result: $ac_cv_func_strlcat" >&5
3693 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
3694 if test "$ac_cv_func_strlcat" = yes; then
3696 cat >>confdefs.h <<\EOF
3697 #define HAVE_STRLCAT 1
3702 echo "$as_me:3702: checking for strlcat in -lbsd" >&5
3703 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
3704 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
3705 echo $ECHO_N "(cached) $ECHO_C" >&6
3707 ac_check_lib_save_LIBS=$LIBS
3709 cat >"conftest.$ac_ext" <<_ACEOF
3710 #line 3710 "configure"
3711 #include "confdefs.h"
3713 /* Override any gcc2 internal prototype to avoid an error. */
3717 /* We use char because int might match the return type of a gcc2
3718 builtin and then its argument prototype would still apply. */
3728 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3729 if { (eval echo "$as_me:3729: \"$ac_link\"") >&5
3730 (eval $ac_link) 2>&5
3732 echo "$as_me:3732: \$? = $ac_status" >&5
3733 (exit "$ac_status"); } &&
3734 { ac_try='test -s "conftest$ac_exeext"'
3735 { (eval echo "$as_me:3735: \"$ac_try\"") >&5
3738 echo "$as_me:3738: \$? = $ac_status" >&5
3739 (exit "$ac_status"); }; }; then
3740 ac_cv_lib_bsd_strlcat=yes
3742 echo "$as_me: failed program was:" >&5
3743 cat "conftest.$ac_ext" >&5
3744 ac_cv_lib_bsd_strlcat=no
3746 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3747 LIBS=$ac_check_lib_save_LIBS
3749 echo "$as_me:3749: result: $ac_cv_lib_bsd_strlcat" >&5
3750 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
3751 if test "$ac_cv_lib_bsd_strlcat" = yes; then
3756 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
3758 for cf_add_1lib in $cf_add_0lib; do
3759 for cf_add_2lib in $cf_add_libs; do
3760 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
3765 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
3769 for ac_header in bsd/string.h
3771 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3772 echo "$as_me:3772: checking for $ac_header" >&5
3773 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3774 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3775 echo $ECHO_N "(cached) $ECHO_C" >&6
3777 cat >"conftest.$ac_ext" <<_ACEOF
3778 #line 3778 "configure"
3779 #include "confdefs.h"
3780 #include <$ac_header>
3782 if { (eval echo "$as_me:3782: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3783 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3785 $EGREP -v '^ *\+' conftest.er1 >conftest.err
3787 cat conftest.err >&5
3788 echo "$as_me:3788: \$? = $ac_status" >&5
3789 (exit "$ac_status"); } >/dev/null; then
3790 if test -s conftest.err; then
3791 ac_cpp_err=$ac_c_preproc_warn_flag
3798 if test -z "$ac_cpp_err"; then
3799 eval "$as_ac_Header=yes"
3801 echo "$as_me: failed program was:" >&5
3802 cat "conftest.$ac_ext" >&5
3803 eval "$as_ac_Header=no"
3805 rm -f conftest.err "conftest.$ac_ext"
3807 echo "$as_me:3807: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
3808 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
3809 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
3810 cat >>confdefs.h <<EOF
3811 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3817 cat >>confdefs.h <<\EOF
3818 #define HAVE_STRLCAT 1
3825 for ac_func in strlcpy snprintf
3827 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3828 echo "$as_me:3828: checking for $ac_func" >&5
3829 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3830 if eval "test \"\${$as_ac_var+set}\" = set"; then
3831 echo $ECHO_N "(cached) $ECHO_C" >&6
3833 cat >"conftest.$ac_ext" <<_ACEOF
3834 #line 3834 "configure"
3835 #include "confdefs.h"
3836 #define $ac_func autoconf_temporary
3837 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3844 /* We use char because int might match the return type of a gcc2
3845 builtin and then its argument prototype would still apply. */
3846 char $ac_func (void);
3852 /* The GNU C library defines stubs for functions which it implements
3853 to always fail with ENOSYS. Some functions are actually named
3854 something starting with __ and the normal name is an alias. */
3855 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3856 #error found stub for $ac_func
3864 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3865 if { (eval echo "$as_me:3865: \"$ac_link\"") >&5
3866 (eval $ac_link) 2>&5
3868 echo "$as_me:3868: \$? = $ac_status" >&5
3869 (exit "$ac_status"); } &&
3870 { ac_try='test -s "conftest$ac_exeext"'
3871 { (eval echo "$as_me:3871: \"$ac_try\"") >&5
3874 echo "$as_me:3874: \$? = $ac_status" >&5
3875 (exit "$ac_status"); }; }; then
3876 eval "$as_ac_var=yes"
3878 echo "$as_me: failed program was:" >&5
3879 cat "conftest.$ac_ext" >&5
3880 eval "$as_ac_var=no"
3882 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3884 echo "$as_me:3884: result: `eval echo '${'"$as_ac_var"'}'`" >&5
3885 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
3886 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
3887 cat >>confdefs.h <<EOF
3888 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3896 echo "$as_me:3896: checking if the POSIX test-macros are already defined" >&5
3897 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
3898 if test "${cf_cv_posix_visible+set}" = set; then
3899 echo $ECHO_N "(cached) $ECHO_C" >&6
3902 cat >"conftest.$ac_ext" <<_ACEOF
3903 #line 3903 "configure"
3904 #include "confdefs.h"
3910 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
3911 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
3912 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
3913 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
3914 #error conflicting symbols found
3921 rm -f "conftest.$ac_objext"
3922 if { (eval echo "$as_me:3922: \"$ac_compile\"") >&5
3923 (eval $ac_compile) 2>&5
3925 echo "$as_me:3925: \$? = $ac_status" >&5
3926 (exit "$ac_status"); } &&
3927 { ac_try='test -s "conftest.$ac_objext"'
3928 { (eval echo "$as_me:3928: \"$ac_try\"") >&5
3931 echo "$as_me:3931: \$? = $ac_status" >&5
3932 (exit "$ac_status"); }; }; then
3933 cf_cv_posix_visible=no
3935 echo "$as_me: failed program was:" >&5
3936 cat "conftest.$ac_ext" >&5
3937 cf_cv_posix_visible=yes
3939 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3942 echo "$as_me:3942: result: $cf_cv_posix_visible" >&5
3943 echo "${ECHO_T}$cf_cv_posix_visible" >&6
3945 if test "$cf_cv_posix_visible" = no; then
3948 cf_POSIX_C_SOURCE=199506L
3953 cf_xopen_source="-D_ALL_SOURCE"
3959 cf_xopen_source="-D_APPLE_C_SOURCE"
3962 cf_xopen_source="-D_DARWIN_C_SOURCE"
3965 (freebsd*|dragonfly*|midnightbsd*)
3966 # 5.x headers associate
3967 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3968 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3969 cf_POSIX_C_SOURCE=200112L
3971 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3974 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3977 cf_xopen_source="-D_HPUX_SOURCE"
3980 cf_xopen_source="-D_SGI_SOURCE"
3983 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3985 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3987 echo "$as_me:3987: checking if this is the GNU C library" >&5
3988 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3989 if test "${cf_cv_gnu_library+set}" = set; then
3990 echo $ECHO_N "(cached) $ECHO_C" >&6
3993 cat >"conftest.$ac_ext" <<_ACEOF
3994 #line 3994 "configure"
3995 #include "confdefs.h"
3996 #include <sys/types.h>
4001 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
4003 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
4006 # error not GNU C library
4012 rm -f "conftest.$ac_objext"
4013 if { (eval echo "$as_me:4013: \"$ac_compile\"") >&5
4014 (eval $ac_compile) 2>&5
4016 echo "$as_me:4016: \$? = $ac_status" >&5
4017 (exit "$ac_status"); } &&
4018 { ac_try='test -s "conftest.$ac_objext"'
4019 { (eval echo "$as_me:4019: \"$ac_try\"") >&5
4022 echo "$as_me:4022: \$? = $ac_status" >&5
4023 (exit "$ac_status"); }; }; then
4024 cf_cv_gnu_library=yes
4026 echo "$as_me: failed program was:" >&5
4027 cat "conftest.$ac_ext" >&5
4028 cf_cv_gnu_library=no
4030 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4033 echo "$as_me:4033: result: $cf_cv_gnu_library" >&5
4034 echo "${ECHO_T}$cf_cv_gnu_library" >&6
4036 if test x$cf_cv_gnu_library = xyes; then
4038 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
4039 # was changed to help a little. newlib incorporated the change about 4
4041 echo "$as_me:4041: checking if _DEFAULT_SOURCE can be used as a basis" >&5
4042 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
4043 if test "${cf_cv_gnu_library_219+set}" = set; then
4044 echo $ECHO_N "(cached) $ECHO_C" >&6
4049 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4050 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
4052 cat >"conftest.$ac_ext" <<_ACEOF
4053 #line 4053 "configure"
4054 #include "confdefs.h"
4055 #include <sys/types.h>
4060 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
4062 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
4065 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
4071 rm -f "conftest.$ac_objext"
4072 if { (eval echo "$as_me:4072: \"$ac_compile\"") >&5
4073 (eval $ac_compile) 2>&5
4075 echo "$as_me:4075: \$? = $ac_status" >&5
4076 (exit "$ac_status"); } &&
4077 { ac_try='test -s "conftest.$ac_objext"'
4078 { (eval echo "$as_me:4078: \"$ac_try\"") >&5
4081 echo "$as_me:4081: \$? = $ac_status" >&5
4082 (exit "$ac_status"); }; }; then
4083 cf_cv_gnu_library_219=yes
4085 echo "$as_me: failed program was:" >&5
4086 cat "conftest.$ac_ext" >&5
4087 cf_cv_gnu_library_219=no
4089 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4093 echo "$as_me:4093: result: $cf_cv_gnu_library_219" >&5
4094 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
4096 if test "x$cf_cv_gnu_library_219" = xyes; then
4098 echo "$as_me:4098: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
4099 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
4100 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
4101 echo $ECHO_N "(cached) $ECHO_C" >&6
4107 cf_new_extra_cppflags=
4109 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
4111 case "$cf_fix_cppflags" in
4113 case "$cf_add_cflags" in
4114 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4115 case "$cf_add_cflags" in
4117 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4119 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4120 && test -z "${cf_tst_cflags}" \
4121 && cf_fix_cppflags=yes
4123 if test "$cf_fix_cppflags" = yes ; then
4125 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4126 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4129 elif test "${cf_tst_cflags}" = "\"'" ; then
4131 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4132 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4142 case "$cf_add_cflags" in
4144 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4146 CPPFLAGS=`echo "$CPPFLAGS" | \
4147 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4148 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4153 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4154 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4161 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4162 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4169 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4170 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4172 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4174 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4175 && test -z "${cf_tst_cflags}" \
4176 && cf_fix_cppflags=no
4181 if test -n "$cf_new_cflags" ; then
4183 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4184 CFLAGS="${CFLAGS}$cf_new_cflags"
4188 if test -n "$cf_new_cppflags" ; then
4190 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4191 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4195 if test -n "$cf_new_extra_cppflags" ; then
4197 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4198 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4202 cat >"conftest.$ac_ext" <<_ACEOF
4203 #line 4203 "configure"
4204 #include "confdefs.h"
4207 #include <sys/types.h>
4213 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
4216 # error GNU C library is too old
4222 rm -f "conftest.$ac_objext"
4223 if { (eval echo "$as_me:4223: \"$ac_compile\"") >&5
4224 (eval $ac_compile) 2>&5
4226 echo "$as_me:4226: \$? = $ac_status" >&5
4227 (exit "$ac_status"); } &&
4228 { ac_try='test -s "conftest.$ac_objext"'
4229 { (eval echo "$as_me:4229: \"$ac_try\"") >&5
4232 echo "$as_me:4232: \$? = $ac_status" >&5
4233 (exit "$ac_status"); }; }; then
4234 cf_cv_gnu_dftsrc_219=yes
4236 echo "$as_me: failed program was:" >&5
4237 cat "conftest.$ac_ext" >&5
4238 cf_cv_gnu_dftsrc_219=no
4240 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4243 echo "$as_me:4243: result: $cf_cv_gnu_dftsrc_219" >&5
4244 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
4245 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
4247 cf_cv_gnu_dftsrc_219=maybe
4250 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
4252 echo "$as_me:4252: checking if we must define _GNU_SOURCE" >&5
4253 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
4254 if test "${cf_cv_gnu_source+set}" = set; then
4255 echo $ECHO_N "(cached) $ECHO_C" >&6
4258 cat >"conftest.$ac_ext" <<_ACEOF
4259 #line 4259 "configure"
4260 #include "confdefs.h"
4261 #include <sys/types.h>
4266 #ifndef _XOPEN_SOURCE
4267 #error expected _XOPEN_SOURCE to be defined
4273 rm -f "conftest.$ac_objext"
4274 if { (eval echo "$as_me:4274: \"$ac_compile\"") >&5
4275 (eval $ac_compile) 2>&5
4277 echo "$as_me:4277: \$? = $ac_status" >&5
4278 (exit "$ac_status"); } &&
4279 { ac_try='test -s "conftest.$ac_objext"'
4280 { (eval echo "$as_me:4280: \"$ac_try\"") >&5
4283 echo "$as_me:4283: \$? = $ac_status" >&5
4284 (exit "$ac_status"); }; }; then
4287 echo "$as_me: failed program was:" >&5
4288 cat "conftest.$ac_ext" >&5
4294 cf_new_extra_cppflags=
4296 for cf_add_cflags in -D_GNU_SOURCE
4298 case "$cf_fix_cppflags" in
4300 case "$cf_add_cflags" in
4301 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4302 case "$cf_add_cflags" in
4304 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4306 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4307 && test -z "${cf_tst_cflags}" \
4308 && cf_fix_cppflags=yes
4310 if test "$cf_fix_cppflags" = yes ; then
4312 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4313 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4316 elif test "${cf_tst_cflags}" = "\"'" ; then
4318 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4319 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4329 case "$cf_add_cflags" in
4331 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4333 CPPFLAGS=`echo "$CPPFLAGS" | \
4334 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4335 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4340 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4341 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4348 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4349 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4356 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4357 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4359 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4361 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4362 && test -z "${cf_tst_cflags}" \
4363 && cf_fix_cppflags=no
4368 if test -n "$cf_new_cflags" ; then
4370 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4371 CFLAGS="${CFLAGS}$cf_new_cflags"
4375 if test -n "$cf_new_cppflags" ; then
4377 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4378 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4382 if test -n "$cf_new_extra_cppflags" ; then
4384 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4385 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4389 cat >"conftest.$ac_ext" <<_ACEOF
4390 #line 4390 "configure"
4391 #include "confdefs.h"
4392 #include <sys/types.h>
4397 #ifdef _XOPEN_SOURCE
4398 #error expected _XOPEN_SOURCE to be undefined
4404 rm -f "conftest.$ac_objext"
4405 if { (eval echo "$as_me:4405: \"$ac_compile\"") >&5
4406 (eval $ac_compile) 2>&5
4408 echo "$as_me:4408: \$? = $ac_status" >&5
4409 (exit "$ac_status"); } &&
4410 { ac_try='test -s "conftest.$ac_objext"'
4411 { (eval echo "$as_me:4411: \"$ac_try\"") >&5
4414 echo "$as_me:4414: \$? = $ac_status" >&5
4415 (exit "$ac_status"); }; }; then
4418 echo "$as_me: failed program was:" >&5
4419 cat "conftest.$ac_ext" >&5
4420 cf_cv_gnu_source=yes
4422 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4426 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4429 echo "$as_me:4429: result: $cf_cv_gnu_source" >&5
4430 echo "${ECHO_T}$cf_cv_gnu_source" >&6
4432 if test "$cf_cv_gnu_source" = yes
4434 echo "$as_me:4434: checking if we should also define _DEFAULT_SOURCE" >&5
4435 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
4436 if test "${cf_cv_default_source+set}" = set; then
4437 echo $ECHO_N "(cached) $ECHO_C" >&6
4440 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4441 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
4443 cat >"conftest.$ac_ext" <<_ACEOF
4444 #line 4444 "configure"
4445 #include "confdefs.h"
4446 #include <sys/types.h>
4451 #ifdef _DEFAULT_SOURCE
4452 #error expected _DEFAULT_SOURCE to be undefined
4458 rm -f "conftest.$ac_objext"
4459 if { (eval echo "$as_me:4459: \"$ac_compile\"") >&5
4460 (eval $ac_compile) 2>&5
4462 echo "$as_me:4462: \$? = $ac_status" >&5
4463 (exit "$ac_status"); } &&
4464 { ac_try='test -s "conftest.$ac_objext"'
4465 { (eval echo "$as_me:4465: \"$ac_try\"") >&5
4468 echo "$as_me:4468: \$? = $ac_status" >&5
4469 (exit "$ac_status"); }; }; then
4470 cf_cv_default_source=no
4472 echo "$as_me: failed program was:" >&5
4473 cat "conftest.$ac_ext" >&5
4474 cf_cv_default_source=yes
4476 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4479 echo "$as_me:4479: result: $cf_cv_default_source" >&5
4480 echo "${ECHO_T}$cf_cv_default_source" >&6
4481 if test "$cf_cv_default_source" = yes
4484 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4485 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
4495 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
4498 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
4501 if test "$cf_cv_posix_visible" = no; then
4503 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4505 cf_save_CFLAGS="$CFLAGS"
4506 cf_save_CPPFLAGS="$CPPFLAGS"
4508 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4509 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4510 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4512 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4513 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4514 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4516 echo "$as_me:4516: checking if we should define _POSIX_C_SOURCE" >&5
4517 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4518 if test "${cf_cv_posix_c_source+set}" = set; then
4519 echo $ECHO_N "(cached) $ECHO_C" >&6
4522 echo "${as_me:-configure}:4522: testing if the symbol is already defined go no further ..." 1>&5
4524 cat >"conftest.$ac_ext" <<_ACEOF
4525 #line 4525 "configure"
4526 #include "confdefs.h"
4527 #include <sys/types.h>
4532 #ifndef _POSIX_C_SOURCE
4539 rm -f "conftest.$ac_objext"
4540 if { (eval echo "$as_me:4540: \"$ac_compile\"") >&5
4541 (eval $ac_compile) 2>&5
4543 echo "$as_me:4543: \$? = $ac_status" >&5
4544 (exit "$ac_status"); } &&
4545 { ac_try='test -s "conftest.$ac_objext"'
4546 { (eval echo "$as_me:4546: \"$ac_try\"") >&5
4549 echo "$as_me:4549: \$? = $ac_status" >&5
4550 (exit "$ac_status"); }; }; then
4551 cf_cv_posix_c_source=no
4553 echo "$as_me: failed program was:" >&5
4554 cat "conftest.$ac_ext" >&5
4555 cf_want_posix_source=no
4556 case .$cf_POSIX_C_SOURCE in
4558 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4561 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4562 cf_want_posix_source=yes
4565 cf_want_posix_source=yes
4568 if test "$cf_want_posix_source" = yes ; then
4569 cat >"conftest.$ac_ext" <<_ACEOF
4570 #line 4570 "configure"
4571 #include "confdefs.h"
4572 #include <sys/types.h>
4577 #ifdef _POSIX_SOURCE
4584 rm -f "conftest.$ac_objext"
4585 if { (eval echo "$as_me:4585: \"$ac_compile\"") >&5
4586 (eval $ac_compile) 2>&5
4588 echo "$as_me:4588: \$? = $ac_status" >&5
4589 (exit "$ac_status"); } &&
4590 { ac_try='test -s "conftest.$ac_objext"'
4591 { (eval echo "$as_me:4591: \"$ac_try\"") >&5
4594 echo "$as_me:4594: \$? = $ac_status" >&5
4595 (exit "$ac_status"); }; }; then
4598 echo "$as_me: failed program was:" >&5
4599 cat "conftest.$ac_ext" >&5
4600 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4602 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4605 echo "${as_me:-configure}:4605: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4607 CFLAGS="$cf_trim_CFLAGS"
4608 CPPFLAGS="$cf_trim_CPPFLAGS"
4610 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4611 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4613 echo "${as_me:-configure}:4613: testing if the second compile does not leave our definition intact error ..." 1>&5
4615 cat >"conftest.$ac_ext" <<_ACEOF
4616 #line 4616 "configure"
4617 #include "confdefs.h"
4618 #include <sys/types.h>
4623 #ifndef _POSIX_C_SOURCE
4630 rm -f "conftest.$ac_objext"
4631 if { (eval echo "$as_me:4631: \"$ac_compile\"") >&5
4632 (eval $ac_compile) 2>&5
4634 echo "$as_me:4634: \$? = $ac_status" >&5
4635 (exit "$ac_status"); } &&
4636 { ac_try='test -s "conftest.$ac_objext"'
4637 { (eval echo "$as_me:4637: \"$ac_try\"") >&5
4640 echo "$as_me:4640: \$? = $ac_status" >&5
4641 (exit "$ac_status"); }; }; then
4644 echo "$as_me: failed program was:" >&5
4645 cat "conftest.$ac_ext" >&5
4646 cf_cv_posix_c_source=no
4648 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4649 CFLAGS="$cf_save_CFLAGS"
4650 CPPFLAGS="$cf_save_CPPFLAGS"
4653 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4656 echo "$as_me:4656: result: $cf_cv_posix_c_source" >&5
4657 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4659 if test "$cf_cv_posix_c_source" != no ; then
4660 CFLAGS="$cf_trim_CFLAGS"
4661 CPPFLAGS="$cf_trim_CPPFLAGS"
4666 cf_new_extra_cppflags=
4668 for cf_add_cflags in $cf_cv_posix_c_source
4670 case "$cf_fix_cppflags" in
4672 case "$cf_add_cflags" in
4673 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4674 case "$cf_add_cflags" in
4676 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4678 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4679 && test -z "${cf_tst_cflags}" \
4680 && cf_fix_cppflags=yes
4682 if test "$cf_fix_cppflags" = yes ; then
4684 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4685 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4688 elif test "${cf_tst_cflags}" = "\"'" ; then
4690 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4691 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4701 case "$cf_add_cflags" in
4703 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4705 CPPFLAGS=`echo "$CPPFLAGS" | \
4706 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4707 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4712 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4713 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4720 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4721 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4728 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4729 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4731 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4733 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4734 && test -z "${cf_tst_cflags}" \
4735 && cf_fix_cppflags=no
4740 if test -n "$cf_new_cflags" ; then
4742 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4743 CFLAGS="${CFLAGS}$cf_new_cflags"
4747 if test -n "$cf_new_cppflags" ; then
4749 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4750 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4754 if test -n "$cf_new_extra_cppflags" ; then
4756 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4757 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4763 fi # cf_cv_posix_visible
4767 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4770 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
4771 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
4772 # Abusing the conformance level is a workaround.
4773 { echo "$as_me:4773: WARNING: this system does not provide usable locale support" >&5
4774 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
4775 cf_xopen_source="-D_BSD_SOURCE"
4779 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
4780 cf_xopen_source="-D_BSD_SOURCE"
4784 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
4787 cf_xopen_source="-D_OSF_SOURCE"
4790 cf_xopen_source="-D_QNX_SOURCE"
4793 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
4796 cf_xopen_source="-D__EXTENSIONS__"
4797 cf_cv_xopen_source=broken
4799 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
4805 echo "$as_me:4805: checking if we should define _XOPEN_SOURCE" >&5
4806 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4807 if test "${cf_cv_xopen_source+set}" = set; then
4808 echo $ECHO_N "(cached) $ECHO_C" >&6
4811 cat >"conftest.$ac_ext" <<_ACEOF
4812 #line 4812 "configure"
4813 #include "confdefs.h"
4817 #include <sys/types.h>
4823 #ifndef _XOPEN_SOURCE
4830 rm -f "conftest.$ac_objext"
4831 if { (eval echo "$as_me:4831: \"$ac_compile\"") >&5
4832 (eval $ac_compile) 2>&5
4834 echo "$as_me:4834: \$? = $ac_status" >&5
4835 (exit "$ac_status"); } &&
4836 { ac_try='test -s "conftest.$ac_objext"'
4837 { (eval echo "$as_me:4837: \"$ac_try\"") >&5
4840 echo "$as_me:4840: \$? = $ac_status" >&5
4841 (exit "$ac_status"); }; }; then
4842 cf_cv_xopen_source=no
4844 echo "$as_me: failed program was:" >&5
4845 cat "conftest.$ac_ext" >&5
4848 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4849 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4851 cat >"conftest.$ac_ext" <<_ACEOF
4852 #line 4852 "configure"
4853 #include "confdefs.h"
4857 #include <sys/types.h>
4863 #ifdef _XOPEN_SOURCE
4870 rm -f "conftest.$ac_objext"
4871 if { (eval echo "$as_me:4871: \"$ac_compile\"") >&5
4872 (eval $ac_compile) 2>&5
4874 echo "$as_me:4874: \$? = $ac_status" >&5
4875 (exit "$ac_status"); } &&
4876 { ac_try='test -s "conftest.$ac_objext"'
4877 { (eval echo "$as_me:4877: \"$ac_try\"") >&5
4880 echo "$as_me:4880: \$? = $ac_status" >&5
4881 (exit "$ac_status"); }; }; then
4882 cf_cv_xopen_source=no
4884 echo "$as_me: failed program was:" >&5
4885 cat "conftest.$ac_ext" >&5
4886 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4888 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4892 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4895 echo "$as_me:4895: result: $cf_cv_xopen_source" >&5
4896 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4898 if test "$cf_cv_xopen_source" != no ; then
4900 CFLAGS=`echo "$CFLAGS" | \
4901 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4902 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4904 CPPFLAGS=`echo "$CPPFLAGS" | \
4905 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4906 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4908 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4910 for cf_add_cflags in $cf_temp_xopen_source
4913 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4914 cf_old_cflag="$CFLAGS"
4918 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
4920 (*$cf_add_cflags\ *)
4921 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
4924 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
4928 if test "$CFLAGS" != "$cf_old_cflag" ;
4931 CFLAGS="$cf_new_cflag"
4934 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4935 cf_old_cflag="$CPPFLAGS"
4939 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
4941 (*$cf_add_cflags\ *)
4942 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
4945 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
4949 if test "$CPPFLAGS" != "$cf_old_cflag" ;
4952 CPPFLAGS="$cf_new_cflag"
4960 cf_new_extra_cppflags=
4962 for cf_add_cflags in $cf_temp_xopen_source
4964 case "$cf_fix_cppflags" in
4966 case "$cf_add_cflags" in
4967 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4968 case "$cf_add_cflags" in
4970 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4972 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4973 && test -z "${cf_tst_cflags}" \
4974 && cf_fix_cppflags=yes
4976 if test "$cf_fix_cppflags" = yes ; then
4978 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4979 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4982 elif test "${cf_tst_cflags}" = "\"'" ; then
4984 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4985 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4995 case "$cf_add_cflags" in
4997 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4999 CPPFLAGS=`echo "$CPPFLAGS" | \
5000 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5001 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5006 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5007 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5014 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5015 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5022 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5023 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5025 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5027 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5028 && test -z "${cf_tst_cflags}" \
5029 && cf_fix_cppflags=no
5034 if test -n "$cf_new_cflags" ; then
5036 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5037 CFLAGS="${CFLAGS}$cf_new_cflags"
5041 if test -n "$cf_new_cppflags" ; then
5043 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5044 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5048 if test -n "$cf_new_extra_cppflags" ; then
5050 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5051 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5057 if test "$cf_cv_posix_visible" = no; then
5059 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
5061 cf_save_CFLAGS="$CFLAGS"
5062 cf_save_CPPFLAGS="$CPPFLAGS"
5064 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
5065 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5066 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
5068 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
5069 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5070 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
5072 echo "$as_me:5072: checking if we should define _POSIX_C_SOURCE" >&5
5073 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
5074 if test "${cf_cv_posix_c_source+set}" = set; then
5075 echo $ECHO_N "(cached) $ECHO_C" >&6
5078 echo "${as_me:-configure}:5078: testing if the symbol is already defined go no further ..." 1>&5
5080 cat >"conftest.$ac_ext" <<_ACEOF
5081 #line 5081 "configure"
5082 #include "confdefs.h"
5083 #include <sys/types.h>
5088 #ifndef _POSIX_C_SOURCE
5095 rm -f "conftest.$ac_objext"
5096 if { (eval echo "$as_me:5096: \"$ac_compile\"") >&5
5097 (eval $ac_compile) 2>&5
5099 echo "$as_me:5099: \$? = $ac_status" >&5
5100 (exit "$ac_status"); } &&
5101 { ac_try='test -s "conftest.$ac_objext"'
5102 { (eval echo "$as_me:5102: \"$ac_try\"") >&5
5105 echo "$as_me:5105: \$? = $ac_status" >&5
5106 (exit "$ac_status"); }; }; then
5107 cf_cv_posix_c_source=no
5109 echo "$as_me: failed program was:" >&5
5110 cat "conftest.$ac_ext" >&5
5111 cf_want_posix_source=no
5112 case .$cf_POSIX_C_SOURCE in
5114 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
5117 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
5118 cf_want_posix_source=yes
5121 cf_want_posix_source=yes
5124 if test "$cf_want_posix_source" = yes ; then
5125 cat >"conftest.$ac_ext" <<_ACEOF
5126 #line 5126 "configure"
5127 #include "confdefs.h"
5128 #include <sys/types.h>
5133 #ifdef _POSIX_SOURCE
5140 rm -f "conftest.$ac_objext"
5141 if { (eval echo "$as_me:5141: \"$ac_compile\"") >&5
5142 (eval $ac_compile) 2>&5
5144 echo "$as_me:5144: \$? = $ac_status" >&5
5145 (exit "$ac_status"); } &&
5146 { ac_try='test -s "conftest.$ac_objext"'
5147 { (eval echo "$as_me:5147: \"$ac_try\"") >&5
5150 echo "$as_me:5150: \$? = $ac_status" >&5
5151 (exit "$ac_status"); }; }; then
5154 echo "$as_me: failed program was:" >&5
5155 cat "conftest.$ac_ext" >&5
5156 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
5158 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5161 echo "${as_me:-configure}:5161: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
5163 CFLAGS="$cf_trim_CFLAGS"
5164 CPPFLAGS="$cf_trim_CPPFLAGS"
5166 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5167 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
5169 echo "${as_me:-configure}:5169: testing if the second compile does not leave our definition intact error ..." 1>&5
5171 cat >"conftest.$ac_ext" <<_ACEOF
5172 #line 5172 "configure"
5173 #include "confdefs.h"
5174 #include <sys/types.h>
5179 #ifndef _POSIX_C_SOURCE
5186 rm -f "conftest.$ac_objext"
5187 if { (eval echo "$as_me:5187: \"$ac_compile\"") >&5
5188 (eval $ac_compile) 2>&5
5190 echo "$as_me:5190: \$? = $ac_status" >&5
5191 (exit "$ac_status"); } &&
5192 { ac_try='test -s "conftest.$ac_objext"'
5193 { (eval echo "$as_me:5193: \"$ac_try\"") >&5
5196 echo "$as_me:5196: \$? = $ac_status" >&5
5197 (exit "$ac_status"); }; }; then
5200 echo "$as_me: failed program was:" >&5
5201 cat "conftest.$ac_ext" >&5
5202 cf_cv_posix_c_source=no
5204 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5205 CFLAGS="$cf_save_CFLAGS"
5206 CPPFLAGS="$cf_save_CPPFLAGS"
5209 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5212 echo "$as_me:5212: result: $cf_cv_posix_c_source" >&5
5213 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
5215 if test "$cf_cv_posix_c_source" != no ; then
5216 CFLAGS="$cf_trim_CFLAGS"
5217 CPPFLAGS="$cf_trim_CPPFLAGS"
5222 cf_new_extra_cppflags=
5224 for cf_add_cflags in $cf_cv_posix_c_source
5226 case "$cf_fix_cppflags" in
5228 case "$cf_add_cflags" in
5229 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5230 case "$cf_add_cflags" in
5232 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5234 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5235 && test -z "${cf_tst_cflags}" \
5236 && cf_fix_cppflags=yes
5238 if test "$cf_fix_cppflags" = yes ; then
5240 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5241 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5244 elif test "${cf_tst_cflags}" = "\"'" ; then
5246 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5247 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5257 case "$cf_add_cflags" in
5259 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5261 CPPFLAGS=`echo "$CPPFLAGS" | \
5262 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5263 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5268 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5269 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5276 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5277 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5284 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5285 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5287 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5289 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5290 && test -z "${cf_tst_cflags}" \
5291 && cf_fix_cppflags=no
5296 if test -n "$cf_new_cflags" ; then
5298 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5299 CFLAGS="${CFLAGS}$cf_new_cflags"
5303 if test -n "$cf_new_cppflags" ; then
5305 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5306 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5310 if test -n "$cf_new_extra_cppflags" ; then
5312 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5313 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5319 fi # cf_cv_posix_visible
5324 if test -n "$cf_xopen_source" ; then
5326 for cf_add_cflags in $cf_xopen_source
5329 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5330 cf_old_cflag="$CFLAGS"
5334 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
5336 (*$cf_add_cflags\ *)
5337 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
5340 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
5344 if test "$CFLAGS" != "$cf_old_cflag" ;
5346 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
5348 echo "${as_me:-configure}:5348: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
5350 CFLAGS="$cf_new_cflag"
5353 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5354 cf_old_cflag="$CPPFLAGS"
5358 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
5360 (*$cf_add_cflags\ *)
5361 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
5364 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
5368 if test "$CPPFLAGS" != "$cf_old_cflag" ;
5370 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
5372 echo "${as_me:-configure}:5372: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
5374 CPPFLAGS="$cf_new_cflag"
5382 cf_new_extra_cppflags=
5384 for cf_add_cflags in $cf_xopen_source
5386 case "$cf_fix_cppflags" in
5388 case "$cf_add_cflags" in
5389 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5390 case "$cf_add_cflags" in
5392 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5394 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5395 && test -z "${cf_tst_cflags}" \
5396 && cf_fix_cppflags=yes
5398 if test "$cf_fix_cppflags" = yes ; then
5400 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5401 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5404 elif test "${cf_tst_cflags}" = "\"'" ; then
5406 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5407 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5417 case "$cf_add_cflags" in
5419 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5421 CPPFLAGS=`echo "$CPPFLAGS" | \
5422 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5423 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5428 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5429 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5436 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5437 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5444 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5445 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5447 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5449 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5450 && test -z "${cf_tst_cflags}" \
5451 && cf_fix_cppflags=no
5456 if test -n "$cf_new_cflags" ; then
5457 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
5459 echo "${as_me:-configure}:5459: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
5461 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5462 CFLAGS="${CFLAGS}$cf_new_cflags"
5466 if test -n "$cf_new_cppflags" ; then
5467 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
5469 echo "${as_me:-configure}:5469: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
5471 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5472 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5476 if test -n "$cf_new_extra_cppflags" ; then
5477 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
5479 echo "${as_me:-configure}:5479: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
5481 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5482 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5488 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
5489 echo "$as_me:5489: checking if _XOPEN_SOURCE really is set" >&5
5490 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
5491 cat >"conftest.$ac_ext" <<_ACEOF
5492 #line 5492 "configure"
5493 #include "confdefs.h"
5499 #ifndef _XOPEN_SOURCE
5506 rm -f "conftest.$ac_objext"
5507 if { (eval echo "$as_me:5507: \"$ac_compile\"") >&5
5508 (eval $ac_compile) 2>&5
5510 echo "$as_me:5510: \$? = $ac_status" >&5
5511 (exit "$ac_status"); } &&
5512 { ac_try='test -s "conftest.$ac_objext"'
5513 { (eval echo "$as_me:5513: \"$ac_try\"") >&5
5516 echo "$as_me:5516: \$? = $ac_status" >&5
5517 (exit "$ac_status"); }; }; then
5518 cf_XOPEN_SOURCE_set=yes
5520 echo "$as_me: failed program was:" >&5
5521 cat "conftest.$ac_ext" >&5
5522 cf_XOPEN_SOURCE_set=no
5524 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5525 echo "$as_me:5525: result: $cf_XOPEN_SOURCE_set" >&5
5526 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
5527 if test "$cf_XOPEN_SOURCE_set" = yes
5529 cat >"conftest.$ac_ext" <<_ACEOF
5530 #line 5530 "configure"
5531 #include "confdefs.h"
5537 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
5544 rm -f "conftest.$ac_objext"
5545 if { (eval echo "$as_me:5545: \"$ac_compile\"") >&5
5546 (eval $ac_compile) 2>&5
5548 echo "$as_me:5548: \$? = $ac_status" >&5
5549 (exit "$ac_status"); } &&
5550 { ac_try='test -s "conftest.$ac_objext"'
5551 { (eval echo "$as_me:5551: \"$ac_try\"") >&5
5554 echo "$as_me:5554: \$? = $ac_status" >&5
5555 (exit "$ac_status"); }; }; then
5556 cf_XOPEN_SOURCE_set_ok=yes
5558 echo "$as_me: failed program was:" >&5
5559 cat "conftest.$ac_ext" >&5
5560 cf_XOPEN_SOURCE_set_ok=no
5562 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5563 if test "$cf_XOPEN_SOURCE_set_ok" = no
5565 { echo "$as_me:5565: WARNING: _XOPEN_SOURCE is lower than requested" >&5
5566 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
5570 echo "$as_me:5570: checking if we should define _XOPEN_SOURCE" >&5
5571 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
5572 if test "${cf_cv_xopen_source+set}" = set; then
5573 echo $ECHO_N "(cached) $ECHO_C" >&6
5576 cat >"conftest.$ac_ext" <<_ACEOF
5577 #line 5577 "configure"
5578 #include "confdefs.h"
5582 #include <sys/types.h>
5588 #ifndef _XOPEN_SOURCE
5595 rm -f "conftest.$ac_objext"
5596 if { (eval echo "$as_me:5596: \"$ac_compile\"") >&5
5597 (eval $ac_compile) 2>&5
5599 echo "$as_me:5599: \$? = $ac_status" >&5
5600 (exit "$ac_status"); } &&
5601 { ac_try='test -s "conftest.$ac_objext"'
5602 { (eval echo "$as_me:5602: \"$ac_try\"") >&5
5605 echo "$as_me:5605: \$? = $ac_status" >&5
5606 (exit "$ac_status"); }; }; then
5607 cf_cv_xopen_source=no
5609 echo "$as_me: failed program was:" >&5
5610 cat "conftest.$ac_ext" >&5
5613 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5614 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
5616 cat >"conftest.$ac_ext" <<_ACEOF
5617 #line 5617 "configure"
5618 #include "confdefs.h"
5622 #include <sys/types.h>
5628 #ifdef _XOPEN_SOURCE
5635 rm -f "conftest.$ac_objext"
5636 if { (eval echo "$as_me:5636: \"$ac_compile\"") >&5
5637 (eval $ac_compile) 2>&5
5639 echo "$as_me:5639: \$? = $ac_status" >&5
5640 (exit "$ac_status"); } &&
5641 { ac_try='test -s "conftest.$ac_objext"'
5642 { (eval echo "$as_me:5642: \"$ac_try\"") >&5
5645 echo "$as_me:5645: \$? = $ac_status" >&5
5646 (exit "$ac_status"); }; }; then
5647 cf_cv_xopen_source=no
5649 echo "$as_me: failed program was:" >&5
5650 cat "conftest.$ac_ext" >&5
5651 cf_cv_xopen_source=$cf_XOPEN_SOURCE
5653 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5657 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5660 echo "$as_me:5660: result: $cf_cv_xopen_source" >&5
5661 echo "${ECHO_T}$cf_cv_xopen_source" >&6
5663 if test "$cf_cv_xopen_source" != no ; then
5665 CFLAGS=`echo "$CFLAGS" | \
5666 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5667 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5669 CPPFLAGS=`echo "$CPPFLAGS" | \
5670 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5671 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5673 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
5675 for cf_add_cflags in $cf_temp_xopen_source
5678 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5679 cf_old_cflag="$CFLAGS"
5683 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
5685 (*$cf_add_cflags\ *)
5686 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
5689 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
5693 if test "$CFLAGS" != "$cf_old_cflag" ;
5696 CFLAGS="$cf_new_cflag"
5699 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5700 cf_old_cflag="$CPPFLAGS"
5704 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
5706 (*$cf_add_cflags\ *)
5707 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
5710 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
5714 if test "$CPPFLAGS" != "$cf_old_cflag" ;
5717 CPPFLAGS="$cf_new_cflag"
5725 cf_new_extra_cppflags=
5727 for cf_add_cflags in $cf_temp_xopen_source
5729 case "$cf_fix_cppflags" in
5731 case "$cf_add_cflags" in
5732 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5733 case "$cf_add_cflags" in
5735 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5737 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5738 && test -z "${cf_tst_cflags}" \
5739 && cf_fix_cppflags=yes
5741 if test "$cf_fix_cppflags" = yes ; then
5743 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5744 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5747 elif test "${cf_tst_cflags}" = "\"'" ; then
5749 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5750 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5760 case "$cf_add_cflags" in
5762 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5764 CPPFLAGS=`echo "$CPPFLAGS" | \
5765 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5766 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5771 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5772 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5779 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5780 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5787 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5788 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5790 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5792 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5793 && test -z "${cf_tst_cflags}" \
5794 && cf_fix_cppflags=no
5799 if test -n "$cf_new_cflags" ; then
5801 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5802 CFLAGS="${CFLAGS}$cf_new_cflags"
5806 if test -n "$cf_new_cppflags" ; then
5808 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5809 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5813 if test -n "$cf_new_extra_cppflags" ; then
5815 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5816 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5824 fi # cf_cv_posix_visible
5826 echo "$as_me:5826: checking for signal global datatype" >&5
5827 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
5828 if test "${cf_cv_sig_atomic_t+set}" = set; then
5829 echo $ECHO_N "(cached) $ECHO_C" >&6
5833 "volatile sig_atomic_t" \
5837 cat >"conftest.$ac_ext" <<_ACEOF
5838 #line 5838 "configure"
5839 #include "confdefs.h"
5841 #include <sys/types.h>
5847 static void handler(int sig)
5855 signal(SIGINT, handler);
5861 rm -f "conftest.$ac_objext"
5862 if { (eval echo "$as_me:5862: \"$ac_compile\"") >&5
5863 (eval $ac_compile) 2>&5
5865 echo "$as_me:5865: \$? = $ac_status" >&5
5866 (exit "$ac_status"); } &&
5867 { ac_try='test -s "conftest.$ac_objext"'
5868 { (eval echo "$as_me:5868: \"$ac_try\"") >&5
5871 echo "$as_me:5871: \$? = $ac_status" >&5
5872 (exit "$ac_status"); }; }; then
5873 cf_cv_sig_atomic_t=$cf_type
5875 echo "$as_me: failed program was:" >&5
5876 cat "conftest.$ac_ext" >&5
5877 cf_cv_sig_atomic_t=no
5879 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5880 test "$cf_cv_sig_atomic_t" != no && break
5885 echo "$as_me:5885: result: $cf_cv_sig_atomic_t" >&5
5886 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
5887 test "$cf_cv_sig_atomic_t" != no &&
5888 cat >>confdefs.h <<EOF
5889 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
5892 # Work around breakage on OS X
5894 echo "$as_me:5894: checking if SIGWINCH is defined" >&5
5895 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
5896 if test "${cf_cv_define_sigwinch+set}" = set; then
5897 echo $ECHO_N "(cached) $ECHO_C" >&6
5900 cat >"conftest.$ac_ext" <<_ACEOF
5901 #line 5901 "configure"
5902 #include "confdefs.h"
5904 #include <sys/types.h>
5905 #include <sys/signal.h>
5910 int x = SIGWINCH; (void)x
5915 rm -f "conftest.$ac_objext"
5916 if { (eval echo "$as_me:5916: \"$ac_compile\"") >&5
5917 (eval $ac_compile) 2>&5
5919 echo "$as_me:5919: \$? = $ac_status" >&5
5920 (exit "$ac_status"); } &&
5921 { ac_try='test -s "conftest.$ac_objext"'
5922 { (eval echo "$as_me:5922: \"$ac_try\"") >&5
5925 echo "$as_me:5925: \$? = $ac_status" >&5
5926 (exit "$ac_status"); }; }; then
5927 cf_cv_define_sigwinch=yes
5929 echo "$as_me: failed program was:" >&5
5930 cat "conftest.$ac_ext" >&5
5931 cat >"conftest.$ac_ext" <<_ACEOF
5932 #line 5932 "configure"
5933 #include "confdefs.h"
5935 #undef _XOPEN_SOURCE
5936 #undef _POSIX_SOURCE
5937 #undef _POSIX_C_SOURCE
5938 #include <sys/types.h>
5939 #include <sys/signal.h>
5944 int x = SIGWINCH; (void)x
5949 rm -f "conftest.$ac_objext"
5950 if { (eval echo "$as_me:5950: \"$ac_compile\"") >&5
5951 (eval $ac_compile) 2>&5
5953 echo "$as_me:5953: \$? = $ac_status" >&5
5954 (exit "$ac_status"); } &&
5955 { ac_try='test -s "conftest.$ac_objext"'
5956 { (eval echo "$as_me:5956: \"$ac_try\"") >&5
5959 echo "$as_me:5959: \$? = $ac_status" >&5
5960 (exit "$ac_status"); }; }; then
5961 cf_cv_define_sigwinch=maybe
5963 echo "$as_me: failed program was:" >&5
5964 cat "conftest.$ac_ext" >&5
5965 cf_cv_define_sigwinch=no
5967 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5970 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5973 echo "$as_me:5973: result: $cf_cv_define_sigwinch" >&5
5974 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
5976 if test "$cf_cv_define_sigwinch" = maybe ; then
5977 echo "$as_me:5977: checking for actual SIGWINCH definition" >&5
5978 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
5979 if test "${cf_cv_fixup_sigwinch+set}" = set; then
5980 echo $ECHO_N "(cached) $ECHO_C" >&6
5983 cf_cv_fixup_sigwinch=unknown
5985 while test "$cf_sigwinch" != 1
5987 cat >"conftest.$ac_ext" <<_ACEOF
5988 #line 5988 "configure"
5989 #include "confdefs.h"
5991 #undef _XOPEN_SOURCE
5992 #undef _POSIX_SOURCE
5993 #undef _POSIX_C_SOURCE
5994 #include <sys/types.h>
5995 #include <sys/signal.h>
6001 #if SIGWINCH != $cf_sigwinch
6004 int x = SIGWINCH; (void)x
6009 rm -f "conftest.$ac_objext"
6010 if { (eval echo "$as_me:6010: \"$ac_compile\"") >&5
6011 (eval $ac_compile) 2>&5
6013 echo "$as_me:6013: \$? = $ac_status" >&5
6014 (exit "$ac_status"); } &&
6015 { ac_try='test -s "conftest.$ac_objext"'
6016 { (eval echo "$as_me:6016: \"$ac_try\"") >&5
6019 echo "$as_me:6019: \$? = $ac_status" >&5
6020 (exit "$ac_status"); }; }; then
6021 cf_cv_fixup_sigwinch=$cf_sigwinch
6024 echo "$as_me: failed program was:" >&5
6025 cat "conftest.$ac_ext" >&5
6027 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6029 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
6033 echo "$as_me:6033: result: $cf_cv_fixup_sigwinch" >&5
6034 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6036 if test "$cf_cv_fixup_sigwinch" != unknown ; then
6037 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6041 # Checks for CODESET support.
6043 echo "$as_me:6043: checking for nl_langinfo and CODESET" >&5
6044 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6045 if test "${am_cv_langinfo_codeset+set}" = set; then
6046 echo $ECHO_N "(cached) $ECHO_C" >&6
6048 cat >"conftest.$ac_ext" <<_ACEOF
6049 #line 6049 "configure"
6050 #include "confdefs.h"
6051 #include <langinfo.h>
6055 char* cs = nl_langinfo(CODESET); (void)cs
6060 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6061 if { (eval echo "$as_me:6061: \"$ac_link\"") >&5
6062 (eval $ac_link) 2>&5
6064 echo "$as_me:6064: \$? = $ac_status" >&5
6065 (exit "$ac_status"); } &&
6066 { ac_try='test -s "conftest$ac_exeext"'
6067 { (eval echo "$as_me:6067: \"$ac_try\"") >&5
6070 echo "$as_me:6070: \$? = $ac_status" >&5
6071 (exit "$ac_status"); }; }; then
6072 am_cv_langinfo_codeset=yes
6074 echo "$as_me: failed program was:" >&5
6075 cat "conftest.$ac_ext" >&5
6076 am_cv_langinfo_codeset=no
6078 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6081 echo "$as_me:6081: result: $am_cv_langinfo_codeset" >&5
6082 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6083 if test "$am_cv_langinfo_codeset" = yes; then
6085 cat >>confdefs.h <<\EOF
6086 #define HAVE_LANGINFO_CODESET 1
6091 echo "$as_me:6091: checking if you want to use pkg-config" >&5
6092 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
6094 # Check whether --with-pkg-config or --without-pkg-config was given.
6095 if test "${with_pkg_config+set}" = set; then
6096 withval="$with_pkg_config"
6097 cf_pkg_config=$withval
6101 echo "$as_me:6101: result: $cf_pkg_config" >&5
6102 echo "${ECHO_T}$cf_pkg_config" >&6
6104 case "$cf_pkg_config" in
6110 if test -n "$ac_tool_prefix"; then
6111 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6112 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6113 echo "$as_me:6113: checking for $ac_word" >&5
6114 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6115 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6116 echo $ECHO_N "(cached) $ECHO_C" >&6
6120 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6123 ac_save_IFS=$IFS; IFS=$ac_path_separator
6125 for ac_dir in $ac_dummy; do
6127 test -z "$ac_dir" && ac_dir=.
6128 if $as_executable_p "$ac_dir/$ac_word"; then
6129 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
6130 echo "$as_me:6130: found $ac_dir/$ac_word" >&5
6138 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6140 if test -n "$PKG_CONFIG"; then
6141 echo "$as_me:6141: result: $PKG_CONFIG" >&5
6142 echo "${ECHO_T}$PKG_CONFIG" >&6
6144 echo "$as_me:6144: result: no" >&5
6145 echo "${ECHO_T}no" >&6
6149 if test -z "$ac_cv_path_PKG_CONFIG"; then
6150 ac_pt_PKG_CONFIG=$PKG_CONFIG
6151 # Extract the first word of "pkg-config", so it can be a program name with args.
6152 set dummy pkg-config; ac_word=$2
6153 echo "$as_me:6153: checking for $ac_word" >&5
6154 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6155 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
6156 echo $ECHO_N "(cached) $ECHO_C" >&6
6158 case $ac_pt_PKG_CONFIG in
6160 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
6163 ac_save_IFS=$IFS; IFS=$ac_path_separator
6165 for ac_dir in $ac_dummy; do
6167 test -z "$ac_dir" && ac_dir=.
6168 if $as_executable_p "$ac_dir/$ac_word"; then
6169 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
6170 echo "$as_me:6170: found $ac_dir/$ac_word" >&5
6175 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
6179 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
6181 if test -n "$ac_pt_PKG_CONFIG"; then
6182 echo "$as_me:6182: result: $ac_pt_PKG_CONFIG" >&5
6183 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
6185 echo "$as_me:6185: result: no" >&5
6186 echo "${ECHO_T}no" >&6
6189 PKG_CONFIG=$ac_pt_PKG_CONFIG
6191 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6200 test -z "$PKG_CONFIG" && PKG_CONFIG=none
6201 if test "$PKG_CONFIG" != none ; then
6203 if test "x$prefix" != xNONE; then
6204 cf_path_syntax="$prefix"
6206 cf_path_syntax="$ac_default_prefix"
6209 case ".$PKG_CONFIG" in
6214 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
6216 (.\$\{*prefix\}*|.\$\{*dir\}*)
6217 eval PKG_CONFIG="$PKG_CONFIG"
6218 case ".$PKG_CONFIG" in
6220 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
6225 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
6228 { { echo "$as_me:6228: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
6229 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
6230 { (exit 1); exit 1; }; }
6234 elif test "x$cf_pkg_config" != xno ; then
6235 { echo "$as_me:6235: WARNING: pkg-config is not installed" >&5
6236 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
6239 echo "$as_me:6239: checking if you want to see long compiling messages" >&5
6240 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
6242 # Check whether --enable-echo or --disable-echo was given.
6243 if test "${enable_echo+set}" = set; then
6244 enableval="$enable_echo"
6245 test "$enableval" != no && enableval=yes
6246 if test "$enableval" != "yes" ; then
6249 ECHO_LD='@echo linking $@;'
6250 RULE_CC='@echo compiling $<'
6251 SHOW_CC='@echo compiling $@'
6273 echo "$as_me:6273: result: $enableval" >&5
6274 echo "${ECHO_T}$enableval" >&6
6276 echo "$as_me:6276: checking for ncurses wrap-prefix" >&5
6277 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
6279 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
6280 if test "${with_ncurses_wrap_prefix+set}" = set; then
6281 withval="$with_ncurses_wrap_prefix"
6282 NCURSES_WRAP_PREFIX=$withval
6284 NCURSES_WRAP_PREFIX=_nc_
6286 echo "$as_me:6286: result: $NCURSES_WRAP_PREFIX" >&5
6287 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
6289 echo "$as_me:6289: checking if you want to check for wide-character functions" >&5
6290 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
6292 # Check whether --enable-widec or --disable-widec was given.
6293 if test "${enable_widec+set}" = set; then
6294 enableval="$enable_widec"
6295 test "$enableval" != no && enableval=yes
6296 if test "$enableval" != "yes" ; then
6306 echo "$as_me:6306: result: $cf_enable_widec" >&5
6307 echo "${ECHO_T}$cf_enable_widec" >&6
6309 echo "$as_me:6309: checking for specific curses-directory" >&5
6310 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
6312 # Check whether --with-curses-dir or --without-curses-dir was given.
6313 if test "${with_curses_dir+set}" = set; then
6314 withval="$with_curses_dir"
6315 cf_cv_curses_dir=$withval
6319 echo "$as_me:6319: result: $cf_cv_curses_dir" >&5
6320 echo "${ECHO_T}$cf_cv_curses_dir" >&6
6322 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6325 if test "x$prefix" != xNONE; then
6326 cf_path_syntax="$prefix"
6328 cf_path_syntax="$ac_default_prefix"
6336 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
6338 (.\$\{*prefix\}*|.\$\{*dir\}*)
6339 eval withval="$withval"
6342 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
6347 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
6350 { { echo "$as_me:6350: error: expected a pathname, not \"$withval\"" >&5
6351 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6352 { (exit 1); exit 1; }; }
6356 if test -d "$cf_cv_curses_dir"
6359 if test -n "$cf_cv_curses_dir/include" ; then
6360 for cf_add_incdir in $cf_cv_curses_dir/include
6362 while test "$cf_add_incdir" != /usr/include
6364 if test -d "$cf_add_incdir"
6367 if test -n "$CFLAGS$CPPFLAGS" ; then
6368 # a loop is needed to ensure we can add subdirs of existing dirs
6369 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6370 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6371 cf_have_incdir=yes; break
6376 if test "$cf_have_incdir" = no ; then
6377 if test "$cf_add_incdir" = /usr/local/include ; then
6378 if test "$GCC" = yes
6380 cf_save_CPPFLAGS=$CPPFLAGS
6382 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6383 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6385 cat >"conftest.$ac_ext" <<_ACEOF
6386 #line 6386 "configure"
6387 #include "confdefs.h"
6397 rm -f "conftest.$ac_objext"
6398 if { (eval echo "$as_me:6398: \"$ac_compile\"") >&5
6399 (eval $ac_compile) 2>&5
6401 echo "$as_me:6401: \$? = $ac_status" >&5
6402 (exit "$ac_status"); } &&
6403 { ac_try='test -s "conftest.$ac_objext"'
6404 { (eval echo "$as_me:6404: \"$ac_try\"") >&5
6407 echo "$as_me:6407: \$? = $ac_status" >&5
6408 (exit "$ac_status"); }; }; then
6411 echo "$as_me: failed program was:" >&5
6412 cat "conftest.$ac_ext" >&5
6415 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6416 CPPFLAGS=$cf_save_CPPFLAGS
6421 if test "$cf_have_incdir" = no ; then
6422 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6424 echo "${as_me:-configure}:6424: testing adding $cf_add_incdir to include-path ..." 1>&5
6426 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6428 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
6429 test "$cf_top_incdir" = "$cf_add_incdir" && break
6430 cf_add_incdir="$cf_top_incdir"
6441 if test -n "$cf_cv_curses_dir/lib" ; then
6442 for cf_add_libdir in $cf_cv_curses_dir/lib
6444 if test "$cf_add_libdir" = /usr/lib ; then
6446 elif test -d "$cf_add_libdir"
6449 if test -n "$LDFLAGS$LIBS" ; then
6450 # a loop is needed to ensure we can add subdirs of existing dirs
6451 for cf_test_libdir in $LDFLAGS $LIBS ; do
6452 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6453 cf_have_libdir=yes; break
6457 if test "$cf_have_libdir" = no ; then
6458 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6460 echo "${as_me:-configure}:6460: testing adding $cf_add_libdir to library-path ..." 1>&5
6462 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6473 echo "$as_me:6473: checking for specified curses library type" >&5
6474 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
6476 # Check whether --with-screen or --without-screen was given.
6477 if test "${with_screen+set}" = set; then
6478 withval="$with_screen"
6479 cf_cv_screen=$withval
6482 # Check whether --with-ncursesw or --without-ncursesw was given.
6483 if test "${with_ncursesw+set}" = set; then
6484 withval="$with_ncursesw"
6485 cf_cv_screen=ncursesw
6488 # Check whether --with-ncurses or --without-ncurses was given.
6489 if test "${with_ncurses+set}" = set; then
6490 withval="$with_ncurses"
6491 cf_cv_screen=ncurses
6494 # Check whether --with-pdcurses or --without-pdcurses was given.
6495 if test "${with_pdcurses+set}" = set; then
6496 withval="$with_pdcurses"
6497 cf_cv_screen=pdcurses
6500 # Check whether --with-curses-colr or --without-curses-colr was given.
6501 if test "${with_curses_colr+set}" = set; then
6502 withval="$with_curses_colr"
6503 cf_cv_screen=curses_colr
6506 # Check whether --with-curses-5lib or --without-curses-5lib was given.
6507 if test "${with_curses_5lib+set}" = set; then
6508 withval="$with_curses_5lib"
6509 cf_cv_screen=curses_5lib
6517 echo "$as_me:6517: result: $cf_cv_screen" >&5
6518 echo "${ECHO_T}$cf_cv_screen" >&6
6520 case $cf_cv_screen in
6523 echo "$as_me:6523: checking for extra include directories" >&5
6524 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
6525 if test "${cf_cv_curses_incdir+set}" = set; then
6526 echo $ECHO_N "(cached) $ECHO_C" >&6
6529 cf_cv_curses_incdir=no
6532 if test "x$cf_cv_screen" = "xcurses_colr"
6534 test -d /usr/include/curses_colr && \
6535 cf_cv_curses_incdir="-I/usr/include/curses_colr"
6539 if test "x$cf_cv_screen" = "xcurses_5lib"
6541 test -d /usr/5lib && \
6542 test -d /usr/5include && \
6543 cf_cv_curses_incdir="-I/usr/5include"
6549 echo "$as_me:6549: result: $cf_cv_curses_incdir" >&5
6550 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
6551 if test "$cf_cv_curses_incdir" != no
6554 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6555 CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
6559 echo "$as_me:6559: checking if we have identified curses headers" >&5
6560 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6561 if test "${cf_cv_ncurses_header+set}" = set; then
6562 echo $ECHO_N "(cached) $ECHO_C" >&6
6565 cf_cv_ncurses_header=none
6568 curses.h ncurses/ncurses.h ncurses/curses.h
6570 cat >"conftest.$ac_ext" <<_ACEOF
6571 #line 6571 "configure"
6572 #include "confdefs.h"
6573 #include <${cf_header}>
6577 initscr(); tgoto("?", 0,0)
6582 rm -f "conftest.$ac_objext"
6583 if { (eval echo "$as_me:6583: \"$ac_compile\"") >&5
6584 (eval $ac_compile) 2>&5
6586 echo "$as_me:6586: \$? = $ac_status" >&5
6587 (exit "$ac_status"); } &&
6588 { ac_try='test -s "conftest.$ac_objext"'
6589 { (eval echo "$as_me:6589: \"$ac_try\"") >&5
6592 echo "$as_me:6592: \$? = $ac_status" >&5
6593 (exit "$ac_status"); }; }; then
6594 cf_cv_ncurses_header=$cf_header; break
6596 echo "$as_me: failed program was:" >&5
6597 cat "conftest.$ac_ext" >&5
6599 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6603 echo "$as_me:6603: result: $cf_cv_ncurses_header" >&5
6604 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6606 if test "$cf_cv_ncurses_header" = none ; then
6607 { { echo "$as_me:6607: error: No curses header-files found" >&5
6608 echo "$as_me: error: No curses header-files found" >&2;}
6609 { (exit 1); exit 1; }; }
6612 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6614 for ac_header in $cf_cv_ncurses_header
6616 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6617 echo "$as_me:6617: checking for $ac_header" >&5
6618 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6619 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6620 echo $ECHO_N "(cached) $ECHO_C" >&6
6622 cat >"conftest.$ac_ext" <<_ACEOF
6623 #line 6623 "configure"
6624 #include "confdefs.h"
6625 #include <$ac_header>
6627 if { (eval echo "$as_me:6627: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6628 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6630 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6632 cat conftest.err >&5
6633 echo "$as_me:6633: \$? = $ac_status" >&5
6634 (exit "$ac_status"); } >/dev/null; then
6635 if test -s conftest.err; then
6636 ac_cpp_err=$ac_c_preproc_warn_flag
6643 if test -z "$ac_cpp_err"; then
6644 eval "$as_ac_Header=yes"
6646 echo "$as_me: failed program was:" >&5
6647 cat "conftest.$ac_ext" >&5
6648 eval "$as_ac_Header=no"
6650 rm -f conftest.err "conftest.$ac_ext"
6652 echo "$as_me:6652: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6653 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6654 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6655 cat >>confdefs.h <<EOF
6656 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6662 echo "$as_me:6662: checking for terminfo header" >&5
6663 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6664 if test "${cf_cv_term_header+set}" = set; then
6665 echo $ECHO_N "(cached) $ECHO_C" >&6
6668 case "${cf_cv_ncurses_header}" in
6669 (*/ncurses.h|*/ncursesw.h)
6670 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6673 cf_term_header=term.h
6677 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6679 cat >"conftest.$ac_ext" <<_ACEOF
6680 #line 6680 "configure"
6681 #include "confdefs.h"
6683 #include <${cf_cv_ncurses_header:-curses.h}>
6689 int x = auto_left_margin; (void)x
6694 rm -f "conftest.$ac_objext"
6695 if { (eval echo "$as_me:6695: \"$ac_compile\"") >&5
6696 (eval $ac_compile) 2>&5
6698 echo "$as_me:6698: \$? = $ac_status" >&5
6699 (exit "$ac_status"); } &&
6700 { ac_try='test -s "conftest.$ac_objext"'
6701 { (eval echo "$as_me:6701: \"$ac_try\"") >&5
6704 echo "$as_me:6704: \$? = $ac_status" >&5
6705 (exit "$ac_status"); }; }; then
6707 cf_cv_term_header="$cf_test"
6709 echo "$as_me: failed program was:" >&5
6710 cat "conftest.$ac_ext" >&5
6712 cf_cv_term_header=unknown
6715 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6716 test "$cf_cv_term_header" != unknown && break
6720 echo "$as_me:6720: result: $cf_cv_term_header" >&5
6721 echo "${ECHO_T}$cf_cv_term_header" >&6
6723 # Set definitions to allow ifdef'ing to accommodate subdirectories
6725 case "$cf_cv_term_header" in
6728 cat >>confdefs.h <<\EOF
6729 #define HAVE_TERM_H 1
6735 case "$cf_cv_term_header" in
6738 cat >>confdefs.h <<\EOF
6739 #define HAVE_NCURSES_TERM_H 1
6745 cat >>confdefs.h <<\EOF
6746 #define HAVE_NCURSESW_TERM_H 1
6752 echo "$as_me:6752: checking for ncurses version" >&5
6753 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6754 if test "${cf_cv_ncurses_version+set}" = set; then
6755 echo $ECHO_N "(cached) $ECHO_C" >&6
6758 cf_cv_ncurses_version=no
6760 rm -f "$cf_tempfile"
6761 if test "$cross_compiling" = yes; then
6763 # This will not work if the preprocessor splits the line after the
6764 # Autoconf token. The 'unproto' program does that.
6765 cat > "conftest.$ac_ext" <<EOF
6766 #include <${cf_cv_ncurses_header:-curses.h}>
6768 #ifdef NCURSES_VERSION
6769 Autoconf NCURSES_VERSION
6777 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6778 { (eval echo "$as_me:6778: \"$cf_try\"") >&5
6781 echo "$as_me:6781: \$? = $ac_status" >&5
6782 (exit "$ac_status"); }
6783 if test -f conftest.out ; then
6784 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
6785 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6790 cat >"conftest.$ac_ext" <<_ACEOF
6791 #line 6791 "configure"
6792 #include "confdefs.h"
6794 #include <${cf_cv_ncurses_header:-curses.h}>
6798 FILE *fp = fopen("$cf_tempfile", "w");
6799 #ifdef NCURSES_VERSION
6800 # ifdef NCURSES_VERSION_PATCH
6801 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6803 fprintf(fp, "%s\\n", NCURSES_VERSION);
6807 fprintf(fp, "old\\n");
6812 ${cf_cv_main_return:-return}(0);
6815 rm -f "conftest$ac_exeext"
6816 if { (eval echo "$as_me:6816: \"$ac_link\"") >&5
6817 (eval $ac_link) 2>&5
6819 echo "$as_me:6819: \$? = $ac_status" >&5
6820 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6821 { (eval echo "$as_me:6821: \"$ac_try\"") >&5
6824 echo "$as_me:6824: \$? = $ac_status" >&5
6825 (exit "$ac_status"); }; }; then
6827 cf_cv_ncurses_version=`cat $cf_tempfile`
6829 echo "$as_me: program exited with status $ac_status" >&5
6830 echo "$as_me: failed program was:" >&5
6831 cat "conftest.$ac_ext" >&5
6833 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6835 rm -f "$cf_tempfile"
6838 echo "$as_me:6838: result: $cf_cv_ncurses_version" >&5
6839 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6840 test "$cf_cv_ncurses_version" = no ||
6841 cat >>confdefs.h <<\EOF
6845 echo "$as_me:6845: checking if we have identified curses libraries" >&5
6846 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
6847 cat >"conftest.$ac_ext" <<_ACEOF
6848 #line 6848 "configure"
6849 #include "confdefs.h"
6850 #include <${cf_cv_ncurses_header:-curses.h}>
6854 initscr(); tgoto("?", 0,0)
6859 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6860 if { (eval echo "$as_me:6860: \"$ac_link\"") >&5
6861 (eval $ac_link) 2>&5
6863 echo "$as_me:6863: \$? = $ac_status" >&5
6864 (exit "$ac_status"); } &&
6865 { ac_try='test -s "conftest$ac_exeext"'
6866 { (eval echo "$as_me:6866: \"$ac_try\"") >&5
6869 echo "$as_me:6869: \$? = $ac_status" >&5
6870 (exit "$ac_status"); }; }; then
6873 echo "$as_me: failed program was:" >&5
6874 cat "conftest.$ac_ext" >&5
6877 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6878 echo "$as_me:6878: result: $cf_result" >&5
6879 echo "${ECHO_T}$cf_result" >&6
6881 if test "$cf_result" = no ; then
6884 echo "$as_me:6884: checking for tgoto in -lmytinfo" >&5
6885 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6886 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6887 echo $ECHO_N "(cached) $ECHO_C" >&6
6889 ac_check_lib_save_LIBS=$LIBS
6890 LIBS="-lmytinfo $LIBS"
6891 cat >"conftest.$ac_ext" <<_ACEOF
6892 #line 6892 "configure"
6893 #include "confdefs.h"
6895 /* Override any gcc2 internal prototype to avoid an error. */
6899 /* We use char because int might match the return type of a gcc2
6900 builtin and then its argument prototype would still apply. */
6910 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6911 if { (eval echo "$as_me:6911: \"$ac_link\"") >&5
6912 (eval $ac_link) 2>&5
6914 echo "$as_me:6914: \$? = $ac_status" >&5
6915 (exit "$ac_status"); } &&
6916 { ac_try='test -s "conftest$ac_exeext"'
6917 { (eval echo "$as_me:6917: \"$ac_try\"") >&5
6920 echo "$as_me:6920: \$? = $ac_status" >&5
6921 (exit "$ac_status"); }; }; then
6922 ac_cv_lib_mytinfo_tgoto=yes
6924 echo "$as_me: failed program was:" >&5
6925 cat "conftest.$ac_ext" >&5
6926 ac_cv_lib_mytinfo_tgoto=no
6928 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6929 LIBS=$ac_check_lib_save_LIBS
6931 echo "$as_me:6931: result: $ac_cv_lib_mytinfo_tgoto" >&5
6932 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6933 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6938 for cf_add_1lib in -lmytinfo; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6940 for cf_add_1lib in $cf_add_0lib; do
6941 for cf_add_2lib in $cf_add_libs; do
6942 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6947 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6955 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
6956 # next (1998), and xcurses "newer" (2000). There is no header file for
6957 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
6958 # term.h) for cur_colr
6959 if test "x$cf_cv_screen" = "xcurses_colr"
6961 echo "$as_me:6961: checking for initscr in -lcur_colr" >&5
6962 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
6963 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
6964 echo $ECHO_N "(cached) $ECHO_C" >&6
6966 ac_check_lib_save_LIBS=$LIBS
6967 LIBS="-lcur_colr $LIBS"
6968 cat >"conftest.$ac_ext" <<_ACEOF
6969 #line 6969 "configure"
6970 #include "confdefs.h"
6972 /* Override any gcc2 internal prototype to avoid an error. */
6976 /* We use char because int might match the return type of a gcc2
6977 builtin and then its argument prototype would still apply. */
6987 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6988 if { (eval echo "$as_me:6988: \"$ac_link\"") >&5
6989 (eval $ac_link) 2>&5
6991 echo "$as_me:6991: \$? = $ac_status" >&5
6992 (exit "$ac_status"); } &&
6993 { ac_try='test -s "conftest$ac_exeext"'
6994 { (eval echo "$as_me:6994: \"$ac_try\"") >&5
6997 echo "$as_me:6997: \$? = $ac_status" >&5
6998 (exit "$ac_status"); }; }; then
6999 ac_cv_lib_cur_colr_initscr=yes
7001 echo "$as_me: failed program was:" >&5
7002 cat "conftest.$ac_ext" >&5
7003 ac_cv_lib_cur_colr_initscr=no
7005 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7006 LIBS=$ac_check_lib_save_LIBS
7008 echo "$as_me:7008: result: $ac_cv_lib_cur_colr_initscr" >&5
7009 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
7010 if test "$ac_cv_lib_cur_colr_initscr" = yes; then
7015 for cf_add_1lib in -lcur_colr; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7017 for cf_add_1lib in $cf_add_0lib; do
7018 for cf_add_2lib in $cf_add_libs; do
7019 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7024 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7028 ac_cv_func_initscr=yes
7032 echo "$as_me:7032: checking for initscr in -lHcurses" >&5
7033 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
7034 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
7035 echo $ECHO_N "(cached) $ECHO_C" >&6
7037 ac_check_lib_save_LIBS=$LIBS
7038 LIBS="-lHcurses $LIBS"
7039 cat >"conftest.$ac_ext" <<_ACEOF
7040 #line 7040 "configure"
7041 #include "confdefs.h"
7043 /* Override any gcc2 internal prototype to avoid an error. */
7047 /* We use char because int might match the return type of a gcc2
7048 builtin and then its argument prototype would still apply. */
7058 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7059 if { (eval echo "$as_me:7059: \"$ac_link\"") >&5
7060 (eval $ac_link) 2>&5
7062 echo "$as_me:7062: \$? = $ac_status" >&5
7063 (exit "$ac_status"); } &&
7064 { ac_try='test -s "conftest$ac_exeext"'
7065 { (eval echo "$as_me:7065: \"$ac_try\"") >&5
7068 echo "$as_me:7068: \$? = $ac_status" >&5
7069 (exit "$ac_status"); }; }; then
7070 ac_cv_lib_Hcurses_initscr=yes
7072 echo "$as_me: failed program was:" >&5
7073 cat "conftest.$ac_ext" >&5
7074 ac_cv_lib_Hcurses_initscr=no
7076 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7077 LIBS=$ac_check_lib_save_LIBS
7079 echo "$as_me:7079: result: $ac_cv_lib_Hcurses_initscr" >&5
7080 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
7081 if test "$ac_cv_lib_Hcurses_initscr" = yes; then
7083 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
7088 for cf_add_1lib in -lHcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7090 for cf_add_1lib in $cf_add_0lib; do
7091 for cf_add_2lib in $cf_add_libs; do
7092 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7097 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7101 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7102 CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
7104 ac_cv_func_initscr=yes
7113 case `arch 2>/dev/null` in
7118 if test -n "/lib64" ; then
7119 for cf_add_libdir in /lib64
7121 if test "$cf_add_libdir" = /usr/lib ; then
7123 elif test -d "$cf_add_libdir"
7126 if test -n "$LDFLAGS$LIBS" ; then
7127 # a loop is needed to ensure we can add subdirs of existing dirs
7128 for cf_test_libdir in $LDFLAGS $LIBS ; do
7129 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7130 cf_have_libdir=yes; break
7134 if test "$cf_have_libdir" = no ; then
7135 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7137 echo "${as_me:-configure}:7137: testing adding $cf_add_libdir to library-path ..." 1>&5
7139 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7147 if test -n "/lib" ; then
7148 for cf_add_libdir in /lib
7150 if test "$cf_add_libdir" = /usr/lib ; then
7152 elif test -d "$cf_add_libdir"
7155 if test -n "$LDFLAGS$LIBS" ; then
7156 # a loop is needed to ensure we can add subdirs of existing dirs
7157 for cf_test_libdir in $LDFLAGS $LIBS ; do
7158 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7159 cf_have_libdir=yes; break
7163 if test "$cf_have_libdir" = no ; then
7164 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7166 echo "${as_me:-configure}:7166: testing adding $cf_add_libdir to library-path ..." 1>&5
7168 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7178 if test -n "/lib" ; then
7179 for cf_add_libdir in /lib
7181 if test "$cf_add_libdir" = /usr/lib ; then
7183 elif test -d "$cf_add_libdir"
7186 if test -n "$LDFLAGS$LIBS" ; then
7187 # a loop is needed to ensure we can add subdirs of existing dirs
7188 for cf_test_libdir in $LDFLAGS $LIBS ; do
7189 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7190 cf_have_libdir=yes; break
7194 if test "$cf_have_libdir" = no ; then
7195 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7197 echo "${as_me:-configure}:7197: testing adding $cf_add_libdir to library-path ..." 1>&5
7199 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7209 if test "x$cf_cv_screen" = "xcurses_5lib"
7211 if test -d /usr/5lib ; then
7213 if test -n "/usr/5lib" ; then
7214 for cf_add_libdir in /usr/5lib
7216 if test "$cf_add_libdir" = /usr/lib ; then
7218 elif test -d "$cf_add_libdir"
7221 if test -n "$LDFLAGS$LIBS" ; then
7222 # a loop is needed to ensure we can add subdirs of existing dirs
7223 for cf_test_libdir in $LDFLAGS $LIBS ; do
7224 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7225 cf_have_libdir=yes; break
7229 if test "$cf_have_libdir" = no ; then
7230 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7232 echo "${as_me:-configure}:7232: testing adding $cf_add_libdir to library-path ..." 1>&5
7234 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7243 for cf_add_1lib in -lcurses -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7245 for cf_add_1lib in $cf_add_0lib; do
7246 for cf_add_2lib in $cf_add_libs; do
7247 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7252 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7258 ac_cv_func_initscr=yes
7262 if test ".$ac_cv_func_initscr" != .yes ; then
7263 cf_save_LIBS="$LIBS"
7265 if test ".${cf_cv_ncurses_version:-no}" != .no
7267 cf_check_list="ncurses curses cursesX"
7269 cf_check_list="cursesX curses ncurses"
7272 # Check for library containing tgoto. Do this before curses library
7273 # because it may be needed to link the test-case for initscr.
7274 if test "x$cf_term_lib" = x
7276 echo "$as_me:7276: checking for tgoto" >&5
7277 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
7278 if test "${ac_cv_func_tgoto+set}" = set; then
7279 echo $ECHO_N "(cached) $ECHO_C" >&6
7281 cat >"conftest.$ac_ext" <<_ACEOF
7282 #line 7282 "configure"
7283 #include "confdefs.h"
7284 #define tgoto autoconf_temporary
7285 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
7292 /* We use char because int might match the return type of a gcc2
7293 builtin and then its argument prototype would still apply. */
7300 /* The GNU C library defines stubs for functions which it implements
7301 to always fail with ENOSYS. Some functions are actually named
7302 something starting with __ and the normal name is an alias. */
7303 #if defined (__stub_tgoto) || defined (__stub___tgoto)
7304 #error found stub for tgoto
7312 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7313 if { (eval echo "$as_me:7313: \"$ac_link\"") >&5
7314 (eval $ac_link) 2>&5
7316 echo "$as_me:7316: \$? = $ac_status" >&5
7317 (exit "$ac_status"); } &&
7318 { ac_try='test -s "conftest$ac_exeext"'
7319 { (eval echo "$as_me:7319: \"$ac_try\"") >&5
7322 echo "$as_me:7322: \$? = $ac_status" >&5
7323 (exit "$ac_status"); }; }; then
7324 ac_cv_func_tgoto=yes
7326 echo "$as_me: failed program was:" >&5
7327 cat "conftest.$ac_ext" >&5
7330 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7332 echo "$as_me:7332: result: $ac_cv_func_tgoto" >&5
7333 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
7334 if test "$ac_cv_func_tgoto" = yes; then
7335 cf_term_lib=predefined
7338 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
7340 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
7341 echo "$as_me:7341: checking for tgoto in -l$cf_term_lib" >&5
7342 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
7343 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
7344 echo $ECHO_N "(cached) $ECHO_C" >&6
7346 ac_check_lib_save_LIBS=$LIBS
7347 LIBS="-l$cf_term_lib $LIBS"
7348 cat >"conftest.$ac_ext" <<_ACEOF
7349 #line 7349 "configure"
7350 #include "confdefs.h"
7352 /* Override any gcc2 internal prototype to avoid an error. */
7356 /* We use char because int might match the return type of a gcc2
7357 builtin and then its argument prototype would still apply. */
7367 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7368 if { (eval echo "$as_me:7368: \"$ac_link\"") >&5
7369 (eval $ac_link) 2>&5
7371 echo "$as_me:7371: \$? = $ac_status" >&5
7372 (exit "$ac_status"); } &&
7373 { ac_try='test -s "conftest$ac_exeext"'
7374 { (eval echo "$as_me:7374: \"$ac_try\"") >&5
7377 echo "$as_me:7377: \$? = $ac_status" >&5
7378 (exit "$ac_status"); }; }; then
7379 eval "$as_ac_Lib=yes"
7381 echo "$as_me: failed program was:" >&5
7382 cat "conftest.$ac_ext" >&5
7383 eval "$as_ac_Lib=no"
7385 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7386 LIBS=$ac_check_lib_save_LIBS
7388 echo "$as_me:7388: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
7389 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
7390 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
7392 : "${cf_nculib_root:=$cf_term_lib}"
7403 # Check for library containing initscr
7404 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
7405 if test "x$cf_curs_lib" = x
7407 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
7409 LIBS="-l$cf_curs_lib $cf_save_LIBS"
7410 if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
7411 echo "$as_me:7411: checking if we can link with $cf_curs_lib library" >&5
7412 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
7413 cat >"conftest.$ac_ext" <<_ACEOF
7414 #line 7414 "configure"
7415 #include "confdefs.h"
7416 #include <${cf_cv_ncurses_header:-curses.h}>
7425 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7426 if { (eval echo "$as_me:7426: \"$ac_link\"") >&5
7427 (eval $ac_link) 2>&5
7429 echo "$as_me:7429: \$? = $ac_status" >&5
7430 (exit "$ac_status"); } &&
7431 { ac_try='test -s "conftest$ac_exeext"'
7432 { (eval echo "$as_me:7432: \"$ac_try\"") >&5
7435 echo "$as_me:7435: \$? = $ac_status" >&5
7436 (exit "$ac_status"); }; }; then
7439 echo "$as_me: failed program was:" >&5
7440 cat "conftest.$ac_ext" >&5
7443 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7444 echo "$as_me:7444: result: $cf_result" >&5
7445 echo "${ECHO_T}$cf_result" >&6
7446 test "$cf_result" = yes && break
7447 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
7449 elif test "$cf_term_lib" != predefined ; then
7450 echo "$as_me:7450: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
7451 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
7452 cat >"conftest.$ac_ext" <<_ACEOF
7453 #line 7453 "configure"
7454 #include "confdefs.h"
7455 #include <${cf_cv_ncurses_header:-curses.h}>
7459 initscr(); tgoto((char *)0, 0, 0);
7464 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7465 if { (eval echo "$as_me:7465: \"$ac_link\"") >&5
7466 (eval $ac_link) 2>&5
7468 echo "$as_me:7468: \$? = $ac_status" >&5
7469 (exit "$ac_status"); } &&
7470 { ac_try='test -s "conftest$ac_exeext"'
7471 { (eval echo "$as_me:7471: \"$ac_try\"") >&5
7474 echo "$as_me:7474: \$? = $ac_status" >&5
7475 (exit "$ac_status"); }; }; then
7478 echo "$as_me: failed program was:" >&5
7479 cat "conftest.$ac_ext" >&5
7481 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
7482 cat >"conftest.$ac_ext" <<_ACEOF
7483 #line 7483 "configure"
7484 #include "confdefs.h"
7485 #include <${cf_cv_ncurses_header:-curses.h}>
7494 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7495 if { (eval echo "$as_me:7495: \"$ac_link\"") >&5
7496 (eval $ac_link) 2>&5
7498 echo "$as_me:7498: \$? = $ac_status" >&5
7499 (exit "$ac_status"); } &&
7500 { ac_try='test -s "conftest$ac_exeext"'
7501 { (eval echo "$as_me:7501: \"$ac_try\"") >&5
7504 echo "$as_me:7504: \$? = $ac_status" >&5
7505 (exit "$ac_status"); }; }; then
7508 echo "$as_me: failed program was:" >&5
7509 cat "conftest.$ac_ext" >&5
7512 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7515 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7516 echo "$as_me:7516: result: $cf_result" >&5
7517 echo "${ECHO_T}$cf_result" >&6
7518 test "$cf_result" != error && break
7522 test "$cf_curs_lib" = unknown && { { echo "$as_me:7522: error: no curses library found" >&5
7523 echo "$as_me: error: no curses library found" >&2;}
7524 { (exit 1); exit 1; }; }
7531 for ac_header in wchar.h
7533 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7534 echo "$as_me:7534: checking for $ac_header" >&5
7535 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7536 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7537 echo $ECHO_N "(cached) $ECHO_C" >&6
7539 cat >"conftest.$ac_ext" <<_ACEOF
7540 #line 7540 "configure"
7541 #include "confdefs.h"
7542 #include <$ac_header>
7544 if { (eval echo "$as_me:7544: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7545 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7547 $EGREP -v '^ *\+' conftest.er1 >conftest.err
7549 cat conftest.err >&5
7550 echo "$as_me:7550: \$? = $ac_status" >&5
7551 (exit "$ac_status"); } >/dev/null; then
7552 if test -s conftest.err; then
7553 ac_cpp_err=$ac_c_preproc_warn_flag
7560 if test -z "$ac_cpp_err"; then
7561 eval "$as_ac_Header=yes"
7563 echo "$as_me: failed program was:" >&5
7564 cat "conftest.$ac_ext" >&5
7565 eval "$as_ac_Header=no"
7567 rm -f conftest.err "conftest.$ac_ext"
7569 echo "$as_me:7569: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7570 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7571 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7572 cat >>confdefs.h <<EOF
7573 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7579 echo "$as_me:7579: checking for multibyte character support" >&5
7580 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7581 if test "${cf_cv_utf8_lib+set}" = set; then
7582 echo $ECHO_N "(cached) $ECHO_C" >&6
7585 cf_save_LIBS="$LIBS"
7586 cat >"conftest.$ac_ext" <<_ACEOF
7587 #line 7587 "configure"
7588 #include "confdefs.h"
7604 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7605 if { (eval echo "$as_me:7605: \"$ac_link\"") >&5
7606 (eval $ac_link) 2>&5
7608 echo "$as_me:7608: \$? = $ac_status" >&5
7609 (exit "$ac_status"); } &&
7610 { ac_try='test -s "conftest$ac_exeext"'
7611 { (eval echo "$as_me:7611: \"$ac_try\"") >&5
7614 echo "$as_me:7614: \$? = $ac_status" >&5
7615 (exit "$ac_status"); }; }; then
7618 echo "$as_me: failed program was:" >&5
7619 cat "conftest.$ac_ext" >&5
7621 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7622 # will be set on completion of the AC_TRY_LINK below.
7623 cf_cv_header_path_utf8=
7624 cf_cv_library_path_utf8=
7626 echo "${as_me:-configure}:7626: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7628 cf_save_LIBS="$LIBS"
7630 cat >"conftest.$ac_ext" <<_ACEOF
7631 #line 7631 "configure"
7632 #include "confdefs.h"
7634 #include <libutf8.h>
7643 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7644 if { (eval echo "$as_me:7644: \"$ac_link\"") >&5
7645 (eval $ac_link) 2>&5
7647 echo "$as_me:7647: \$? = $ac_status" >&5
7648 (exit "$ac_status"); } &&
7649 { ac_try='test -s "conftest$ac_exeext"'
7650 { (eval echo "$as_me:7650: \"$ac_try\"") >&5
7653 echo "$as_me:7653: \$? = $ac_status" >&5
7654 (exit "$ac_status"); }; }; then
7656 cf_cv_find_linkage_utf8=yes
7657 cf_cv_header_path_utf8=/usr/include
7658 cf_cv_library_path_utf8=/usr/lib
7661 echo "$as_me: failed program was:" >&5
7662 cat "conftest.$ac_ext" >&5
7664 LIBS="-lutf8 $cf_save_LIBS"
7666 cat >"conftest.$ac_ext" <<_ACEOF
7667 #line 7667 "configure"
7668 #include "confdefs.h"
7670 #include <libutf8.h>
7679 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7680 if { (eval echo "$as_me:7680: \"$ac_link\"") >&5
7681 (eval $ac_link) 2>&5
7683 echo "$as_me:7683: \$? = $ac_status" >&5
7684 (exit "$ac_status"); } &&
7685 { ac_try='test -s "conftest$ac_exeext"'
7686 { (eval echo "$as_me:7686: \"$ac_try\"") >&5
7689 echo "$as_me:7689: \$? = $ac_status" >&5
7690 (exit "$ac_status"); }; }; then
7692 cf_cv_find_linkage_utf8=yes
7693 cf_cv_header_path_utf8=/usr/include
7694 cf_cv_library_path_utf8=/usr/lib
7695 cf_cv_library_file_utf8="-lutf8"
7698 echo "$as_me: failed program was:" >&5
7699 cat "conftest.$ac_ext" >&5
7701 cf_cv_find_linkage_utf8=no
7702 LIBS="$cf_save_LIBS"
7704 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
7706 echo "${as_me:-configure}:7706: testing find linkage for utf8 library ..." 1>&5
7708 echo "${as_me:-configure}:7708: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7710 cf_save_CPPFLAGS="$CPPFLAGS"
7711 cf_test_CPPFLAGS="$CPPFLAGS"
7715 # collect the current set of include-directories from compiler flags
7716 cf_header_path_list=""
7717 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7718 for cf_header_path in $CPPFLAGS $CFLAGS
7720 case "$cf_header_path" in
7722 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7724 test "x$cf_header_path" != "xNONE" && \
7725 test -d "$cf_header_path" && \
7727 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7728 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
7729 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
7730 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
7731 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
7732 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7735 cf_header_path_list="$cf_header_path_list $cf_search"
7741 # add the variations for the package we are looking for
7745 test "x$prefix" != "xNONE" && \
7746 test -d "$prefix" && \
7748 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7749 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
7750 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
7751 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
7752 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
7753 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
7756 for cf_subdir_prefix in \
7765 test "x$cf_subdir_prefix" != "x$prefix" && \
7766 test -d "$cf_subdir_prefix" && \
7767 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7768 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7769 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
7770 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
7771 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
7772 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
7773 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
7778 test "$includedir" != NONE && \
7779 test "$includedir" != "/usr/include" && \
7780 test -d "$includedir" && {
7781 test -d "$includedir" && cf_search="$cf_search $includedir"
7782 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
7785 test "$oldincludedir" != NONE && \
7786 test "$oldincludedir" != "/usr/include" && \
7787 test -d "$oldincludedir" && {
7788 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
7789 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
7792 cf_search="$cf_search $cf_header_path_list"
7794 for cf_cv_header_path_utf8 in $cf_search
7796 if test -d "$cf_cv_header_path_utf8" ; then
7797 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
7799 echo "${as_me:-configure}:7799: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7801 CPPFLAGS="$cf_save_CPPFLAGS"
7803 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7804 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
7806 cat >"conftest.$ac_ext" <<_ACEOF
7807 #line 7807 "configure"
7808 #include "confdefs.h"
7810 #include <libutf8.h>
7819 rm -f "conftest.$ac_objext"
7820 if { (eval echo "$as_me:7820: \"$ac_compile\"") >&5
7821 (eval $ac_compile) 2>&5
7823 echo "$as_me:7823: \$? = $ac_status" >&5
7824 (exit "$ac_status"); } &&
7825 { ac_try='test -s "conftest.$ac_objext"'
7826 { (eval echo "$as_me:7826: \"$ac_try\"") >&5
7829 echo "$as_me:7829: \$? = $ac_status" >&5
7830 (exit "$ac_status"); }; }; then
7832 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7834 echo "${as_me:-configure}:7834: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7836 cf_cv_find_linkage_utf8=maybe
7837 cf_test_CPPFLAGS="$CPPFLAGS"
7840 echo "$as_me: failed program was:" >&5
7841 cat "conftest.$ac_ext" >&5
7843 CPPFLAGS="$cf_save_CPPFLAGS"
7846 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7850 if test "$cf_cv_find_linkage_utf8" = maybe ; then
7852 echo "${as_me:-configure}:7852: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7854 cf_save_LIBS="$LIBS"
7855 cf_save_LDFLAGS="$LDFLAGS"
7857 if test "$cf_cv_find_linkage_utf8" != yes ; then
7860 cf_library_path_list=""
7861 if test -n "${LDFLAGS}${LIBS}" ; then
7862 for cf_library_path in $LDFLAGS $LIBS
7864 case "$cf_library_path" in
7866 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7868 test "x$cf_library_path" != "xNONE" && \
7869 test -d "$cf_library_path" && \
7871 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7872 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
7873 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
7874 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7875 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
7876 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7879 cf_library_path_list="$cf_library_path_list $cf_search"
7887 test "x$prefix" != "xNONE" && \
7888 test -d "$prefix" && \
7890 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7891 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
7892 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
7893 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
7894 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
7895 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
7898 for cf_subdir_prefix in \
7907 test "x$cf_subdir_prefix" != "x$prefix" && \
7908 test -d "$cf_subdir_prefix" && \
7909 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7910 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7911 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
7912 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
7913 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
7914 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
7915 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
7920 cf_search="$cf_library_path_list $cf_search"
7922 for cf_cv_library_path_utf8 in $cf_search
7924 if test -d "$cf_cv_library_path_utf8" ; then
7925 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7927 echo "${as_me:-configure}:7927: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7929 CPPFLAGS="$cf_test_CPPFLAGS"
7930 LIBS="-lutf8 $cf_save_LIBS"
7931 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7932 cat >"conftest.$ac_ext" <<_ACEOF
7933 #line 7933 "configure"
7934 #include "confdefs.h"
7936 #include <libutf8.h>
7945 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7946 if { (eval echo "$as_me:7946: \"$ac_link\"") >&5
7947 (eval $ac_link) 2>&5
7949 echo "$as_me:7949: \$? = $ac_status" >&5
7950 (exit "$ac_status"); } &&
7951 { ac_try='test -s "conftest$ac_exeext"'
7952 { (eval echo "$as_me:7952: \"$ac_try\"") >&5
7955 echo "$as_me:7955: \$? = $ac_status" >&5
7956 (exit "$ac_status"); }; }; then
7958 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7960 echo "${as_me:-configure}:7960: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7962 cf_cv_find_linkage_utf8=yes
7963 cf_cv_library_file_utf8="-lutf8"
7966 echo "$as_me: failed program was:" >&5
7967 cat "conftest.$ac_ext" >&5
7969 CPPFLAGS="$cf_save_CPPFLAGS"
7970 LIBS="$cf_save_LIBS"
7971 LDFLAGS="$cf_save_LDFLAGS"
7974 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7977 CPPFLAGS="$cf_save_CPPFLAGS"
7978 LDFLAGS="$cf_save_LDFLAGS"
7982 cf_cv_find_linkage_utf8=no
7986 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7989 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7991 LIBS="$cf_save_LIBS"
7993 if test "$cf_cv_find_linkage_utf8" = yes ; then
7994 cf_cv_utf8_lib=add-on
8000 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8002 echo "$as_me:8002: result: $cf_cv_utf8_lib" >&5
8003 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8005 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8007 if test "$cf_cv_utf8_lib" = "add-on" ; then
8009 cat >>confdefs.h <<\EOF
8010 #define HAVE_LIBUTF8_H 1
8013 if test -n "$cf_cv_header_path_utf8" ; then
8014 for cf_add_incdir in $cf_cv_header_path_utf8
8016 while test "$cf_add_incdir" != /usr/include
8018 if test -d "$cf_add_incdir"
8021 if test -n "$CFLAGS$CPPFLAGS" ; then
8022 # a loop is needed to ensure we can add subdirs of existing dirs
8023 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8024 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8025 cf_have_incdir=yes; break
8030 if test "$cf_have_incdir" = no ; then
8031 if test "$cf_add_incdir" = /usr/local/include ; then
8032 if test "$GCC" = yes
8034 cf_save_CPPFLAGS=$CPPFLAGS
8036 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8037 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8039 cat >"conftest.$ac_ext" <<_ACEOF
8040 #line 8040 "configure"
8041 #include "confdefs.h"
8051 rm -f "conftest.$ac_objext"
8052 if { (eval echo "$as_me:8052: \"$ac_compile\"") >&5
8053 (eval $ac_compile) 2>&5
8055 echo "$as_me:8055: \$? = $ac_status" >&5
8056 (exit "$ac_status"); } &&
8057 { ac_try='test -s "conftest.$ac_objext"'
8058 { (eval echo "$as_me:8058: \"$ac_try\"") >&5
8061 echo "$as_me:8061: \$? = $ac_status" >&5
8062 (exit "$ac_status"); }; }; then
8065 echo "$as_me: failed program was:" >&5
8066 cat "conftest.$ac_ext" >&5
8069 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8070 CPPFLAGS=$cf_save_CPPFLAGS
8075 if test "$cf_have_incdir" = no ; then
8076 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8078 echo "${as_me:-configure}:8078: testing adding $cf_add_incdir to include-path ..." 1>&5
8080 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8082 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8083 test "$cf_top_incdir" = "$cf_add_incdir" && break
8084 cf_add_incdir="$cf_top_incdir"
8095 if test -n "$cf_cv_library_path_utf8" ; then
8096 for cf_add_libdir in $cf_cv_library_path_utf8
8098 if test "$cf_add_libdir" = /usr/lib ; then
8100 elif test -d "$cf_add_libdir"
8103 if test -n "$LDFLAGS$LIBS" ; then
8104 # a loop is needed to ensure we can add subdirs of existing dirs
8105 for cf_test_libdir in $LDFLAGS $LIBS ; do
8106 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8107 cf_have_libdir=yes; break
8111 if test "$cf_have_libdir" = no ; then
8112 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
8114 echo "${as_me:-configure}:8114: testing adding $cf_add_libdir to library-path ..." 1>&5
8116 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8125 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8127 for cf_add_1lib in $cf_add_0lib; do
8128 for cf_add_2lib in $cf_add_libs; do
8129 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8134 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8140 cf_ncuconfig_root=$cf_cv_screen
8141 cf_have_ncuconfig=no
8143 if test "x${PKG_CONFIG:=none}" != xnone; then
8144 echo "$as_me:8144: checking pkg-config for $cf_ncuconfig_root" >&5
8145 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
8146 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
8147 echo "$as_me:8147: result: yes" >&5
8148 echo "${ECHO_T}yes" >&6
8150 echo "$as_me:8150: checking if the $cf_ncuconfig_root package files work" >&5
8151 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
8152 cf_have_ncuconfig=unknown
8154 cf_save_CFLAGS="$CFLAGS"
8155 cf_save_CPPFLAGS="$CPPFLAGS"
8156 cf_save_LIBS="$LIBS"
8158 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
8159 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
8161 # while -W for passing linker flags is prevalent, it is not "standard".
8162 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
8163 # incompatible _and_ non-standard -W option which gives an error. Work
8164 # around that pitfall.
8165 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
8171 cf_new_extra_cppflags=
8173 for cf_add_cflags in $cf_pkg_cflags
8175 case "$cf_fix_cppflags" in
8177 case "$cf_add_cflags" in
8178 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8179 case "$cf_add_cflags" in
8181 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8183 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8184 && test -z "${cf_tst_cflags}" \
8185 && cf_fix_cppflags=yes
8187 if test "$cf_fix_cppflags" = yes ; then
8189 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8190 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8193 elif test "${cf_tst_cflags}" = "\"'" ; then
8195 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8196 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8206 case "$cf_add_cflags" in
8208 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8210 CPPFLAGS=`echo "$CPPFLAGS" | \
8211 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8212 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8217 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8218 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8225 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8226 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8233 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8234 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8236 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8238 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8239 && test -z "${cf_tst_cflags}" \
8240 && cf_fix_cppflags=no
8245 if test -n "$cf_new_cflags" ; then
8247 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8248 CFLAGS="${CFLAGS}$cf_new_cflags"
8252 if test -n "$cf_new_cppflags" ; then
8254 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8255 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8259 if test -n "$cf_new_extra_cppflags" ; then
8261 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8262 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8269 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8271 for cf_add_1lib in $cf_add_0lib; do
8272 for cf_add_2lib in $cf_add_libs; do
8273 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8278 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8282 cat >"conftest.$ac_ext" <<_ACEOF
8283 #line 8283 "configure"
8284 #include "confdefs.h"
8285 #include <${cf_cv_ncurses_header:-curses.h}>
8289 initscr(); mousemask(0,0); tigetstr((char *)0);
8294 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8295 if { (eval echo "$as_me:8295: \"$ac_link\"") >&5
8296 (eval $ac_link) 2>&5
8298 echo "$as_me:8298: \$? = $ac_status" >&5
8299 (exit "$ac_status"); } &&
8300 { ac_try='test -s "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 if test "$cross_compiling" = yes; then
8307 cf_test_ncuconfig=maybe
8309 cat >"conftest.$ac_ext" <<_ACEOF
8310 #line 8310 "configure"
8311 #include "confdefs.h"
8312 #include <${cf_cv_ncurses_header:-curses.h}>
8314 { const char *xx = curses_version(); return (xx == 0); }
8316 rm -f "conftest$ac_exeext"
8317 if { (eval echo "$as_me:8317: \"$ac_link\"") >&5
8318 (eval $ac_link) 2>&5
8320 echo "$as_me:8320: \$? = $ac_status" >&5
8321 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8322 { (eval echo "$as_me:8322: \"$ac_try\"") >&5
8325 echo "$as_me:8325: \$? = $ac_status" >&5
8326 (exit "$ac_status"); }; }; then
8327 cf_test_ncuconfig=yes
8329 echo "$as_me: program exited with status $ac_status" >&5
8330 echo "$as_me: failed program was:" >&5
8331 cat "conftest.$ac_ext" >&5
8332 cf_test_ncuconfig=no
8334 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8337 echo "$as_me: failed program was:" >&5
8338 cat "conftest.$ac_ext" >&5
8339 cf_test_ncuconfig=no
8341 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8343 CFLAGS="$cf_save_CFLAGS"
8344 CPPFLAGS="$cf_save_CPPFLAGS"
8345 LIBS="$cf_save_LIBS"
8347 if test "x$cf_test_ncuconfig" != xyes; then
8348 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
8349 cf_pkg_cflags="$cf_temp"
8350 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
8351 cf_pkg_libs="$cf_temp"
8356 for cf_add_cflags in $cf_pkg_cflags
8359 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8360 cf_old_cflag="$CFLAGS"
8364 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
8366 (*$cf_add_cflags\ *)
8367 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
8370 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
8374 if test "$CFLAGS" != "$cf_old_cflag" ;
8377 CFLAGS="$cf_new_cflag"
8380 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8381 cf_old_cflag="$CPPFLAGS"
8385 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
8387 (*$cf_add_cflags\ *)
8388 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
8391 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
8395 if test "$CPPFLAGS" != "$cf_old_cflag" ;
8398 CPPFLAGS="$cf_new_cflag"
8406 cf_new_extra_cppflags=
8408 for cf_add_cflags in $cf_pkg_cflags
8410 case "$cf_fix_cppflags" in
8412 case "$cf_add_cflags" in
8413 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8414 case "$cf_add_cflags" in
8416 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8418 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8419 && test -z "${cf_tst_cflags}" \
8420 && cf_fix_cppflags=yes
8422 if test "$cf_fix_cppflags" = yes ; then
8424 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8425 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8428 elif test "${cf_tst_cflags}" = "\"'" ; then
8430 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8431 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8441 case "$cf_add_cflags" in
8443 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8445 CPPFLAGS=`echo "$CPPFLAGS" | \
8446 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8447 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8452 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8453 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8460 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8461 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8468 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8469 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8471 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8473 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8474 && test -z "${cf_tst_cflags}" \
8475 && cf_fix_cppflags=no
8480 if test -n "$cf_new_cflags" ; then
8482 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8483 CFLAGS="${CFLAGS}$cf_new_cflags"
8487 if test -n "$cf_new_cppflags" ; then
8489 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8490 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8494 if test -n "$cf_new_extra_cppflags" ; then
8496 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8497 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8504 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8506 for cf_add_1lib in $cf_add_0lib; do
8507 for cf_add_2lib in $cf_add_libs; do
8508 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8513 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8517 cat >"conftest.$ac_ext" <<_ACEOF
8518 #line 8518 "configure"
8519 #include "confdefs.h"
8520 #include <${cf_cv_ncurses_header:-curses.h}>
8524 initscr(); mousemask(0,0); tigetstr((char *)0);
8529 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8530 if { (eval echo "$as_me:8530: \"$ac_link\"") >&5
8531 (eval $ac_link) 2>&5
8533 echo "$as_me:8533: \$? = $ac_status" >&5
8534 (exit "$ac_status"); } &&
8535 { ac_try='test -s "conftest$ac_exeext"'
8536 { (eval echo "$as_me:8536: \"$ac_try\"") >&5
8539 echo "$as_me:8539: \$? = $ac_status" >&5
8540 (exit "$ac_status"); }; }; then
8541 if test "$cross_compiling" = yes; then
8542 cf_have_ncuconfig=maybe
8544 cat >"conftest.$ac_ext" <<_ACEOF
8545 #line 8545 "configure"
8546 #include "confdefs.h"
8547 #include <${cf_cv_ncurses_header:-curses.h}>
8549 { const char *xx = curses_version(); return (xx == 0); }
8551 rm -f "conftest$ac_exeext"
8552 if { (eval echo "$as_me:8552: \"$ac_link\"") >&5
8553 (eval $ac_link) 2>&5
8555 echo "$as_me:8555: \$? = $ac_status" >&5
8556 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8557 { (eval echo "$as_me:8557: \"$ac_try\"") >&5
8560 echo "$as_me:8560: \$? = $ac_status" >&5
8561 (exit "$ac_status"); }; }; then
8562 cf_have_ncuconfig=yes
8564 echo "$as_me: program exited with status $ac_status" >&5
8565 echo "$as_me: failed program was:" >&5
8566 cat "conftest.$ac_ext" >&5
8567 cf_have_ncuconfig=no
8569 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8572 echo "$as_me: failed program was:" >&5
8573 cat "conftest.$ac_ext" >&5
8574 cf_have_ncuconfig=no
8576 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8577 echo "$as_me:8577: result: $cf_have_ncuconfig" >&5
8578 echo "${ECHO_T}$cf_have_ncuconfig" >&6
8579 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
8580 if test "$cf_have_ncuconfig" != "yes"
8582 CPPFLAGS="$cf_save_CPPFLAGS"
8583 LIBS="$cf_save_LIBS"
8584 NCURSES_CONFIG_PKG=none
8587 cat >>confdefs.h <<\EOF
8591 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
8593 echo "$as_me:8593: checking for terminfo header" >&5
8594 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8595 if test "${cf_cv_term_header+set}" = set; then
8596 echo $ECHO_N "(cached) $ECHO_C" >&6
8599 case "${cf_cv_ncurses_header}" in
8600 (*/ncurses.h|*/ncursesw.h)
8601 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8604 cf_term_header=term.h
8608 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8610 cat >"conftest.$ac_ext" <<_ACEOF
8611 #line 8611 "configure"
8612 #include "confdefs.h"
8614 #include <${cf_cv_ncurses_header:-curses.h}>
8620 int x = auto_left_margin; (void)x
8625 rm -f "conftest.$ac_objext"
8626 if { (eval echo "$as_me:8626: \"$ac_compile\"") >&5
8627 (eval $ac_compile) 2>&5
8629 echo "$as_me:8629: \$? = $ac_status" >&5
8630 (exit "$ac_status"); } &&
8631 { ac_try='test -s "conftest.$ac_objext"'
8632 { (eval echo "$as_me:8632: \"$ac_try\"") >&5
8635 echo "$as_me:8635: \$? = $ac_status" >&5
8636 (exit "$ac_status"); }; }; then
8638 cf_cv_term_header="$cf_test"
8640 echo "$as_me: failed program was:" >&5
8641 cat "conftest.$ac_ext" >&5
8643 cf_cv_term_header=unknown
8646 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8647 test "$cf_cv_term_header" != unknown && break
8651 echo "$as_me:8651: result: $cf_cv_term_header" >&5
8652 echo "${ECHO_T}$cf_cv_term_header" >&6
8654 # Set definitions to allow ifdef'ing to accommodate subdirectories
8656 case "$cf_cv_term_header" in
8659 cat >>confdefs.h <<\EOF
8660 #define HAVE_TERM_H 1
8666 case "$cf_cv_term_header" in
8669 cat >>confdefs.h <<\EOF
8670 #define HAVE_NCURSES_TERM_H 1
8676 cat >>confdefs.h <<\EOF
8677 #define HAVE_NCURSESW_TERM_H 1
8686 echo "$as_me:8686: result: no" >&5
8687 echo "${ECHO_T}no" >&6
8688 NCURSES_CONFIG_PKG=none
8691 NCURSES_CONFIG_PKG=none
8694 if test "x$cf_have_ncuconfig" = "xno"; then
8695 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
8697 if test -n "$ac_tool_prefix"; then
8698 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8700 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8701 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8702 echo "$as_me:8702: checking for $ac_word" >&5
8703 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8704 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8705 echo $ECHO_N "(cached) $ECHO_C" >&6
8707 if test -n "$NCURSES_CONFIG"; then
8708 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8710 ac_save_IFS=$IFS; IFS=$ac_path_separator
8712 for ac_dir in $ac_dummy; do
8714 test -z "$ac_dir" && ac_dir=.
8715 $as_executable_p "$ac_dir/$ac_word" || continue
8716 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8717 echo "$as_me:8717: found $ac_dir/$ac_word" >&5
8723 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8724 if test -n "$NCURSES_CONFIG"; then
8725 echo "$as_me:8725: result: $NCURSES_CONFIG" >&5
8726 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8728 echo "$as_me:8728: result: no" >&5
8729 echo "${ECHO_T}no" >&6
8732 test -n "$NCURSES_CONFIG" && break
8735 if test -z "$NCURSES_CONFIG"; then
8736 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8737 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8739 # Extract the first word of "$ac_prog", so it can be a program name with args.
8740 set dummy $ac_prog; ac_word=$2
8741 echo "$as_me:8741: checking for $ac_word" >&5
8742 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8743 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8744 echo $ECHO_N "(cached) $ECHO_C" >&6
8746 if test -n "$ac_ct_NCURSES_CONFIG"; then
8747 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8749 ac_save_IFS=$IFS; IFS=$ac_path_separator
8751 for ac_dir in $ac_dummy; do
8753 test -z "$ac_dir" && ac_dir=.
8754 $as_executable_p "$ac_dir/$ac_word" || continue
8755 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8756 echo "$as_me:8756: found $ac_dir/$ac_word" >&5
8762 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8763 if test -n "$ac_ct_NCURSES_CONFIG"; then
8764 echo "$as_me:8764: result: $ac_ct_NCURSES_CONFIG" >&5
8765 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8767 echo "$as_me:8767: result: no" >&5
8768 echo "${ECHO_T}no" >&6
8771 test -n "$ac_ct_NCURSES_CONFIG" && break
8773 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8775 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8778 if test "$NCURSES_CONFIG" != none ; then
8780 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
8783 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8784 cf_old_cflag="$CFLAGS"
8788 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
8790 (*$cf_add_cflags\ *)
8791 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
8794 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
8798 if test "$CFLAGS" != "$cf_old_cflag" ;
8801 CFLAGS="$cf_new_cflag"
8804 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8805 cf_old_cflag="$CPPFLAGS"
8809 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
8811 (*$cf_add_cflags\ *)
8812 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
8815 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
8819 if test "$CPPFLAGS" != "$cf_old_cflag" ;
8822 CPPFLAGS="$cf_new_cflag"
8830 cf_new_extra_cppflags=
8832 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
8834 case "$cf_fix_cppflags" in
8836 case "$cf_add_cflags" in
8837 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8838 case "$cf_add_cflags" in
8840 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8842 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8843 && test -z "${cf_tst_cflags}" \
8844 && cf_fix_cppflags=yes
8846 if test "$cf_fix_cppflags" = yes ; then
8848 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8849 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8852 elif test "${cf_tst_cflags}" = "\"'" ; then
8854 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8855 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8865 case "$cf_add_cflags" in
8867 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8869 CPPFLAGS=`echo "$CPPFLAGS" | \
8870 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8871 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8876 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8877 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8884 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8885 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8892 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8893 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8895 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8897 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8898 && test -z "${cf_tst_cflags}" \
8899 && cf_fix_cppflags=no
8904 if test -n "$cf_new_cflags" ; then
8906 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8907 CFLAGS="${CFLAGS}$cf_new_cflags"
8911 if test -n "$cf_new_cppflags" ; then
8913 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8914 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8918 if test -n "$cf_new_extra_cppflags" ; then
8920 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8921 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8928 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8930 for cf_add_1lib in $cf_add_0lib; do
8931 for cf_add_2lib in $cf_add_libs; do
8932 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8937 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8941 # even with config script, some packages use no-override for curses.h
8943 echo "$as_me:8943: checking if we have identified curses headers" >&5
8944 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8945 if test "${cf_cv_ncurses_header+set}" = set; then
8946 echo $ECHO_N "(cached) $ECHO_C" >&6
8949 cf_cv_ncurses_header=none
8951 ncurses.h $cf_cv_screen/ncurses.h \
8952 curses.h $cf_cv_screen/curses.h
8954 cat >"conftest.$ac_ext" <<_ACEOF
8955 #line 8955 "configure"
8956 #include "confdefs.h"
8957 #include <${cf_header}>
8961 initscr(); tgoto("?", 0,0)
8966 rm -f "conftest.$ac_objext"
8967 if { (eval echo "$as_me:8967: \"$ac_compile\"") >&5
8968 (eval $ac_compile) 2>&5
8970 echo "$as_me:8970: \$? = $ac_status" >&5
8971 (exit "$ac_status"); } &&
8972 { ac_try='test -s "conftest.$ac_objext"'
8973 { (eval echo "$as_me:8973: \"$ac_try\"") >&5
8976 echo "$as_me:8976: \$? = $ac_status" >&5
8977 (exit "$ac_status"); }; }; then
8978 cf_cv_ncurses_header=$cf_header; break
8980 echo "$as_me: failed program was:" >&5
8981 cat "conftest.$ac_ext" >&5
8983 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8987 echo "$as_me:8987: result: $cf_cv_ncurses_header" >&5
8988 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8990 if test "$cf_cv_ncurses_header" = none ; then
8991 { { echo "$as_me:8991: error: No curses header-files found" >&5
8992 echo "$as_me: error: No curses header-files found" >&2;}
8993 { (exit 1); exit 1; }; }
8996 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8998 for ac_header in $cf_cv_ncurses_header
9000 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9001 echo "$as_me:9001: checking for $ac_header" >&5
9002 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9003 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9004 echo $ECHO_N "(cached) $ECHO_C" >&6
9006 cat >"conftest.$ac_ext" <<_ACEOF
9007 #line 9007 "configure"
9008 #include "confdefs.h"
9009 #include <$ac_header>
9011 if { (eval echo "$as_me:9011: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9012 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9014 $EGREP -v '^ *\+' conftest.er1 >conftest.err
9016 cat conftest.err >&5
9017 echo "$as_me:9017: \$? = $ac_status" >&5
9018 (exit "$ac_status"); } >/dev/null; then
9019 if test -s conftest.err; then
9020 ac_cpp_err=$ac_c_preproc_warn_flag
9027 if test -z "$ac_cpp_err"; then
9028 eval "$as_ac_Header=yes"
9030 echo "$as_me: failed program was:" >&5
9031 cat "conftest.$ac_ext" >&5
9032 eval "$as_ac_Header=no"
9034 rm -f conftest.err "conftest.$ac_ext"
9036 echo "$as_me:9036: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9037 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9038 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9039 cat >>confdefs.h <<EOF
9040 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9046 cat >>confdefs.h <<\EOF
9050 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9052 cat >>confdefs.h <<EOF
9053 #define $cf_nculib_ROOT 1
9056 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
9060 cf_ncuhdr_root=$cf_cv_screen
9062 test -n "$cf_cv_curses_dir" && \
9063 test "$cf_cv_curses_dir" != "no" && { \
9065 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
9066 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
9068 while test "$cf_add_incdir" != /usr/include
9070 if test -d "$cf_add_incdir"
9073 if test -n "$CFLAGS$CPPFLAGS" ; then
9074 # a loop is needed to ensure we can add subdirs of existing dirs
9075 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9076 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9077 cf_have_incdir=yes; break
9082 if test "$cf_have_incdir" = no ; then
9083 if test "$cf_add_incdir" = /usr/local/include ; then
9084 if test "$GCC" = yes
9086 cf_save_CPPFLAGS=$CPPFLAGS
9088 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9089 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9091 cat >"conftest.$ac_ext" <<_ACEOF
9092 #line 9092 "configure"
9093 #include "confdefs.h"
9103 rm -f "conftest.$ac_objext"
9104 if { (eval echo "$as_me:9104: \"$ac_compile\"") >&5
9105 (eval $ac_compile) 2>&5
9107 echo "$as_me:9107: \$? = $ac_status" >&5
9108 (exit "$ac_status"); } &&
9109 { ac_try='test -s "conftest.$ac_objext"'
9110 { (eval echo "$as_me:9110: \"$ac_try\"") >&5
9113 echo "$as_me:9113: \$? = $ac_status" >&5
9114 (exit "$ac_status"); }; }; then
9117 echo "$as_me: failed program was:" >&5
9118 cat "conftest.$ac_ext" >&5
9121 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9122 CPPFLAGS=$cf_save_CPPFLAGS
9127 if test "$cf_have_incdir" = no ; then
9128 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9130 echo "${as_me:-configure}:9130: testing adding $cf_add_incdir to include-path ..." 1>&5
9132 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9134 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9135 test "$cf_top_incdir" = "$cf_add_incdir" && break
9136 cf_add_incdir="$cf_top_incdir"
9149 echo "$as_me:9149: checking for $cf_ncuhdr_root header in include-path" >&5
9150 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
9151 if test "${cf_cv_ncurses_h+set}" = set; then
9152 echo $ECHO_N "(cached) $ECHO_C" >&6
9155 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
9156 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
9157 for cf_header in $cf_header_list
9160 cat >"conftest.$ac_ext" <<_ACEOF
9161 #line 9161 "configure"
9162 #include "confdefs.h"
9164 #include <$cf_header>
9169 #ifdef NCURSES_VERSION
9171 printf("%s\\n", NCURSES_VERSION);
9184 rm -f "conftest.$ac_objext"
9185 if { (eval echo "$as_me:9185: \"$ac_compile\"") >&5
9186 (eval $ac_compile) 2>&5
9188 echo "$as_me:9188: \$? = $ac_status" >&5
9189 (exit "$ac_status"); } &&
9190 { ac_try='test -s "conftest.$ac_objext"'
9191 { (eval echo "$as_me:9191: \"$ac_try\"") >&5
9194 echo "$as_me:9194: \$? = $ac_status" >&5
9195 (exit "$ac_status"); }; }; then
9196 cf_cv_ncurses_h=$cf_header
9199 echo "$as_me: failed program was:" >&5
9200 cat "conftest.$ac_ext" >&5
9203 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9205 test "$cf_cv_ncurses_h" != no && break
9209 echo "$as_me:9209: result: $cf_cv_ncurses_h" >&5
9210 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
9212 if test "$cf_cv_ncurses_h" != no ; then
9213 cf_cv_ncurses_header=$cf_cv_ncurses_h
9216 echo "$as_me:9216: checking for $cf_ncuhdr_root include-path" >&5
9217 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
9218 if test "${cf_cv_ncurses_h2+set}" = set; then
9219 echo $ECHO_N "(cached) $ECHO_C" >&6
9222 test -n "$verbose" && echo
9226 # collect the current set of include-directories from compiler flags
9227 cf_header_path_list=""
9228 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9229 for cf_header_path in $CPPFLAGS $CFLAGS
9231 case "$cf_header_path" in
9233 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9235 test "x$cf_header_path" != "xNONE" && \
9236 test -d "$cf_header_path" && \
9238 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
9239 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
9240 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
9241 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
9242 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
9243 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"
9246 cf_header_path_list="$cf_header_path_list $cf_search"
9252 # add the variations for the package we are looking for
9256 test "x$prefix" != "xNONE" && \
9257 test -d "$prefix" && \
9259 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
9260 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
9261 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
9262 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
9263 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
9264 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9267 for cf_subdir_prefix in \
9276 test "x$cf_subdir_prefix" != "x$prefix" && \
9277 test -d "$cf_subdir_prefix" && \
9278 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9279 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
9280 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
9281 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
9282 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
9283 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
9284 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"
9289 test "$includedir" != NONE && \
9290 test "$includedir" != "/usr/include" && \
9291 test -d "$includedir" && {
9292 test -d "$includedir" && cf_search="$cf_search $includedir"
9293 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
9296 test "$oldincludedir" != NONE && \
9297 test "$oldincludedir" != "/usr/include" && \
9298 test -d "$oldincludedir" && {
9299 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
9300 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
9303 cf_search="$cf_search $cf_header_path_list"
9305 test -n "$verbose" && echo "search path $cf_search"
9306 cf_save2_CPPFLAGS="$CPPFLAGS"
9307 for cf_incdir in $cf_search
9310 if test -n "$cf_incdir" ; then
9311 for cf_add_incdir in $cf_incdir
9313 while test "$cf_add_incdir" != /usr/include
9315 if test -d "$cf_add_incdir"
9318 if test -n "$CFLAGS$CPPFLAGS" ; then
9319 # a loop is needed to ensure we can add subdirs of existing dirs
9320 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9321 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9322 cf_have_incdir=yes; break
9327 if test "$cf_have_incdir" = no ; then
9328 if test "$cf_add_incdir" = /usr/local/include ; then
9329 if test "$GCC" = yes
9331 cf_save_CPPFLAGS=$CPPFLAGS
9333 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9334 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9336 cat >"conftest.$ac_ext" <<_ACEOF
9337 #line 9337 "configure"
9338 #include "confdefs.h"
9348 rm -f "conftest.$ac_objext"
9349 if { (eval echo "$as_me:9349: \"$ac_compile\"") >&5
9350 (eval $ac_compile) 2>&5
9352 echo "$as_me:9352: \$? = $ac_status" >&5
9353 (exit "$ac_status"); } &&
9354 { ac_try='test -s "conftest.$ac_objext"'
9355 { (eval echo "$as_me:9355: \"$ac_try\"") >&5
9358 echo "$as_me:9358: \$? = $ac_status" >&5
9359 (exit "$ac_status"); }; }; then
9362 echo "$as_me: failed program was:" >&5
9363 cat "conftest.$ac_ext" >&5
9366 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9367 CPPFLAGS=$cf_save_CPPFLAGS
9372 if test "$cf_have_incdir" = no ; then
9373 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9375 echo "${as_me:-configure}:9375: testing adding $cf_add_incdir to include-path ..." 1>&5
9377 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9379 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9380 test "$cf_top_incdir" = "$cf_add_incdir" && break
9381 cf_add_incdir="$cf_top_incdir"
9397 cat >"conftest.$ac_ext" <<_ACEOF
9398 #line 9398 "configure"
9399 #include "confdefs.h"
9401 #include <$cf_header>
9406 #ifdef NCURSES_VERSION
9408 printf("%s\\n", NCURSES_VERSION);
9421 rm -f "conftest.$ac_objext"
9422 if { (eval echo "$as_me:9422: \"$ac_compile\"") >&5
9423 (eval $ac_compile) 2>&5
9425 echo "$as_me:9425: \$? = $ac_status" >&5
9426 (exit "$ac_status"); } &&
9427 { ac_try='test -s "conftest.$ac_objext"'
9428 { (eval echo "$as_me:9428: \"$ac_try\"") >&5
9431 echo "$as_me:9431: \$? = $ac_status" >&5
9432 (exit "$ac_status"); }; }; then
9433 cf_cv_ncurses_h2=$cf_header
9436 echo "$as_me: failed program was:" >&5
9437 cat "conftest.$ac_ext" >&5
9440 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9442 if test "$cf_cv_ncurses_h2" != no ; then
9443 cf_cv_ncurses_h2=$cf_incdir/$cf_header
9444 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
9447 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
9449 CPPFLAGS="$cf_save2_CPPFLAGS"
9450 test "$cf_cv_ncurses_h2" != no && break
9452 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9452: error: not found" >&5
9453 echo "$as_me: error: not found" >&2;}
9454 { (exit 1); exit 1; }; }
9457 echo "$as_me:9457: result: $cf_cv_ncurses_h2" >&5
9458 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
9460 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
9461 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
9462 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
9463 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
9466 if test -n "$cf_1st_incdir" ; then
9467 for cf_add_incdir in $cf_1st_incdir
9469 while test "$cf_add_incdir" != /usr/include
9471 if test -d "$cf_add_incdir"
9474 if test -n "$CFLAGS$CPPFLAGS" ; then
9475 # a loop is needed to ensure we can add subdirs of existing dirs
9476 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9477 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9478 cf_have_incdir=yes; break
9483 if test "$cf_have_incdir" = no ; then
9484 if test "$cf_add_incdir" = /usr/local/include ; then
9485 if test "$GCC" = yes
9487 cf_save_CPPFLAGS=$CPPFLAGS
9489 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9490 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9492 cat >"conftest.$ac_ext" <<_ACEOF
9493 #line 9493 "configure"
9494 #include "confdefs.h"
9504 rm -f "conftest.$ac_objext"
9505 if { (eval echo "$as_me:9505: \"$ac_compile\"") >&5
9506 (eval $ac_compile) 2>&5
9508 echo "$as_me:9508: \$? = $ac_status" >&5
9509 (exit "$ac_status"); } &&
9510 { ac_try='test -s "conftest.$ac_objext"'
9511 { (eval echo "$as_me:9511: \"$ac_try\"") >&5
9514 echo "$as_me:9514: \$? = $ac_status" >&5
9515 (exit "$ac_status"); }; }; then
9518 echo "$as_me: failed program was:" >&5
9519 cat "conftest.$ac_ext" >&5
9522 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9523 CPPFLAGS=$cf_save_CPPFLAGS
9528 if test "$cf_have_incdir" = no ; then
9529 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9531 echo "${as_me:-configure}:9531: testing adding $cf_add_incdir to include-path ..." 1>&5
9533 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9535 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9536 test "$cf_top_incdir" = "$cf_add_incdir" && break
9537 cf_add_incdir="$cf_top_incdir"
9550 # Set definitions to allow ifdef'ing for ncurses.h
9552 case "$cf_cv_ncurses_header" in
9555 cat >>confdefs.h <<\EOF
9556 #define HAVE_NCURSES_H 1
9562 case "$cf_cv_ncurses_header" in
9563 (ncurses/curses.h|ncurses/ncurses.h)
9565 cat >>confdefs.h <<\EOF
9566 #define HAVE_NCURSES_NCURSES_H 1
9570 (ncursesw/curses.h|ncursesw/ncurses.h)
9572 cat >>confdefs.h <<\EOF
9573 #define HAVE_NCURSESW_NCURSES_H 1
9579 echo "$as_me:9579: checking for terminfo header" >&5
9580 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9581 if test "${cf_cv_term_header+set}" = set; then
9582 echo $ECHO_N "(cached) $ECHO_C" >&6
9585 case "${cf_cv_ncurses_header}" in
9586 (*/ncurses.h|*/ncursesw.h)
9587 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9590 cf_term_header=term.h
9594 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9596 cat >"conftest.$ac_ext" <<_ACEOF
9597 #line 9597 "configure"
9598 #include "confdefs.h"
9600 #include <${cf_cv_ncurses_header:-curses.h}>
9606 int x = auto_left_margin; (void)x
9611 rm -f "conftest.$ac_objext"
9612 if { (eval echo "$as_me:9612: \"$ac_compile\"") >&5
9613 (eval $ac_compile) 2>&5
9615 echo "$as_me:9615: \$? = $ac_status" >&5
9616 (exit "$ac_status"); } &&
9617 { ac_try='test -s "conftest.$ac_objext"'
9618 { (eval echo "$as_me:9618: \"$ac_try\"") >&5
9621 echo "$as_me:9621: \$? = $ac_status" >&5
9622 (exit "$ac_status"); }; }; then
9624 cf_cv_term_header="$cf_test"
9626 echo "$as_me: failed program was:" >&5
9627 cat "conftest.$ac_ext" >&5
9629 cf_cv_term_header=unknown
9632 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9633 test "$cf_cv_term_header" != unknown && break
9637 echo "$as_me:9637: result: $cf_cv_term_header" >&5
9638 echo "${ECHO_T}$cf_cv_term_header" >&6
9640 # Set definitions to allow ifdef'ing to accommodate subdirectories
9642 case "$cf_cv_term_header" in
9645 cat >>confdefs.h <<\EOF
9646 #define HAVE_TERM_H 1
9652 case "$cf_cv_term_header" in
9655 cat >>confdefs.h <<\EOF
9656 #define HAVE_NCURSES_TERM_H 1
9662 cat >>confdefs.h <<\EOF
9663 #define HAVE_NCURSESW_TERM_H 1
9669 # some applications need this, but should check for NCURSES_VERSION
9671 cat >>confdefs.h <<\EOF
9675 echo "$as_me:9675: checking for ncurses version" >&5
9676 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9677 if test "${cf_cv_ncurses_version+set}" = set; then
9678 echo $ECHO_N "(cached) $ECHO_C" >&6
9681 cf_cv_ncurses_version=no
9683 rm -f "$cf_tempfile"
9684 if test "$cross_compiling" = yes; then
9686 # This will not work if the preprocessor splits the line after the
9687 # Autoconf token. The 'unproto' program does that.
9688 cat > "conftest.$ac_ext" <<EOF
9689 #include <${cf_cv_ncurses_header:-curses.h}>
9691 #ifdef NCURSES_VERSION
9692 Autoconf NCURSES_VERSION
9700 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9701 { (eval echo "$as_me:9701: \"$cf_try\"") >&5
9704 echo "$as_me:9704: \$? = $ac_status" >&5
9705 (exit "$ac_status"); }
9706 if test -f conftest.out ; then
9707 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
9708 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9713 cat >"conftest.$ac_ext" <<_ACEOF
9714 #line 9714 "configure"
9715 #include "confdefs.h"
9717 #include <${cf_cv_ncurses_header:-curses.h}>
9721 FILE *fp = fopen("$cf_tempfile", "w");
9722 #ifdef NCURSES_VERSION
9723 # ifdef NCURSES_VERSION_PATCH
9724 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9726 fprintf(fp, "%s\\n", NCURSES_VERSION);
9730 fprintf(fp, "old\\n");
9735 ${cf_cv_main_return:-return}(0);
9738 rm -f "conftest$ac_exeext"
9739 if { (eval echo "$as_me:9739: \"$ac_link\"") >&5
9740 (eval $ac_link) 2>&5
9742 echo "$as_me:9742: \$? = $ac_status" >&5
9743 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9744 { (eval echo "$as_me:9744: \"$ac_try\"") >&5
9747 echo "$as_me:9747: \$? = $ac_status" >&5
9748 (exit "$ac_status"); }; }; then
9750 cf_cv_ncurses_version=`cat $cf_tempfile`
9752 echo "$as_me: program exited with status $ac_status" >&5
9753 echo "$as_me: failed program was:" >&5
9754 cat "conftest.$ac_ext" >&5
9756 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9758 rm -f "$cf_tempfile"
9761 echo "$as_me:9761: result: $cf_cv_ncurses_version" >&5
9762 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9763 test "$cf_cv_ncurses_version" = no ||
9764 cat >>confdefs.h <<\EOF
9768 cf_nculib_root=$cf_cv_screen
9769 # This works, except for the special case where we find gpm, but
9770 # ncurses is in a nonstandard location via $LIBS, and we really want
9773 cf_ncurses_SAVE="$LIBS"
9774 echo "$as_me:9774: checking for Gpm_Open in -lgpm" >&5
9775 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9776 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9777 echo $ECHO_N "(cached) $ECHO_C" >&6
9779 ac_check_lib_save_LIBS=$LIBS
9781 cat >"conftest.$ac_ext" <<_ACEOF
9782 #line 9782 "configure"
9783 #include "confdefs.h"
9785 /* Override any gcc2 internal prototype to avoid an error. */
9789 /* We use char because int might match the return type of a gcc2
9790 builtin and then its argument prototype would still apply. */
9800 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9801 if { (eval echo "$as_me:9801: \"$ac_link\"") >&5
9802 (eval $ac_link) 2>&5
9804 echo "$as_me:9804: \$? = $ac_status" >&5
9805 (exit "$ac_status"); } &&
9806 { ac_try='test -s "conftest$ac_exeext"'
9807 { (eval echo "$as_me:9807: \"$ac_try\"") >&5
9810 echo "$as_me:9810: \$? = $ac_status" >&5
9811 (exit "$ac_status"); }; }; then
9812 ac_cv_lib_gpm_Gpm_Open=yes
9814 echo "$as_me: failed program was:" >&5
9815 cat "conftest.$ac_ext" >&5
9816 ac_cv_lib_gpm_Gpm_Open=no
9818 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9819 LIBS=$ac_check_lib_save_LIBS
9821 echo "$as_me:9821: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9822 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9823 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
9824 echo "$as_me:9824: checking for initscr in -lgpm" >&5
9825 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9826 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9827 echo $ECHO_N "(cached) $ECHO_C" >&6
9829 ac_check_lib_save_LIBS=$LIBS
9831 cat >"conftest.$ac_ext" <<_ACEOF
9832 #line 9832 "configure"
9833 #include "confdefs.h"
9835 /* Override any gcc2 internal prototype to avoid an error. */
9839 /* We use char because int might match the return type of a gcc2
9840 builtin and then its argument prototype would still apply. */
9850 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9851 if { (eval echo "$as_me:9851: \"$ac_link\"") >&5
9852 (eval $ac_link) 2>&5
9854 echo "$as_me:9854: \$? = $ac_status" >&5
9855 (exit "$ac_status"); } &&
9856 { ac_try='test -s "conftest$ac_exeext"'
9857 { (eval echo "$as_me:9857: \"$ac_try\"") >&5
9860 echo "$as_me:9860: \$? = $ac_status" >&5
9861 (exit "$ac_status"); }; }; then
9862 ac_cv_lib_gpm_initscr=yes
9864 echo "$as_me: failed program was:" >&5
9865 cat "conftest.$ac_ext" >&5
9866 ac_cv_lib_gpm_initscr=no
9868 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9869 LIBS=$ac_check_lib_save_LIBS
9871 echo "$as_me:9871: result: $ac_cv_lib_gpm_initscr" >&5
9872 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9873 if test "$ac_cv_lib_gpm_initscr" = yes; then
9874 LIBS="$cf_ncurses_SAVE"
9876 cf_ncurses_LIBS="-lgpm"
9883 # This is only necessary if you are linking against an obsolete
9884 # version of ncurses (but it should do no harm, since it's static).
9885 if test "$cf_nculib_root" = ncurses ; then
9886 echo "$as_me:9886: checking for tgoto in -lmytinfo" >&5
9887 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9888 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9889 echo $ECHO_N "(cached) $ECHO_C" >&6
9891 ac_check_lib_save_LIBS=$LIBS
9892 LIBS="-lmytinfo $LIBS"
9893 cat >"conftest.$ac_ext" <<_ACEOF
9894 #line 9894 "configure"
9895 #include "confdefs.h"
9897 /* Override any gcc2 internal prototype to avoid an error. */
9901 /* We use char because int might match the return type of a gcc2
9902 builtin and then its argument prototype would still apply. */
9912 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9913 if { (eval echo "$as_me:9913: \"$ac_link\"") >&5
9914 (eval $ac_link) 2>&5
9916 echo "$as_me:9916: \$? = $ac_status" >&5
9917 (exit "$ac_status"); } &&
9918 { ac_try='test -s "conftest$ac_exeext"'
9919 { (eval echo "$as_me:9919: \"$ac_try\"") >&5
9922 echo "$as_me:9922: \$? = $ac_status" >&5
9923 (exit "$ac_status"); }; }; then
9924 ac_cv_lib_mytinfo_tgoto=yes
9926 echo "$as_me: failed program was:" >&5
9927 cat "conftest.$ac_ext" >&5
9928 ac_cv_lib_mytinfo_tgoto=no
9930 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9931 LIBS=$ac_check_lib_save_LIBS
9933 echo "$as_me:9933: result: $ac_cv_lib_mytinfo_tgoto" >&5
9934 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9935 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
9936 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9946 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9948 for cf_add_1lib in $cf_add_0lib; do
9949 for cf_add_2lib in $cf_add_libs; do
9950 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9955 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9959 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
9965 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9967 for cf_add_1lib in $cf_add_0lib; do
9968 for cf_add_2lib in $cf_add_libs; do
9969 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9974 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9980 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
9982 echo "$as_me:9982: checking for initscr" >&5
9983 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9984 if test "${ac_cv_func_initscr+set}" = set; then
9985 echo $ECHO_N "(cached) $ECHO_C" >&6
9987 cat >"conftest.$ac_ext" <<_ACEOF
9988 #line 9988 "configure"
9989 #include "confdefs.h"
9990 #define initscr autoconf_temporary
9991 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9998 /* We use char because int might match the return type of a gcc2
9999 builtin and then its argument prototype would still apply. */
10000 char initscr (void);
10006 /* The GNU C library defines stubs for functions which it implements
10007 to always fail with ENOSYS. Some functions are actually named
10008 something starting with __ and the normal name is an alias. */
10009 #if defined (__stub_initscr) || defined (__stub___initscr)
10010 #error found stub for initscr
10018 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10019 if { (eval echo "$as_me:10019: \"$ac_link\"") >&5
10020 (eval $ac_link) 2>&5
10022 echo "$as_me:10022: \$? = $ac_status" >&5
10023 (exit "$ac_status"); } &&
10024 { ac_try='test -s "conftest$ac_exeext"'
10025 { (eval echo "$as_me:10025: \"$ac_try\"") >&5
10026 (eval $ac_try) 2>&5
10028 echo "$as_me:10028: \$? = $ac_status" >&5
10029 (exit "$ac_status"); }; }; then
10030 ac_cv_func_initscr=yes
10032 echo "$as_me: failed program was:" >&5
10033 cat "conftest.$ac_ext" >&5
10034 ac_cv_func_initscr=no
10036 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10038 echo "$as_me:10038: result: $ac_cv_func_initscr" >&5
10039 echo "${ECHO_T}$ac_cv_func_initscr" >&6
10040 if test "$ac_cv_func_initscr" = yes; then
10041 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10044 cf_save_LIBS="$LIBS"
10045 echo "$as_me:10045: checking for initscr in -l$cf_nculib_root" >&5
10046 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
10047 LIBS="-l$cf_nculib_root $LIBS"
10048 cat >"conftest.$ac_ext" <<_ACEOF
10049 #line 10049 "configure"
10050 #include "confdefs.h"
10051 #include <${cf_cv_ncurses_header:-curses.h}>
10060 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10061 if { (eval echo "$as_me:10061: \"$ac_link\"") >&5
10062 (eval $ac_link) 2>&5
10064 echo "$as_me:10064: \$? = $ac_status" >&5
10065 (exit "$ac_status"); } &&
10066 { ac_try='test -s "conftest$ac_exeext"'
10067 { (eval echo "$as_me:10067: \"$ac_try\"") >&5
10068 (eval $ac_try) 2>&5
10070 echo "$as_me:10070: \$? = $ac_status" >&5
10071 (exit "$ac_status"); }; }; then
10072 echo "$as_me:10072: result: yes" >&5
10073 echo "${ECHO_T}yes" >&6
10074 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10077 echo "$as_me: failed program was:" >&5
10078 cat "conftest.$ac_ext" >&5
10079 echo "$as_me:10079: result: no" >&5
10080 echo "${ECHO_T}no" >&6
10083 cf_library_path_list=""
10084 if test -n "${LDFLAGS}${LIBS}" ; then
10085 for cf_library_path in $LDFLAGS $LIBS
10087 case "$cf_library_path" in
10089 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10091 test "x$cf_library_path" != "xNONE" && \
10092 test -d "$cf_library_path" && \
10094 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
10095 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
10096 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
10097 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
10098 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
10099 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"
10102 cf_library_path_list="$cf_library_path_list $cf_search"
10110 test "x$prefix" != "xNONE" && \
10111 test -d "$prefix" && \
10113 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
10114 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
10115 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
10116 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
10117 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
10118 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
10121 for cf_subdir_prefix in \
10130 test "x$cf_subdir_prefix" != "x$prefix" && \
10131 test -d "$cf_subdir_prefix" && \
10132 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10133 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
10134 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
10135 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
10136 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
10137 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
10138 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"
10143 cf_search="$cf_library_path_list $cf_search"
10145 for cf_libdir in $cf_search
10147 echo "$as_me:10147: checking for -l$cf_nculib_root in $cf_libdir" >&5
10148 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
10149 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
10150 cat >"conftest.$ac_ext" <<_ACEOF
10151 #line 10151 "configure"
10152 #include "confdefs.h"
10153 #include <${cf_cv_ncurses_header:-curses.h}>
10162 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10163 if { (eval echo "$as_me:10163: \"$ac_link\"") >&5
10164 (eval $ac_link) 2>&5
10166 echo "$as_me:10166: \$? = $ac_status" >&5
10167 (exit "$ac_status"); } &&
10168 { ac_try='test -s "conftest$ac_exeext"'
10169 { (eval echo "$as_me:10169: \"$ac_try\"") >&5
10170 (eval $ac_try) 2>&5
10172 echo "$as_me:10172: \$? = $ac_status" >&5
10173 (exit "$ac_status"); }; }; then
10174 echo "$as_me:10174: result: yes" >&5
10175 echo "${ECHO_T}yes" >&6
10176 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10179 echo "$as_me: failed program was:" >&5
10180 cat "conftest.$ac_ext" >&5
10181 echo "$as_me:10181: result: no" >&5
10182 echo "${ECHO_T}no" >&6
10183 LIBS="$cf_save_LIBS"
10185 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10189 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10193 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
10195 if test "$cf_found_library" = no ; then
10196 { { echo "$as_me:10196: error: Cannot link $cf_nculib_root library" >&5
10197 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
10198 { (exit 1); exit 1; }; }
10203 if test -n "$cf_ncurses_LIBS" ; then
10204 echo "$as_me:10204: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
10205 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
10206 cf_ncurses_SAVE="$LIBS"
10207 for p in $cf_ncurses_LIBS ; do
10208 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
10209 if test "$q" != "$LIBS" ; then
10213 cat >"conftest.$ac_ext" <<_ACEOF
10214 #line 10214 "configure"
10215 #include "confdefs.h"
10216 #include <${cf_cv_ncurses_header:-curses.h}>
10220 initscr(); mousemask(0,0); tigetstr((char *)0);
10225 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10226 if { (eval echo "$as_me:10226: \"$ac_link\"") >&5
10227 (eval $ac_link) 2>&5
10229 echo "$as_me:10229: \$? = $ac_status" >&5
10230 (exit "$ac_status"); } &&
10231 { ac_try='test -s "conftest$ac_exeext"'
10232 { (eval echo "$as_me:10232: \"$ac_try\"") >&5
10233 (eval $ac_try) 2>&5
10235 echo "$as_me:10235: \$? = $ac_status" >&5
10236 (exit "$ac_status"); }; }; then
10237 echo "$as_me:10237: result: yes" >&5
10238 echo "${ECHO_T}yes" >&6
10240 echo "$as_me: failed program was:" >&5
10241 cat "conftest.$ac_ext" >&5
10242 echo "$as_me:10242: result: no" >&5
10243 echo "${ECHO_T}no" >&6
10244 LIBS="$cf_ncurses_SAVE"
10246 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10249 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10251 cat >>confdefs.h <<EOF
10252 #define $cf_nculib_ROOT 1
10257 NCURSES_CONFIG=none
10263 cf_ncuconfig_root=$cf_cv_screen
10264 cf_have_ncuconfig=no
10266 if test "x${PKG_CONFIG:=none}" != xnone; then
10267 echo "$as_me:10267: checking pkg-config for $cf_ncuconfig_root" >&5
10268 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
10269 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
10270 echo "$as_me:10270: result: yes" >&5
10271 echo "${ECHO_T}yes" >&6
10273 echo "$as_me:10273: checking if the $cf_ncuconfig_root package files work" >&5
10274 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
10275 cf_have_ncuconfig=unknown
10277 cf_save_CFLAGS="$CFLAGS"
10278 cf_save_CPPFLAGS="$CPPFLAGS"
10279 cf_save_LIBS="$LIBS"
10281 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
10282 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
10284 # while -W for passing linker flags is prevalent, it is not "standard".
10285 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
10286 # incompatible _and_ non-standard -W option which gives an error. Work
10287 # around that pitfall.
10288 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
10294 cf_new_extra_cppflags=
10296 for cf_add_cflags in $cf_pkg_cflags
10298 case "$cf_fix_cppflags" in
10300 case "$cf_add_cflags" in
10301 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10302 case "$cf_add_cflags" in
10304 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10306 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10307 && test -z "${cf_tst_cflags}" \
10308 && cf_fix_cppflags=yes
10310 if test "$cf_fix_cppflags" = yes ; then
10312 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10313 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10316 elif test "${cf_tst_cflags}" = "\"'" ; then
10318 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10319 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10325 case "$CPPFLAGS" in
10329 case "$cf_add_cflags" in
10331 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10333 CPPFLAGS=`echo "$CPPFLAGS" | \
10334 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10335 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10340 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10341 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10348 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10349 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10356 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10357 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10359 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10361 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10362 && test -z "${cf_tst_cflags}" \
10363 && cf_fix_cppflags=no
10368 if test -n "$cf_new_cflags" ; then
10370 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10371 CFLAGS="${CFLAGS}$cf_new_cflags"
10375 if test -n "$cf_new_cppflags" ; then
10377 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10378 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10382 if test -n "$cf_new_extra_cppflags" ; then
10384 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10385 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10389 cf_add_libs="$LIBS"
10392 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10393 # filter duplicates
10394 for cf_add_1lib in $cf_add_0lib; do
10395 for cf_add_2lib in $cf_add_libs; do
10396 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10401 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10403 LIBS="$cf_add_libs"
10405 cat >"conftest.$ac_ext" <<_ACEOF
10406 #line 10406 "configure"
10407 #include "confdefs.h"
10408 #include <${cf_cv_ncurses_header:-curses.h}>
10412 initscr(); mousemask(0,0); tigetstr((char *)0);
10417 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10418 if { (eval echo "$as_me:10418: \"$ac_link\"") >&5
10419 (eval $ac_link) 2>&5
10421 echo "$as_me:10421: \$? = $ac_status" >&5
10422 (exit "$ac_status"); } &&
10423 { ac_try='test -s "conftest$ac_exeext"'
10424 { (eval echo "$as_me:10424: \"$ac_try\"") >&5
10425 (eval $ac_try) 2>&5
10427 echo "$as_me:10427: \$? = $ac_status" >&5
10428 (exit "$ac_status"); }; }; then
10429 if test "$cross_compiling" = yes; then
10430 cf_test_ncuconfig=maybe
10432 cat >"conftest.$ac_ext" <<_ACEOF
10433 #line 10433 "configure"
10434 #include "confdefs.h"
10435 #include <${cf_cv_ncurses_header:-curses.h}>
10437 { const char *xx = curses_version(); return (xx == 0); }
10439 rm -f "conftest$ac_exeext"
10440 if { (eval echo "$as_me:10440: \"$ac_link\"") >&5
10441 (eval $ac_link) 2>&5
10443 echo "$as_me:10443: \$? = $ac_status" >&5
10444 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10445 { (eval echo "$as_me:10445: \"$ac_try\"") >&5
10446 (eval $ac_try) 2>&5
10448 echo "$as_me:10448: \$? = $ac_status" >&5
10449 (exit "$ac_status"); }; }; then
10450 cf_test_ncuconfig=yes
10452 echo "$as_me: program exited with status $ac_status" >&5
10453 echo "$as_me: failed program was:" >&5
10454 cat "conftest.$ac_ext" >&5
10455 cf_test_ncuconfig=no
10457 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10460 echo "$as_me: failed program was:" >&5
10461 cat "conftest.$ac_ext" >&5
10462 cf_test_ncuconfig=no
10464 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10466 CFLAGS="$cf_save_CFLAGS"
10467 CPPFLAGS="$cf_save_CPPFLAGS"
10468 LIBS="$cf_save_LIBS"
10470 if test "x$cf_test_ncuconfig" != xyes; then
10471 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
10472 cf_pkg_cflags="$cf_temp"
10473 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
10474 cf_pkg_libs="$cf_temp"
10479 for cf_add_cflags in $cf_pkg_cflags
10482 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10483 cf_old_cflag="$CFLAGS"
10486 (*$cf_add_cflags=*)
10487 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
10489 (*$cf_add_cflags\ *)
10490 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
10493 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
10497 if test "$CFLAGS" != "$cf_old_cflag" ;
10500 CFLAGS="$cf_new_cflag"
10503 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10504 cf_old_cflag="$CPPFLAGS"
10506 case "$CPPFLAGS" in
10507 (*$cf_add_cflags=*)
10508 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
10510 (*$cf_add_cflags\ *)
10511 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
10514 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
10518 if test "$CPPFLAGS" != "$cf_old_cflag" ;
10521 CPPFLAGS="$cf_new_cflag"
10529 cf_new_extra_cppflags=
10531 for cf_add_cflags in $cf_pkg_cflags
10533 case "$cf_fix_cppflags" in
10535 case "$cf_add_cflags" in
10536 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10537 case "$cf_add_cflags" in
10539 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10541 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10542 && test -z "${cf_tst_cflags}" \
10543 && cf_fix_cppflags=yes
10545 if test "$cf_fix_cppflags" = yes ; then
10547 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10548 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10551 elif test "${cf_tst_cflags}" = "\"'" ; then
10553 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10554 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10560 case "$CPPFLAGS" in
10564 case "$cf_add_cflags" in
10566 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10568 CPPFLAGS=`echo "$CPPFLAGS" | \
10569 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10570 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10575 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10576 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10583 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10584 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10591 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10592 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10594 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10596 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10597 && test -z "${cf_tst_cflags}" \
10598 && cf_fix_cppflags=no
10603 if test -n "$cf_new_cflags" ; then
10605 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10606 CFLAGS="${CFLAGS}$cf_new_cflags"
10610 if test -n "$cf_new_cppflags" ; then
10612 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10613 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10617 if test -n "$cf_new_extra_cppflags" ; then
10619 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10620 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10624 cf_add_libs="$LIBS"
10627 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10628 # filter duplicates
10629 for cf_add_1lib in $cf_add_0lib; do
10630 for cf_add_2lib in $cf_add_libs; do
10631 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10636 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10638 LIBS="$cf_add_libs"
10640 cat >"conftest.$ac_ext" <<_ACEOF
10641 #line 10641 "configure"
10642 #include "confdefs.h"
10643 #include <${cf_cv_ncurses_header:-curses.h}>
10647 initscr(); mousemask(0,0); tigetstr((char *)0);
10652 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10653 if { (eval echo "$as_me:10653: \"$ac_link\"") >&5
10654 (eval $ac_link) 2>&5
10656 echo "$as_me:10656: \$? = $ac_status" >&5
10657 (exit "$ac_status"); } &&
10658 { ac_try='test -s "conftest$ac_exeext"'
10659 { (eval echo "$as_me:10659: \"$ac_try\"") >&5
10660 (eval $ac_try) 2>&5
10662 echo "$as_me:10662: \$? = $ac_status" >&5
10663 (exit "$ac_status"); }; }; then
10664 if test "$cross_compiling" = yes; then
10665 cf_have_ncuconfig=maybe
10667 cat >"conftest.$ac_ext" <<_ACEOF
10668 #line 10668 "configure"
10669 #include "confdefs.h"
10670 #include <${cf_cv_ncurses_header:-curses.h}>
10672 { const char *xx = curses_version(); return (xx == 0); }
10674 rm -f "conftest$ac_exeext"
10675 if { (eval echo "$as_me:10675: \"$ac_link\"") >&5
10676 (eval $ac_link) 2>&5
10678 echo "$as_me:10678: \$? = $ac_status" >&5
10679 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10680 { (eval echo "$as_me:10680: \"$ac_try\"") >&5
10681 (eval $ac_try) 2>&5
10683 echo "$as_me:10683: \$? = $ac_status" >&5
10684 (exit "$ac_status"); }; }; then
10685 cf_have_ncuconfig=yes
10687 echo "$as_me: program exited with status $ac_status" >&5
10688 echo "$as_me: failed program was:" >&5
10689 cat "conftest.$ac_ext" >&5
10690 cf_have_ncuconfig=no
10692 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10695 echo "$as_me: failed program was:" >&5
10696 cat "conftest.$ac_ext" >&5
10697 cf_have_ncuconfig=no
10699 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10700 echo "$as_me:10700: result: $cf_have_ncuconfig" >&5
10701 echo "${ECHO_T}$cf_have_ncuconfig" >&6
10702 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
10703 if test "$cf_have_ncuconfig" != "yes"
10705 CPPFLAGS="$cf_save_CPPFLAGS"
10706 LIBS="$cf_save_LIBS"
10707 NCURSES_CONFIG_PKG=none
10710 cat >>confdefs.h <<\EOF
10714 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
10716 echo "$as_me:10716: checking for terminfo header" >&5
10717 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10718 if test "${cf_cv_term_header+set}" = set; then
10719 echo $ECHO_N "(cached) $ECHO_C" >&6
10722 case "${cf_cv_ncurses_header}" in
10723 (*/ncurses.h|*/ncursesw.h)
10724 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10727 cf_term_header=term.h
10731 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10733 cat >"conftest.$ac_ext" <<_ACEOF
10734 #line 10734 "configure"
10735 #include "confdefs.h"
10737 #include <${cf_cv_ncurses_header:-curses.h}>
10738 #include <$cf_test>
10743 int x = auto_left_margin; (void)x
10748 rm -f "conftest.$ac_objext"
10749 if { (eval echo "$as_me:10749: \"$ac_compile\"") >&5
10750 (eval $ac_compile) 2>&5
10752 echo "$as_me:10752: \$? = $ac_status" >&5
10753 (exit "$ac_status"); } &&
10754 { ac_try='test -s "conftest.$ac_objext"'
10755 { (eval echo "$as_me:10755: \"$ac_try\"") >&5
10756 (eval $ac_try) 2>&5
10758 echo "$as_me:10758: \$? = $ac_status" >&5
10759 (exit "$ac_status"); }; }; then
10761 cf_cv_term_header="$cf_test"
10763 echo "$as_me: failed program was:" >&5
10764 cat "conftest.$ac_ext" >&5
10766 cf_cv_term_header=unknown
10769 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10770 test "$cf_cv_term_header" != unknown && break
10774 echo "$as_me:10774: result: $cf_cv_term_header" >&5
10775 echo "${ECHO_T}$cf_cv_term_header" >&6
10777 # Set definitions to allow ifdef'ing to accommodate subdirectories
10779 case "$cf_cv_term_header" in
10782 cat >>confdefs.h <<\EOF
10783 #define HAVE_TERM_H 1
10789 case "$cf_cv_term_header" in
10792 cat >>confdefs.h <<\EOF
10793 #define HAVE_NCURSES_TERM_H 1
10799 cat >>confdefs.h <<\EOF
10800 #define HAVE_NCURSESW_TERM_H 1
10809 echo "$as_me:10809: result: no" >&5
10810 echo "${ECHO_T}no" >&6
10811 NCURSES_CONFIG_PKG=none
10814 NCURSES_CONFIG_PKG=none
10817 if test "x$cf_have_ncuconfig" = "xno"; then
10818 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
10820 if test -n "$ac_tool_prefix"; then
10821 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10823 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
10824 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
10825 echo "$as_me:10825: checking for $ac_word" >&5
10826 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10827 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
10828 echo $ECHO_N "(cached) $ECHO_C" >&6
10830 if test -n "$NCURSES_CONFIG"; then
10831 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
10833 ac_save_IFS=$IFS; IFS=$ac_path_separator
10835 for ac_dir in $ac_dummy; do
10837 test -z "$ac_dir" && ac_dir=.
10838 $as_executable_p "$ac_dir/$ac_word" || continue
10839 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
10840 echo "$as_me:10840: found $ac_dir/$ac_word" >&5
10846 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
10847 if test -n "$NCURSES_CONFIG"; then
10848 echo "$as_me:10848: result: $NCURSES_CONFIG" >&5
10849 echo "${ECHO_T}$NCURSES_CONFIG" >&6
10851 echo "$as_me:10851: result: no" >&5
10852 echo "${ECHO_T}no" >&6
10855 test -n "$NCURSES_CONFIG" && break
10858 if test -z "$NCURSES_CONFIG"; then
10859 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
10860 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10862 # Extract the first word of "$ac_prog", so it can be a program name with args.
10863 set dummy $ac_prog; ac_word=$2
10864 echo "$as_me:10864: checking for $ac_word" >&5
10865 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10866 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
10867 echo $ECHO_N "(cached) $ECHO_C" >&6
10869 if test -n "$ac_ct_NCURSES_CONFIG"; then
10870 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
10872 ac_save_IFS=$IFS; IFS=$ac_path_separator
10874 for ac_dir in $ac_dummy; do
10876 test -z "$ac_dir" && ac_dir=.
10877 $as_executable_p "$ac_dir/$ac_word" || continue
10878 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
10879 echo "$as_me:10879: found $ac_dir/$ac_word" >&5
10885 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
10886 if test -n "$ac_ct_NCURSES_CONFIG"; then
10887 echo "$as_me:10887: result: $ac_ct_NCURSES_CONFIG" >&5
10888 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
10890 echo "$as_me:10890: result: no" >&5
10891 echo "${ECHO_T}no" >&6
10894 test -n "$ac_ct_NCURSES_CONFIG" && break
10896 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
10898 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
10901 if test "$NCURSES_CONFIG" != none ; then
10903 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
10906 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10907 cf_old_cflag="$CFLAGS"
10910 (*$cf_add_cflags=*)
10911 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
10913 (*$cf_add_cflags\ *)
10914 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
10917 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
10921 if test "$CFLAGS" != "$cf_old_cflag" ;
10924 CFLAGS="$cf_new_cflag"
10927 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10928 cf_old_cflag="$CPPFLAGS"
10930 case "$CPPFLAGS" in
10931 (*$cf_add_cflags=*)
10932 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
10934 (*$cf_add_cflags\ *)
10935 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
10938 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
10942 if test "$CPPFLAGS" != "$cf_old_cflag" ;
10945 CPPFLAGS="$cf_new_cflag"
10953 cf_new_extra_cppflags=
10955 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
10957 case "$cf_fix_cppflags" in
10959 case "$cf_add_cflags" in
10960 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10961 case "$cf_add_cflags" in
10963 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10965 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10966 && test -z "${cf_tst_cflags}" \
10967 && cf_fix_cppflags=yes
10969 if test "$cf_fix_cppflags" = yes ; then
10971 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10972 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10975 elif test "${cf_tst_cflags}" = "\"'" ; then
10977 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10978 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10984 case "$CPPFLAGS" in
10988 case "$cf_add_cflags" in
10990 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10992 CPPFLAGS=`echo "$CPPFLAGS" | \
10993 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10994 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10999 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11000 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11007 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11008 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11015 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11016 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11018 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11020 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11021 && test -z "${cf_tst_cflags}" \
11022 && cf_fix_cppflags=no
11027 if test -n "$cf_new_cflags" ; then
11029 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11030 CFLAGS="${CFLAGS}$cf_new_cflags"
11034 if test -n "$cf_new_cppflags" ; then
11036 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11037 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11041 if test -n "$cf_new_extra_cppflags" ; then
11043 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11044 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11048 cf_add_libs="$LIBS"
11051 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11052 # filter duplicates
11053 for cf_add_1lib in $cf_add_0lib; do
11054 for cf_add_2lib in $cf_add_libs; do
11055 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11060 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11062 LIBS="$cf_add_libs"
11064 # even with config script, some packages use no-override for curses.h
11066 echo "$as_me:11066: checking if we have identified curses headers" >&5
11067 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
11068 if test "${cf_cv_ncurses_header+set}" = set; then
11069 echo $ECHO_N "(cached) $ECHO_C" >&6
11072 cf_cv_ncurses_header=none
11074 ncurses.h $cf_cv_screen/ncurses.h \
11075 curses.h $cf_cv_screen/curses.h
11077 cat >"conftest.$ac_ext" <<_ACEOF
11078 #line 11078 "configure"
11079 #include "confdefs.h"
11080 #include <${cf_header}>
11084 initscr(); tgoto("?", 0,0)
11089 rm -f "conftest.$ac_objext"
11090 if { (eval echo "$as_me:11090: \"$ac_compile\"") >&5
11091 (eval $ac_compile) 2>&5
11093 echo "$as_me:11093: \$? = $ac_status" >&5
11094 (exit "$ac_status"); } &&
11095 { ac_try='test -s "conftest.$ac_objext"'
11096 { (eval echo "$as_me:11096: \"$ac_try\"") >&5
11097 (eval $ac_try) 2>&5
11099 echo "$as_me:11099: \$? = $ac_status" >&5
11100 (exit "$ac_status"); }; }; then
11101 cf_cv_ncurses_header=$cf_header; break
11103 echo "$as_me: failed program was:" >&5
11104 cat "conftest.$ac_ext" >&5
11106 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11110 echo "$as_me:11110: result: $cf_cv_ncurses_header" >&5
11111 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
11113 if test "$cf_cv_ncurses_header" = none ; then
11114 { { echo "$as_me:11114: error: No curses header-files found" >&5
11115 echo "$as_me: error: No curses header-files found" >&2;}
11116 { (exit 1); exit 1; }; }
11119 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
11121 for ac_header in $cf_cv_ncurses_header
11123 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11124 echo "$as_me:11124: checking for $ac_header" >&5
11125 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11126 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11127 echo $ECHO_N "(cached) $ECHO_C" >&6
11129 cat >"conftest.$ac_ext" <<_ACEOF
11130 #line 11130 "configure"
11131 #include "confdefs.h"
11132 #include <$ac_header>
11134 if { (eval echo "$as_me:11134: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11135 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11137 $EGREP -v '^ *\+' conftest.er1 >conftest.err
11139 cat conftest.err >&5
11140 echo "$as_me:11140: \$? = $ac_status" >&5
11141 (exit "$ac_status"); } >/dev/null; then
11142 if test -s conftest.err; then
11143 ac_cpp_err=$ac_c_preproc_warn_flag
11150 if test -z "$ac_cpp_err"; then
11151 eval "$as_ac_Header=yes"
11153 echo "$as_me: failed program was:" >&5
11154 cat "conftest.$ac_ext" >&5
11155 eval "$as_ac_Header=no"
11157 rm -f conftest.err "conftest.$ac_ext"
11159 echo "$as_me:11159: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11160 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11161 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11162 cat >>confdefs.h <<EOF
11163 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11169 cat >>confdefs.h <<\EOF
11173 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11175 cat >>confdefs.h <<EOF
11176 #define $cf_nculib_ROOT 1
11179 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
11183 cf_ncuhdr_root=$cf_cv_screen
11185 test -n "$cf_cv_curses_dir" && \
11186 test "$cf_cv_curses_dir" != "no" && { \
11188 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
11189 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
11191 while test "$cf_add_incdir" != /usr/include
11193 if test -d "$cf_add_incdir"
11196 if test -n "$CFLAGS$CPPFLAGS" ; then
11197 # a loop is needed to ensure we can add subdirs of existing dirs
11198 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11199 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11200 cf_have_incdir=yes; break
11205 if test "$cf_have_incdir" = no ; then
11206 if test "$cf_add_incdir" = /usr/local/include ; then
11207 if test "$GCC" = yes
11209 cf_save_CPPFLAGS=$CPPFLAGS
11211 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11212 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11214 cat >"conftest.$ac_ext" <<_ACEOF
11215 #line 11215 "configure"
11216 #include "confdefs.h"
11226 rm -f "conftest.$ac_objext"
11227 if { (eval echo "$as_me:11227: \"$ac_compile\"") >&5
11228 (eval $ac_compile) 2>&5
11230 echo "$as_me:11230: \$? = $ac_status" >&5
11231 (exit "$ac_status"); } &&
11232 { ac_try='test -s "conftest.$ac_objext"'
11233 { (eval echo "$as_me:11233: \"$ac_try\"") >&5
11234 (eval $ac_try) 2>&5
11236 echo "$as_me:11236: \$? = $ac_status" >&5
11237 (exit "$ac_status"); }; }; then
11240 echo "$as_me: failed program was:" >&5
11241 cat "conftest.$ac_ext" >&5
11244 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11245 CPPFLAGS=$cf_save_CPPFLAGS
11250 if test "$cf_have_incdir" = no ; then
11251 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11253 echo "${as_me:-configure}:11253: testing adding $cf_add_incdir to include-path ..." 1>&5
11255 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11257 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11258 test "$cf_top_incdir" = "$cf_add_incdir" && break
11259 cf_add_incdir="$cf_top_incdir"
11272 echo "$as_me:11272: checking for $cf_ncuhdr_root header in include-path" >&5
11273 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
11274 if test "${cf_cv_ncurses_h+set}" = set; then
11275 echo $ECHO_N "(cached) $ECHO_C" >&6
11278 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
11279 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
11280 for cf_header in $cf_header_list
11283 cat >"conftest.$ac_ext" <<_ACEOF
11284 #line 11284 "configure"
11285 #include "confdefs.h"
11287 #include <$cf_header>
11292 #ifdef NCURSES_VERSION
11294 printf("%s\\n", NCURSES_VERSION);
11307 rm -f "conftest.$ac_objext"
11308 if { (eval echo "$as_me:11308: \"$ac_compile\"") >&5
11309 (eval $ac_compile) 2>&5
11311 echo "$as_me:11311: \$? = $ac_status" >&5
11312 (exit "$ac_status"); } &&
11313 { ac_try='test -s "conftest.$ac_objext"'
11314 { (eval echo "$as_me:11314: \"$ac_try\"") >&5
11315 (eval $ac_try) 2>&5
11317 echo "$as_me:11317: \$? = $ac_status" >&5
11318 (exit "$ac_status"); }; }; then
11319 cf_cv_ncurses_h=$cf_header
11322 echo "$as_me: failed program was:" >&5
11323 cat "conftest.$ac_ext" >&5
11326 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11328 test "$cf_cv_ncurses_h" != no && break
11332 echo "$as_me:11332: result: $cf_cv_ncurses_h" >&5
11333 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
11335 if test "$cf_cv_ncurses_h" != no ; then
11336 cf_cv_ncurses_header=$cf_cv_ncurses_h
11339 echo "$as_me:11339: checking for $cf_ncuhdr_root include-path" >&5
11340 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
11341 if test "${cf_cv_ncurses_h2+set}" = set; then
11342 echo $ECHO_N "(cached) $ECHO_C" >&6
11345 test -n "$verbose" && echo
11349 # collect the current set of include-directories from compiler flags
11350 cf_header_path_list=""
11351 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11352 for cf_header_path in $CPPFLAGS $CFLAGS
11354 case "$cf_header_path" in
11356 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11358 test "x$cf_header_path" != "xNONE" && \
11359 test -d "$cf_header_path" && \
11361 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
11362 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
11363 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
11364 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
11365 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
11366 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"
11369 cf_header_path_list="$cf_header_path_list $cf_search"
11375 # add the variations for the package we are looking for
11379 test "x$prefix" != "xNONE" && \
11380 test -d "$prefix" && \
11382 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
11383 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
11384 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
11385 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
11386 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
11387 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
11390 for cf_subdir_prefix in \
11399 test "x$cf_subdir_prefix" != "x$prefix" && \
11400 test -d "$cf_subdir_prefix" && \
11401 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11402 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
11403 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
11404 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
11405 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
11406 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
11407 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"
11412 test "$includedir" != NONE && \
11413 test "$includedir" != "/usr/include" && \
11414 test -d "$includedir" && {
11415 test -d "$includedir" && cf_search="$cf_search $includedir"
11416 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
11419 test "$oldincludedir" != NONE && \
11420 test "$oldincludedir" != "/usr/include" && \
11421 test -d "$oldincludedir" && {
11422 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
11423 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
11426 cf_search="$cf_search $cf_header_path_list"
11428 test -n "$verbose" && echo "search path $cf_search"
11429 cf_save2_CPPFLAGS="$CPPFLAGS"
11430 for cf_incdir in $cf_search
11433 if test -n "$cf_incdir" ; then
11434 for cf_add_incdir in $cf_incdir
11436 while test "$cf_add_incdir" != /usr/include
11438 if test -d "$cf_add_incdir"
11441 if test -n "$CFLAGS$CPPFLAGS" ; then
11442 # a loop is needed to ensure we can add subdirs of existing dirs
11443 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11444 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11445 cf_have_incdir=yes; break
11450 if test "$cf_have_incdir" = no ; then
11451 if test "$cf_add_incdir" = /usr/local/include ; then
11452 if test "$GCC" = yes
11454 cf_save_CPPFLAGS=$CPPFLAGS
11456 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11457 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11459 cat >"conftest.$ac_ext" <<_ACEOF
11460 #line 11460 "configure"
11461 #include "confdefs.h"
11471 rm -f "conftest.$ac_objext"
11472 if { (eval echo "$as_me:11472: \"$ac_compile\"") >&5
11473 (eval $ac_compile) 2>&5
11475 echo "$as_me:11475: \$? = $ac_status" >&5
11476 (exit "$ac_status"); } &&
11477 { ac_try='test -s "conftest.$ac_objext"'
11478 { (eval echo "$as_me:11478: \"$ac_try\"") >&5
11479 (eval $ac_try) 2>&5
11481 echo "$as_me:11481: \$? = $ac_status" >&5
11482 (exit "$ac_status"); }; }; then
11485 echo "$as_me: failed program was:" >&5
11486 cat "conftest.$ac_ext" >&5
11489 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11490 CPPFLAGS=$cf_save_CPPFLAGS
11495 if test "$cf_have_incdir" = no ; then
11496 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11498 echo "${as_me:-configure}:11498: testing adding $cf_add_incdir to include-path ..." 1>&5
11500 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11502 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11503 test "$cf_top_incdir" = "$cf_add_incdir" && break
11504 cf_add_incdir="$cf_top_incdir"
11520 cat >"conftest.$ac_ext" <<_ACEOF
11521 #line 11521 "configure"
11522 #include "confdefs.h"
11524 #include <$cf_header>
11529 #ifdef NCURSES_VERSION
11531 printf("%s\\n", NCURSES_VERSION);
11544 rm -f "conftest.$ac_objext"
11545 if { (eval echo "$as_me:11545: \"$ac_compile\"") >&5
11546 (eval $ac_compile) 2>&5
11548 echo "$as_me:11548: \$? = $ac_status" >&5
11549 (exit "$ac_status"); } &&
11550 { ac_try='test -s "conftest.$ac_objext"'
11551 { (eval echo "$as_me:11551: \"$ac_try\"") >&5
11552 (eval $ac_try) 2>&5
11554 echo "$as_me:11554: \$? = $ac_status" >&5
11555 (exit "$ac_status"); }; }; then
11556 cf_cv_ncurses_h2=$cf_header
11559 echo "$as_me: failed program was:" >&5
11560 cat "conftest.$ac_ext" >&5
11561 cf_cv_ncurses_h2=no
11563 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11565 if test "$cf_cv_ncurses_h2" != no ; then
11566 cf_cv_ncurses_h2=$cf_incdir/$cf_header
11567 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
11570 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
11572 CPPFLAGS="$cf_save2_CPPFLAGS"
11573 test "$cf_cv_ncurses_h2" != no && break
11575 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:11575: error: not found" >&5
11576 echo "$as_me: error: not found" >&2;}
11577 { (exit 1); exit 1; }; }
11580 echo "$as_me:11580: result: $cf_cv_ncurses_h2" >&5
11581 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
11583 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
11584 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
11585 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
11586 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
11589 if test -n "$cf_1st_incdir" ; then
11590 for cf_add_incdir in $cf_1st_incdir
11592 while test "$cf_add_incdir" != /usr/include
11594 if test -d "$cf_add_incdir"
11597 if test -n "$CFLAGS$CPPFLAGS" ; then
11598 # a loop is needed to ensure we can add subdirs of existing dirs
11599 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11600 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11601 cf_have_incdir=yes; break
11606 if test "$cf_have_incdir" = no ; then
11607 if test "$cf_add_incdir" = /usr/local/include ; then
11608 if test "$GCC" = yes
11610 cf_save_CPPFLAGS=$CPPFLAGS
11612 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11613 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11615 cat >"conftest.$ac_ext" <<_ACEOF
11616 #line 11616 "configure"
11617 #include "confdefs.h"
11627 rm -f "conftest.$ac_objext"
11628 if { (eval echo "$as_me:11628: \"$ac_compile\"") >&5
11629 (eval $ac_compile) 2>&5
11631 echo "$as_me:11631: \$? = $ac_status" >&5
11632 (exit "$ac_status"); } &&
11633 { ac_try='test -s "conftest.$ac_objext"'
11634 { (eval echo "$as_me:11634: \"$ac_try\"") >&5
11635 (eval $ac_try) 2>&5
11637 echo "$as_me:11637: \$? = $ac_status" >&5
11638 (exit "$ac_status"); }; }; then
11641 echo "$as_me: failed program was:" >&5
11642 cat "conftest.$ac_ext" >&5
11645 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11646 CPPFLAGS=$cf_save_CPPFLAGS
11651 if test "$cf_have_incdir" = no ; then
11652 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11654 echo "${as_me:-configure}:11654: testing adding $cf_add_incdir to include-path ..." 1>&5
11656 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11658 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11659 test "$cf_top_incdir" = "$cf_add_incdir" && break
11660 cf_add_incdir="$cf_top_incdir"
11673 # Set definitions to allow ifdef'ing for ncurses.h
11675 case "$cf_cv_ncurses_header" in
11678 cat >>confdefs.h <<\EOF
11679 #define HAVE_NCURSES_H 1
11685 case "$cf_cv_ncurses_header" in
11686 (ncurses/curses.h|ncurses/ncurses.h)
11688 cat >>confdefs.h <<\EOF
11689 #define HAVE_NCURSES_NCURSES_H 1
11693 (ncursesw/curses.h|ncursesw/ncurses.h)
11695 cat >>confdefs.h <<\EOF
11696 #define HAVE_NCURSESW_NCURSES_H 1
11702 echo "$as_me:11702: checking for terminfo header" >&5
11703 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
11704 if test "${cf_cv_term_header+set}" = set; then
11705 echo $ECHO_N "(cached) $ECHO_C" >&6
11708 case "${cf_cv_ncurses_header}" in
11709 (*/ncurses.h|*/ncursesw.h)
11710 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
11713 cf_term_header=term.h
11717 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
11719 cat >"conftest.$ac_ext" <<_ACEOF
11720 #line 11720 "configure"
11721 #include "confdefs.h"
11723 #include <${cf_cv_ncurses_header:-curses.h}>
11724 #include <$cf_test>
11729 int x = auto_left_margin; (void)x
11734 rm -f "conftest.$ac_objext"
11735 if { (eval echo "$as_me:11735: \"$ac_compile\"") >&5
11736 (eval $ac_compile) 2>&5
11738 echo "$as_me:11738: \$? = $ac_status" >&5
11739 (exit "$ac_status"); } &&
11740 { ac_try='test -s "conftest.$ac_objext"'
11741 { (eval echo "$as_me:11741: \"$ac_try\"") >&5
11742 (eval $ac_try) 2>&5
11744 echo "$as_me:11744: \$? = $ac_status" >&5
11745 (exit "$ac_status"); }; }; then
11747 cf_cv_term_header="$cf_test"
11749 echo "$as_me: failed program was:" >&5
11750 cat "conftest.$ac_ext" >&5
11752 cf_cv_term_header=unknown
11755 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11756 test "$cf_cv_term_header" != unknown && break
11760 echo "$as_me:11760: result: $cf_cv_term_header" >&5
11761 echo "${ECHO_T}$cf_cv_term_header" >&6
11763 # Set definitions to allow ifdef'ing to accommodate subdirectories
11765 case "$cf_cv_term_header" in
11768 cat >>confdefs.h <<\EOF
11769 #define HAVE_TERM_H 1
11775 case "$cf_cv_term_header" in
11778 cat >>confdefs.h <<\EOF
11779 #define HAVE_NCURSES_TERM_H 1
11785 cat >>confdefs.h <<\EOF
11786 #define HAVE_NCURSESW_TERM_H 1
11792 # some applications need this, but should check for NCURSES_VERSION
11794 cat >>confdefs.h <<\EOF
11798 echo "$as_me:11798: checking for ncurses version" >&5
11799 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
11800 if test "${cf_cv_ncurses_version+set}" = set; then
11801 echo $ECHO_N "(cached) $ECHO_C" >&6
11804 cf_cv_ncurses_version=no
11806 rm -f "$cf_tempfile"
11807 if test "$cross_compiling" = yes; then
11809 # This will not work if the preprocessor splits the line after the
11810 # Autoconf token. The 'unproto' program does that.
11811 cat > "conftest.$ac_ext" <<EOF
11812 #include <${cf_cv_ncurses_header:-curses.h}>
11814 #ifdef NCURSES_VERSION
11815 Autoconf NCURSES_VERSION
11823 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
11824 { (eval echo "$as_me:11824: \"$cf_try\"") >&5
11825 (eval $cf_try) 2>&5
11827 echo "$as_me:11827: \$? = $ac_status" >&5
11828 (exit "$ac_status"); }
11829 if test -f conftest.out ; then
11830 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
11831 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
11836 cat >"conftest.$ac_ext" <<_ACEOF
11837 #line 11837 "configure"
11838 #include "confdefs.h"
11840 #include <${cf_cv_ncurses_header:-curses.h}>
11844 FILE *fp = fopen("$cf_tempfile", "w");
11845 #ifdef NCURSES_VERSION
11846 # ifdef NCURSES_VERSION_PATCH
11847 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
11849 fprintf(fp, "%s\\n", NCURSES_VERSION);
11852 # ifdef __NCURSES_H
11853 fprintf(fp, "old\\n");
11858 ${cf_cv_main_return:-return}(0);
11861 rm -f "conftest$ac_exeext"
11862 if { (eval echo "$as_me:11862: \"$ac_link\"") >&5
11863 (eval $ac_link) 2>&5
11865 echo "$as_me:11865: \$? = $ac_status" >&5
11866 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
11867 { (eval echo "$as_me:11867: \"$ac_try\"") >&5
11868 (eval $ac_try) 2>&5
11870 echo "$as_me:11870: \$? = $ac_status" >&5
11871 (exit "$ac_status"); }; }; then
11873 cf_cv_ncurses_version=`cat $cf_tempfile`
11875 echo "$as_me: program exited with status $ac_status" >&5
11876 echo "$as_me: failed program was:" >&5
11877 cat "conftest.$ac_ext" >&5
11879 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
11881 rm -f "$cf_tempfile"
11884 echo "$as_me:11884: result: $cf_cv_ncurses_version" >&5
11885 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
11886 test "$cf_cv_ncurses_version" = no ||
11887 cat >>confdefs.h <<\EOF
11891 cf_nculib_root=$cf_cv_screen
11892 # This works, except for the special case where we find gpm, but
11893 # ncurses is in a nonstandard location via $LIBS, and we really want
11896 cf_ncurses_SAVE="$LIBS"
11897 echo "$as_me:11897: checking for Gpm_Open in -lgpm" >&5
11898 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
11899 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
11900 echo $ECHO_N "(cached) $ECHO_C" >&6
11902 ac_check_lib_save_LIBS=$LIBS
11904 cat >"conftest.$ac_ext" <<_ACEOF
11905 #line 11905 "configure"
11906 #include "confdefs.h"
11908 /* Override any gcc2 internal prototype to avoid an error. */
11912 /* We use char because int might match the return type of a gcc2
11913 builtin and then its argument prototype would still apply. */
11923 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11924 if { (eval echo "$as_me:11924: \"$ac_link\"") >&5
11925 (eval $ac_link) 2>&5
11927 echo "$as_me:11927: \$? = $ac_status" >&5
11928 (exit "$ac_status"); } &&
11929 { ac_try='test -s "conftest$ac_exeext"'
11930 { (eval echo "$as_me:11930: \"$ac_try\"") >&5
11931 (eval $ac_try) 2>&5
11933 echo "$as_me:11933: \$? = $ac_status" >&5
11934 (exit "$ac_status"); }; }; then
11935 ac_cv_lib_gpm_Gpm_Open=yes
11937 echo "$as_me: failed program was:" >&5
11938 cat "conftest.$ac_ext" >&5
11939 ac_cv_lib_gpm_Gpm_Open=no
11941 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11942 LIBS=$ac_check_lib_save_LIBS
11944 echo "$as_me:11944: result: $ac_cv_lib_gpm_Gpm_Open" >&5
11945 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
11946 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
11947 echo "$as_me:11947: checking for initscr in -lgpm" >&5
11948 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
11949 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
11950 echo $ECHO_N "(cached) $ECHO_C" >&6
11952 ac_check_lib_save_LIBS=$LIBS
11954 cat >"conftest.$ac_ext" <<_ACEOF
11955 #line 11955 "configure"
11956 #include "confdefs.h"
11958 /* Override any gcc2 internal prototype to avoid an error. */
11962 /* We use char because int might match the return type of a gcc2
11963 builtin and then its argument prototype would still apply. */
11973 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11974 if { (eval echo "$as_me:11974: \"$ac_link\"") >&5
11975 (eval $ac_link) 2>&5
11977 echo "$as_me:11977: \$? = $ac_status" >&5
11978 (exit "$ac_status"); } &&
11979 { ac_try='test -s "conftest$ac_exeext"'
11980 { (eval echo "$as_me:11980: \"$ac_try\"") >&5
11981 (eval $ac_try) 2>&5
11983 echo "$as_me:11983: \$? = $ac_status" >&5
11984 (exit "$ac_status"); }; }; then
11985 ac_cv_lib_gpm_initscr=yes
11987 echo "$as_me: failed program was:" >&5
11988 cat "conftest.$ac_ext" >&5
11989 ac_cv_lib_gpm_initscr=no
11991 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11992 LIBS=$ac_check_lib_save_LIBS
11994 echo "$as_me:11994: result: $ac_cv_lib_gpm_initscr" >&5
11995 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
11996 if test "$ac_cv_lib_gpm_initscr" = yes; then
11997 LIBS="$cf_ncurses_SAVE"
11999 cf_ncurses_LIBS="-lgpm"
12006 # This is only necessary if you are linking against an obsolete
12007 # version of ncurses (but it should do no harm, since it's static).
12008 if test "$cf_nculib_root" = ncurses ; then
12009 echo "$as_me:12009: checking for tgoto in -lmytinfo" >&5
12010 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
12011 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
12012 echo $ECHO_N "(cached) $ECHO_C" >&6
12014 ac_check_lib_save_LIBS=$LIBS
12015 LIBS="-lmytinfo $LIBS"
12016 cat >"conftest.$ac_ext" <<_ACEOF
12017 #line 12017 "configure"
12018 #include "confdefs.h"
12020 /* Override any gcc2 internal prototype to avoid an error. */
12024 /* We use char because int might match the return type of a gcc2
12025 builtin and then its argument prototype would still apply. */
12035 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12036 if { (eval echo "$as_me:12036: \"$ac_link\"") >&5
12037 (eval $ac_link) 2>&5
12039 echo "$as_me:12039: \$? = $ac_status" >&5
12040 (exit "$ac_status"); } &&
12041 { ac_try='test -s "conftest$ac_exeext"'
12042 { (eval echo "$as_me:12042: \"$ac_try\"") >&5
12043 (eval $ac_try) 2>&5
12045 echo "$as_me:12045: \$? = $ac_status" >&5
12046 (exit "$ac_status"); }; }; then
12047 ac_cv_lib_mytinfo_tgoto=yes
12049 echo "$as_me: failed program was:" >&5
12050 cat "conftest.$ac_ext" >&5
12051 ac_cv_lib_mytinfo_tgoto=no
12053 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12054 LIBS=$ac_check_lib_save_LIBS
12056 echo "$as_me:12056: result: $ac_cv_lib_mytinfo_tgoto" >&5
12057 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
12058 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
12059 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
12066 cf_add_libs="$LIBS"
12069 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12070 # filter duplicates
12071 for cf_add_1lib in $cf_add_0lib; do
12072 for cf_add_2lib in $cf_add_libs; do
12073 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12078 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12080 LIBS="$cf_add_libs"
12082 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
12085 cf_add_libs="$LIBS"
12088 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12089 # filter duplicates
12090 for cf_add_1lib in $cf_add_0lib; do
12091 for cf_add_2lib in $cf_add_libs; do
12092 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12097 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12099 LIBS="$cf_add_libs"
12103 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
12105 echo "$as_me:12105: checking for initscr" >&5
12106 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
12107 if test "${ac_cv_func_initscr+set}" = set; then
12108 echo $ECHO_N "(cached) $ECHO_C" >&6
12110 cat >"conftest.$ac_ext" <<_ACEOF
12111 #line 12111 "configure"
12112 #include "confdefs.h"
12113 #define initscr autoconf_temporary
12114 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12121 /* We use char because int might match the return type of a gcc2
12122 builtin and then its argument prototype would still apply. */
12123 char initscr (void);
12129 /* The GNU C library defines stubs for functions which it implements
12130 to always fail with ENOSYS. Some functions are actually named
12131 something starting with __ and the normal name is an alias. */
12132 #if defined (__stub_initscr) || defined (__stub___initscr)
12133 #error found stub for initscr
12141 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12142 if { (eval echo "$as_me:12142: \"$ac_link\"") >&5
12143 (eval $ac_link) 2>&5
12145 echo "$as_me:12145: \$? = $ac_status" >&5
12146 (exit "$ac_status"); } &&
12147 { ac_try='test -s "conftest$ac_exeext"'
12148 { (eval echo "$as_me:12148: \"$ac_try\"") >&5
12149 (eval $ac_try) 2>&5
12151 echo "$as_me:12151: \$? = $ac_status" >&5
12152 (exit "$ac_status"); }; }; then
12153 ac_cv_func_initscr=yes
12155 echo "$as_me: failed program was:" >&5
12156 cat "conftest.$ac_ext" >&5
12157 ac_cv_func_initscr=no
12159 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12161 echo "$as_me:12161: result: $ac_cv_func_initscr" >&5
12162 echo "${ECHO_T}$ac_cv_func_initscr" >&6
12163 if test "$ac_cv_func_initscr" = yes; then
12164 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
12167 cf_save_LIBS="$LIBS"
12168 echo "$as_me:12168: checking for initscr in -l$cf_nculib_root" >&5
12169 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
12170 LIBS="-l$cf_nculib_root $LIBS"
12171 cat >"conftest.$ac_ext" <<_ACEOF
12172 #line 12172 "configure"
12173 #include "confdefs.h"
12174 #include <${cf_cv_ncurses_header:-curses.h}>
12183 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12184 if { (eval echo "$as_me:12184: \"$ac_link\"") >&5
12185 (eval $ac_link) 2>&5
12187 echo "$as_me:12187: \$? = $ac_status" >&5
12188 (exit "$ac_status"); } &&
12189 { ac_try='test -s "conftest$ac_exeext"'
12190 { (eval echo "$as_me:12190: \"$ac_try\"") >&5
12191 (eval $ac_try) 2>&5
12193 echo "$as_me:12193: \$? = $ac_status" >&5
12194 (exit "$ac_status"); }; }; then
12195 echo "$as_me:12195: result: yes" >&5
12196 echo "${ECHO_T}yes" >&6
12197 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
12200 echo "$as_me: failed program was:" >&5
12201 cat "conftest.$ac_ext" >&5
12202 echo "$as_me:12202: result: no" >&5
12203 echo "${ECHO_T}no" >&6
12206 cf_library_path_list=""
12207 if test -n "${LDFLAGS}${LIBS}" ; then
12208 for cf_library_path in $LDFLAGS $LIBS
12210 case "$cf_library_path" in
12212 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12214 test "x$cf_library_path" != "xNONE" && \
12215 test -d "$cf_library_path" && \
12217 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
12218 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
12219 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
12220 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
12221 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
12222 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"
12225 cf_library_path_list="$cf_library_path_list $cf_search"
12233 test "x$prefix" != "xNONE" && \
12234 test -d "$prefix" && \
12236 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
12237 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
12238 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
12239 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
12240 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
12241 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
12244 for cf_subdir_prefix in \
12253 test "x$cf_subdir_prefix" != "x$prefix" && \
12254 test -d "$cf_subdir_prefix" && \
12255 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12256 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
12257 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
12258 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
12259 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
12260 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
12261 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"
12266 cf_search="$cf_library_path_list $cf_search"
12268 for cf_libdir in $cf_search
12270 echo "$as_me:12270: checking for -l$cf_nculib_root in $cf_libdir" >&5
12271 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
12272 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
12273 cat >"conftest.$ac_ext" <<_ACEOF
12274 #line 12274 "configure"
12275 #include "confdefs.h"
12276 #include <${cf_cv_ncurses_header:-curses.h}>
12285 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12286 if { (eval echo "$as_me:12286: \"$ac_link\"") >&5
12287 (eval $ac_link) 2>&5
12289 echo "$as_me:12289: \$? = $ac_status" >&5
12290 (exit "$ac_status"); } &&
12291 { ac_try='test -s "conftest$ac_exeext"'
12292 { (eval echo "$as_me:12292: \"$ac_try\"") >&5
12293 (eval $ac_try) 2>&5
12295 echo "$as_me:12295: \$? = $ac_status" >&5
12296 (exit "$ac_status"); }; }; then
12297 echo "$as_me:12297: result: yes" >&5
12298 echo "${ECHO_T}yes" >&6
12299 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
12302 echo "$as_me: failed program was:" >&5
12303 cat "conftest.$ac_ext" >&5
12304 echo "$as_me:12304: result: no" >&5
12305 echo "${ECHO_T}no" >&6
12306 LIBS="$cf_save_LIBS"
12308 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12312 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12316 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
12318 if test "$cf_found_library" = no ; then
12319 { { echo "$as_me:12319: error: Cannot link $cf_nculib_root library" >&5
12320 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
12321 { (exit 1); exit 1; }; }
12326 if test -n "$cf_ncurses_LIBS" ; then
12327 echo "$as_me:12327: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
12328 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
12329 cf_ncurses_SAVE="$LIBS"
12330 for p in $cf_ncurses_LIBS ; do
12331 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
12332 if test "$q" != "$LIBS" ; then
12336 cat >"conftest.$ac_ext" <<_ACEOF
12337 #line 12337 "configure"
12338 #include "confdefs.h"
12339 #include <${cf_cv_ncurses_header:-curses.h}>
12343 initscr(); mousemask(0,0); tigetstr((char *)0);
12348 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12349 if { (eval echo "$as_me:12349: \"$ac_link\"") >&5
12350 (eval $ac_link) 2>&5
12352 echo "$as_me:12352: \$? = $ac_status" >&5
12353 (exit "$ac_status"); } &&
12354 { ac_try='test -s "conftest$ac_exeext"'
12355 { (eval echo "$as_me:12355: \"$ac_try\"") >&5
12356 (eval $ac_try) 2>&5
12358 echo "$as_me:12358: \$? = $ac_status" >&5
12359 (exit "$ac_status"); }; }; then
12360 echo "$as_me:12360: result: yes" >&5
12361 echo "${ECHO_T}yes" >&6
12363 echo "$as_me: failed program was:" >&5
12364 cat "conftest.$ac_ext" >&5
12365 echo "$as_me:12365: result: no" >&5
12366 echo "${ECHO_T}no" >&6
12367 LIBS="$cf_ncurses_SAVE"
12369 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12372 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12374 cat >>confdefs.h <<EOF
12375 #define $cf_nculib_ROOT 1
12380 NCURSES_CONFIG=none
12385 echo "$as_me:12385: checking for X" >&5
12386 echo $ECHO_N "checking for X... $ECHO_C" >&6
12388 # Check whether --with-x or --without-x was given.
12389 if test "${with_x+set}" = set; then
12393 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
12394 if test "x$with_x" = xno; then
12395 # The user explicitly disabled X.
12398 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
12399 # Both variables are already set.
12402 if test "${ac_cv_have_x+set}" = set; then
12403 echo $ECHO_N "(cached) $ECHO_C" >&6
12405 # One or both of the vars are not set, and there is no cached value.
12406 ac_x_includes=no ac_x_libraries=no
12407 rm -fr conftest.dir
12408 if mkdir conftest.dir; then
12410 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
12411 cat >Imakefile <<'EOF'
12413 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
12415 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
12416 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
12417 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
12418 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
12419 for ac_extension in a so sl dylib dll; do
12420 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
12421 test -f "$ac_im_libdir/libX11.$ac_extension"; then
12422 ac_im_usrlibdir=$ac_im_libdir; break
12425 # Screen out bogus values from the imake configuration. They are
12426 # bogus both because they are the default anyway, and because
12427 # using them would break gcc on systems where it needs fixed includes.
12428 case $ac_im_incroot in
12430 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
12432 case $ac_im_usrlibdir in
12433 /usr/lib | /lib) ;;
12434 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
12438 rm -fr conftest.dir
12441 # Standard set of common directories for X headers.
12442 # Check X11 before X11Rn because it is often a symlink to the current release.
12459 /usr/local/X11/include
12460 /usr/local/X11R7/include
12461 /usr/local/X11R6/include
12462 /usr/local/X11R5/include
12463 /usr/local/X11R4/include
12465 /usr/local/include/X11
12466 /usr/local/include/X11R7
12467 /usr/local/include/X11R6
12468 /usr/local/include/X11R5
12469 /usr/local/include/X11R4
12473 /usr/XFree86/include/X11
12477 /usr/unsupported/include
12478 /usr/athena/include
12479 /usr/local/x11r5/include
12480 /usr/lpp/Xamples/include
12482 /usr/openwin/include
12483 /usr/openwin/share/include'
12485 if test "$ac_x_includes" = no; then
12486 # Guess where to find include files, by looking for Intrinsic.h.
12487 # First, try using that file with no special directory specified.
12488 cat >"conftest.$ac_ext" <<_ACEOF
12489 #line 12489 "configure"
12490 #include "confdefs.h"
12491 #include <X11/Intrinsic.h>
12493 if { (eval echo "$as_me:12493: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12494 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12496 $EGREP -v '^ *\+' conftest.er1 >conftest.err
12498 cat conftest.err >&5
12499 echo "$as_me:12499: \$? = $ac_status" >&5
12500 (exit "$ac_status"); } >/dev/null; then
12501 if test -s conftest.err; then
12502 ac_cpp_err=$ac_c_preproc_warn_flag
12509 if test -z "$ac_cpp_err"; then
12510 # We can compile using X headers with no special include directory.
12513 echo "$as_me: failed program was:" >&5
12514 cat "conftest.$ac_ext" >&5
12515 for ac_dir in $ac_x_header_dirs; do
12516 if test -r "$ac_dir/X11/Intrinsic.h"; then
12517 ac_x_includes=$ac_dir
12522 rm -f conftest.err "conftest.$ac_ext"
12523 fi # $ac_x_includes = no
12525 if test "$ac_x_libraries" = no; then
12526 # Check for the libraries.
12527 # See if we find them without any special options.
12528 # Don't add to $LIBS permanently.
12531 cat >"conftest.$ac_ext" <<_ACEOF
12532 #line 12532 "configure"
12533 #include "confdefs.h"
12534 #include <X11/Intrinsic.h>
12543 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12544 if { (eval echo "$as_me:12544: \"$ac_link\"") >&5
12545 (eval $ac_link) 2>&5
12547 echo "$as_me:12547: \$? = $ac_status" >&5
12548 (exit "$ac_status"); } &&
12549 { ac_try='test -s "conftest$ac_exeext"'
12550 { (eval echo "$as_me:12550: \"$ac_try\"") >&5
12551 (eval $ac_try) 2>&5
12553 echo "$as_me:12553: \$? = $ac_status" >&5
12554 (exit "$ac_status"); }; }; then
12556 # We can link X programs with no special library path.
12559 echo "$as_me: failed program was:" >&5
12560 cat "conftest.$ac_ext" >&5
12562 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
12564 # Don't even attempt the hair of trying to link an X program!
12565 for ac_extension in a so sl dylib dll; do
12566 if test -r "$ac_dir/libXt.$ac_extension"; then
12567 ac_x_libraries=$ac_dir
12573 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12574 fi # $ac_x_libraries = no
12576 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
12577 # Didn't find X anywhere. Cache the known absence of X.
12578 ac_cv_have_x="have_x=no"
12580 # Record where we found X for the cache.
12581 ac_cv_have_x="have_x=yes \
12582 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
12587 eval "$ac_cv_have_x"
12590 if test "$have_x" != yes; then
12591 echo "$as_me:12591: result: $have_x" >&5
12592 echo "${ECHO_T}$have_x" >&6
12595 # If each of the values was on the command line, it overrides each guess.
12596 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
12597 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
12598 # Update the cache value to reflect the command line values.
12599 ac_cv_have_x="have_x=yes \
12600 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
12601 echo "$as_me:12601: result: libraries $x_libraries, headers $x_includes" >&5
12602 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
12605 if test "$no_x" = yes; then
12606 # Not all programs may use this symbol, but it does not hurt to define it.
12608 cat >>confdefs.h <<\EOF
12609 #define X_DISPLAY_MISSING 1
12617 if test -n "$x_includes"; then
12618 X_CFLAGS="$X_CFLAGS -I$x_includes"
12621 # It would also be nice to do this for all -L options, not just this one.
12622 if test -n "$x_libraries"; then
12623 X_LIBS="$X_LIBS -L$x_libraries"
12624 # For Solaris; some versions of Sun CC require a space after -R and
12625 # others require no space. Words are not sufficient . . . .
12626 case `(uname -sr) 2>/dev/null` in
12628 echo "$as_me:12628: checking whether -R must be followed by a space" >&5
12629 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
12630 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
12631 cat >"conftest.$ac_ext" <<_ACEOF
12632 #line 12632 "configure"
12633 #include "confdefs.h"
12643 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12644 if { (eval echo "$as_me:12644: \"$ac_link\"") >&5
12645 (eval $ac_link) 2>&5
12647 echo "$as_me:12647: \$? = $ac_status" >&5
12648 (exit "$ac_status"); } &&
12649 { ac_try='test -s "conftest$ac_exeext"'
12650 { (eval echo "$as_me:12650: \"$ac_try\"") >&5
12651 (eval $ac_try) 2>&5
12653 echo "$as_me:12653: \$? = $ac_status" >&5
12654 (exit "$ac_status"); }; }; then
12657 echo "$as_me: failed program was:" >&5
12658 cat "conftest.$ac_ext" >&5
12661 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12662 if test $ac_R_nospace = yes; then
12663 echo "$as_me:12663: result: no" >&5
12664 echo "${ECHO_T}no" >&6
12665 X_LIBS="$X_LIBS -R$x_libraries"
12667 LIBS="$ac_xsave_LIBS -R $x_libraries"
12668 cat >"conftest.$ac_ext" <<_ACEOF
12669 #line 12669 "configure"
12670 #include "confdefs.h"
12680 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12681 if { (eval echo "$as_me:12681: \"$ac_link\"") >&5
12682 (eval $ac_link) 2>&5
12684 echo "$as_me:12684: \$? = $ac_status" >&5
12685 (exit "$ac_status"); } &&
12686 { ac_try='test -s "conftest$ac_exeext"'
12687 { (eval echo "$as_me:12687: \"$ac_try\"") >&5
12688 (eval $ac_try) 2>&5
12690 echo "$as_me:12690: \$? = $ac_status" >&5
12691 (exit "$ac_status"); }; }; then
12694 echo "$as_me: failed program was:" >&5
12695 cat "conftest.$ac_ext" >&5
12698 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12699 if test $ac_R_space = yes; then
12700 echo "$as_me:12700: result: yes" >&5
12701 echo "${ECHO_T}yes" >&6
12702 X_LIBS="$X_LIBS -R $x_libraries"
12704 echo "$as_me:12704: result: neither works" >&5
12705 echo "${ECHO_T}neither works" >&6
12708 LIBS=$ac_xsave_LIBS
12712 # Check for system-dependent libraries X programs must link with.
12713 # Do this before checking for the system-independent R6 libraries
12714 # (-lICE), since we may need -lsocket or whatever for X linking.
12716 if test "$ISC" = yes; then
12717 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
12719 # Martyn Johnson says this is needed for Ultrix, if the X
12720 # libraries were built with DECnet support. And Karl Berry says
12721 # the Alpha needs dnet_stub (dnet does not exist).
12722 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
12723 cat >"conftest.$ac_ext" <<_ACEOF
12724 #line 12724 "configure"
12725 #include "confdefs.h"
12727 /* Override any gcc2 internal prototype to avoid an error. */
12731 /* We use char because int might match the return type of a gcc2
12732 builtin and then its argument prototype would still apply. */
12733 char XOpenDisplay ();
12742 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12743 if { (eval echo "$as_me:12743: \"$ac_link\"") >&5
12744 (eval $ac_link) 2>&5
12746 echo "$as_me:12746: \$? = $ac_status" >&5
12747 (exit "$ac_status"); } &&
12748 { ac_try='test -s "conftest$ac_exeext"'
12749 { (eval echo "$as_me:12749: \"$ac_try\"") >&5
12750 (eval $ac_try) 2>&5
12752 echo "$as_me:12752: \$? = $ac_status" >&5
12753 (exit "$ac_status"); }; }; then
12756 echo "$as_me: failed program was:" >&5
12757 cat "conftest.$ac_ext" >&5
12758 echo "$as_me:12758: checking for dnet_ntoa in -ldnet" >&5
12759 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
12760 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
12761 echo $ECHO_N "(cached) $ECHO_C" >&6
12763 ac_check_lib_save_LIBS=$LIBS
12764 LIBS="-ldnet $LIBS"
12765 cat >"conftest.$ac_ext" <<_ACEOF
12766 #line 12766 "configure"
12767 #include "confdefs.h"
12769 /* Override any gcc2 internal prototype to avoid an error. */
12773 /* We use char because int might match the return type of a gcc2
12774 builtin and then its argument prototype would still apply. */
12784 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12785 if { (eval echo "$as_me:12785: \"$ac_link\"") >&5
12786 (eval $ac_link) 2>&5
12788 echo "$as_me:12788: \$? = $ac_status" >&5
12789 (exit "$ac_status"); } &&
12790 { ac_try='test -s "conftest$ac_exeext"'
12791 { (eval echo "$as_me:12791: \"$ac_try\"") >&5
12792 (eval $ac_try) 2>&5
12794 echo "$as_me:12794: \$? = $ac_status" >&5
12795 (exit "$ac_status"); }; }; then
12796 ac_cv_lib_dnet_dnet_ntoa=yes
12798 echo "$as_me: failed program was:" >&5
12799 cat "conftest.$ac_ext" >&5
12800 ac_cv_lib_dnet_dnet_ntoa=no
12802 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12803 LIBS=$ac_check_lib_save_LIBS
12805 echo "$as_me:12805: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
12806 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
12807 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
12808 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
12811 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
12812 echo "$as_me:12812: checking for dnet_ntoa in -ldnet_stub" >&5
12813 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
12814 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
12815 echo $ECHO_N "(cached) $ECHO_C" >&6
12817 ac_check_lib_save_LIBS=$LIBS
12818 LIBS="-ldnet_stub $LIBS"
12819 cat >"conftest.$ac_ext" <<_ACEOF
12820 #line 12820 "configure"
12821 #include "confdefs.h"
12823 /* Override any gcc2 internal prototype to avoid an error. */
12827 /* We use char because int might match the return type of a gcc2
12828 builtin and then its argument prototype would still apply. */
12838 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12839 if { (eval echo "$as_me:12839: \"$ac_link\"") >&5
12840 (eval $ac_link) 2>&5
12842 echo "$as_me:12842: \$? = $ac_status" >&5
12843 (exit "$ac_status"); } &&
12844 { ac_try='test -s "conftest$ac_exeext"'
12845 { (eval echo "$as_me:12845: \"$ac_try\"") >&5
12846 (eval $ac_try) 2>&5
12848 echo "$as_me:12848: \$? = $ac_status" >&5
12849 (exit "$ac_status"); }; }; then
12850 ac_cv_lib_dnet_stub_dnet_ntoa=yes
12852 echo "$as_me: failed program was:" >&5
12853 cat "conftest.$ac_ext" >&5
12854 ac_cv_lib_dnet_stub_dnet_ntoa=no
12856 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12857 LIBS=$ac_check_lib_save_LIBS
12859 echo "$as_me:12859: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
12860 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
12861 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
12862 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
12867 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12868 LIBS="$ac_xsave_LIBS"
12870 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
12871 # to get the SysV transport functions.
12872 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
12874 # The nsl library prevents programs from opening the X display
12875 # on Irix 5.2, according to T.E. Dickey.
12876 # The functions gethostbyname, getservbyname, and inet_addr are
12877 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
12878 echo "$as_me:12878: checking for gethostbyname" >&5
12879 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
12880 if test "${ac_cv_func_gethostbyname+set}" = set; then
12881 echo $ECHO_N "(cached) $ECHO_C" >&6
12883 cat >"conftest.$ac_ext" <<_ACEOF
12884 #line 12884 "configure"
12885 #include "confdefs.h"
12886 #define gethostbyname autoconf_temporary
12887 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12888 #undef gethostbyname
12894 /* We use char because int might match the return type of a gcc2
12895 builtin and then its argument prototype would still apply. */
12896 char gethostbyname (void);
12902 /* The GNU C library defines stubs for functions which it implements
12903 to always fail with ENOSYS. Some functions are actually named
12904 something starting with __ and the normal name is an alias. */
12905 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
12906 #error found stub for gethostbyname
12909 return gethostbyname ();
12914 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12915 if { (eval echo "$as_me:12915: \"$ac_link\"") >&5
12916 (eval $ac_link) 2>&5
12918 echo "$as_me:12918: \$? = $ac_status" >&5
12919 (exit "$ac_status"); } &&
12920 { ac_try='test -s "conftest$ac_exeext"'
12921 { (eval echo "$as_me:12921: \"$ac_try\"") >&5
12922 (eval $ac_try) 2>&5
12924 echo "$as_me:12924: \$? = $ac_status" >&5
12925 (exit "$ac_status"); }; }; then
12926 ac_cv_func_gethostbyname=yes
12928 echo "$as_me: failed program was:" >&5
12929 cat "conftest.$ac_ext" >&5
12930 ac_cv_func_gethostbyname=no
12932 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12934 echo "$as_me:12934: result: $ac_cv_func_gethostbyname" >&5
12935 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
12937 if test $ac_cv_func_gethostbyname = no; then
12938 echo "$as_me:12938: checking for gethostbyname in -lnsl" >&5
12939 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
12940 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
12941 echo $ECHO_N "(cached) $ECHO_C" >&6
12943 ac_check_lib_save_LIBS=$LIBS
12945 cat >"conftest.$ac_ext" <<_ACEOF
12946 #line 12946 "configure"
12947 #include "confdefs.h"
12949 /* Override any gcc2 internal prototype to avoid an error. */
12953 /* We use char because int might match the return type of a gcc2
12954 builtin and then its argument prototype would still apply. */
12955 char gethostbyname ();
12964 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12965 if { (eval echo "$as_me:12965: \"$ac_link\"") >&5
12966 (eval $ac_link) 2>&5
12968 echo "$as_me:12968: \$? = $ac_status" >&5
12969 (exit "$ac_status"); } &&
12970 { ac_try='test -s "conftest$ac_exeext"'
12971 { (eval echo "$as_me:12971: \"$ac_try\"") >&5
12972 (eval $ac_try) 2>&5
12974 echo "$as_me:12974: \$? = $ac_status" >&5
12975 (exit "$ac_status"); }; }; then
12976 ac_cv_lib_nsl_gethostbyname=yes
12978 echo "$as_me: failed program was:" >&5
12979 cat "conftest.$ac_ext" >&5
12980 ac_cv_lib_nsl_gethostbyname=no
12982 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12983 LIBS=$ac_check_lib_save_LIBS
12985 echo "$as_me:12985: result: $ac_cv_lib_nsl_gethostbyname" >&5
12986 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
12987 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
12988 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
12991 if test $ac_cv_lib_nsl_gethostbyname = no; then
12992 echo "$as_me:12992: checking for gethostbyname in -lbsd" >&5
12993 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
12994 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
12995 echo $ECHO_N "(cached) $ECHO_C" >&6
12997 ac_check_lib_save_LIBS=$LIBS
12999 cat >"conftest.$ac_ext" <<_ACEOF
13000 #line 13000 "configure"
13001 #include "confdefs.h"
13003 /* Override any gcc2 internal prototype to avoid an error. */
13007 /* We use char because int might match the return type of a gcc2
13008 builtin and then its argument prototype would still apply. */
13009 char gethostbyname ();
13018 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13019 if { (eval echo "$as_me:13019: \"$ac_link\"") >&5
13020 (eval $ac_link) 2>&5
13022 echo "$as_me:13022: \$? = $ac_status" >&5
13023 (exit "$ac_status"); } &&
13024 { ac_try='test -s "conftest$ac_exeext"'
13025 { (eval echo "$as_me:13025: \"$ac_try\"") >&5
13026 (eval $ac_try) 2>&5
13028 echo "$as_me:13028: \$? = $ac_status" >&5
13029 (exit "$ac_status"); }; }; then
13030 ac_cv_lib_bsd_gethostbyname=yes
13032 echo "$as_me: failed program was:" >&5
13033 cat "conftest.$ac_ext" >&5
13034 ac_cv_lib_bsd_gethostbyname=no
13036 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13037 LIBS=$ac_check_lib_save_LIBS
13039 echo "$as_me:13039: result: $ac_cv_lib_bsd_gethostbyname" >&5
13040 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
13041 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
13042 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
13048 # lieder@skyler.mavd.honeywell.com says without -lsocket,
13049 # socket/setsockopt and other routines are undefined under SCO ODT
13050 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
13051 # on later versions), says Simon Leinen: it contains gethostby*
13052 # variants that don't use the nameserver (or something). -lsocket
13053 # must be given before -lnsl if both are needed. We assume that
13054 # if connect needs -lnsl, so does gethostbyname.
13055 echo "$as_me:13055: checking for connect" >&5
13056 echo $ECHO_N "checking for connect... $ECHO_C" >&6
13057 if test "${ac_cv_func_connect+set}" = set; then
13058 echo $ECHO_N "(cached) $ECHO_C" >&6
13060 cat >"conftest.$ac_ext" <<_ACEOF
13061 #line 13061 "configure"
13062 #include "confdefs.h"
13063 #define connect autoconf_temporary
13064 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
13071 /* We use char because int might match the return type of a gcc2
13072 builtin and then its argument prototype would still apply. */
13073 char connect (void);
13079 /* The GNU C library defines stubs for functions which it implements
13080 to always fail with ENOSYS. Some functions are actually named
13081 something starting with __ and the normal name is an alias. */
13082 #if defined (__stub_connect) || defined (__stub___connect)
13083 #error found stub for connect
13091 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13092 if { (eval echo "$as_me:13092: \"$ac_link\"") >&5
13093 (eval $ac_link) 2>&5
13095 echo "$as_me:13095: \$? = $ac_status" >&5
13096 (exit "$ac_status"); } &&
13097 { ac_try='test -s "conftest$ac_exeext"'
13098 { (eval echo "$as_me:13098: \"$ac_try\"") >&5
13099 (eval $ac_try) 2>&5
13101 echo "$as_me:13101: \$? = $ac_status" >&5
13102 (exit "$ac_status"); }; }; then
13103 ac_cv_func_connect=yes
13105 echo "$as_me: failed program was:" >&5
13106 cat "conftest.$ac_ext" >&5
13107 ac_cv_func_connect=no
13109 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13111 echo "$as_me:13111: result: $ac_cv_func_connect" >&5
13112 echo "${ECHO_T}$ac_cv_func_connect" >&6
13114 if test $ac_cv_func_connect = no; then
13115 echo "$as_me:13115: checking for connect in -lsocket" >&5
13116 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
13117 if test "${ac_cv_lib_socket_connect+set}" = set; then
13118 echo $ECHO_N "(cached) $ECHO_C" >&6
13120 ac_check_lib_save_LIBS=$LIBS
13121 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
13122 cat >"conftest.$ac_ext" <<_ACEOF
13123 #line 13123 "configure"
13124 #include "confdefs.h"
13126 /* Override any gcc2 internal prototype to avoid an error. */
13130 /* We use char because int might match the return type of a gcc2
13131 builtin and then its argument prototype would still apply. */
13141 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13142 if { (eval echo "$as_me:13142: \"$ac_link\"") >&5
13143 (eval $ac_link) 2>&5
13145 echo "$as_me:13145: \$? = $ac_status" >&5
13146 (exit "$ac_status"); } &&
13147 { ac_try='test -s "conftest$ac_exeext"'
13148 { (eval echo "$as_me:13148: \"$ac_try\"") >&5
13149 (eval $ac_try) 2>&5
13151 echo "$as_me:13151: \$? = $ac_status" >&5
13152 (exit "$ac_status"); }; }; then
13153 ac_cv_lib_socket_connect=yes
13155 echo "$as_me: failed program was:" >&5
13156 cat "conftest.$ac_ext" >&5
13157 ac_cv_lib_socket_connect=no
13159 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13160 LIBS=$ac_check_lib_save_LIBS
13162 echo "$as_me:13162: result: $ac_cv_lib_socket_connect" >&5
13163 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
13164 if test "$ac_cv_lib_socket_connect" = yes; then
13165 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
13170 # Guillermo Gomez says -lposix is necessary on A/UX.
13171 echo "$as_me:13171: checking for remove" >&5
13172 echo $ECHO_N "checking for remove... $ECHO_C" >&6
13173 if test "${ac_cv_func_remove+set}" = set; then
13174 echo $ECHO_N "(cached) $ECHO_C" >&6
13176 cat >"conftest.$ac_ext" <<_ACEOF
13177 #line 13177 "configure"
13178 #include "confdefs.h"
13179 #define remove autoconf_temporary
13180 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
13187 /* We use char because int might match the return type of a gcc2
13188 builtin and then its argument prototype would still apply. */
13189 char remove (void);
13195 /* The GNU C library defines stubs for functions which it implements
13196 to always fail with ENOSYS. Some functions are actually named
13197 something starting with __ and the normal name is an alias. */
13198 #if defined (__stub_remove) || defined (__stub___remove)
13199 #error found stub for remove
13207 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13208 if { (eval echo "$as_me:13208: \"$ac_link\"") >&5
13209 (eval $ac_link) 2>&5
13211 echo "$as_me:13211: \$? = $ac_status" >&5
13212 (exit "$ac_status"); } &&
13213 { ac_try='test -s "conftest$ac_exeext"'
13214 { (eval echo "$as_me:13214: \"$ac_try\"") >&5
13215 (eval $ac_try) 2>&5
13217 echo "$as_me:13217: \$? = $ac_status" >&5
13218 (exit "$ac_status"); }; }; then
13219 ac_cv_func_remove=yes
13221 echo "$as_me: failed program was:" >&5
13222 cat "conftest.$ac_ext" >&5
13223 ac_cv_func_remove=no
13225 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13227 echo "$as_me:13227: result: $ac_cv_func_remove" >&5
13228 echo "${ECHO_T}$ac_cv_func_remove" >&6
13230 if test $ac_cv_func_remove = no; then
13231 echo "$as_me:13231: checking for remove in -lposix" >&5
13232 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
13233 if test "${ac_cv_lib_posix_remove+set}" = set; then
13234 echo $ECHO_N "(cached) $ECHO_C" >&6
13236 ac_check_lib_save_LIBS=$LIBS
13237 LIBS="-lposix $LIBS"
13238 cat >"conftest.$ac_ext" <<_ACEOF
13239 #line 13239 "configure"
13240 #include "confdefs.h"
13242 /* Override any gcc2 internal prototype to avoid an error. */
13246 /* We use char because int might match the return type of a gcc2
13247 builtin and then its argument prototype would still apply. */
13257 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13258 if { (eval echo "$as_me:13258: \"$ac_link\"") >&5
13259 (eval $ac_link) 2>&5
13261 echo "$as_me:13261: \$? = $ac_status" >&5
13262 (exit "$ac_status"); } &&
13263 { ac_try='test -s "conftest$ac_exeext"'
13264 { (eval echo "$as_me:13264: \"$ac_try\"") >&5
13265 (eval $ac_try) 2>&5
13267 echo "$as_me:13267: \$? = $ac_status" >&5
13268 (exit "$ac_status"); }; }; then
13269 ac_cv_lib_posix_remove=yes
13271 echo "$as_me: failed program was:" >&5
13272 cat "conftest.$ac_ext" >&5
13273 ac_cv_lib_posix_remove=no
13275 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13276 LIBS=$ac_check_lib_save_LIBS
13278 echo "$as_me:13278: result: $ac_cv_lib_posix_remove" >&5
13279 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
13280 if test "$ac_cv_lib_posix_remove" = yes; then
13281 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
13286 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
13287 echo "$as_me:13287: checking for shmat" >&5
13288 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
13289 if test "${ac_cv_func_shmat+set}" = set; then
13290 echo $ECHO_N "(cached) $ECHO_C" >&6
13292 cat >"conftest.$ac_ext" <<_ACEOF
13293 #line 13293 "configure"
13294 #include "confdefs.h"
13295 #define shmat autoconf_temporary
13296 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
13303 /* We use char because int might match the return type of a gcc2
13304 builtin and then its argument prototype would still apply. */
13311 /* The GNU C library defines stubs for functions which it implements
13312 to always fail with ENOSYS. Some functions are actually named
13313 something starting with __ and the normal name is an alias. */
13314 #if defined (__stub_shmat) || defined (__stub___shmat)
13315 #error found stub for shmat
13323 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13324 if { (eval echo "$as_me:13324: \"$ac_link\"") >&5
13325 (eval $ac_link) 2>&5
13327 echo "$as_me:13327: \$? = $ac_status" >&5
13328 (exit "$ac_status"); } &&
13329 { ac_try='test -s "conftest$ac_exeext"'
13330 { (eval echo "$as_me:13330: \"$ac_try\"") >&5
13331 (eval $ac_try) 2>&5
13333 echo "$as_me:13333: \$? = $ac_status" >&5
13334 (exit "$ac_status"); }; }; then
13335 ac_cv_func_shmat=yes
13337 echo "$as_me: failed program was:" >&5
13338 cat "conftest.$ac_ext" >&5
13339 ac_cv_func_shmat=no
13341 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13343 echo "$as_me:13343: result: $ac_cv_func_shmat" >&5
13344 echo "${ECHO_T}$ac_cv_func_shmat" >&6
13346 if test $ac_cv_func_shmat = no; then
13347 echo "$as_me:13347: checking for shmat in -lipc" >&5
13348 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
13349 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
13350 echo $ECHO_N "(cached) $ECHO_C" >&6
13352 ac_check_lib_save_LIBS=$LIBS
13354 cat >"conftest.$ac_ext" <<_ACEOF
13355 #line 13355 "configure"
13356 #include "confdefs.h"
13358 /* Override any gcc2 internal prototype to avoid an error. */
13362 /* We use char because int might match the return type of a gcc2
13363 builtin and then its argument prototype would still apply. */
13373 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13374 if { (eval echo "$as_me:13374: \"$ac_link\"") >&5
13375 (eval $ac_link) 2>&5
13377 echo "$as_me:13377: \$? = $ac_status" >&5
13378 (exit "$ac_status"); } &&
13379 { ac_try='test -s "conftest$ac_exeext"'
13380 { (eval echo "$as_me:13380: \"$ac_try\"") >&5
13381 (eval $ac_try) 2>&5
13383 echo "$as_me:13383: \$? = $ac_status" >&5
13384 (exit "$ac_status"); }; }; then
13385 ac_cv_lib_ipc_shmat=yes
13387 echo "$as_me: failed program was:" >&5
13388 cat "conftest.$ac_ext" >&5
13389 ac_cv_lib_ipc_shmat=no
13391 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13392 LIBS=$ac_check_lib_save_LIBS
13394 echo "$as_me:13394: result: $ac_cv_lib_ipc_shmat" >&5
13395 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
13396 if test "$ac_cv_lib_ipc_shmat" = yes; then
13397 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
13403 # Check for libraries that X11R6 Xt/Xaw programs need.
13404 ac_save_LDFLAGS=$LDFLAGS
13405 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
13406 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
13407 # check for ICE first), but we must link in the order -lSM -lICE or
13408 # we get undefined symbols. So assume we have SM if we have ICE.
13409 # These have to be linked with before -lX11, unlike the other
13410 # libraries we check for below, so use a different variable.
13411 # John Interrante, Karl Berry
13412 echo "$as_me:13412: checking for IceConnectionNumber in -lICE" >&5
13413 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
13414 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
13415 echo $ECHO_N "(cached) $ECHO_C" >&6
13417 ac_check_lib_save_LIBS=$LIBS
13418 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
13419 cat >"conftest.$ac_ext" <<_ACEOF
13420 #line 13420 "configure"
13421 #include "confdefs.h"
13423 /* Override any gcc2 internal prototype to avoid an error. */
13427 /* We use char because int might match the return type of a gcc2
13428 builtin and then its argument prototype would still apply. */
13429 char IceConnectionNumber ();
13433 IceConnectionNumber ();
13438 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13439 if { (eval echo "$as_me:13439: \"$ac_link\"") >&5
13440 (eval $ac_link) 2>&5
13442 echo "$as_me:13442: \$? = $ac_status" >&5
13443 (exit "$ac_status"); } &&
13444 { ac_try='test -s "conftest$ac_exeext"'
13445 { (eval echo "$as_me:13445: \"$ac_try\"") >&5
13446 (eval $ac_try) 2>&5
13448 echo "$as_me:13448: \$? = $ac_status" >&5
13449 (exit "$ac_status"); }; }; then
13450 ac_cv_lib_ICE_IceConnectionNumber=yes
13452 echo "$as_me: failed program was:" >&5
13453 cat "conftest.$ac_ext" >&5
13454 ac_cv_lib_ICE_IceConnectionNumber=no
13456 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13457 LIBS=$ac_check_lib_save_LIBS
13459 echo "$as_me:13459: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
13460 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
13461 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
13462 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
13465 LDFLAGS=$ac_save_LDFLAGS
13469 cf_x_athena=${cf_x_athena:-Xaw}
13471 echo "$as_me:13471: checking if you want to link with Xaw 3d library" >&5
13472 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
13475 # Check whether --with-Xaw3d or --without-Xaw3d was given.
13476 if test "${with_Xaw3d+set}" = set; then
13477 withval="$with_Xaw3d"
13480 if test "$withval" = yes ; then
13482 echo "$as_me:13482: result: yes" >&5
13483 echo "${ECHO_T}yes" >&6
13485 echo "$as_me:13485: result: no" >&5
13486 echo "${ECHO_T}no" >&6
13489 echo "$as_me:13489: checking if you want to link with Xaw 3d xft library" >&5
13490 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
13493 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
13494 if test "${with_Xaw3dxft+set}" = set; then
13495 withval="$with_Xaw3dxft"
13498 if test "$withval" = yes ; then
13499 cf_x_athena=Xaw3dxft
13500 echo "$as_me:13500: result: yes" >&5
13501 echo "${ECHO_T}yes" >&6
13503 echo "$as_me:13503: result: no" >&5
13504 echo "${ECHO_T}no" >&6
13507 echo "$as_me:13507: checking if you want to link with neXT Athena library" >&5
13508 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
13511 # Check whether --with-neXtaw or --without-neXtaw was given.
13512 if test "${with_neXtaw+set}" = set; then
13513 withval="$with_neXtaw"
13516 if test "$withval" = yes ; then
13518 echo "$as_me:13518: result: yes" >&5
13519 echo "${ECHO_T}yes" >&6
13521 echo "$as_me:13521: result: no" >&5
13522 echo "${ECHO_T}no" >&6
13525 echo "$as_me:13525: checking if you want to link with Athena-Plus library" >&5
13526 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
13529 # Check whether --with-XawPlus or --without-XawPlus was given.
13530 if test "${with_XawPlus+set}" = set; then
13531 withval="$with_XawPlus"
13534 if test "$withval" = yes ; then
13535 cf_x_athena=XawPlus
13536 echo "$as_me:13536: result: yes" >&5
13537 echo "${ECHO_T}yes" >&6
13539 echo "$as_me:13539: result: no" >&5
13540 echo "${ECHO_T}no" >&6
13545 if test "$PKG_CONFIG" != none ; then
13547 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
13548 for cf_athena_pkg in \
13551 ${cf_x_athena}-devel \
13552 lib${cf_x_athena} \
13553 lib${cf_x_athena}-devel
13556 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_athena_pkg"; then
13557 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
13559 echo "${as_me:-configure}:13559: testing found package $cf_athena_pkg ..." 1>&5
13561 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_athena_pkg" 2>/dev/null`"
13562 cf_pkgconfig_libs="`$PKG_CONFIG --libs "$cf_athena_pkg" 2>/dev/null`"
13563 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
13565 echo "${as_me:-configure}:13565: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13567 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
13569 echo "${as_me:-configure}:13569: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
13574 cf_new_extra_cppflags=
13576 for cf_add_cflags in $cf_pkgconfig_incs
13578 case "$cf_fix_cppflags" in
13580 case "$cf_add_cflags" in
13581 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13582 case "$cf_add_cflags" in
13584 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13586 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13587 && test -z "${cf_tst_cflags}" \
13588 && cf_fix_cppflags=yes
13590 if test "$cf_fix_cppflags" = yes ; then
13592 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13593 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13596 elif test "${cf_tst_cflags}" = "\"'" ; then
13598 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13599 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13605 case "$CPPFLAGS" in
13609 case "$cf_add_cflags" in
13611 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13613 CPPFLAGS=`echo "$CPPFLAGS" | \
13614 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13615 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13620 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13621 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13628 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13629 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13636 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13637 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13639 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13641 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13642 && test -z "${cf_tst_cflags}" \
13643 && cf_fix_cppflags=no
13648 if test -n "$cf_new_cflags" ; then
13650 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13651 CFLAGS="${CFLAGS}$cf_new_cflags"
13655 if test -n "$cf_new_cppflags" ; then
13657 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13658 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13662 if test -n "$cf_new_extra_cppflags" ; then
13664 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13665 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13669 cf_add_libs="$LIBS"
13672 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13673 # filter duplicates
13674 for cf_add_1lib in $cf_add_0lib; do
13675 for cf_add_2lib in $cf_add_libs; do
13676 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13681 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13683 LIBS="$cf_add_libs"
13685 cf_x_athena_lib="$cf_pkgconfig_libs"
13687 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13689 cat >>confdefs.h <<EOF
13690 #define $cf_x_athena_LIBS 1
13693 for cf_trim_lib in Xmu Xt X11
13696 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13697 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13698 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13700 echo "${as_me:-configure}:13700: testing ..trimmed $LIBS ..." 1>&5
13706 echo "$as_me:13706: checking for usable $cf_x_athena/Xmu package" >&5
13707 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
13708 if test "${cf_cv_xaw_compat+set}" = set; then
13709 echo $ECHO_N "(cached) $ECHO_C" >&6
13712 cat >"conftest.$ac_ext" <<_ACEOF
13713 #line 13713 "configure"
13714 #include "confdefs.h"
13716 #include <X11/Xmu/CharSet.h>
13722 int check = XmuCompareISOLatin1("big", "small");
13729 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13730 if { (eval echo "$as_me:13730: \"$ac_link\"") >&5
13731 (eval $ac_link) 2>&5
13733 echo "$as_me:13733: \$? = $ac_status" >&5
13734 (exit "$ac_status"); } &&
13735 { ac_try='test -s "conftest$ac_exeext"'
13736 { (eval echo "$as_me:13736: \"$ac_try\"") >&5
13737 (eval $ac_try) 2>&5
13739 echo "$as_me:13739: \$? = $ac_status" >&5
13740 (exit "$ac_status"); }; }; then
13741 cf_cv_xaw_compat=yes
13743 echo "$as_me: failed program was:" >&5
13744 cat "conftest.$ac_ext" >&5
13745 cf_cv_xaw_compat=no
13747 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13749 echo "$as_me:13749: result: $cf_cv_xaw_compat" >&5
13750 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
13752 if test "$cf_cv_xaw_compat" = no
13754 # workaround for broken ".pc" files...
13755 case "$cf_x_athena_lib" in
13759 test -n "$verbose" && echo " work around broken package" 1>&6
13761 echo "${as_me:-configure}:13761: testing work around broken package ..." 1>&5
13763 cf_save_xmu="$LIBS"
13764 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
13766 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xmu"; then
13767 test -n "$verbose" && echo " found package xmu" 1>&6
13769 echo "${as_me:-configure}:13769: testing found package xmu ..." 1>&5
13771 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xmu" 2>/dev/null`"
13772 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xmu" 2>/dev/null`"
13773 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
13775 echo "${as_me:-configure}:13775: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13777 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
13779 echo "${as_me:-configure}:13779: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
13784 cf_new_extra_cppflags=
13786 for cf_add_cflags in $cf_pkgconfig_incs
13788 case "$cf_fix_cppflags" in
13790 case "$cf_add_cflags" in
13791 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13792 case "$cf_add_cflags" in
13794 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13796 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13797 && test -z "${cf_tst_cflags}" \
13798 && cf_fix_cppflags=yes
13800 if test "$cf_fix_cppflags" = yes ; then
13802 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13803 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13806 elif test "${cf_tst_cflags}" = "\"'" ; then
13808 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13809 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13815 case "$CPPFLAGS" in
13819 case "$cf_add_cflags" in
13821 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13823 CPPFLAGS=`echo "$CPPFLAGS" | \
13824 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13825 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13830 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13831 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13838 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13839 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13846 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13847 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13849 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13851 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13852 && test -z "${cf_tst_cflags}" \
13853 && cf_fix_cppflags=no
13858 if test -n "$cf_new_cflags" ; then
13860 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13861 CFLAGS="${CFLAGS}$cf_new_cflags"
13865 if test -n "$cf_new_cppflags" ; then
13867 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13868 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13872 if test -n "$cf_new_extra_cppflags" ; then
13874 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13875 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13879 cf_add_libs="$LIBS"
13882 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13883 # filter duplicates
13884 for cf_add_1lib in $cf_add_0lib; do
13885 for cf_add_2lib in $cf_add_libs; do
13886 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13891 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13893 LIBS="$cf_add_libs"
13895 LIBS="$cf_save_xmu"
13897 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13899 echo "${as_me:-configure}:13899: testing ...before $LIBS ..." 1>&5
13901 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
13902 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13904 echo "${as_me:-configure}:13904: testing ...after $LIBS ..." 1>&5
13910 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13912 echo "${as_me:-configure}:13912: testing ...before $LIBS ..." 1>&5
13914 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
13915 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13917 echo "${as_me:-configure}:13917: testing ...after $LIBS ..." 1>&5
13921 for cf_trim_lib in Xmu Xt X11
13924 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13925 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13926 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13928 echo "${as_me:-configure}:13928: testing ..trimmed $LIBS ..." 1>&5
13948 if test -z "$cf_x_athena_lib" ; then
13950 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
13951 test -n "$verbose" && echo " found package Xext" 1>&6
13953 echo "${as_me:-configure}:13953: testing found package Xext ..." 1>&5
13955 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
13956 cf_pkgconfig_libs="`$PKG_CONFIG --libs "Xext" 2>/dev/null`"
13957 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
13959 echo "${as_me:-configure}:13959: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13961 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
13963 echo "${as_me:-configure}:13963: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
13968 cf_new_extra_cppflags=
13970 for cf_add_cflags in $cf_pkgconfig_incs
13972 case "$cf_fix_cppflags" in
13974 case "$cf_add_cflags" in
13975 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13976 case "$cf_add_cflags" in
13978 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13980 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13981 && test -z "${cf_tst_cflags}" \
13982 && cf_fix_cppflags=yes
13984 if test "$cf_fix_cppflags" = yes ; then
13986 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13987 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13990 elif test "${cf_tst_cflags}" = "\"'" ; then
13992 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13993 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13999 case "$CPPFLAGS" in
14003 case "$cf_add_cflags" in
14005 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14007 CPPFLAGS=`echo "$CPPFLAGS" | \
14008 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14009 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14014 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14015 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14022 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14023 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14030 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14031 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14033 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14035 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14036 && test -z "${cf_tst_cflags}" \
14037 && cf_fix_cppflags=no
14042 if test -n "$cf_new_cflags" ; then
14044 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14045 CFLAGS="${CFLAGS}$cf_new_cflags"
14049 if test -n "$cf_new_cppflags" ; then
14051 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14052 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14056 if test -n "$cf_new_extra_cppflags" ; then
14058 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14059 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14063 cf_add_libs="$LIBS"
14066 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14067 # filter duplicates
14068 for cf_add_1lib in $cf_add_0lib; do
14069 for cf_add_2lib in $cf_add_libs; do
14070 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14075 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14077 LIBS="$cf_add_libs"
14084 echo "$as_me:14084: checking for XextCreateExtension in -lXext" >&5
14085 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
14086 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
14087 echo $ECHO_N "(cached) $ECHO_C" >&6
14089 ac_check_lib_save_LIBS=$LIBS
14090 LIBS="-lXext $LIBS"
14091 cat >"conftest.$ac_ext" <<_ACEOF
14092 #line 14092 "configure"
14093 #include "confdefs.h"
14095 /* Override any gcc2 internal prototype to avoid an error. */
14099 /* We use char because int might match the return type of a gcc2
14100 builtin and then its argument prototype would still apply. */
14101 char XextCreateExtension ();
14105 XextCreateExtension ();
14110 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14111 if { (eval echo "$as_me:14111: \"$ac_link\"") >&5
14112 (eval $ac_link) 2>&5
14114 echo "$as_me:14114: \$? = $ac_status" >&5
14115 (exit "$ac_status"); } &&
14116 { ac_try='test -s "conftest$ac_exeext"'
14117 { (eval echo "$as_me:14117: \"$ac_try\"") >&5
14118 (eval $ac_try) 2>&5
14120 echo "$as_me:14120: \$? = $ac_status" >&5
14121 (exit "$ac_status"); }; }; then
14122 ac_cv_lib_Xext_XextCreateExtension=yes
14124 echo "$as_me: failed program was:" >&5
14125 cat "conftest.$ac_ext" >&5
14126 ac_cv_lib_Xext_XextCreateExtension=no
14128 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14129 LIBS=$ac_check_lib_save_LIBS
14131 echo "$as_me:14131: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
14132 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
14133 if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
14135 cf_add_libs="$LIBS"
14138 for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14139 # filter duplicates
14140 for cf_add_1lib in $cf_add_0lib; do
14141 for cf_add_2lib in $cf_add_libs; do
14142 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14147 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14149 LIBS="$cf_add_libs"
14155 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
14156 # in some cases has installed dummy files in the former, other cases replaced
14157 # it with a link to the new location). This complicates the configure script.
14158 # Check for that pitfall, and recover using pkg-config
14160 # If none of these are set, the configuration is almost certainly broken.
14161 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
14164 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
14165 test -n "$verbose" && echo " found package x11" 1>&6
14167 echo "${as_me:-configure}:14167: testing found package x11 ..." 1>&5
14169 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
14170 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
14171 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
14173 echo "${as_me:-configure}:14173: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14175 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
14177 echo "${as_me:-configure}:14177: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
14182 cf_new_extra_cppflags=
14184 for cf_add_cflags in $cf_pkgconfig_incs
14186 case "$cf_fix_cppflags" in
14188 case "$cf_add_cflags" in
14189 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14190 case "$cf_add_cflags" in
14192 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14194 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14195 && test -z "${cf_tst_cflags}" \
14196 && cf_fix_cppflags=yes
14198 if test "$cf_fix_cppflags" = yes ; then
14200 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14201 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14204 elif test "${cf_tst_cflags}" = "\"'" ; then
14206 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14207 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14213 case "$CPPFLAGS" in
14217 case "$cf_add_cflags" in
14219 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14221 CPPFLAGS=`echo "$CPPFLAGS" | \
14222 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14223 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14228 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14229 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14236 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14237 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14244 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14245 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14247 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14249 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14250 && test -z "${cf_tst_cflags}" \
14251 && cf_fix_cppflags=no
14256 if test -n "$cf_new_cflags" ; then
14258 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14259 CFLAGS="${CFLAGS}$cf_new_cflags"
14263 if test -n "$cf_new_cppflags" ; then
14265 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14266 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14270 if test -n "$cf_new_extra_cppflags" ; then
14272 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14273 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14277 cf_add_libs="$LIBS"
14280 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14281 # filter duplicates
14282 for cf_add_1lib in $cf_add_0lib; do
14283 for cf_add_2lib in $cf_add_libs; do
14284 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14289 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14291 LIBS="$cf_add_libs"
14297 { echo "$as_me:14297: WARNING: unable to find X11 library" >&5
14298 echo "$as_me: WARNING: unable to find X11 library" >&2;}
14301 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
14302 test -n "$verbose" && echo " found package ice" 1>&6
14304 echo "${as_me:-configure}:14304: testing found package ice ..." 1>&5
14306 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
14307 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
14308 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
14310 echo "${as_me:-configure}:14310: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14312 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
14314 echo "${as_me:-configure}:14314: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
14319 cf_new_extra_cppflags=
14321 for cf_add_cflags in $cf_pkgconfig_incs
14323 case "$cf_fix_cppflags" in
14325 case "$cf_add_cflags" in
14326 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14327 case "$cf_add_cflags" in
14329 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14331 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14332 && test -z "${cf_tst_cflags}" \
14333 && cf_fix_cppflags=yes
14335 if test "$cf_fix_cppflags" = yes ; then
14337 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14338 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14341 elif test "${cf_tst_cflags}" = "\"'" ; then
14343 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14344 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14350 case "$CPPFLAGS" in
14354 case "$cf_add_cflags" in
14356 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14358 CPPFLAGS=`echo "$CPPFLAGS" | \
14359 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14360 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14365 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14366 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14373 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14374 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14381 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14382 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14384 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14386 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14387 && test -z "${cf_tst_cflags}" \
14388 && cf_fix_cppflags=no
14393 if test -n "$cf_new_cflags" ; then
14395 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14396 CFLAGS="${CFLAGS}$cf_new_cflags"
14400 if test -n "$cf_new_cppflags" ; then
14402 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14403 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14407 if test -n "$cf_new_extra_cppflags" ; then
14409 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14410 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14414 cf_add_libs="$LIBS"
14417 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14418 # filter duplicates
14419 for cf_add_1lib in $cf_add_0lib; do
14420 for cf_add_2lib in $cf_add_libs; do
14421 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14426 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14428 LIBS="$cf_add_libs"
14434 { echo "$as_me:14434: WARNING: unable to find ICE library" >&5
14435 echo "$as_me: WARNING: unable to find ICE library" >&2;}
14438 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
14439 test -n "$verbose" && echo " found package sm" 1>&6
14441 echo "${as_me:-configure}:14441: testing found package sm ..." 1>&5
14443 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
14444 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
14445 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
14447 echo "${as_me:-configure}:14447: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14449 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
14451 echo "${as_me:-configure}:14451: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
14456 cf_new_extra_cppflags=
14458 for cf_add_cflags in $cf_pkgconfig_incs
14460 case "$cf_fix_cppflags" in
14462 case "$cf_add_cflags" in
14463 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14464 case "$cf_add_cflags" in
14466 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14468 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14469 && test -z "${cf_tst_cflags}" \
14470 && cf_fix_cppflags=yes
14472 if test "$cf_fix_cppflags" = yes ; then
14474 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14475 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14478 elif test "${cf_tst_cflags}" = "\"'" ; then
14480 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14481 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14487 case "$CPPFLAGS" in
14491 case "$cf_add_cflags" in
14493 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14495 CPPFLAGS=`echo "$CPPFLAGS" | \
14496 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14497 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14502 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14503 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14510 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14511 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14518 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14519 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14521 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14523 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14524 && test -z "${cf_tst_cflags}" \
14525 && cf_fix_cppflags=no
14530 if test -n "$cf_new_cflags" ; then
14532 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14533 CFLAGS="${CFLAGS}$cf_new_cflags"
14537 if test -n "$cf_new_cppflags" ; then
14539 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14540 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14544 if test -n "$cf_new_extra_cppflags" ; then
14546 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14547 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14551 cf_add_libs="$LIBS"
14554 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14555 # filter duplicates
14556 for cf_add_1lib in $cf_add_0lib; do
14557 for cf_add_2lib in $cf_add_libs; do
14558 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14563 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14565 LIBS="$cf_add_libs"
14571 { echo "$as_me:14571: WARNING: unable to find SM library" >&5
14572 echo "$as_me: WARNING: unable to find SM library" >&2;}
14575 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
14576 test -n "$verbose" && echo " found package xt" 1>&6
14578 echo "${as_me:-configure}:14578: testing found package xt ..." 1>&5
14580 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
14581 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
14582 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
14584 echo "${as_me:-configure}:14584: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14586 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
14588 echo "${as_me:-configure}:14588: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
14593 cf_new_extra_cppflags=
14595 for cf_add_cflags in $cf_pkgconfig_incs
14597 case "$cf_fix_cppflags" in
14599 case "$cf_add_cflags" in
14600 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14601 case "$cf_add_cflags" in
14603 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14605 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14606 && test -z "${cf_tst_cflags}" \
14607 && cf_fix_cppflags=yes
14609 if test "$cf_fix_cppflags" = yes ; then
14611 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14612 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14615 elif test "${cf_tst_cflags}" = "\"'" ; then
14617 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14618 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14624 case "$CPPFLAGS" in
14628 case "$cf_add_cflags" in
14630 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14632 CPPFLAGS=`echo "$CPPFLAGS" | \
14633 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14634 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14639 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14640 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14647 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14648 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14655 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14656 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14658 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14660 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14661 && test -z "${cf_tst_cflags}" \
14662 && cf_fix_cppflags=no
14667 if test -n "$cf_new_cflags" ; then
14669 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14670 CFLAGS="${CFLAGS}$cf_new_cflags"
14674 if test -n "$cf_new_cppflags" ; then
14676 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14677 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14681 if test -n "$cf_new_extra_cppflags" ; then
14683 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14684 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14688 cf_add_libs="$LIBS"
14691 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14692 # filter duplicates
14693 for cf_add_1lib in $cf_add_0lib; do
14694 for cf_add_2lib in $cf_add_libs; do
14695 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14700 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14702 LIBS="$cf_add_libs"
14708 { echo "$as_me:14708: WARNING: unable to find Xt library" >&5
14709 echo "$as_me: WARNING: unable to find Xt library" >&2;}
14713 LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
14718 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
14719 test -n "$verbose" && echo " found package xt" 1>&6
14721 echo "${as_me:-configure}:14721: testing found package xt ..." 1>&5
14723 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
14724 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
14725 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
14727 echo "${as_me:-configure}:14727: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14729 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
14731 echo "${as_me:-configure}:14731: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
14736 cf_new_extra_cppflags=
14738 for cf_add_cflags in $cf_pkgconfig_incs
14740 case "$cf_fix_cppflags" in
14742 case "$cf_add_cflags" in
14743 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14744 case "$cf_add_cflags" in
14746 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14748 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14749 && test -z "${cf_tst_cflags}" \
14750 && cf_fix_cppflags=yes
14752 if test "$cf_fix_cppflags" = yes ; then
14754 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14755 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14758 elif test "${cf_tst_cflags}" = "\"'" ; then
14760 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14761 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14767 case "$CPPFLAGS" in
14771 case "$cf_add_cflags" in
14773 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14775 CPPFLAGS=`echo "$CPPFLAGS" | \
14776 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14777 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14782 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14783 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14790 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14791 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14798 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14799 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14801 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14803 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14804 && test -z "${cf_tst_cflags}" \
14805 && cf_fix_cppflags=no
14810 if test -n "$cf_new_cflags" ; then
14812 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14813 CFLAGS="${CFLAGS}$cf_new_cflags"
14817 if test -n "$cf_new_cppflags" ; then
14819 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14820 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14824 if test -n "$cf_new_extra_cppflags" ; then
14826 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14827 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14831 cf_add_libs="$LIBS"
14834 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14835 # filter duplicates
14836 for cf_add_1lib in $cf_add_0lib; do
14837 for cf_add_2lib in $cf_add_libs; do
14838 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14843 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14845 LIBS="$cf_add_libs"
14851 # we have an "xt" package, but it may omit Xt's dependency on X11
14852 echo "$as_me:14852: checking for usable X dependency" >&5
14853 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
14854 if test "${cf_cv_xt_x11_compat+set}" = set; then
14855 echo $ECHO_N "(cached) $ECHO_C" >&6
14858 cat >"conftest.$ac_ext" <<_ACEOF
14859 #line 14859 "configure"
14860 #include "confdefs.h"
14862 #include <X11/Xlib.h>
14868 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
14869 int rc2 = XClearWindow((Display*) 0, (Window) 0);
14870 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
14871 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
14877 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14878 if { (eval echo "$as_me:14878: \"$ac_link\"") >&5
14879 (eval $ac_link) 2>&5
14881 echo "$as_me:14881: \$? = $ac_status" >&5
14882 (exit "$ac_status"); } &&
14883 { ac_try='test -s "conftest$ac_exeext"'
14884 { (eval echo "$as_me:14884: \"$ac_try\"") >&5
14885 (eval $ac_try) 2>&5
14887 echo "$as_me:14887: \$? = $ac_status" >&5
14888 (exit "$ac_status"); }; }; then
14889 cf_cv_xt_x11_compat=yes
14891 echo "$as_me: failed program was:" >&5
14892 cat "conftest.$ac_ext" >&5
14893 cf_cv_xt_x11_compat=no
14895 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14897 echo "$as_me:14897: result: $cf_cv_xt_x11_compat" >&5
14898 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
14899 if test "$cf_cv_xt_x11_compat" = no
14901 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
14903 echo "${as_me:-configure}:14903: testing work around broken X11 dependency ..." 1>&5
14905 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
14907 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
14908 test -n "$verbose" && echo " found package x11" 1>&6
14910 echo "${as_me:-configure}:14910: testing found package x11 ..." 1>&5
14912 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
14913 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
14914 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
14916 echo "${as_me:-configure}:14916: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14918 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
14920 echo "${as_me:-configure}:14920: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
14925 cf_new_extra_cppflags=
14927 for cf_add_cflags in $cf_pkgconfig_incs
14929 case "$cf_fix_cppflags" in
14931 case "$cf_add_cflags" in
14932 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14933 case "$cf_add_cflags" in
14935 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14937 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14938 && test -z "${cf_tst_cflags}" \
14939 && cf_fix_cppflags=yes
14941 if test "$cf_fix_cppflags" = yes ; then
14943 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14944 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14947 elif test "${cf_tst_cflags}" = "\"'" ; then
14949 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14950 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14956 case "$CPPFLAGS" in
14960 case "$cf_add_cflags" in
14962 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14964 CPPFLAGS=`echo "$CPPFLAGS" | \
14965 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14966 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14971 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14972 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14979 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14980 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14987 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14988 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14990 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14992 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14993 && test -z "${cf_tst_cflags}" \
14994 && cf_fix_cppflags=no
14999 if test -n "$cf_new_cflags" ; then
15001 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15002 CFLAGS="${CFLAGS}$cf_new_cflags"
15006 if test -n "$cf_new_cppflags" ; then
15008 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15009 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15013 if test -n "$cf_new_extra_cppflags" ; then
15015 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15016 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15020 cf_add_libs="$LIBS"
15023 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15024 # filter duplicates
15025 for cf_add_1lib in $cf_add_0lib; do
15026 for cf_add_2lib in $cf_add_libs; do
15027 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15032 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15034 LIBS="$cf_add_libs"
15041 test -n "$verbose" && echo " ...before $LIBS" 1>&6
15043 echo "${as_me:-configure}:15043: testing ...before $LIBS ..." 1>&5
15045 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
15046 test -n "$verbose" && echo " ...after $LIBS" 1>&6
15048 echo "${as_me:-configure}:15048: testing ...after $LIBS ..." 1>&5
15056 echo "$as_me:15056: checking for usable X Toolkit package" >&5
15057 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
15058 if test "${cf_cv_xt_ice_compat+set}" = set; then
15059 echo $ECHO_N "(cached) $ECHO_C" >&6
15062 cat >"conftest.$ac_ext" <<_ACEOF
15063 #line 15063 "configure"
15064 #include "confdefs.h"
15066 #include <X11/Shell.h>
15071 int num = IceConnectionNumber(0); (void) num
15077 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15078 if { (eval echo "$as_me:15078: \"$ac_link\"") >&5
15079 (eval $ac_link) 2>&5
15081 echo "$as_me:15081: \$? = $ac_status" >&5
15082 (exit "$ac_status"); } &&
15083 { ac_try='test -s "conftest$ac_exeext"'
15084 { (eval echo "$as_me:15084: \"$ac_try\"") >&5
15085 (eval $ac_try) 2>&5
15087 echo "$as_me:15087: \$? = $ac_status" >&5
15088 (exit "$ac_status"); }; }; then
15089 cf_cv_xt_ice_compat=yes
15091 echo "$as_me: failed program was:" >&5
15092 cat "conftest.$ac_ext" >&5
15093 cf_cv_xt_ice_compat=no
15095 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15097 echo "$as_me:15097: result: $cf_cv_xt_ice_compat" >&5
15098 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
15100 if test "$cf_cv_xt_ice_compat" = no
15102 # workaround for broken ".pc" files used for X Toolkit.
15103 case "x$X_PRE_LIBS" in
15109 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
15111 echo "${as_me:-configure}:15111: testing work around broken ICE dependency ..." 1>&5
15113 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
15114 test -n "$verbose" && echo " found package ice" 1>&6
15116 echo "${as_me:-configure}:15116: testing found package ice ..." 1>&5
15118 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
15119 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
15120 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
15122 echo "${as_me:-configure}:15122: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
15124 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
15126 echo "${as_me:-configure}:15126: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
15131 cf_new_extra_cppflags=
15133 for cf_add_cflags in $cf_pkgconfig_incs
15135 case "$cf_fix_cppflags" in
15137 case "$cf_add_cflags" in
15138 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15139 case "$cf_add_cflags" in
15141 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15143 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15144 && test -z "${cf_tst_cflags}" \
15145 && cf_fix_cppflags=yes
15147 if test "$cf_fix_cppflags" = yes ; then
15149 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15150 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15153 elif test "${cf_tst_cflags}" = "\"'" ; then
15155 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15156 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15162 case "$CPPFLAGS" in
15166 case "$cf_add_cflags" in
15168 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15170 CPPFLAGS=`echo "$CPPFLAGS" | \
15171 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15172 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15177 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15178 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15185 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15186 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15193 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15194 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15196 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15198 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15199 && test -z "${cf_tst_cflags}" \
15200 && cf_fix_cppflags=no
15205 if test -n "$cf_new_cflags" ; then
15207 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15208 CFLAGS="${CFLAGS}$cf_new_cflags"
15212 if test -n "$cf_new_cppflags" ; then
15214 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15215 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15219 if test -n "$cf_new_extra_cppflags" ; then
15221 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15222 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15226 cf_add_libs="$LIBS"
15229 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15230 # filter duplicates
15231 for cf_add_1lib in $cf_add_0lib; do
15232 for cf_add_2lib in $cf_add_libs; do
15233 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15238 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15240 LIBS="$cf_add_libs"
15242 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
15243 test -n "$verbose" && echo " found package sm" 1>&6
15245 echo "${as_me:-configure}:15245: testing found package sm ..." 1>&5
15247 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
15248 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
15249 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
15251 echo "${as_me:-configure}:15251: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
15253 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
15255 echo "${as_me:-configure}:15255: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
15260 cf_new_extra_cppflags=
15262 for cf_add_cflags in $cf_pkgconfig_incs
15264 case "$cf_fix_cppflags" in
15266 case "$cf_add_cflags" in
15267 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15268 case "$cf_add_cflags" in
15270 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15272 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15273 && test -z "${cf_tst_cflags}" \
15274 && cf_fix_cppflags=yes
15276 if test "$cf_fix_cppflags" = yes ; then
15278 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15279 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15282 elif test "${cf_tst_cflags}" = "\"'" ; then
15284 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15285 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15291 case "$CPPFLAGS" in
15295 case "$cf_add_cflags" in
15297 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15299 CPPFLAGS=`echo "$CPPFLAGS" | \
15300 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15301 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15306 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15307 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15314 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15315 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15322 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15323 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15325 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15327 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15328 && test -z "${cf_tst_cflags}" \
15329 && cf_fix_cppflags=no
15334 if test -n "$cf_new_cflags" ; then
15336 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15337 CFLAGS="${CFLAGS}$cf_new_cflags"
15341 if test -n "$cf_new_cppflags" ; then
15343 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15344 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15348 if test -n "$cf_new_extra_cppflags" ; then
15350 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15351 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15355 cf_add_libs="$LIBS"
15358 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15359 # filter duplicates
15360 for cf_add_1lib in $cf_add_0lib; do
15361 for cf_add_2lib in $cf_add_libs; do
15362 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15367 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15369 LIBS="$cf_add_libs"
15382 test -n "$verbose" && echo " ...before $LIBS" 1>&6
15384 echo "${as_me:-configure}:15384: testing ...before $LIBS ..." 1>&5
15386 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
15387 test -n "$verbose" && echo " ...after $LIBS" 1>&6
15389 echo "${as_me:-configure}:15389: testing ...after $LIBS ..." 1>&5
15405 LDFLAGS="$X_LIBS $LDFLAGS"
15407 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
15409 echo "${as_me:-configure}:15409: testing checking additions to CFLAGS ..." 1>&5
15411 cf_check_cflags="$CFLAGS"
15412 cf_check_cppflags="$CPPFLAGS"
15417 cf_new_extra_cppflags=
15419 for cf_add_cflags in $X_CFLAGS
15421 case "$cf_fix_cppflags" in
15423 case "$cf_add_cflags" in
15424 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15425 case "$cf_add_cflags" in
15427 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15429 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15430 && test -z "${cf_tst_cflags}" \
15431 && cf_fix_cppflags=yes
15433 if test "$cf_fix_cppflags" = yes ; then
15435 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15436 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15439 elif test "${cf_tst_cflags}" = "\"'" ; then
15441 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15442 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15448 case "$CPPFLAGS" in
15452 case "$cf_add_cflags" in
15454 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15456 CPPFLAGS=`echo "$CPPFLAGS" | \
15457 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15458 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15463 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15464 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15471 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15472 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15479 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15480 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15482 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15484 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15485 && test -z "${cf_tst_cflags}" \
15486 && cf_fix_cppflags=no
15491 if test -n "$cf_new_cflags" ; then
15492 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
15494 echo "${as_me:-configure}:15494: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
15496 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15497 CFLAGS="${CFLAGS}$cf_new_cflags"
15501 if test -n "$cf_new_cppflags" ; then
15502 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
15504 echo "${as_me:-configure}:15504: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
15506 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15507 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15511 if test -n "$cf_new_extra_cppflags" ; then
15512 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
15514 echo "${as_me:-configure}:15514: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
15516 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15517 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15521 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
15522 cat >"conftest.$ac_ext" <<_ACEOF
15523 #line 15523 "configure"
15524 #include "confdefs.h"
15529 printf("Hello world");
15534 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15535 if { (eval echo "$as_me:15535: \"$ac_link\"") >&5
15536 (eval $ac_link) 2>&5
15538 echo "$as_me:15538: \$? = $ac_status" >&5
15539 (exit "$ac_status"); } &&
15540 { ac_try='test -s "conftest$ac_exeext"'
15541 { (eval echo "$as_me:15541: \"$ac_try\"") >&5
15542 (eval $ac_try) 2>&5
15544 echo "$as_me:15544: \$? = $ac_status" >&5
15545 (exit "$ac_status"); }; }; then
15548 echo "$as_me: failed program was:" >&5
15549 cat "conftest.$ac_ext" >&5
15550 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
15552 echo "${as_me:-configure}:15552: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
15554 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
15555 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
15557 echo "${as_me:-configure}:15557: testing but keeping change to \$CPPFLAGS ..." 1>&5
15560 CFLAGS="$cf_check_cflags"
15562 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15565 echo "$as_me:15565: checking for XOpenDisplay" >&5
15566 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
15567 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
15568 echo $ECHO_N "(cached) $ECHO_C" >&6
15570 cat >"conftest.$ac_ext" <<_ACEOF
15571 #line 15571 "configure"
15572 #include "confdefs.h"
15573 #define XOpenDisplay autoconf_temporary
15574 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15575 #undef XOpenDisplay
15581 /* We use char because int might match the return type of a gcc2
15582 builtin and then its argument prototype would still apply. */
15583 char XOpenDisplay (void);
15589 /* The GNU C library defines stubs for functions which it implements
15590 to always fail with ENOSYS. Some functions are actually named
15591 something starting with __ and the normal name is an alias. */
15592 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
15593 #error found stub for XOpenDisplay
15596 return XOpenDisplay ();
15601 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15602 if { (eval echo "$as_me:15602: \"$ac_link\"") >&5
15603 (eval $ac_link) 2>&5
15605 echo "$as_me:15605: \$? = $ac_status" >&5
15606 (exit "$ac_status"); } &&
15607 { ac_try='test -s "conftest$ac_exeext"'
15608 { (eval echo "$as_me:15608: \"$ac_try\"") >&5
15609 (eval $ac_try) 2>&5
15611 echo "$as_me:15611: \$? = $ac_status" >&5
15612 (exit "$ac_status"); }; }; then
15613 ac_cv_func_XOpenDisplay=yes
15615 echo "$as_me: failed program was:" >&5
15616 cat "conftest.$ac_ext" >&5
15617 ac_cv_func_XOpenDisplay=no
15619 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15621 echo "$as_me:15621: result: $ac_cv_func_XOpenDisplay" >&5
15622 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
15623 if test "$ac_cv_func_XOpenDisplay" = yes; then
15627 echo "$as_me:15627: checking for XOpenDisplay in -lX11" >&5
15628 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
15629 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
15630 echo $ECHO_N "(cached) $ECHO_C" >&6
15632 ac_check_lib_save_LIBS=$LIBS
15634 cat >"conftest.$ac_ext" <<_ACEOF
15635 #line 15635 "configure"
15636 #include "confdefs.h"
15638 /* Override any gcc2 internal prototype to avoid an error. */
15642 /* We use char because int might match the return type of a gcc2
15643 builtin and then its argument prototype would still apply. */
15644 char XOpenDisplay ();
15653 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15654 if { (eval echo "$as_me:15654: \"$ac_link\"") >&5
15655 (eval $ac_link) 2>&5
15657 echo "$as_me:15657: \$? = $ac_status" >&5
15658 (exit "$ac_status"); } &&
15659 { ac_try='test -s "conftest$ac_exeext"'
15660 { (eval echo "$as_me:15660: \"$ac_try\"") >&5
15661 (eval $ac_try) 2>&5
15663 echo "$as_me:15663: \$? = $ac_status" >&5
15664 (exit "$ac_status"); }; }; then
15665 ac_cv_lib_X11_XOpenDisplay=yes
15667 echo "$as_me: failed program was:" >&5
15668 cat "conftest.$ac_ext" >&5
15669 ac_cv_lib_X11_XOpenDisplay=no
15671 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15672 LIBS=$ac_check_lib_save_LIBS
15674 echo "$as_me:15674: result: $ac_cv_lib_X11_XOpenDisplay" >&5
15675 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
15676 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
15678 cf_add_libs="$LIBS"
15681 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15682 # filter duplicates
15683 for cf_add_1lib in $cf_add_0lib; do
15684 for cf_add_2lib in $cf_add_libs; do
15685 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15690 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15692 LIBS="$cf_add_libs"
15698 echo "$as_me:15698: checking for XtAppInitialize" >&5
15699 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
15700 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
15701 echo $ECHO_N "(cached) $ECHO_C" >&6
15703 cat >"conftest.$ac_ext" <<_ACEOF
15704 #line 15704 "configure"
15705 #include "confdefs.h"
15706 #define XtAppInitialize autoconf_temporary
15707 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15708 #undef XtAppInitialize
15714 /* We use char because int might match the return type of a gcc2
15715 builtin and then its argument prototype would still apply. */
15716 char XtAppInitialize (void);
15722 /* The GNU C library defines stubs for functions which it implements
15723 to always fail with ENOSYS. Some functions are actually named
15724 something starting with __ and the normal name is an alias. */
15725 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
15726 #error found stub for XtAppInitialize
15729 return XtAppInitialize ();
15734 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15735 if { (eval echo "$as_me:15735: \"$ac_link\"") >&5
15736 (eval $ac_link) 2>&5
15738 echo "$as_me:15738: \$? = $ac_status" >&5
15739 (exit "$ac_status"); } &&
15740 { ac_try='test -s "conftest$ac_exeext"'
15741 { (eval echo "$as_me:15741: \"$ac_try\"") >&5
15742 (eval $ac_try) 2>&5
15744 echo "$as_me:15744: \$? = $ac_status" >&5
15745 (exit "$ac_status"); }; }; then
15746 ac_cv_func_XtAppInitialize=yes
15748 echo "$as_me: failed program was:" >&5
15749 cat "conftest.$ac_ext" >&5
15750 ac_cv_func_XtAppInitialize=no
15752 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15754 echo "$as_me:15754: result: $ac_cv_func_XtAppInitialize" >&5
15755 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
15756 if test "$ac_cv_func_XtAppInitialize" = yes; then
15760 echo "$as_me:15760: checking for XtAppInitialize in -lXt" >&5
15761 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
15762 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
15763 echo $ECHO_N "(cached) $ECHO_C" >&6
15765 ac_check_lib_save_LIBS=$LIBS
15767 cat >"conftest.$ac_ext" <<_ACEOF
15768 #line 15768 "configure"
15769 #include "confdefs.h"
15771 /* Override any gcc2 internal prototype to avoid an error. */
15775 /* We use char because int might match the return type of a gcc2
15776 builtin and then its argument prototype would still apply. */
15777 char XtAppInitialize ();
15781 XtAppInitialize ();
15786 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15787 if { (eval echo "$as_me:15787: \"$ac_link\"") >&5
15788 (eval $ac_link) 2>&5
15790 echo "$as_me:15790: \$? = $ac_status" >&5
15791 (exit "$ac_status"); } &&
15792 { ac_try='test -s "conftest$ac_exeext"'
15793 { (eval echo "$as_me:15793: \"$ac_try\"") >&5
15794 (eval $ac_try) 2>&5
15796 echo "$as_me:15796: \$? = $ac_status" >&5
15797 (exit "$ac_status"); }; }; then
15798 ac_cv_lib_Xt_XtAppInitialize=yes
15800 echo "$as_me: failed program was:" >&5
15801 cat "conftest.$ac_ext" >&5
15802 ac_cv_lib_Xt_XtAppInitialize=no
15804 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15805 LIBS=$ac_check_lib_save_LIBS
15807 echo "$as_me:15807: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
15808 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
15809 if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
15811 cat >>confdefs.h <<\EOF
15812 #define HAVE_LIBXT 1
15823 if test "$cf_have_X_LIBS" = no ; then
15824 { echo "$as_me:15824: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15825 test program. You will have to check and add the proper libraries by hand
15827 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15828 test program. You will have to check and add the proper libraries by hand
15829 to makefile." >&2;}
15832 cf_x_athena_root=$cf_x_athena
15835 for cf_path in default \
15836 /usr/contrib/X11R6 \
15837 /usr/contrib/X11R5 \
15841 if test -z "$cf_x_athena_inc" ; then
15843 cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
15844 cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
15845 cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
15846 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15847 for cf_X_CFLAGS in $X_CFLAGS
15849 case "x$cf_X_CFLAGS" in
15851 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15854 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15859 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
15860 if test "$cf_path" != default ; then
15862 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15863 CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
15865 echo "$as_me:15865: checking for $cf_test in $cf_path" >&5
15866 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
15868 echo "$as_me:15868: checking for $cf_test" >&5
15869 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
15871 cat >"conftest.$ac_ext" <<_ACEOF
15872 #line 15872 "configure"
15873 #include "confdefs.h"
15875 #include <X11/Intrinsic.h>
15876 #include <$cf_test>
15885 rm -f "conftest.$ac_objext"
15886 if { (eval echo "$as_me:15886: \"$ac_compile\"") >&5
15887 (eval $ac_compile) 2>&5
15889 echo "$as_me:15889: \$? = $ac_status" >&5
15890 (exit "$ac_status"); } &&
15891 { ac_try='test -s "conftest.$ac_objext"'
15892 { (eval echo "$as_me:15892: \"$ac_try\"") >&5
15893 (eval $ac_try) 2>&5
15895 echo "$as_me:15895: \$? = $ac_status" >&5
15896 (exit "$ac_status"); }; }; then
15899 echo "$as_me: failed program was:" >&5
15900 cat "conftest.$ac_ext" >&5
15903 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15904 echo "$as_me:15904: result: $cf_result" >&5
15905 echo "${ECHO_T}$cf_result" >&6
15907 LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
15908 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
15909 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
15911 if test "$cf_result" = yes ; then
15912 test "$cf_path" = default && cf_x_athena_inc=default
15913 test "$cf_path" != default && cf_x_athena_inc="$cf_path/include"
15919 if test -z "$cf_x_athena_inc" ; then
15920 { echo "$as_me:15920: WARNING: Unable to find Athena header files" >&5
15921 echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
15922 elif test "$cf_x_athena_inc" != default ; then
15924 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15925 CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
15929 cf_x_athena_root=$cf_x_athena
15932 for cf_path in default \
15933 /usr/contrib/X11R6 \
15934 /usr/contrib/X11R5 \
15939 ${cf_x_athena_root} \
15940 ${cf_x_athena_root}7 \
15941 ${cf_x_athena_root}6
15944 "-l$cf_lib -lXmu" \
15945 "-l$cf_lib -lXpm -lXmu" \
15946 "-l${cf_lib}_s -lXmu_s"
15948 test -n "$cf_x_athena_lib" && break
15950 cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
15951 cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
15952 cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
15953 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15954 for cf_X_CFLAGS in $X_CFLAGS
15956 case "x$cf_X_CFLAGS" in
15958 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15961 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15966 cf_test=XawSimpleMenuAddGlobalActions
15967 test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
15969 cf_add_libs="$LIBS"
15972 for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15973 # filter duplicates
15974 for cf_add_1lib in $cf_add_0lib; do
15975 for cf_add_2lib in $cf_add_libs; do
15976 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15981 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15983 LIBS="$cf_add_libs"
15985 echo "$as_me:15985: checking for $cf_test in $cf_libs" >&5
15986 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
15987 cat >"conftest.$ac_ext" <<_ACEOF
15988 #line 15988 "configure"
15989 #include "confdefs.h"
15991 #include <X11/Intrinsic.h>
15992 #include <X11/$cf_x_athena_root/SimpleMenu.h>
15998 $cf_test((XtAppContext) 0)
16003 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16004 if { (eval echo "$as_me:16004: \"$ac_link\"") >&5
16005 (eval $ac_link) 2>&5
16007 echo "$as_me:16007: \$? = $ac_status" >&5
16008 (exit "$ac_status"); } &&
16009 { ac_try='test -s "conftest$ac_exeext"'
16010 { (eval echo "$as_me:16010: \"$ac_try\"") >&5
16011 (eval $ac_try) 2>&5
16013 echo "$as_me:16013: \$? = $ac_status" >&5
16014 (exit "$ac_status"); }; }; then
16017 echo "$as_me: failed program was:" >&5
16018 cat "conftest.$ac_ext" >&5
16021 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16022 echo "$as_me:16022: result: $cf_result" >&5
16023 echo "${ECHO_T}$cf_result" >&6
16025 LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
16026 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
16027 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
16029 if test "$cf_result" = yes ; then
16030 cf_x_athena_lib="$cf_libs"
16034 test -n "$cf_x_athena_lib" && break
16038 if test -z "$cf_x_athena_lib" ; then
16039 { { echo "$as_me:16039: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
16040 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
16041 { (exit 1); exit 1; }; }
16044 cf_add_libs="$LIBS"
16047 for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16048 # filter duplicates
16049 for cf_add_1lib in $cf_add_0lib; do
16050 for cf_add_2lib in $cf_add_libs; do
16051 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16056 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16058 LIBS="$cf_add_libs"
16060 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16062 cat >>confdefs.h <<EOF
16063 #define $cf_x_athena_LIBS 1
16068 if test -n "$ac_tool_prefix"; then
16069 for ac_prog in xcurses-config
16071 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
16072 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
16073 echo "$as_me:16073: checking for $ac_word" >&5
16074 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16075 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
16076 echo $ECHO_N "(cached) $ECHO_C" >&6
16078 if test -n "$XCURSES_CONFIG"; then
16079 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
16081 ac_save_IFS=$IFS; IFS=$ac_path_separator
16083 for ac_dir in $ac_dummy; do
16085 test -z "$ac_dir" && ac_dir=.
16086 $as_executable_p "$ac_dir/$ac_word" || continue
16087 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
16088 echo "$as_me:16088: found $ac_dir/$ac_word" >&5
16094 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
16095 if test -n "$XCURSES_CONFIG"; then
16096 echo "$as_me:16096: result: $XCURSES_CONFIG" >&5
16097 echo "${ECHO_T}$XCURSES_CONFIG" >&6
16099 echo "$as_me:16099: result: no" >&5
16100 echo "${ECHO_T}no" >&6
16103 test -n "$XCURSES_CONFIG" && break
16106 if test -z "$XCURSES_CONFIG"; then
16107 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
16108 for ac_prog in xcurses-config
16110 # Extract the first word of "$ac_prog", so it can be a program name with args.
16111 set dummy $ac_prog; ac_word=$2
16112 echo "$as_me:16112: checking for $ac_word" >&5
16113 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16114 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
16115 echo $ECHO_N "(cached) $ECHO_C" >&6
16117 if test -n "$ac_ct_XCURSES_CONFIG"; then
16118 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
16120 ac_save_IFS=$IFS; IFS=$ac_path_separator
16122 for ac_dir in $ac_dummy; do
16124 test -z "$ac_dir" && ac_dir=.
16125 $as_executable_p "$ac_dir/$ac_word" || continue
16126 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
16127 echo "$as_me:16127: found $ac_dir/$ac_word" >&5
16133 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
16134 if test -n "$ac_ct_XCURSES_CONFIG"; then
16135 echo "$as_me:16135: result: $ac_ct_XCURSES_CONFIG" >&5
16136 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
16138 echo "$as_me:16138: result: no" >&5
16139 echo "${ECHO_T}no" >&6
16142 test -n "$ac_ct_XCURSES_CONFIG" && break
16144 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
16146 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
16149 if test "$XCURSES_CONFIG" != none ; then
16154 cf_new_extra_cppflags=
16156 for cf_add_cflags in `$XCURSES_CONFIG --cflags`
16158 case "$cf_fix_cppflags" in
16160 case "$cf_add_cflags" in
16161 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16162 case "$cf_add_cflags" in
16164 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16166 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16167 && test -z "${cf_tst_cflags}" \
16168 && cf_fix_cppflags=yes
16170 if test "$cf_fix_cppflags" = yes ; then
16172 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16173 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16176 elif test "${cf_tst_cflags}" = "\"'" ; then
16178 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16179 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16185 case "$CPPFLAGS" in
16189 case "$cf_add_cflags" in
16191 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16193 CPPFLAGS=`echo "$CPPFLAGS" | \
16194 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16195 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16200 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16201 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16208 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16209 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16216 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16217 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16219 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16221 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16222 && test -z "${cf_tst_cflags}" \
16223 && cf_fix_cppflags=no
16228 if test -n "$cf_new_cflags" ; then
16230 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16231 CFLAGS="${CFLAGS}$cf_new_cflags"
16235 if test -n "$cf_new_cppflags" ; then
16237 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16238 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16242 if test -n "$cf_new_extra_cppflags" ; then
16244 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16245 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16249 cf_add_libs="$LIBS"
16252 for cf_add_1lib in `$XCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16253 # filter duplicates
16254 for cf_add_1lib in $cf_add_0lib; do
16255 for cf_add_2lib in $cf_add_libs; do
16256 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16261 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16263 LIBS="$cf_add_libs"
16265 cf_cv_lib_XCurses=yes
16269 LDFLAGS="$LDFLAGS $X_LIBS"
16271 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
16273 echo "${as_me:-configure}:16273: testing checking additions to CFLAGS ..." 1>&5
16275 cf_check_cflags="$CFLAGS"
16276 cf_check_cppflags="$CPPFLAGS"
16281 cf_new_extra_cppflags=
16283 for cf_add_cflags in $X_CFLAGS
16285 case "$cf_fix_cppflags" in
16287 case "$cf_add_cflags" in
16288 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16289 case "$cf_add_cflags" in
16291 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16293 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16294 && test -z "${cf_tst_cflags}" \
16295 && cf_fix_cppflags=yes
16297 if test "$cf_fix_cppflags" = yes ; then
16299 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16300 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16303 elif test "${cf_tst_cflags}" = "\"'" ; then
16305 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16306 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16312 case "$CPPFLAGS" in
16316 case "$cf_add_cflags" in
16318 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16320 CPPFLAGS=`echo "$CPPFLAGS" | \
16321 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16322 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16327 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16328 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16335 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16336 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16343 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16344 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16346 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16348 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16349 && test -z "${cf_tst_cflags}" \
16350 && cf_fix_cppflags=no
16355 if test -n "$cf_new_cflags" ; then
16356 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
16358 echo "${as_me:-configure}:16358: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
16360 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16361 CFLAGS="${CFLAGS}$cf_new_cflags"
16365 if test -n "$cf_new_cppflags" ; then
16366 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
16368 echo "${as_me:-configure}:16368: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
16370 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16371 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16375 if test -n "$cf_new_extra_cppflags" ; then
16376 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
16378 echo "${as_me:-configure}:16378: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
16380 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16381 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16385 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
16386 cat >"conftest.$ac_ext" <<_ACEOF
16387 #line 16387 "configure"
16388 #include "confdefs.h"
16393 printf("Hello world");
16398 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16399 if { (eval echo "$as_me:16399: \"$ac_link\"") >&5
16400 (eval $ac_link) 2>&5
16402 echo "$as_me:16402: \$? = $ac_status" >&5
16403 (exit "$ac_status"); } &&
16404 { ac_try='test -s "conftest$ac_exeext"'
16405 { (eval echo "$as_me:16405: \"$ac_try\"") >&5
16406 (eval $ac_try) 2>&5
16408 echo "$as_me:16408: \$? = $ac_status" >&5
16409 (exit "$ac_status"); }; }; then
16412 echo "$as_me: failed program was:" >&5
16413 cat "conftest.$ac_ext" >&5
16414 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
16416 echo "${as_me:-configure}:16416: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
16418 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
16419 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
16421 echo "${as_me:-configure}:16421: testing but keeping change to \$CPPFLAGS ..." 1>&5
16424 CFLAGS="$cf_check_cflags"
16426 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16429 echo "$as_me:16429: checking for XOpenDisplay in -lX11" >&5
16430 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
16431 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
16432 echo $ECHO_N "(cached) $ECHO_C" >&6
16434 ac_check_lib_save_LIBS=$LIBS
16435 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
16436 cat >"conftest.$ac_ext" <<_ACEOF
16437 #line 16437 "configure"
16438 #include "confdefs.h"
16440 /* Override any gcc2 internal prototype to avoid an error. */
16444 /* We use char because int might match the return type of a gcc2
16445 builtin and then its argument prototype would still apply. */
16446 char XOpenDisplay ();
16455 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16456 if { (eval echo "$as_me:16456: \"$ac_link\"") >&5
16457 (eval $ac_link) 2>&5
16459 echo "$as_me:16459: \$? = $ac_status" >&5
16460 (exit "$ac_status"); } &&
16461 { ac_try='test -s "conftest$ac_exeext"'
16462 { (eval echo "$as_me:16462: \"$ac_try\"") >&5
16463 (eval $ac_try) 2>&5
16465 echo "$as_me:16465: \$? = $ac_status" >&5
16466 (exit "$ac_status"); }; }; then
16467 ac_cv_lib_X11_XOpenDisplay=yes
16469 echo "$as_me: failed program was:" >&5
16470 cat "conftest.$ac_ext" >&5
16471 ac_cv_lib_X11_XOpenDisplay=no
16473 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16474 LIBS=$ac_check_lib_save_LIBS
16476 echo "$as_me:16476: result: $ac_cv_lib_X11_XOpenDisplay" >&5
16477 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
16478 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
16480 cf_add_libs="$LIBS"
16483 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16484 # filter duplicates
16485 for cf_add_1lib in $cf_add_0lib; do
16486 for cf_add_2lib in $cf_add_libs; do
16487 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16492 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16494 LIBS="$cf_add_libs"
16498 echo "$as_me:16498: checking for XCurses library" >&5
16499 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
16500 if test "${cf_cv_lib_XCurses+set}" = set; then
16501 echo $ECHO_N "(cached) $ECHO_C" >&6
16504 cf_add_libs="$LIBS"
16507 for cf_add_1lib in -lXCurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16508 # filter duplicates
16509 for cf_add_1lib in $cf_add_0lib; do
16510 for cf_add_2lib in $cf_add_libs; do
16511 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16516 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16518 LIBS="$cf_add_libs"
16520 cat >"conftest.$ac_ext" <<_ACEOF
16521 #line 16521 "configure"
16522 #include "confdefs.h"
16524 #include <xcurses.h>
16525 char *XCursesProgramName = "test";
16535 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16536 if { (eval echo "$as_me:16536: \"$ac_link\"") >&5
16537 (eval $ac_link) 2>&5
16539 echo "$as_me:16539: \$? = $ac_status" >&5
16540 (exit "$ac_status"); } &&
16541 { ac_try='test -s "conftest$ac_exeext"'
16542 { (eval echo "$as_me:16542: \"$ac_try\"") >&5
16543 (eval $ac_try) 2>&5
16545 echo "$as_me:16545: \$? = $ac_status" >&5
16546 (exit "$ac_status"); }; }; then
16547 cf_cv_lib_XCurses=yes
16549 echo "$as_me: failed program was:" >&5
16550 cat "conftest.$ac_ext" >&5
16551 cf_cv_lib_XCurses=no
16553 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16556 echo "$as_me:16556: result: $cf_cv_lib_XCurses" >&5
16557 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
16561 if test "$cf_cv_lib_XCurses" = yes ; then
16563 cat >>confdefs.h <<\EOF
16567 cat >>confdefs.h <<\EOF
16571 echo "$as_me:16571: checking for xcurses.h" >&5
16572 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
16573 if test "${ac_cv_header_xcurses_h+set}" = set; then
16574 echo $ECHO_N "(cached) $ECHO_C" >&6
16576 cat >"conftest.$ac_ext" <<_ACEOF
16577 #line 16577 "configure"
16578 #include "confdefs.h"
16579 #include <xcurses.h>
16581 if { (eval echo "$as_me:16581: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16582 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16584 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16586 cat conftest.err >&5
16587 echo "$as_me:16587: \$? = $ac_status" >&5
16588 (exit "$ac_status"); } >/dev/null; then
16589 if test -s conftest.err; then
16590 ac_cpp_err=$ac_c_preproc_warn_flag
16597 if test -z "$ac_cpp_err"; then
16598 ac_cv_header_xcurses_h=yes
16600 echo "$as_me: failed program was:" >&5
16601 cat "conftest.$ac_ext" >&5
16602 ac_cv_header_xcurses_h=no
16604 rm -f conftest.err "conftest.$ac_ext"
16606 echo "$as_me:16606: result: $ac_cv_header_xcurses_h" >&5
16607 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
16608 if test "$ac_cv_header_xcurses_h" = yes; then
16610 cat >>confdefs.h <<\EOF
16611 #define HAVE_XCURSES 1
16617 { { echo "$as_me:16617: error: Cannot link with XCurses" >&5
16618 echo "$as_me: error: Cannot link with XCurses" >&2;}
16619 { (exit 1); exit 1; }; }
16624 { { echo "$as_me:16624: error: unexpected screen-value: $cf_cv_screen" >&5
16625 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
16626 { (exit 1); exit 1; }; }
16630 : ${cf_nculib_root:=$cf_cv_screen}
16631 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
16632 echo "$as_me:16632: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
16633 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
16634 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16635 echo $ECHO_N "(cached) $ECHO_C" >&6
16637 ac_check_lib_save_LIBS=$LIBS
16638 LIBS="-l$cf_nculib_root $LIBS"
16639 cat >"conftest.$ac_ext" <<_ACEOF
16640 #line 16640 "configure"
16641 #include "confdefs.h"
16643 /* Override any gcc2 internal prototype to avoid an error. */
16647 /* We use char because int might match the return type of a gcc2
16648 builtin and then its argument prototype would still apply. */
16649 char _nc_init_pthreads ();
16653 _nc_init_pthreads ();
16658 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16659 if { (eval echo "$as_me:16659: \"$ac_link\"") >&5
16660 (eval $ac_link) 2>&5
16662 echo "$as_me:16662: \$? = $ac_status" >&5
16663 (exit "$ac_status"); } &&
16664 { ac_try='test -s "conftest$ac_exeext"'
16665 { (eval echo "$as_me:16665: \"$ac_try\"") >&5
16666 (eval $ac_try) 2>&5
16668 echo "$as_me:16668: \$? = $ac_status" >&5
16669 (exit "$ac_status"); }; }; then
16670 eval "$as_ac_Lib=yes"
16672 echo "$as_me: failed program was:" >&5
16673 cat "conftest.$ac_ext" >&5
16674 eval "$as_ac_Lib=no"
16676 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16677 LIBS=$ac_check_lib_save_LIBS
16679 echo "$as_me:16679: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
16680 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
16681 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
16682 cf_cv_ncurses_pthreads=yes
16684 cf_cv_ncurses_pthreads=no
16687 if test "$cf_cv_ncurses_pthreads" = yes
16690 cf_add_libs="$LIBS"
16693 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16694 # filter duplicates
16695 for cf_add_1lib in $cf_add_0lib; do
16696 for cf_add_2lib in $cf_add_libs; do
16697 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16702 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16704 LIBS="$cf_add_libs"
16708 case $cf_cv_screen in
16710 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
16714 echo "$as_me:16714: checking for X11 rgb file" >&5
16715 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
16717 # Check whether --with-x11-rgb or --without-x11-rgb was given.
16718 if test "${with_x11_rgb+set}" = set; then
16719 withval="$with_x11_rgb"
16725 if test "x$RGB_PATH" = xauto
16727 RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
16729 /opt/local/share/X11/rgb.txt \
16730 /opt/X11/share/X11/rgb.txt \
16731 /usr/share/X11/rgb.txt \
16732 /usr/X11/share/X11/rgb.txt \
16733 /usr/X11/lib/X11/rgb.txt \
16734 /usr/lib/X11/rgb.txt \
16736 /usr/pkg/lib/X11/rgb.txt \
16737 /usr/X11R7/lib/X11/rgb.txt \
16738 /usr/X11R6/lib/X11/rgb.txt \
16739 /usr/X11R5/lib/X11/rgb.txt \
16740 /usr/X11R4/lib/X11/rgb.txt \
16741 /usr/local/lib/X11/rgb.txt \
16742 /usr/local/share/X11/rgb.txt \
16743 /usr/lib64/X11/rgb.txt
16745 if test -f "$cf_path" ; then
16746 RGB_PATH="$cf_path"
16753 if test "x$prefix" != xNONE; then
16754 cf_path_syntax="$prefix"
16756 cf_path_syntax="$ac_default_prefix"
16759 case ".$cf_path" in
16760 (.\$\(*\)*|.\'*\'*)
16764 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
16766 (.\$\{*prefix\}*|.\$\{*dir\}*)
16767 eval cf_path="$cf_path"
16768 case ".$cf_path" in
16770 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
16775 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
16778 { { echo "$as_me:16778: error: expected a pathname, not \"$cf_path\"" >&5
16779 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
16780 { (exit 1); exit 1; }; }
16786 echo "$as_me:16786: result: $RGB_PATH" >&5
16787 echo "${ECHO_T}$RGB_PATH" >&6
16789 cat >>confdefs.h <<EOF
16790 #define RGB_PATH "$cf_path"
16794 if test "$RGB_PATH" = no
16801 case $cf_cv_screen in
16803 cf_default_panel=no
16806 cf_default_tinfo=no
16808 (xcurses|bsdcurses)
16809 cf_default_panel=no
16812 cf_default_tinfo=yes
16815 cf_default_panel=yes
16816 cf_default_form=yes
16817 cf_default_menu=yes
16818 cf_default_tinfo=yes
16819 case $cf_cv_screen in
16821 cf_curses_headers="nc_alloc.h nomacros.h term_entry.h"
16827 echo "$as_me:16827: checking for desired basename for form library" >&5
16828 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
16830 # Check whether --with-form-libname or --without-form-libname was given.
16831 if test "${with_form_libname+set}" = set; then
16832 withval="$with_form_libname"
16833 with_lib_basename=$withval
16835 with_lib_basename=form
16837 FORM_NAME="$with_lib_basename"
16839 case "x$FORM_NAME" in
16847 echo "$as_me:16847: result: $FORM_NAME" >&5
16848 echo "${ECHO_T}$FORM_NAME" >&6
16850 echo "$as_me:16850: checking for desired basename for menu library" >&5
16851 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
16853 # Check whether --with-menu-libname or --without-menu-libname was given.
16854 if test "${with_menu_libname+set}" = set; then
16855 withval="$with_menu_libname"
16856 with_lib_basename=$withval
16858 with_lib_basename=menu
16860 MENU_NAME="$with_lib_basename"
16862 case "x$MENU_NAME" in
16870 echo "$as_me:16870: result: $MENU_NAME" >&5
16871 echo "${ECHO_T}$MENU_NAME" >&6
16873 echo "$as_me:16873: checking for desired basename for panel library" >&5
16874 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
16876 # Check whether --with-panel-libname or --without-panel-libname was given.
16877 if test "${with_panel_libname+set}" = set; then
16878 withval="$with_panel_libname"
16879 with_lib_basename=$withval
16881 with_lib_basename=panel
16883 PANEL_NAME="$with_lib_basename"
16885 case "x$PANEL_NAME" in
16893 echo "$as_me:16893: result: $PANEL_NAME" >&5
16894 echo "${ECHO_T}$PANEL_NAME" >&6
16896 echo "$as_me:16896: checking if you want to check for panel functions" >&5
16897 echo $ECHO_N "checking if you want to check for panel functions... $ECHO_C" >&6
16899 # Check whether --enable-panel or --disable-panel was given.
16900 if test "${enable_panel+set}" = set; then
16901 enableval="$enable_panel"
16902 test "$enableval" != no && enableval=yes
16903 if test "$enableval" != "yes" ; then
16906 cf_enable_panel=$cf_default_panel
16910 cf_enable_panel=$cf_default_panel
16913 echo "$as_me:16913: result: $cf_enable_panel" >&5
16914 echo "${ECHO_T}$cf_enable_panel" >&6
16915 if test $cf_enable_panel = yes
16918 cf_have_curses_lib=no
16920 : ${NCURSES_CONFIG_PKG:=none}
16921 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16923 elif test "x${PKG_CONFIG:=none}" != xnone; then
16924 echo "$as_me:16924: checking pkg-config for $PANEL_NAME$cf_cv_libtype" >&5
16925 echo $ECHO_N "checking pkg-config for $PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
16926 if "$PKG_CONFIG" --exists "$PANEL_NAME$cf_cv_libtype" ; then
16927 echo "$as_me:16927: result: yes" >&5
16928 echo "${ECHO_T}yes" >&6
16930 echo "$as_me:16930: checking if the $PANEL_NAME$cf_cv_libtype package files work" >&5
16931 echo $ECHO_N "checking if the $PANEL_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
16933 cf_save_CPPFLAGS="$CPPFLAGS"
16934 cf_save_LIBS="$LIBS"
16939 cf_new_extra_cppflags=
16941 for cf_add_cflags in `$PKG_CONFIG --cflags "$PANEL_NAME$cf_cv_libtype"`
16943 case "$cf_fix_cppflags" in
16945 case "$cf_add_cflags" in
16946 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16947 case "$cf_add_cflags" in
16949 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16951 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16952 && test -z "${cf_tst_cflags}" \
16953 && cf_fix_cppflags=yes
16955 if test "$cf_fix_cppflags" = yes ; then
16957 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16958 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16961 elif test "${cf_tst_cflags}" = "\"'" ; then
16963 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16964 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16970 case "$CPPFLAGS" in
16974 case "$cf_add_cflags" in
16976 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16978 CPPFLAGS=`echo "$CPPFLAGS" | \
16979 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16980 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16985 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16986 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16993 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16994 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17001 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17002 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17004 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17006 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17007 && test -z "${cf_tst_cflags}" \
17008 && cf_fix_cppflags=no
17013 if test -n "$cf_new_cflags" ; then
17015 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17016 CFLAGS="${CFLAGS}$cf_new_cflags"
17020 if test -n "$cf_new_cppflags" ; then
17022 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17023 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17027 if test -n "$cf_new_extra_cppflags" ; then
17029 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17030 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17034 cf_add_libs="$LIBS"
17037 for cf_add_1lib in `$PKG_CONFIG --libs "$PANEL_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17038 # filter duplicates
17039 for cf_add_1lib in $cf_add_0lib; do
17040 for cf_add_2lib in $cf_add_libs; do
17041 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17046 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17048 LIBS="$cf_add_libs"
17050 cat >"conftest.$ac_ext" <<_ACEOF
17051 #line 17051 "configure"
17052 #include "confdefs.h"
17053 #include <$PANEL_NAME.h>
17057 (void) new_panel ( 0 );
17062 rm -f "conftest.$ac_objext" "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"); } &&
17068 { ac_try='test -s "conftest$ac_exeext"'
17069 { (eval echo "$as_me:17069: \"$ac_try\"") >&5
17070 (eval $ac_try) 2>&5
17072 echo "$as_me:17072: \$? = $ac_status" >&5
17073 (exit "$ac_status"); }; }; then
17074 if test "$cross_compiling" = yes; then
17075 cf_have_curses_lib=maybe
17077 cat >"conftest.$ac_ext" <<_ACEOF
17078 #line 17078 "configure"
17079 #include "confdefs.h"
17080 #include <$PANEL_NAME.h>
17082 { (void) new_panel ( 0 ); return 0; }
17084 rm -f "conftest$ac_exeext"
17085 if { (eval echo "$as_me:17085: \"$ac_link\"") >&5
17086 (eval $ac_link) 2>&5
17088 echo "$as_me:17088: \$? = $ac_status" >&5
17089 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17090 { (eval echo "$as_me:17090: \"$ac_try\"") >&5
17091 (eval $ac_try) 2>&5
17093 echo "$as_me:17093: \$? = $ac_status" >&5
17094 (exit "$ac_status"); }; }; then
17095 cf_have_curses_lib=yes
17097 echo "$as_me: program exited with status $ac_status" >&5
17098 echo "$as_me: failed program was:" >&5
17099 cat "conftest.$ac_ext" >&5
17100 cf_have_curses_lib=no
17102 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17105 echo "$as_me: failed program was:" >&5
17106 cat "conftest.$ac_ext" >&5
17107 cf_have_curses_lib=no
17109 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17110 echo "$as_me:17110: result: $cf_have_curses_lib" >&5
17111 echo "${ECHO_T}$cf_have_curses_lib" >&6
17112 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17113 if test "$cf_have_curses_lib" != "yes"
17115 CPPFLAGS="$cf_save_CPPFLAGS"
17116 LIBS="$cf_save_LIBS"
17119 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17121 cat >>confdefs.h <<EOF
17122 #define $cf_upper 1
17128 if test "$cf_have_curses_lib" = no; then
17129 as_ac_Lib=`echo "ac_cv_lib_$PANEL_NAME$cf_cv_libtype''_new_panel" | $as_tr_sh`
17130 echo "$as_me:17130: checking for new_panel in -l$PANEL_NAME$cf_cv_libtype" >&5
17131 echo $ECHO_N "checking for new_panel in -l$PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
17132 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17133 echo $ECHO_N "(cached) $ECHO_C" >&6
17135 ac_check_lib_save_LIBS=$LIBS
17136 LIBS="-l$PANEL_NAME$cf_cv_libtype $LIBS"
17137 cat >"conftest.$ac_ext" <<_ACEOF
17138 #line 17138 "configure"
17139 #include "confdefs.h"
17141 /* Override any gcc2 internal prototype to avoid an error. */
17145 /* We use char because int might match the return type of a gcc2
17146 builtin and then its argument prototype would still apply. */
17156 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17157 if { (eval echo "$as_me:17157: \"$ac_link\"") >&5
17158 (eval $ac_link) 2>&5
17160 echo "$as_me:17160: \$? = $ac_status" >&5
17161 (exit "$ac_status"); } &&
17162 { ac_try='test -s "conftest$ac_exeext"'
17163 { (eval echo "$as_me:17163: \"$ac_try\"") >&5
17164 (eval $ac_try) 2>&5
17166 echo "$as_me:17166: \$? = $ac_status" >&5
17167 (exit "$ac_status"); }; }; then
17168 eval "$as_ac_Lib=yes"
17170 echo "$as_me: failed program was:" >&5
17171 cat "conftest.$ac_ext" >&5
17172 eval "$as_ac_Lib=no"
17174 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17175 LIBS=$ac_check_lib_save_LIBS
17177 echo "$as_me:17177: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
17178 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
17179 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
17181 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17183 cf_add_libs="$LIBS"
17186 for cf_add_1lib in -l$PANEL_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17187 # filter duplicates
17188 for cf_add_1lib in $cf_add_0lib; do
17189 for cf_add_2lib in $cf_add_libs; do
17190 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17195 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17197 LIBS="$cf_add_libs"
17199 cat >>confdefs.h <<EOF
17200 #define $cf_upper 1
17207 cf_curses_headers="$cf_curses_headers panel.h"
17210 echo "$as_me:17210: checking if you want to check for menu functions" >&5
17211 echo $ECHO_N "checking if you want to check for menu functions... $ECHO_C" >&6
17213 # Check whether --enable-menu or --disable-menu was given.
17214 if test "${enable_menu+set}" = set; then
17215 enableval="$enable_menu"
17216 test "$enableval" != no && enableval=yes
17217 if test "$enableval" != "yes" ; then
17220 cf_enable_menu=$cf_default_menu
17224 cf_enable_menu=$cf_default_menu
17227 echo "$as_me:17227: result: $cf_enable_menu" >&5
17228 echo "${ECHO_T}$cf_enable_menu" >&6
17229 if test $cf_enable_menu = yes
17231 case $cf_cv_screen in
17236 echo "$as_me:17236: checking for NetBSD menu.h" >&5
17237 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
17238 if test "${cf_cv_netbsd_menu_h+set}" = set; then
17239 echo $ECHO_N "(cached) $ECHO_C" >&6
17242 cat >"conftest.$ac_ext" <<_ACEOF
17243 #line 17243 "configure"
17244 #include "confdefs.h"
17246 #include <${cf_cv_ncurses_header:-curses.h}>
17254 int y = menu->max_item_width;
17260 rm -f "conftest.$ac_objext"
17261 if { (eval echo "$as_me:17261: \"$ac_compile\"") >&5
17262 (eval $ac_compile) 2>&5
17264 echo "$as_me:17264: \$? = $ac_status" >&5
17265 (exit "$ac_status"); } &&
17266 { ac_try='test -s "conftest.$ac_objext"'
17267 { (eval echo "$as_me:17267: \"$ac_try\"") >&5
17268 (eval $ac_try) 2>&5
17270 echo "$as_me:17270: \$? = $ac_status" >&5
17271 (exit "$ac_status"); }; }; then
17272 cf_cv_netbsd_menu_h=yes
17275 echo "$as_me: failed program was:" >&5
17276 cat "conftest.$ac_ext" >&5
17277 cf_cv_netbsd_menu_h=no
17279 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17282 echo "$as_me:17282: result: $cf_cv_netbsd_menu_h" >&5
17283 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
17285 test "$cf_cv_netbsd_menu_h" = yes &&
17286 cat >>confdefs.h <<\EOF
17287 #define HAVE_NETBSD_MENU_H 1
17293 cf_have_curses_lib=no
17295 : ${NCURSES_CONFIG_PKG:=none}
17296 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
17298 elif test "x${PKG_CONFIG:=none}" != xnone; then
17299 echo "$as_me:17299: checking pkg-config for $MENU_NAME$cf_cv_libtype" >&5
17300 echo $ECHO_N "checking pkg-config for $MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
17301 if "$PKG_CONFIG" --exists "$MENU_NAME$cf_cv_libtype" ; then
17302 echo "$as_me:17302: result: yes" >&5
17303 echo "${ECHO_T}yes" >&6
17305 echo "$as_me:17305: checking if the $MENU_NAME$cf_cv_libtype package files work" >&5
17306 echo $ECHO_N "checking if the $MENU_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
17308 cf_save_CPPFLAGS="$CPPFLAGS"
17309 cf_save_LIBS="$LIBS"
17314 cf_new_extra_cppflags=
17316 for cf_add_cflags in `$PKG_CONFIG --cflags "$MENU_NAME$cf_cv_libtype"`
17318 case "$cf_fix_cppflags" in
17320 case "$cf_add_cflags" in
17321 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17322 case "$cf_add_cflags" in
17324 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17326 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17327 && test -z "${cf_tst_cflags}" \
17328 && cf_fix_cppflags=yes
17330 if test "$cf_fix_cppflags" = yes ; then
17332 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17333 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17336 elif test "${cf_tst_cflags}" = "\"'" ; then
17338 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17339 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17345 case "$CPPFLAGS" in
17349 case "$cf_add_cflags" in
17351 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17353 CPPFLAGS=`echo "$CPPFLAGS" | \
17354 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17355 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17360 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17361 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17368 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17369 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17376 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17377 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17379 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17381 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17382 && test -z "${cf_tst_cflags}" \
17383 && cf_fix_cppflags=no
17388 if test -n "$cf_new_cflags" ; then
17390 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17391 CFLAGS="${CFLAGS}$cf_new_cflags"
17395 if test -n "$cf_new_cppflags" ; then
17397 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17398 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17402 if test -n "$cf_new_extra_cppflags" ; then
17404 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17405 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17409 cf_add_libs="$LIBS"
17412 for cf_add_1lib in `$PKG_CONFIG --libs "$MENU_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17413 # filter duplicates
17414 for cf_add_1lib in $cf_add_0lib; do
17415 for cf_add_2lib in $cf_add_libs; do
17416 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17421 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17423 LIBS="$cf_add_libs"
17425 cat >"conftest.$ac_ext" <<_ACEOF
17426 #line 17426 "configure"
17427 #include "confdefs.h"
17428 #include <$MENU_NAME.h>
17432 (void) menu_driver ( 0,0 );
17437 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17438 if { (eval echo "$as_me:17438: \"$ac_link\"") >&5
17439 (eval $ac_link) 2>&5
17441 echo "$as_me:17441: \$? = $ac_status" >&5
17442 (exit "$ac_status"); } &&
17443 { ac_try='test -s "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 if test "$cross_compiling" = yes; then
17450 cf_have_curses_lib=maybe
17452 cat >"conftest.$ac_ext" <<_ACEOF
17453 #line 17453 "configure"
17454 #include "confdefs.h"
17455 #include <$MENU_NAME.h>
17457 { (void) menu_driver ( 0,0 ); return 0; }
17459 rm -f "conftest$ac_exeext"
17460 if { (eval echo "$as_me:17460: \"$ac_link\"") >&5
17461 (eval $ac_link) 2>&5
17463 echo "$as_me:17463: \$? = $ac_status" >&5
17464 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17465 { (eval echo "$as_me:17465: \"$ac_try\"") >&5
17466 (eval $ac_try) 2>&5
17468 echo "$as_me:17468: \$? = $ac_status" >&5
17469 (exit "$ac_status"); }; }; then
17470 cf_have_curses_lib=yes
17472 echo "$as_me: program exited with status $ac_status" >&5
17473 echo "$as_me: failed program was:" >&5
17474 cat "conftest.$ac_ext" >&5
17475 cf_have_curses_lib=no
17477 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17480 echo "$as_me: failed program was:" >&5
17481 cat "conftest.$ac_ext" >&5
17482 cf_have_curses_lib=no
17484 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17485 echo "$as_me:17485: result: $cf_have_curses_lib" >&5
17486 echo "${ECHO_T}$cf_have_curses_lib" >&6
17487 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17488 if test "$cf_have_curses_lib" != "yes"
17490 CPPFLAGS="$cf_save_CPPFLAGS"
17491 LIBS="$cf_save_LIBS"
17494 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17496 cat >>confdefs.h <<EOF
17497 #define $cf_upper 1
17503 if test "$cf_have_curses_lib" = no; then
17504 as_ac_Lib=`echo "ac_cv_lib_$MENU_NAME$cf_cv_libtype''_menu_driver" | $as_tr_sh`
17505 echo "$as_me:17505: checking for menu_driver in -l$MENU_NAME$cf_cv_libtype" >&5
17506 echo $ECHO_N "checking for menu_driver in -l$MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
17507 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17508 echo $ECHO_N "(cached) $ECHO_C" >&6
17510 ac_check_lib_save_LIBS=$LIBS
17511 LIBS="-l$MENU_NAME$cf_cv_libtype $LIBS"
17512 cat >"conftest.$ac_ext" <<_ACEOF
17513 #line 17513 "configure"
17514 #include "confdefs.h"
17516 /* Override any gcc2 internal prototype to avoid an error. */
17520 /* We use char because int might match the return type of a gcc2
17521 builtin and then its argument prototype would still apply. */
17522 char menu_driver ();
17531 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17532 if { (eval echo "$as_me:17532: \"$ac_link\"") >&5
17533 (eval $ac_link) 2>&5
17535 echo "$as_me:17535: \$? = $ac_status" >&5
17536 (exit "$ac_status"); } &&
17537 { ac_try='test -s "conftest$ac_exeext"'
17538 { (eval echo "$as_me:17538: \"$ac_try\"") >&5
17539 (eval $ac_try) 2>&5
17541 echo "$as_me:17541: \$? = $ac_status" >&5
17542 (exit "$ac_status"); }; }; then
17543 eval "$as_ac_Lib=yes"
17545 echo "$as_me: failed program was:" >&5
17546 cat "conftest.$ac_ext" >&5
17547 eval "$as_ac_Lib=no"
17549 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17550 LIBS=$ac_check_lib_save_LIBS
17552 echo "$as_me:17552: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
17553 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
17554 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
17556 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17558 cf_add_libs="$LIBS"
17561 for cf_add_1lib in -l$MENU_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17562 # filter duplicates
17563 for cf_add_1lib in $cf_add_0lib; do
17564 for cf_add_2lib in $cf_add_libs; do
17565 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17570 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17572 LIBS="$cf_add_libs"
17574 cat >>confdefs.h <<EOF
17575 #define $cf_upper 1
17582 cf_curses_headers="$cf_curses_headers menu.h"
17585 echo "$as_me:17585: checking if you want to check for form functions" >&5
17586 echo $ECHO_N "checking if you want to check for form functions... $ECHO_C" >&6
17588 # Check whether --enable-form or --disable-form was given.
17589 if test "${enable_form+set}" = set; then
17590 enableval="$enable_form"
17591 test "$enableval" != no && enableval=yes
17592 if test "$enableval" != "yes" ; then
17595 cf_enable_form=$cf_default_form
17599 cf_enable_form=$cf_default_form
17602 echo "$as_me:17602: result: $cf_enable_form" >&5
17603 echo "${ECHO_T}$cf_enable_form" >&6
17604 if test $cf_enable_form = yes
17606 case $cf_cv_screen in
17611 echo "$as_me:17611: checking for NetBSD form.h" >&5
17612 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
17613 if test "${cf_cv_netbsd_form_h+set}" = set; then
17614 echo $ECHO_N "(cached) $ECHO_C" >&6
17617 cat >"conftest.$ac_ext" <<_ACEOF
17618 #line 17618 "configure"
17619 #include "confdefs.h"
17621 #include <${cf_cv_ncurses_header:-curses.h}>
17629 int y = current_field(form)->cursor_ypos;
17630 int x = current_field(form)->cursor_xpos;
17636 rm -f "conftest.$ac_objext"
17637 if { (eval echo "$as_me:17637: \"$ac_compile\"") >&5
17638 (eval $ac_compile) 2>&5
17640 echo "$as_me:17640: \$? = $ac_status" >&5
17641 (exit "$ac_status"); } &&
17642 { ac_try='test -s "conftest.$ac_objext"'
17643 { (eval echo "$as_me:17643: \"$ac_try\"") >&5
17644 (eval $ac_try) 2>&5
17646 echo "$as_me:17646: \$? = $ac_status" >&5
17647 (exit "$ac_status"); }; }; then
17648 cf_cv_netbsd_form_h=yes
17651 echo "$as_me: failed program was:" >&5
17652 cat "conftest.$ac_ext" >&5
17653 cf_cv_netbsd_form_h=no
17655 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17658 echo "$as_me:17658: result: $cf_cv_netbsd_form_h" >&5
17659 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
17661 test "$cf_cv_netbsd_form_h" = yes &&
17662 cat >>confdefs.h <<\EOF
17663 #define HAVE_NETBSD_FORM_H 1
17669 cf_have_curses_lib=no
17671 : ${NCURSES_CONFIG_PKG:=none}
17672 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
17674 elif test "x${PKG_CONFIG:=none}" != xnone; then
17675 echo "$as_me:17675: checking pkg-config for $FORM_NAME$cf_cv_libtype" >&5
17676 echo $ECHO_N "checking pkg-config for $FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
17677 if "$PKG_CONFIG" --exists "$FORM_NAME$cf_cv_libtype" ; then
17678 echo "$as_me:17678: result: yes" >&5
17679 echo "${ECHO_T}yes" >&6
17681 echo "$as_me:17681: checking if the $FORM_NAME$cf_cv_libtype package files work" >&5
17682 echo $ECHO_N "checking if the $FORM_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
17684 cf_save_CPPFLAGS="$CPPFLAGS"
17685 cf_save_LIBS="$LIBS"
17690 cf_new_extra_cppflags=
17692 for cf_add_cflags in `$PKG_CONFIG --cflags "$FORM_NAME$cf_cv_libtype"`
17694 case "$cf_fix_cppflags" in
17696 case "$cf_add_cflags" in
17697 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17698 case "$cf_add_cflags" in
17700 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17702 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17703 && test -z "${cf_tst_cflags}" \
17704 && cf_fix_cppflags=yes
17706 if test "$cf_fix_cppflags" = yes ; then
17708 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17709 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17712 elif test "${cf_tst_cflags}" = "\"'" ; then
17714 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17715 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17721 case "$CPPFLAGS" in
17725 case "$cf_add_cflags" in
17727 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17729 CPPFLAGS=`echo "$CPPFLAGS" | \
17730 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17731 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17736 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17737 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17744 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17745 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17752 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17753 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17755 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17757 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17758 && test -z "${cf_tst_cflags}" \
17759 && cf_fix_cppflags=no
17764 if test -n "$cf_new_cflags" ; then
17766 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17767 CFLAGS="${CFLAGS}$cf_new_cflags"
17771 if test -n "$cf_new_cppflags" ; then
17773 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17774 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17778 if test -n "$cf_new_extra_cppflags" ; then
17780 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17781 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17785 cf_add_libs="$LIBS"
17788 for cf_add_1lib in `$PKG_CONFIG --libs "$FORM_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17789 # filter duplicates
17790 for cf_add_1lib in $cf_add_0lib; do
17791 for cf_add_2lib in $cf_add_libs; do
17792 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17797 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17799 LIBS="$cf_add_libs"
17801 cat >"conftest.$ac_ext" <<_ACEOF
17802 #line 17802 "configure"
17803 #include "confdefs.h"
17804 #include <$FORM_NAME.h>
17808 (void) form_driver ( 0,0 );
17813 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17814 if { (eval echo "$as_me:17814: \"$ac_link\"") >&5
17815 (eval $ac_link) 2>&5
17817 echo "$as_me:17817: \$? = $ac_status" >&5
17818 (exit "$ac_status"); } &&
17819 { ac_try='test -s "conftest$ac_exeext"'
17820 { (eval echo "$as_me:17820: \"$ac_try\"") >&5
17821 (eval $ac_try) 2>&5
17823 echo "$as_me:17823: \$? = $ac_status" >&5
17824 (exit "$ac_status"); }; }; then
17825 if test "$cross_compiling" = yes; then
17826 cf_have_curses_lib=maybe
17828 cat >"conftest.$ac_ext" <<_ACEOF
17829 #line 17829 "configure"
17830 #include "confdefs.h"
17831 #include <$FORM_NAME.h>
17833 { (void) form_driver ( 0,0 ); return 0; }
17835 rm -f "conftest$ac_exeext"
17836 if { (eval echo "$as_me:17836: \"$ac_link\"") >&5
17837 (eval $ac_link) 2>&5
17839 echo "$as_me:17839: \$? = $ac_status" >&5
17840 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17841 { (eval echo "$as_me:17841: \"$ac_try\"") >&5
17842 (eval $ac_try) 2>&5
17844 echo "$as_me:17844: \$? = $ac_status" >&5
17845 (exit "$ac_status"); }; }; then
17846 cf_have_curses_lib=yes
17848 echo "$as_me: program exited with status $ac_status" >&5
17849 echo "$as_me: failed program was:" >&5
17850 cat "conftest.$ac_ext" >&5
17851 cf_have_curses_lib=no
17853 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17856 echo "$as_me: failed program was:" >&5
17857 cat "conftest.$ac_ext" >&5
17858 cf_have_curses_lib=no
17860 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17861 echo "$as_me:17861: result: $cf_have_curses_lib" >&5
17862 echo "${ECHO_T}$cf_have_curses_lib" >&6
17863 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17864 if test "$cf_have_curses_lib" != "yes"
17866 CPPFLAGS="$cf_save_CPPFLAGS"
17867 LIBS="$cf_save_LIBS"
17870 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17872 cat >>confdefs.h <<EOF
17873 #define $cf_upper 1
17879 if test "$cf_have_curses_lib" = no; then
17880 as_ac_Lib=`echo "ac_cv_lib_$FORM_NAME$cf_cv_libtype''_form_driver" | $as_tr_sh`
17881 echo "$as_me:17881: checking for form_driver in -l$FORM_NAME$cf_cv_libtype" >&5
17882 echo $ECHO_N "checking for form_driver in -l$FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
17883 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17884 echo $ECHO_N "(cached) $ECHO_C" >&6
17886 ac_check_lib_save_LIBS=$LIBS
17887 LIBS="-l$FORM_NAME$cf_cv_libtype $LIBS"
17888 cat >"conftest.$ac_ext" <<_ACEOF
17889 #line 17889 "configure"
17890 #include "confdefs.h"
17892 /* Override any gcc2 internal prototype to avoid an error. */
17896 /* We use char because int might match the return type of a gcc2
17897 builtin and then its argument prototype would still apply. */
17898 char form_driver ();
17907 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17908 if { (eval echo "$as_me:17908: \"$ac_link\"") >&5
17909 (eval $ac_link) 2>&5
17911 echo "$as_me:17911: \$? = $ac_status" >&5
17912 (exit "$ac_status"); } &&
17913 { ac_try='test -s "conftest$ac_exeext"'
17914 { (eval echo "$as_me:17914: \"$ac_try\"") >&5
17915 (eval $ac_try) 2>&5
17917 echo "$as_me:17917: \$? = $ac_status" >&5
17918 (exit "$ac_status"); }; }; then
17919 eval "$as_ac_Lib=yes"
17921 echo "$as_me: failed program was:" >&5
17922 cat "conftest.$ac_ext" >&5
17923 eval "$as_ac_Lib=no"
17925 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17926 LIBS=$ac_check_lib_save_LIBS
17928 echo "$as_me:17928: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
17929 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
17930 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
17932 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17934 cf_add_libs="$LIBS"
17937 for cf_add_1lib in -l$FORM_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17938 # filter duplicates
17939 for cf_add_1lib in $cf_add_0lib; do
17940 for cf_add_2lib in $cf_add_libs; do
17941 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17946 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17948 LIBS="$cf_add_libs"
17950 cat >>confdefs.h <<EOF
17951 #define $cf_upper 1
17958 cf_curses_headers="$cf_curses_headers form.h"
17961 # look for curses-related headers
17963 for ac_header in $cf_curses_headers
17965 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17966 echo "$as_me:17966: checking for $ac_header" >&5
17967 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17968 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17969 echo $ECHO_N "(cached) $ECHO_C" >&6
17971 cat >"conftest.$ac_ext" <<_ACEOF
17972 #line 17972 "configure"
17973 #include "confdefs.h"
17974 #include <$ac_header>
17976 if { (eval echo "$as_me:17976: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17977 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17979 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17981 cat conftest.err >&5
17982 echo "$as_me:17982: \$? = $ac_status" >&5
17983 (exit "$ac_status"); } >/dev/null; then
17984 if test -s conftest.err; then
17985 ac_cpp_err=$ac_c_preproc_warn_flag
17992 if test -z "$ac_cpp_err"; then
17993 eval "$as_ac_Header=yes"
17995 echo "$as_me: failed program was:" >&5
17996 cat "conftest.$ac_ext" >&5
17997 eval "$as_ac_Header=no"
17999 rm -f conftest.err "conftest.$ac_ext"
18001 echo "$as_me:18001: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18002 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18003 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18004 cat >>confdefs.h <<EOF
18005 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18011 echo "$as_me:18011: checking for ANSI C header files" >&5
18012 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18013 if test "${ac_cv_header_stdc+set}" = set; then
18014 echo $ECHO_N "(cached) $ECHO_C" >&6
18016 cat >"conftest.$ac_ext" <<_ACEOF
18017 #line 18017 "configure"
18018 #include "confdefs.h"
18019 #include <stdlib.h>
18020 #include <stdarg.h>
18021 #include <string.h>
18025 if { (eval echo "$as_me:18025: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18026 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18028 $EGREP -v '^ *\+' conftest.er1 >conftest.err
18030 cat conftest.err >&5
18031 echo "$as_me:18031: \$? = $ac_status" >&5
18032 (exit "$ac_status"); } >/dev/null; then
18033 if test -s conftest.err; then
18034 ac_cpp_err=$ac_c_preproc_warn_flag
18041 if test -z "$ac_cpp_err"; then
18042 ac_cv_header_stdc=yes
18044 echo "$as_me: failed program was:" >&5
18045 cat "conftest.$ac_ext" >&5
18046 ac_cv_header_stdc=no
18048 rm -f conftest.err "conftest.$ac_ext"
18050 if test $ac_cv_header_stdc = yes; then
18051 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18052 cat >"conftest.$ac_ext" <<_ACEOF
18053 #line 18053 "configure"
18054 #include "confdefs.h"
18055 #include <string.h>
18058 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18059 $EGREP "memchr" >/dev/null 2>&1; then
18062 ac_cv_header_stdc=no
18068 if test $ac_cv_header_stdc = yes; then
18069 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18070 cat >"conftest.$ac_ext" <<_ACEOF
18071 #line 18071 "configure"
18072 #include "confdefs.h"
18073 #include <stdlib.h>
18076 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18077 $EGREP "free" >/dev/null 2>&1; then
18080 ac_cv_header_stdc=no
18086 if test $ac_cv_header_stdc = yes; then
18087 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
18088 if test "$cross_compiling" = yes; then
18091 cat >"conftest.$ac_ext" <<_ACEOF
18092 #line 18092 "configure"
18093 #include "confdefs.h"
18095 #if ((' ' & 0x0FF) == 0x020)
18096 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
18097 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
18099 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
18100 || ('j' <= (c) && (c) <= 'r') \
18101 || ('s' <= (c) && (c) <= 'z'))
18102 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
18105 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
18110 for (i = 0; i < 256; i++)
18111 if (XOR (islower (i), ISLOWER (i))
18112 || toupper (i) != TOUPPER (i))
18113 $ac_main_return(2);
18114 $ac_main_return (0);
18117 rm -f "conftest$ac_exeext"
18118 if { (eval echo "$as_me:18118: \"$ac_link\"") >&5
18119 (eval $ac_link) 2>&5
18121 echo "$as_me:18121: \$? = $ac_status" >&5
18122 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
18123 { (eval echo "$as_me:18123: \"$ac_try\"") >&5
18124 (eval $ac_try) 2>&5
18126 echo "$as_me:18126: \$? = $ac_status" >&5
18127 (exit "$ac_status"); }; }; then
18130 echo "$as_me: program exited with status $ac_status" >&5
18131 echo "$as_me: failed program was:" >&5
18132 cat "conftest.$ac_ext" >&5
18133 ac_cv_header_stdc=no
18135 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
18139 echo "$as_me:18139: result: $ac_cv_header_stdc" >&5
18140 echo "${ECHO_T}$ac_cv_header_stdc" >&6
18141 if test $ac_cv_header_stdc = yes; then
18143 cat >>confdefs.h <<\EOF
18144 #define STDC_HEADERS 1
18149 echo "$as_me:18149: checking whether time.h and sys/time.h may both be included" >&5
18150 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18151 if test "${ac_cv_header_time+set}" = set; then
18152 echo $ECHO_N "(cached) $ECHO_C" >&6
18154 cat >"conftest.$ac_ext" <<_ACEOF
18155 #line 18155 "configure"
18156 #include "confdefs.h"
18157 #include <sys/types.h>
18158 #include <sys/time.h>
18164 if ((struct tm *) 0)
18170 rm -f "conftest.$ac_objext"
18171 if { (eval echo "$as_me:18171: \"$ac_compile\"") >&5
18172 (eval $ac_compile) 2>&5
18174 echo "$as_me:18174: \$? = $ac_status" >&5
18175 (exit "$ac_status"); } &&
18176 { ac_try='test -s "conftest.$ac_objext"'
18177 { (eval echo "$as_me:18177: \"$ac_try\"") >&5
18178 (eval $ac_try) 2>&5
18180 echo "$as_me:18180: \$? = $ac_status" >&5
18181 (exit "$ac_status"); }; }; then
18182 ac_cv_header_time=yes
18184 echo "$as_me: failed program was:" >&5
18185 cat "conftest.$ac_ext" >&5
18186 ac_cv_header_time=no
18188 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18190 echo "$as_me:18190: result: $ac_cv_header_time" >&5
18191 echo "${ECHO_T}$ac_cv_header_time" >&6
18192 if test $ac_cv_header_time = yes; then
18194 cat >>confdefs.h <<\EOF
18195 #define TIME_WITH_SYS_TIME 1
18213 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18214 echo "$as_me:18214: checking for $ac_header" >&5
18215 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18216 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18217 echo $ECHO_N "(cached) $ECHO_C" >&6
18219 cat >"conftest.$ac_ext" <<_ACEOF
18220 #line 18220 "configure"
18221 #include "confdefs.h"
18222 #include <$ac_header>
18224 if { (eval echo "$as_me:18224: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18225 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18227 $EGREP -v '^ *\+' conftest.er1 >conftest.err
18229 cat conftest.err >&5
18230 echo "$as_me:18230: \$? = $ac_status" >&5
18231 (exit "$ac_status"); } >/dev/null; then
18232 if test -s conftest.err; then
18233 ac_cpp_err=$ac_c_preproc_warn_flag
18240 if test -z "$ac_cpp_err"; then
18241 eval "$as_ac_Header=yes"
18243 echo "$as_me: failed program was:" >&5
18244 cat "conftest.$ac_ext" >&5
18245 eval "$as_ac_Header=no"
18247 rm -f conftest.err "conftest.$ac_ext"
18249 echo "$as_me:18249: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18250 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18251 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18252 cat >>confdefs.h <<EOF
18253 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18259 for ac_header in unistd.h getopt.h
18261 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18262 echo "$as_me:18262: checking for $ac_header" >&5
18263 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18264 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18265 echo $ECHO_N "(cached) $ECHO_C" >&6
18267 cat >"conftest.$ac_ext" <<_ACEOF
18268 #line 18268 "configure"
18269 #include "confdefs.h"
18270 #include <$ac_header>
18272 if { (eval echo "$as_me:18272: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18273 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18275 $EGREP -v '^ *\+' conftest.er1 >conftest.err
18277 cat conftest.err >&5
18278 echo "$as_me:18278: \$? = $ac_status" >&5
18279 (exit "$ac_status"); } >/dev/null; then
18280 if test -s conftest.err; then
18281 ac_cpp_err=$ac_c_preproc_warn_flag
18288 if test -z "$ac_cpp_err"; then
18289 eval "$as_ac_Header=yes"
18291 echo "$as_me: failed program was:" >&5
18292 cat "conftest.$ac_ext" >&5
18293 eval "$as_ac_Header=no"
18295 rm -f conftest.err "conftest.$ac_ext"
18297 echo "$as_me:18297: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18298 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18299 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18300 cat >>confdefs.h <<EOF
18301 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18307 echo "$as_me:18307: checking for header declaring getopt variables" >&5
18308 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
18309 if test "${cf_cv_getopt_header+set}" = set; then
18310 echo $ECHO_N "(cached) $ECHO_C" >&6
18313 cf_cv_getopt_header=none
18314 for cf_header in stdio.h stdlib.h unistd.h getopt.h
18316 cat >"conftest.$ac_ext" <<_ACEOF
18317 #line 18317 "configure"
18318 #include "confdefs.h"
18320 #include <$cf_header>
18324 int x = optind; char *y = optarg; (void)x; (void)y
18329 rm -f "conftest.$ac_objext"
18330 if { (eval echo "$as_me:18330: \"$ac_compile\"") >&5
18331 (eval $ac_compile) 2>&5
18333 echo "$as_me:18333: \$? = $ac_status" >&5
18334 (exit "$ac_status"); } &&
18335 { ac_try='test -s "conftest.$ac_objext"'
18336 { (eval echo "$as_me:18336: \"$ac_try\"") >&5
18337 (eval $ac_try) 2>&5
18339 echo "$as_me:18339: \$? = $ac_status" >&5
18340 (exit "$ac_status"); }; }; then
18341 cf_cv_getopt_header=$cf_header
18344 echo "$as_me: failed program was:" >&5
18345 cat "conftest.$ac_ext" >&5
18347 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18351 echo "$as_me:18351: result: $cf_cv_getopt_header" >&5
18352 echo "${ECHO_T}$cf_cv_getopt_header" >&6
18353 if test "$cf_cv_getopt_header" != none ; then
18355 cat >>confdefs.h <<\EOF
18356 #define HAVE_GETOPT_HEADER 1
18360 if test "$cf_cv_getopt_header" = getopt.h ; then
18362 cat >>confdefs.h <<\EOF
18363 #define NEED_GETOPT_H 1
18377 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18378 echo "$as_me:18378: checking for $ac_func" >&5
18379 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18380 if eval "test \"\${$as_ac_var+set}\" = set"; then
18381 echo $ECHO_N "(cached) $ECHO_C" >&6
18383 cat >"conftest.$ac_ext" <<_ACEOF
18384 #line 18384 "configure"
18385 #include "confdefs.h"
18386 #define $ac_func autoconf_temporary
18387 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
18394 /* We use char because int might match the return type of a gcc2
18395 builtin and then its argument prototype would still apply. */
18396 char $ac_func (void);
18402 /* The GNU C library defines stubs for functions which it implements
18403 to always fail with ENOSYS. Some functions are actually named
18404 something starting with __ and the normal name is an alias. */
18405 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18406 #error found stub for $ac_func
18409 return $ac_func ();
18414 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18415 if { (eval echo "$as_me:18415: \"$ac_link\"") >&5
18416 (eval $ac_link) 2>&5
18418 echo "$as_me:18418: \$? = $ac_status" >&5
18419 (exit "$ac_status"); } &&
18420 { ac_try='test -s "conftest$ac_exeext"'
18421 { (eval echo "$as_me:18421: \"$ac_try\"") >&5
18422 (eval $ac_try) 2>&5
18424 echo "$as_me:18424: \$? = $ac_status" >&5
18425 (exit "$ac_status"); }; }; then
18426 eval "$as_ac_var=yes"
18428 echo "$as_me: failed program was:" >&5
18429 cat "conftest.$ac_ext" >&5
18430 eval "$as_ac_var=no"
18432 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18434 echo "$as_me:18434: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18435 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18436 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18437 cat >>confdefs.h <<EOF
18438 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18444 # use a compile-check to work with ncurses*-config and subdirectory includes
18445 echo "$as_me:18445: checking if we can use termcap.h" >&5
18446 echo $ECHO_N "checking if we can use termcap.h... $ECHO_C" >&6
18447 if test "${cf_cv_have_termcap_h+set}" = set; then
18448 echo $ECHO_N "(cached) $ECHO_C" >&6
18451 cat >"conftest.$ac_ext" <<_ACEOF
18452 #line 18452 "configure"
18453 #include "confdefs.h"
18455 #include <curses.h>
18456 #ifdef NCURSES_VERSION
18457 #undef NCURSES_VERSION
18459 #include <termcap.h>
18460 #ifndef NCURSES_VERSION
18461 #error wrong header
18472 rm -f "conftest.$ac_objext"
18473 if { (eval echo "$as_me:18473: \"$ac_compile\"") >&5
18474 (eval $ac_compile) 2>&5
18476 echo "$as_me:18476: \$? = $ac_status" >&5
18477 (exit "$ac_status"); } &&
18478 { ac_try='test -s "conftest.$ac_objext"'
18479 { (eval echo "$as_me:18479: \"$ac_try\"") >&5
18480 (eval $ac_try) 2>&5
18482 echo "$as_me:18482: \$? = $ac_status" >&5
18483 (exit "$ac_status"); }; }; then
18484 cf_cv_have_termcap_h=yes
18486 echo "$as_me: failed program was:" >&5
18487 cat "conftest.$ac_ext" >&5
18488 cf_cv_have_termcap_h=no
18490 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18492 echo "$as_me:18492: result: $cf_cv_have_termcap_h" >&5
18493 echo "${ECHO_T}$cf_cv_have_termcap_h" >&6
18494 if test "x$cf_cv_have_termcap_h" = xyes
18497 cat >>confdefs.h <<\EOF
18498 #define HAVE_TERMCAP_H 1
18502 echo "$as_me:18502: checking if we can use ncurses/termcap.h" >&5
18503 echo $ECHO_N "checking if we can use ncurses/termcap.h... $ECHO_C" >&6
18504 if test "${cf_cv_have_ncurses_termcap_h+set}" = set; then
18505 echo $ECHO_N "(cached) $ECHO_C" >&6
18508 cat >"conftest.$ac_ext" <<_ACEOF
18509 #line 18509 "configure"
18510 #include "confdefs.h"
18512 #include <ncurses/curses.h>
18513 #ifdef NCURSES_VERSION
18514 #undef NCURSES_VERSION
18516 #include <ncurses/termcap.h>
18517 #ifndef NCURSES_VERSION
18518 #error wrong header
18529 rm -f "conftest.$ac_objext"
18530 if { (eval echo "$as_me:18530: \"$ac_compile\"") >&5
18531 (eval $ac_compile) 2>&5
18533 echo "$as_me:18533: \$? = $ac_status" >&5
18534 (exit "$ac_status"); } &&
18535 { ac_try='test -s "conftest.$ac_objext"'
18536 { (eval echo "$as_me:18536: \"$ac_try\"") >&5
18537 (eval $ac_try) 2>&5
18539 echo "$as_me:18539: \$? = $ac_status" >&5
18540 (exit "$ac_status"); }; }; then
18541 cf_cv_have_ncurses_termcap_h=yes
18543 echo "$as_me: failed program was:" >&5
18544 cat "conftest.$ac_ext" >&5
18545 cf_cv_have_ncurses_termcap_h=no
18547 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18549 echo "$as_me:18549: result: $cf_cv_have_ncurses_termcap_h" >&5
18550 echo "${ECHO_T}$cf_cv_have_ncurses_termcap_h" >&6
18551 test "x$cf_cv_have_ncurses_termcap_h" = xyes &&
18552 cat >>confdefs.h <<\EOF
18553 #define HAVE_NCURSES_TERMCAP_H 1
18558 if test "x$ac_cv_func_getopt" = xno; then
18559 { { echo "$as_me:18559: error: getopt is required for building programs" >&5
18560 echo "$as_me: error: getopt is required for building programs" >&2;}
18561 { (exit 1); exit 1; }; }
18564 if test "$cf_enable_widec" = yes; then
18577 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18578 echo "$as_me:18578: checking for $ac_func" >&5
18579 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18580 if eval "test \"\${$as_ac_var+set}\" = set"; then
18581 echo $ECHO_N "(cached) $ECHO_C" >&6
18583 cat >"conftest.$ac_ext" <<_ACEOF
18584 #line 18584 "configure"
18585 #include "confdefs.h"
18586 #define $ac_func autoconf_temporary
18587 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
18594 /* We use char because int might match the return type of a gcc2
18595 builtin and then its argument prototype would still apply. */
18596 char $ac_func (void);
18602 /* The GNU C library defines stubs for functions which it implements
18603 to always fail with ENOSYS. Some functions are actually named
18604 something starting with __ and the normal name is an alias. */
18605 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18606 #error found stub for $ac_func
18609 return $ac_func ();
18614 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18615 if { (eval echo "$as_me:18615: \"$ac_link\"") >&5
18616 (eval $ac_link) 2>&5
18618 echo "$as_me:18618: \$? = $ac_status" >&5
18619 (exit "$ac_status"); } &&
18620 { ac_try='test -s "conftest$ac_exeext"'
18621 { (eval echo "$as_me:18621: \"$ac_try\"") >&5
18622 (eval $ac_try) 2>&5
18624 echo "$as_me:18624: \$? = $ac_status" >&5
18625 (exit "$ac_status"); }; }; then
18626 eval "$as_ac_var=yes"
18628 echo "$as_me: failed program was:" >&5
18629 cat "conftest.$ac_ext" >&5
18630 eval "$as_ac_var=no"
18632 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18634 echo "$as_me:18634: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18635 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18636 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18637 cat >>confdefs.h <<EOF
18638 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18646 echo "$as_me:18646: checking definition to turn on extended curses functions" >&5
18647 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
18648 if test "${cf_cv_need_xopen_extension+set}" = set; then
18649 echo $ECHO_N "(cached) $ECHO_C" >&6
18652 cf_cv_need_xopen_extension=unknown
18653 cat >"conftest.$ac_ext" <<_ACEOF
18654 #line 18654 "configure"
18655 #include "confdefs.h"
18657 #include <stdlib.h>
18658 #include <${cf_cv_ncurses_header:-curses.h}>
18663 #if defined(NCURSES_VERSION_PATCH)
18664 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
18668 #ifdef NCURSES_WIDECHAR
18669 make an error /* prefer to fall-through on the second checks */
18672 int check2 = curs_set((int)sizeof(check));
18673 long x = winnstr(stdscr, "", 0);
18676 getbegyx(stdscr, y1, x1);
18685 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18686 if { (eval echo "$as_me:18686: \"$ac_link\"") >&5
18687 (eval $ac_link) 2>&5
18689 echo "$as_me:18689: \$? = $ac_status" >&5
18690 (exit "$ac_status"); } &&
18691 { ac_try='test -s "conftest$ac_exeext"'
18692 { (eval echo "$as_me:18692: \"$ac_try\"") >&5
18693 (eval $ac_try) 2>&5
18695 echo "$as_me:18695: \$? = $ac_status" >&5
18696 (exit "$ac_status"); }; }; then
18697 cf_cv_need_xopen_extension=none
18699 echo "$as_me: failed program was:" >&5
18700 cat "conftest.$ac_ext" >&5
18702 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
18704 cat >"conftest.$ac_ext" <<_ACEOF
18705 #line 18705 "configure"
18706 #include "confdefs.h"
18708 #define $cf_try_xopen_extension 1
18709 #include <stdlib.h>
18710 #include <${cf_cv_ncurses_header:-curses.h}>
18716 int check2 = curs_set((int)sizeof(check));
18717 long x = winnstr(stdscr, "", 0);
18719 getbegyx(stdscr, y1, x1);
18729 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18730 if { (eval echo "$as_me:18730: \"$ac_link\"") >&5
18731 (eval $ac_link) 2>&5
18733 echo "$as_me:18733: \$? = $ac_status" >&5
18734 (exit "$ac_status"); } &&
18735 { ac_try='test -s "conftest$ac_exeext"'
18736 { (eval echo "$as_me:18736: \"$ac_try\"") >&5
18737 (eval $ac_try) 2>&5
18739 echo "$as_me:18739: \$? = $ac_status" >&5
18740 (exit "$ac_status"); }; }; then
18741 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
18743 echo "$as_me: failed program was:" >&5
18744 cat "conftest.$ac_ext" >&5
18746 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18750 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18753 echo "$as_me:18753: result: $cf_cv_need_xopen_extension" >&5
18754 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
18756 case "$cf_cv_need_xopen_extension" in
18759 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18760 CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
18765 echo "$as_me:18765: checking for term.h" >&5
18766 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
18767 if test "${cf_cv_term_header+set}" = set; then
18768 echo $ECHO_N "(cached) $ECHO_C" >&6
18771 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
18772 # for <term.h> if we do not find the variant.
18774 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
18776 case "${cf_cv_ncurses_header:-curses.h}" in
18778 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
18779 cf_header_list="$cf_header_item $cf_header_list"
18783 for cf_header in $cf_header_list
18785 cat >"conftest.$ac_ext" <<_ACEOF
18786 #line 18786 "configure"
18787 #include "confdefs.h"
18789 #include <${cf_cv_ncurses_header:-curses.h}>
18790 #include <${cf_header}>
18799 rm -f "conftest.$ac_objext"
18800 if { (eval echo "$as_me:18800: \"$ac_compile\"") >&5
18801 (eval $ac_compile) 2>&5
18803 echo "$as_me:18803: \$? = $ac_status" >&5
18804 (exit "$ac_status"); } &&
18805 { ac_try='test -s "conftest.$ac_objext"'
18806 { (eval echo "$as_me:18806: \"$ac_try\"") >&5
18807 (eval $ac_try) 2>&5
18809 echo "$as_me:18809: \$? = $ac_status" >&5
18810 (exit "$ac_status"); }; }; then
18811 cf_cv_term_header=$cf_header
18814 echo "$as_me: failed program was:" >&5
18815 cat "conftest.$ac_ext" >&5
18816 cf_cv_term_header=no
18818 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18821 case "$cf_cv_term_header" in
18823 # If curses is ncurses, some packagers still mess it up by trying to make
18824 # us use GNU termcap. This handles the most common case.
18825 for cf_header in ncurses/term.h ncursesw/term.h
18827 cat >"conftest.$ac_ext" <<_ACEOF
18828 #line 18828 "configure"
18829 #include "confdefs.h"
18831 #include <${cf_cv_ncurses_header:-curses.h}>
18832 #ifdef NCURSES_VERSION
18833 #include <${cf_header}>
18845 rm -f "conftest.$ac_objext"
18846 if { (eval echo "$as_me:18846: \"$ac_compile\"") >&5
18847 (eval $ac_compile) 2>&5
18849 echo "$as_me:18849: \$? = $ac_status" >&5
18850 (exit "$ac_status"); } &&
18851 { ac_try='test -s "conftest.$ac_objext"'
18852 { (eval echo "$as_me:18852: \"$ac_try\"") >&5
18853 (eval $ac_try) 2>&5
18855 echo "$as_me:18855: \$? = $ac_status" >&5
18856 (exit "$ac_status"); }; }; then
18857 cf_cv_term_header=$cf_header
18860 echo "$as_me: failed program was:" >&5
18861 cat "conftest.$ac_ext" >&5
18862 cf_cv_term_header=no
18864 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18870 echo "$as_me:18870: result: $cf_cv_term_header" >&5
18871 echo "${ECHO_T}$cf_cv_term_header" >&6
18873 case "$cf_cv_term_header" in
18876 cat >>confdefs.h <<\EOF
18877 #define HAVE_TERM_H 1
18883 cat >>confdefs.h <<\EOF
18884 #define HAVE_NCURSES_TERM_H 1
18890 cat >>confdefs.h <<\EOF
18891 #define HAVE_NCURSESW_TERM_H 1
18897 echo "$as_me:18897: checking for unctrl.h" >&5
18898 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
18899 if test "${cf_cv_unctrl_header+set}" = set; then
18900 echo $ECHO_N "(cached) $ECHO_C" >&6
18903 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
18904 # for <unctrl.h> if we do not find the variant.
18906 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
18908 case "${cf_cv_ncurses_header:-curses.h}" in
18910 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
18911 cf_header_list="$cf_header_item $cf_header_list"
18915 for cf_header in $cf_header_list
18917 cat >"conftest.$ac_ext" <<_ACEOF
18918 #line 18918 "configure"
18919 #include "confdefs.h"
18921 #include <${cf_cv_ncurses_header:-curses.h}>
18922 #include <${cf_header}>
18931 rm -f "conftest.$ac_objext"
18932 if { (eval echo "$as_me:18932: \"$ac_compile\"") >&5
18933 (eval $ac_compile) 2>&5
18935 echo "$as_me:18935: \$? = $ac_status" >&5
18936 (exit "$ac_status"); } &&
18937 { ac_try='test -s "conftest.$ac_objext"'
18938 { (eval echo "$as_me:18938: \"$ac_try\"") >&5
18939 (eval $ac_try) 2>&5
18941 echo "$as_me:18941: \$? = $ac_status" >&5
18942 (exit "$ac_status"); }; }; then
18943 cf_cv_unctrl_header=$cf_header
18946 echo "$as_me: failed program was:" >&5
18947 cat "conftest.$ac_ext" >&5
18948 cf_cv_unctrl_header=no
18950 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18954 echo "$as_me:18954: result: $cf_cv_unctrl_header" >&5
18955 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
18957 case "$cf_cv_unctrl_header" in
18959 { echo "$as_me:18959: WARNING: unctrl.h header not found" >&5
18960 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
18964 case "$cf_cv_unctrl_header" in
18967 cat >>confdefs.h <<\EOF
18968 #define HAVE_UNCTRL_H 1
18974 cat >>confdefs.h <<\EOF
18975 #define HAVE_NCURSES_UNCTRL_H 1
18979 (ncursesw/unctrl.h)
18981 cat >>confdefs.h <<\EOF
18982 #define HAVE_NCURSESW_UNCTRL_H 1
18990 assume_default_colors \
19007 init_extended_color \
19015 reset_color_pairs \
19031 use_default_colors \
19033 use_extended_names \
19049 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19051 echo "$as_me:19051: checking for ${cf_func}" >&5
19052 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
19054 echo "${as_me:-configure}:19054: testing ${cf_func} ..." 1>&5
19056 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
19057 echo $ECHO_N "(cached) $ECHO_C" >&6
19060 eval cf_result='$ac_cv_func_'$cf_func
19061 if test ".$cf_result" != ".no"; then
19062 cat >"conftest.$ac_ext" <<_ACEOF
19063 #line 19063 "configure"
19064 #include "confdefs.h"
19066 #ifdef HAVE_XCURSES
19067 #include <xcurses.h>
19068 char * XCursesProgramName = "test";
19070 #include <${cf_cv_ncurses_header:-curses.h}>
19071 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19072 #include <ncursesw/term.h>
19073 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19074 #include <ncurses/term.h>
19075 #elif defined(HAVE_TERM_H)
19085 long foo = (long)(&${cf_func});
19086 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
19087 if (foo + 1234L > 5678L)
19088 ${cf_cv_main_return:-return}(foo != 0);
19095 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19096 if { (eval echo "$as_me:19096: \"$ac_link\"") >&5
19097 (eval $ac_link) 2>&5
19099 echo "$as_me:19099: \$? = $ac_status" >&5
19100 (exit "$ac_status"); } &&
19101 { ac_try='test -s "conftest$ac_exeext"'
19102 { (eval echo "$as_me:19102: \"$ac_try\"") >&5
19103 (eval $ac_try) 2>&5
19105 echo "$as_me:19105: \$? = $ac_status" >&5
19106 (exit "$ac_status"); }; }; then
19109 echo "$as_me: failed program was:" >&5
19110 cat "conftest.$ac_ext" >&5
19113 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19115 eval 'cf_cv_func_'$cf_func'="$cf_result"'
19119 # use the computed/retrieved cache-value:
19120 eval 'cf_result=$cf_cv_func_'$cf_func
19121 echo "$as_me:19121: result: $cf_result" >&5
19122 echo "${ECHO_T}$cf_result" >&6
19123 if test "$cf_result" != no; then
19124 cat >>confdefs.h <<EOF
19125 #define HAVE_${cf_tr_func} 1
19131 for cf_func in tputs
19134 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19136 echo "$as_me:19136: checking for ${cf_func}" >&5
19137 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
19139 echo "${as_me:-configure}:19139: testing ${cf_func} ..." 1>&5
19141 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
19142 echo $ECHO_N "(cached) $ECHO_C" >&6
19145 eval cf_result='$ac_cv_func_'$cf_func
19146 if test ".$cf_result" != ".no"; then
19147 cat >"conftest.$ac_ext" <<_ACEOF
19148 #line 19148 "configure"
19149 #include "confdefs.h"
19151 #ifdef HAVE_XCURSES
19152 #include <xcurses.h>
19153 char * XCursesProgramName = "test";
19155 #include <${cf_cv_ncurses_header:-curses.h}>
19156 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19157 #include <ncursesw/term.h>
19158 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19159 #include <ncurses/term.h>
19160 #elif defined(HAVE_TERM_H)
19170 long foo = (long)(&${cf_func});
19171 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
19172 if (foo + 1234L > 5678L)
19173 ${cf_cv_main_return:-return}(foo != 0);
19180 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19181 if { (eval echo "$as_me:19181: \"$ac_link\"") >&5
19182 (eval $ac_link) 2>&5
19184 echo "$as_me:19184: \$? = $ac_status" >&5
19185 (exit "$ac_status"); } &&
19186 { ac_try='test -s "conftest$ac_exeext"'
19187 { (eval echo "$as_me:19187: \"$ac_try\"") >&5
19188 (eval $ac_try) 2>&5
19190 echo "$as_me:19190: \$? = $ac_status" >&5
19191 (exit "$ac_status"); }; }; then
19194 echo "$as_me: failed program was:" >&5
19195 cat "conftest.$ac_ext" >&5
19198 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19200 eval 'cf_cv_func_'$cf_func'="$cf_result"'
19204 # use the computed/retrieved cache-value:
19205 eval 'cf_result=$cf_cv_func_'$cf_func
19206 echo "$as_me:19206: result: $cf_result" >&5
19207 echo "${ECHO_T}$cf_result" >&6
19208 if test "$cf_result" != no; then
19209 cat >>confdefs.h <<EOF
19210 #define HAVE_${cf_tr_func} 1
19216 if test "x$cf_cv_func_tputs" = xyes
19219 for cf_arg in int char
19221 for cf_ret in int void
19223 if test "$cf_ret" = void
19225 cf_return="/* nothing */"
19227 cf_return="return value"
19229 cat >"conftest.$ac_ext" <<_ACEOF
19230 #line 19230 "configure"
19231 #include "confdefs.h"
19233 #include <${cf_cv_ncurses_header:-curses.h}>
19234 #include <$cf_cv_term_header>
19236 static $cf_ret outc($cf_arg value) { $cf_return; }
19242 tputs("hello", 0, outc);
19243 ${cf_cv_main_return:-return}(0);
19249 rm -f "conftest.$ac_objext"
19250 if { (eval echo "$as_me:19250: \"$ac_compile\"") >&5
19251 (eval $ac_compile) 2>&5
19253 echo "$as_me:19253: \$? = $ac_status" >&5
19254 (exit "$ac_status"); } &&
19255 { ac_try='test -s "conftest.$ac_objext"'
19256 { (eval echo "$as_me:19256: \"$ac_try\"") >&5
19257 (eval $ac_try) 2>&5
19259 echo "$as_me:19259: \$? = $ac_status" >&5
19260 (exit "$ac_status"); }; }; then
19262 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
19264 echo "${as_me:-configure}:19264: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
19266 cat >>confdefs.h <<EOF
19267 #define TPUTS_ARG $cf_arg
19268 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
19269 #define TPUTS_RETURN(value) $cf_return
19275 echo "$as_me: failed program was:" >&5
19276 cat "conftest.$ac_ext" >&5
19278 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19280 test "$cf_done" = yes && break
19284 echo "$as_me:19284: checking for ncurses extended functions" >&5
19285 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
19286 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
19287 echo $ECHO_N "(cached) $ECHO_C" >&6
19290 cat >"conftest.$ac_ext" <<_ACEOF
19291 #line 19291 "configure"
19292 #include "confdefs.h"
19294 #include <${cf_cv_ncurses_header:-curses.h}>
19299 int x = NCURSES_EXT_FUNCS
19305 rm -f "conftest.$ac_objext"
19306 if { (eval echo "$as_me:19306: \"$ac_compile\"") >&5
19307 (eval $ac_compile) 2>&5
19309 echo "$as_me:19309: \$? = $ac_status" >&5
19310 (exit "$ac_status"); } &&
19311 { ac_try='test -s "conftest.$ac_objext"'
19312 { (eval echo "$as_me:19312: \"$ac_try\"") >&5
19313 (eval $ac_try) 2>&5
19315 echo "$as_me:19315: \$? = $ac_status" >&5
19316 (exit "$ac_status"); }; }; then
19317 cf_cv_ncurses_ext_funcs=defined
19319 echo "$as_me: failed program was:" >&5
19320 cat "conftest.$ac_ext" >&5
19322 cat >"conftest.$ac_ext" <<_ACEOF
19323 #line 19323 "configure"
19324 #include "confdefs.h"
19326 #include <${cf_cv_ncurses_header:-curses.h}>
19331 (void) assume_default_colors (0, 0);
19332 (void) curses_version ();
19333 (void) define_key (0, 0);
19334 (void) is_term_resized (0, 0);
19335 (void) key_defined (0);
19336 (void) keybound (0, 0);
19337 (void) keyok (0, 0);
19338 (void) resize_term (0, 0);
19339 (void) resizeterm (0, 0);
19340 (void) use_default_colors ();
19341 (void) use_extended_names (0);
19342 (void) wresize (0, 0, 0);
19347 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19348 if { (eval echo "$as_me:19348: \"$ac_link\"") >&5
19349 (eval $ac_link) 2>&5
19351 echo "$as_me:19351: \$? = $ac_status" >&5
19352 (exit "$ac_status"); } &&
19353 { ac_try='test -s "conftest$ac_exeext"'
19354 { (eval echo "$as_me:19354: \"$ac_try\"") >&5
19355 (eval $ac_try) 2>&5
19357 echo "$as_me:19357: \$? = $ac_status" >&5
19358 (exit "$ac_status"); }; }; then
19359 cf_cv_ncurses_ext_funcs=yes
19361 echo "$as_me: failed program was:" >&5
19362 cat "conftest.$ac_ext" >&5
19363 cf_cv_ncurses_ext_funcs=no
19365 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19368 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19371 echo "$as_me:19371: result: $cf_cv_ncurses_ext_funcs" >&5
19372 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
19373 test "$cf_cv_ncurses_ext_funcs" = yes &&
19374 cat >>confdefs.h <<\EOF
19375 #define NCURSES_EXT_FUNCS 1
19378 if test "$cf_enable_widec" = yes
19380 # workaround for systems with ncurses before 20111029, due to change of
19381 # feature test macro from _XPG5 to _XOPEN_SOURCE
19382 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
19385 echo "$as_me:19385: checking if _XPG5 should be defined to enable wide-characters" >&5
19386 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
19388 cat >"conftest.$ac_ext" <<_ACEOF
19389 #line 19389 "configure"
19390 #include "confdefs.h"
19392 #include <${cf_cv_ncurses_header:-curses.h}>
19401 rm -f "conftest.$ac_objext"
19402 if { (eval echo "$as_me:19402: \"$ac_compile\"") >&5
19403 (eval $ac_compile) 2>&5
19405 echo "$as_me:19405: \$? = $ac_status" >&5
19406 (exit "$ac_status"); } &&
19407 { ac_try='test -s "conftest.$ac_objext"'
19408 { (eval echo "$as_me:19408: \"$ac_try\"") >&5
19409 (eval $ac_try) 2>&5
19411 echo "$as_me:19411: \$? = $ac_status" >&5
19412 (exit "$ac_status"); }; }; then
19415 echo "$as_me: failed program was:" >&5
19416 cat "conftest.$ac_ext" >&5
19417 cf_save_cppflags="$CPPFLAGS"
19418 CPPFLAGS="$CPPFLAGS -D_XPG5"
19419 cat >"conftest.$ac_ext" <<_ACEOF
19420 #line 19420 "configure"
19421 #include "confdefs.h"
19423 #include <${cf_cv_ncurses_header:-curses.h}>
19432 rm -f "conftest.$ac_objext"
19433 if { (eval echo "$as_me:19433: \"$ac_compile\"") >&5
19434 (eval $ac_compile) 2>&5
19436 echo "$as_me:19436: \$? = $ac_status" >&5
19437 (exit "$ac_status"); } &&
19438 { ac_try='test -s "conftest.$ac_objext"'
19439 { (eval echo "$as_me:19439: \"$ac_try\"") >&5
19440 (eval $ac_try) 2>&5
19442 echo "$as_me:19442: \$? = $ac_status" >&5
19443 (exit "$ac_status"); }; }; then
19446 echo "$as_me: failed program was:" >&5
19447 cat "conftest.$ac_ext" >&5
19449 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19450 CPPFLAGS="$cf_save_cppflags"
19452 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19453 echo "$as_me:19453: result: $cf_define_xpg5" >&5
19454 echo "${ECHO_T}$cf_define_xpg5" >&6
19456 if test "$cf_define_xpg5" = yes
19458 CPPFLAGS="$CPPFLAGS -D_XPG5"
19462 echo "$as_me:19462: checking for wide-character functions" >&5
19463 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
19464 if test "${cf_cv_widechar_funcs+set}" = set; then
19465 echo $ECHO_N "(cached) $ECHO_C" >&6
19468 cat >"conftest.$ac_ext" <<_ACEOF
19469 #line 19469 "configure"
19470 #include "confdefs.h"
19472 #include <${cf_cv_ncurses_header:-curses.h}>
19477 static wchar_t src_wchar[2];
19478 static cchar_t dst_cchar;
19479 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
19485 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19486 if { (eval echo "$as_me:19486: \"$ac_link\"") >&5
19487 (eval $ac_link) 2>&5
19489 echo "$as_me:19489: \$? = $ac_status" >&5
19490 (exit "$ac_status"); } &&
19491 { ac_try='test -s "conftest$ac_exeext"'
19492 { (eval echo "$as_me:19492: \"$ac_try\"") >&5
19493 (eval $ac_try) 2>&5
19495 echo "$as_me:19495: \$? = $ac_status" >&5
19496 (exit "$ac_status"); }; }; then
19497 cf_cv_widechar_funcs=yes
19499 echo "$as_me: failed program was:" >&5
19500 cat "conftest.$ac_ext" >&5
19501 cf_cv_widechar_funcs=no
19503 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19506 echo "$as_me:19506: result: $cf_cv_widechar_funcs" >&5
19507 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
19508 if test "$cf_cv_widechar_funcs" != no ; then
19510 cat >>confdefs.h <<\EOF
19511 #define USE_WIDEC_SUPPORT 1
19515 cat >>confdefs.h <<\EOF
19516 #define USE_WIDEC_SUPPORT 0
19521 cat >>confdefs.h <<\EOF
19522 #define USE_WIDEC_SUPPORT 0
19527 echo "$as_me:19527: checking if $cf_cv_screen library uses pthreads" >&5
19528 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
19529 if test "${cf_cv_use_pthreads+set}" = set; then
19530 echo $ECHO_N "(cached) $ECHO_C" >&6
19533 cat >"conftest.$ac_ext" <<_ACEOF
19534 #line 19534 "configure"
19535 #include "confdefs.h"
19537 #include <${cf_cv_ncurses_header:-curses.h}>
19538 extern void _nc_init_pthreads(void);
19545 _nc_init_pthreads();
19551 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19552 if { (eval echo "$as_me:19552: \"$ac_link\"") >&5
19553 (eval $ac_link) 2>&5
19555 echo "$as_me:19555: \$? = $ac_status" >&5
19556 (exit "$ac_status"); } &&
19557 { ac_try='test -s "conftest$ac_exeext"'
19558 { (eval echo "$as_me:19558: \"$ac_try\"") >&5
19559 (eval $ac_try) 2>&5
19561 echo "$as_me:19561: \$? = $ac_status" >&5
19562 (exit "$ac_status"); }; }; then
19563 cf_cv_use_pthreads=yes
19565 echo "$as_me: failed program was:" >&5
19566 cat "conftest.$ac_ext" >&5
19567 cf_cv_use_pthreads=no
19569 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19572 echo "$as_me:19572: result: $cf_cv_use_pthreads" >&5
19573 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
19574 test $cf_cv_use_pthreads = yes &&
19575 cat >>confdefs.h <<\EOF
19576 #define USE_PTHREADS 1
19579 echo "$as_me:19579: checking if sys/time.h works with sys/select.h" >&5
19580 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
19581 if test "${cf_cv_sys_time_select+set}" = set; then
19582 echo $ECHO_N "(cached) $ECHO_C" >&6
19585 cat >"conftest.$ac_ext" <<_ACEOF
19586 #line 19586 "configure"
19587 #include "confdefs.h"
19589 #include <sys/types.h>
19590 #ifdef HAVE_SYS_TIME_H
19591 #include <sys/time.h>
19593 #ifdef HAVE_SYS_SELECT_H
19594 #include <sys/select.h>
19605 rm -f "conftest.$ac_objext"
19606 if { (eval echo "$as_me:19606: \"$ac_compile\"") >&5
19607 (eval $ac_compile) 2>&5
19609 echo "$as_me:19609: \$? = $ac_status" >&5
19610 (exit "$ac_status"); } &&
19611 { ac_try='test -s "conftest.$ac_objext"'
19612 { (eval echo "$as_me:19612: \"$ac_try\"") >&5
19613 (eval $ac_try) 2>&5
19615 echo "$as_me:19615: \$? = $ac_status" >&5
19616 (exit "$ac_status"); }; }; then
19617 cf_cv_sys_time_select=yes
19619 echo "$as_me: failed program was:" >&5
19620 cat "conftest.$ac_ext" >&5
19621 cf_cv_sys_time_select=no
19623 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19627 echo "$as_me:19627: result: $cf_cv_sys_time_select" >&5
19628 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
19629 test "$cf_cv_sys_time_select" = yes &&
19630 cat >>confdefs.h <<\EOF
19631 #define HAVE_SYS_TIME_SELECT 1
19634 # special check for test/ditto.c
19636 echo "$as_me:19636: checking for openpty in -lutil" >&5
19637 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
19638 if test "${ac_cv_lib_util_openpty+set}" = set; then
19639 echo $ECHO_N "(cached) $ECHO_C" >&6
19641 ac_check_lib_save_LIBS=$LIBS
19642 LIBS="-lutil $LIBS"
19643 cat >"conftest.$ac_ext" <<_ACEOF
19644 #line 19644 "configure"
19645 #include "confdefs.h"
19647 /* Override any gcc2 internal prototype to avoid an error. */
19651 /* We use char because int might match the return type of a gcc2
19652 builtin and then its argument prototype would still apply. */
19662 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19663 if { (eval echo "$as_me:19663: \"$ac_link\"") >&5
19664 (eval $ac_link) 2>&5
19666 echo "$as_me:19666: \$? = $ac_status" >&5
19667 (exit "$ac_status"); } &&
19668 { ac_try='test -s "conftest$ac_exeext"'
19669 { (eval echo "$as_me:19669: \"$ac_try\"") >&5
19670 (eval $ac_try) 2>&5
19672 echo "$as_me:19672: \$? = $ac_status" >&5
19673 (exit "$ac_status"); }; }; then
19674 ac_cv_lib_util_openpty=yes
19676 echo "$as_me: failed program was:" >&5
19677 cat "conftest.$ac_ext" >&5
19678 ac_cv_lib_util_openpty=no
19680 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19681 LIBS=$ac_check_lib_save_LIBS
19683 echo "$as_me:19683: result: $ac_cv_lib_util_openpty" >&5
19684 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
19685 if test "$ac_cv_lib_util_openpty" = yes; then
19691 echo "$as_me:19691: checking for openpty header" >&5
19692 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
19693 if test "${cf_cv_func_openpty+set}" = set; then
19694 echo $ECHO_N "(cached) $ECHO_C" >&6
19697 cf_save_LIBS="$LIBS"
19698 test "$cf_cv_lib_util" = yes && {
19699 cf_add_libs="$LIBS"
19702 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19703 # filter duplicates
19704 for cf_add_1lib in $cf_add_0lib; do
19705 for cf_add_2lib in $cf_add_libs; do
19706 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19711 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19713 LIBS="$cf_add_libs"
19715 for cf_header in pty.h libutil.h util.h
19717 cat >"conftest.$ac_ext" <<_ACEOF
19718 #line 19718 "configure"
19719 #include "confdefs.h"
19721 #include <$cf_header>
19727 int x = openpty((int *)0, (int *)0, (char *)0,
19728 (struct termios *)0, (struct winsize *)0);
19734 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19735 if { (eval echo "$as_me:19735: \"$ac_link\"") >&5
19736 (eval $ac_link) 2>&5
19738 echo "$as_me:19738: \$? = $ac_status" >&5
19739 (exit "$ac_status"); } &&
19740 { ac_try='test -s "conftest$ac_exeext"'
19741 { (eval echo "$as_me:19741: \"$ac_try\"") >&5
19742 (eval $ac_try) 2>&5
19744 echo "$as_me:19744: \$? = $ac_status" >&5
19745 (exit "$ac_status"); }; }; then
19747 cf_cv_func_openpty=$cf_header
19751 echo "$as_me: failed program was:" >&5
19752 cat "conftest.$ac_ext" >&5
19754 cf_cv_func_openpty=no
19757 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19759 LIBS="$cf_save_LIBS"
19762 echo "$as_me:19762: result: $cf_cv_func_openpty" >&5
19763 echo "${ECHO_T}$cf_cv_func_openpty" >&6
19765 if test "$cf_cv_func_openpty" != no ; then
19767 cat >>confdefs.h <<EOF
19768 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
19771 cat >>confdefs.h <<\EOF
19772 #define USE_XTERM_PTY 1
19775 if test "x$cf_cv_lib_util" = xyes ; then
19777 cf_add_libs="$TEST_LIBS"
19780 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19781 # filter duplicates
19782 for cf_add_1lib in $cf_add_0lib; do
19783 for cf_add_2lib in $cf_add_libs; do
19784 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19789 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19791 TEST_LIBS="$cf_add_libs"
19796 echo "$as_me:19796: checking for function curses_version" >&5
19797 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
19798 if test "${cf_cv_func_curses_version+set}" = set; then
19799 echo $ECHO_N "(cached) $ECHO_C" >&6
19802 if test "$cross_compiling" = yes; then
19803 cf_cv_func_curses_version=unknown
19805 cat >"conftest.$ac_ext" <<_ACEOF
19806 #line 19806 "configure"
19807 #include "confdefs.h"
19809 #include <${cf_cv_ncurses_header:-curses.h}>
19813 sprintf(temp, "%s\\n", curses_version());
19814 ${cf_cv_main_return:-return}(0);
19818 rm -f "conftest$ac_exeext"
19819 if { (eval echo "$as_me:19819: \"$ac_link\"") >&5
19820 (eval $ac_link) 2>&5
19822 echo "$as_me:19822: \$? = $ac_status" >&5
19823 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
19824 { (eval echo "$as_me:19824: \"$ac_try\"") >&5
19825 (eval $ac_try) 2>&5
19827 echo "$as_me:19827: \$? = $ac_status" >&5
19828 (exit "$ac_status"); }; }; then
19829 cf_cv_func_curses_version=yes
19832 echo "$as_me: program exited with status $ac_status" >&5
19833 echo "$as_me: failed program was:" >&5
19834 cat "conftest.$ac_ext" >&5
19835 cf_cv_func_curses_version=no
19838 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
19842 echo "$as_me:19842: result: $cf_cv_func_curses_version" >&5
19843 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
19844 test "$cf_cv_func_curses_version" = yes &&
19845 cat >>confdefs.h <<\EOF
19846 #define HAVE_CURSES_VERSION 1
19849 echo "$as_me:19849: checking for alternate character set array" >&5
19850 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
19851 if test "${cf_cv_curses_acs_map+set}" = set; then
19852 echo $ECHO_N "(cached) $ECHO_C" >&6
19855 cf_cv_curses_acs_map=unknown
19856 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
19858 cat >"conftest.$ac_ext" <<_ACEOF
19859 #line 19859 "configure"
19860 #include "confdefs.h"
19862 #include <${cf_cv_ncurses_header:-curses.h}>
19868 ${name}['k'] = ACS_PLUS
19874 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19875 if { (eval echo "$as_me:19875: \"$ac_link\"") >&5
19876 (eval $ac_link) 2>&5
19878 echo "$as_me:19878: \$? = $ac_status" >&5
19879 (exit "$ac_status"); } &&
19880 { ac_try='test -s "conftest$ac_exeext"'
19881 { (eval echo "$as_me:19881: \"$ac_try\"") >&5
19882 (eval $ac_try) 2>&5
19884 echo "$as_me:19884: \$? = $ac_status" >&5
19885 (exit "$ac_status"); }; }; then
19886 cf_cv_curses_acs_map=$name; break
19888 echo "$as_me: failed program was:" >&5
19889 cat "conftest.$ac_ext" >&5
19891 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19895 echo "$as_me:19895: result: $cf_cv_curses_acs_map" >&5
19896 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
19898 test "$cf_cv_curses_acs_map" != unknown &&
19899 cat >>confdefs.h <<EOF
19900 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
19903 if test "$cf_enable_widec" = yes; then
19905 echo "$as_me:19905: checking for wide alternate character set array" >&5
19906 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
19907 if test "${cf_cv_curses_wacs_map+set}" = set; then
19908 echo $ECHO_N "(cached) $ECHO_C" >&6
19911 cf_cv_curses_wacs_map=unknown
19912 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
19914 cat >"conftest.$ac_ext" <<_ACEOF
19915 #line 19915 "configure"
19916 #include "confdefs.h"
19918 #ifndef _XOPEN_SOURCE_EXTENDED
19919 #define _XOPEN_SOURCE_EXTENDED
19921 #include <${cf_cv_ncurses_header:-curses.h}>
19925 void *foo = &(${name}['k']); (void)foo
19930 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19931 if { (eval echo "$as_me:19931: \"$ac_link\"") >&5
19932 (eval $ac_link) 2>&5
19934 echo "$as_me:19934: \$? = $ac_status" >&5
19935 (exit "$ac_status"); } &&
19936 { ac_try='test -s "conftest$ac_exeext"'
19937 { (eval echo "$as_me:19937: \"$ac_try\"") >&5
19938 (eval $ac_try) 2>&5
19940 echo "$as_me:19940: \$? = $ac_status" >&5
19941 (exit "$ac_status"); }; }; then
19942 cf_cv_curses_wacs_map=$name
19945 echo "$as_me: failed program was:" >&5
19946 cat "conftest.$ac_ext" >&5
19948 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19951 echo "$as_me:19951: result: $cf_cv_curses_wacs_map" >&5
19952 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
19954 test "$cf_cv_curses_wacs_map" != unknown &&
19955 cat >>confdefs.h <<EOF
19956 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
19959 echo "$as_me:19959: checking for wide alternate character constants" >&5
19960 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
19961 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
19962 echo $ECHO_N "(cached) $ECHO_C" >&6
19965 cf_cv_curses_wacs_symbols=no
19966 if test "$cf_cv_curses_wacs_map" != unknown
19968 cat >"conftest.$ac_ext" <<_ACEOF
19969 #line 19969 "configure"
19970 #include "confdefs.h"
19972 #ifndef _XOPEN_SOURCE_EXTENDED
19973 #define _XOPEN_SOURCE_EXTENDED
19975 #include <${cf_cv_ncurses_header:-curses.h}>
19979 cchar_t *foo = WACS_PLUS;
19980 ${cf_cv_curses_wacs_map}['k'] = *WACS_PLUS; (void)foo
19985 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19986 if { (eval echo "$as_me:19986: \"$ac_link\"") >&5
19987 (eval $ac_link) 2>&5
19989 echo "$as_me:19989: \$? = $ac_status" >&5
19990 (exit "$ac_status"); } &&
19991 { ac_try='test -s "conftest$ac_exeext"'
19992 { (eval echo "$as_me:19992: \"$ac_try\"") >&5
19993 (eval $ac_try) 2>&5
19995 echo "$as_me:19995: \$? = $ac_status" >&5
19996 (exit "$ac_status"); }; }; then
19997 cf_cv_curses_wacs_symbols=yes
19999 echo "$as_me: failed program was:" >&5
20000 cat "conftest.$ac_ext" >&5
20002 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20004 cat >"conftest.$ac_ext" <<_ACEOF
20005 #line 20005 "configure"
20006 #include "confdefs.h"
20008 #ifndef _XOPEN_SOURCE_EXTENDED
20009 #define _XOPEN_SOURCE_EXTENDED
20011 #include <${cf_cv_ncurses_header:-curses.h}>
20015 cchar_t *foo = WACS_PLUS; (void)foo
20020 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20021 if { (eval echo "$as_me:20021: \"$ac_link\"") >&5
20022 (eval $ac_link) 2>&5
20024 echo "$as_me:20024: \$? = $ac_status" >&5
20025 (exit "$ac_status"); } &&
20026 { ac_try='test -s "conftest$ac_exeext"'
20027 { (eval echo "$as_me:20027: \"$ac_try\"") >&5
20028 (eval $ac_try) 2>&5
20030 echo "$as_me:20030: \$? = $ac_status" >&5
20031 (exit "$ac_status"); }; }; then
20032 cf_cv_curses_wacs_symbols=yes
20034 echo "$as_me: failed program was:" >&5
20035 cat "conftest.$ac_ext" >&5
20037 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20041 echo "$as_me:20041: result: $cf_cv_curses_wacs_symbols" >&5
20042 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
20044 test "$cf_cv_curses_wacs_symbols" != no &&
20045 cat >>confdefs.h <<\EOF
20046 #define CURSES_WACS_SYMBOLS 1
20051 echo "$as_me:20051: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20052 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20053 cat >"conftest.$ac_ext" <<_ACEOF
20054 #line 20054 "configure"
20055 #include "confdefs.h"
20057 #ifndef _XOPEN_SOURCE_EXTENDED
20058 #define _XOPEN_SOURCE_EXTENDED
20060 #include <${cf_cv_ncurses_header:-curses.h}>
20071 rm -f "conftest.$ac_objext"
20072 if { (eval echo "$as_me:20072: \"$ac_compile\"") >&5
20073 (eval $ac_compile) 2>&5
20075 echo "$as_me:20075: \$? = $ac_status" >&5
20076 (exit "$ac_status"); } &&
20077 { ac_try='test -s "conftest.$ac_objext"'
20078 { (eval echo "$as_me:20078: \"$ac_try\"") >&5
20079 (eval $ac_try) 2>&5
20081 echo "$as_me:20081: \$? = $ac_status" >&5
20082 (exit "$ac_status"); }; }; then
20085 echo "$as_me: failed program was:" >&5
20086 cat "conftest.$ac_ext" >&5
20089 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20090 echo "$as_me:20090: result: $cf_result" >&5
20091 echo "${ECHO_T}$cf_result" >&6
20092 if test "$cf_result" = yes ; then
20094 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20096 cat >>confdefs.h <<EOF
20097 #define $cf_result 1
20102 cat >>confdefs.h <<EOF
20103 #define attr_t long
20108 if test "$cf_enable_widec" = yes; then
20110 # This is needed on Tru64 5.0 to declare mbstate_t
20111 echo "$as_me:20111: checking if we must include wchar.h to declare mbstate_t" >&5
20112 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
20113 if test "${cf_cv_mbstate_t+set}" = set; then
20114 echo $ECHO_N "(cached) $ECHO_C" >&6
20117 cat >"conftest.$ac_ext" <<_ACEOF
20118 #line 20118 "configure"
20119 #include "confdefs.h"
20121 #include <stdlib.h>
20122 #include <stdarg.h>
20124 #ifdef HAVE_LIBUTF8_H
20125 #include <libutf8.h>
20135 rm -f "conftest.$ac_objext"
20136 if { (eval echo "$as_me:20136: \"$ac_compile\"") >&5
20137 (eval $ac_compile) 2>&5
20139 echo "$as_me:20139: \$? = $ac_status" >&5
20140 (exit "$ac_status"); } &&
20141 { ac_try='test -s "conftest.$ac_objext"'
20142 { (eval echo "$as_me:20142: \"$ac_try\"") >&5
20143 (eval $ac_try) 2>&5
20145 echo "$as_me:20145: \$? = $ac_status" >&5
20146 (exit "$ac_status"); }; }; then
20149 echo "$as_me: failed program was:" >&5
20150 cat "conftest.$ac_ext" >&5
20151 cat >"conftest.$ac_ext" <<_ACEOF
20152 #line 20152 "configure"
20153 #include "confdefs.h"
20155 #include <stdlib.h>
20156 #include <stdarg.h>
20159 #ifdef HAVE_LIBUTF8_H
20160 #include <libutf8.h>
20170 rm -f "conftest.$ac_objext"
20171 if { (eval echo "$as_me:20171: \"$ac_compile\"") >&5
20172 (eval $ac_compile) 2>&5
20174 echo "$as_me:20174: \$? = $ac_status" >&5
20175 (exit "$ac_status"); } &&
20176 { ac_try='test -s "conftest.$ac_objext"'
20177 { (eval echo "$as_me:20177: \"$ac_try\"") >&5
20178 (eval $ac_try) 2>&5
20180 echo "$as_me:20180: \$? = $ac_status" >&5
20181 (exit "$ac_status"); }; }; then
20182 cf_cv_mbstate_t=yes
20184 echo "$as_me: failed program was:" >&5
20185 cat "conftest.$ac_ext" >&5
20186 cf_cv_mbstate_t=unknown
20188 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20190 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20192 echo "$as_me:20192: result: $cf_cv_mbstate_t" >&5
20193 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
20195 if test "$cf_cv_mbstate_t" = yes ; then
20197 cat >>confdefs.h <<\EOF
20198 #define NEED_WCHAR_H 1
20204 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
20205 if test "$cf_cv_mbstate_t" = unknown ; then
20206 NCURSES_MBSTATE_T=1
20209 # if we find mbstate_t in either place, use substitution to provide a fallback.
20210 if test "$cf_cv_mbstate_t" != unknown ; then
20211 NCURSES_OK_MBSTATE_T=1
20214 # This is needed on Tru64 5.0 to declare wchar_t
20215 echo "$as_me:20215: checking if we must include wchar.h to declare wchar_t" >&5
20216 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
20217 if test "${cf_cv_wchar_t+set}" = set; then
20218 echo $ECHO_N "(cached) $ECHO_C" >&6
20221 cat >"conftest.$ac_ext" <<_ACEOF
20222 #line 20222 "configure"
20223 #include "confdefs.h"
20225 #include <stdlib.h>
20226 #include <stdarg.h>
20228 #ifdef HAVE_LIBUTF8_H
20229 #include <libutf8.h>
20239 rm -f "conftest.$ac_objext"
20240 if { (eval echo "$as_me:20240: \"$ac_compile\"") >&5
20241 (eval $ac_compile) 2>&5
20243 echo "$as_me:20243: \$? = $ac_status" >&5
20244 (exit "$ac_status"); } &&
20245 { ac_try='test -s "conftest.$ac_objext"'
20246 { (eval echo "$as_me:20246: \"$ac_try\"") >&5
20247 (eval $ac_try) 2>&5
20249 echo "$as_me:20249: \$? = $ac_status" >&5
20250 (exit "$ac_status"); }; }; then
20253 echo "$as_me: failed program was:" >&5
20254 cat "conftest.$ac_ext" >&5
20255 cat >"conftest.$ac_ext" <<_ACEOF
20256 #line 20256 "configure"
20257 #include "confdefs.h"
20259 #include <stdlib.h>
20260 #include <stdarg.h>
20263 #ifdef HAVE_LIBUTF8_H
20264 #include <libutf8.h>
20274 rm -f "conftest.$ac_objext"
20275 if { (eval echo "$as_me:20275: \"$ac_compile\"") >&5
20276 (eval $ac_compile) 2>&5
20278 echo "$as_me:20278: \$? = $ac_status" >&5
20279 (exit "$ac_status"); } &&
20280 { ac_try='test -s "conftest.$ac_objext"'
20281 { (eval echo "$as_me:20281: \"$ac_try\"") >&5
20282 (eval $ac_try) 2>&5
20284 echo "$as_me:20284: \$? = $ac_status" >&5
20285 (exit "$ac_status"); }; }; then
20288 echo "$as_me: failed program was:" >&5
20289 cat "conftest.$ac_ext" >&5
20290 cf_cv_wchar_t=unknown
20292 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20294 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20296 echo "$as_me:20296: result: $cf_cv_wchar_t" >&5
20297 echo "${ECHO_T}$cf_cv_wchar_t" >&6
20299 if test "$cf_cv_wchar_t" = yes ; then
20301 cat >>confdefs.h <<\EOF
20302 #define NEED_WCHAR_H 1
20308 # if we do not find wchar_t in either place, use substitution to provide a fallback.
20309 if test "$cf_cv_wchar_t" = unknown ; then
20313 # if we find wchar_t in either place, use substitution to provide a fallback.
20314 if test "$cf_cv_wchar_t" != unknown ; then
20315 NCURSES_OK_WCHAR_T=1
20318 # This is needed on Tru64 5.0 to declare wint_t
20319 echo "$as_me:20319: checking if we must include wchar.h to declare wint_t" >&5
20320 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
20321 if test "${cf_cv_wint_t+set}" = set; then
20322 echo $ECHO_N "(cached) $ECHO_C" >&6
20325 cat >"conftest.$ac_ext" <<_ACEOF
20326 #line 20326 "configure"
20327 #include "confdefs.h"
20329 #include <stdlib.h>
20330 #include <stdarg.h>
20332 #ifdef HAVE_LIBUTF8_H
20333 #include <libutf8.h>
20343 rm -f "conftest.$ac_objext"
20344 if { (eval echo "$as_me:20344: \"$ac_compile\"") >&5
20345 (eval $ac_compile) 2>&5
20347 echo "$as_me:20347: \$? = $ac_status" >&5
20348 (exit "$ac_status"); } &&
20349 { ac_try='test -s "conftest.$ac_objext"'
20350 { (eval echo "$as_me:20350: \"$ac_try\"") >&5
20351 (eval $ac_try) 2>&5
20353 echo "$as_me:20353: \$? = $ac_status" >&5
20354 (exit "$ac_status"); }; }; then
20357 echo "$as_me: failed program was:" >&5
20358 cat "conftest.$ac_ext" >&5
20359 cat >"conftest.$ac_ext" <<_ACEOF
20360 #line 20360 "configure"
20361 #include "confdefs.h"
20363 #include <stdlib.h>
20364 #include <stdarg.h>
20367 #ifdef HAVE_LIBUTF8_H
20368 #include <libutf8.h>
20378 rm -f "conftest.$ac_objext"
20379 if { (eval echo "$as_me:20379: \"$ac_compile\"") >&5
20380 (eval $ac_compile) 2>&5
20382 echo "$as_me:20382: \$? = $ac_status" >&5
20383 (exit "$ac_status"); } &&
20384 { ac_try='test -s "conftest.$ac_objext"'
20385 { (eval echo "$as_me:20385: \"$ac_try\"") >&5
20386 (eval $ac_try) 2>&5
20388 echo "$as_me:20388: \$? = $ac_status" >&5
20389 (exit "$ac_status"); }; }; then
20392 echo "$as_me: failed program was:" >&5
20393 cat "conftest.$ac_ext" >&5
20394 cf_cv_wint_t=unknown
20396 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20398 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20400 echo "$as_me:20400: result: $cf_cv_wint_t" >&5
20401 echo "${ECHO_T}$cf_cv_wint_t" >&6
20403 if test "$cf_cv_wint_t" = yes ; then
20405 cat >>confdefs.h <<\EOF
20406 #define NEED_WCHAR_H 1
20412 # if we do not find wint_t in either place, use substitution to provide a fallback.
20413 if test "$cf_cv_wint_t" = unknown ; then
20417 # if we find wint_t in either place, use substitution to provide a fallback.
20418 if test "$cf_cv_wint_t" != unknown ; then
20419 NCURSES_OK_WINT_T=1
20422 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
20424 echo "$as_me:20424: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20425 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20426 cat >"conftest.$ac_ext" <<_ACEOF
20427 #line 20427 "configure"
20428 #include "confdefs.h"
20430 #ifndef _XOPEN_SOURCE_EXTENDED
20431 #define _XOPEN_SOURCE_EXTENDED
20433 #include <${cf_cv_ncurses_header:-curses.h}>
20444 rm -f "conftest.$ac_objext"
20445 if { (eval echo "$as_me:20445: \"$ac_compile\"") >&5
20446 (eval $ac_compile) 2>&5
20448 echo "$as_me:20448: \$? = $ac_status" >&5
20449 (exit "$ac_status"); } &&
20450 { ac_try='test -s "conftest.$ac_objext"'
20451 { (eval echo "$as_me:20451: \"$ac_try\"") >&5
20452 (eval $ac_try) 2>&5
20454 echo "$as_me:20454: \$? = $ac_status" >&5
20455 (exit "$ac_status"); }; }; then
20458 echo "$as_me: failed program was:" >&5
20459 cat "conftest.$ac_ext" >&5
20462 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20463 echo "$as_me:20463: result: $cf_result" >&5
20464 echo "${ECHO_T}$cf_result" >&6
20465 if test "$cf_result" = yes ; then
20467 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20469 cat >>confdefs.h <<EOF
20470 #define $cf_result 1
20475 cat >>confdefs.h <<EOF
20476 #define mbstate_t long
20483 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
20485 echo "$as_me:20485: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20486 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20487 cat >"conftest.$ac_ext" <<_ACEOF
20488 #line 20488 "configure"
20489 #include "confdefs.h"
20491 #ifndef _XOPEN_SOURCE_EXTENDED
20492 #define _XOPEN_SOURCE_EXTENDED
20494 #include <${cf_cv_ncurses_header:-curses.h}>
20505 rm -f "conftest.$ac_objext"
20506 if { (eval echo "$as_me:20506: \"$ac_compile\"") >&5
20507 (eval $ac_compile) 2>&5
20509 echo "$as_me:20509: \$? = $ac_status" >&5
20510 (exit "$ac_status"); } &&
20511 { ac_try='test -s "conftest.$ac_objext"'
20512 { (eval echo "$as_me:20512: \"$ac_try\"") >&5
20513 (eval $ac_try) 2>&5
20515 echo "$as_me:20515: \$? = $ac_status" >&5
20516 (exit "$ac_status"); }; }; then
20519 echo "$as_me: failed program was:" >&5
20520 cat "conftest.$ac_ext" >&5
20523 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20524 echo "$as_me:20524: result: $cf_result" >&5
20525 echo "${ECHO_T}$cf_result" >&6
20526 if test "$cf_result" = yes ; then
20528 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20530 cat >>confdefs.h <<EOF
20531 #define $cf_result 1
20536 cat >>confdefs.h <<EOF
20537 #define wchar_t long
20544 if test "$NCURSES_OK_WINT_T" = 0 ; then
20546 echo "$as_me:20546: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20547 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20548 cat >"conftest.$ac_ext" <<_ACEOF
20549 #line 20549 "configure"
20550 #include "confdefs.h"
20552 #ifndef _XOPEN_SOURCE_EXTENDED
20553 #define _XOPEN_SOURCE_EXTENDED
20555 #include <${cf_cv_ncurses_header:-curses.h}>
20566 rm -f "conftest.$ac_objext"
20567 if { (eval echo "$as_me:20567: \"$ac_compile\"") >&5
20568 (eval $ac_compile) 2>&5
20570 echo "$as_me:20570: \$? = $ac_status" >&5
20571 (exit "$ac_status"); } &&
20572 { ac_try='test -s "conftest.$ac_objext"'
20573 { (eval echo "$as_me:20573: \"$ac_try\"") >&5
20574 (eval $ac_try) 2>&5
20576 echo "$as_me:20576: \$? = $ac_status" >&5
20577 (exit "$ac_status"); }; }; then
20580 echo "$as_me: failed program was:" >&5
20581 cat "conftest.$ac_ext" >&5
20584 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20585 echo "$as_me:20585: result: $cf_result" >&5
20586 echo "${ECHO_T}$cf_result" >&6
20587 if test "$cf_result" = yes ; then
20589 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20591 cat >>confdefs.h <<EOF
20592 #define $cf_result 1
20597 cat >>confdefs.h <<EOF
20598 #define wint_t long
20614 echo "$as_me:20614: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
20615 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20617 cat >"conftest.$ac_ext" <<_ACEOF
20618 #line 20618 "configure"
20619 #include "confdefs.h"
20621 #ifdef HAVE_XCURSES
20622 #include <xcurses.h>
20623 char * XCursesProgramName = "test";
20625 #include <${cf_cv_ncurses_header:-curses.h}>
20626 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20627 #include <ncursesw/term.h>
20628 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20629 #include <ncurses/term.h>
20630 #elif defined(HAVE_TERM_H)
20639 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20640 const void *foo = (const void *)($cf_data);
20642 const void *foo = &($cf_data);
20644 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20650 rm -f "conftest.$ac_objext"
20651 if { (eval echo "$as_me:20651: \"$ac_compile\"") >&5
20652 (eval $ac_compile) 2>&5
20654 echo "$as_me:20654: \$? = $ac_status" >&5
20655 (exit "$ac_status"); } &&
20656 { ac_try='test -s "conftest.$ac_objext"'
20657 { (eval echo "$as_me:20657: \"$ac_try\"") >&5
20658 (eval $ac_try) 2>&5
20660 echo "$as_me:20660: \$? = $ac_status" >&5
20661 (exit "$ac_status"); }; }; then
20665 echo "$as_me: failed program was:" >&5
20666 cat "conftest.$ac_ext" >&5
20669 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20670 echo "$as_me:20670: result: $cf_result" >&5
20671 echo "${ECHO_T}$cf_result" >&6
20673 if test "$cf_result" = yes ; then
20675 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20677 cat >>confdefs.h <<EOF
20678 #define $cf_result 1
20682 echo "$as_me:20682: checking for data $cf_data in library" >&5
20683 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
20684 # BSD linkers insist on making weak linkage, but resolve at runtime.
20685 if test "$cross_compiling" = yes; then
20688 cat >"conftest.$ac_ext" <<_ACEOF
20689 #line 20689 "configure"
20690 #include "confdefs.h"
20692 #ifdef HAVE_XCURSES
20693 #include <xcurses.h>
20694 char * XCursesProgramName = "test";
20696 #include <${cf_cv_ncurses_header:-curses.h}>
20697 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20698 #include <ncursesw/term.h>
20699 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20700 #include <ncurses/term.h>
20701 #elif defined(HAVE_TERM_H)
20706 extern char $cf_data;
20713 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20714 const void *foo = (const void *)($cf_data);
20716 const void *foo = &($cf_data);
20718 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20720 ${cf_cv_main_return:-return}(foo == 0);
20727 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20728 if { (eval echo "$as_me:20728: \"$ac_link\"") >&5
20729 (eval $ac_link) 2>&5
20731 echo "$as_me:20731: \$? = $ac_status" >&5
20732 (exit "$ac_status"); } &&
20733 { ac_try='test -s "conftest$ac_exeext"'
20734 { (eval echo "$as_me:20734: \"$ac_try\"") >&5
20735 (eval $ac_try) 2>&5
20737 echo "$as_me:20737: \$? = $ac_status" >&5
20738 (exit "$ac_status"); }; }; then
20741 echo "$as_me: failed program was:" >&5
20742 cat "conftest.$ac_ext" >&5
20745 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20748 cat >"conftest.$ac_ext" <<_ACEOF
20749 #line 20749 "configure"
20750 #include "confdefs.h"
20752 #ifdef HAVE_XCURSES
20753 #include <xcurses.h>
20754 char * XCursesProgramName = "test";
20756 #include <${cf_cv_ncurses_header:-curses.h}>
20757 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20758 #include <ncursesw/term.h>
20759 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20760 #include <ncurses/term.h>
20761 #elif defined(HAVE_TERM_H)
20766 extern char $cf_data;
20770 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20771 const void *foo = (const void *)($cf_data);
20773 const void *foo = &($cf_data);
20775 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20777 ${cf_cv_main_return:-return}(foo == 0);
20780 rm -f "conftest$ac_exeext"
20781 if { (eval echo "$as_me:20781: \"$ac_link\"") >&5
20782 (eval $ac_link) 2>&5
20784 echo "$as_me:20784: \$? = $ac_status" >&5
20785 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20786 { (eval echo "$as_me:20786: \"$ac_try\"") >&5
20787 (eval $ac_try) 2>&5
20789 echo "$as_me:20789: \$? = $ac_status" >&5
20790 (exit "$ac_status"); }; }; then
20794 echo "$as_me: program exited with status $ac_status" >&5
20795 echo "$as_me: failed program was:" >&5
20796 cat "conftest.$ac_ext" >&5
20799 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20801 echo "$as_me:20801: result: $cf_result" >&5
20802 echo "${ECHO_T}$cf_result" >&6
20803 if test "$cf_result" = yes ; then
20805 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20807 cat >>confdefs.h <<EOF
20808 #define $cf_result 1
20811 # do not exit loop here, since we prefer system's declarations
20816 if test -n "$with_screen" && test "x$with_screen" = "xpdcurses"
20818 echo "$as_me:20818: checking for X" >&5
20819 echo $ECHO_N "checking for X... $ECHO_C" >&6
20821 # Check whether --with-x or --without-x was given.
20822 if test "${with_x+set}" = set; then
20826 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
20827 if test "x$with_x" = xno; then
20828 # The user explicitly disabled X.
20831 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
20832 # Both variables are already set.
20835 if test "${ac_cv_have_x+set}" = set; then
20836 echo $ECHO_N "(cached) $ECHO_C" >&6
20838 # One or both of the vars are not set, and there is no cached value.
20839 ac_x_includes=no ac_x_libraries=no
20840 rm -fr conftest.dir
20841 if mkdir conftest.dir; then
20843 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
20844 cat >Imakefile <<'EOF'
20846 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
20848 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
20849 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
20850 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
20851 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
20852 for ac_extension in a so sl dylib dll; do
20853 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
20854 test -f "$ac_im_libdir/libX11.$ac_extension"; then
20855 ac_im_usrlibdir=$ac_im_libdir; break
20858 # Screen out bogus values from the imake configuration. They are
20859 # bogus both because they are the default anyway, and because
20860 # using them would break gcc on systems where it needs fixed includes.
20861 case $ac_im_incroot in
20863 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
20865 case $ac_im_usrlibdir in
20866 /usr/lib | /lib) ;;
20867 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
20871 rm -fr conftest.dir
20874 # Standard set of common directories for X headers.
20875 # Check X11 before X11Rn because it is often a symlink to the current release.
20892 /usr/local/X11/include
20893 /usr/local/X11R7/include
20894 /usr/local/X11R6/include
20895 /usr/local/X11R5/include
20896 /usr/local/X11R4/include
20898 /usr/local/include/X11
20899 /usr/local/include/X11R7
20900 /usr/local/include/X11R6
20901 /usr/local/include/X11R5
20902 /usr/local/include/X11R4
20906 /usr/XFree86/include/X11
20910 /usr/unsupported/include
20911 /usr/athena/include
20912 /usr/local/x11r5/include
20913 /usr/lpp/Xamples/include
20915 /usr/openwin/include
20916 /usr/openwin/share/include'
20918 if test "$ac_x_includes" = no; then
20919 # Guess where to find include files, by looking for Intrinsic.h.
20920 # First, try using that file with no special directory specified.
20921 cat >"conftest.$ac_ext" <<_ACEOF
20922 #line 20922 "configure"
20923 #include "confdefs.h"
20924 #include <X11/Intrinsic.h>
20926 if { (eval echo "$as_me:20926: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20927 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20929 $EGREP -v '^ *\+' conftest.er1 >conftest.err
20931 cat conftest.err >&5
20932 echo "$as_me:20932: \$? = $ac_status" >&5
20933 (exit "$ac_status"); } >/dev/null; then
20934 if test -s conftest.err; then
20935 ac_cpp_err=$ac_c_preproc_warn_flag
20942 if test -z "$ac_cpp_err"; then
20943 # We can compile using X headers with no special include directory.
20946 echo "$as_me: failed program was:" >&5
20947 cat "conftest.$ac_ext" >&5
20948 for ac_dir in $ac_x_header_dirs; do
20949 if test -r "$ac_dir/X11/Intrinsic.h"; then
20950 ac_x_includes=$ac_dir
20955 rm -f conftest.err "conftest.$ac_ext"
20956 fi # $ac_x_includes = no
20958 if test "$ac_x_libraries" = no; then
20959 # Check for the libraries.
20960 # See if we find them without any special options.
20961 # Don't add to $LIBS permanently.
20964 cat >"conftest.$ac_ext" <<_ACEOF
20965 #line 20965 "configure"
20966 #include "confdefs.h"
20967 #include <X11/Intrinsic.h>
20976 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20977 if { (eval echo "$as_me:20977: \"$ac_link\"") >&5
20978 (eval $ac_link) 2>&5
20980 echo "$as_me:20980: \$? = $ac_status" >&5
20981 (exit "$ac_status"); } &&
20982 { ac_try='test -s "conftest$ac_exeext"'
20983 { (eval echo "$as_me:20983: \"$ac_try\"") >&5
20984 (eval $ac_try) 2>&5
20986 echo "$as_me:20986: \$? = $ac_status" >&5
20987 (exit "$ac_status"); }; }; then
20989 # We can link X programs with no special library path.
20992 echo "$as_me: failed program was:" >&5
20993 cat "conftest.$ac_ext" >&5
20995 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
20997 # Don't even attempt the hair of trying to link an X program!
20998 for ac_extension in a so sl dylib dll; do
20999 if test -r "$ac_dir/libXt.$ac_extension"; then
21000 ac_x_libraries=$ac_dir
21006 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21007 fi # $ac_x_libraries = no
21009 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
21010 # Didn't find X anywhere. Cache the known absence of X.
21011 ac_cv_have_x="have_x=no"
21013 # Record where we found X for the cache.
21014 ac_cv_have_x="have_x=yes \
21015 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
21020 eval "$ac_cv_have_x"
21023 if test "$have_x" != yes; then
21024 echo "$as_me:21024: result: $have_x" >&5
21025 echo "${ECHO_T}$have_x" >&6
21028 # If each of the values was on the command line, it overrides each guess.
21029 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
21030 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
21031 # Update the cache value to reflect the command line values.
21032 ac_cv_have_x="have_x=yes \
21033 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
21034 echo "$as_me:21034: result: libraries $x_libraries, headers $x_includes" >&5
21035 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
21038 if test "$no_x" = yes; then
21039 # Not all programs may use this symbol, but it does not hurt to define it.
21041 cat >>confdefs.h <<\EOF
21042 #define X_DISPLAY_MISSING 1
21050 if test -n "$x_includes"; then
21051 X_CFLAGS="$X_CFLAGS -I$x_includes"
21054 # It would also be nice to do this for all -L options, not just this one.
21055 if test -n "$x_libraries"; then
21056 X_LIBS="$X_LIBS -L$x_libraries"
21057 # For Solaris; some versions of Sun CC require a space after -R and
21058 # others require no space. Words are not sufficient . . . .
21059 case `(uname -sr) 2>/dev/null` in
21061 echo "$as_me:21061: checking whether -R must be followed by a space" >&5
21062 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
21063 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
21064 cat >"conftest.$ac_ext" <<_ACEOF
21065 #line 21065 "configure"
21066 #include "confdefs.h"
21076 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21077 if { (eval echo "$as_me:21077: \"$ac_link\"") >&5
21078 (eval $ac_link) 2>&5
21080 echo "$as_me:21080: \$? = $ac_status" >&5
21081 (exit "$ac_status"); } &&
21082 { ac_try='test -s "conftest$ac_exeext"'
21083 { (eval echo "$as_me:21083: \"$ac_try\"") >&5
21084 (eval $ac_try) 2>&5
21086 echo "$as_me:21086: \$? = $ac_status" >&5
21087 (exit "$ac_status"); }; }; then
21090 echo "$as_me: failed program was:" >&5
21091 cat "conftest.$ac_ext" >&5
21094 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21095 if test $ac_R_nospace = yes; then
21096 echo "$as_me:21096: result: no" >&5
21097 echo "${ECHO_T}no" >&6
21098 X_LIBS="$X_LIBS -R$x_libraries"
21100 LIBS="$ac_xsave_LIBS -R $x_libraries"
21101 cat >"conftest.$ac_ext" <<_ACEOF
21102 #line 21102 "configure"
21103 #include "confdefs.h"
21113 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21114 if { (eval echo "$as_me:21114: \"$ac_link\"") >&5
21115 (eval $ac_link) 2>&5
21117 echo "$as_me:21117: \$? = $ac_status" >&5
21118 (exit "$ac_status"); } &&
21119 { ac_try='test -s "conftest$ac_exeext"'
21120 { (eval echo "$as_me:21120: \"$ac_try\"") >&5
21121 (eval $ac_try) 2>&5
21123 echo "$as_me:21123: \$? = $ac_status" >&5
21124 (exit "$ac_status"); }; }; then
21127 echo "$as_me: failed program was:" >&5
21128 cat "conftest.$ac_ext" >&5
21131 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21132 if test $ac_R_space = yes; then
21133 echo "$as_me:21133: result: yes" >&5
21134 echo "${ECHO_T}yes" >&6
21135 X_LIBS="$X_LIBS -R $x_libraries"
21137 echo "$as_me:21137: result: neither works" >&5
21138 echo "${ECHO_T}neither works" >&6
21141 LIBS=$ac_xsave_LIBS
21145 # Check for system-dependent libraries X programs must link with.
21146 # Do this before checking for the system-independent R6 libraries
21147 # (-lICE), since we may need -lsocket or whatever for X linking.
21149 if test "$ISC" = yes; then
21150 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
21152 # Martyn Johnson says this is needed for Ultrix, if the X
21153 # libraries were built with DECnet support. And Karl Berry says
21154 # the Alpha needs dnet_stub (dnet does not exist).
21155 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
21156 cat >"conftest.$ac_ext" <<_ACEOF
21157 #line 21157 "configure"
21158 #include "confdefs.h"
21160 /* Override any gcc2 internal prototype to avoid an error. */
21164 /* We use char because int might match the return type of a gcc2
21165 builtin and then its argument prototype would still apply. */
21166 char XOpenDisplay ();
21175 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21176 if { (eval echo "$as_me:21176: \"$ac_link\"") >&5
21177 (eval $ac_link) 2>&5
21179 echo "$as_me:21179: \$? = $ac_status" >&5
21180 (exit "$ac_status"); } &&
21181 { ac_try='test -s "conftest$ac_exeext"'
21182 { (eval echo "$as_me:21182: \"$ac_try\"") >&5
21183 (eval $ac_try) 2>&5
21185 echo "$as_me:21185: \$? = $ac_status" >&5
21186 (exit "$ac_status"); }; }; then
21189 echo "$as_me: failed program was:" >&5
21190 cat "conftest.$ac_ext" >&5
21191 echo "$as_me:21191: checking for dnet_ntoa in -ldnet" >&5
21192 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
21193 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
21194 echo $ECHO_N "(cached) $ECHO_C" >&6
21196 ac_check_lib_save_LIBS=$LIBS
21197 LIBS="-ldnet $LIBS"
21198 cat >"conftest.$ac_ext" <<_ACEOF
21199 #line 21199 "configure"
21200 #include "confdefs.h"
21202 /* Override any gcc2 internal prototype to avoid an error. */
21206 /* We use char because int might match the return type of a gcc2
21207 builtin and then its argument prototype would still apply. */
21217 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21218 if { (eval echo "$as_me:21218: \"$ac_link\"") >&5
21219 (eval $ac_link) 2>&5
21221 echo "$as_me:21221: \$? = $ac_status" >&5
21222 (exit "$ac_status"); } &&
21223 { ac_try='test -s "conftest$ac_exeext"'
21224 { (eval echo "$as_me:21224: \"$ac_try\"") >&5
21225 (eval $ac_try) 2>&5
21227 echo "$as_me:21227: \$? = $ac_status" >&5
21228 (exit "$ac_status"); }; }; then
21229 ac_cv_lib_dnet_dnet_ntoa=yes
21231 echo "$as_me: failed program was:" >&5
21232 cat "conftest.$ac_ext" >&5
21233 ac_cv_lib_dnet_dnet_ntoa=no
21235 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21236 LIBS=$ac_check_lib_save_LIBS
21238 echo "$as_me:21238: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
21239 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
21240 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
21241 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
21244 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
21245 echo "$as_me:21245: checking for dnet_ntoa in -ldnet_stub" >&5
21246 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
21247 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
21248 echo $ECHO_N "(cached) $ECHO_C" >&6
21250 ac_check_lib_save_LIBS=$LIBS
21251 LIBS="-ldnet_stub $LIBS"
21252 cat >"conftest.$ac_ext" <<_ACEOF
21253 #line 21253 "configure"
21254 #include "confdefs.h"
21256 /* Override any gcc2 internal prototype to avoid an error. */
21260 /* We use char because int might match the return type of a gcc2
21261 builtin and then its argument prototype would still apply. */
21271 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21272 if { (eval echo "$as_me:21272: \"$ac_link\"") >&5
21273 (eval $ac_link) 2>&5
21275 echo "$as_me:21275: \$? = $ac_status" >&5
21276 (exit "$ac_status"); } &&
21277 { ac_try='test -s "conftest$ac_exeext"'
21278 { (eval echo "$as_me:21278: \"$ac_try\"") >&5
21279 (eval $ac_try) 2>&5
21281 echo "$as_me:21281: \$? = $ac_status" >&5
21282 (exit "$ac_status"); }; }; then
21283 ac_cv_lib_dnet_stub_dnet_ntoa=yes
21285 echo "$as_me: failed program was:" >&5
21286 cat "conftest.$ac_ext" >&5
21287 ac_cv_lib_dnet_stub_dnet_ntoa=no
21289 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21290 LIBS=$ac_check_lib_save_LIBS
21292 echo "$as_me:21292: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
21293 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
21294 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
21295 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
21300 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21301 LIBS="$ac_xsave_LIBS"
21303 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
21304 # to get the SysV transport functions.
21305 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
21307 # The nsl library prevents programs from opening the X display
21308 # on Irix 5.2, according to T.E. Dickey.
21309 # The functions gethostbyname, getservbyname, and inet_addr are
21310 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
21311 echo "$as_me:21311: checking for gethostbyname" >&5
21312 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
21313 if test "${ac_cv_func_gethostbyname+set}" = set; then
21314 echo $ECHO_N "(cached) $ECHO_C" >&6
21316 cat >"conftest.$ac_ext" <<_ACEOF
21317 #line 21317 "configure"
21318 #include "confdefs.h"
21319 #define gethostbyname autoconf_temporary
21320 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21321 #undef gethostbyname
21327 /* We use char because int might match the return type of a gcc2
21328 builtin and then its argument prototype would still apply. */
21329 char gethostbyname (void);
21335 /* The GNU C library defines stubs for functions which it implements
21336 to always fail with ENOSYS. Some functions are actually named
21337 something starting with __ and the normal name is an alias. */
21338 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
21339 #error found stub for gethostbyname
21342 return gethostbyname ();
21347 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21348 if { (eval echo "$as_me:21348: \"$ac_link\"") >&5
21349 (eval $ac_link) 2>&5
21351 echo "$as_me:21351: \$? = $ac_status" >&5
21352 (exit "$ac_status"); } &&
21353 { ac_try='test -s "conftest$ac_exeext"'
21354 { (eval echo "$as_me:21354: \"$ac_try\"") >&5
21355 (eval $ac_try) 2>&5
21357 echo "$as_me:21357: \$? = $ac_status" >&5
21358 (exit "$ac_status"); }; }; then
21359 ac_cv_func_gethostbyname=yes
21361 echo "$as_me: failed program was:" >&5
21362 cat "conftest.$ac_ext" >&5
21363 ac_cv_func_gethostbyname=no
21365 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21367 echo "$as_me:21367: result: $ac_cv_func_gethostbyname" >&5
21368 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
21370 if test $ac_cv_func_gethostbyname = no; then
21371 echo "$as_me:21371: checking for gethostbyname in -lnsl" >&5
21372 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
21373 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
21374 echo $ECHO_N "(cached) $ECHO_C" >&6
21376 ac_check_lib_save_LIBS=$LIBS
21378 cat >"conftest.$ac_ext" <<_ACEOF
21379 #line 21379 "configure"
21380 #include "confdefs.h"
21382 /* Override any gcc2 internal prototype to avoid an error. */
21386 /* We use char because int might match the return type of a gcc2
21387 builtin and then its argument prototype would still apply. */
21388 char gethostbyname ();
21397 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21398 if { (eval echo "$as_me:21398: \"$ac_link\"") >&5
21399 (eval $ac_link) 2>&5
21401 echo "$as_me:21401: \$? = $ac_status" >&5
21402 (exit "$ac_status"); } &&
21403 { ac_try='test -s "conftest$ac_exeext"'
21404 { (eval echo "$as_me:21404: \"$ac_try\"") >&5
21405 (eval $ac_try) 2>&5
21407 echo "$as_me:21407: \$? = $ac_status" >&5
21408 (exit "$ac_status"); }; }; then
21409 ac_cv_lib_nsl_gethostbyname=yes
21411 echo "$as_me: failed program was:" >&5
21412 cat "conftest.$ac_ext" >&5
21413 ac_cv_lib_nsl_gethostbyname=no
21415 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21416 LIBS=$ac_check_lib_save_LIBS
21418 echo "$as_me:21418: result: $ac_cv_lib_nsl_gethostbyname" >&5
21419 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
21420 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
21421 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
21424 if test $ac_cv_lib_nsl_gethostbyname = no; then
21425 echo "$as_me:21425: checking for gethostbyname in -lbsd" >&5
21426 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
21427 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
21428 echo $ECHO_N "(cached) $ECHO_C" >&6
21430 ac_check_lib_save_LIBS=$LIBS
21432 cat >"conftest.$ac_ext" <<_ACEOF
21433 #line 21433 "configure"
21434 #include "confdefs.h"
21436 /* Override any gcc2 internal prototype to avoid an error. */
21440 /* We use char because int might match the return type of a gcc2
21441 builtin and then its argument prototype would still apply. */
21442 char gethostbyname ();
21451 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21452 if { (eval echo "$as_me:21452: \"$ac_link\"") >&5
21453 (eval $ac_link) 2>&5
21455 echo "$as_me:21455: \$? = $ac_status" >&5
21456 (exit "$ac_status"); } &&
21457 { ac_try='test -s "conftest$ac_exeext"'
21458 { (eval echo "$as_me:21458: \"$ac_try\"") >&5
21459 (eval $ac_try) 2>&5
21461 echo "$as_me:21461: \$? = $ac_status" >&5
21462 (exit "$ac_status"); }; }; then
21463 ac_cv_lib_bsd_gethostbyname=yes
21465 echo "$as_me: failed program was:" >&5
21466 cat "conftest.$ac_ext" >&5
21467 ac_cv_lib_bsd_gethostbyname=no
21469 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21470 LIBS=$ac_check_lib_save_LIBS
21472 echo "$as_me:21472: result: $ac_cv_lib_bsd_gethostbyname" >&5
21473 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
21474 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
21475 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
21481 # lieder@skyler.mavd.honeywell.com says without -lsocket,
21482 # socket/setsockopt and other routines are undefined under SCO ODT
21483 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
21484 # on later versions), says Simon Leinen: it contains gethostby*
21485 # variants that don't use the nameserver (or something). -lsocket
21486 # must be given before -lnsl if both are needed. We assume that
21487 # if connect needs -lnsl, so does gethostbyname.
21488 echo "$as_me:21488: checking for connect" >&5
21489 echo $ECHO_N "checking for connect... $ECHO_C" >&6
21490 if test "${ac_cv_func_connect+set}" = set; then
21491 echo $ECHO_N "(cached) $ECHO_C" >&6
21493 cat >"conftest.$ac_ext" <<_ACEOF
21494 #line 21494 "configure"
21495 #include "confdefs.h"
21496 #define connect autoconf_temporary
21497 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21504 /* We use char because int might match the return type of a gcc2
21505 builtin and then its argument prototype would still apply. */
21506 char connect (void);
21512 /* The GNU C library defines stubs for functions which it implements
21513 to always fail with ENOSYS. Some functions are actually named
21514 something starting with __ and the normal name is an alias. */
21515 #if defined (__stub_connect) || defined (__stub___connect)
21516 #error found stub for connect
21524 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21525 if { (eval echo "$as_me:21525: \"$ac_link\"") >&5
21526 (eval $ac_link) 2>&5
21528 echo "$as_me:21528: \$? = $ac_status" >&5
21529 (exit "$ac_status"); } &&
21530 { ac_try='test -s "conftest$ac_exeext"'
21531 { (eval echo "$as_me:21531: \"$ac_try\"") >&5
21532 (eval $ac_try) 2>&5
21534 echo "$as_me:21534: \$? = $ac_status" >&5
21535 (exit "$ac_status"); }; }; then
21536 ac_cv_func_connect=yes
21538 echo "$as_me: failed program was:" >&5
21539 cat "conftest.$ac_ext" >&5
21540 ac_cv_func_connect=no
21542 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21544 echo "$as_me:21544: result: $ac_cv_func_connect" >&5
21545 echo "${ECHO_T}$ac_cv_func_connect" >&6
21547 if test $ac_cv_func_connect = no; then
21548 echo "$as_me:21548: checking for connect in -lsocket" >&5
21549 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
21550 if test "${ac_cv_lib_socket_connect+set}" = set; then
21551 echo $ECHO_N "(cached) $ECHO_C" >&6
21553 ac_check_lib_save_LIBS=$LIBS
21554 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
21555 cat >"conftest.$ac_ext" <<_ACEOF
21556 #line 21556 "configure"
21557 #include "confdefs.h"
21559 /* Override any gcc2 internal prototype to avoid an error. */
21563 /* We use char because int might match the return type of a gcc2
21564 builtin and then its argument prototype would still apply. */
21574 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21575 if { (eval echo "$as_me:21575: \"$ac_link\"") >&5
21576 (eval $ac_link) 2>&5
21578 echo "$as_me:21578: \$? = $ac_status" >&5
21579 (exit "$ac_status"); } &&
21580 { ac_try='test -s "conftest$ac_exeext"'
21581 { (eval echo "$as_me:21581: \"$ac_try\"") >&5
21582 (eval $ac_try) 2>&5
21584 echo "$as_me:21584: \$? = $ac_status" >&5
21585 (exit "$ac_status"); }; }; then
21586 ac_cv_lib_socket_connect=yes
21588 echo "$as_me: failed program was:" >&5
21589 cat "conftest.$ac_ext" >&5
21590 ac_cv_lib_socket_connect=no
21592 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21593 LIBS=$ac_check_lib_save_LIBS
21595 echo "$as_me:21595: result: $ac_cv_lib_socket_connect" >&5
21596 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
21597 if test "$ac_cv_lib_socket_connect" = yes; then
21598 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
21603 # Guillermo Gomez says -lposix is necessary on A/UX.
21604 echo "$as_me:21604: checking for remove" >&5
21605 echo $ECHO_N "checking for remove... $ECHO_C" >&6
21606 if test "${ac_cv_func_remove+set}" = set; then
21607 echo $ECHO_N "(cached) $ECHO_C" >&6
21609 cat >"conftest.$ac_ext" <<_ACEOF
21610 #line 21610 "configure"
21611 #include "confdefs.h"
21612 #define remove autoconf_temporary
21613 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21620 /* We use char because int might match the return type of a gcc2
21621 builtin and then its argument prototype would still apply. */
21622 char remove (void);
21628 /* The GNU C library defines stubs for functions which it implements
21629 to always fail with ENOSYS. Some functions are actually named
21630 something starting with __ and the normal name is an alias. */
21631 #if defined (__stub_remove) || defined (__stub___remove)
21632 #error found stub for remove
21640 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21641 if { (eval echo "$as_me:21641: \"$ac_link\"") >&5
21642 (eval $ac_link) 2>&5
21644 echo "$as_me:21644: \$? = $ac_status" >&5
21645 (exit "$ac_status"); } &&
21646 { ac_try='test -s "conftest$ac_exeext"'
21647 { (eval echo "$as_me:21647: \"$ac_try\"") >&5
21648 (eval $ac_try) 2>&5
21650 echo "$as_me:21650: \$? = $ac_status" >&5
21651 (exit "$ac_status"); }; }; then
21652 ac_cv_func_remove=yes
21654 echo "$as_me: failed program was:" >&5
21655 cat "conftest.$ac_ext" >&5
21656 ac_cv_func_remove=no
21658 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21660 echo "$as_me:21660: result: $ac_cv_func_remove" >&5
21661 echo "${ECHO_T}$ac_cv_func_remove" >&6
21663 if test $ac_cv_func_remove = no; then
21664 echo "$as_me:21664: checking for remove in -lposix" >&5
21665 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
21666 if test "${ac_cv_lib_posix_remove+set}" = set; then
21667 echo $ECHO_N "(cached) $ECHO_C" >&6
21669 ac_check_lib_save_LIBS=$LIBS
21670 LIBS="-lposix $LIBS"
21671 cat >"conftest.$ac_ext" <<_ACEOF
21672 #line 21672 "configure"
21673 #include "confdefs.h"
21675 /* Override any gcc2 internal prototype to avoid an error. */
21679 /* We use char because int might match the return type of a gcc2
21680 builtin and then its argument prototype would still apply. */
21690 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21691 if { (eval echo "$as_me:21691: \"$ac_link\"") >&5
21692 (eval $ac_link) 2>&5
21694 echo "$as_me:21694: \$? = $ac_status" >&5
21695 (exit "$ac_status"); } &&
21696 { ac_try='test -s "conftest$ac_exeext"'
21697 { (eval echo "$as_me:21697: \"$ac_try\"") >&5
21698 (eval $ac_try) 2>&5
21700 echo "$as_me:21700: \$? = $ac_status" >&5
21701 (exit "$ac_status"); }; }; then
21702 ac_cv_lib_posix_remove=yes
21704 echo "$as_me: failed program was:" >&5
21705 cat "conftest.$ac_ext" >&5
21706 ac_cv_lib_posix_remove=no
21708 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21709 LIBS=$ac_check_lib_save_LIBS
21711 echo "$as_me:21711: result: $ac_cv_lib_posix_remove" >&5
21712 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
21713 if test "$ac_cv_lib_posix_remove" = yes; then
21714 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
21719 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
21720 echo "$as_me:21720: checking for shmat" >&5
21721 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
21722 if test "${ac_cv_func_shmat+set}" = set; then
21723 echo $ECHO_N "(cached) $ECHO_C" >&6
21725 cat >"conftest.$ac_ext" <<_ACEOF
21726 #line 21726 "configure"
21727 #include "confdefs.h"
21728 #define shmat autoconf_temporary
21729 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21736 /* We use char because int might match the return type of a gcc2
21737 builtin and then its argument prototype would still apply. */
21744 /* The GNU C library defines stubs for functions which it implements
21745 to always fail with ENOSYS. Some functions are actually named
21746 something starting with __ and the normal name is an alias. */
21747 #if defined (__stub_shmat) || defined (__stub___shmat)
21748 #error found stub for shmat
21756 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21757 if { (eval echo "$as_me:21757: \"$ac_link\"") >&5
21758 (eval $ac_link) 2>&5
21760 echo "$as_me:21760: \$? = $ac_status" >&5
21761 (exit "$ac_status"); } &&
21762 { ac_try='test -s "conftest$ac_exeext"'
21763 { (eval echo "$as_me:21763: \"$ac_try\"") >&5
21764 (eval $ac_try) 2>&5
21766 echo "$as_me:21766: \$? = $ac_status" >&5
21767 (exit "$ac_status"); }; }; then
21768 ac_cv_func_shmat=yes
21770 echo "$as_me: failed program was:" >&5
21771 cat "conftest.$ac_ext" >&5
21772 ac_cv_func_shmat=no
21774 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21776 echo "$as_me:21776: result: $ac_cv_func_shmat" >&5
21777 echo "${ECHO_T}$ac_cv_func_shmat" >&6
21779 if test $ac_cv_func_shmat = no; then
21780 echo "$as_me:21780: checking for shmat in -lipc" >&5
21781 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
21782 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
21783 echo $ECHO_N "(cached) $ECHO_C" >&6
21785 ac_check_lib_save_LIBS=$LIBS
21787 cat >"conftest.$ac_ext" <<_ACEOF
21788 #line 21788 "configure"
21789 #include "confdefs.h"
21791 /* Override any gcc2 internal prototype to avoid an error. */
21795 /* We use char because int might match the return type of a gcc2
21796 builtin and then its argument prototype would still apply. */
21806 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21807 if { (eval echo "$as_me:21807: \"$ac_link\"") >&5
21808 (eval $ac_link) 2>&5
21810 echo "$as_me:21810: \$? = $ac_status" >&5
21811 (exit "$ac_status"); } &&
21812 { ac_try='test -s "conftest$ac_exeext"'
21813 { (eval echo "$as_me:21813: \"$ac_try\"") >&5
21814 (eval $ac_try) 2>&5
21816 echo "$as_me:21816: \$? = $ac_status" >&5
21817 (exit "$ac_status"); }; }; then
21818 ac_cv_lib_ipc_shmat=yes
21820 echo "$as_me: failed program was:" >&5
21821 cat "conftest.$ac_ext" >&5
21822 ac_cv_lib_ipc_shmat=no
21824 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21825 LIBS=$ac_check_lib_save_LIBS
21827 echo "$as_me:21827: result: $ac_cv_lib_ipc_shmat" >&5
21828 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
21829 if test "$ac_cv_lib_ipc_shmat" = yes; then
21830 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
21836 # Check for libraries that X11R6 Xt/Xaw programs need.
21837 ac_save_LDFLAGS=$LDFLAGS
21838 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
21839 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
21840 # check for ICE first), but we must link in the order -lSM -lICE or
21841 # we get undefined symbols. So assume we have SM if we have ICE.
21842 # These have to be linked with before -lX11, unlike the other
21843 # libraries we check for below, so use a different variable.
21844 # John Interrante, Karl Berry
21845 echo "$as_me:21845: checking for IceConnectionNumber in -lICE" >&5
21846 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
21847 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
21848 echo $ECHO_N "(cached) $ECHO_C" >&6
21850 ac_check_lib_save_LIBS=$LIBS
21851 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
21852 cat >"conftest.$ac_ext" <<_ACEOF
21853 #line 21853 "configure"
21854 #include "confdefs.h"
21856 /* Override any gcc2 internal prototype to avoid an error. */
21860 /* We use char because int might match the return type of a gcc2
21861 builtin and then its argument prototype would still apply. */
21862 char IceConnectionNumber ();
21866 IceConnectionNumber ();
21871 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21872 if { (eval echo "$as_me:21872: \"$ac_link\"") >&5
21873 (eval $ac_link) 2>&5
21875 echo "$as_me:21875: \$? = $ac_status" >&5
21876 (exit "$ac_status"); } &&
21877 { ac_try='test -s "conftest$ac_exeext"'
21878 { (eval echo "$as_me:21878: \"$ac_try\"") >&5
21879 (eval $ac_try) 2>&5
21881 echo "$as_me:21881: \$? = $ac_status" >&5
21882 (exit "$ac_status"); }; }; then
21883 ac_cv_lib_ICE_IceConnectionNumber=yes
21885 echo "$as_me: failed program was:" >&5
21886 cat "conftest.$ac_ext" >&5
21887 ac_cv_lib_ICE_IceConnectionNumber=no
21889 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21890 LIBS=$ac_check_lib_save_LIBS
21892 echo "$as_me:21892: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
21893 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
21894 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
21895 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
21898 LDFLAGS=$ac_save_LDFLAGS
21904 if test "$GCC" = yes || test "$GXX" = yes
21907 if test "$GCC" = yes || test "$GXX" = yes
21911 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
21913 echo "${as_me:-configure}:21913: testing repairing CFLAGS: $CFLAGS ..." 1>&5
21916 for cf_temp_scan in $CFLAGS
21918 case "x$cf_temp_scan" in
21921 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
21922 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
21927 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
21928 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
21933 CFLAGS="$cf_temp_flags"
21934 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
21936 echo "${as_me:-configure}:21936: testing ... fixed $CFLAGS ..." 1>&5
21938 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
21940 echo "${as_me:-configure}:21940: testing ... extra $EXTRA_CFLAGS ..." 1>&5
21946 if test "$GCC" = yes || test "$GXX" = yes
21950 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
21952 echo "${as_me:-configure}:21952: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
21955 for cf_temp_scan in $CPPFLAGS
21957 case "x$cf_temp_scan" in
21960 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
21961 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
21966 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
21967 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
21972 CPPFLAGS="$cf_temp_flags"
21973 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
21975 echo "${as_me:-configure}:21975: testing ... fixed $CPPFLAGS ..." 1>&5
21977 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
21979 echo "${as_me:-configure}:21979: testing ... extra $EXTRA_CFLAGS ..." 1>&5
21985 if test "$GCC" = yes || test "$GXX" = yes
21989 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
21991 echo "${as_me:-configure}:21991: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
21994 for cf_temp_scan in $LDFLAGS
21996 case "x$cf_temp_scan" in
21999 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
22000 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
22005 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22006 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22011 LDFLAGS="$cf_temp_flags"
22012 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
22014 echo "${as_me:-configure}:22014: testing ... fixed $LDFLAGS ..." 1>&5
22016 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
22018 echo "${as_me:-configure}:22018: testing ... extra $EXTRA_CFLAGS ..." 1>&5
22024 echo "$as_me:22024: checking if you want to turn on gcc warnings" >&5
22025 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
22027 # Check whether --enable-warnings or --disable-warnings was given.
22028 if test "${enable_warnings+set}" = set; then
22029 enableval="$enable_warnings"
22030 test "$enableval" != yes && enableval=no
22031 if test "$enableval" != "no" ; then
22032 enable_warnings=yes
22041 echo "$as_me:22041: result: $enable_warnings" >&5
22042 echo "${ECHO_T}$enable_warnings" >&6
22043 if test "$enable_warnings" = "yes"
22046 if test "$GCC" = yes || test "$GXX" = yes
22048 cat > conftest.i <<EOF
22050 #define GCC_PRINTF 0
22053 #define GCC_SCANF 0
22055 #ifndef GCC_NORETURN
22056 #define GCC_NORETURN /* nothing */
22059 #define GCC_UNUSED /* nothing */
22062 if test "$GCC" = yes
22064 { echo "$as_me:22064: checking for $CC __attribute__ directives..." >&5
22065 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
22066 cat > "conftest.$ac_ext" <<EOF
22067 #line 22067 "${as_me:-configure}"
22068 #include "confdefs.h"
22069 #include "conftest.h"
22070 #include "conftest.i"
22072 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
22074 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
22077 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
22079 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
22081 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
22082 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
22083 extern GCC_NORETURN void foo(void);
22084 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
22086 cf_printf_attribute=no
22087 cf_scanf_attribute=no
22088 for cf_attribute in scanf printf unused noreturn
22091 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22093 cf_directive="__attribute__(($cf_attribute))"
22094 echo "checking for $CC $cf_directive" 1>&5
22096 case "$cf_attribute" in
22098 cf_printf_attribute=yes
22099 cat >conftest.h <<EOF
22100 #define GCC_$cf_ATTRIBUTE 1
22104 cf_scanf_attribute=yes
22105 cat >conftest.h <<EOF
22106 #define GCC_$cf_ATTRIBUTE 1
22110 cat >conftest.h <<EOF
22111 #define GCC_$cf_ATTRIBUTE $cf_directive
22116 if { (eval echo "$as_me:22116: \"$ac_compile\"") >&5
22117 (eval $ac_compile) 2>&5
22119 echo "$as_me:22119: \$? = $ac_status" >&5
22120 (exit "$ac_status"); }; then
22121 test -n "$verbose" && echo "$as_me:22121: result: ... $cf_attribute" >&5
22122 echo "${ECHO_T}... $cf_attribute" >&6
22123 cat conftest.h >>confdefs.h
22124 case "$cf_attribute" in
22127 cat >>confdefs.h <<EOF
22128 #define GCC_NORETURN $cf_directive
22133 cf_value='/* nothing */'
22134 if test "$cf_printf_attribute" != no ; then
22135 cf_value='__attribute__((format(printf,fmt,var)))'
22137 cat >>confdefs.h <<\EOF
22138 #define GCC_PRINTF 1
22143 cat >>confdefs.h <<EOF
22144 #define GCC_PRINTFLIKE(fmt,var) $cf_value
22149 cf_value='/* nothing */'
22150 if test "$cf_scanf_attribute" != no ; then
22151 cf_value='__attribute__((format(scanf,fmt,var)))'
22153 cat >>confdefs.h <<\EOF
22154 #define GCC_SCANF 1
22159 cat >>confdefs.h <<EOF
22160 #define GCC_SCANFLIKE(fmt,var) $cf_value
22166 cat >>confdefs.h <<EOF
22167 #define GCC_UNUSED $cf_directive
22175 ${FGREP-fgrep} define conftest.i >>confdefs.h
22180 if test "x$have_x" = xyes; then
22182 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
22183 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
22184 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
22185 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
22186 for cf_X_CFLAGS in $X_CFLAGS
22188 case "x$cf_X_CFLAGS" in
22190 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
22193 CFLAGS="$CFLAGS $cf_X_CFLAGS"
22198 cat >"conftest.$ac_ext" <<_ACEOF
22199 #line 22199 "configure"
22200 #include "confdefs.h"
22202 #include <stdlib.h>
22203 #include <X11/Intrinsic.h>
22208 String foo = malloc(1); free((void*)foo)
22213 rm -f "conftest.$ac_objext"
22214 if { (eval echo "$as_me:22214: \"$ac_compile\"") >&5
22215 (eval $ac_compile) 2>&5
22217 echo "$as_me:22217: \$? = $ac_status" >&5
22218 (exit "$ac_status"); } &&
22219 { ac_try='test -s "conftest.$ac_objext"'
22220 { (eval echo "$as_me:22220: \"$ac_try\"") >&5
22221 (eval $ac_try) 2>&5
22223 echo "$as_me:22223: \$? = $ac_status" >&5
22224 (exit "$ac_status"); }; }; then
22226 echo "$as_me:22226: checking for X11/Xt const-feature" >&5
22227 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
22228 if test "${cf_cv_const_x_string+set}" = set; then
22229 echo $ECHO_N "(cached) $ECHO_C" >&6
22232 cat >"conftest.$ac_ext" <<_ACEOF
22233 #line 22233 "configure"
22234 #include "confdefs.h"
22236 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
22237 #undef XTSTRINGDEFINES /* X11R5 and later */
22238 #include <stdlib.h>
22239 #include <X11/Intrinsic.h>
22244 String foo = malloc(1); *foo = 0
22249 rm -f "conftest.$ac_objext"
22250 if { (eval echo "$as_me:22250: \"$ac_compile\"") >&5
22251 (eval $ac_compile) 2>&5
22253 echo "$as_me:22253: \$? = $ac_status" >&5
22254 (exit "$ac_status"); } &&
22255 { ac_try='test -s "conftest.$ac_objext"'
22256 { (eval echo "$as_me:22256: \"$ac_try\"") >&5
22257 (eval $ac_try) 2>&5
22259 echo "$as_me:22259: \$? = $ac_status" >&5
22260 (exit "$ac_status"); }; }; then
22262 cf_cv_const_x_string=no
22265 echo "$as_me: failed program was:" >&5
22266 cat "conftest.$ac_ext" >&5
22268 cf_cv_const_x_string=yes
22271 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22274 echo "$as_me:22274: result: $cf_cv_const_x_string" >&5
22275 echo "${ECHO_T}$cf_cv_const_x_string" >&6
22277 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
22278 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
22279 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
22281 case "$cf_cv_const_x_string" in
22284 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22285 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
22290 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22291 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
22297 echo "$as_me: failed program was:" >&5
22298 cat "conftest.$ac_ext" >&5
22300 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22302 cat > "conftest.$ac_ext" <<EOF
22303 #line 22303 "${as_me:-configure}"
22304 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
22306 if test "$INTEL_COMPILER" = yes
22308 # The "-wdXXX" options suppress warnings:
22309 # remark #1419: external declaration in primary source file
22310 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
22311 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
22312 # remark #193: zero used for undefined preprocessing identifier
22313 # remark #593: variable "curs_sb_left_arrow" was set but never used
22314 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
22315 # remark #869: parameter "tw" was never referenced
22316 # remark #981: operands are evaluated in unspecified order
22317 # warning #279: controlling expression is constant
22319 { echo "$as_me:22319: checking for $CC warning options..." >&5
22320 echo "$as_me: checking for $CC warning options..." >&6;}
22321 cf_save_CFLAGS="$CFLAGS"
22322 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
22334 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
22335 if { (eval echo "$as_me:22335: \"$ac_compile\"") >&5
22336 (eval $ac_compile) 2>&5
22338 echo "$as_me:22338: \$? = $ac_status" >&5
22339 (exit "$ac_status"); }; then
22340 test -n "$verbose" && echo "$as_me:22340: result: ... -$cf_opt" >&5
22341 echo "${ECHO_T}... -$cf_opt" >&6
22342 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
22345 CFLAGS="$cf_save_CFLAGS"
22346 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
22348 { echo "$as_me:22348: checking for $CC warning options..." >&5
22349 echo "$as_me: checking for $CC warning options..." >&6;}
22350 cf_save_CFLAGS="$CFLAGS"
22352 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
22353 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
22354 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
22355 for cf_opt in W Wall \
22356 Wbad-function-cast \
22359 Wdeclaration-after-statement \
22362 Wmissing-declarations \
22363 Wmissing-prototypes \
22367 Wstrict-prototypes \
22368 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
22370 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
22371 if { (eval echo "$as_me:22371: \"$ac_compile\"") >&5
22372 (eval $ac_compile) 2>&5
22374 echo "$as_me:22374: \$? = $ac_status" >&5
22375 (exit "$ac_status"); }; then
22376 test -n "$verbose" && echo "$as_me:22376: result: ... -$cf_opt" >&5
22377 echo "${ECHO_T}... -$cf_opt" >&6
22380 case "$GCC_VERSION" in
22382 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
22384 echo "${as_me:-configure}:22384: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
22390 case "$GCC_VERSION" in
22392 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
22394 echo "${as_me:-configure}:22394: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
22400 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
22403 CFLAGS="$cf_save_CFLAGS"
22411 echo "$as_me:22411: checking if you want to use dmalloc for testing" >&5
22412 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
22414 # Check whether --with-dmalloc or --without-dmalloc was given.
22415 if test "${with_dmalloc+set}" = set; then
22416 withval="$with_dmalloc"
22417 case "x$withval" in
22420 : "${with_cflags:=-g}"
22421 : "${enable_leaks:=no}"
22424 cat >>confdefs.h <<EOF
22425 #define USE_DMALLOC 1
22433 echo "$as_me:22433: result: ${with_dmalloc:-no}" >&5
22434 echo "${ECHO_T}${with_dmalloc:-no}" >&6
22436 case ".$with_cflags" in
22446 cf_new_extra_cppflags=
22448 for cf_add_cflags in -g
22450 case "$cf_fix_cppflags" in
22452 case "$cf_add_cflags" in
22453 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22454 case "$cf_add_cflags" in
22456 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22458 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22459 && test -z "${cf_tst_cflags}" \
22460 && cf_fix_cppflags=yes
22462 if test "$cf_fix_cppflags" = yes ; then
22464 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22465 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22468 elif test "${cf_tst_cflags}" = "\"'" ; then
22470 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22471 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22477 case "$CPPFLAGS" in
22481 case "$cf_add_cflags" in
22483 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22485 CPPFLAGS=`echo "$CPPFLAGS" | \
22486 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22487 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22492 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22493 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22500 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22501 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22508 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22509 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22511 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22513 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22514 && test -z "${cf_tst_cflags}" \
22515 && cf_fix_cppflags=no
22520 if test -n "$cf_new_cflags" ; then
22522 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22523 CFLAGS="${CFLAGS}$cf_new_cflags"
22527 if test -n "$cf_new_cppflags" ; then
22529 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22530 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22534 if test -n "$cf_new_extra_cppflags" ; then
22536 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22537 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22546 if test "$with_dmalloc" = yes ; then
22547 echo "$as_me:22547: checking for dmalloc.h" >&5
22548 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
22549 if test "${ac_cv_header_dmalloc_h+set}" = set; then
22550 echo $ECHO_N "(cached) $ECHO_C" >&6
22552 cat >"conftest.$ac_ext" <<_ACEOF
22553 #line 22553 "configure"
22554 #include "confdefs.h"
22555 #include <dmalloc.h>
22557 if { (eval echo "$as_me:22557: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22558 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22560 $EGREP -v '^ *\+' conftest.er1 >conftest.err
22562 cat conftest.err >&5
22563 echo "$as_me:22563: \$? = $ac_status" >&5
22564 (exit "$ac_status"); } >/dev/null; then
22565 if test -s conftest.err; then
22566 ac_cpp_err=$ac_c_preproc_warn_flag
22573 if test -z "$ac_cpp_err"; then
22574 ac_cv_header_dmalloc_h=yes
22576 echo "$as_me: failed program was:" >&5
22577 cat "conftest.$ac_ext" >&5
22578 ac_cv_header_dmalloc_h=no
22580 rm -f conftest.err "conftest.$ac_ext"
22582 echo "$as_me:22582: result: $ac_cv_header_dmalloc_h" >&5
22583 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
22584 if test "$ac_cv_header_dmalloc_h" = yes; then
22586 echo "$as_me:22586: checking for dmalloc_debug in -ldmalloc" >&5
22587 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
22588 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
22589 echo $ECHO_N "(cached) $ECHO_C" >&6
22591 ac_check_lib_save_LIBS=$LIBS
22592 LIBS="-ldmalloc $LIBS"
22593 cat >"conftest.$ac_ext" <<_ACEOF
22594 #line 22594 "configure"
22595 #include "confdefs.h"
22597 /* Override any gcc2 internal prototype to avoid an error. */
22601 /* We use char because int might match the return type of a gcc2
22602 builtin and then its argument prototype would still apply. */
22603 char dmalloc_debug ();
22612 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22613 if { (eval echo "$as_me:22613: \"$ac_link\"") >&5
22614 (eval $ac_link) 2>&5
22616 echo "$as_me:22616: \$? = $ac_status" >&5
22617 (exit "$ac_status"); } &&
22618 { ac_try='test -s "conftest$ac_exeext"'
22619 { (eval echo "$as_me:22619: \"$ac_try\"") >&5
22620 (eval $ac_try) 2>&5
22622 echo "$as_me:22622: \$? = $ac_status" >&5
22623 (exit "$ac_status"); }; }; then
22624 ac_cv_lib_dmalloc_dmalloc_debug=yes
22626 echo "$as_me: failed program was:" >&5
22627 cat "conftest.$ac_ext" >&5
22628 ac_cv_lib_dmalloc_dmalloc_debug=no
22630 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22631 LIBS=$ac_check_lib_save_LIBS
22633 echo "$as_me:22633: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
22634 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
22635 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
22636 cat >>confdefs.h <<EOF
22637 #define HAVE_LIBDMALLOC 1
22640 LIBS="-ldmalloc $LIBS"
22648 echo "$as_me:22648: checking if you want to use dbmalloc for testing" >&5
22649 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
22651 # Check whether --with-dbmalloc or --without-dbmalloc was given.
22652 if test "${with_dbmalloc+set}" = set; then
22653 withval="$with_dbmalloc"
22654 case "x$withval" in
22657 : "${with_cflags:=-g}"
22658 : "${enable_leaks:=no}"
22661 cat >>confdefs.h <<EOF
22662 #define USE_DBMALLOC 1
22670 echo "$as_me:22670: result: ${with_dbmalloc:-no}" >&5
22671 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
22673 case ".$with_cflags" in
22683 cf_new_extra_cppflags=
22685 for cf_add_cflags in -g
22687 case "$cf_fix_cppflags" in
22689 case "$cf_add_cflags" in
22690 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22691 case "$cf_add_cflags" in
22693 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22695 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22696 && test -z "${cf_tst_cflags}" \
22697 && cf_fix_cppflags=yes
22699 if test "$cf_fix_cppflags" = yes ; then
22701 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22702 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22705 elif test "${cf_tst_cflags}" = "\"'" ; then
22707 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22708 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22714 case "$CPPFLAGS" in
22718 case "$cf_add_cflags" in
22720 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22722 CPPFLAGS=`echo "$CPPFLAGS" | \
22723 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22724 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22729 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22730 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22737 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22738 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22745 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22746 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22748 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22750 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22751 && test -z "${cf_tst_cflags}" \
22752 && cf_fix_cppflags=no
22757 if test -n "$cf_new_cflags" ; then
22759 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22760 CFLAGS="${CFLAGS}$cf_new_cflags"
22764 if test -n "$cf_new_cppflags" ; then
22766 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22767 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22771 if test -n "$cf_new_extra_cppflags" ; then
22773 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22774 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22783 if test "$with_dbmalloc" = yes ; then
22784 echo "$as_me:22784: checking for dbmalloc.h" >&5
22785 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
22786 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
22787 echo $ECHO_N "(cached) $ECHO_C" >&6
22789 cat >"conftest.$ac_ext" <<_ACEOF
22790 #line 22790 "configure"
22791 #include "confdefs.h"
22792 #include <dbmalloc.h>
22794 if { (eval echo "$as_me:22794: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22795 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22797 $EGREP -v '^ *\+' conftest.er1 >conftest.err
22799 cat conftest.err >&5
22800 echo "$as_me:22800: \$? = $ac_status" >&5
22801 (exit "$ac_status"); } >/dev/null; then
22802 if test -s conftest.err; then
22803 ac_cpp_err=$ac_c_preproc_warn_flag
22810 if test -z "$ac_cpp_err"; then
22811 ac_cv_header_dbmalloc_h=yes
22813 echo "$as_me: failed program was:" >&5
22814 cat "conftest.$ac_ext" >&5
22815 ac_cv_header_dbmalloc_h=no
22817 rm -f conftest.err "conftest.$ac_ext"
22819 echo "$as_me:22819: result: $ac_cv_header_dbmalloc_h" >&5
22820 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
22821 if test "$ac_cv_header_dbmalloc_h" = yes; then
22823 echo "$as_me:22823: checking for debug_malloc in -ldbmalloc" >&5
22824 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
22825 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
22826 echo $ECHO_N "(cached) $ECHO_C" >&6
22828 ac_check_lib_save_LIBS=$LIBS
22829 LIBS="-ldbmalloc $LIBS"
22830 cat >"conftest.$ac_ext" <<_ACEOF
22831 #line 22831 "configure"
22832 #include "confdefs.h"
22834 /* Override any gcc2 internal prototype to avoid an error. */
22838 /* We use char because int might match the return type of a gcc2
22839 builtin and then its argument prototype would still apply. */
22840 char debug_malloc ();
22849 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22850 if { (eval echo "$as_me:22850: \"$ac_link\"") >&5
22851 (eval $ac_link) 2>&5
22853 echo "$as_me:22853: \$? = $ac_status" >&5
22854 (exit "$ac_status"); } &&
22855 { ac_try='test -s "conftest$ac_exeext"'
22856 { (eval echo "$as_me:22856: \"$ac_try\"") >&5
22857 (eval $ac_try) 2>&5
22859 echo "$as_me:22859: \$? = $ac_status" >&5
22860 (exit "$ac_status"); }; }; then
22861 ac_cv_lib_dbmalloc_debug_malloc=yes
22863 echo "$as_me: failed program was:" >&5
22864 cat "conftest.$ac_ext" >&5
22865 ac_cv_lib_dbmalloc_debug_malloc=no
22867 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22868 LIBS=$ac_check_lib_save_LIBS
22870 echo "$as_me:22870: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
22871 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
22872 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
22873 cat >>confdefs.h <<EOF
22874 #define HAVE_LIBDBMALLOC 1
22877 LIBS="-ldbmalloc $LIBS"
22885 echo "$as_me:22885: checking if you want to use valgrind for testing" >&5
22886 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
22888 # Check whether --with-valgrind or --without-valgrind was given.
22889 if test "${with_valgrind+set}" = set; then
22890 withval="$with_valgrind"
22891 case "x$withval" in
22894 : "${with_cflags:=-g}"
22895 : "${enable_leaks:=no}"
22898 cat >>confdefs.h <<EOF
22899 #define USE_VALGRIND 1
22907 echo "$as_me:22907: result: ${with_valgrind:-no}" >&5
22908 echo "${ECHO_T}${with_valgrind:-no}" >&6
22910 case ".$with_cflags" in
22920 cf_new_extra_cppflags=
22922 for cf_add_cflags in -g
22924 case "$cf_fix_cppflags" in
22926 case "$cf_add_cflags" in
22927 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22928 case "$cf_add_cflags" in
22930 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22932 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22933 && test -z "${cf_tst_cflags}" \
22934 && cf_fix_cppflags=yes
22936 if test "$cf_fix_cppflags" = yes ; then
22938 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22939 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22942 elif test "${cf_tst_cflags}" = "\"'" ; then
22944 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22945 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22951 case "$CPPFLAGS" in
22955 case "$cf_add_cflags" in
22957 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22959 CPPFLAGS=`echo "$CPPFLAGS" | \
22960 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22961 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22966 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22967 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22974 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22975 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22982 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22983 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22985 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22987 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22988 && test -z "${cf_tst_cflags}" \
22989 && cf_fix_cppflags=no
22994 if test -n "$cf_new_cflags" ; then
22996 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22997 CFLAGS="${CFLAGS}$cf_new_cflags"
23001 if test -n "$cf_new_cppflags" ; then
23003 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23004 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23008 if test -n "$cf_new_extra_cppflags" ; then
23010 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23011 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23020 echo "$as_me:23020: checking if you want to perform memory-leak testing" >&5
23021 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
23023 # Check whether --enable-leaks or --disable-leaks was given.
23024 if test "${enable_leaks+set}" = set; then
23025 enableval="$enable_leaks"
23026 enable_leaks=$enableval
23030 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
23031 echo "$as_me:23031: result: $with_no_leaks" >&5
23032 echo "${ECHO_T}$with_no_leaks" >&6
23034 if test "$enable_leaks" = no ; then
23036 cat >>confdefs.h <<\EOF
23040 cat >>confdefs.h <<\EOF
23041 #define YY_NO_LEAKS 1
23047 if test "x$cf_cv_enable_rpath" != xno
23049 echo "$as_me:23049: checking for an rpath option" >&5
23050 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
23051 case "$cf_cv_system_name" in
23053 if test "$GCC" = yes; then
23054 LD_RPATH_OPT="-Wl,-rpath,"
23056 LD_RPATH_OPT="-rpath "
23059 (linux*|gnu*|k*bsd*-gnu|freebsd*)
23060 LD_RPATH_OPT="-Wl,-rpath,"
23062 (openbsd[2-9].*|mirbsd*)
23063 LD_RPATH_OPT="-Wl,-rpath,"
23066 LD_RPATH_OPT="-rpath "
23069 LD_RPATH_OPT="-Wl,-rpath,"
23072 LD_RPATH_OPT="-rpath "
23080 echo "$as_me:23080: result: $LD_RPATH_OPT" >&5
23081 echo "${ECHO_T}$LD_RPATH_OPT" >&6
23083 case "x$LD_RPATH_OPT" in
23085 echo "$as_me:23085: checking if we need a space after rpath option" >&5
23086 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
23087 cf_save_LIBS="$LIBS"
23089 cf_add_libs="$LIBS"
23092 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23093 # filter duplicates
23094 for cf_add_1lib in $cf_add_0lib; do
23095 for cf_add_2lib in $cf_add_libs; do
23096 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23101 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23103 LIBS="$cf_add_libs"
23105 cat >"conftest.$ac_ext" <<_ACEOF
23106 #line 23106 "configure"
23107 #include "confdefs.h"
23117 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23118 if { (eval echo "$as_me:23118: \"$ac_link\"") >&5
23119 (eval $ac_link) 2>&5
23121 echo "$as_me:23121: \$? = $ac_status" >&5
23122 (exit "$ac_status"); } &&
23123 { ac_try='test -s "conftest$ac_exeext"'
23124 { (eval echo "$as_me:23124: \"$ac_try\"") >&5
23125 (eval $ac_try) 2>&5
23127 echo "$as_me:23127: \$? = $ac_status" >&5
23128 (exit "$ac_status"); }; }; then
23131 echo "$as_me: failed program was:" >&5
23132 cat "conftest.$ac_ext" >&5
23135 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23136 LIBS="$cf_save_LIBS"
23137 echo "$as_me:23137: result: $cf_rpath_space" >&5
23138 echo "${ECHO_T}$cf_rpath_space" >&6
23139 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
23144 echo "$as_me:23144: checking if rpath-hack should be disabled" >&5
23145 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
23147 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
23148 if test "${enable_rpath_hack+set}" = set; then
23149 enableval="$enable_rpath_hack"
23150 test "$enableval" != no && enableval=yes
23151 if test "$enableval" != "yes" ; then
23152 enable_rpath_hack=no
23154 enable_rpath_hack=yes
23158 enable_rpath_hack=yes
23161 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
23162 echo "$as_me:23162: result: $cf_disable_rpath_hack" >&5
23163 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
23165 if test "$enable_rpath_hack" = yes ; then
23167 echo "$as_me:23167: checking for updated LDFLAGS" >&5
23168 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
23169 if test -n "$LD_RPATH_OPT" ; then
23170 echo "$as_me:23170: result: maybe" >&5
23171 echo "${ECHO_T}maybe" >&6
23175 # Extract the first word of "$ac_prog", so it can be a program name with args.
23176 set dummy $ac_prog; ac_word=$2
23177 echo "$as_me:23177: checking for $ac_word" >&5
23178 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23179 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
23180 echo $ECHO_N "(cached) $ECHO_C" >&6
23182 if test -n "$cf_ldd_prog"; then
23183 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
23185 ac_save_IFS=$IFS; IFS=$ac_path_separator
23187 for ac_dir in $ac_dummy; do
23189 test -z "$ac_dir" && ac_dir=.
23190 $as_executable_p "$ac_dir/$ac_word" || continue
23191 ac_cv_prog_cf_ldd_prog="$ac_prog"
23192 echo "$as_me:23192: found $ac_dir/$ac_word" >&5
23198 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
23199 if test -n "$cf_ldd_prog"; then
23200 echo "$as_me:23200: result: $cf_ldd_prog" >&5
23201 echo "${ECHO_T}$cf_ldd_prog" >&6
23203 echo "$as_me:23203: result: no" >&5
23204 echo "${ECHO_T}no" >&6
23207 test -n "$cf_ldd_prog" && break
23209 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
23211 cf_rpath_list="/usr/lib /lib"
23212 if test "$cf_ldd_prog" != no
23216 cat >"conftest.$ac_ext" <<_ACEOF
23217 #line 23217 "configure"
23218 #include "confdefs.h"
23228 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23229 if { (eval echo "$as_me:23229: \"$ac_link\"") >&5
23230 (eval $ac_link) 2>&5
23232 echo "$as_me:23232: \$? = $ac_status" >&5
23233 (exit "$ac_status"); } &&
23234 { ac_try='test -s "conftest$ac_exeext"'
23235 { (eval echo "$as_me:23235: \"$ac_try\"") >&5
23236 (eval $ac_try) 2>&5
23238 echo "$as_me:23238: \$? = $ac_status" >&5
23239 (exit "$ac_status"); }; }; then
23240 cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
23241 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
23243 echo "$as_me: failed program was:" >&5
23244 cat "conftest.$ac_ext" >&5
23246 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23248 # If we passed the link-test, but get a "not found" on a given library,
23249 # this could be due to inept reconfiguration of gcc to make it only
23250 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
23251 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
23252 # /usr/local libraries.
23253 if test -n "$cf_rpath_oops"
23255 for cf_rpath_src in $cf_rpath_oops
23257 for cf_rpath_dir in \
23262 if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
23264 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
23266 echo "${as_me:-configure}:23266: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
23268 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
23276 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
23278 echo "${as_me:-configure}:23278: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
23280 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
23282 echo "${as_me:-configure}:23282: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
23285 for cf_rpath_src in $LDFLAGS
23287 case "$cf_rpath_src" in
23290 # check if this refers to a directory which we will ignore
23292 if test -n "$cf_rpath_list"
23294 for cf_rpath_item in $cf_rpath_list
23296 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
23304 if test "$cf_rpath_skip" = no
23306 # transform the option
23307 if test "$LD_RPATH_OPT" = "-R " ; then
23308 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
23310 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
23313 # if we have not already added this, add it now
23314 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
23315 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
23317 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
23319 echo "${as_me:-configure}:23319: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
23321 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
23326 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
23328 LDFLAGS=$cf_rpath_dst
23330 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
23332 echo "${as_me:-configure}:23332: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
23334 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
23336 echo "${as_me:-configure}:23336: testing ...checking LIBS $LIBS ..." 1>&5
23339 for cf_rpath_src in $LIBS
23341 case "$cf_rpath_src" in
23344 # check if this refers to a directory which we will ignore
23346 if test -n "$cf_rpath_list"
23348 for cf_rpath_item in $cf_rpath_list
23350 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
23358 if test "$cf_rpath_skip" = no
23360 # transform the option
23361 if test "$LD_RPATH_OPT" = "-R " ; then
23362 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
23364 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
23367 # if we have not already added this, add it now
23368 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
23369 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
23371 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
23373 echo "${as_me:-configure}:23373: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
23375 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
23380 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
23384 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
23386 echo "${as_me:-configure}:23386: testing ...checked LIBS $LIBS ..." 1>&5
23388 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
23390 echo "${as_me:-configure}:23390: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
23393 echo "$as_me:23393: result: no" >&5
23394 echo "${ECHO_T}no" >&6
23402 ac_config_files="$ac_config_files Makefile"
23403 ac_config_commands="$ac_config_commands default"
23404 cat >confcache <<\_ACEOF
23405 # This file is a shell script that caches the results of configure
23406 # tests run on this system so they can be shared between configure
23407 # scripts and configure runs, see configure's option --config-cache.
23408 # It is not useful on other systems. If it contains results you don't
23409 # want to keep, you may remove or edit it.
23411 # config.status only pays attention to the cache file if you give it
23412 # the --recheck option to rerun configure.
23414 # `ac_cv_env_foo' variables (set or unset) will be overriden when
23415 # loading this file, other *unset* `ac_cv_foo' will be assigned the
23416 # following values.
23420 # The following way of writing the cache mishandles newlines in values,
23421 # but we know of no workaround that is simple, portable, and efficient.
23422 # So, don't put newlines in cache variables' values.
23423 # Ultrix sh set writes to stderr and can't be redirected directly,
23424 # and sets the high bit in the cache file unless we assign to the vars.
23427 case `(ac_space=' '; set | grep ac_space) 2>&1` in
23429 # `set' does not quote correctly, so add quotes (double-quote
23430 # substitution turns \\\\ into \\, and sed turns \\ into \).
23433 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23436 # `set' quotes correctly as required by POSIX, so do not add quotes.
23438 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
23445 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23447 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23449 if cmp -s $cache_file confcache; then :; else
23450 if test -w $cache_file; then
23451 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23452 cat confcache >$cache_file
23454 echo "not updating unwritable cache $cache_file"
23459 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23460 # Let make expand exec_prefix.
23461 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23463 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23464 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23465 # trailing colons and then remove the whole line if VPATH becomes empty
23466 # (actually we leave an empty line to preserve line numbers).
23467 if test "x$srcdir" = x.; then
23468 ac_vpsub='/^[ ]*VPATH[ ]*=/{
23469 s/:*\$(srcdir):*/:/;
23470 s/:*\${srcdir}:*/:/;
23472 s/^\([^=]*=[ ]*\):*/\1/;
23478 DEFS=-DHAVE_CONFIG_H
23480 : "${CONFIG_STATUS=./config.status}"
23481 ac_clean_files_save=$ac_clean_files
23482 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23483 { echo "$as_me:23483: creating $CONFIG_STATUS" >&5
23484 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23485 cat >"$CONFIG_STATUS" <<_ACEOF
23487 # Generated automatically by configure.
23488 # Run this file to recreate the current configuration.
23489 # Compiler output produced by configure, useful for debugging
23490 # configure, is in config.log if it exists.
23493 SHELL=\${CONFIG_SHELL-$SHELL}
23494 ac_cs_invocation="\$0 \$@"
23496 CLICOLOR_FORCE= GREP_OPTIONS=
23497 unset CLICOLOR_FORCE GREP_OPTIONS
23500 cat >>"$CONFIG_STATUS" <<\_ACEOF
23501 # Be Bourne compatible
23502 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23505 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23509 # Name of the executable.
23510 as_me=`echo "$0" |sed 's,.*[\\/],,'`
23512 if expr a : '\(a\)' >/dev/null 2>&1; then
23518 rm -f conf$$ conf$$.exe conf$$.file
23520 if ln -s conf$$.file conf$$ 2>/dev/null; then
23521 # We could just check for DJGPP; but this test a) works b) is more generic
23522 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23523 if test -f conf$$.exe; then
23524 # Don't use ln at all; we don't have any links
23529 elif ln conf$$.file conf$$ 2>/dev/null; then
23534 rm -f conf$$ conf$$.exe conf$$.file
23536 as_executable_p="test -f"
23538 # Support unset when possible.
23539 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
23546 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
23547 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
23548 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
23549 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
23550 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
23551 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
23552 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
23553 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
23556 # We need space, tab and new line, in precisely that order.
23562 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
23568 # Files that config.status was made for.
23569 if test -n "$ac_config_files"; then
23570 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
23573 if test -n "$ac_config_headers"; then
23574 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
23577 if test -n "$ac_config_links"; then
23578 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
23581 if test -n "$ac_config_commands"; then
23582 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
23585 cat >>"$CONFIG_STATUS" <<\EOF
23588 \`$as_me' instantiates files from templates according to the
23589 current configuration.
23591 Usage: $0 [OPTIONS] [FILE]...
23593 -h, --help print this help, then exit
23594 -V, --version print version number, then exit
23595 -d, --debug don't remove temporary files
23596 --recheck update $as_me by reconfiguring in the same conditions
23597 --file=FILE[:TEMPLATE]
23598 instantiate the configuration file FILE
23599 --header=FILE[:TEMPLATE]
23600 instantiate the configuration header FILE
23602 Configuration files:
23605 Configuration headers:
23608 Configuration commands:
23611 Report bugs to <dickey@invisible-island.net>."
23614 cat >>"$CONFIG_STATUS" <<EOF
23617 configured by $0, generated by GNU Autoconf 2.52.20210509,
23618 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23620 Copyright 2003-2020,2021 Thomas E. Dickey
23621 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
23622 Free Software Foundation, Inc.
23623 This config.status script is free software; the Free Software Foundation
23624 gives unlimited permission to copy, distribute and modify it."
23629 cat >>"$CONFIG_STATUS" <<\EOF
23630 # If no file are specified by the user, then we need to provide default
23631 # value. By we need to know if files were specified by the user.
23637 ac_option=`expr "x$1" : 'x\([^=]*\)='`
23638 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23640 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
23644 *) # This is not an option, so the user has probably given explicit
23646 ac_need_defaults=false;;
23650 # Handling of the options.
23652 cat >>"$CONFIG_STATUS" <<EOF
23653 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23654 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
23655 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
23657 cat >>"$CONFIG_STATUS" <<\EOF
23658 --version | --vers* | -V )
23659 echo "$ac_cs_version"; exit 0 ;;
23661 # Conflict between --help and --header
23662 { { echo "$as_me:23662: error: ambiguous option: $1
23663 Try \`$0 --help' for more information." >&5
23664 echo "$as_me: error: ambiguous option: $1
23665 Try \`$0 --help' for more information." >&2;}
23666 { (exit 1); exit 1; }; };;
23667 --help | --hel | -h )
23668 echo "$ac_cs_usage"; exit 0 ;;
23669 --debug | --d* | -d )
23671 --file | --fil | --fi | --f )
23673 CONFIG_FILES="$CONFIG_FILES $1"
23674 ac_need_defaults=false;;
23675 --header | --heade | --head | --hea )
23677 CONFIG_HEADERS="$CONFIG_HEADERS $1"
23678 ac_need_defaults=false;;
23680 # This is an error.
23681 -*) { { echo "$as_me:23681: error: unrecognized option: $1
23682 Try \`$0 --help' for more information." >&5
23683 echo "$as_me: error: unrecognized option: $1
23684 Try \`$0 --help' for more information." >&2;}
23685 { (exit 1); exit 1; }; } ;;
23687 *) ac_config_targets="$ac_config_targets $1" ;;
23696 ## ----------------------- ##
23697 ## Running config.status. ##
23698 ## ----------------------- ##
23700 This file was extended by $as_me 2.52.20210509, executed with
23701 CONFIG_FILES = $CONFIG_FILES
23702 CONFIG_HEADERS = $CONFIG_HEADERS
23703 CONFIG_LINKS = $CONFIG_LINKS
23704 CONFIG_COMMANDS = $CONFIG_COMMANDS
23705 > "$ac_cs_invocation"
23706 on `(hostname || uname -n) 2>/dev/null | sed 1q`
23711 cat >>"$CONFIG_STATUS" <<EOF
23713 # INIT-COMMANDS section.
23723 cat >>"$CONFIG_STATUS" <<\EOF
23724 for ac_config_target in $ac_config_targets
23726 case "$ac_config_target" in
23727 # Handling of arguments.
23728 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23729 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23730 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
23731 *) { { echo "$as_me:23731: error: invalid argument: $ac_config_target" >&5
23732 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23733 { (exit 1); exit 1; }; };;
23737 # If the user did not use the arguments to specify the items to instantiate,
23738 # then the envvar interface is used. Set only those that are not.
23739 # We use the long form for the default assignment because of an extremely
23740 # bizarre bug on SunOS 4.1.3.
23741 if "$ac_need_defaults"; then
23742 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23743 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23744 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23747 # Create a temporary directory, and hook for its removal unless debugging.
23750 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23751 trap '{ (exit 1); exit 1; }' 1 2 13 15
23754 # Create a (secure) tmp directory for tmp files.
23757 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
23758 test -n "$tmp" && test -d "$tmp"
23761 tmp=$TMPDIR/cs$$-$RANDOM
23762 (umask 077 && mkdir $tmp)
23765 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
23766 { (exit 1); exit 1; }
23771 cat >>"$CONFIG_STATUS" <<EOF
23774 # CONFIG_FILES section.
23777 # No need to generate the scripts if there are no CONFIG_FILES.
23778 # This happens for instance when ./config.status config.h
23779 if test -n "\$CONFIG_FILES"; then
23780 # Protect against being on the right side of a sed subst in config.status.
23781 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23782 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23783 s,@SHELL@,$SHELL,;t t
23784 s,@exec_prefix@,$exec_prefix,;t t
23785 s,@prefix@,$prefix,;t t
23786 s,@program_transform_name@,$program_transform_name,;t t
23787 s,@bindir@,$bindir,;t t
23788 s,@sbindir@,$sbindir,;t t
23789 s,@libexecdir@,$libexecdir,;t t
23790 s,@datarootdir@,$datarootdir,;t t
23791 s,@datadir@,$datadir,;t t
23792 s,@sysconfdir@,$sysconfdir,;t t
23793 s,@sharedstatedir@,$sharedstatedir,;t t
23794 s,@localstatedir@,$localstatedir,;t t
23795 s,@runstatedir@,$runstatedir,;t t
23796 s,@libdir@,$libdir,;t t
23797 s,@includedir@,$includedir,;t t
23798 s,@oldincludedir@,$oldincludedir,;t t
23799 s,@infodir@,$infodir,;t t
23800 s,@mandir@,$mandir,;t t
23801 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23802 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23803 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23804 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23805 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23806 s,@build_alias@,$build_alias,;t t
23807 s,@host_alias@,$host_alias,;t t
23808 s,@target_alias@,$target_alias,;t t
23809 s,@ECHO_C@,$ECHO_C,;t t
23810 s,@ECHO_N@,$ECHO_N,;t t
23811 s,@ECHO_T@,$ECHO_T,;t t
23812 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23813 s,@DEFS@,$DEFS,;t t
23814 s,@LIBS@,$LIBS,;t t
23815 s,@build@,$build,;t t
23816 s,@build_cpu@,$build_cpu,;t t
23817 s,@build_vendor@,$build_vendor,;t t
23818 s,@build_os@,$build_os,;t t
23819 s,@host@,$host,;t t
23820 s,@host_cpu@,$host_cpu,;t t
23821 s,@host_vendor@,$host_vendor,;t t
23822 s,@host_os@,$host_os,;t t
23823 s,@SET_MAKE@,$SET_MAKE,;t t
23825 s,@CFLAGS@,$CFLAGS,;t t
23826 s,@LDFLAGS@,$LDFLAGS,;t t
23827 s,@CPPFLAGS@,$CPPFLAGS,;t t
23828 s,@ac_ct_CC@,$ac_ct_CC,;t t
23829 s,@EXEEXT@,$EXEEXT,;t t
23830 s,@OBJEXT@,$OBJEXT,;t t
23831 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
23833 s,@GREP@,$GREP,;t t
23834 s,@EGREP@,$EGREP,;t t
23836 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23837 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23838 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
23839 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
23840 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
23841 s,@LINT@,$LINT,;t t
23842 s,@LINT_OPTS@,$LINT_OPTS,;t t
23843 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
23844 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
23845 s,@CTAGS@,$CTAGS,;t t
23846 s,@ETAGS@,$ETAGS,;t t
23847 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
23848 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
23849 s,@MATH_LIB@,$MATH_LIB,;t t
23850 s,@top_builddir@,$top_builddir,;t t
23851 s,@CC_G_OPT@,$CC_G_OPT,;t t
23852 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
23853 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
23854 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
23855 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
23857 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23858 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23859 s,@LD_MODEL@,$LD_MODEL,;t t
23860 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
23861 s,@LIBTOOL@,$LIBTOOL,;t t
23862 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
23863 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
23864 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
23865 s,@LIB_LINK@,$LIB_LINK,;t t
23866 s,@LINK_TESTS@,$LINK_TESTS,;t t
23867 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
23868 s,@PACKAGE@,$PACKAGE,;t t
23869 s,@PTHREAD@,$PTHREAD,;t t
23870 s,@TEST_ARGS@,$TEST_ARGS,;t t
23871 s,@TEST_DEPS@,$TEST_DEPS,;t t
23872 s,@TEST_LIBS@,$TEST_LIBS,;t t
23873 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23874 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23875 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
23876 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
23877 s,@includesubdir@,$includesubdir,;t t
23878 s,@FGREP@,$FGREP,;t t
23879 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
23880 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
23881 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
23882 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
23883 s,@ECHO_LT@,$ECHO_LT,;t t
23884 s,@ECHO_LD@,$ECHO_LD,;t t
23885 s,@RULE_CC@,$RULE_CC,;t t
23886 s,@SHOW_CC@,$SHOW_CC,;t t
23887 s,@ECHO_CC@,$ECHO_CC,;t t
23888 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
23889 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
23890 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
23891 s,@X_CFLAGS@,$X_CFLAGS,;t t
23892 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
23893 s,@X_LIBS@,$X_LIBS,;t t
23894 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
23895 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
23896 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
23897 s,@RGB_PATH@,$RGB_PATH,;t t
23898 s,@no_x11_rgb@,$no_x11_rgb,;t t
23899 s,@FORM_NAME@,$FORM_NAME,;t t
23900 s,@MENU_NAME@,$MENU_NAME,;t t
23901 s,@PANEL_NAME@,$PANEL_NAME,;t t
23902 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
23903 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
23904 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
23909 cat >>"$CONFIG_STATUS" <<\EOF
23910 # Split the substitutions into bite-sized pieces for seds with
23911 # small command number limits, like on Digital OSF/1 and HP-UX.
23912 ac_max_sed_lines=48
23913 ac_sed_frag=1 # Number of current file.
23914 ac_beg=1 # First line for current file.
23915 ac_end=$ac_max_sed_lines # Line after last line for current file.
23918 while "$ac_more_lines"; do
23919 if test "$ac_beg" -gt 1; then
23920 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23922 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23924 if test ! -s $tmp/subs.frag; then
23925 ac_more_lines=false
23927 # The purpose of the label and of the branching condition is to
23928 # speed up the sed processing (if there are no `@' at all, there
23929 # is no need to browse any of the substitutions).
23930 # These are the two extra sed commands mentioned above.
23932 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23933 # It is possible to make a multiline substitution using escaped newlines.
23934 # Ensure that we do not split the substitution between script fragments.
23936 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
23937 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
23938 if test -s $tmp/subs.next; then
23939 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
23940 if test ! -s $tmp/subs.edit; then
23941 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
23942 if test ! -s $tmp/subs.edit; then
23943 if test "$ac_beg" -gt 1; then
23944 ac_end=`expr "$ac_end" - 1`
23951 if test -z "$ac_sed_cmds"; then
23952 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23954 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23956 ac_sed_frag=`expr "$ac_sed_frag" + 1`
23958 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
23961 if test -z "$ac_sed_cmds"; then
23964 fi # test -n "$CONFIG_FILES"
23967 cat >>"$CONFIG_STATUS" <<\EOF
23968 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23969 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23971 - | *:- | *:-:* ) # input from stdin
23973 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23974 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23975 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23976 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23977 * ) ac_file_in=$ac_file.in ;;
23980 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23981 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23982 X"$ac_file" : 'X\(//\)[^/]' \| \
23983 X"$ac_file" : 'X\(//\)$' \| \
23984 X"$ac_file" : 'X\(/\)' \| \
23985 . : '\(.\)' 2>/dev/null ||
23987 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23988 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23989 /^X\(\/\/\)$/{ s//\1/; q; }
23990 /^X\(\/\).*/{ s//\1/; q; }
23992 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23993 { case "$ac_dir" in
23994 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23998 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23999 case $as_mkdir_dir in
24000 # Skip DOS drivespec
24001 ?:) as_incr_dir=$as_mkdir_dir ;;
24003 as_incr_dir=$as_incr_dir/$as_mkdir_dir
24004 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24009 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
24010 # A "../" for each directory in $ac_dir_suffix.
24011 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
24013 ac_dir_suffix= ac_dots=
24018 if test -z "$ac_dots"; then
24021 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
24023 [\\/]* | ?:[\\/]* )
24024 ac_srcdir="$srcdir$ac_dir_suffix";
24025 ac_top_srcdir="$srcdir" ;;
24026 *) # Relative path.
24027 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
24028 ac_top_srcdir="$ac_dots$srcdir" ;;
24032 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
24033 *) ac_INSTALL=$ac_dots$INSTALL ;;
24036 if test x"$ac_file" != x-; then
24037 { echo "$as_me:24037: creating $ac_file" >&5
24038 echo "$as_me: creating $ac_file" >&6;}
24041 # Let's still pretend it is `configure' which instantiates (i.e., don't
24042 # use $as_me), people would be surprised to read:
24043 # /* config.h. Generated automatically by config.status. */
24044 configure_input="Generated automatically from `echo $ac_file_in |
24045 sed 's,.*/,,'` by configure."
24047 # First look for the input files in the build tree, otherwise in the
24049 ac_file_inputs=`IFS=:
24050 for f in $ac_file_in; do
24052 -) echo $tmp/stdin ;;
24054 # Absolute (can't be DOS-style, as IFS=:)
24055 test -f "$f" || { { echo "$as_me:24055: error: cannot find input file: $f" >&5
24056 echo "$as_me: error: cannot find input file: $f" >&2;}
24057 { (exit 1); exit 1; }; }
24060 if test -f "$f"; then
24063 elif test -f "$srcdir/$f"; then
24068 { { echo "$as_me:24068: error: cannot find input file: $f" >&5
24069 echo "$as_me: error: cannot find input file: $f" >&2;}
24070 { (exit 1); exit 1; }; }
24073 done` || { (exit 1); exit 1; }
24075 cat >>"$CONFIG_STATUS" <<\EOF
24076 ac_warn_datarootdir=no
24077 if test x"$ac_file" != x-; then
24078 for ac_item in $ac_file_inputs
24080 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
24081 if test -n "$ac_seen"; then
24082 ac_used=`grep '@datarootdir@' "$ac_item"`
24083 if test -z "$ac_used"; then
24084 { echo "$as_me:24084: WARNING: datarootdir was used implicitly but not set:
24086 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
24088 ac_warn_datarootdir=yes
24091 ac_seen=`grep '${datarootdir}' "$ac_item"`
24092 if test -n "$ac_seen"; then
24093 { echo "$as_me:24093: WARNING: datarootdir was used explicitly but not set:
24095 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
24097 ac_warn_datarootdir=yes
24102 if test "x$ac_warn_datarootdir" = xyes; then
24103 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
24107 cat >>"$CONFIG_STATUS" <<EOF
24111 cat >>"$CONFIG_STATUS" <<\EOF
24113 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24114 s,@configure_input@,$configure_input,;t t
24115 s,@srcdir@,$ac_srcdir,;t t
24116 s,@top_srcdir@,$ac_top_srcdir,;t t
24117 s,@INSTALL@,$ac_INSTALL,;t t
24118 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
24120 if test x"$ac_file" != x-; then
24121 cp "$tmp/out" "$ac_file"
24123 for ac_name in prefix exec_prefix datarootdir
24125 ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
24126 if test -n "$ac_seen"; then
24127 ac_init=`${EGREP-egrep} '[ ]*'$ac_name'[ ]*=' "$ac_file"`
24128 if test -z "$ac_init"; then
24129 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
24130 { echo "$as_me:24130: WARNING: Variable $ac_name is used but was not set:
24132 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
24137 ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
24138 ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
24139 if test -s $tmp/out; then
24140 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
24141 { echo "$as_me:24141: WARNING: Some variables may not be substituted:
24143 echo "$as_me: WARNING: Some variables may not be substituted:
24153 cat >>"$CONFIG_STATUS" <<\EOF
24156 # CONFIG_HEADER section.
24159 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24160 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24162 # ac_d sets the value in "#define NAME VALUE" lines.
24163 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
24164 ac_dB='[ ].*$,\1#\2'
24167 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24168 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
24169 ac_iB='\([ ]\),\1#\2define\3'
24172 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24173 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
24174 ac_uB='$,\1#\2define\3'
24178 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
24179 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24181 - | *:- | *:-:* ) # input from stdin
24183 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24184 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24185 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24186 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24187 * ) ac_file_in=$ac_file.in ;;
24190 test x"$ac_file" != x- && { echo "$as_me:24190: creating $ac_file" >&5
24191 echo "$as_me: creating $ac_file" >&6;}
24193 # First look for the input files in the build tree, otherwise in the
24195 ac_file_inputs=`IFS=:
24196 for f in $ac_file_in; do
24198 -) echo $tmp/stdin ;;
24200 # Absolute (can't be DOS-style, as IFS=:)
24201 test -f "$f" || { { echo "$as_me:24201: error: cannot find input file: $f" >&5
24202 echo "$as_me: error: cannot find input file: $f" >&2;}
24203 { (exit 1); exit 1; }; }
24206 if test -f "$f"; then
24209 elif test -f "$srcdir/$f"; then
24214 { { echo "$as_me:24214: error: cannot find input file: $f" >&5
24215 echo "$as_me: error: cannot find input file: $f" >&2;}
24216 { (exit 1); exit 1; }; }
24219 done` || { (exit 1); exit 1; }
24220 # Remove the trailing spaces.
24221 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
24225 # Transform confdefs.h into a list of #define's. We won't use it as a sed
24226 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
24227 # be either 'cat' or 'sort'.
24228 cat confdefs.h | uniq >conftest.vals
24230 # Break up conftest.vals because some shells have a limit on
24231 # the size of here documents, and old seds have small limits too.
24233 rm -f conftest.tail
24234 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
24235 while grep . conftest.vals >/dev/null
24237 # Write chunks of a limited-size here document to conftest.frag.
24238 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
24239 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
24240 echo 'CEOF' >> "$CONFIG_STATUS"
24241 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
24242 rm -f conftest.vals
24243 mv conftest.tail conftest.vals
24245 rm -f conftest.vals
24247 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
24249 echo ' cat >> conftest.edit <<CEOF
24250 /@DEFS@/r conftest.frag
24253 sed -f conftest.edit $tmp/in > $tmp/out
24255 mv $tmp/out $tmp/in
24256 rm -f conftest.edit conftest.frag
24257 ' >> "$CONFIG_STATUS"
24259 cat >>"$CONFIG_STATUS" <<\EOF
24260 # Let's still pretend it is `configure' which instantiates (i.e., don't
24261 # use $as_me), people would be surprised to read:
24262 # /* config.h. Generated automatically by config.status. */
24263 if test x"$ac_file" = x-; then
24264 echo "/* Generated automatically by configure. */" >$tmp/config.h
24266 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
24268 cat $tmp/in >>$tmp/config.h
24270 if test x"$ac_file" != x-; then
24271 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
24272 { echo "$as_me:24272: $ac_file is unchanged" >&5
24273 echo "$as_me: $ac_file is unchanged" >&6;}
24275 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24276 X"$ac_file" : 'X\(//\)[^/]' \| \
24277 X"$ac_file" : 'X\(//\)$' \| \
24278 X"$ac_file" : 'X\(/\)' \| \
24279 . : '\(.\)' 2>/dev/null ||
24281 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24282 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24283 /^X\(\/\/\)$/{ s//\1/; q; }
24284 /^X\(\/\).*/{ s//\1/; q; }
24286 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24287 { case "$ac_dir" in
24288 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24292 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24293 case $as_mkdir_dir in
24294 # Skip DOS drivespec
24295 ?:) as_incr_dir=$as_mkdir_dir ;;
24297 as_incr_dir=$as_incr_dir/$as_mkdir_dir
24298 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24305 mv "$tmp/config.h" "$ac_file"
24309 rm -f $tmp/config.h
24313 cat >>"$CONFIG_STATUS" <<\EOF
24315 # CONFIG_COMMANDS section.
24317 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24318 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24319 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24326 if test ! -d "$srcdir/$cf_dir" ; then
24328 elif test -f "$srcdir/$cf_dir/programs" ; then
24329 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
24333 cat >>Makefile <<TEST_EOF
24335 # These rules are generated so we do not rely on suffix rules, which do not
24336 # work consistently for different make-programs (the '\$(MODEL)/' confuses
24337 # some, and the '\$x' confuses others).
24340 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
24343 cat >>Makefile <<TEST_EOF
24345 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
24346 \$(srcdir)/test.priv.h \\
24349 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) -DMODULE_NAME="$N" \$(srcdir)/$N.c
24353 if test -f ../config.guess && test -f ../config.sub
24355 cat >>Makefile <<TEST_EOF
24357 # if we used CF_INHERIT for getting these files, we can remove them
24359 rm -f config.guess config.sub
24367 cat >>"$CONFIG_STATUS" <<\EOF
24369 { (exit 0); exit 0; }
24371 chmod +x "$CONFIG_STATUS"
24372 ac_clean_files=$ac_clean_files_save
24374 # configure is writing to config.log, and then calls config.status.
24375 # config.status does its own redirection, appending to config.log.
24376 # Unfortunately, on DOS this fails, as config.log is still kept open
24377 # by configure, so config.status won't be able to write to it; its
24378 # output is simply discarded. So we exec the FD to /dev/null,
24379 # effectively closing config.log, so it can be properly (re)opened and
24380 # appended to by config.status. When coming back to configure, we
24381 # need to make the FD available again.
24382 if test "$no_create" != yes; then
24385 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
24387 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24388 # would make configure fail if this is the last instruction.
24389 "$ac_cs_success" || { (exit 1); exit 1; }